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([[99,5,7,8,16,18],{"+ua5":function(ct,_e,K){},"/cxE":function(ct,_e,K){"use strict";K.d(_e,"f",function(){return D}),K.d(_e,"g",function(){return j}),K.d(_e,"h",function(){return N}),K.d(_e,"e",function(){return X}),K.d(_e,"b",function(){return M}),K.d(_e,"c",function(){return e}),K.d(_e,"d",function(){return R}),K.d(_e,"a",function(){return f});class oe{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 oe;function D(v){X(v)||G.onUnexpectedError(v);return}function j(v){X(v)||G.onUnexpectedExternalError(v);return}function N(v){if(v instanceof Error){let{name:u,message:s}=v;const i=v.stacktrace||v.stack;return{$isError:!0,name:u,message:s,stack:i}}return v}const O="Canceled";function X(v){return v instanceof Error&&v.name===O&&v.message===O}function M(){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 f extends Error{constructor(v){super("NotSupported");v&&(this.message=v)}}},"24hK":function(ct,_e,K){"use strict";K.d(_e,"a",function(){return G});class oe{constructor(D){this.element=D,this.next=oe.Undefined,this.prev=oe.Undefined}}oe.Undefined=new oe(void 0);class G{constructor(){this._first=oe.Undefined,this._last=oe.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===oe.Undefined}clear(){let D=this._first;for(;D!==oe.Undefined;){const j=D.next;D.prev=oe.Undefined,D.next=oe.Undefined,D=j}this._first=oe.Undefined,this._last=oe.Undefined,this._size=0}unshift(D){return this._insert(D,!1)}push(D){return this._insert(D,!0)}_insert(D,j){const N=new oe(D);if(this._first===oe.Undefined)this._first=N,this._last=N;else if(j){const X=this._last;this._last=N,N.prev=X,X.next=N}else{const X=this._first;this._first=N,N.next=X,X.prev=N}this._size+=1;let O=!1;return()=>{O||(O=!0,this._remove(N))}}shift(){if(this._first===oe.Undefined)return;{const D=this._first.element;return this._remove(this._first),D}}pop(){if(this._last===oe.Undefined)return;{const D=this._last.element;return this._remove(this._last),D}}_remove(D){if(D.prev!==oe.Undefined&&D.next!==oe.Undefined){const j=D.prev;j.next=D.next,D.next.prev=j}else D.prev===oe.Undefined&&D.next===oe.Undefined?(this._first=oe.Undefined,this._last=oe.Undefined):D.next===oe.Undefined?(this._last=this._last.prev,this._last.next=oe.Undefined):D.prev===oe.Undefined&&(this._first=this._first.next,this._first.prev=oe.Undefined);this._size-=1}*[Symbol.iterator](){let D=this._first;for(;D!==oe.Undefined;)yield D.element,D=D.next}}},"3/fG":function(ct,_e,K){"use strict";K.d(_e,"a",function(){return G});function oe(D,j){let N;return j.length===0?N=D:N=D.replace(/\{(\d+)\}/g,function(O,X){const M=X[0];return typeof j[M]!="undefined"?j[M]:O}),N}function G(D,j,...N){return oe(j,N)}},"49sm":function(ct,_e){var K={}.toString;ct.exports=Array.isArray||function(oe){return K.call(oe)=="[object Array]"}},"55Ip":function(ct,_e,K){"use strict";K.d(_e,"a",function(){return r});var oe=K("Ty5D"),G=K("dI71"),D=K("q1tI"),j=K.n(D),N=K("YS25"),O=K("17x9"),X=K.n(O),M=K("wx14"),e=K("zLVn"),R=K("9R94"),f=function(n){Object(G.a)(l,n);function l(){for(var w,g=arguments.length,c=new Array(g),L=0;L<g;L++)c[L]=arguments[L];return w=n.call.apply(n,[this].concat(c))||this,w.history=Object(N.a)(w.props),w}var h=l.prototype;return h.render=function(){return j.a.createElement(oe.c,{history:this.history,children:this.props.children})},l}(j.a.Component),v=function(n){Object(G.a)(l,n);function l(){for(var w,g=arguments.length,c=new Array(g),L=0;L<g;L++)c[L]=arguments[L];return w=n.call.apply(n,[this].concat(c))||this,w.history=Object(N.b)(w.props),w}var h=l.prototype;return h.render=function(){return j.a.createElement(oe.c,{history:this.history,children:this.props.children})},l}(j.a.Component),u=function(l,h){return typeof l=="function"?l(h):l},s=function(l,h){return typeof l=="string"?Object(N.c)(l,null,null,h):l},i=function(l){return l},A=j.a.forwardRef;typeof A=="undefined"&&(A=i);function o(n){return!!(n.metaKey||n.altKey||n.ctrlKey||n.shiftKey)}var a=A(function(n,l){var h=n.innerRef,w=n.navigate,g=n.onClick,c=Object(e.a)(n,["innerRef","navigate","onClick"]),L=c.target,F=Object(M.a)({},c,{onClick:function(P){try{g&&g(P)}catch(W){throw P.preventDefault(),W}!P.defaultPrevented&&P.button===0&&(!L||L==="_self")&&!o(P)&&(P.preventDefault(),w())}});return i!==A?F.ref=l||h:F.ref=h,j.a.createElement("a",F)}),r=A(function(n,l){var h=n.component,w=h===void 0?a:h,g=n.replace,c=n.to,L=n.innerRef,F=Object(e.a)(n,["component","replace","to","innerRef"]);return j.a.createElement(oe.e.Consumer,null,function(B){B||Object(R.a)(!1);var P=B.history,W=s(u(c,B.location),B.location),U=W?P.createHref(W):"",$=Object(M.a)({},F,{href:U,navigate:function(){var pe=u(c,B.location),fe=g?P.replace:P.push;fe(pe)}});return i!==A?$.ref=l||L:$.innerRef=L,j.a.createElement(w,$)})});if(!1)var t,_;var y=function(l){return l},b=j.a.forwardRef;typeof b=="undefined"&&(b=y);function x(){for(var n=arguments.length,l=new Array(n),h=0;h<n;h++)l[h]=arguments[h];return l.filter(function(w){return w}).join(" ")}var E=b(function(n,l){var h=n["aria-current"],w=h===void 0?"page":h,g=n.activeClassName,c=g===void 0?"active":g,L=n.activeStyle,F=n.className,B=n.exact,P=n.isActive,W=n.location,U=n.sensitive,$=n.strict,ee=n.style,pe=n.to,fe=n.innerRef,Le=Object(e.a)(n,["aria-current","activeClassName","activeStyle","className","exact","isActive","location","sensitive","strict","style","to","innerRef"]);return j.a.createElement(oe.e.Consumer,null,function(Ie){Ie||Object(R.a)(!1);var xe=W||Ie.location,Ue=s(u(pe,xe),xe),Fe=Ue.pathname,we=Fe&&Fe.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1"),ve=we?Object(oe.f)(xe.pathname,{path:we,exact:B,sensitive:U,strict:$}):null,ze=!!(P?P(ve,xe):ve),at=ze?x(F,c):F,nt=ze?Object(M.a)({},ee,{},L):ee,et=Object(M.a)({"aria-current":ze&&w||null,className:at,style:nt,to:Ue},Le);return y!==b?et.ref=l||fe:et.innerRef=fe,j.a.createElement(r,et)})});if(!1)var d},"5VLF":function(ct,_e,K){"use strict";var oe,G;function D(j,N,O){var X=function(M,e){return j.js_beautify(M,e)};return X.js=j.js_beautify,X.css=N.css_beautify,X.html=O.html_beautify,X.js_beautify=j.js_beautify,X.css_beautify=N.css_beautify,X.html_beautify=O.html_beautify,X}!(oe=[K("6UM0"),K("TXwP"),K("psGv")],G=function(j,N,O){return D(j,N,O)}.apply(_e,oe),G!==void 0&&(ct.exports=G))},"5Y4S":function(ct,_e,K){"use strict";K.d(_e,"a",function(){return D});var oe=K("MNsG");const G=oe.b.performance&&typeof oe.b.performance.now=="function";class D{constructor(j){this._highResolution=G&&j,this._startTime=this._now(),this._stopTime=-1}static create(j=!0){return new D(j)}stop(){this._stopTime=this._now()}elapsed(){return this._stopTime!==-1?this._stopTime-this._startTime:this._now()-this._startTime}_now(){return this._highResolution?oe.b.performance.now():Date.now()}}},"6+eU":function(ct,_e,K){"use strict";K.d(_e,"a",function(){return b});var oe=K("wx14"),G=K("rePB"),D=K("VTBJ"),j=K("1OyB"),N=K("vuIU"),O=K("Ji7U"),X=K("LK+K"),M=K("q1tI"),e=K.n(M),R=K("TSYQ"),f=K.n(R),v=function(E){var d,n="".concat(E.rootPrefixCls,"-item"),l=f()(n,"".concat(n,"-").concat(E.page),(d={},Object(G.a)(d,"".concat(n,"-active"),E.active),Object(G.a)(d,E.className,!!E.className),Object(G.a)(d,"".concat(n,"-disabled"),!E.page),d)),h=function(){E.onClick(E.page)},w=function(c){E.onKeyPress(c,E.onClick,E.page)};return e.a.createElement("li",{title:E.showTitle?E.page:null,className:l,onClick:h,onKeyPress:w,tabIndex:"0"},E.itemRender(E.page,"page",e.a.createElement("a",{rel:"nofollow"},E.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},i=function(x){Object(O.a)(d,x);var E=Object(X.a)(d);function d(){var n;Object(j.a)(this,d);for(var l=arguments.length,h=new Array(l),w=0;w<l;w++)h[w]=arguments[w];return n=E.call.apply(E,[this].concat(h)),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 c=n.props,L=c.goButton,F=c.quickGo,B=c.rootPrefixCls,P=n.state.goInputText;if(L||P==="")return;if(g.relatedTarget&&(g.relatedTarget.className.indexOf("".concat(B,"-prev"))>=0||g.relatedTarget.className.indexOf("".concat(B,"-next"))>=0))return;n.setState({goInputText:""}),F(n.getValidValue())},n.go=function(g){var c=n.state.goInputText;if(c==="")return;(g.keyCode===s.ENTER||g.type==="click")&&(n.setState({goInputText:""}),n.props.quickGo(n.getValidValue()))},n}return Object(N.a)(d,[{key:"getValidValue",value:function(){var l=this.state,h=l.goInputText,w=l.current;return!h||isNaN(h)?w:Number(h)}},{key:"getPageSizeOptions",value:function(){var l=this.props,h=l.pageSize,w=l.pageSizeOptions;return w.some(function(g){return g.toString()===h.toString()})?w:w.concat([h.toString()]).sort(function(g,c){var L=isNaN(Number(g))?0:Number(g),F=isNaN(Number(c))?0:Number(c);return L-F})}},{key:"render",value:function(){var l=this,h=this.props,w=h.pageSize,g=h.locale,c=h.rootPrefixCls,L=h.changeSize,F=h.quickGo,B=h.goButton,P=h.selectComponentClass,W=h.buildOptionText,U=h.selectPrefixCls,$=h.disabled,ee=this.state.goInputText,pe="".concat(c,"-options"),fe=P,Le=null,Ie=null,xe=null;if(!L&&!F)return null;var Ue=this.getPageSizeOptions();if(L&&fe){var Fe=Ue.map(function(we,ve){return e.a.createElement(fe.Option,{key:ve,value:we.toString()},(W||l.buildOptionText)(we))});Le=e.a.createElement(fe,{disabled:$,prefixCls:U,showSearch:!1,className:"".concat(pe,"-size-changer"),optionLabelProp:"children",dropdownMatchSelectWidth:!1,value:(w||Ue[0]).toString(),onChange:this.changeSize,getPopupContainer:function(ve){return ve.parentNode}},Fe)}return F&&(B&&(xe=typeof B=="boolean"?e.a.createElement("button",{type:"button",onClick:this.go,onKeyUp:this.go,disabled:$,className:"".concat(pe,"-quick-jumper-button")},g.jump_to_confirm):e.a.createElement("span",{onClick:this.go,onKeyUp:this.go},B)),Ie=e.a.createElement("div",{className:"".concat(pe,"-quick-jumper")},g.jump_to,e.a.createElement("input",{disabled:$,type:"text",value:ee,onChange:this.handleChange,onKeyUp:this.go,onBlur:this.handleBlur}),g.page,xe)),e.a.createElement("li",{className:"".concat(pe)},Le,Ie)}}]),d}(e.a.Component);i.defaultProps={pageSizeOptions:["10","20","50","100"]};var A=i,o=K("N2Kk");function a(){}function r(x){return typeof x=="number"&&isFinite(x)&&Math.floor(x)===x}function t(x,E,d){return d}function _(x,E,d){var n=typeof x=="undefined"?E.pageSize:x;return Math.floor((d.total-1)/n)+1}var y=function(x){Object(O.a)(d,x);var E=Object(X.a)(d);function d(n){var l;Object(j.a)(this,d),l=E.call(this,n),l.getJumpPrevPage=function(){return Math.max(1,l.state.current-(l.props.showLessItems?3:5))},l.getJumpNextPage=function(){return Math.min(_(void 0,l.state,l.props),l.state.current+(l.props.showLessItems?3:5))},l.getItemIcon=function(L,F){var B=l.props.prefixCls,P=L||e.a.createElement("button",{type:"button","aria-label":F,className:"".concat(B,"-item-link")});return typeof L=="function"&&(P=e.a.createElement(L,Object(D.a)({},l.props))),P},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,F=L.showQuickJumper,B=L.pageSize,P=L.total;return P<=B?!1:F},l.handleKeyDown=function(L){(L.keyCode===s.ARROW_UP||L.keyCode===s.ARROW_DOWN)&&L.preventDefault()},l.handleKeyUp=function(L){var F=l.getValidValue(L),B=l.state.currentInputValue;F!==B&&l.setState({currentInputValue:F}),L.keyCode===s.ENTER?l.handleChange(F):L.keyCode===s.ARROW_UP?l.handleChange(F-1):L.keyCode===s.ARROW_DOWN&&l.handleChange(F+1)},l.changePageSize=function(L){var F=l.state.current,B=_(L,l.state,l.props);F=F>B?B:F,B===0&&(F=l.state.current),typeof L=="number"&&("pageSize"in l.props||l.setState({pageSize:L}),"current"in l.props||l.setState({current:F,currentInputValue:F})),l.props.onShowSizeChange(F,L),"onChange"in l.props&&l.props.onChange&&l.props.onChange(F,L)},l.handleChange=function(L){var F=l.props.disabled,B=L;if(l.isValid(B)&&!F){var P=_(void 0,l.state,l.props);B>P?B=P:B<1&&(B=1),"current"in l.props||l.setState({current:B,currentInputValue:B});var W=l.state.pageSize;return l.props.onChange(B,W),B}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<_(void 0,l.state,l.props)},l.runIfEnter=function(L,F){if(L.key==="Enter"||L.charCode===13){for(var B=arguments.length,P=new Array(B>2?B-2:0),W=2;W<B;W++)P[W-2]=arguments[W];F.apply(void 0,P)}},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 h=n.onChange!==a,w="current"in n;w&&!h&&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 c=n.defaultPageSize;return"pageSize"in n&&(c=n.pageSize),g=Math.min(g,_(c,void 0,n)),l.state={current:g,currentInputValue:g,pageSize:c},l}return Object(N.a)(d,[{key:"componentDidUpdate",value:function(l,h){var w=this.props.prefixCls;if(h.current!==this.state.current&&this.paginationNode){var g=this.paginationNode.querySelector(".".concat(w,"-item-").concat(h.current));g&&document.activeElement===g&&g.blur()}}},{key:"getValidValue",value:function(l){var h=l.target.value,w=_(void 0,this.state,this.props),g=this.state.currentInputValue,c;return h===""?c=h:isNaN(Number(h))?c=g:h>=w?c=w:c=Number(h),c}},{key:"getShowSizeChanger",value:function(){var l=this.props,h=l.showSizeChanger,w=l.total,g=l.totalBoundaryShowSizeChanger;return typeof h!="undefined"?h:w>g}},{key:"renderPrev",value:function(l){var h=this.props,w=h.prevIcon,g=h.itemRender,c=g(l,"prev",this.getItemIcon(w,"prev page")),L=!this.hasPrev();return Object(M.isValidElement)(c)?Object(M.cloneElement)(c,{disabled:L}):c}},{key:"renderNext",value:function(l){var h=this.props,w=h.nextIcon,g=h.itemRender,c=g(l,"next",this.getItemIcon(w,"next page")),L=!this.hasNext();return Object(M.isValidElement)(c)?Object(M.cloneElement)(c,{disabled:L}):c}},{key:"render",value:function(){var l=this,h=this.props,w=h.prefixCls,g=h.className,c=h.style,L=h.disabled,F=h.hideOnSinglePage,B=h.total,P=h.locale,W=h.showQuickJumper,U=h.showLessItems,$=h.showTitle,ee=h.showTotal,pe=h.simple,fe=h.itemRender,Le=h.showPrevNextJumpers,Ie=h.jumpPrevIcon,xe=h.jumpNextIcon,Ue=h.selectComponentClass,Fe=h.selectPrefixCls,we=h.pageSizeOptions,ve=this.state,ze=ve.current,at=ve.pageSize,nt=ve.currentInputValue;if(F===!0&&B<=at)return null;var et=_(void 0,this.state,this.props),Ke=[],re=null,z=null,Y=null,J=null,ie=null,ue=W&&W.goButton,he=U?1:2,He=ze-1>0?ze-1:0,We=ze+1<et?ze+1:et,je=Object.keys(this.props).reduce(function(te,ne){return(ne.substr(0,5)==="data-"||ne.substr(0,5)==="aria-"||ne==="role")&&(te[ne]=l.props[ne]),te},{});if(pe)return ue&&(typeof ue=="boolean"?ie=e.a.createElement("button",{type:"button",onClick:this.handleGoTO,onKeyUp:this.handleGoTO},P.jump_to_confirm):ie=e.a.createElement("span",{onClick:this.handleGoTO,onKeyUp:this.handleGoTO},ue),ie=e.a.createElement("li",{title:$?"".concat(P.jump_to).concat(ze,"/").concat(et):null,className:"".concat(w,"-simple-pager")},ie)),e.a.createElement("ul",Object(oe.a)({className:f()(w,"".concat(w,"-simple"),Object(G.a)({},"".concat(w,"-disabled"),L),g),style:c,ref:this.savePaginationNode},je),e.a.createElement("li",{title:$?P.prev_page:null,onClick:this.prev,tabIndex:this.hasPrev()?0:null,onKeyPress:this.runIfEnterPrev,className:f()("".concat(w,"-prev"),Object(G.a)({},"".concat(w,"-disabled"),!this.hasPrev())),"aria-disabled":!this.hasPrev()},this.renderPrev(He)),e.a.createElement("li",{title:$?"".concat(ze,"/").concat(et):null,className:"".concat(w,"-simple-pager")},e.a.createElement("input",{type:"text",value:nt,disabled:L,onKeyDown:this.handleKeyDown,onKeyUp:this.handleKeyUp,onChange:this.handleKeyUp,size:"3"}),e.a.createElement("span",{className:"".concat(w,"-slash")},"/"),et),e.a.createElement("li",{title:$?P.next_page:null,onClick:this.next,tabIndex:this.hasPrev()?0:null,onKeyPress:this.runIfEnterNext,className:f()("".concat(w,"-next"),Object(G.a)({},"".concat(w,"-disabled"),!this.hasNext())),"aria-disabled":!this.hasNext()},this.renderNext(We)),ie);if(et<=3+he*2){var Ge={locale:P,rootPrefixCls:w,onClick:this.handleChange,onKeyPress:this.runIfEnter,showTitle:$,itemRender:fe};et||Ke.push(e.a.createElement(u,Object(oe.a)({},Ge,{key:"noPager",page:et,className:"".concat(w,"-disabled")})));for(var rt=1;rt<=et;rt+=1){var st=ze===rt;Ke.push(e.a.createElement(u,Object(oe.a)({},Ge,{key:rt,page:rt,active:st})))}}else{var Te=U?P.prev_3:P.prev_5,De=U?P.next_3:P.next_5;Le&&(re=e.a.createElement("li",{title:$?Te:null,key:"prev",onClick:this.jumpPrev,tabIndex:"0",onKeyPress:this.runIfEnterJumpPrev,className:f()("".concat(w,"-jump-prev"),Object(G.a)({},"".concat(w,"-jump-prev-custom-icon"),!!Ie))},fe(this.getJumpPrevPage(),"jump-prev",this.getItemIcon(Ie,"prev page"))),z=e.a.createElement("li",{title:$?De:null,key:"next",tabIndex:"0",onClick:this.jumpNext,onKeyPress:this.runIfEnterJumpNext,className:f()("".concat(w,"-jump-next"),Object(G.a)({},"".concat(w,"-jump-next-custom-icon"),!!xe))},fe(this.getJumpNextPage(),"jump-next",this.getItemIcon(xe,"next page")))),J=e.a.createElement(u,{locale:P,last:!0,rootPrefixCls:w,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:et,page:et,active:!1,showTitle:$,itemRender:fe}),Y=e.a.createElement(u,{locale:P,rootPrefixCls:w,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:1,page:1,active:!1,showTitle:$,itemRender:fe});var Ve=Math.max(1,ze-he),$e=Math.min(ze+he,et);ze-1<=he&&($e=1+he*2),et-ze<=he&&(Ve=et-he*2);for(var Ne=Ve;Ne<=$e;Ne+=1){var Pe=ze===Ne;Ke.push(e.a.createElement(u,{locale:P,rootPrefixCls:w,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:Ne,page:Ne,active:Pe,showTitle:$,itemRender:fe}))}ze-1>=he*2&&ze!==1+2&&(Ke[0]=Object(M.cloneElement)(Ke[0],{className:"".concat(w,"-item-after-jump-prev")}),Ke.unshift(re)),et-ze>=he*2&&ze!==et-2&&(Ke[Ke.length-1]=Object(M.cloneElement)(Ke[Ke.length-1],{className:"".concat(w,"-item-before-jump-next")}),Ke.push(z)),Ve!==1&&Ke.unshift(Y),$e!==et&&Ke.push(J)}var Ce=null;ee&&(Ce=e.a.createElement("li",{className:"".concat(w,"-total-text")},ee(B,[B===0?0:(ze-1)*at+1,ze*at>B?B:ze*at])));var ce=!this.hasPrev()||!et,ge=!this.hasNext()||!et;return e.a.createElement("ul",Object(oe.a)({className:f()(w,g,Object(G.a)({},"".concat(w,"-disabled"),L)),style:c,unselectable:"unselectable",ref:this.savePaginationNode},je),Ce,e.a.createElement("li",{title:$?P.prev_page:null,onClick:this.prev,tabIndex:ce?null:0,onKeyPress:this.runIfEnterPrev,className:f()("".concat(w,"-prev"),Object(G.a)({},"".concat(w,"-disabled"),ce)),"aria-disabled":ce},this.renderPrev(He)),Ke,e.a.createElement("li",{title:$?P.next_page:null,onClick:this.next,tabIndex:ge?null:0,onKeyPress:this.runIfEnterNext,className:f()("".concat(w,"-next"),Object(G.a)({},"".concat(w,"-disabled"),ge)),"aria-disabled":ge},this.renderNext(We)),e.a.createElement(A,{disabled:L,locale:P,rootPrefixCls:w,selectComponentClass:Ue,selectPrefixCls:Fe,changeSize:this.getShowSizeChanger()?this.changePageSize:null,current:ze,pageSize:at,pageSizeOptions:we,quickGo:this.shouldDisplayQuickJumper()?this.handleChange:null,goButton:ue}))}}],[{key:"getDerivedStateFromProps",value:function(l,h){var w={};if("current"in l&&(w.current=l.current,l.current!==h.current&&(w.currentInputValue=w.current)),"pageSize"in l&&l.pageSize!==h.pageSize){var g=h.current,c=_(l.pageSize,h,l);g=g>c?c:g,"current"in l||(w.current=g,w.currentInputValue=g),w.pageSize=l.pageSize}return w}}]),d}(e.a.Component);y.defaultProps={defaultCurrent:1,total:0,defaultPageSize:10,onChange:a,className:"",selectPrefixCls:"rc-select",prefixCls:"rc-pagination",selectComponentClass:null,hideOnSinglePage:!1,showPrevNextJumpers:!0,showQuickJumper:!1,showLessItems:!1,showTitle:!0,onShowSizeChange:a,locale:o.a,style:{},itemRender:t,totalBoundaryShowSizeChanger:50};var b=y},"6RRn":function(ct,_e,K){"use strict";var oe=K("wCXF"),G=K("n6Qo");K.d(_e,"b",function(){return G.a});var D=K("IBYe"),j=K("6eGT"),N=K("hW8S");K.d(_e,"a",function(){return N.a}),_e.c=oe.b},"6UM0":function(ct,_e,K){var oe,G;(function(){var D;(function(){"use strict";var N=[function(e,R,f){var v=f(1).Beautifier,u=f(5).Options;function s(i,A){var o=new v(i,A);return o.beautify()}e.exports=s,e.exports.defaultOptions=function(){return new u}},function(e,R,f){var v=f(2).Output,u=f(3).Token,s=f(4),i=f(5).Options,A=f(7).Tokenizer,o=f(7).line_starters,a=f(7).positionable_operators,r=f(7).TOKEN;function t(U,$){return $.indexOf(U)!==-1}function _(U){return U.replace(/^\s+/g,"")}function y(U){for(var $={},ee=0;ee<U.length;ee++)$[U[ee].replace(/-/g,"_")]=U[ee];return $}function b(U,$){return U&&U.type===r.RESERVED&&U.text===$}function x(U,$){return U&&U.type===r.RESERVED&&t(U.text,$)}var E=["case","return","do","if","throw","else","await","break","continue","async"],d=["before-newline","after-newline","preserve-newline"],n=y(d),l=[n.before_newline,n.preserve_newline],h={BlockStatement:"BlockStatement",Statement:"Statement",ObjectLiteral:"ObjectLiteral",ArrayLiteral:"ArrayLiteral",ForInitializer:"ForInitializer",Conditional:"Conditional",Expression:"Expression"};function w(U,$){if($.multiline_frame||$.mode===h.ForInitializer||$.mode===h.Conditional)return;U.remove_indent($.start_line_index)}function g(U){U=U.replace(s.allLineBreaks,`
|
|
`);for(var $=[],ee=U.indexOf(`
|
|
`);ee!==-1;)$.push(U.substring(0,ee)),U=U.substring(ee+1),ee=U.indexOf(`
|
|
`);return U.length&&$.push(U),$}function c(U){return U===h.ArrayLiteral}function L(U){return t(U,[h.Expression,h.ForInitializer,h.Conditional])}function F(U,$){for(var ee=0;ee<U.length;ee++){var pe=U[ee].trim();if(pe.charAt(0)!==$)return!1}return!0}function B(U,$){for(var ee=0,pe=U.length,fe;ee<pe;ee++)if(fe=U[ee],fe&&fe.indexOf($)!==0)return!1;return!0}function P(U,$){$=$||{},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 i($)}P.prototype.create_flags=function(U,$){var ee=0;U&&(ee=U.indentation_level,!this._output.just_added_newline()&&U.line_indent_level>ee&&(ee=U.line_indent_level));var pe={mode:$,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:ee,alignment:0,line_indent_level:U?U.line_indent_level:ee,start_line_index:this._output.get_line_number(),ternary_depth:0};return pe},P.prototype._reset=function(U){var $=U.match(/^[\t ]*/)[0];this._last_last_text="",this._output=new v(this._options,$),this._output.raw=this._options.test_output_raw,this._flag_store=[],this.set_mode(h.BlockStatement);var ee=new A(U,this._options);return this._tokens=ee.tokenize(),U},P.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var U,$=this._reset(this._source_text),ee=this._options.eol;this._options.eol==="auto"&&(ee=`
|
|
`,$&&s.lineBreak.test($||"")&&(ee=$.match(s.lineBreak)[0]));for(var pe=this._tokens.next();pe;)this.handle_token(pe),this._last_last_text=this._flags.last_token.text,this._flags.last_token=pe,pe=this._tokens.next();return U=this._output.get_code(ee),U},P.prototype.handle_token=function(U,$){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,$):U.type===r.COMMENT?this.handle_comment(U,$):U.type===r.DOT?this.handle_dot(U):U.type===r.EOF?this.handle_eof(U):U.type===r.UNKNOWN?this.handle_unknown(U,$):this.handle_unknown(U,$)},P.prototype.handle_whitespace_and_comments=function(U,$){var ee=U.newlines,pe=this._options.keep_array_indentation&&c(this._flags.mode);if(U.comments_before)for(var fe=U.comments_before.next();fe;)this.handle_whitespace_and_comments(fe,$),this.handle_token(fe,$),fe=U.comments_before.next();if(pe)for(var Le=0;Le<ee;Le+=1)this.print_newline(Le>0,$);else if(this._options.max_preserve_newlines&&ee>this._options.max_preserve_newlines&&(ee=this._options.max_preserve_newlines),this._options.preserve_newlines&&ee>1){this.print_newline(!1,$);for(var Ie=1;Ie<ee;Ie+=1)this.print_newline(!0,$)}};var W=["async","break","continue","return","throw","yield"];P.prototype.allow_wrap_or_preserved_newline=function(U,$){if($=$===void 0?!1:$,this._output.just_added_newline())return;var ee=this._options.preserve_newlines&&U.newlines||$,pe=t(this._flags.last_token.text,a)||t(U.text,a);if(pe){var fe=t(this._flags.last_token.text,a)&&t(this._options.operator_position,l)||t(U.text,a);ee=ee&&fe}if(ee)this.print_newline(!1,!0);else if(this._options.wrap_line_length){if(x(this._flags.last_token,W))return;this._output.set_wrap_point()}},P.prototype.print_newline=function(U,$){if(!$&&(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 ee=this._tokens.peek();this._flags.mode===h.Statement&&!(this._flags.if_block&&b(ee,"else"))&&!this._flags.do_block;)this.restore_mode();this._output.add_new_line(U)&&(this._flags.multiline_frame=!0)},P.prototype.print_token_line_indentation=function(U){this._output.just_added_newline()&&(this._options.keep_array_indentation&&U.newlines&&(U.text==="["||c(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))},P.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 $=this._output.previous_line.pop();this._output.previous_line.is_empty()&&(this._output.previous_line.push($),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)},P.prototype.indent=function(){this._flags.indentation_level+=1,this._output.set_indent(this._flags.indentation_level,this._flags.alignment)},P.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))},P.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)},P.prototype.restore_mode=function(){this._flag_store.length>0&&(this._previous_flags=this._flags,this._flags=this._flag_store.pop(),this._previous_flags.mode===h.Statement&&w(this._output,this._previous_flags),this._output.set_indent(this._flags.indentation_level,this._flags.alignment))},P.prototype.start_of_object_property=function(){return this._flags.parent.mode===h.ObjectLiteral&&this._flags.mode===h.Statement&&(this._flags.last_token.text===":"&&this._flags.ternary_depth===0||x(this._flags.last_token,["get","set"]))},P.prototype.start_of_statement=function(U){var $=!1;return $=$||x(this._flags.last_token,["var","let","const"])&&U.type===r.WORD,$=$||b(this._flags.last_token,"do"),$=$||!(this._flags.parent.mode===h.ObjectLiteral&&this._flags.mode===h.Statement)&&x(this._flags.last_token,W)&&!U.newlines,$=$||b(this._flags.last_token,"else")&&!(b(U,"if")&&!U.comments_before),$=$||this._flags.last_token.type===r.END_EXPR&&(this._previous_flags.mode===h.ForInitializer||this._previous_flags.mode===h.Conditional),$=$||this._flags.last_token.type===r.WORD&&this._flags.mode===h.BlockStatement&&!this._flags.in_case&&!(U.text==="--"||U.text==="++")&&this._last_last_text!=="function"&&U.type!==r.WORD&&U.type!==r.RESERVED,$=$||this._flags.mode===h.ObjectLiteral&&(this._flags.last_token.text===":"&&this._flags.ternary_depth===0||x(this._flags.last_token,["get","set"])),$?(this.set_mode(h.Statement),this.indent(),this.handle_whitespace_and_comments(U,!0),this.start_of_object_property()||this.allow_wrap_or_preserved_newline(U,x(U,["do","for","if","while"])),!0):!1},P.prototype.handle_start_expr=function(U){this.start_of_statement(U)||this.handle_whitespace_and_comments(U);var $=h.Expression;if(U.text==="["){if(this._flags.last_token.type===r.WORD||this._flags.last_token.text===")"){x(this._flags.last_token,o)&&(this._output.space_before_token=!0),this.print_token(U),this.set_mode($),this.indent(),this._options.space_in_paren&&(this._output.space_before_token=!0);return}$=h.ArrayLiteral,c(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,$=h.ForInitializer):t(this._flags.last_token.text,["if","while","switch"])?(this._output.space_before_token=this._options.space_before_conditional,$=h.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 ee=this._tokens.peek(-3);if(this._options.space_after_named_function&&ee){var pe=this._tokens.peek(-4);x(ee,["async","function"])||ee.text==="*"&&x(pe,["async","function"])?this._output.space_before_token=!0:this._flags.mode===h.ObjectLiteral?(ee.text==="{"||ee.text===","||ee.text==="*"&&(pe.text==="{"||pe.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===h.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($),this._options.space_in_paren&&(this._output.space_before_token=!0),this.indent()},P.prototype.handle_end_expr=function(U){for(;this._flags.mode===h.Statement;)this.restore_mode();this.handle_whitespace_and_comments(U),this._flags.multiline_frame&&this.allow_wrap_or_preserved_newline(U,U.text==="]"&&c(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(),w(this._output,this._previous_flags),this._flags.do_while&&this._previous_flags.mode===h.Conditional&&(this._previous_flags.mode=h.Expression,this._flags.do_block=!1,this._flags.do_while=!1)},P.prototype.handle_start_block=function(U){this.handle_whitespace_and_comments(U);var $=this._tokens.peek(),ee=this._tokens.peek(1);this._flags.last_word==="switch"&&this._flags.last_token.type===r.END_EXPR?(this.set_mode(h.BlockStatement),this._flags.in_case_statement=!0):this._flags.case_body?this.set_mode(h.BlockStatement):ee&&(t(ee.text,[":",","])&&t($.type,[r.STRING,r.WORD,r.RESERVED])||t($.text,["get","set","..."])&&t(ee.type,[r.WORD,r.RESERVED]))?t(this._last_last_text,["class","interface"])&&!t(ee.text,[":",","])?this.set_mode(h.BlockStatement):this.set_mode(h.ObjectLiteral):this._flags.last_token.type===r.OPERATOR&&this._flags.last_token.text==="=>"?this.set_mode(h.BlockStatement):t(this._flags.last_token.type,[r.EQUALS,r.START_EXPR,r.COMMA,r.OPERATOR])||x(this._flags.last_token,["return","throw","import","default"])?this.set_mode(h.ObjectLiteral):this.set_mode(h.BlockStatement),this._flags.last_token&&(x(this._flags.last_token.previous,["class","extends"])&&(this._flags.class_start_block=!0));var pe=!$.comments_before&&$.text==="}",fe=pe&&this._flags.last_word==="function"&&this._flags.last_token.type===r.END_EXPR;if(this._options.brace_preserve_inline){var Le=0,Ie=null;this._flags.inline_frame=!0;do if(Le+=1,Ie=this._tokens.peek(Le-1),Ie.newlines){this._flags.inline_frame=!1;break}while(Ie.type!==r.EOF&&!(Ie.type===r.END_BLOCK&&Ie.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&&(fe||this._flags.last_token.type===r.EQUALS||x(this._flags.last_token,E)&&this._flags.last_token.text!=="else")?this._output.space_before_token=!0:this.print_newline(!1,!0):(c(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(),!pe&&!(this._options.brace_preserve_inline&&this._flags.inline_frame)&&this.print_newline()},P.prototype.handle_end_block=function(U){for(this.handle_whitespace_and_comments(U);this._flags.mode===h.Statement;)this.restore_mode();var $=this._flags.last_token.type===r.START_BLOCK;this._flags.inline_frame&&!$?this._output.space_before_token=!0:this._options.brace_style==="expand"?$||this.print_newline():$||(c(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)},P.prototype.handle_word=function(U){if(U.type===r.RESERVED){if(t(U.text,["set","get"])&&this._flags.mode!==h.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===h.ObjectLiteral){var $=this._tokens.peek();$.text===":"&&(U.type=r.WORD)}}if(this.start_of_statement(U)?x(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||!x(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(b(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&&b(U,"else"))this._flags.else_block=!0;else{for(;this._flags.mode===h.Statement;)this.restore_mode();this._flags.if_block=!1,this._flags.else_block=!1}if(this._flags.in_case_statement&&x(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)),b(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?x(this._flags.last_token,["get","set","new","export"])||x(this._flags.last_token,W)?this._output.space_before_token=!0:b(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)||c(this._flags.mode))||this.print_newline(),this.print_token(U),this._flags.last_word=U.text;return}var ee="NONE";if(this._flags.last_token.type===r.END_BLOCK?this._previous_flags.inline_frame?ee="SPACE":x(U,["else","catch","finally","from"])?this._options.brace_style==="expand"||this._options.brace_style==="end-expand"||this._options.brace_style==="none"&&U.newlines?ee="NEWLINE":(ee="SPACE",this._output.space_before_token=!0):ee="NEWLINE":this._flags.last_token.type===r.SEMICOLON&&this._flags.mode===h.BlockStatement?ee="NEWLINE":this._flags.last_token.type===r.SEMICOLON&&L(this._flags.mode)?ee="SPACE":this._flags.last_token.type===r.STRING?ee="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===h.ObjectLiteral&&t(this._last_last_text,["{",","]))?ee="SPACE":this._flags.last_token.type===r.START_BLOCK?this._flags.inline_frame?ee="SPACE":ee="NEWLINE":this._flags.last_token.type===r.END_EXPR&&(this._output.space_before_token=!0,ee="NEWLINE"),x(U,o)&&this._flags.last_token.text!==")"&&(this._flags.inline_frame||this._flags.last_token.text==="else"||this._flags.last_token.text==="export"?ee="SPACE":ee="NEWLINE"),x(U,["else","catch","finally"]))if((!(this._flags.last_token.type===r.END_BLOCK&&this._previous_flags.mode===h.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 pe=this._output.current_line;pe.last()!=="}"&&this.print_newline(),this._output.space_before_token=!0}else ee==="NEWLINE"?x(this._flags.last_token,E)?this._output.space_before_token=!0:this._flags.last_token.text==="declare"&&x(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||!x(U,["var","let","const"]))&&this._flags.last_token.text!==":"&&(b(U,"if")&&b(U.previous,"else")?this._output.space_before_token=!0:this.print_newline()):x(U,o)&&this._flags.last_token.text!==")"&&this.print_newline():this._flags.multiline_frame&&c(this._flags.mode)&&this._flags.last_token.text===","&&this._last_last_text==="}"?this.print_newline():ee==="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&&b(U,"from")&&(this._flags.import_block=!1))},P.prototype.handle_semicolon=function(U){this.start_of_statement(U)?this._output.space_before_token=!1:this.handle_whitespace_and_comments(U);for(var $=this._tokens.peek();this._flags.mode===h.Statement&&!(this._flags.if_block&&b($,"else"))&&!this._flags.do_block;)this.restore_mode();this._flags.import_block&&(this._flags.import_block=!1),this.print_token(U)},P.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)},P.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},P.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===h.ObjectLiteral||this._flags.mode===h.Statement&&this._flags.parent.mode===h.ObjectLiteral?(this._flags.mode===h.Statement&&this.restore_mode(),this._flags.inline_frame||this.print_newline()):this._options.comma_first&&this.allow_wrap_or_preserved_newline(U)},P.prototype.handle_operator=function(U){var $=U.text==="*"&&(x(this._flags.last_token,["function","yield"])||t(this._flags.last_token.type,[r.START_BLOCK,r.COMMA,r.END_BLOCK,r.SEMICOLON])),ee=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 pe=!$;this.handle_whitespace_and_comments(U,pe)}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 fe=!0,Le=!0,Ie=!1;if(U.text===":"?this._flags.ternary_depth===0?fe=!1:(this._flags.ternary_depth-=1,Ie=!0):U.text==="?"&&(this._flags.ternary_depth+=1),!ee&&!$&&this._options.preserve_newlines&&t(U.text,a)){var xe=U.text===":",Ue=xe&&Ie,Fe=xe&&!Ie;switch(this._options.operator_position){case n.before_newline:this._output.space_before_token=!Fe,this.print_token(U),(!xe||Ue)&&this.allow_wrap_or_preserved_newline(U),this._output.space_before_token=!0;return;case n.after_newline:this._output.space_before_token=!0,!xe||Ue?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:Fe||this.allow_wrap_or_preserved_newline(U),fe=!(this._output.just_added_newline()||Fe),this._output.space_before_token=fe,this.print_token(U),this._output.space_before_token=!0;return}}if($){this.allow_wrap_or_preserved_newline(U),fe=!1;var we=this._tokens.peek();Le=we&&t(we.type,[r.WORD,r.RESERVED])}else if(U.text==="...")this.allow_wrap_or_preserved_newline(U),fe=this._flags.last_token.type===r.START_BLOCK,Le=!1;else if(t(U.text,["--","++","!","~"])||ee){if((this._flags.last_token.type===r.COMMA||this._flags.last_token.type===r.START_EXPR)&&this.allow_wrap_or_preserved_newline(U),fe=!1,Le=!1,U.newlines&&(U.text==="--"||U.text==="++"||U.text==="~")){var ve=x(this._flags.last_token,E)&&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)&&(fe=!0),this._flags.last_token.type===r.RESERVED?fe=!0:this._flags.last_token.type===r.END_EXPR?fe=!(this._flags.last_token.text==="]"&&(U.text==="--"||U.text==="++")):this._flags.last_token.type===r.OPERATOR&&(fe=t(U.text,["--","-","++","+"])&&t(this._flags.last_token.text,["--","-","++","+"]),t(U.text,["+","-"])&&t(this._flags.last_token.text,["--","++"])&&(Le=!0)),(this._flags.mode===h.BlockStatement&&!this._flags.inline_frame||this._flags.mode===h.Statement)&&(this._flags.last_token.text==="{"||this._flags.last_token.text===";")&&this.print_newline()}this._output.space_before_token=this._output.space_before_token||fe,this.print_token(U),this._output.space_before_token=Le},P.prototype.handle_block_comment=function(U,$){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,$),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,$)},P.prototype.print_block_commment=function(U,$){var ee=g(U.text),pe,fe=!1,Le=!1,Ie=U.whitespace_before,xe=Ie.length;if(this.print_newline(!1,$),this.print_token_line_indentation(U),this._output.add_token(ee[0]),this.print_newline(!1,$),ee.length>1){for(ee=ee.slice(1),fe=F(ee,"*"),Le=B(ee,Ie),fe&&(this._flags.alignment=1),pe=0;pe<ee.length;pe++)fe?(this.print_token_line_indentation(U),this._output.add_token(_(ee[pe]))):Le&&ee[pe]?(this.print_token_line_indentation(U),this._output.add_token(ee[pe].substring(xe))):(this._output.current_line.set_indent(-1),this._output.add_token(ee[pe])),this.print_newline(!1,$);this._flags.alignment=0}},P.prototype.handle_comment=function(U,$){U.newlines?this.print_newline(!1,$):this._output.trim(!0),this._output.space_before_token=!0,this.print_token(U),this.print_newline(!1,$)},P.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),x(this._flags.last_token,E)?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)},P.prototype.handle_unknown=function(U,$){this.print_token(U),U.text[U.text.length-1]===`
|
|
`&&this.print_newline(!1,$)},P.prototype.handle_eof=function(U){for(;this._flags.mode===h.Statement;)this.restore_mode();this.handle_whitespace_and_comments(U)},e.exports.Beautifier=P},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 f(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}f.prototype.get_indent_size=function(u,s){var i=this.__base_string_length;return s=s||0,u<0&&(i=0),i+=u*this.__indent_size,i+=s,i},f.prototype.get_indent_string=function(u,s){var i=this.__base_string;return s=s||0,u<0&&(u=0,i=""),s+=u*this.__indent_size,this.__ensure_cache(s),i+=this.__cache[s],i},f.prototype.__ensure_cache=function(u){for(;u>=this.__cache.length;)this.__add_column()},f.prototype.__add_column=function(){var u=this.__cache.length,s=0,i="";this.__indent_size&&u>=this.__indent_size&&(s=Math.floor(u/this.__indent_size),u-=s*this.__indent_size,i=new Array(s+1).join(this.__indent_string)),u&&(i+=new Array(u+1).join(" ")),this.__cache.push(i)};function v(u,s){this.__indent_cache=new f(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 i=this.__lines.join(`
|
|
`);return u!==`
|
|
`&&(i=i.replace(/[\n]/g,u)),i},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 i=this.__lines.length-2;i>=0;){var A=this.__lines[i];if(A.is_empty())break;if(A.item(0).indexOf(u)!==0&&A.item(-1)!==s){this.__lines.splice(i+1,0,new R(this)),this.previous_line=this.__lines[this.__lines.length-2];break}i--}},e.exports.Output=v},function(e){function R(f,v,u,s){this.type=f,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 f="\\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",i="(?:\\\\u[0-9a-fA-F]{4}|["+f+u+"])",A="(?:\\\\u[0-9a-fA-F]{4}|["+v+u+s+"])*";R.identifier=new RegExp(i+A,"g"),R.identifierStart=new RegExp(i),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,f){var v=f(6).Options,u=["before-newline","after-newline","preserve-newline"];function s(i){v.call(this,i,"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 a=0;a<o.length;a++)o[a]==="preserve-inline"?this.brace_preserve_inline=!0:this.brace_style=o[a];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=f(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 i=this.raw_options[u],A=s||[];return typeof i=="object"?i!==null&&typeof i.concat=="function"&&(A=i.concat()):typeof i=="string"&&(A=i.split(/[^a-zA-Z0-9_\/\-]+/)),A},R.prototype._get_boolean=function(u,s){var i=this.raw_options[u],A=i===void 0?!!s:!!i;return A},R.prototype._get_characters=function(u,s){var i=this.raw_options[u],A=s||"";return typeof i=="string"&&(A=i.replace(/\\r/,"\r").replace(/\\n/,`
|
|
`).replace(/\\t/," ")),A},R.prototype._get_number=function(u,s){var i=this.raw_options[u];s=parseInt(s,10),isNaN(s)&&(s=0);var A=parseInt(i,10);return isNaN(A)&&(A=s),A},R.prototype._get_selection=function(u,s,i){var A=this._get_selection_list(u,s,i);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,i){if(!s||s.length===0)throw new Error("Selection list cannot be empty.");if(i=i||[s[0]],!this._is_valid_selection(i,s))throw new Error("Invalid Default Value!");var A=this._get_array(u,i);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(i){return s.indexOf(i)===-1})};function f(u,s){var i={};u=v(u);var A;for(A in u)A!==s&&(i[A]=u[A]);if(s&&u[s])for(A in u[s])i[A]=u[s][A];return i}function v(u){var s={},i;for(i in u){var A=i.replace(/-/g,"_");s[A]=u[i]}return s}e.exports.Options=R,e.exports.normalizeOpts=v,e.exports.mergeOpts=f},function(e,R,f){var v=f(8).InputScanner,u=f(9).Tokenizer,s=f(9).TOKEN,i=f(13).Directives,A=f(4),o=f(12).Pattern,a=f(14).TemplatablePattern;function r(F,B){return B.indexOf(F)!==-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},_=new i(/\/\*/,/\*\//),y=/0[xX][0123456789abcdefABCDEF_]*n?|0[oO][01234567_]*n?|0[bB][01_]*n?|\d[\d_]*n|(?:\.\d[\d_]*|\d[\d_]*\.?[\d_]*)(?:[eE][+-]?[\d_]+)?/,b=/[0-9]/,x=/[^\d\.]/,E=">>> === !== &&= ??= ||= << && >= ** != == <= >> || ?? |> < / - + > : & % ? ^ | *".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(","),h=l.concat(["do","in","of","else","get","set","new","catch","finally","typeof","yield","async","await","from","as","class","extends"]),w=new RegExp("^(?:"+h.join("|")+")$"),g,c=function(F,B){u.call(this,F,B),this._patterns.whitespace=this._patterns.whitespace.matching(/\u00A0\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff/.source,/\u2028\u2029/.source);var P=new o(this._input),W=new a(this._input).read_options(this._options);this.__patterns={template:W,identifier:W.starting_with(A.identifier).matching(A.identifierMatch),number:P.matching(y),punct:P.matching(n),comment:P.starting_with(/\/\//).until(/[\n\r\u2028\u2029]/),block_comment:P.starting_with(/\/\*/).until_after(/\*\//),html_comment_start:P.matching(/<!--/),html_comment_end:P.matching(/-->/),include:P.starting_with(/#include/).until_after(A.lineBreak),shebang:P.starting_with(/#!/).until_after(A.lineBreak),xml:P.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(/[`}\\]/)}};c.prototype=new u,c.prototype._is_comment=function(F){return F.type===t.COMMENT||F.type===t.BLOCK_COMMENT||F.type===t.UNKNOWN},c.prototype._is_opening=function(F){return F.type===t.START_BLOCK||F.type===t.START_EXPR},c.prototype._is_closing=function(F,B){return(F.type===t.END_BLOCK||F.type===t.END_EXPR)&&B&&(F.text==="]"&&B.text==="["||F.text===")"&&B.text==="("||F.text==="}"&&B.text==="{")},c.prototype._reset=function(){g=!1},c.prototype._get_next_token=function(F,B){var P=null;this._readWhitespace();var W=this._input.peek();return W===null?this._create_token(t.EOF,""):(P=P||this._read_non_javascript(W),P=P||this._read_string(W),P=P||this._read_word(F),P=P||this._read_singles(W),P=P||this._read_comment(W),P=P||this._read_regexp(W,F),P=P||this._read_xml(W,F),P=P||this._read_punctuation(),P=P||this._create_token(t.UNKNOWN,this._input.next()),P)},c.prototype._read_word=function(F){var B;if(B=this.__patterns.identifier.read(),B!=="")return B=B.replace(A.allLineBreaks,`
|
|
`),!(F.type===t.DOT||F.type===t.RESERVED&&(F.text==="set"||F.text==="get"))&&w.test(B)?(B==="in"||B==="of")&&(F.type===t.WORD||F.type===t.STRING)?this._create_token(t.OPERATOR,B):this._create_token(t.RESERVED,B):this._create_token(t.WORD,B);if(B=this.__patterns.number.read(),B!=="")return this._create_token(t.WORD,B)},c.prototype._read_singles=function(F){var B=null;return F==="("||F==="["?B=this._create_token(t.START_EXPR,F):F===")"||F==="]"?B=this._create_token(t.END_EXPR,F):F==="{"?B=this._create_token(t.START_BLOCK,F):F==="}"?B=this._create_token(t.END_BLOCK,F):F===";"?B=this._create_token(t.SEMICOLON,F):F==="."&&x.test(this._input.peek(1))?B=this._create_token(t.DOT,F):F===","&&(B=this._create_token(t.COMMA,F)),B&&this._input.next(),B},c.prototype._read_punctuation=function(){var F=this.__patterns.punct.read();if(F!=="")return F==="="?this._create_token(t.EQUALS,F):F==="?."?this._create_token(t.DOT,F):this._create_token(t.OPERATOR,F)},c.prototype._read_non_javascript=function(F){var B="";if(F==="#"){if(this._is_first_token()&&(B=this.__patterns.shebang.read(),B))return this._create_token(t.UNKNOWN,B.trim()+`
|
|
`);if(B=this.__patterns.include.read(),B)return this._create_token(t.UNKNOWN,B.trim()+`
|
|
`);F=this._input.next();var P="#";if(this._input.hasNext()&&this._input.testChar(b)){do F=this._input.next(),P+=F;while(this._input.hasNext()&&F!=="#"&&F!=="=");return F==="#"||(this._input.peek()==="["&&this._input.peek(1)==="]"?(P+="[]",this._input.next(),this._input.next()):this._input.peek()==="{"&&this._input.peek(1)==="}"&&(P+="{}",this._input.next(),this._input.next())),this._create_token(t.WORD,P)}this._input.back()}else if(F==="<"&&this._is_first_token()){if(B=this.__patterns.html_comment_start.read(),B){for(;this._input.hasNext()&&!this._input.testChar(A.newline);)B+=this._input.next();return g=!0,this._create_token(t.COMMENT,B)}}else if(g&&F==="-"&&(B=this.__patterns.html_comment_end.read(),B))return g=!1,this._create_token(t.COMMENT,B);return null},c.prototype._read_comment=function(F){var B=null;if(F==="/"){var P="";if(this._input.peek(1)==="*"){P=this.__patterns.block_comment.read();var W=_.get_directives(P);W&&W.ignore==="start"&&(P+=_.readIgnored(this._input)),P=P.replace(A.allLineBreaks,`
|
|
`),B=this._create_token(t.BLOCK_COMMENT,P),B.directives=W}else this._input.peek(1)==="/"&&(P=this.__patterns.comment.read(),B=this._create_token(t.COMMENT,P))}return B},c.prototype._read_string=function(F){if(F==="`"||F==="'"||F==='"'){var B=this._input.next();return this.has_char_escapes=!1,F==="`"?B+=this._read_string_recursive("`",!0,"${"):B+=this._read_string_recursive(F),this.has_char_escapes&&this._options.unescape_strings&&(B=L(B)),this._input.peek()===F&&(B+=this._input.next()),B=B.replace(A.allLineBreaks,`
|
|
`),this._create_token(t.STRING,B)}return null},c.prototype._allow_regexp_or_xml=function(F){return F.type===t.RESERVED&&r(F.text,["return","case","throw","else","do","typeof","yield"])||F.type===t.END_EXPR&&F.text===")"&&F.opened.previous.type===t.RESERVED&&r(F.opened.previous.text,["if","while","for"])||r(F.type,[t.COMMENT,t.START_EXPR,t.START_BLOCK,t.START,t.END_BLOCK,t.OPERATOR,t.EQUALS,t.EOF,t.SEMICOLON,t.COMMA])},c.prototype._read_regexp=function(F,B){if(F==="/"&&this._allow_regexp_or_xml(B)){for(var P=this._input.next(),W=!1,U=!1;this._input.hasNext()&&(W||U||this._input.peek()!==F)&&!this._input.testChar(A.newline);)P+=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()===F&&(P+=this._input.next(),P+=this._input.read(A.identifier)),this._create_token(t.STRING,P)}return null},c.prototype._read_xml=function(F,B){if(this._options.e4x&&F==="<"&&this._allow_regexp_or_xml(B)){var P="",W=this.__patterns.xml.read_match();if(W){for(var U=W[2].replace(/^{\s+/,"{").replace(/\s+}$/,"}"),$=U.indexOf("{")===0,ee=0;W;){var pe=!!W[1],fe=W[2],Le=!!W[W.length-1]||fe.slice(0,8)==="![CDATA[";if(!Le&&(fe===U||$&&fe.replace(/^{\s+/,"{").replace(/\s+}$/,"}"))&&(pe?--ee:++ee),P+=W[0],ee<=0)break;W=this.__patterns.xml.read_match()}return W||(P+=this._input.match(/[\s\S]*/g)[0]),P=P.replace(A.allLineBreaks,`
|
|
`),this._create_token(t.STRING,P)}}return null};function L(F){for(var B="",P=0,W=new v(F),U=null;W.hasNext();)if(U=W.match(/([\s]|[^\\]|\\\\)+/g),U&&(B+=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{B+="\\",W.hasNext()&&(B+=W.next());continue}if(!U)return F;if(P=parseInt(U[1],16),P>126&&P<=255&&U[0].indexOf("x")===0)return F;if(P>=0&&P<32){B+="\\"+U[0];continue}else P===34||P===39||P===92?B+="\\"+String.fromCharCode(P):B+=String.fromCharCode(P)}return B}c.prototype._read_string_recursive=function(F,B,P){var W,U;F==="'"?U=this.__patterns.single_quote:F==='"'?U=this.__patterns.double_quote:F==="`"?U=this.__patterns.template_text:F==="}"&&(U=this.__patterns.template_expression);for(var $=U.read(),ee="";this._input.hasNext();){if(ee=this._input.next(),ee===F||!B&&A.newline.test(ee)){this._input.back();break}else ee==="\\"&&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(),ee+=this._input.next()):P&&(P==="${"&&ee==="$"&&this._input.peek()==="{"&&(ee+=this._input.next()),P===ee&&(F==="`"?ee+=this._read_string_recursive("}",B,"`"):ee+=this._read_string_recursive("`",B,"${"),this._input.hasNext()&&(ee+=this._input.next())));ee+=U.read(),$+=ee}return $},e.exports.Tokenizer=c,e.exports.TOKEN=t,e.exports.positionable_operators=E.slice(),e.exports.line_starters=l.slice()},function(e){var R=RegExp.prototype.hasOwnProperty("sticky");function f(v){this.__input=v||"",this.__input_length=this.__input.length,this.__position=0}f.prototype.restart=function(){this.__position=0},f.prototype.back=function(){this.__position>0&&(this.__position-=1)},f.prototype.hasNext=function(){return this.__position<this.__input_length},f.prototype.next=function(){var v=null;return this.hasNext()&&(v=this.__input.charAt(this.__position),this.__position+=1),v},f.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},f.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},f.prototype.test=function(v,u){return u=u||0,u+=this.__position,u>=0&&u<this.__input_length?!!this.__match(v,u):!1},f.prototype.testChar=function(v,u){var s=this.peek(u);return v.lastIndex=0,s!==null&&v.test(s)},f.prototype.match=function(v){var u=this.__match(v,this.__position);return u?this.__position+=u[0].length:u=null,u},f.prototype.read=function(v,u,s){var i="",A;return v&&(A=this.match(v),A&&(i+=A[0])),u&&(A||!v)&&(i+=this.readUntil(u,s)),i},f.prototype.readUntil=function(v,u){var s="",i=this.__position;v.lastIndex=this.__position;var A=v.exec(this.__input);return A?(i=A.index,u&&(i+=A[0].length)):i=this.__input_length,s=this.__input.substring(this.__position,i),this.__position=i,s},f.prototype.readUntilAfter=function(v){return this.readUntil(v,!0)},f.prototype.get_regexp=function(v,u){var s=null,i="g";return u&&R&&(i="y"),typeof v=="string"&&v!==""?s=new RegExp(v,i):v&&(s=new RegExp(v.source,i)),s},f.prototype.get_literal_regexp=function(v){return RegExp(v.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},f.prototype.peekUntilAfter=function(v){var u=this.__position,s=this.readUntilAfter(v);return this.__position=u,s},f.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=f},function(e,R,f){var v=f(8).InputScanner,u=f(3).Token,s=f(10).TokenStream,i=f(11).WhitespacePattern,A={START:"TK_START",RAW:"TK_RAW",EOF:"TK_EOF"},o=function(a,r){this._input=new v(a),this._options=r||{},this.__tokens=null,this._patterns={},this._patterns.whitespace=new i(this._input)};o.prototype.tokenize=function(){this._input.restart(),this.__tokens=new s,this._reset();for(var a,r=new u(A.START,""),t=null,_=[],y=new s;r.type!==A.EOF;){for(a=this._get_next_token(r,t);this._is_comment(a);)y.add(a),a=this._get_next_token(r,t);y.isEmpty()||(a.comments_before=y,y=new s),a.parent=t,this._is_opening(a)?(_.push(t),t=a):t&&this._is_closing(a,t)&&(a.opened=t,t.closed=a,t=_.pop(),a.parent=t),a.previous=r,r.next=a,this.__tokens.add(a),r=a}return this.__tokens},o.prototype._is_first_token=function(){return this.__tokens.isEmpty()},o.prototype._reset=function(){},o.prototype._get_next_token=function(a,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(a){return!1},o.prototype._is_opening=function(a){return!1},o.prototype._is_closing=function(a,r){return!1},o.prototype._create_token=function(a,r){var t=new u(a,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(f){this.__tokens=[],this.__tokens_length=this.__tokens.length,this.__position=0,this.__parent_token=f}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 f=null;return this.hasNext()&&(f=this.__tokens[this.__position],this.__position+=1),f},R.prototype.peek=function(f){var v=null;return f=f||0,f+=this.__position,f>=0&&f<this.__tokens_length&&(v=this.__tokens[f]),v},R.prototype.add=function(f){this.__parent_token&&(f.parent=this.__parent_token),this.__tokens.push(f),this.__tokens_length+=1},e.exports.TokenStream=R},function(e,R,f){var v=f(12).Pattern;function u(s,i){v.call(this,s,i),i?this._line_regexp=this._input.get_regexp(i._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,i){s+="\\t ",i+="\\n\\r",this._match_pattern=this._input.get_regexp("["+s+i+"]+",!0),this._newline_regexp=this._input.get_regexp("\\r\\n|["+i+"]")},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 i=this.__split(this._newline_regexp,s);this.newline_count=i.length-1,this.whitespace_before_token=i[this.newline_count]}return s},u.prototype.matching=function(s,i){var A=this._create();return A.__set_whitespace_patterns(s,i),A._update(),A},u.prototype._create=function(){return new u(this._input,this)},u.prototype.__split=function(s,i){s.lastIndex=0;for(var A=0,o=[],a=s.exec(i);a;)o.push(i.substring(A,a.index)),A=a.index+a[0].length,a=s.exec(i);return A<i.length?o.push(i.substring(A,i.length)):o.push(""),o},e.exports.WhitespacePattern=u},function(e){function R(f,v){this._input=f,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 f=this._input.read(this._starting_pattern);return(!this._starting_pattern||f)&&(f+=this._input.read(this._match_pattern,this._until_pattern,this._until_after)),f},R.prototype.read_match=function(){return this._input.match(this._match_pattern)},R.prototype.until_after=function(f){var v=this._create();return v._until_after=!0,v._until_pattern=this._input.get_regexp(f),v._update(),v},R.prototype.until=function(f){var v=this._create();return v._until_after=!1,v._until_pattern=this._input.get_regexp(f),v._update(),v},R.prototype.starting_with=function(f){var v=this._create();return v._starting_pattern=this._input.get_regexp(f,!0),v._update(),v},R.prototype.matching=function(f){var v=this._create();return v._match_pattern=this._input.get_regexp(f,!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(f,v){f=typeof f=="string"?f:f.source,v=typeof v=="string"?v:v.source,this.__directives_block_pattern=new RegExp(f+/ beautify( \w+[:]\w+)+ /.source+v,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(f+/\sbeautify\signore:end\s/.source+v,"g")}R.prototype.get_directives=function(f){if(!f.match(this.__directives_block_pattern))return null;var v={};this.__directive_pattern.lastIndex=0;for(var u=this.__directive_pattern.exec(f);u;)v[u[1]]=u[2],u=this.__directive_pattern.exec(f);return v},R.prototype.readIgnored=function(f){return f.readUntilAfter(this.__directives_end_ignore_pattern)},e.exports.Directives=R},function(e,R,f){var v=f(12).Pattern,u={django:!1,erb:!1,handlebars:!1,php:!1,smarty:!1};function s(i,A){v.call(this,i,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(i);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(i){var A=this._create();return A._disabled[i]=!0,A._update(),A},s.prototype.read_options=function(i){var A=this._create();for(var o in u)A._disabled[o]=i.templating.indexOf(o)===-1;return A._update(),A},s.prototype.exclude=function(i){var A=this._create();return A._excluded[i]=!0,A._update(),A},s.prototype.read=function(){var i="";this._match_pattern?i=this._input.read(this._starting_pattern):i=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),i+=A,A=this._read_template();return this._until_after&&(i+=this._input.readUntilAfter(this._until_pattern)),i},s.prototype.__set_templated_pattern=function(){var i=[];this._disabled.php||i.push(this.__patterns.php._starting_pattern.source),this._disabled.handlebars||i.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.erb||i.push(this.__patterns.erb._starting_pattern.source),this._disabled.django||(i.push(this.__patterns.django._starting_pattern.source),i.push(this.__patterns.django_value._starting_pattern.source),i.push(this.__patterns.django_comment._starting_pattern.source)),this._disabled.smarty||i.push(this.__patterns.smarty._starting_pattern.source),this._until_pattern&&i.push(this._until_pattern.source),this.__template_pattern=this._input.get_regexp("(?:"+i.join("|")+")")},s.prototype._read_template=function(){var i="",A=this._input.peek();if(A==="<"){var o=this._input.peek(1);!this._disabled.php&&!this._excluded.php&&o==="?"&&(i=i||this.__patterns.php.read()),!this._disabled.erb&&!this._excluded.erb&&o==="%"&&(i=i||this.__patterns.erb.read())}else A==="{"&&(!this._disabled.handlebars&&!this._excluded.handlebars&&(i=i||this.__patterns.handlebars_comment.read(),i=i||this.__patterns.handlebars_unescaped.read(),i=i||this.__patterns.handlebars.read()),this._disabled.django||(!this._excluded.django&&!this._excluded.handlebars&&(i=i||this.__patterns.django_value.read()),this._excluded.django||(i=i||this.__patterns.django_comment.read(),i=i||this.__patterns.django.read())),this._disabled.smarty||this._disabled.django&&this._disabled.handlebars&&(i=i||this.__patterns.smarty_comment.read(),i=i||this.__patterns.smarty_literal.read(),i=i||this.__patterns.smarty.read()));return i},e.exports.TemplatablePattern=s}],O={};function X(e){var R=O[e];if(R!==void 0)return R.exports;var f=O[e]={exports:{}};return N[e](f,f.exports,X),f.exports}var M=X(0);D=M})();var j=D;!(oe=[],G=function(){return{js_beautify:j}}.apply(_e,oe),G!==void 0&&(ct.exports=G))})()},"6eGT":function(ct,_e,K){"use strict";function oe(G){return null}_e.a=oe},"746U":function(ct,_e,K){"use strict";K.d(_e,"f",function(){return oe}),K.d(_e,"l",function(){return G}),K.d(_e,"k",function(){return D}),K.d(_e,"j",function(){return j}),K.d(_e,"g",function(){return N}),K.d(_e,"m",function(){return O}),K.d(_e,"h",function(){return X}),K.d(_e,"n",function(){return M}),K.d(_e,"c",function(){return e}),K.d(_e,"a",function(){return R}),K.d(_e,"i",function(){return f}),K.d(_e,"o",function(){return v}),K.d(_e,"e",function(){return i}),K.d(_e,"d",function(){return A}),K.d(_e,"p",function(){return o}),K.d(_e,"b",function(){return a});function oe(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 j(r){return typeof r=="number"&&!isNaN(r)}function N(r){return r===!0||r===!1}function O(r){return typeof r=="undefined"}function X(r){return!M(r)}function M(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(M(r))throw new Error("Assertion Failed: argument is undefined or null");return r}function f(r){return typeof r=="function"}function v(r,t){const _=Math.min(r.length,t.length);for(let y=0;y<_;y++)u(r[y],t[y])}function u(r,t){if(G(t)){if(typeof r!==t)throw new Error(`argument does not match constraint: typeof ${t}`)}else if(f(t)){try{if(r instanceof t)return}catch(_){}if(!M(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=[],_=Object.getPrototypeOf(r);for(;Object.prototype!==_;)t=t.concat(Object.getOwnPropertyNames(_)),_=Object.getPrototypeOf(_);return t}function i(r){const t=[];for(const _ of s(r))typeof r[_]=="function"&&t.push(_);return t}function A(r,t){const _=b=>function(){const x=Array.prototype.slice.call(arguments,0);return t(b,x)};let y={};for(const b of r)y[b]=_(b);return y}function o(r){return r===null?void 0:r}function a(r,t="Unreachable"){throw new Error(t)}},"815F":function(ct,_e,K){"use strict";K.d(_e,"e",function(){return X}),K.d(_e,"c",function(){return e}),K.d(_e,"d",function(){return R}),K.d(_e,"a",function(){return v}),K.d(_e,"f",function(){return u}),K.d(_e,"b",function(){return s});var oe=K("KQm4"),G=K("VTBJ"),D=K("Ff2n"),j=K("Zm9Q"),N=K("Kwbf"),O=K("OZM5");function X(i,A){return i!=null?i:A}function M(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],A=new Map;function o(a){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";(a||[]).forEach(function(t){var _=t.key,y=t.children;Object(N.a)(_!=null,"Tree node must have a certain key: [".concat(r).concat(_,"]"));var b=String(_);Object(N.a)(!A.has(b)||_===null||_===void 0,"Same 'key' exist in the Tree: ".concat(b)),A.set(b,!0),o(y,"".concat(r).concat(b," > "))})}o(i)}function e(i){function A(o){var a=Object(j.a)(o);return a.map(function(r){if(!Object(O.i)(r))return Object(N.a)(!r,"Tree/TreeNode can only accept TreeNode as children."),null;var t=r.key,_=r.props,y=_.children,b=Object(D.a)(_,["children"]),x=Object(G.a)({key:t},b),E=A(y);return E.length&&(x.children=E),x}).filter(function(r){return r})}return A(i)}function R(){var i=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),a=[];function r(t){var _=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return t.map(function(y,b){var x=Object(O.h)(_?_.pos:"0",b),E=X(y.key,x),d=Object(G.a)(Object(G.a)({},y),{},{parent:_,pos:x,children:null,data:y,isStart:[].concat(Object(oe.a)(_?_.isStart:[]),[b===0]),isEnd:[].concat(Object(oe.a)(_?_.isEnd:[]),[b===t.length-1])});return a.push(d),A===!0||o.has(E)?d.children=r(y.children||[],d):d.children=[],d})}return r(i),a}function f(i,A,o){var a;o?typeof o=="string"?a=function(_){return _[o]}:typeof o=="function"&&(a=function(_){return o(_)}):a=function(_,y){return X(_.key,y)};function r(t,_,y){var b=t?t.children:i,x=t?Object(O.h)(y.pos,_):"0";if(t){var E=a(t,x),d={node:t,index:_,pos:x,key:E,parentPos:y.node?y.pos:null,level:y.level+1};A(d)}b&&b.forEach(function(n,l){r(n,l,{node:t,pos:x,level:y?y.level+1:-1})})}r(null)}function v(i){var A=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=A.initWrapper,a=A.processEntity,r=A.onProcessFinished,t=arguments.length>2?arguments[2]:void 0,_={},y={},b={posEntities:_,keyEntities:y};return o&&(b=o(b)||b),f(i,function(x){var E=x.node,d=x.index,n=x.pos,l=x.key,h=x.parentPos,w=x.level,g={node:E,index:d,key:l,pos:n,level:w},c=X(l,n);_[n]=g,y[c]=g,g.parent=_[h],g.parent&&(g.parent.children=g.parent.children||[],g.parent.children.push(g)),a&&a(g,b)},t),r&&r(b),b}function u(i,A){var o=A.expandedKeys,a=A.selectedKeys,r=A.loadedKeys,t=A.loadingKeys,_=A.checkedKeys,y=A.halfCheckedKeys,b=A.dragOverNodeKey,x=A.dropPosition,E=A.keyEntities,d=E[i],n={eventKey:i,expanded:o.indexOf(i)!==-1,selected:a.indexOf(i)!==-1,loaded:r.indexOf(i)!==-1,loading:t.indexOf(i)!==-1,checked:_.indexOf(i)!==-1,halfChecked:y.indexOf(i)!==-1,pos:String(d?d.pos:""),dragOver:b===i&&x===0,dragOverGapTop:b===i&&x===-1,dragOverGapBottom:b===i&&x===1};return n}function s(i){var A=i.data,o=i.expanded,a=i.selected,r=i.checked,t=i.loaded,_=i.loading,y=i.halfChecked,b=i.dragOver,x=i.dragOverGapTop,E=i.dragOverGapBottom,d=i.pos,n=i.active,l=Object(G.a)(Object(G.a)({},A),{},{expanded:o,selected:a,checked:r,loaded:t,loading:_,halfChecked:y,dragOver:b,dragOverGapTop:x,dragOverGapBottom:E,pos:d,active:n});return"props"in l||Object.defineProperty(l,"props",{get:function(){return Object(N.a)(!1,"Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`."),i}}),l}},"8HAY":function(ct,_e,K){"use strict";K.d(_e,"a",function(){return N}),K.d(_e,"b",function(){return O}),K.d(_e,"d",function(){return X}),K.d(_e,"e",function(){return M}),K.d(_e,"c",function(){return e});var oe=K("MI8n"),G=K("pmY6"),D=K("3/fG"),j=function(R,f,v,u){function s(i){return i instanceof v?i:new v(function(A){A(i)})}return new(v||(v=Promise))(function(i,A){function o(t){try{r(u.next(t))}catch(_){A(_)}}function a(t){try{r(u.throw(t))}catch(_){A(_)}}function r(t){t.done?i(t.value):s(t.value).then(o,a)}r((u=u.apply(R,f||[])).next())})};class N extends G.a{constructor(R,f="",v="",u=!0,s){super();this._onDidChange=this._register(new oe.b),this.onDidChange=this._onDidChange.event,this._enabled=!0,this._id=R,this._label=f,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,f){return j(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 oe.b),this.onBeforeRun=this._onBeforeRun.event,this._onDidRun=this._register(new oe.b),this.onDidRun=this._onDidRun.event}run(R,f){return j(this,void 0,void 0,function*(){if(!R.enabled)return;this._onBeforeRun.fire({action:R});let v;try{yield this.runAction(R,f)}catch(u){v=u}this._onDidRun.fire({action:R,error:v})})}runAction(R,f){return j(this,void 0,void 0,function*(){yield R.run(f)})}}class X extends N{constructor(R){super(X.ID,R,R?"separator text":"separator");this.checked=!1,this.enabled=!1}}X.ID="vs.actions.separator";class M{constructor(R,f,v,u){this.tooltip="",this.enabled=!0,this.checked=!1,this.id=R,this.label=f,this.class=u,this._actions=v}get actions(){return this._actions}dispose(){}run(){return j(this,void 0,void 0,function*(){})}}class e extends N{constructor(){super(e.ID,D.a("submenu.empty","(empty)"),void 0,!1)}}e.ID="vs.actions.empty"},"8hTe":function(ct,_e,K){ct.exports={button:"button___1wy9m"}},"9Bee":function(ct,_e,K){"use strict";var oe=K("DYRE"),G=K("zeV3"),D=K("+L6B"),j=K("2/Rp"),N=K("k1fw"),O=K("9og8"),X=K("tJVT"),M=K("WmNS"),e=K.n(M),R=K("q1tI"),f=K.n(R),v=K("vg9a"),u=K("DlQD"),s=K.n(u),i=K("rUJ1");function A(H,m){var C=H.match(/^(\s+)(?:```)/);if(C===null)return m;var k=C[1];return m.split(`
|
|
`).map(function(Z){var Q=Z.match(/^\s+/);if(Q===null)return Z;var ye=Object(X.a)(Q,1),Qe=ye[0];return Qe.length>=k.length?Z.slice(k.length):Z}).join(`
|
|
`)}var o=[],a=["<ul>"],r=new s.a.Renderer,t=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function _(){o.length=0,a=["<ul>"]}var y={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function b(H,m,C,k){if(m>=H.length||H[m].level<=C)return m;var Z=H[m];k.push("<li><a href='#"+Z.anchor+"'>"+Z.text+"</a>"),m++;var Q=[];return m=b(H,m,Z.level,Q),Q.length>0&&(k.push("<ul>"),Q.forEach(function(ye){k.push(ye)}),k.push("</ul>")),k.push("</li>"),m=b(H,m,C,k),m}function x(){return b(o,0,0,a),a.push("</ul>"),a.join("")}var E={heading:function(m){var C=t.exec(m);if(C)return{type:"heading",raw:C[0],depth:C[1].length,text:C[2]}},fences:function(m){var C=this.rules.block.fences.exec(m);if(C){var k=C[0],Z=A(k,C[3]||""),Q=C[2]?C[2].trim():C[2];if(["latex","katex","math"].indexOf(Q)>=0){var ye=l(),Qe=Z;Z=ye,h[ye]={type:"block",expression:Qe}}return{type:"code",raw:k,lang:Q,text:Z}}}},d=/(?:\${2})([^\n`]+?)(?:\${2})/gi,n=0,l=function(){return"__special_katext_id_".concat(n++,"__")},h={};function w(){return h}function g(){n=0,h={}}function c(H){return H=H.replace(d,function(m,C){var k=l();return h[k]={type:"inline",expression:C},k}),H}var L=r.listitem;r.listitem=function(H){return L(c(H))};var F=r.paragraph;r.paragraph=function(H){return F(c(H))};var B=r.tablecell;r.tablecell=function(H,m){return B(c(H),m)},r.code=function(H,m,C){var k=(m||"").match(/\S*/)[0];return k?["latex","katex","math"].indexOf(k)>=0?"<p class='editormd-tex'>".concat(H,"</p>"):'<pre class="prettyprint linenums"><code class="language-'.concat(m,'">').concat(C?H:Object(i.escape)(H,!0),`</code></pre>
|
|
`):'<pre class="prettyprint linenums"><code>'+(C?H:Object(i.escape)(H,!0))+"</code></pre>"},r.heading=function(H,m,C){var k=this.options.headerPrefix+C.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return o.push({anchor:k,level:m,text:H}),"<h"+m+' id="'+k+'">'+H+"</h"+m+">"},s.a.setOptions({silent:!0,gfm:!0,pedantic:!1}),s.a.use({tokenizer:E,renderer:r});var P=s.a,W=K("SJMd"),U=K("ulZh"),$=K.n(U),ee=K("m3rI"),pe=K("Oy/b"),fe=K("p5ED"),Le=K("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 Ie=function(H,m){return(Ie=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(C,k){C.__proto__=k}||function(C,k){for(var Z in k)Object.prototype.hasOwnProperty.call(k,Z)&&(C[Z]=k[Z])})(H,m)};function xe(H,m){function C(){this.constructor=H}Ie(H,m),H.prototype=m===null?Object.create(m):(C.prototype=m.prototype,new C)}function Ue(H,m,C,k){return new(C||(C=Promise))(function(Z,Q){function ye(ot){try{Be(k.next(ot))}catch(Xe){Q(Xe)}}function Qe(ot){try{Be(k.throw(ot))}catch(Xe){Q(Xe)}}function Be(ot){var Xe;ot.done?Z(ot.value):(Xe=ot.value,Xe instanceof C?Xe:new C(function(mt){mt(Xe)})).then(ye,Qe)}Be((k=k.apply(H,m||[])).next())})}function Fe(H,m){var C,k,Z,Q,ye={label:0,sent:function(){if(1&Z[0])throw Z[1];return Z[1]},trys:[],ops:[]};return Q={next:Qe(0),throw:Qe(1),return:Qe(2)},typeof Symbol=="function"&&(Q[Symbol.iterator]=function(){return this}),Q;function Qe(Be){return function(ot){return function(Xe){if(C)throw new TypeError("Generator is already executing.");for(;ye;)try{if(C=1,k&&(Z=2&Xe[0]?k.return:Xe[0]?k.throw||((Z=k.return)&&Z.call(k),0):k.next)&&!(Z=Z.call(k,Xe[1])).done)return Z;switch(k=0,Z&&(Xe=[2&Xe[0],Z.value]),Xe[0]){case 0:case 1:Z=Xe;break;case 4:return ye.label++,{value:Xe[1],done:!1};case 5:ye.label++,k=Xe[1],Xe=[0];continue;case 7:Xe=ye.ops.pop(),ye.trys.pop();continue;default:if(!(Z=ye.trys,(Z=Z.length>0&&Z[Z.length-1])||Xe[0]!==6&&Xe[0]!==2)){ye=0;continue}if(Xe[0]===3&&(!Z||Xe[1]>Z[0]&&Xe[1]<Z[3])){ye.label=Xe[1];break}if(Xe[0]===6&&ye.label<Z[1]){ye.label=Z[1],Z=Xe;break}if(Z&&ye.label<Z[2]){ye.label=Z[2],ye.ops.push(Xe);break}Z[2]&&ye.ops.pop(),ye.trys.pop();continue}Xe=m.call(H,ye)}catch(mt){Xe=[6,mt],k=0}finally{C=Z=0}if(5&Xe[0])throw Xe[1];return{value:Xe[0]?Xe[1]:void 0,done:!0}}([Be,ot])}}}function we(){for(var H=0,m=0,C=arguments.length;m<C;m++)H+=arguments[m].length;var k=Array(H),Z=0;for(m=0;m<C;m++)for(var Q=arguments[m],ye=0,Qe=Q.length;ye<Qe;ye++,Z++)k[Z]=Q[ye];return k}var ve=function(){function H(){}return H.createDefs=function(){return document.createElementNS("http://www.w3.org/2000/svg","defs")},H.setAttributes=function(m,C){for(var k=0,Z=C;k<Z.length;k++){var Q=Z[k],ye=Q[0],Qe=Q[1];m.setAttribute(ye,Qe)}},H.createRect=function(m,C,k){var Z=document.createElementNS("http://www.w3.org/2000/svg","rect");return Z.setAttribute("width",m.toString()),Z.setAttribute("height",C.toString()),k&&H.setAttributes(Z,k),Z},H.createLine=function(m,C,k,Z,Q){var ye=document.createElementNS("http://www.w3.org/2000/svg","line");return ye.setAttribute("x1",m.toString()),ye.setAttribute("y1",C.toString()),ye.setAttribute("x2",k.toString()),ye.setAttribute("y2",Z.toString()),Q&&H.setAttributes(ye,Q),ye},H.createPolygon=function(m,C){var k=document.createElementNS("http://www.w3.org/2000/svg","polygon");return k.setAttribute("points",m),C&&H.setAttributes(k,C),k},H.createCircle=function(m,C){var k=document.createElementNS("http://www.w3.org/2000/svg","circle");return k.setAttribute("cx",(m/2).toString()),k.setAttribute("cy",(m/2).toString()),k.setAttribute("r",m.toString()),C&&H.setAttributes(k,C),k},H.createEllipse=function(m,C,k){var Z=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return Z.setAttribute("cx",(m/2).toString()),Z.setAttribute("cy",(C/2).toString()),Z.setAttribute("rx",(m/2).toString()),Z.setAttribute("ry",(C/2).toString()),k&&H.setAttributes(Z,k),Z},H.createGroup=function(m){var C=document.createElementNS("http://www.w3.org/2000/svg","g");return m&&H.setAttributes(C,m),C},H.createTransform=function(){return document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGTransform()},H.createMarker=function(m,C,k,Z,Q,ye,Qe){var Be=document.createElementNS("http://www.w3.org/2000/svg","marker");return H.setAttributes(Be,[["id",m],["orient",C],["markerWidth",k.toString()],["markerHeight",Z.toString()],["refX",Q.toString()],["refY",ye.toString()]]),Be.appendChild(Qe),Be},H.createText=function(m){var C=document.createElementNS("http://www.w3.org/2000/svg","text");return C.setAttribute("x","0"),C.setAttribute("y","0"),m&&H.setAttributes(C,m),C},H.createTSpan=function(m,C){var k=document.createElementNS("http://www.w3.org/2000/svg","tspan");return k.textContent=m,C&&H.setAttributes(k,C),k},H.createImage=function(m){var C=document.createElementNS("http://www.w3.org/2000/svg","image");return m&&H.setAttributes(C,m),C},H.createPoint=function(m,C){var k=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return k.x=m,k.y=C,k},H.createPath=function(m,C){var k=document.createElementNS("http://www.w3.org/2000/svg","path");return k.setAttribute("d",m),C&&H.setAttributes(k,C),k},H}(),ze=function(){function H(){}return H.addKey=function(m){H.key=m},Object.defineProperty(H,"isLicensed",{get:function(){return!!H.key&&new RegExp(/^MJS2-[A-Z][0-9]{3}-[A-Z][0-9]{3}-[0-9]{4}$/,"i").test(H.key)},enumerable:!1,configurable:!0}),H}(),at=function(){function H(){this.naturalSize=!1,this.imageType="image/png",this.markersOnly=!1}return H.prototype.rasterize=function(m,C,k){var Z=this;return new Promise(function(Q){var ye=k!==void 0?k:document.createElement("canvas");m===null&&(Z.markersOnly=!0,Z.naturalSize=!1);var Qe=document.createElementNS("http://www.w3.org/2000/svg","svg");Qe.setAttribute("xmlns","http://www.w3.org/2000/svg"),Qe.setAttribute("width",C.width.baseVal.valueAsString),Qe.setAttribute("height",C.height.baseVal.valueAsString),Qe.setAttribute("viewBox","0 0 "+C.viewBox.baseVal.width.toString()+" "+C.viewBox.baseVal.height.toString()),Qe.innerHTML=C.innerHTML,Z.naturalSize===!0?(Qe.width.baseVal.value=m.naturalWidth,Qe.height.baseVal.value=m.naturalHeight):Z.width!==void 0&&Z.height!==void 0&&(Qe.width.baseVal.value=Z.width,Qe.height.baseVal.value=Z.height),ye.width=Qe.width.baseVal.value,ye.height=Qe.height.baseVal.value;var Be=Qe.outerHTML,ot=ye.getContext("2d");Z.markersOnly!==!0&&ot.drawImage(m,0,0,ye.width,ye.height);var Xe=window.URL,mt=new Image(ye.width,ye.height);mt.setAttribute("crossOrigin","anonymous");var pt=new Blob([Be],{type:"image/svg+xml"}),Et=Xe.createObjectURL(pt);mt.onload=function(){ot.drawImage(mt,0,0),Xe.revokeObjectURL(Et);var Rt=ye.toDataURL(Z.imageType,Z.imageQuality);Q(Rt)},mt.src=Et})},H}(),nt=function(){},et=function(){function H(m){this._classNamePrefixBase="__markerjs2_",this.classes=[],this.rules=[],this.settings=this.defaultSettings,this._classNamePrefix=this._classNamePrefixBase+"_"+m+"_"}return Object.defineProperty(H.prototype,"classNamePrefixBase",{get:function(){return this._classNamePrefixBase},enumerable:!1,configurable:!0}),Object.defineProperty(H.prototype,"classNamePrefix",{get:function(){return this._classNamePrefix},enumerable:!1,configurable:!0}),Object.defineProperty(H.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(H.prototype,"fadeInAnimationClassName",{get:function(){return this.classNamePrefix+"fade_in"},enumerable:!1,configurable:!0}),Object.defineProperty(H.prototype,"fadeOutAnimationClassName",{get:function(){return this.classNamePrefix+"fade_out"},enumerable:!1,configurable:!0}),H.prototype.addClass=function(m){return this.styleSheet===void 0&&this.addStyleSheet(),m.name=""+this.classNamePrefix+m.localName,this.classes.push(m),this.styleSheet.sheet.insertRule("."+m.name+" {"+m.style+"}",this.styleSheet.sheet.cssRules.length),m},H.prototype.addRule=function(m){this.styleSheet===void 0&&this.addStyleSheet(),this.rules.push(m),this.styleSheet.sheet.insertRule(m.selector+" {"+m.style+"}",this.styleSheet.sheet.cssRules.length)},H.prototype.addStyleSheet=function(){var m;this.styleSheet=document.createElement("style"),((m=this.styleSheetRoot)!==null&&m!==void 0?m:document.head).appendChild(this.styleSheet),this.addRule(new Ke("."+this.classNamePrefix+" h3","font-family: sans-serif")),this.addRule(new Ke("@keyframes "+this.classNamePrefix+"_fade_in_animation_frames",`
|
|
from {
|
|
opacity: 0;
|
|
}
|
|
to {
|
|
opacity: 1;
|
|
}
|
|
`)),this.addRule(new Ke("@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;
|
|
`))},H.prototype.removeStyleSheet=function(){var m;this.styleSheet&&(((m=this.styleSheetRoot)!==null&&m!==void 0?m:document.head).removeChild(this.styleSheet),this.styleSheet=void 0)},H}(),Ke=function(H,m){this.selector=H,this.style=m},re=function(H,m){this.localName=H,this.style=m},z=function(){function H(m,C,k,Z,Q){this.buttons=[],this.markerButtons=[],this.buttonClickListeners=[],this.markerjsContainer=m,this.displayMode=C,this.markerItems=k,this.uiStyleSettings=Z,this.styles=Q,this.addStyles(),this.adjustLayout=this.adjustLayout.bind(this),this.overflowButtonClicked=this.overflowButtonClicked.bind(this),this.setCurrentMarker=this.setCurrentMarker.bind(this)}return H.prototype.show=function(m){var C=this;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=m,this.uiContainer.className=this.toolbarStyleClass.name+" "+this.styles.fadeInAnimationClassName+" "+(this.uiStyleSettings.toolbarStyleColorsClassName?this.uiStyleSettings.toolbarStyleColorsClassName:this.toolbarStyleColorsClass.name);var k=document.createElement("div");k.className=this.toolbarBlockStyleClass.name,k.style.whiteSpace="nowrap",this.uiContainer.appendChild(k),this.addActionButton(k,'<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(k,'<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(k,'<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(k,'<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(k,'<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(k,'<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(k,'<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(k,'<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(Q){var ye=document.createElement("div");ye.className=""+C.toolbarButtonStyleClass.name,ye.setAttribute("data-type-name",Q.typeName),ye.innerHTML=Q.icon,ye.addEventListener("click",function(){C.markerToolbarButtonClicked(ye,Q)}),C.buttons.push(ye),C.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()},H.prototype.addButtonClickListener=function(m){this.buttonClickListeners.push(m)},H.prototype.removeButtonClickListener=function(m){this.buttonClickListeners.indexOf(m)>-1&&this.buttonClickListeners.splice(this.buttonClickListeners.indexOf(m),1)},H.prototype.setSelectMode=function(){this.resetButtonStyles(),this.setActiveButton(this.buttons[0])},H.prototype.adjustLayout=function(){if(this.markerButtons&&this.markerButtons.length>0){var m=Math.floor(this.markerButtonBlock.clientWidth/this.uiStyleSettings.toolbarHeight)-1;this.markerButtonBlock.innerHTML="",this.markerButtonOverflowBlock.innerHTML="";for(var C=0;C<this.markerButtons.length;C++)C<m||C===m&&this.markerButtons.length-1===m?this.markerButtonBlock.appendChild(this.markerButtons[C]):(C===m&&this.markerButtonBlock.appendChild(this.overflowButton),this.markerButtonOverflowBlock.appendChild(this.markerButtons[C]))}},H.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")},H.prototype.resetButtonStyles=function(){var m=this;this.buttons.forEach(function(C){C.className=C.className.replace(m.uiStyleSettings.toolbarButtonStyleColorsClassName?m.uiStyleSettings.toolbarButtonStyleColorsClassName:m.toolbarButtonStyleColorsClass.name,"").trim(),C.className=C.className.replace(m.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?m.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:m.toolbarActiveButtonStyleColorsClass.name,"").trim(),C.className+=" "+(m.uiStyleSettings.toolbarButtonStyleColorsClassName?m.uiStyleSettings.toolbarButtonStyleColorsClassName:m.toolbarButtonStyleColorsClass.name)})},H.prototype.addActionButton=function(m,C,k){var Z=this,Q=document.createElement("div");switch(Q.className=""+this.toolbarButtonStyleClass.name,Q.innerHTML=C,Q.setAttribute("data-action",k),Q.addEventListener("click",function(){Z.actionToolbarButtonClicked(Q,k)}),k){case"select":Q.style.fill=this.uiStyleSettings.selectButtonColor;break;case"delete":case"clear":Q.style.fill=this.uiStyleSettings.deleteButtonColor;break;case"undo":case"redo":Q.style.fill=this.uiStyleSettings.selectButtonColor;break;case"render":Q.style.fill=this.uiStyleSettings.okButtonColor;break;case"close":Q.style.fill=this.uiStyleSettings.closeButtonColor}m.appendChild(Q),this.buttons.push(Q)},H.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 m=this.uiStyleSettings.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new re("toolbar_button",`
|
|
display: inline-block;
|
|
width: `+(this.uiStyleSettings.toolbarHeight-2*m)+`px;
|
|
height: `+(this.uiStyleSettings.toolbarHeight-2*m)+`px;
|
|
padding: `+m+`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 Ke("."+this.toolbarButtonStyleClass.name+" svg",`
|
|
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
|
|
`)),this.styles.addRule(new Ke("."+this.toolbarButtonStyleColorsClass.name+":hover",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
`))},H.prototype.markerToolbarButtonClicked=function(m,C){this.setActiveButton(m),this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(k){return k("marker",C)}),this.markerButtonOverflowBlock.style.display="none"},H.prototype.actionToolbarButtonClicked=function(m,C){this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(k){return k("action",C)}),this.markerButtonOverflowBlock.style.display="none",this.setActiveButton(this.buttons[0])},H.prototype.setActiveButton=function(m){this.resetButtonStyles(),m.className=m.className.replace(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,"").trim(),m.className+=" "+(this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name)},H.prototype.setActiveMarkerButton=function(m){var C=this.markerButtons.find(function(k){return k.getAttribute("data-type-name")===m});C&&this.setActiveButton(C)},H.prototype.setCurrentMarker=function(m){var C=this;this.currentMarker=m,this.buttons.filter(function(k){return/delete|notes/.test(k.getAttribute("data-action"))}).forEach(function(k){C.currentMarker===void 0?(k.style.fillOpacity="0.4",k.style.pointerEvents="none"):(k.style.fillOpacity="1",k.style.pointerEvents="all")})},H}(),Y=function(){function H(m,C,k,Z){this.panels=[],this.panelButtons=[],this.markerjsContainer=m,this.displayMode=C,this.uiStyleSettings=k,this.styles=Z,this.panelButtonClick=this.panelButtonClick.bind(this),this.addStyles()}return H.prototype.addStyles=function(){var m;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 C=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: `+((m=this.uiStyleSettings.toolboxBackgroundColor)!==null&&m!==void 0?m:this.uiStyleSettings.toolbarBackgroundHoverColor)+`;
|
|
`)),this.toolboxButtonStyleClass=this.styles.addClass(new re("toolbox_button",`
|
|
display: inline-block;
|
|
width: `+(this.uiStyleSettings.toolbarHeight-2*C)+`px;
|
|
height: `+(this.uiStyleSettings.toolbarHeight-2*C)+`px;
|
|
padding: `+C+`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 Ke("."+this.toolboxButtonStyleColorsClass.name+":hover",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
`)),this.styles.addRule(new Ke("."+this.toolboxButtonStyleClass.name+" svg",`
|
|
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
|
|
`))},H.prototype.show=function(m){var C;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=m,this.uiContainer.className=this.toolboxStyleClass.name+" "+((C=this.uiStyleSettings.toolboxStyleColorsClassName)!==null&&C!==void 0?C:this.toolboxStyleColorsClass.name),this.markerjsContainer.appendChild(this.uiContainer)},H.prototype.setPanelButtons=function(m){var C,k,Z=this;this.panels=m,this.uiContainer!==void 0&&(this.uiContainer.innerHTML="",this.panelRow=document.createElement("div"),this.panelRow.className=this.toolboxPanelRowStyleClass.name+" "+((C=this.uiStyleSettings.toolboxPanelRowStyleColorsClassName)!==null&&C!==void 0?C:this.toolboxPanelRowStyleColorsClass.name),this.uiContainer.appendChild(this.panelRow),this.buttonRow=document.createElement("div"),this.buttonRow.className=this.toolboxButtonRowStyleClass.name+" "+((k=this.uiStyleSettings.toolboxButtonRowStyleColorsClassName)!==null&&k!==void 0?k:this.toolboxButtonRowStyleColorsClass.name)+" ",this.uiContainer.appendChild(this.buttonRow),this.panelButtons.splice(0),this.panels.forEach(function(Q){var ye;Q.uiStyleSettings=Z.uiStyleSettings;var Qe=document.createElement("div");Qe.className=Z.toolboxButtonStyleClass.name+" "+((ye=Z.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&ye!==void 0?ye:Z.toolboxButtonStyleColorsClass.name),Qe.innerHTML=Q.icon,Qe.title=Q.title,Qe.addEventListener("click",function(){Z.panelButtonClick(Q)}),Z.panelButtons.push(Qe),Z.buttonRow.appendChild(Qe)}),this.displayMode==="inline"?this.panelRow.style.display="none":this.panelRow.style.visibility="hidden")},H.prototype.panelButtonClick=function(m){var C=this,k=-1;if(m!==this.activePanel){k=this.panels.indexOf(m),this.panelRow.innerHTML="";var Z=m.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=m}else this.activePanel=void 0,this.panelRow.className=this.panelRow.className.replace(this.styles.fadeInAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeOutAnimationClassName,setTimeout(function(){C.displayMode==="inline"?C.panelRow.style.display="none":C.panelRow.style.visibility="hidden"},200);this.panelButtons.forEach(function(Q,ye){var Qe,Be;Q.className=C.toolboxButtonStyleClass.name+" "+(ye===k?""+((Qe=C.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)!==null&&Qe!==void 0?Qe:C.toolboxActiveButtonStyleColorsClass.name):""+((Be=C.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&Be!==void 0?Be:C.toolboxButtonStyleColorsClass.name))})},H}(),J=function(H,m){this.title=H,this.icon=m},ie=function(H){function m(C,k,Z,Q){var ye=H.call(this,C,Q||'<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=k,ye.currentColor=Z,ye.setCurrentColor=ye.setCurrentColor.bind(ye),ye.getColorBox=ye.getColorBox.bind(ye),ye}return xe(m,H),m.prototype.getUi=function(){var C=this,k=document.createElement("div");return k.style.overflow="hidden",k.style.whiteSpace="nowrap",this.colors.forEach(function(Z){var Q=C.getColorBox(Z);k.appendChild(Q),C.colorBoxes.push(Q)}),k},m.prototype.getColorBox=function(C){var k=this,Z=this.uiStyleSettings.toolbarHeight/4,Q=this.uiStyleSettings.toolbarHeight-Z,ye=document.createElement("div");ye.style.display="inline-block",ye.style.boxSizing="content-box",ye.style.width=Q-2+"px",ye.style.height=Q-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=(Q+2)/2+"px",ye.style.borderColor=C===this.currentColor?this.uiStyleSettings.toolboxAccentColor:"transparent",ye.addEventListener("click",function(){k.setCurrentColor(C,ye)});var Qe=document.createElement("div");return Qe.style.display="inline-block",Qe.style.width=Q-2+"px",Qe.style.height=Q-2+"px",Qe.style.backgroundColor=C,Qe.style.borderRadius=Q/2+"px",C==="transparent"&&(Qe.style.fill=this.uiStyleSettings.toolboxAccentColor,Qe.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(Qe),ye},m.prototype.setCurrentColor=function(C,k){var Z=this;this.currentColor=C,this.colorBoxes.forEach(function(Q){Q.style.borderColor=Q===k?Z.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onColorChanged&&this.onColorChanged(C)},m}(J),ue=function(){function H(m,C,k){this._state="new",this._isSelected=!1,this._container=m,this._overlayContainer=C,this.globalSettings=k,this.stateChanged=this.stateChanged.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this)}return Object.defineProperty(H.prototype,"typeName",{get:function(){return Object.getPrototypeOf(this).constructor.typeName},enumerable:!1,configurable:!0}),Object.defineProperty(H.prototype,"container",{get:function(){return this._container},enumerable:!1,configurable:!0}),Object.defineProperty(H.prototype,"overlayContainer",{get:function(){return this._overlayContainer},enumerable:!1,configurable:!0}),Object.defineProperty(H.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),Object.defineProperty(H.prototype,"toolboxPanels",{get:function(){return[]},enumerable:!1,configurable:!0}),H.prototype.ownsTarget=function(m){return!1},Object.defineProperty(H.prototype,"isSelected",{get:function(){return this._isSelected},enumerable:!1,configurable:!0}),H.prototype.select=function(){this.container.style.cursor="move",this._isSelected=!0,this.manipulationStartState=this.getState()},H.prototype.deselect=function(){this.container.style.cursor="default",this._isSelected=!1,this.stateChanged()},H.prototype.pointerDown=function(m,C){},H.prototype.dblClick=function(m,C){},H.prototype.manipulate=function(m){},H.prototype.pointerUp=function(m){this.stateChanged()},H.prototype.dispose=function(){},H.prototype.addMarkerVisualToContainer=function(m){this.container.childNodes.length>0?this.container.insertBefore(m,this.container.childNodes[0]):this.container.appendChild(m)},H.prototype.getState=function(){return{typeName:H.typeName,state:this.state,notes:this.notes}},H.prototype.restoreState=function(m){this._state=m.state,this.notes=m.notes},H.prototype.scale=function(m,C){},H.prototype.colorChanged=function(m){this.onColorChanged&&this.onColorChanged(m),this.stateChanged()},H.prototype.fillColorChanged=function(m){this.onFillColorChanged&&this.onFillColorChanged(m),this.stateChanged()},H.prototype.stateChanged=function(){if(this.onStateChanged&&this.state!=="creating"&&this.state!=="new"){var m=this.getState();this.manipulationStartState!==void 0&&(this.manipulationStartState.state="select"),m.state="select",JSON.stringify(this.manipulationStartState)!=JSON.stringify(m)&&this.onStateChanged(this)}},H.typeName="MarkerBase",H}(),he=function(){function H(){this.findGripByVisual=this.findGripByVisual.bind(this)}return H.prototype.findGripByVisual=function(m){return this.topLeft.ownsTarget(m)?this.topLeft:this.topCenter.ownsTarget(m)?this.topCenter:this.topRight.ownsTarget(m)?this.topRight:this.centerLeft.ownsTarget(m)?this.centerLeft:this.centerRight.ownsTarget(m)?this.centerRight:this.bottomLeft.ownsTarget(m)?this.bottomLeft:this.bottomCenter.ownsTarget(m)?this.bottomCenter:this.bottomRight.ownsTarget(m)?this.bottomRight:void 0},H}(),He=function(){function H(){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 H.prototype.ownsTarget=function(m){return m===this.visual||m===this.visual.childNodes[0]||m===this.visual.childNodes[1]},H}(),We=function(){function H(){}return H.toITransformMatrix=function(m){return{a:m.a,b:m.b,c:m.c,d:m.d,e:m.e,f:m.f}},H.toSVGMatrix=function(m,C){return m.a=C.a,m.b=C.b,m.c=C.c,m.d=C.d,m.e=C.e,m.f=C.f,m},H}(),je=function(H){function m(C,k,Z){var Q=H.call(this,C,k,Z)||this;return Q.left=0,Q.top=0,Q.width=0,Q.height=0,Q.defaultSize={x:50,y:20},Q.offsetX=0,Q.offsetY=0,Q.rotationAngle=0,Q.CB_DISTANCE=10,Q._suppressMarkerCreateEvent=!1,Q.container.transform.baseVal.appendItem(ve.createTransform()),Q.setupControlBox(),Q}return xe(m,H),Object.defineProperty(m.prototype,"centerX",{get:function(){return this.left+this.width/2},enumerable:!1,configurable:!0}),Object.defineProperty(m.prototype,"centerY",{get:function(){return this.top+this.height/2},enumerable:!1,configurable:!0}),Object.defineProperty(m.prototype,"visual",{get:function(){return this._visual},set:function(C){this._visual=C;var k=ve.createTransform();this._visual.transform.baseVal.appendItem(k)},enumerable:!1,configurable:!0}),m.prototype.ownsTarget=function(C){return!!H.prototype.ownsTarget.call(this,C)||!!(this.controlGrips.findGripByVisual(C)!==void 0||this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(C))},m.prototype.pointerDown=function(C,k){H.prototype.pointerDown.call(this,C,k),this.state==="new"&&(this.left=C.x,this.top=C.y),this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.manipulationStartWidth=this.width,this.manipulationStartHeight=this.height;var Z=this.unrotatePoint(C);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(k),this.activeGrip!==void 0)this._state="resize";else if(this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(k)){this.activeGrip=this.rotatorGrip;var Q=this.rotatePoint({x:this.centerX,y:this.centerY});this.left=Q.x-this.width/2,this.top=Q.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"},m.prototype.pointerUp=function(C){var k=this.state;H.prototype.pointerUp.call(this,C),this.state==="creating"&&this.width<10&&this.height<10?(this.width=this.defaultSize.x,this.height=this.defaultSize.y):this.manipulate(C),this._state="select",k==="creating"&&this.onMarkerCreated&&this._suppressMarkerCreateEvent===!1&&this.onMarkerCreated(this)},m.prototype.moveVisual=function(C){this.visual.style.transform="translate("+C.x+"px, "+C.y+"px)"},m.prototype.manipulate=function(C){var k=this.unrotatePoint(C);this.state==="creating"?this.resize(C):this.state==="move"?(this.left=this.manipulationStartLeft+(k.x-this.manipulationStartLeft)-this.offsetX,this.top=this.manipulationStartTop+(k.y-this.manipulationStartTop)-this.offsetY,this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()):this.state==="resize"?this.resize(k):this.state==="rotate"&&this.rotate(C)},m.prototype.resize=function(C){var k=this.manipulationStartLeft,Z=this.manipulationStartWidth,Q=this.manipulationStartTop,ye=this.manipulationStartHeight;switch(this.activeGrip){case this.controlGrips.bottomLeft:case this.controlGrips.centerLeft:case this.controlGrips.topLeft:k=this.manipulationStartLeft+C.x-this.manipulationStartX,Z=this.manipulationStartWidth+this.manipulationStartLeft-k;break;case this.controlGrips.bottomRight:case this.controlGrips.centerRight:case this.controlGrips.topRight:case void 0:Z=this.manipulationStartWidth+C.x-this.manipulationStartX}switch(this.activeGrip){case this.controlGrips.topCenter:case this.controlGrips.topLeft:case this.controlGrips.topRight:Q=this.manipulationStartTop+C.y-this.manipulationStartY,ye=this.manipulationStartHeight+this.manipulationStartTop-Q;break;case this.controlGrips.bottomCenter:case this.controlGrips.bottomLeft:case this.controlGrips.bottomRight:case void 0:ye=this.manipulationStartHeight+C.y-this.manipulationStartY}Z>=0?(this.left=k,this.width=Z):(this.left=k+Z,this.width=-Z),ye>=0?(this.top=Q,this.height=ye):(this.top=Q+ye,this.height=-ye),this.setSize()},m.prototype.setSize=function(){this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()},m.prototype.rotate=function(C){if(Math.abs(C.x-this.centerX)>.1){var k=Math.sign(C.x-this.centerX);this.rotationAngle=180*Math.atan((C.y-this.centerY)/(C.x-this.centerX))/Math.PI+90*k,this.applyRotation()}},m.prototype.applyRotation=function(){var C=this.container.transform.baseVal.getItem(0);C.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(C,0)},m.prototype.rotatePoint=function(C){if(this.rotationAngle===0)return C;var k=this.container.getCTM(),Z=ve.createPoint(C.x,C.y);return{x:(Z=Z.matrixTransform(k)).x,y:Z.y}},m.prototype.unrotatePoint=function(C){if(this.rotationAngle===0)return C;var k=this.container.getCTM();k=k.inverse();var Z=ve.createPoint(C.x,C.y);return{x:(Z=Z.matrixTransform(k)).x,y:Z.y}},m.prototype.select=function(){H.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},m.prototype.deselect=function(){H.prototype.deselect.call(this),this.controlBox.style.display="none"},m.prototype.setupControlBox=function(){this.controlBox=ve.createGroup();var C=ve.createTransform();C.setTranslate(-this.CB_DISTANCE/2,-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.appendItem(C),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 he,this.addControlGrips(),this.controlBox.style.display="none"},m.prototype.adjustControlBox=function(){var C=this.controlBox.transform.baseVal.getItem(0);C.setTranslate(this.left-this.CB_DISTANCE/2,this.top-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.replaceItem(C,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()},m.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()},m.prototype.createGrip=function(){var C=new He;return C.visual.transform.baseVal.appendItem(ve.createTransform()),this.controlBox.appendChild(C.visual),C},m.prototype.positionGrips=function(){var C=this.controlGrips.topLeft.GRIP_SIZE,k=-C/2,Z=k,Q=(this.width+this.CB_DISTANCE)/2-C/2,ye=(this.height+this.CB_DISTANCE)/2-C/2,Qe=this.height+this.CB_DISTANCE-C/2,Be=this.width+this.CB_DISTANCE-C/2;this.positionGrip(this.controlGrips.topLeft.visual,k,Z),this.positionGrip(this.controlGrips.topCenter.visual,Q,Z),this.positionGrip(this.controlGrips.topRight.visual,Be,Z),this.positionGrip(this.controlGrips.centerLeft.visual,k,ye),this.positionGrip(this.controlGrips.centerRight.visual,Be,ye),this.positionGrip(this.controlGrips.bottomLeft.visual,k,Qe),this.positionGrip(this.controlGrips.bottomCenter.visual,Q,Qe),this.positionGrip(this.controlGrips.bottomRight.visual,Be,Qe),this.rotatorGrip!==void 0&&this.positionGrip(this.rotatorGrip.visual,Q,Z-3*this.CB_DISTANCE)},m.prototype.positionGrip=function(C,k,Z){var Q=C.transform.baseVal.getItem(0);Q.setTranslate(k,Z),C.transform.baseVal.replaceItem(Q,0)},m.prototype.hideControlBox=function(){this.controlBox.style.display="none"},m.prototype.showControlBox=function(){this.controlBox.style.display=""},m.prototype.getState=function(){return Object.assign({left:this.left,top:this.top,width:this.width,height:this.height,rotationAngle:this.rotationAngle,visualTransformMatrix:We.toITransformMatrix(this.visual.transform.baseVal.getItem(0).matrix),containerTransformMatrix:We.toITransformMatrix(this.container.transform.baseVal.getItem(0).matrix)},H.prototype.getState.call(this))},m.prototype.restoreState=function(C){H.prototype.restoreState.call(this,C);var k=C;this.left=k.left,this.top=k.top,this.width=k.width,this.height=k.height,this.rotationAngle=k.rotationAngle,this.visual.transform.baseVal.getItem(0).setMatrix(We.toSVGMatrix(this.visual.transform.baseVal.getItem(0).matrix,k.visualTransformMatrix)),this.container.transform.baseVal.getItem(0).setMatrix(We.toSVGMatrix(this.container.transform.baseVal.getItem(0).matrix,k.containerTransformMatrix))},m.prototype.scale=function(C,k){H.prototype.scale.call(this,C,k);var Z=this.rotatePoint({x:this.left,y:this.top}),Q=this.unrotatePoint({x:Z.x*C,y:Z.y*k});this.left=Q.x,this.top=Q.y,this.width=this.width*C,this.height=this.height*k,this.adjustControlBox()},m}(ue),Ge=function(H){function m(C,k,Z){var Q=H.call(this,C,k,Z)||this;return Q.fillColor="transparent",Q.strokeColor="transparent",Q.strokeWidth=0,Q.strokeDasharray="",Q.opacity=1,Q.setStrokeColor=Q.setStrokeColor.bind(Q),Q.setFillColor=Q.setFillColor.bind(Q),Q.setStrokeWidth=Q.setStrokeWidth.bind(Q),Q.setStrokeDasharray=Q.setStrokeDasharray.bind(Q),Q.createVisual=Q.createVisual.bind(Q),Q}return xe(m,H),m.prototype.ownsTarget=function(C){return!(!H.prototype.ownsTarget.call(this,C)&&C!==this.visual)},m.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)},m.prototype.pointerDown=function(C,k){H.prototype.pointerDown.call(this,C,k),this.state==="new"&&(this.createVisual(),this.moveVisual(C),this._state="creating")},m.prototype.manipulate=function(C){H.prototype.manipulate.call(this,C)},m.prototype.resize=function(C){H.prototype.resize.call(this,C),this.setSize()},m.prototype.setSize=function(){H.prototype.setSize.call(this),ve.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]])},m.prototype.pointerUp=function(C){H.prototype.pointerUp.call(this,C),this.setSize()},m.prototype.setStrokeColor=function(C){this.strokeColor=C,this.visual&&ve.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(C),this.stateChanged()},m.prototype.setFillColor=function(C){this.fillColor=C,this.visual&&ve.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},m.prototype.setStrokeWidth=function(C){this.strokeWidth=C,this.visual&&ve.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},m.prototype.setStrokeDasharray=function(C){this.strokeDasharray=C,this.visual&&ve.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},m.prototype.getState=function(){return Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},H.prototype.getState.call(this))},m.prototype.restoreState=function(C){var k=C;this.fillColor=k.fillColor,this.strokeColor=k.strokeColor,this.strokeWidth=k.strokeWidth,this.strokeDasharray=k.strokeDasharray,this.opacity=k.opacity,this.createVisual(),H.prototype.restoreState.call(this,C),this.setSize()},m.prototype.scale=function(C,k){H.prototype.scale.call(this,C,k),this.setSize()},m.title="Rectangle marker",m}(je),rt=function(H){function m(C,k,Z,Q){var ye=H.call(this,C,Q||'<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=k,ye.currentWidth=Z,ye.setCurrentWidth=ye.setCurrentWidth.bind(ye),ye}return xe(m,H),m.prototype.getUi=function(){var C=this,k=document.createElement("div");return k.style.display="flex",k.style.overflow="hidden",k.style.flexGrow="2",this.widths.forEach(function(Z){var Q=document.createElement("div");Q.style.display="flex",Q.style.flexGrow="2",Q.style.alignItems="center",Q.style.justifyContent="space-between",Q.style.padding="5px",Q.style.borderWidth="2px",Q.style.borderStyle="solid",Q.style.borderColor=Z===C.currentWidth?C.uiStyleSettings.toolboxAccentColor:"transparent",Q.addEventListener("click",function(){C.setCurrentWidth(Z,Q)}),k.appendChild(Q);var ye=document.createElement("div");ye.innerText=Z.toString(),ye.style.marginRight="5px",Q.appendChild(ye);var Qe=document.createElement("div");Qe.style.minHeight="20px",Qe.style.flexGrow="2",Qe.style.display="flex",Qe.style.alignItems="center";var Be=document.createElement("hr");Be.style.minWidth="20px",Be.style.border="0px",Be.style.borderTop=Z+"px solid "+C.uiStyleSettings.toolboxColor,Be.style.flexGrow="2",Qe.appendChild(Be),Q.appendChild(Qe),C.widthBoxes.push(Q)}),k},m.prototype.setCurrentWidth=function(C,k){var Z=this;this.currentWidth=C,this.widthBoxes.forEach(function(Q){Q.style.borderColor=Q===k?Z.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},m}(J),st=function(H){function m(C,k,Z,Q){var ye=H.call(this,C,Q||'<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=k,ye.currentStyle=Z,ye.setCurrentStyle=ye.setCurrentStyle.bind(ye),ye}return xe(m,H),m.prototype.getUi=function(){var C=this,k=document.createElement("div");return k.style.display="flex",k.style.overflow="hidden",k.style.flexGrow="2",this.styles.forEach(function(Z){var Q=document.createElement("div");Q.style.display="flex",Q.style.alignItems="center",Q.style.justifyContent="space-between",Q.style.padding="5px",Q.style.borderWidth="2px",Q.style.borderStyle="solid",Q.style.overflow="hidden",Q.style.maxWidth=100/C.styles.length-5+"%",Q.style.borderColor=Z===C.currentStyle?C.uiStyleSettings.toolboxAccentColor:"transparent",Q.addEventListener("click",function(){C.setCurrentStyle(Z,Q)}),k.appendChild(Q);var ye=document.createElement("div");ye.style.minHeight="20px",ye.style.flexGrow="2",ye.style.overflow="hidden";var Qe=`<svg width="100" height="20">
|
|
<line x1="0" y1="10" x2="100" y2="10" stroke="`+C.uiStyleSettings.toolboxColor+'" stroke-width="3" '+(Z!==""?'stroke-dasharray="'+Z+'"':"")+` />
|
|
</svg>`;ye.innerHTML=Qe,Q.appendChild(ye),C.styleBoxes.push(Q)}),k},m.prototype.setCurrentStyle=function(C,k){var Z=this;this.currentStyle=C,this.styleBoxes.forEach(function(Q){Q.style.borderColor=Q===k?Z.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},m}(J),Te=function(H){function m(C,k,Z){var Q=H.call(this,C,k,Z)||this;return Q.strokeColor=Z.defaultColor,Q.strokeWidth=Z.defaultStrokeWidth,Q.strokeDasharray=Z.defaultStrokeDasharray,Q.strokePanel=new ie("Line color",Z.defaultColorSet,Z.defaultColor),Q.strokePanel.onColorChanged=Q.setStrokeColor,Q.strokeWidthPanel=new rt("Line width",Z.defaultStrokeWidths,Z.defaultStrokeWidth),Q.strokeWidthPanel.onWidthChanged=Q.setStrokeWidth,Q.strokeStylePanel=new st("Line style",Z.defaultStrokeDasharrays,Z.defaultStrokeDasharray),Q.strokeStylePanel.onStyleChanged=Q.setStrokeDasharray,Q}return xe(m,H),Object.defineProperty(m.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),m.prototype.getState=function(){var C=H.prototype.getState.call(this);return C.typeName=m.typeName,C},m.typeName="FrameMarker",m.title="Frame marker",m.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4m14 11H6V8h12v9z"/></svg>',m}(Ge),De=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},Ve=function(H){function m(C,k,Z){var Q=H.call(this,C,k,Z)||this;return Q.x1=0,Q.y1=0,Q.x2=0,Q.y2=0,Q.defaultLength=50,Q.manipulationStartX=0,Q.manipulationStartY=0,Q.manipulationStartX1=0,Q.manipulationStartY1=0,Q.manipulationStartX2=0,Q.manipulationStartY2=0,Q.setupControlBox(),Q}return xe(m,H),m.prototype.ownsTarget=function(C){return!!H.prototype.ownsTarget.call(this,C)||!(!this.grip1.ownsTarget(C)&&!this.grip2.ownsTarget(C))},m.prototype.pointerDown=function(C,k){H.prototype.pointerDown.call(this,C,k),this.manipulationStartX=C.x,this.manipulationStartY=C.y,this.state==="new"&&(this.x1=C.x,this.y1=C.y,this.x2=C.x,this.y2=C.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(k)?this.activeGrip=this.grip1:this.grip2.ownsTarget(k)?this.activeGrip=this.grip2:this.activeGrip=void 0,this.activeGrip?this._state="resize":this._state="move")},m.prototype.pointerUp=function(C){var k=this.state;H.prototype.pointerUp.call(this,C),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(C),this._state="select",k==="creating"&&this.onMarkerCreated&&this.onMarkerCreated(this)},m.prototype.adjustVisual=function(){},m.prototype.manipulate=function(C){this.state==="creating"?this.resize(C):this.state==="move"?(this.x1=this.manipulationStartX1+C.x-this.manipulationStartX,this.y1=this.manipulationStartY1+C.y-this.manipulationStartY,this.x2=this.manipulationStartX2+C.x-this.manipulationStartX,this.y2=this.manipulationStartY2+C.y-this.manipulationStartY,this.adjustVisual(),this.adjustControlBox()):this.state==="resize"&&this.resize(C)},m.prototype.resize=function(C){switch(this.activeGrip){case this.grip1:this.x1=C.x,this.y1=C.y;break;case this.grip2:case void 0:this.x2=C.x,this.y2=C.y}this.adjustVisual(),this.adjustControlBox()},m.prototype.select=function(){H.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},m.prototype.deselect=function(){H.prototype.deselect.call(this),this.controlBox.style.display="none"},m.prototype.setupControlBox=function(){this.controlBox=ve.createGroup(),this.container.appendChild(this.controlBox),this.addControlGrips(),this.controlBox.style.display="none"},m.prototype.adjustControlBox=function(){this.positionGrips()},m.prototype.addControlGrips=function(){this.grip1=this.createGrip(),this.grip2=this.createGrip(),this.positionGrips()},m.prototype.createGrip=function(){var C=new He;return C.visual.transform.baseVal.appendItem(ve.createTransform()),this.controlBox.appendChild(C.visual),C},m.prototype.positionGrips=function(){var C=this.grip1.GRIP_SIZE;this.positionGrip(this.grip1.visual,this.x1-C/2,this.y1-C/2),this.positionGrip(this.grip2.visual,this.x2-C/2,this.y2-C/2)},m.prototype.positionGrip=function(C,k,Z){var Q=C.transform.baseVal.getItem(0);Q.setTranslate(k,Z),C.transform.baseVal.replaceItem(Q,0)},m.prototype.getState=function(){return Object.assign({x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2},H.prototype.getState.call(this))},m.prototype.restoreState=function(C){H.prototype.restoreState.call(this,C);var k=C;this.x1=k.x1,this.y1=k.y1,this.x2=k.x2,this.y2=k.y2},m.prototype.scale=function(C,k){H.prototype.scale.call(this,C,k),this.x1=this.x1*C,this.y1=this.y1*k,this.x2=this.x2*C,this.y2=this.y2*k,this.adjustVisual(),this.adjustControlBox()},m}(ue),$e=function(H){function m(C,k,Z){var Q=H.call(this,C,k,Z)||this;return Q.strokeColor="transparent",Q.strokeWidth=0,Q.strokeDasharray="",Q.setStrokeColor=Q.setStrokeColor.bind(Q),Q.setStrokeWidth=Q.setStrokeWidth.bind(Q),Q.setStrokeDasharray=Q.setStrokeDasharray.bind(Q),Q.strokeColor=Z.defaultColor,Q.strokeWidth=Z.defaultStrokeWidth,Q.strokeDasharray=Z.defaultStrokeDasharray,Q.strokePanel=new ie("Line color",Z.defaultColorSet,Z.defaultColor),Q.strokePanel.onColorChanged=Q.setStrokeColor,Q.strokeWidthPanel=new rt("Line width",Z.defaultStrokeWidths,Z.defaultStrokeWidth),Q.strokeWidthPanel.onWidthChanged=Q.setStrokeWidth,Q.strokeStylePanel=new st("Line style",Z.defaultStrokeDasharrays,Z.defaultStrokeDasharray),Q.strokeStylePanel.onStyleChanged=Q.setStrokeDasharray,Q}return xe(m,H),m.prototype.ownsTarget=function(C){return!(!H.prototype.ownsTarget.call(this,C)&&C!==this.visual&&C!==this.selectorLine&&C!==this.visibleLine)},m.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)},m.prototype.pointerDown=function(C,k){H.prototype.pointerDown.call(this,C,k),this.state==="new"&&(this.createVisual(),this.adjustVisual(),this._state="creating")},m.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()]]))},m.prototype.setStrokeColor=function(C){this.strokeColor=C,this.adjustVisual(),this.colorChanged(C)},m.prototype.setStrokeWidth=function(C){this.strokeWidth=C,this.adjustVisual()},m.prototype.setStrokeDasharray=function(C){this.strokeDasharray=C,this.adjustVisual(),this.stateChanged()},Object.defineProperty(m.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),m.prototype.getState=function(){var C=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray},H.prototype.getState.call(this));return C.typeName=m.typeName,C},m.prototype.restoreState=function(C){H.prototype.restoreState.call(this,C);var k=C;this.strokeColor=k.strokeColor,this.strokeWidth=k.strokeWidth,this.strokeDasharray=k.strokeDasharray,this.createVisual(),this.adjustVisual()},m.typeName="LineMarker",m.title="Line marker",m.icon='<svg viewBox="0 0 24 24"><path d="M19 13H5v-2h14v2z"/></svg>',m}(Ve),Ne=function(H){function m(C,k,Z,Q){var ye=H.call(this,C,Q||'<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=k,ye.currentFont=Z,ye.setCurrentFont=ye.setCurrentFont.bind(ye),ye}return xe(m,H),m.prototype.getUi=function(){var C=this,k=document.createElement("div");return k.style.overflow="hidden",k.style.flexGrow="2",this.fonts.forEach(function(Z){var Q=document.createElement("div");Q.style.display="inline-block",Q.style.alignItems="center",Q.style.justifyContent="space-between",Q.style.padding="5px",Q.style.borderWidth="2px",Q.style.borderStyle="solid",Q.style.overflow="hidden",Q.style.maxWidth=100/C.fonts.length-5+"%",Q.style.borderColor=Z===C.currentFont?C.uiStyleSettings.toolboxAccentColor:"transparent",Q.addEventListener("click",function(){C.setCurrentFont(Z,Q)}),k.appendChild(Q);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 Qe=document.createElement("div");Qe.style.whiteSpace="nowrap",Qe.style.overflow="hidden",Qe.style.textOverflow="ellipsis",Qe.innerHTML="The quick brown fox jumps over the lazy dog",ye.appendChild(Qe),Q.appendChild(ye),C.fontBoxes.push(Q)}),k},m.prototype.setCurrentFont=function(C,k){var Z=this;this.currentFont=C,this.fontBoxes.forEach(function(Q){Q.style.borderColor=Q===k?Z.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onFontChanged&&this.onFontChanged(this.currentFont)},m}(J),Pe=function(H){function m(C,k,Z){var Q=H.call(this,C,k,Z)||this;return Q.color="transparent",Q.padding=5,Q.DEFAULT_TEXT="your text here",Q.text=Q.DEFAULT_TEXT,Q.isMoved=!1,Q.color=Z.defaultColor,Q.fontFamily=Z.defaultFontFamily,Q.defaultSize={x:100,y:30},Q.setColor=Q.setColor.bind(Q),Q.setFont=Q.setFont.bind(Q),Q.renderText=Q.renderText.bind(Q),Q.sizeText=Q.sizeText.bind(Q),Q.textEditDivClicked=Q.textEditDivClicked.bind(Q),Q.showTextEditor=Q.showTextEditor.bind(Q),Q.setSize=Q.setSize.bind(Q),Q.positionTextEditor=Q.positionTextEditor.bind(Q),Q.colorPanel=new ie("Color",Z.defaultColorSet,Z.defaultColor),Q.colorPanel.onColorChanged=Q.setColor,Q.fontFamilyPanel=new Ne("Font",Z.defaultFontFamilies,Z.defaultFontFamily),Q.fontFamilyPanel.onFontChanged=Q.setFont,Q}return xe(m,H),m.prototype.ownsTarget=function(C){if(H.prototype.ownsTarget.call(this,C)||C===this.visual||C===this.textElement||C===this.bgRectangle)return!0;var k=!1;return this.textElement.childNodes.forEach(function(Z){Z===C&&(k=!0)}),k},m.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()},m.prototype.pointerDown=function(C,k){H.prototype.pointerDown.call(this,C,k),this.isMoved=!1,this.pointerDownPoint=C,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(C),this._state="creating")},m.prototype.renderText=function(){var C=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(k){C.textElement.appendChild(ve.createTSpan(k.trim()===""?" ":k.trim(),[["x","0"],["dy","1.2em"]]))}),setTimeout(this.sizeText,10)}},m.prototype.getTextScale=function(){var C=this.textElement.getBBox(),k=1;if(C.width>0&&C.height>0){var Z=(1*this.width-this.width*this.padding*2/100)/C.width,Q=(1*this.height-this.height*this.padding*2/100)/C.height;k=Math.min(Z,Q)}return k},m.prototype.getTextPosition=function(C){var k=this.textElement.getBBox(),Z=0,Q=0;return k.width>0&&k.height>0&&(Z=(this.width-k.width*C)/2,Q=this.height/2-k.height*C/2),{x:Z,y:Q}},m.prototype.sizeText=function(){var C=this.textElement.getBBox(),k=this.getTextScale(),Z=this.getTextPosition(k);Z.y-=C.y*k,navigator.userAgent.indexOf("Edge/")>-1?this.textElement.style.transform="translate("+Z.x+"px, "+Z.y+"px) scale("+k+", "+k+")":(this.textElement.transform.baseVal.getItem(0).setTranslate(Z.x,Z.y),this.textElement.transform.baseVal.getItem(1).setScale(k,k))},m.prototype.manipulate=function(C){H.prototype.manipulate.call(this,C),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(C.x-this.pointerDownPoint.x)>5||Math.abs(C.y-this.pointerDownPoint.y)>5)},m.prototype.resize=function(C){H.prototype.resize.call(this,C),this.isMoved=!0,this.setSize(),this.sizeText()},m.prototype.setSize=function(){H.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()]]))},m.prototype.pointerUp=function(C){var k=this.state;k==="creating"&&(this._suppressMarkerCreateEvent=!0),H.prototype.pointerUp.call(this,C),this.setSize(),(k==="creating"||!this.isMoved&&Date.now()-this.pointerDownTimestamp>500)&&this.showTextEditor(),this.pointerDownPoint=void 0},m.prototype.showTextEditor=function(){var C=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(k){k.stopPropagation()}),this.textEditor.addEventListener("input",function(){for(var k=Number.parseFloat(C.textEditor.style.fontSize);C.textEditor.clientWidth>=Number.parseInt(C.textEditor.style.maxWidth)&&k>.9;)k-=.1,C.textEditor.style.fontSize=Math.max(k,.9)+"em"}),this.textEditor.addEventListener("keyup",function(k){k.cancelBubble=!0}),this.textEditor.addEventListener("paste",function(k){if(k.clipboardData){var Z=k.clipboardData.getData("text"),Q=window.getSelection();if(!Q.rangeCount)return!1;Q.deleteFromDocument(),Q.getRangeAt(0).insertNode(document.createTextNode(Z)),k.preventDefault()}}),this.textEditDiv.addEventListener("pointerup",function(){C.textEditDivClicked(C.textEditor.innerText)}),this.textEditDiv.appendChild(this.textEditor),this.overlayContainer.appendChild(this.textEditDiv),this.hideVisual(),this.textEditor.focus(),document.execCommand("selectAll")},m.prototype.positionTextEditor=function(){if(this.state==="edit")if(this.textEditor===void 0)this.showTextEditor();else{this.textElement.style.display="";var C=this.getTextScale(),k=this.rotatePoint({x:this.left+this.width/2,y:this.top+this.height/2}),Z=this.textElement.getBBox(),Q={x:Z.width*C,y:Z.height*C};k.x-=Q.x/2,k.y-=Q.y/2,this.textEditor.style.top=k.y+"px",this.textEditor.style.left=k.x+"px",this.textEditor.style.maxWidth=this.overlayContainer.offsetWidth-k.x+"px",this.textEditor.style.fontSize=Math.max(16*C,12)+"px",this.textElement.style.display="none"}},m.prototype.textEditDivClicked=function(C){this.text=C.trim(),this.overlayContainer.innerHTML="",this.renderText(),this.showVisual(),this._suppressMarkerCreateEvent&&(this._suppressMarkerCreateEvent=!1,this.onMarkerCreated&&this.onMarkerCreated(this)),this.stateChanged()},m.prototype.select=function(){H.prototype.select.call(this),this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText)},m.prototype.deselect=function(){this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText),H.prototype.deselect.call(this)},m.prototype.dblClick=function(C,k){H.prototype.dblClick.call(this,C,k),this.showTextEditor()},m.prototype.setColor=function(C){this.textElement&&ve.setAttributes(this.textElement,[["fill",C]]),this.color=C,this.textEditor&&(this.textEditor.style.color=this.color),this.colorChanged(C)},m.prototype.setFont=function(C){this.textElement&&ve.setAttributes(this.textElement,[["font-family",C]]),this.fontFamily=C,this.textEditor&&(this.textEditor.style.fontFamily=this.fontFamily),this.renderText(),this.stateChanged()},m.prototype.hideVisual=function(){this.textElement.style.display="none",this.hideControlBox()},m.prototype.showVisual=function(){this.state==="edit"&&(this._state="select"),this.textElement.style.display="",this.showControlBox()},Object.defineProperty(m.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),m.prototype.getState=function(){var C=Object.assign({color:this.color,fontFamily:this.fontFamily,padding:this.padding,text:this.text},H.prototype.getState.call(this));return C.typeName=m.typeName,C},m.prototype.restoreState=function(C){var k=C;this.color=k.color,this.fontFamily=k.fontFamily,this.padding=k.padding,this.text=k.text,this.createVisual(),H.prototype.restoreState.call(this,C),this.setSize()},m.prototype.scale=function(C,k){H.prototype.scale.call(this,C,k),this.setSize(),this.sizeText(),this.positionTextEditor()},m.typeName="TextMarker",m.title="Text marker",m.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>',m}(je),Ce=function(H){function m(C,k,Z){var Q=H.call(this,C,k,Z)||this;return Q.color="transparent",Q.lineWidth=3,Q.drawing=!1,Q.pixelRatio=1,Q.color=Z.defaultColor,Q.lineWidth=Z.defaultStrokeWidth,Q.pixelRatio=Z.freehandPixelRatio,Q.setColor=Q.setColor.bind(Q),Q.addCanvas=Q.addCanvas.bind(Q),Q.finishCreation=Q.finishCreation.bind(Q),Q.setLineWidth=Q.setLineWidth.bind(Q),Q.colorPanel=new ie("Color",Z.defaultColorSet,Z.defaultColor),Q.colorPanel.onColorChanged=Q.setColor,Q.lineWidthPanel=new rt("Line width",Z.defaultStrokeWidths,Z.defaultStrokeWidth),Q.lineWidthPanel.onWidthChanged=Q.setLineWidth,Q}return xe(m,H),m.prototype.ownsTarget=function(C){return!(!H.prototype.ownsTarget.call(this,C)&&C!==this.visual&&C!==this.drawingImage)},m.prototype.createVisual=function(){this.visual=ve.createGroup(),this.drawingImage=ve.createImage(),this.visual.appendChild(this.drawingImage);var C=ve.createTransform();this.visual.transform.baseVal.appendItem(C),this.addMarkerVisualToContainer(this.visual)},m.prototype.pointerDown=function(C,k){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(C.x,C.y),this.drawing=!0):H.prototype.pointerDown.call(this,C,k)},m.prototype.manipulate=function(C){this.state==="creating"?this.drawing&&(this.canvasContext.lineTo(C.x,C.y),this.canvasContext.stroke()):H.prototype.manipulate.call(this,C)},m.prototype.resize=function(C){H.prototype.resize.call(this,C),ve.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),ve.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]])},m.prototype.pointerUp=function(C){this._state==="creating"?this.drawing&&(this.canvasContext.closePath(),this.drawing=!1,this.globalSettings.newFreehandMarkerOnPointerUp&&this.finishCreation()):H.prototype.pointerUp.call(this,C)},m.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)},m.prototype.select=function(){this.state==="creating"&&this.finishCreation(),H.prototype.select.call(this)},m.prototype.deselect=function(){this.state==="creating"&&this.finishCreation(),H.prototype.deselect.call(this)},m.prototype.finishCreation=function(){for(var C=this.canvasContext.getImageData(0,0,this.canvasElement.width,this.canvasElement.height),k=[this.canvasElement.width+1,this.canvasElement.height+1,-1,-1],Z=k[0],Q=k[1],ye=k[2],Qe=k[3],Be=!1,ot=0;ot<this.canvasElement.height;ot++)for(var Xe=0;Xe<this.canvasElement.width;Xe++)C.data[ot*this.canvasElement.width*4+4*Xe+3]>0&&(Be=!0,ot<Q&&(Q=ot),Xe<Z&&(Z=Xe),ot>Qe&&(Qe=ot),Xe>ye&&(ye=Xe));if(Be){this.left=Z/this.pixelRatio,this.top=Q/this.pixelRatio,this.width=(ye-Z)/this.pixelRatio,this.height=(Qe-Q)/this.pixelRatio;var mt=document.createElement("canvas");mt.width=ye-Z,mt.height=Qe-Q,mt.getContext("2d").putImageData(this.canvasContext.getImageData(Z,Q,ye-Z,Qe-Q),0,0),this.drawingImgUrl=mt.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},m.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})},m.prototype.setColor=function(C){this.color=C,this.colorChanged(C)},m.prototype.setLineWidth=function(C){this.lineWidth=C},Object.defineProperty(m.prototype,"toolboxPanels",{get:function(){return this.state==="new"||this.state==="creating"?[this.colorPanel,this.lineWidthPanel]:[]},enumerable:!1,configurable:!0}),m.prototype.getState=function(){var C=Object.assign({drawingImgUrl:this.drawingImgUrl},H.prototype.getState.call(this));return C.typeName=m.typeName,C},m.prototype.restoreState=function(C){this.createVisual(),H.prototype.restoreState.call(this,C),this.drawingImgUrl=C.drawingImgUrl,this.setDrawingImage()},m.prototype.scale=function(C,k){H.prototype.scale.call(this,C,k),this.setDrawingImage()},m.typeName="FreehandMarker",m.title="Freehand marker",m.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>',m}(je),ce=function(H){function m(C,k,Z){var Q=H.call(this,C,Z||'<svg viewBox="0 0 24 24"><path d="M8 14v4l-6-6 6-6v4h8V6l6 6-6 6v-4H8z"/></svg>')||this;return Q.typeBoxes=[],Q.currentType=k,Q.setCurrentType=Q.setCurrentType.bind(Q),Q}return xe(m,H),m.prototype.getUi=function(){var C=this,k=document.createElement("div");k.style.display="flex",k.style.overflow="hidden",k.style.flexGrow="2";for(var Z=function(Qe){var Be="both";switch(Qe){case 0:Be="both";break;case 1:Be="start";break;case 2:Be="end";break;case 3:Be="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=Be===Q.currentType?Q.uiStyleSettings.toolboxAccentColor:"transparent",ot.addEventListener("click",function(){C.setCurrentType(Be,ot)}),k.appendChild(ot),Be==="both"||Be==="start"){var Xe=document.createElement("div");Xe.style.display="flex",Xe.style.alignItems="center",Xe.style.minHeight="20px",Xe.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="`+(Q.uiStyleSettings!==void 0?Q.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
|
|
</svg>`,Xe.style.marginLeft="5px",ot.appendChild(Xe)}var mt=document.createElement("div");mt.style.display="flex",mt.style.alignItems="center",mt.style.minHeight="20px",mt.style.flexGrow="2";var pt=document.createElement("hr");if(pt.style.minWidth="20px",pt.style.border="0px",pt.style.borderTop="3px solid "+(Q.uiStyleSettings!==void 0?Q.uiStyleSettings.toolboxColor:"#eeeeee"),pt.style.flexGrow="2",mt.appendChild(pt),ot.appendChild(mt),Be==="both"||Be==="end"){var Et=document.createElement("div");Et.style.display="flex",Et.style.alignItems="center",Et.style.minHeight="20px",Et.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="`+(Q.uiStyleSettings!==void 0?Q.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
|
|
</svg>`,Et.style.marginRight="5px",ot.appendChild(Et)}Q.typeBoxes.push(ot)},Q=this,ye=0;ye<4;ye++)Z(ye);return k},m.prototype.setCurrentType=function(C,k){var Z=this;this.currentType=C,this.typeBoxes.forEach(function(Q){Q.style.borderColor=Q===k?Z.uiStyleSettings!==void 0?Z.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"}),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},m}(J),ge=function(H){function m(C,k,Z){var Q=H.call(this,C,k,Z)||this;return Q.arrowType="end",Q.arrowBaseHeight=10,Q.arrowBaseWidth=10,Q.getArrowPoints=Q.getArrowPoints.bind(Q),Q.setArrowType=Q.setArrowType.bind(Q),Q.arrowTypePanel=new ce("Arrow type","end"),Q.arrowTypePanel.onArrowTypeChanged=Q.setArrowType,Q}return xe(m,H),m.prototype.ownsTarget=function(C){return!(!H.prototype.ownsTarget.call(this,C)&&C!==this.arrow1&&C!==this.arrow2)},m.prototype.getArrowPoints=function(C,k){var Z=this.arrowBaseWidth+2*this.strokeWidth,Q=this.arrowBaseHeight+2*this.strokeWidth;return C-Z/2+","+(k+Q/2)+" "+C+","+(k-Q/2)+" "+(C+Z/2)+","+(k+Q/2)},m.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)},m.prototype.pointerDown=function(C,k){H.prototype.pointerDown.call(this,C,k),this.state==="creating"&&this.createTips()},m.prototype.adjustVisual=function(){if(H.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 C=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),k=this.arrow1.transform.baseVal.getItem(0);k.setRotate(C,this.x1,this.y1),this.arrow1.transform.baseVal.replaceItem(k,0);var Z=this.arrow2.transform.baseVal.getItem(0);Z.setRotate(C+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(Z,0)}},m.prototype.setArrowType=function(C){this.arrowType=C,this.adjustVisual(),this.stateChanged()},Object.defineProperty(m.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel,this.arrowTypePanel]},enumerable:!1,configurable:!0}),m.prototype.getState=function(){var C=Object.assign({arrowType:this.arrowType},H.prototype.getState.call(this));return C.typeName=m.typeName,C},m.prototype.restoreState=function(C){H.prototype.restoreState.call(this,C);var k=C;this.arrowType=k.arrowType,this.createTips(),this.adjustVisual()},m.typeName="ArrowMarker",m.title="Arrow marker",m.icon='<svg viewBox="0 0 24 24"><path d="M19 6.41L17.59 5 7 15.59V9H5v10h10v-2H8.41L19 6.41z"/></svg>',m}($e),te=function(H){function m(C,k,Z){var Q=H.call(this,C,k,Z)||this;return Q.fillColor=Z.defaultFillColor,Q.strokeWidth=0,Q.fillPanel=new ie("Color",Z.defaultColorSet,Z.defaultFillColor),Q.fillPanel.onColorChanged=Q.setFillColor,Q}return xe(m,H),Object.defineProperty(m.prototype,"toolboxPanels",{get:function(){return[this.fillPanel]},enumerable:!1,configurable:!0}),m.prototype.getState=function(){var C=H.prototype.getState.call(this);return C.typeName=m.typeName,C},m.typeName="CoverMarker",m.title="Cover marker",m.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4z"/></svg>',m}(Ge),ne=function(H){function m(C,k,Z,Q){var ye=H.call(this,C,Q||'<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=k,ye.currentOpacity=Z,ye.setCurrentOpacity=ye.setCurrentOpacity.bind(ye),ye}return xe(m,H),m.prototype.getUi=function(){var C=this,k=document.createElement("div");return k.style.display="flex",k.style.overflow="hidden",k.style.flexGrow="2",k.style.justifyContent="space-between",this.opacities.forEach(function(Z){var Q=document.createElement("div");Q.style.display="flex",Q.style.alignItems="center",Q.style.justifyContent="center",Q.style.padding="5px",Q.style.borderWidth="2px",Q.style.borderStyle="solid",Q.style.borderColor=Z===C.currentOpacity?C.uiStyleSettings.toolboxAccentColor:"transparent",Q.addEventListener("click",function(){C.setCurrentOpacity(Z,Q)}),k.appendChild(Q);var ye=document.createElement("div");ye.innerText=100*Z+"%",Q.appendChild(ye),C.opacityBoxes.push(Q)}),k},m.prototype.setCurrentOpacity=function(C,k){var Z=this;this.currentOpacity=C,this.opacityBoxes.forEach(function(Q){Q.style.borderColor=Q===k?Z.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},m}(J),le=function(H){function m(C,k,Z){var Q=H.call(this,C,k,Z)||this;return Q.setOpacity=Q.setOpacity.bind(Q),Q.fillColor=Z.defaultHighlightColor,Q.strokeWidth=0,Q.opacity=Z.defaultHighlightOpacity,Q.fillPanel=new ie("Color",Z.defaultColorSet,Q.fillColor),Q.fillPanel.onColorChanged=Q.setFillColor,Q.opacityPanel=new ne("Opacity",Z.defaultOpacitySteps,Q.opacity),Q.opacityPanel.onOpacityChanged=Q.setOpacity,Q}return xe(m,H),m.prototype.setOpacity=function(C){this.opacity=C,this.visual&&ve.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(m.prototype,"toolboxPanels",{get:function(){return[this.fillPanel,this.opacityPanel]},enumerable:!1,configurable:!0}),m.prototype.getState=function(){var C=H.prototype.getState.call(this);return C.typeName=m.typeName,C},m.typeName="HighlightMarker",m.title="Highlight marker",m.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>',m}(te),de='<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>',Re=function(H){function m(C,k,Z){var Q=H.call(this,C,k,Z)||this;return Q.bgColor="transparent",Q.tipPosition={x:0,y:0},Q.tipBase1Position={x:0,y:0},Q.tipBase2Position={x:0,y:0},Q.tipMoving=!1,Q.color=Z.defaultStrokeColor,Q.bgColor=Z.defaultFillColor,Q.fontFamily=Z.defaultFontFamily,Q.defaultSize={x:100,y:30},Q.setBgColor=Q.setBgColor.bind(Q),Q.getTipPoints=Q.getTipPoints.bind(Q),Q.positionTip=Q.positionTip.bind(Q),Q.setTipPoints=Q.setTipPoints.bind(Q),Q.colorPanel=new ie("Text color",Z.defaultColorSet,Q.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>'),Q.colorPanel.onColorChanged=Q.setColor,Q.bgColorPanel=new ie("Fill color",Z.defaultColorSet,Q.bgColor,de),Q.bgColorPanel.onColorChanged=Q.setBgColor,Q.fontFamilyPanel=new Ne("Font",Z.defaultFontFamilies,Z.defaultFontFamily),Q.fontFamilyPanel.onFontChanged=Q.setFont,Q.tipGrip=new He,Q.tipGrip.visual.transform.baseVal.appendItem(ve.createTransform()),Q.controlBox.appendChild(Q.tipGrip.visual),Q}return xe(m,H),m.prototype.ownsTarget=function(C){return H.prototype.ownsTarget.call(this,C)||this.tipGrip.ownsTarget(C)||this.tip===C},m.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)},m.prototype.pointerDown=function(C,k){this.state==="new"&&H.prototype.pointerDown.call(this,C,k),this.state==="creating"?this.createTip():this.tipGrip.ownsTarget(k)?(this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.tipMoving=!0):H.prototype.pointerDown.call(this,C,k)},m.prototype.pointerUp=function(C){if(this.tipMoving)this.tipMoving=!1,this.isMoved=!0,H.prototype.pointerUp.call(this,C);else{var k=this.state==="creating";H.prototype.pointerUp.call(this,C),this.setTipPoints(k),this.positionTip()}},m.prototype.manipulate=function(C){if(this.tipMoving){var k=this.unrotatePoint(C);this.tipPosition={x:k.x-this.manipulationStartLeft,y:k.y-this.manipulationStartTop},this.positionTip()}else H.prototype.manipulate.call(this,C)},m.prototype.setBgColor=function(C){this.bgRectangle&&this.tip&&(ve.setAttributes(this.bgRectangle,[["fill",C]]),ve.setAttributes(this.tip,[["fill",C]])),this.bgColor=C,this.fillColorChanged(C)},m.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},m.prototype.setTipPoints=function(C){C===void 0&&(C=!1);var k=Math.min(this.height/2,15),Z=this.height/5;C&&(this.tipPosition={x:k+Z/2,y:this.height+20});var Q=Math.atan(this.height/2/(this.width/2));this.tipPosition.x<this.width/2&&this.tipPosition.y<this.height/2?Q<Math.atan((this.height/2-this.tipPosition.y)/(this.width/2-this.tipPosition.x))?(Z=this.width/5,k=Math.min(this.width/2,15),this.tipBase1Position={x:k,y:0},this.tipBase2Position={x:k+Z,y:0}):(this.tipBase1Position={x:0,y:k},this.tipBase2Position={x:0,y:k+Z}):this.tipPosition.x>=this.width/2&&this.tipPosition.y<this.height/2?Q<Math.atan((this.height/2-this.tipPosition.y)/(this.tipPosition.x-this.width/2))?(Z=this.width/5,k=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-k-Z,y:0},this.tipBase2Position={x:this.width-k,y:0}):(this.tipBase1Position={x:this.width,y:k},this.tipBase2Position={x:this.width,y:k+Z}):this.tipPosition.x>=this.width/2&&this.tipPosition.y>=this.height/2?Q<Math.atan((this.tipPosition.y-this.height/2)/(this.tipPosition.x-this.width/2))?(Z=this.width/5,k=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-k-Z,y:this.height},this.tipBase2Position={x:this.width-k,y:this.height}):(this.tipBase1Position={x:this.width,y:this.height-k-Z},this.tipBase2Position={x:this.width,y:this.height-k}):Q<Math.atan((this.tipPosition.y-this.height/2)/(this.width/2-this.tipPosition.x))?(Z=this.width/5,k=Math.min(this.width/2,15),this.tipBase1Position={x:k,y:this.height},this.tipBase2Position={x:k+Z,y:this.height}):(this.tipBase1Position={x:0,y:this.height-k},this.tipBase2Position={x:0,y:this.height-k-Z})},m.prototype.resize=function(C){H.prototype.resize.call(this,C),this.positionTip()},m.prototype.positionTip=function(){ve.setAttributes(this.tip,[["points",this.getTipPoints()]]);var C=this.tipGrip.visual.transform.baseVal.getItem(0);C.setTranslate(this.tipPosition.x,this.tipPosition.y),this.tipGrip.visual.transform.baseVal.replaceItem(C,0)},Object.defineProperty(m.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.bgColorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),m.prototype.select=function(){this.positionTip(),H.prototype.select.call(this)},m.prototype.getState=function(){var C=Object.assign({bgColor:this.bgColor,tipPosition:this.tipPosition},H.prototype.getState.call(this));return C.typeName=m.typeName,C},m.prototype.restoreState=function(C){var k=C;this.bgColor=k.bgColor,this.tipPosition=k.tipPosition,H.prototype.restoreState.call(this,C),this.createTip(),this.setTipPoints()},m.prototype.scale=function(C,k){H.prototype.scale.call(this,C,k),this.tipPosition={x:this.tipPosition.x*C,y:this.tipPosition.y*k},this.positionTip()},m.typeName="CalloutMarker",m.title="Callout marker",m.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>',m}(Pe),Me=function(H){function m(C,k,Z){var Q=H.call(this,C,k,Z)||this;return Q.fillColor="transparent",Q.strokeColor="transparent",Q.strokeWidth=0,Q.strokeDasharray="",Q.opacity=1,Q.strokeColor=Z.defaultColor,Q.strokeWidth=Z.defaultStrokeWidth,Q.strokeDasharray=Z.defaultStrokeDasharray,Q.fillColor=Z.defaultFillColor,Q.setStrokeColor=Q.setStrokeColor.bind(Q),Q.setFillColor=Q.setFillColor.bind(Q),Q.setStrokeWidth=Q.setStrokeWidth.bind(Q),Q.setStrokeDasharray=Q.setStrokeDasharray.bind(Q),Q.setOpacity=Q.setOpacity.bind(Q),Q.createVisual=Q.createVisual.bind(Q),Q.strokePanel=new ie("Line color",we(Z.defaultColorSet,["transparent"]),Z.defaultColor),Q.strokePanel.onColorChanged=Q.setStrokeColor,Q.fillPanel=new ie("Fill color",we(Z.defaultColorSet,["transparent"]),Q.fillColor,de),Q.fillPanel.onColorChanged=Q.setFillColor,Q.strokeWidthPanel=new rt("Line width",Z.defaultStrokeWidths,Z.defaultStrokeWidth),Q.strokeWidthPanel.onWidthChanged=Q.setStrokeWidth,Q.strokeStylePanel=new st("Line style",Z.defaultStrokeDasharrays,Z.defaultStrokeDasharray),Q.strokeStylePanel.onStyleChanged=Q.setStrokeDasharray,Q.opacityPanel=new ne("Opacity",Z.defaultOpacitySteps,Q.opacity),Q.opacityPanel.onOpacityChanged=Q.setOpacity,Q}return xe(m,H),m.prototype.ownsTarget=function(C){return!(!H.prototype.ownsTarget.call(this,C)&&C!==this.visual)},m.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)},m.prototype.pointerDown=function(C,k){H.prototype.pointerDown.call(this,C,k),this.state==="new"&&(this.createVisual(),this.moveVisual(C),this._state="creating")},m.prototype.manipulate=function(C){H.prototype.manipulate.call(this,C)},m.prototype.resize=function(C){H.prototype.resize.call(this,C),this.setSize()},m.prototype.setSize=function(){H.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()]])},m.prototype.pointerUp=function(C){H.prototype.pointerUp.call(this,C),this.setSize()},m.prototype.setStrokeColor=function(C){this.strokeColor=C,this.visual&&ve.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(C),this.stateChanged()},m.prototype.setFillColor=function(C){this.fillColor=C,this.visual&&ve.setAttributes(this.visual,[["fill",this.fillColor]]),this.fillColorChanged(C),this.stateChanged()},m.prototype.setStrokeWidth=function(C){this.strokeWidth=C,this.visual&&ve.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},m.prototype.setStrokeDasharray=function(C){this.strokeDasharray=C,this.visual&&ve.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},m.prototype.setOpacity=function(C){this.opacity=C,this.visual&&ve.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(m.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.opacityPanel]},enumerable:!1,configurable:!0}),m.prototype.getState=function(){var C=Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},H.prototype.getState.call(this));return C.typeName=m.typeName,C},m.prototype.restoreState=function(C){var k=C;this.fillColor=k.fillColor,this.strokeColor=k.strokeColor,this.strokeWidth=k.strokeWidth,this.strokeDasharray=k.strokeDasharray,this.opacity=k.opacity,this.createVisual(),H.prototype.restoreState.call(this,C),this.setSize()},m.prototype.scale=function(C,k){H.prototype.scale.call(this,C,k),this.setSize()},m.typeName="EllipseMarker",m.title="Ellipse marker",m.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>',m}(je),qe=function(H){function m(C,k,Z){return H.call(this,C,k,Z)||this}return xe(m,H),Object.defineProperty(m.prototype,"tipLength",{get:function(){return 10+3*this.strokeWidth},enumerable:!1,configurable:!0}),m.prototype.ownsTarget=function(C){return!(!H.prototype.ownsTarget.call(this,C)&&C!==this.tip1&&C!==this.tip2)},m.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)},m.prototype.pointerDown=function(C,k){H.prototype.pointerDown.call(this,C,k),this.state==="creating"&&this.createTips()},m.prototype.adjustVisual=function(){if(H.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 C=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),k=this.tip1.transform.baseVal.getItem(0);k.setRotate(C,this.x1,this.y1),this.tip1.transform.baseVal.replaceItem(k,0);var Z=this.tip2.transform.baseVal.getItem(0);Z.setRotate(C+180,this.x2,this.y2),this.tip2.transform.baseVal.replaceItem(Z,0)}},Object.defineProperty(m.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),m.prototype.getState=function(){var C=H.prototype.getState.call(this);return C.typeName=m.typeName,C},m.prototype.restoreState=function(C){H.prototype.restoreState.call(this,C),this.createTips(),this.adjustVisual()},m.typeName="MeasurementMarker",m.title="Measurement marker",m.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>',m}($e),lt=function(H){function m(C,k,Z){var Q=H.call(this,C,k,Z)||this;return Q.strokePanel.colors=Z.defaultColorSet,Q.fillColor="transparent",Q}return xe(m,H),Object.defineProperty(m.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),m.prototype.getState=function(){var C=H.prototype.getState.call(this);return C.typeName=m.typeName,C},m.typeName="EllipseFrameMarker",m.title="Ellipse frame marker",m.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>',m}(Me),ft=function(){function H(){this.undoStack=[],this.redoStack=[]}return Object.defineProperty(H.prototype,"isUndoPossible",{get:function(){return this.undoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(H.prototype,"isRedoPossible",{get:function(){return this.redoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(H.prototype,"undoStepCount",{get:function(){return this.undoStack.length},enumerable:!1,configurable:!0}),Object.defineProperty(H.prototype,"redoStepCount",{get:function(){return this.redoStack.length},enumerable:!1,configurable:!0}),H.prototype.addUndoStep=function(m){this.undoStack.length!==0&&JSON.stringify(this.undoStack[this.undoStack.length-1])===JSON.stringify(m)||(this.undoStack.push(m),JSON.stringify(this.lastRedoStep)!==JSON.stringify(m)&&this.redoStack.splice(0,this.redoStack.length))},H.prototype.replaceLastUndoStep=function(m){this.undoStack.length>0&&(this.undoStack[this.undoStack.length-1]=m)},H.prototype.getLastUndoStep=function(){return this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0},H.prototype.undo=function(){if(this.undoStack.length>1){var m=this.undoStack.pop();return m!==void 0&&this.redoStack.push(m),this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0}},H.prototype.redo=function(){return this.lastRedoStep=this.redoStack.pop(),this.lastRedoStep},H}(),At=function(H){function m(C,k,Z){var Q=H.call(this,C,k,Z)||this;return Q.strokeColor="transparent",Q.strokeWidth=0,Q.strokeDasharray="",Q.curveX=0,Q.curveY=0,Q.manipulationStartCurveX=0,Q.manipulationStartCurveY=0,Q.setStrokeColor=Q.setStrokeColor.bind(Q),Q.setStrokeWidth=Q.setStrokeWidth.bind(Q),Q.setStrokeDasharray=Q.setStrokeDasharray.bind(Q),Q.positionGrips=Q.positionGrips.bind(Q),Q.addControlGrips=Q.addControlGrips.bind(Q),Q.adjustVisual=Q.adjustVisual.bind(Q),Q.setupControlBox=Q.setupControlBox.bind(Q),Q.resize=Q.resize.bind(Q),Q.strokeColor=Z.defaultColor,Q.strokeWidth=Z.defaultStrokeWidth,Q.strokeDasharray=Z.defaultStrokeDasharray,Q.strokePanel=new ie("Line color",Z.defaultColorSet,Z.defaultColor),Q.strokePanel.onColorChanged=Q.setStrokeColor,Q.strokeWidthPanel=new rt("Line width",Z.defaultStrokeWidths,Z.defaultStrokeWidth),Q.strokeWidthPanel.onWidthChanged=Q.setStrokeWidth,Q.strokeStylePanel=new st("Line style",Z.defaultStrokeDasharrays,Z.defaultStrokeDasharray),Q.strokeStylePanel.onStyleChanged=Q.setStrokeDasharray,Q}return xe(m,H),m.prototype.ownsTarget=function(C){return!(!H.prototype.ownsTarget.call(this,C)&&C!==this.visual&&C!==this.selectorCurve&&C!==this.visibleCurve&&!this.curveGrip.ownsTarget(C))},m.prototype.getPathD=function(){return"M "+this.x1+" "+this.y1+" Q "+this.curveX+" "+this.curveY+", "+this.x2+" "+this.y2},m.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)},m.prototype.pointerDown=function(C,k){H.prototype.pointerDown.call(this,C,k),this.manipulationStartCurveX=this.curveX,this.manipulationStartCurveY=this.curveY,this.state==="new"&&(this.curveX=C.x,this.curveY=C.y),this.state==="new"?(this.createVisual(),this.adjustVisual(),this._state="creating"):this.curveGrip.ownsTarget(k)&&(this.activeGrip=this.curveGrip,this._state="resize")},m.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()]]))},m.prototype.setupControlBox=function(){H.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)},m.prototype.addControlGrips=function(){this.curveGrip=this.createGrip(),this.curveX=0,this.curveY=0,H.prototype.addControlGrips.call(this)},m.prototype.positionGrips=function(){H.prototype.positionGrips.call(this);var C=this.curveGrip.GRIP_SIZE;this.positionGrip(this.curveGrip.visual,this.curveX-C/2,this.curveY-C/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()))},m.prototype.manipulate=function(C){this.state==="move"&&(this.curveX=this.manipulationStartCurveX+C.x-this.manipulationStartX,this.curveY=this.manipulationStartCurveY+C.y-this.manipulationStartY),H.prototype.manipulate.call(this,C)},m.prototype.resize=function(C){this.activeGrip===this.curveGrip&&(this.curveX=C.x,this.curveY=C.y),H.prototype.resize.call(this,C),this.state==="creating"&&(this.curveX=this.x1+(this.x2-this.x1)/2,this.curveY=this.y1+(this.y2-this.y1)/2)},m.prototype.setStrokeColor=function(C){this.strokeColor=C,this.adjustVisual(),this.colorChanged(C)},m.prototype.setStrokeWidth=function(C){this.strokeWidth=C,this.adjustVisual()},m.prototype.setStrokeDasharray=function(C){this.strokeDasharray=C,this.adjustVisual()},m.prototype.scale=function(C,k){this.curveX=this.curveX*C,this.curveY=this.curveY*k,H.prototype.scale.call(this,C,k)},Object.defineProperty(m.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),m.prototype.getState=function(){var C=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,curveX:this.curveX,curveY:this.curveY},H.prototype.getState.call(this));return C.typeName=m.typeName,C},m.prototype.restoreState=function(C){H.prototype.restoreState.call(this,C);var k=C;this.strokeColor=k.strokeColor,this.strokeWidth=k.strokeWidth,this.strokeDasharray=k.strokeDasharray,this.curveX=k.curveX,this.curveY=k.curveY,this.createVisual(),this.adjustVisual()},m.typeName="CurveMarker",m.title="Curve marker",m.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>',m}(Ve),Bt=function(){function H(m,C){C===void 0&&(C=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=m,this.cancelable=C}return Object.defineProperty(H.prototype,"defaultPrevented",{get:function(){return this._defaultPrevented},enumerable:!1,configurable:!0}),H.prototype.preventDefault=function(){this._defaultPrevented=!0},H}(),St=function(H){function m(C,k,Z){var Q=H.call(this,C,!1)||this;return Q.dataUrl=k,Q.state=Z,Q}return xe(m,H),m}(Bt),it=function(H){function m(C,k,Z){Z===void 0&&(Z=!1);var Q=H.call(this,C,Z)||this;return Q.marker=k,Q}return xe(m,H),m}(Bt),Wt=function(){function H(){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 H.prototype.addEventListener=function(m,C){this[m].push(C)},H.prototype.removeEventListener=function(m,C){var k=this[m].indexOf(C);k>-1&&this[m].splice(k,1)},H}(),Qt=function(){function H(m){this.touchPoints=0,this._availableMarkerTypes=this.DEFAULT_MARKER_TYPES,this.mode="select",this.markers=[],this.isDragging=!1,this.renderEventListeners=[],this.closeEventListeners=[],this.settings=new De,this._isOpen=!1,this.undoRedoManager=new ft,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 Wt,this._silentRenderMode=!1,this._isFocused=!1,this._instanceNo=H.instanceCounter++,this.styles=new et(this.instanceNo),this.uiStyleSettings=this.styles.settings,this.target=m,this.targetRoot=document.body,this.width=m.clientWidth,this.height=m.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(H.prototype,"ALL_MARKER_TYPES",{get:function(){return[Te,Ce,ge,Pe,lt,Me,le,Re,qe,te,$e,At]},enumerable:!1,configurable:!0}),Object.defineProperty(H.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[Te,Ce,ge,Pe,Me,le,Re]},enumerable:!1,configurable:!0}),Object.defineProperty(H.prototype,"BASIC_MARKER_TYPES",{get:function(){return[Te,Ce,ge,Pe,le]},enumerable:!1,configurable:!0}),Object.defineProperty(H.prototype,"availableMarkerTypes",{get:function(){return this._availableMarkerTypes},set:function(m){var C=this;this._availableMarkerTypes.splice(0),m.forEach(function(k){if(typeof k=="string"){var Z=C.ALL_MARKER_TYPES.find(function(Q){return Q.typeName===k});Z!==void 0&&C._availableMarkerTypes.push(Z)}else C._availableMarkerTypes.push(k)})},enumerable:!1,configurable:!0}),Object.defineProperty(H.prototype,"currentMarker",{get:function(){return this._currentMarker},enumerable:!1,configurable:!0}),Object.defineProperty(H.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(H.prototype,"isUndoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isUndoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(H.prototype,"isRedoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isRedoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(H.prototype,"zoomLevel",{get:function(){return this._zoomLevel},set:function(m){this._zoomLevel=m,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(H.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),H.prototype.open=function(){this.setupResizeObserver(),this.setEditingTarget(),this.setTopLeft(),this.initMarkerCanvas(),this.initOverlay(),this.attachEvents(),this.settings.displayMode==="popup"&&this.onPopupTargetResize(),ze.isLicensed||this.addLogo(),this._isOpen=!0,this._isFocused=!0},H.prototype.show=function(){var m=this;this.styles.styleSheetRoot===void 0&&nt.styleSheetRoot!==void 0&&(this.styles.styleSheetRoot=nt.styleSheetRoot),this.setWindowHeight(),this.showUI(),this.open(),this.eventListeners.show.forEach(function(C){return C(new Bt(m))})},H.prototype.render=function(){return Ue(this,void 0,void 0,function(){var m;return Fe(this,function(C){switch(C.label){case 0:return this.setCurrentMarker(),(m=new at).naturalSize=this.renderAtNaturalSize,m.imageType=this.renderImageType,m.imageQuality=this.renderImageQuality,m.markersOnly=this.renderMarkersOnly,m.width=this.renderWidth,m.height=this.renderHeight,[4,m.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 1:return C.sent(),[4,m.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 2:return[2,C.sent()]}})})},H.prototype.close=function(m){var C=this;if(m===void 0&&(m=!1),this.isOpen){var k=!1;m||this.eventListeners.beforeclose.forEach(function(Z){var Q=new Bt(C,!0);Z(Q),Q.defaultPrevented&&(k=!0)}),k||(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 Bt(C))}),this.detachEvents(),this._isOpen=!1)}},H.prototype.addMarkersToToolbar=function(){for(var m,C=[],k=0;k<arguments.length;k++)C[k]=arguments[k];(m=this._availableMarkerTypes).push.apply(m,C)},H.prototype.addRenderEventListener=function(m){this.addEventListener("render",function(C){m(C.dataUrl,C.state)})},H.prototype.removeRenderEventListener=function(m){},H.prototype.addCloseEventListener=function(m){this.addEventListener("close",function(){m()})},H.prototype.removeCloseEventListener=function(m){},H.prototype.setupResizeObserver=function(){var m=this;this.settings.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){m.resize(m.target.clientWidth,m.target.clientHeight)}),this.targetObserver.observe(this.target)):this.settings.displayMode==="popup"&&(window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){return m.onPopupTargetResize()}),this.targetObserver.observe(this.editorCanvas)),window.addEventListener("resize",this.setWindowHeight))},H.prototype.onPopupTargetResize=function(){var m=1*this.target.clientWidth/this.target.clientHeight,C=this.editorCanvas.clientWidth/m>this.editorCanvas.clientHeight?this.editorCanvas.clientHeight*m:this.editorCanvas.clientWidth,k=C<this.editorCanvas.clientWidth?this.editorCanvas.clientHeight:this.editorCanvas.clientWidth/m;this.resize(C,k)},H.prototype.setWindowHeight=function(){this.windowHeight=window.innerHeight},H.prototype.resize=function(m,C){this._isResizing=!0;var k=m/this.imageWidth,Z=C/this.imageHeight;this.imageWidth=Math.round(m),this.imageHeight=Math.round(C),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(k,Z),this._isResizing=!1},H.prototype.scaleMarkers=function(m,C){var k,Z=this;this._currentMarker&&this._currentMarker instanceof Pe?this._currentMarker.scale(m,C):(k=this._currentMarker,this.setCurrentMarker()),this.markers.forEach(function(Q){Q!==Z._currentMarker&&Q.scale(m,C)}),k!==void 0&&this.setCurrentMarker(k)},H.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"},H.prototype.setTopLeft=function(){var m=this.editingTarget.getBoundingClientRect(),C=this.editorCanvas.getBoundingClientRect();this.left=m.left-C.left,this.top=m.top-C.top},H.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)},H.prototype.addDefs=function(){for(var m,C=[],k=0;k<arguments.length;k++)C[k]=arguments[k];this.defs=ve.createDefs(),this.addDefsToImage(),(m=this.defs).append.apply(m,C)},H.prototype.addDefsToImage=function(){this.defs&&this.markerImage.insertBefore(this.defs,this.markerImage.firstChild)},H.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)},H.prototype.positionMarkerImage=function(){this.markerImageHolder.style.top=this.top/this.zoomLevel+"px",this.markerImageHolder.style.left=this.left/this.zoomLevel+"px"},H.prototype.attachEvents=function(){this.markerImage.addEventListener("pointerdown",this.onPointerDown),this.markerImage.addEventListener("dblclick",this.onDblClick),this.attachWindowEvents()},H.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)},H.prototype.detachEvents=function(){this.markerImage.removeEventListener("pointerdown",this.onPointerDown),this.markerImage.removeEventListener("dblclick",this.onDblClick),this.detachWindowEvents()},H.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)},H.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 m=document.createElement("a");m.href="https://markerjs.com/",m.target="_blank",m.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>',m.title="Powered by marker.js",m.style.display="grid",m.style.alignItems="center",m.style.justifyItems="center",m.style.padding="3px",m.style.width="20px",m.style.height="20px",this.logoUI.appendChild(m),this.editorCanvas.appendChild(this.logoUI),this.logoUI.style.position="absolute",this.logoUI.style.pointerEvents="all",this.positionLogo()},H.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")},H.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"},H.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},H.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 m=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=m+"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 z(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 Y(this.uiDiv,this.settings.displayMode,this.uiStyleSettings,this.styles),this.toolbox.show(this._silentRenderMode||this.uiStyleSettings.hideToolbox?"hidden":"visible")},H.prototype.closeUI=function(){this.settings.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},H.prototype.removeMarker=function(m){this.markerImage.removeChild(m.container),this.markers.indexOf(m)>-1&&this.markers.splice(this.markers.indexOf(m),1),m.dispose()},H.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())},H.prototype.toolbarButtonClicked=function(m,C){if(m==="marker"&&C!==void 0)this.createNewMarker(C);else if(m==="action")switch(C){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()}},H.prototype.deleteSelectedMarker=function(){var m=this;if(this._currentMarker!==void 0){var C=!1;if(this.eventListeners.markerbeforedelete.forEach(function(Z){var Q=new it(m,m._currentMarker,!0);Z(Q),Q.defaultPrevented&&(C=!0)}),!C){var k=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 it(m,k))})}}},H.prototype.clear=function(){var m=this,C=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach(function(ye){var Qe=new it(m,void 0,!0);ye(Qe),Qe.defaultPrevented&&(C=!0)}),!C)){this.setCurrentMarker();for(var k=function(ye){var Qe=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(Be){return Be(new it(m,Qe))})},Z=this,Q=this.markers.length-1;Q>=0;Q--)k(Q);this.addUndoStep()}},Object.defineProperty(H.prototype,"isNotesAreaOpen",{get:function(){return this.notesArea!==void 0},enumerable:!1,configurable:!0}),H.prototype.showNotesEditor=function(){var m;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=(m=this._currentMarker.notes)!==null&&m!==void 0?m:"",this.overlayContainer.appendChild(this.notesArea))},H.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)},H.prototype.selectLastMarker=function(){this.markers.length>0?this.setCurrentMarker(this.markers[this.markers.length-1]):this.setCurrentMarker()},H.prototype.addUndoStep=function(){var m=this;if(this._currentMarker===void 0||this._currentMarker.state!=="edit"){var C=this.getState(),k=this.undoRedoManager.getLastUndoStep();if(!k||k.width===C.width&&k.height===C.height){var Z=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep(C),Z<this.undoRedoManager.undoStepCount&&this.eventListeners.statechange.forEach(function(Q){return Q(new Bt(m))})}else this.undoRedoManager.replaceLastUndoStep(C),this.eventListeners.statechange.forEach(function(Q){return Q(new Bt(m))})}},H.prototype.undo=function(){this.switchToSelectMode(),this.addUndoStep(),this.undoStep()},H.prototype.undoStep=function(){var m=this,C=this.undoRedoManager.undo();C!==void 0&&(this.restoreState(C),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(k){return k(new Bt(m))}))},H.prototype.redo=function(){this.switchToSelectMode(),this.redoStep()},H.prototype.redoStep=function(){var m=this,C=this.undoRedoManager.redo();C!==void 0&&(this.restoreState(C),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(k){return k(new Bt(m))}))},H.prototype.stepZoom=function(){var m=this.zoomSteps.indexOf(this.zoomLevel);this.zoomLevel=m<this.zoomSteps.length-1?this.zoomSteps[m+1]:this.zoomSteps[0]},H.prototype.panTo=function(m){this.contentDiv.scrollBy({left:this.prevPanPoint.x-m.x,top:this.prevPanPoint.y-m.y}),this.prevPanPoint=m},H.prototype.startRenderAndClose=function(){return Ue(this,void 0,void 0,function(){var m,C,k=this;return Fe(this,function(Z){switch(Z.label){case 0:return[4,this.render()];case 1:return m=Z.sent(),C=this.getState(),this.eventListeners.render.forEach(function(Q){return Q(new St(k,m,C))}),this.close(!0),[2]}})})},H.prototype.getState=function(m){m===!0&&this.setCurrentMarker();var C={width:this.imageWidth,height:this.imageHeight,markers:[]};return this.markers.forEach(function(k){return C.markers.push(k.getState())}),C},H.prototype.restoreState=function(m){var C=this;for(this.markers.splice(0);this.markerImage.lastChild;)this.markerImage.removeChild(this.markerImage.lastChild);m.markers.forEach(function(k){var Z=C._availableMarkerTypes.find(function(ye){return ye.typeName===k.typeName});if(Z!==void 0){var Q=C.addNewMarker(Z);Q.restoreState(k),C.markers.push(Q)}}),m.width&&m.height&&(m.width!==this.imageWidth||m.height!==this.imageHeight)&&this.scaleMarkers(this.imageWidth/m.width,this.imageHeight/m.height),this.eventListeners.restorestate.forEach(function(k){return k(new Bt(C))})},H.prototype.addNewMarker=function(m){var C=ve.createGroup();return this.markerImage.appendChild(C),new m(C,this.overlayContainer,this.settings)},H.prototype.createNewMarker=function(m){var C,k=this;(C=typeof m=="string"?this._availableMarkerTypes.find(function(Z){return Z.typeName===m}):m)&&(this.setCurrentMarker(),this.addUndoStep(),this._currentMarker=this.addNewMarker(C),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(C.typeName),this.toolbox.setPanelButtons(this._currentMarker.toolboxPanels),this.eventListeners.markercreating.forEach(function(Z){return Z(new it(k,k._currentMarker))}))},H.prototype.markerCreated=function(m){var C=this;this.mode="select",this.markerImage.style.cursor="default",this.markers.push(m),this.setCurrentMarker(m),m instanceof Ce&&this.settings.newFreehandMarkerOnPointerUp?this.createNewMarker(Ce):this.toolbar.setSelectMode(),this.addUndoStep(),this.eventListeners.markercreate.forEach(function(k){return k(new it(C,C._currentMarker))})},H.prototype.colorChanged=function(m){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultColor=m,this.settings.defaultStrokeColor=m)},H.prototype.fillColorChanged=function(m){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultFillColor=m)},H.prototype.markerStateChanged=function(m){var C=this;this.eventListeners.markerchange.forEach(function(k){return k(new it(C,m))})},H.prototype.setCurrentMarker=function(m){var C=this;this._currentMarker!==m&&this._currentMarker!==void 0&&(this._currentMarker.deselect(),this.toolbar.setCurrentMarker(),this.toolbox.setPanelButtons([]),this._isResizing||this.eventListeners.markerdeselect.forEach(function(k){return k(new it(C,C._currentMarker))})),this._currentMarker=m,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(k){return k(new it(C,C._currentMarker))}))},H.prototype.onPointerDown=function(m){if(this._isFocused||this.focus(),this.touchPoints++,this.touchPoints===1||m.pointerType!=="touch")if(this._currentMarker===void 0||this._currentMarker.state!=="new"&&this._currentMarker.state!=="creating"){if(this.mode==="select"){var C=this.markers.find(function(k){return k.ownsTarget(m.target)});C!==void 0?(this.setCurrentMarker(C),this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(m.clientX,m.clientY),m.target)):(this.setCurrentMarker(),this.isDragging=!0,this.prevPanPoint={x:m.clientX,y:m.clientY})}}else this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(m.clientX,m.clientY))},H.prototype.onDblClick=function(m){if(this._isFocused||this.focus(),this.mode==="select"){var C=this.markers.find(function(k){return k.ownsTarget(m.target)});C!==void 0&&C!==this._currentMarker&&this.setCurrentMarker(C),this._currentMarker!==void 0?this._currentMarker.dblClick(this.clientToLocalCoordinates(m.clientX,m.clientY),m.target):this.setCurrentMarker()}},H.prototype.onPointerMove=function(m){this.touchPoints!==1&&m.pointerType==="touch"||(this._currentMarker!==void 0||this.isDragging)&&(this._currentMarker!==void 0&&this._currentMarker.state==="edit"||m.preventDefault(),this._currentMarker!==void 0?this._currentMarker.manipulate(this.clientToLocalCoordinates(m.clientX,m.clientY)):this.zoomLevel>1&&this.panTo({x:m.clientX,y:m.clientY}))},H.prototype.onPointerUp=function(m){this.touchPoints>0&&this.touchPoints--,this.touchPoints===0&&this.isDragging&&this._currentMarker!==void 0&&this._currentMarker.pointerUp(this.clientToLocalCoordinates(m.clientX,m.clientY)),this.isDragging=!1,this.addUndoStep()},H.prototype.onPointerOut=function(){this.touchPoints>0&&this.touchPoints--},H.prototype.onKeyUp=function(m){this._currentMarker===void 0||this.notesArea!==void 0||m.key!=="Delete"&&m.key!=="Backspace"||this.deleteSelectedMarker()},H.prototype.clientToLocalCoordinates=function(m,C){var k=this.markerImage.getBoundingClientRect();return{x:(m-k.left)/this.zoomLevel,y:(C-k.top)/this.zoomLevel}},H.prototype.onWindowResize=function(){this.positionUI()},H.prototype.positionUI=function(){switch(this.setTopLeft(),this.settings.displayMode){case"inline":var m=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=m+"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()},H.prototype.addLicenseKey=function(m){ze.addKey(m)},H.prototype.addEventListener=function(m,C){this.eventListeners.addEventListener(m,C)},H.prototype.removeEventListener=function(m,C){this.eventListeners.removeEventListener(m,C)},H.prototype.renderState=function(m){this._silentRenderMode=!0,this.settings.displayMode="inline",this.isOpen||this.show(),this.restoreState(m),this.startRenderAndClose(),this._silentRenderMode=!1},Object.defineProperty(H.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),H.prototype.focus=function(){var m=this;this._isFocused||(this.attachWindowEvents(),this._isFocused=!0,this._previousCurrentMarker!==void 0&&this.setCurrentMarker(this._previousCurrentMarker),this.eventListeners.focus.forEach(function(C){return C(new Bt(m))}))},H.prototype.blur=function(){var m=this;this._isFocused&&(this.detachWindowEvents(),this._isFocused=!1,this._previousCurrentMarker=this._currentMarker,this.setCurrentMarker(),this.eventListeners.blur.forEach(function(C){return C(new Bt(m))}))},H.instanceCounter=0,H}();/* **********************************
|
|
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 It=function(H,m){return(It=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(C,k){C.__proto__=k}||function(C,k){for(var Z in k)Object.prototype.hasOwnProperty.call(k,Z)&&(C[Z]=k[Z])})(H,m)};function qt(H,m){if(typeof m!="function"&&m!==null)throw new TypeError("Class extends value "+String(m)+" is not a constructor or null");function C(){this.constructor=H}It(H,m),H.prototype=m===null?Object.create(m):(C.prototype=m.prototype,new C)}function Ft(H,m,C,k){return new(C||(C=Promise))(function(Z,Q){function ye(ot){try{Be(k.next(ot))}catch(Xe){Q(Xe)}}function Qe(ot){try{Be(k.throw(ot))}catch(Xe){Q(Xe)}}function Be(ot){var Xe;ot.done?Z(ot.value):(Xe=ot.value,Xe instanceof C?Xe:new C(function(mt){mt(Xe)})).then(ye,Qe)}Be((k=k.apply(H,m||[])).next())})}function rr(H,m){var C,k,Z,Q,ye={label:0,sent:function(){if(1&Z[0])throw Z[1];return Z[1]},trys:[],ops:[]};return Q={next:Qe(0),throw:Qe(1),return:Qe(2)},typeof Symbol=="function"&&(Q[Symbol.iterator]=function(){return this}),Q;function Qe(Be){return function(ot){return function(Xe){if(C)throw new TypeError("Generator is already executing.");for(;ye;)try{if(C=1,k&&(Z=2&Xe[0]?k.return:Xe[0]?k.throw||((Z=k.return)&&Z.call(k),0):k.next)&&!(Z=Z.call(k,Xe[1])).done)return Z;switch(k=0,Z&&(Xe=[2&Xe[0],Z.value]),Xe[0]){case 0:case 1:Z=Xe;break;case 4:return ye.label++,{value:Xe[1],done:!1};case 5:ye.label++,k=Xe[1],Xe=[0];continue;case 7:Xe=ye.ops.pop(),ye.trys.pop();continue;default:if(!(Z=ye.trys,(Z=Z.length>0&&Z[Z.length-1])||Xe[0]!==6&&Xe[0]!==2)){ye=0;continue}if(Xe[0]===3&&(!Z||Xe[1]>Z[0]&&Xe[1]<Z[3])){ye.label=Xe[1];break}if(Xe[0]===6&&ye.label<Z[1]){ye.label=Z[1],Z=Xe;break}if(Z&&ye.label<Z[2]){ye.label=Z[2],ye.ops.push(Xe);break}Z[2]&&ye.ops.pop(),ye.trys.pop();continue}Xe=m.call(H,ye)}catch(mt){Xe=[6,mt],k=0}finally{C=Z=0}if(5&Xe[0])throw Xe[1];return{value:Xe[0]?Xe[1]:void 0,done:!0}}([Be,ot])}}}var kt=function(){function H(){}return H.addKey=function(m){H.key=m},Object.defineProperty(H,"isLicensed",{get:function(){return!!H.key&&new RegExp(/^CRPR-[A-Z][0-9]{3}-[A-Z][0-9]{3}-[0-9]{4}$/,"i").test(H.key)},enumerable:!1,configurable:!0}),H}(),ut=function(){function H(){}return H.createDefs=function(){return document.createElementNS("http://www.w3.org/2000/svg","defs")},H.setAttributes=function(m,C){for(var k=0,Z=C;k<Z.length;k++){var Q=Z[k],ye=Q[0],Qe=Q[1];m.setAttribute(ye,Qe)}},H.createRect=function(m,C,k){var Z=document.createElementNS("http://www.w3.org/2000/svg","rect");return Z.setAttribute("width",m.toString()),Z.setAttribute("height",C.toString()),k&&H.setAttributes(Z,k),Z},H.createLine=function(m,C,k,Z,Q){var ye=document.createElementNS("http://www.w3.org/2000/svg","line");return ye.setAttribute("x1",m.toString()),ye.setAttribute("y1",C.toString()),ye.setAttribute("x2",k.toString()),ye.setAttribute("y2",Z.toString()),Q&&H.setAttributes(ye,Q),ye},H.createPolygon=function(m,C){var k=document.createElementNS("http://www.w3.org/2000/svg","polygon");return k.setAttribute("points",m),C&&H.setAttributes(k,C),k},H.createCircle=function(m,C){var k=document.createElementNS("http://www.w3.org/2000/svg","circle");return k.setAttribute("cx",(m/2).toString()),k.setAttribute("cy",(m/2).toString()),k.setAttribute("r",m.toString()),C&&H.setAttributes(k,C),k},H.createEllipse=function(m,C,k){var Z=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return Z.setAttribute("cx",(m/2).toString()),Z.setAttribute("cy",(C/2).toString()),Z.setAttribute("rx",(m/2).toString()),Z.setAttribute("ry",(C/2).toString()),k&&H.setAttributes(Z,k),Z},H.createGroup=function(m){var C=document.createElementNS("http://www.w3.org/2000/svg","g");return m&&H.setAttributes(C,m),C},H.createTransform=function(){return document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGTransform()},H.createMarker=function(m,C,k,Z,Q,ye,Qe){var Be=document.createElementNS("http://www.w3.org/2000/svg","marker");return H.setAttributes(Be,[["id",m],["orient",C],["markerWidth",k.toString()],["markerHeight",Z.toString()],["refX",Q.toString()],["refY",ye.toString()]]),Be.appendChild(Qe),Be},H.createText=function(m){var C=document.createElementNS("http://www.w3.org/2000/svg","text");return C.setAttribute("x","0"),C.setAttribute("y","0"),m&&H.setAttributes(C,m),C},H.createTSpan=function(m,C){var k=document.createElementNS("http://www.w3.org/2000/svg","tspan");return k.textContent=m,C&&H.setAttributes(k,C),k},H.createImage=function(m){var C=document.createElementNS("http://www.w3.org/2000/svg","image");return m&&H.setAttributes(C,m),C},H.createPoint=function(m,C){var k=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return k.x=m,k.y=C,k},H.createPath=function(m,C){var k=document.createElementNS("http://www.w3.org/2000/svg","path");return k.setAttribute("d",m),C&&H.setAttributes(k,C),k},H.createElement=function(m,C){var k=document.createElementNS("http://www.w3.org/2000/svg",m);return C&&H.setAttributes(k,C),k},H.getHollowRectanglePath=function(m,C,k,Z,Q,ye,Qe,Be){return"M"+m+","+C+"V"+(C+Z)+"H"+(m+k)+"V"+C+"H"+Q+"V"+ye+"H"+(Q+Qe)+"V"+(ye+Be)+"H"+Q+"V"+C+"Z"},H}(),lr=function(){function H(m){this._classNamePrefixBase="__cropro_",this.classes=[],this.rules=[],this.settings=this.defaultSettings,this._classNamePrefix=this._classNamePrefixBase+"_"+m+"_"}return Object.defineProperty(H.prototype,"classNamePrefixBase",{get:function(){return this._classNamePrefixBase},enumerable:!1,configurable:!0}),Object.defineProperty(H.prototype,"classNamePrefix",{get:function(){return this._classNamePrefix},enumerable:!1,configurable:!0}),Object.defineProperty(H.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(H.prototype,"fadeInAnimationClassName",{get:function(){return this.classNamePrefix+"_fade_in"},enumerable:!1,configurable:!0}),Object.defineProperty(H.prototype,"fadeOutAnimationClassName",{get:function(){return this.classNamePrefix+"_fade_out"},enumerable:!1,configurable:!0}),H.prototype.addClass=function(m){return this.styleSheet===void 0&&this.addStyleSheet(),m.name=""+this.classNamePrefix+m.localName,this.classes.push(m),this.styleSheet.sheet.insertRule("."+m.name+" {"+m.style+"}",this.styleSheet.sheet.cssRules.length),m},H.prototype.addRule=function(m){this.styleSheet===void 0&&this.addStyleSheet(),this.rules.push(m),this.styleSheet.sheet.insertRule(m.selector+" {"+m.style+"}",this.styleSheet.sheet.cssRules.length)},H.prototype.addStyleSheet=function(){var m;this.styleSheet=document.createElement("style"),((m=this.styleSheetRoot)!==null&&m!==void 0?m:document.head).appendChild(this.styleSheet),this.addRule(new wt("."+this.classNamePrefix+" h3","font-family: sans-serif")),this.addRule(new wt("@keyframes "+this.classNamePrefix+"_fade_in_animation_frames",`
|
|
from {
|
|
opacity: 0;
|
|
}
|
|
to {
|
|
opacity: 1;
|
|
}
|
|
`)),this.addRule(new wt("@keyframes "+this.classNamePrefix+"_fade_out_animation_frames",`
|
|
from {
|
|
opacity: 1;
|
|
}
|
|
to {
|
|
opacity: 0;
|
|
}
|
|
`)),this.addClass(new dt("_fade_in",`
|
|
animation-duration: 0.3s;
|
|
animation-name: `+this.classNamePrefix+`_fade_in_animation_frames;
|
|
`)),this.addClass(new dt("_fade_out",`
|
|
animation-duration: 0.3s;
|
|
animation-name: `+this.classNamePrefix+`_fade_out_animation_frames;
|
|
`))},H.prototype.removeStyleSheet=function(){var m;this.styleSheet&&(((m=this.styleSheetRoot)!==null&&m!==void 0?m:document.head).removeChild(this.styleSheet),this.styleSheet=void 0)},H}(),wt=function(H,m){this.selector=H,this.style=m},dt=function(H,m){this.localName=H,this.style=m},Dt=function(){function H(){this.blocks=[],this.display=""}return H.prototype.addButtonBlock=function(m){m.className=this.blockClassName,m.buttonClassName=this.buttonClassName,m.buttonColorsClassName=this.buttonColorsClassName,m.buttonActiveColorsClassName=this.buttonActiveColorsClassName,this.blocks.push(m)},H.prototype.addElementBlock=function(m){m.className===void 0&&(m.className=this.blockClassName),this.blocks.push(m)},H.prototype.getUI=function(){var m=document.createElement("div");return m.className=this.className+" "+this.colorsClassName+" "+this.fadeInClassName,m.style.display=this.display,this.blocks.forEach(function(C){return m.appendChild(C.getUI())}),m},H}(),dr=function(){function H(){}return H.prototype.getUI=function(){var m=document.createElement("div");if(m.className=this.className,this.minWidth!==void 0&&(m.style.minWidth=this.minWidth),this.contentAlign!==void 0)switch(this.contentAlign){case"start":m.style.justifyContent="flex-start";break;case"center":m.style.justifyContent="center";break;case"end":m.style.justifyContent="flex-end"}return m.style.whiteSpace="nowrap",m},H}(),xr=function(H){function m(){var C=H!==null&&H.apply(this,arguments)||this;return C.buttons=[],C}return qt(m,H),m.prototype.addButton=function(C){C.className=this.buttonClassName,C.colorsClassName=this.buttonColorsClassName,C.activeColorsClassName=this.buttonActiveColorsClassName,this.buttons.push(C)},m.prototype.getUI=function(){var C=H.prototype.getUI.call(this);return this.buttons.forEach(function(k){return C.appendChild(k.getUI())}),C},m}(dr),Tr=function(){function H(m,C){this._isActive=!1,this._isHidden=!1,this._icon=m,this.title=C,this.uiContainer=document.createElement("div"),this.adjustClassName=this.adjustClassName.bind(this)}return Object.defineProperty(H.prototype,"icon",{get:function(){return this._icon},set:function(m){this._icon=m,this.buttonContainer.innerHTML=this._icon},enumerable:!1,configurable:!0}),Object.defineProperty(H.prototype,"isActive",{get:function(){return this._isActive},set:function(m){this._isActive=m,this.adjustClassName()},enumerable:!1,configurable:!0}),H.prototype.getUI=function(){var m=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 m.onClick()}),this.uiContainer.appendChild(this.buttonContainer),this.uiContainer.style.display=this._isHidden?"none":"inline-block",this.uiContainer},H.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,"")))},H.prototype.hide=function(){this._isHidden=!0},H}(),Pr=function(H){function m(){var C=H!==null&&H.apply(this,arguments)||this;return C.elements=[],C}return qt(m,H),m.prototype.addElement=function(C){this.elements.push(C)},m.prototype.getUI=function(){var C=H.prototype.getUI.call(this);return this.elements.forEach(function(k){return C.appendChild(k)}),C},m}(dr),kr=function(){function H(m,C){this.horizontal=m,this.vertical=C}return Object.defineProperty(H.prototype,"ratio",{get:function(){return 1*this.horizontal/this.vertical},enumerable:!1,configurable:!0}),H.prototype.getVerticalLength=function(m){return m/this.ratio},H.prototype.getHorizontalLength=function(m){return m*this.ratio},H}(),Gt=function(){function H(){}return H.getIcon=function(m,C){if(m>0&&C>0){var k=new kr(m,C),Z=k.ratio>=1?20:k.getHorizontalLength(20),Q=k.ratio<1?20:k.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 Qe=ut.createDefs();ye.appendChild(Qe);var Be=ut.createElement("clipPath",[["id","text-bg-clip"]]);Qe.appendChild(Be);var ot=ut.createPath(ut.getHollowRectanglePath((24-Z)/2,(24-Q)/2,Z,Q,(24-Z)/2+2,(24-Q)/2+2,Z-4,Q-4));ye.appendChild(ot);var Xe=ut.createText([["x","0"],["y","0"],["font-size","7px"],["font-family","monospace"]]);Xe.appendChild(ut.createTSpan(m+":"+C)),ye.appendChild(Xe);var mt=Xe.getBBox();ut.setAttributes(Xe,[["x",((24-mt.width)/2).toString()],["y",((24-mt.height)/2-mt.y).toString()]]);var pt=ut.createPath(ut.getHollowRectanglePath(0,0,24,24,(24-Math.ceil(mt.width))/2,(24-Math.ceil(mt.height))/2,Math.ceil(mt.width),Math.ceil(mt.height)));return Be.appendChild(pt),ut.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>'},H}(),fr=function(H){function m(C,k,Z){var Q=H.call(this,C,k)||this;return Q.isDropdownOpen=!1,Q.onClick=Q.dropdownButtonClicked,Q.dropdownButtons=Z,Q}return qt(m,H),m.prototype.setupDropdown=function(){var C=this;this.dropdownBlock=document.createElement("div"),this.dropdownBlock.className=this.dropdownClassName+" "+this.dropdownColorsClassName,this.dropdownBlock.style.display="none",this.dropdownButtons.forEach(function(k){k.className=C.className,k.colorsClassName=C.colorsClassName,C.dropdownBlock.appendChild(k.getUI())}),this.uiContainer.appendChild(this.dropdownBlock)},m.prototype.positionDropdown=function(){this.dropdownBlock.style.left=this.uiContainer.clientLeft+"px",this.dropdownBlock.style.top=this.uiContainer.clientTop+this.uiContainer.clientHeight+"px"},m.prototype.dropdownButtonClicked=function(){this.dropdownBlock===void 0&&this.setupDropdown(),this.isDropdownOpen=!this.isDropdownOpen,this.toggleDropdown()},m.prototype.toggleDropdown=function(){this.positionDropdown(),this.dropdownBlock.style.display=this.isDropdownOpen?"inline-block":"none"},m.prototype.showDropdown=function(){this.isDropdownOpen=!0,this.toggleDropdown()},m.prototype.hideDropdown=function(){this.isDropdownOpen=!1,this.toggleDropdown()},m}(Tr),Qr=function(){function H(m,C){this.GRIP_SIZE=10,this.color=m,this.fillColor=C,this.visual=ut.createGroup(),this.visual.appendChild(ut.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(ut.createCircle(this.GRIP_SIZE,[["fill",this.fillColor],["fill-opacity","0.9"],["stroke",this.color],["stroke-width","2"],["stroke-opacity","0.7"]]))}return H.prototype.ownsTarget=function(m){return m===this.visual||m===this.visual.childNodes[0]||m===this.visual.childNodes[1]},H.prototype.setCenter=function(m,C){this.visual.childNodes.forEach(function(k){return ut.setAttributes(k,[["cx",m.toString()],["cy",C.toString()]])})},H}(),pr=function(){function H(m,C,k,Z){this.isMoving=!1,this._isGridVisible=!0,this.numberOfGridLines=2,this.horizontalGridLines=[],this.verticalGridLines=[],this._zoomFactor=1,this.cropRectChanged=!1,this.canvasWidth=m,this.canvasHeight=C,this.margin=k,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(H.prototype,"aspectRatio",{get:function(){return this._aspectRatio},set:function(m){this._aspectRatio=m,this.adjustCropRect(),this.setCropRectangle(this.cropRect)},enumerable:!1,configurable:!0}),Object.defineProperty(H.prototype,"isGridVisible",{get:function(){return this._isGridVisible},set:function(m){this._isGridVisible=m,this.gridContainer&&ut.setAttributes(this.gridContainer,[["display",this._isGridVisible?"":"none"]])},enumerable:!1,configurable:!0}),Object.defineProperty(H.prototype,"zoomFactor",{get:function(){return this._zoomFactor},set:function(m){this._zoomFactor=m,this.setCropRectangle(this.cropRect)},enumerable:!1,configurable:!0}),H.prototype.open=function(){var m=this;this.cropShadeElement=ut.createPath("M0,0Z",[["fill",this.cropShadeColor],["fill-opacity","0.8"]]),this.container.appendChild(this.cropShadeElement),this.gridContainer=ut.createGroup([["display",this.isGridVisible?"":"none"]]),this.container.appendChild(this.gridContainer);for(var C=0;C<this.numberOfGridLines;C++)this.horizontalGridLines.push(ut.createLine(0,0,0,0,[["stroke",this.cropFrameColor],["stroke-width","1"],["stroke-dasharray","3 1"],["opacity","0.7"]])),this.verticalGridLines.push(ut.createLine(0,0,0,0,[["stroke",this.cropFrameColor],["stroke-width","1"],["stroke-dasharray","3 1"],["opacity","0.7"]]));this.horizontalGridLines.forEach(function(k){return m.gridContainer.appendChild(k)}),this.verticalGridLines.forEach(function(k){return m.gridContainer.appendChild(k)}),this.cropRectElement=ut.createRect(0,0,[["stroke",this.cropFrameColor],["stroke-width","3"],["fill","transparent"]]),this.container.appendChild(this.cropRectElement),this.topLeftGrip=new Qr(this.gripColor,this.gripFillColor),this.container.appendChild(this.topLeftGrip.visual),this.topRightGrip=new Qr(this.gripColor,this.gripFillColor),this.container.appendChild(this.topRightGrip.visual),this.bottomLeftGrip=new Qr(this.gripColor,this.gripFillColor),this.container.appendChild(this.bottomLeftGrip.visual),this.bottomRightGrip=new Qr(this.gripColor,this.gripFillColor),this.container.appendChild(this.bottomRightGrip.visual),this.attachEvents()},H.prototype.setCropRectangle=function(m){this.cropRect=m;var C=Object.assign({},this.cropRect);this.zoomFactor!==1&&(C.width=this.cropRect.width*this.zoomFactor,C.height=this.cropRect.height*this.zoomFactor,C.x=this.cropRect.height/this.cropRect.width<this.canvasHeight/this.canvasWidth?this.margin:this.margin+this.canvasWidth/2-C.width/2,C.y=this.cropRect.height/this.cropRect.width>this.canvasHeight/this.canvasWidth?this.margin:this.margin+this.canvasHeight/2-C.height/2),ut.setAttributes(this.cropRectElement,[["x",C.x.toString()],["y",C.y.toString()],["width",C.width.toString()],["height",C.height.toString()]]);var k=C.height/(this.numberOfGridLines+1);this.horizontalGridLines.forEach(function(Q,ye){var Qe=C.y+k*(ye+1);ut.setAttributes(Q,[["x1",""+C.x],["y1",""+Qe],["x2",""+(C.x+C.width)],["y2",""+Qe]])});var Z=C.width/(this.numberOfGridLines+1);this.verticalGridLines.forEach(function(Q,ye){var Qe=C.x+Z*(ye+1);ut.setAttributes(Q,[["x1",""+Qe],["y1",""+C.y],["x2",""+Qe],["y2",""+(C.y+C.height)]])}),ut.setAttributes(this.cropShadeElement,[["d",ut.getHollowRectanglePath(0,0,this.canvasWidth+2*this.margin,this.canvasHeight+2*this.margin,C.x,C.y,C.width,C.height)]]),this.topLeftGrip.setCenter(C.x,C.y),this.topRightGrip.setCenter(C.x+C.width,C.y),this.bottomLeftGrip.setCenter(C.x,C.y+C.height),this.bottomRightGrip.setCenter(C.x+C.width,C.y+C.height),this.cropRectChanged&&this.onCropChange&&(this.cropRectChanged=!1,this.onCropChange(this.cropRect)),this.cropRectChanged=!1},H.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)},H.prototype.clientToLocalCoordinates=function(m,C){var k=this.container.getBoundingClientRect();return{x:m-k.left+this.margin,y:C-k.top+this.margin}},H.prototype.onPointerDown=function(m){this.container.setPointerCapture(m.pointerId),this.previousPoint=this.clientToLocalCoordinates(m.clientX,m.clientY),this.cropRectElement===m.target?this.isMoving=!0:this.topLeftGrip.ownsTarget(m.target)?this.activeGrip=this.topLeftGrip:this.bottomLeftGrip.ownsTarget(m.target)?this.activeGrip=this.bottomLeftGrip:this.topRightGrip.ownsTarget(m.target)?this.activeGrip=this.topRightGrip:this.bottomRightGrip.ownsTarget(m.target)&&(this.activeGrip=this.bottomRightGrip)},H.prototype.onPointerMove=function(m){if(this.isMoving)this.move(this.clientToLocalCoordinates(m.clientX,m.clientY));else if(this.activeGrip){var C=this.clientToLocalCoordinates(m.clientX,m.clientY);this.resize(C)}m.preventDefault()},H.prototype.onPointerUp=function(m){this.activeGrip=void 0,this.isMoving=!1,this.container.releasePointerCapture(m.pointerId)},H.prototype.move=function(m){var C=m.x-this.previousPoint.x,k=m.y-this.previousPoint.y;this.zoomFactor!==1&&(C=-C/this.zoomFactor,k=-k/this.zoomFactor),this.cropRect.x=Math.min(Math.max(this.margin,this.cropRect.x+C),this.canvasWidth-this.cropRect.width+this.margin),this.cropRect.y=Math.min(Math.max(this.margin,this.cropRect.y+k),this.canvasHeight-this.cropRect.height+this.margin),this.onCropChange?(this.cropRectChanged=!0,this.onCropChange(this.cropRect)):this.setCropRectangle(this.cropRect),this.previousPoint=m},H.prototype.resize=function(m){var C=Object.assign({},this.cropRect),k=m.x-this.previousPoint.x,Z=m.y-this.previousPoint.y;switch(this.activeGrip){case this.bottomLeftGrip:case this.topLeftGrip:C.x+k<this.margin&&(k=this.margin-C.x),C.x+=k,C.width=this.cropRect.x+this.cropRect.width-C.x;break;case this.bottomRightGrip:case this.topRightGrip:C.width+k>this.canvasWidth*this.zoomFactor&&(k=this.canvasWidth*this.zoomFactor-C.width),C.width+=k}switch(this.activeGrip){case this.topLeftGrip:case this.topRightGrip:this.aspectRatio?(C.y=this.cropRect.y-(this.activeGrip===this.topLeftGrip?-1:1)*this.aspectRatio.getVerticalLength(k),C.height=this.aspectRatio.getVerticalLength(C.width)):(C.y+=Z,C.height=this.cropRect.y+this.cropRect.height-C.y);break;case this.bottomLeftGrip:case this.bottomRightGrip:this.aspectRatio?C.height=this.aspectRatio.getVerticalLength(C.width):C.height+=Z}C.width<10&&(C.x=this.cropRect.x,C.width=10),C.height<10&&(C.y=this.cropRect.y,C.height=10),this.previousPoint=m,C.x>=this.margin&&C.y>=this.margin&&C.x-this.margin+C.width<=this.canvasWidth&&C.y-this.margin+C.height<=this.canvasHeight&&(this.cropRect=C,this.onCropChange?(this.cropRectChanged=!0,this.onCropChange(this.cropRect)):this.setCropRectangle(this.cropRect))},H.prototype.adjustCropRect=function(){if(this.aspectRatio&&Math.round(this.cropRect.height)!==Math.round(this.aspectRatio.getVerticalLength(this.cropRect.width))){var m=this.cropRect.x+this.cropRect.width/2,C=this.cropRect.y+this.cropRect.height/2,k=this.aspectRatio.getHorizontalLength(this.cropRect.height),Z=this.aspectRatio.getVerticalLength(this.cropRect.width);k/this.canvasWidth<Z/this.canvasHeight?this.cropRect.width=k: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=m-this.cropRect.width/2,this.cropRect.y=C-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)}},H.prototype.getRescaledRect=function(m,C,k,Z,Q,ye){var Qe=k/m,Be=Z/C;return{x:(Q.x-ye)*Qe+ye,y:(Q.y-ye)*Be+ye,width:Q.width*Qe,height:Q.height*Be}},H.prototype.scaleCanvas=function(m,C){var k=this.getRescaledRect(this.canvasWidth,this.canvasHeight,m,C,this.cropRect,this.margin);this.canvasWidth=m,this.canvasHeight=C,this.onCropChange&&this.onCropChange(k),this.setCropRectangle(k)},H}(),Kr=function(){function H(m){this._angle=0,this.isDragging=!1,this.width=401,this.height=24,this.title=m,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(H.prototype,"angle",{get:function(){return this._angle},set:function(m){this._angle=m,this.setAngleLabel(),this.positionScaleShape()},enumerable:!1,configurable:!0}),H.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},H.prototype.onPointerDown=function(m){this.controlContainer.setPointerCapture(m.pointerId),this.isDragging=!0,this.previousPoint={x:m.clientX,y:m.clientY}},H.prototype.onPointerMove=function(m){this.isDragging&&(this.onAngleChange&&this.onAngleChange((m.clientX-this.previousPoint.x)/5),this.previousPoint.x=m.clientX)},H.prototype.onPointerUp=function(m){this.isDragging&&this.onAngleChange&&this.onAngleChange((m.clientX-this.previousPoint.x)/5),this.isDragging=!1,this.controlContainer.releasePointerCapture(m.pointerId)},H.prototype.setAngleLabel=function(){if(this.angleLabelText){this.angleLabelText.innerHTML=""+Math.round(this._angle);var m=this.angleLabelText.getBBox();ut.setAttributes(this.angleLabelElement,[["x",((this.width-m.width)/2).toString()],["y",(this.height/2).toString()]])}},H.prototype.positionScaleShape=function(){if(this.scaleShape){var m=this.scaleShape.transform.baseVal.getItem(0);m.setTranslate(this._angle%5*5-25,0),this.scaleShape.transform.baseVal.replaceItem(m,0)}},H.prototype.getVisual=function(){var m=document.createElementNS("http://www.w3.org/2000/svg","svg");m.setAttribute("xmlns","http://www.w3.org/2000/svg"),m.setAttribute("width",this.width+"px"),m.setAttribute("height",this.height+"px"),m.setAttribute("viewBox","0 0 "+this.width+" "+this.height),m.style.flexShrink="0",document.body.appendChild(m);for(var C="M0,"+(this.height-1)+" v"+-this.height/3+"h1v"+this.height/3,k=1;k<=this.width/5+10;k++){var Z=k%5==0?this.height/3:this.height/6;C+="h4v"+-Z+"h1v"+Z}C+="v1H0Z",this.scaleShape=ut.createPath(C);var Q=ut.createTransform();this.scaleShape.transform.baseVal.appendItem(Q),m.appendChild(this.scaleShape),this.angleLabelElement=ut.createText([["x","0"],["y","0"],["font-size","10px"],["font-family","monospace"]]),this.angleLabelText=ut.createTSpan(""),this.angleLabelElement.appendChild(this.angleLabelText);var ye=ut.createTSpan("");return ye.innerHTML="°",this.angleLabelElement.appendChild(ye),m.appendChild(this.angleLabelElement),document.body.removeChild(m),m},H}(),Dr=function(){function H(){this.naturalSize=!1,this.imageType="image/png"}return H.prototype.rasterize=function(m,C,k,Z,Q,ye,Qe){var Be=this;return new Promise(function(ot){var Xe=document.createElement("canvas");Xe.width=m.width.baseVal.value-2*Z,Xe.height=m.height.baseVal.value-2*Z;var mt=1,pt=1;Be.naturalSize===!0?(mt=C.naturalWidth/(m.width.baseVal.value-2*Z)/ye,pt=C.naturalHeight/(m.height.baseVal.value-2*Z)/Qe,Xe.width=C.naturalWidth/ye,Xe.height=C.naturalHeight/Qe):Be.width!==void 0&&Be.height!==void 0&&(mt=Be.width/k.width,pt=Be.height/k.height,Xe.width*=mt,Xe.height*=pt);var Et=Xe.getContext("2d");Et.translate(Xe.width/2,Xe.height/2),Et.rotate(Q*Math.PI/180),Et.scale(ye,Qe),Et.translate(-Xe.width/2,-Xe.height/2),Et.drawImage(C,0,0,Xe.width,Xe.height);var Rt=document.createElement("canvas");Rt.width=k.width*mt,Rt.height=k.height*pt,Rt.getContext("2d").putImageData(Et.getImageData((k.x-Z)*mt,(k.y-Z)*pt,k.width*mt,k.height*pt),0,0),ot(Rt.toDataURL(Be.imageType,Be.imageQuality))})},H}(),ae=function(){function H(m){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=H.instanceCounter++,this.styles=new lr(this.instanceNo),this.target=m,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(H.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),Object.defineProperty(H.prototype,"zoomToCropEnabled",{get:function(){return this._zoomToCropEnabled},set:function(m){this._zoomToCropEnabled=m,m?this.zoomToCrop():this.unzoomFromCrop()},enumerable:!1,configurable:!0}),Object.defineProperty(H.prototype,"isGridVisible",{get:function(){return this._isGridVisible},set:function(m){this._isGridVisible=m,this.cropLayer&&(this.cropLayer.isGridVisible=this._isGridVisible)},enumerable:!1,configurable:!0}),Object.defineProperty(H.prototype,"gridLines",{get:function(){return this._gridLines},set:function(m){this._gridLines=m,this.cropLayer&&(this.cropLayer.numberOfGridLines=this._gridLines)},enumerable:!1,configurable:!0}),Object.defineProperty(H.prototype,"rotationAngle",{get:function(){return this._rotationAngle},set:function(m){this._rotationAngle=m,this.straightener&&(this.straightener.angle=this._rotationAngle)},enumerable:!1,configurable:!0}),Object.defineProperty(H.prototype,"paddedImageWidth",{get:function(){return this.imageWidth+2*this.CANVAS_MARGIN},enumerable:!1,configurable:!0}),Object.defineProperty(H.prototype,"paddedImageHeight",{get:function(){return this.imageHeight+2*this.CANVAS_MARGIN},enumerable:!1,configurable:!0}),Object.defineProperty(H.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(H.prototype,"aspectRatio",{get:function(){var m;return(m=this._aspectRatio)!==null&&m!==void 0?m:this.aspectRatios[0]},set:function(m){this._aspectRatio=m},enumerable:!1,configurable:!0}),H.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},H.prototype.show=function(){this.showUI(),this.open()},H.prototype.close=function(m){m===void 0&&(m=!1),this.isOpen&&(this.coverDiv&&this.closeUI(),this.targetObserver&&this.targetObserver.unobserve(this.target),this.displayMode==="popup"&&window.removeEventListener("resize",this.setWindowHeight),m||this.closeEventListeners.forEach(function(C){return C()}),this._isOpen=!1)},H.prototype.addRenderEventListener=function(m){this.renderEventListeners.push(m)},H.prototype.removeRenderEventListener=function(m){this.renderEventListeners.indexOf(m)>-1&&this.renderEventListeners.splice(this.renderEventListeners.indexOf(m),1)},H.prototype.addCloseEventListener=function(m){this.closeEventListeners.push(m)},H.prototype.removeCloseEventListener=function(m){this.closeEventListeners.indexOf(m)>-1&&this.closeEventListeners.splice(this.closeEventListeners.indexOf(m),1)},H.prototype.setupResizeObserver=function(){var m=this;this.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){m.resize(m.target.clientWidth,m.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))},H.prototype.onPopupResize=function(){if(this.contentDiv.clientWidth>0&&this.contentDiv.clientHeight>0){var m=1*this.target.clientWidth/this.target.clientHeight,C=this.contentDiv.clientWidth/m>this.contentDiv.clientHeight?(this.contentDiv.clientHeight-2*this.CANVAS_MARGIN)*m:this.contentDiv.clientWidth-2*this.CANVAS_MARGIN,k=C+2*this.CANVAS_MARGIN<this.contentDiv.clientWidth?this.contentDiv.clientHeight-2*this.CANVAS_MARGIN:(this.contentDiv.clientWidth-2*this.CANVAS_MARGIN)/m;this.resize(C,k)}},H.prototype.setWindowHeight=function(){this.windowHeight=window.innerHeight},H.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",ut.setAttributes(this.editingTarget,[["width",""+this.imageWidth],["height",""+this.imageHeight]]),this.editingTarget.style.transformOrigin=this.imageWidth/2+"px "+this.imageHeight/2+"px"},H.prototype.resize=function(m,C){this.imageWidth=Math.round(m),this.imageHeight=Math.round(C),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()},H.prototype.setEditingTarget=function(){var m=document.createElement("canvas");m.width=this.target.naturalWidth,m.height=this.target.naturalHeight,m.getContext("2d").drawImage(this.target,0,0,this.target.naturalWidth,this.target.naturalHeight);var C=m.toDataURL();ut.setAttributes(this.editingTarget,[["href",C]]),this.setEditingTargetSize()},H.prototype.setTopLeft=function(){var m=this.target.getBoundingClientRect(),C=this.editorCanvas.getBoundingClientRect();this.left=m.left-C.left-this.CANVAS_MARGIN,this.top=m.top-C.top-this.CANVAS_MARGIN},H.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=ut.createDefs(),this.cropImage.appendChild(this.defs),this.editingTarget=ut.createImage([["href",""]]),this.editingTarget.style.transformOrigin=this.imageWidth/2+"px "+this.imageHeight/2+"px",this.editingTargetRotationContainer=ut.createGroup(),this.editingTargetRotationScaleContainer=ut.createGroup(),this.editingTargetRotationScaleContainer.appendChild(this.editingTarget),this.editingTargetRotationContainer.appendChild(this.editingTargetRotationScaleContainer);var m=ut.createTransform();this.editingTargetRotationContainer.transform.baseVal.appendItem(m);var C=ut.createTransform();this.editingTargetRotationScaleContainer.transform.baseVal.appendItem(C),this.editingTargetContainer=ut.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)},H.prototype.positionCropImage=function(){this.cropImageHolder.style.top=this.top+"px",this.cropImageHolder.style.left=this.left+"px"},H.prototype.initCropLayer=function(){this.cropRect={x:this.CANVAS_MARGIN,y:this.CANVAS_MARGIN,width:this.imageWidth,height:this.imageHeight},this.cropLayerContainer=ut.createGroup(),this.cropImage.appendChild(this.cropLayerContainer),this.cropLayer=new pr(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()},H.prototype.zoomToCrop=function(){if(this.cropRect){var m=this.cropRect.x-this.CANVAS_MARGIN+this.cropRect.width/2,C=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=m+"px "+C+"px",this.editingTargetContainer.style.transform="translate("+(this.imageWidth/2-m+this.CANVAS_MARGIN)+"px,"+(this.imageHeight/2-C+this.CANVAS_MARGIN)+"px) scale("+this.zoomFactor+")",this.cropLayer.zoomFactor=this.zoomFactor)}},H.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)},H.prototype.cropRectChanged=function(m){this.cropRect=m,this.zoomToCropEnabled?this.zoomToCrop():this.cropLayer.zoomFactor=1},H.prototype.attachEvents=function(){window.addEventListener("resize",this.onWindowResize)},H.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"},H.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},H.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 m=this.styles.settings.hideTopToolbar?0:this.toolbarHeight,C=this.target.offsetTop>m+this.CANVAS_MARGIN?this.target.offsetTop-(m+this.CANVAS_MARGIN):0;this.coverDiv.style.top=C+"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},H.prototype.addToolbars=function(){this.addTopToolbar(),this.addBottomToolbar()},H.prototype.addTopToolbar=function(){var m=this;this.topToolbar=new Dt,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 C=new xr;C.minWidth=3*this.toolbarHeight+"px",this.topToolbar.addButtonBlock(C);var k=[];this.aspectRatios.forEach(function(pt){var Et=new Tr(Gt.getIcon(pt.horizontal,pt.vertical),pt.horizontal===0&&pt.vertical===0?"FREE":pt.horizontal+":"+pt.vertical);Et.onClick=function(){return m.ratioButtonClicked(pt)},k.push(Et)}),this.aspectRatioButton=new fr(Gt.getIcon(0,0),"Aspect ratio",k),this.aspectRatioButton.dropdownClassName=this.toolbarDropdownStyleClass.name,this.aspectRatioButton.dropdownColorsClassName=this.styles.settings.toolbarDropdownStyleColorsClassName?this.styles.settings.toolbarDropdownStyleColorsClassName:this.toolbarDropdownStyleColorsClass.name,C.addButton(this.aspectRatioButton),this.aspectRatios.length<2&&this.aspectRatioButton.hide();var Z=new Tr('<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(){m.isGridVisible=!m.isGridVisible,Z.isActive=m.isGridVisible},C.addButton(Z);var Q=new Tr('<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(Q.isActive=this.zoomToCropEnabled,Q.onClick=function(){m.zoomToCropEnabled=!m.zoomToCropEnabled,Q.isActive=m.zoomToCropEnabled},C.addButton(Q),!kt.isLicensed){var ye=new Pr;this.topToolbar.addElementBlock(ye);var Qe=document.createElement("div");Qe.className=this.topToolbar.buttonClassName+" "+this.topToolbar.buttonColorsClassName;var Be=document.createElement("a");Be.style.color="currentColor",Be.href="https://markerjs.com/products/cropro",Be.target="_blank",Be.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>',Qe.appendChild(Be),ye.addElement(Qe)}var ot=new xr;ot.minWidth=3*this.toolbarHeight+"px",ot.contentAlign="end",this.topToolbar.addButtonBlock(ot);var Xe=new Tr('<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");Xe.onClick=this.startRenderAndClose,ot.addButton(Xe),this.styles.settings.toolbarOkButtonStyleColorsClassName&&(Xe.colorsClassName=this.styles.settings.toolbarOkButtonStyleColorsClassName);var mt=new Tr('<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");mt.onClick=this.close,ot.addButton(mt),this.styles.settings.toolbarCloseButtonStyleColorsClassName&&(mt.colorsClassName=this.styles.settings.toolbarCloseButtonStyleColorsClassName)},H.prototype.addBottomToolbar=function(){var m=this;this.bottomToolbar=new Dt,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 C=new xr;C.minWidth=2*this.toolbarHeight+"px",this.bottomToolbar.addButtonBlock(C);var k=new Tr('<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");k.onClick=this.rotateLeftButtonClicked,C.addButton(k);var Z=new Tr('<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,C.addButton(Z);var Q=new Pr;Q.className=this.toolbarStraightenerBlockStyleClass.name,this.bottomToolbar.addElementBlock(Q),this.straightener=new Kr("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){m.rotateBy(ot),m.straightener.angle=m.rotationAngle},Q.addElement(this.straightener.getUI());var ye=new xr;ye.minWidth=2*this.toolbarHeight+"px",ye.contentAlign="end",this.bottomToolbar.addButtonBlock(ye);var Qe=new Tr('<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");Qe.onClick=this.flipHorizontallyButtonClicked,ye.addButton(Qe);var Be=new Tr('<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");Be.onClick=this.flipVerticallyButtonClicked,ye.addButton(Be)},H.prototype.ratioButtonClicked=function(m){this.aspectRatio=m,this.applyAspectRatio(),this.aspectRatioButton.hideDropdown()},H.prototype.applyAspectRatio=function(){this.setCropLayerAspectRatio(),this.aspectRatioButton.icon=Gt.getIcon(this.aspectRatio.horizontal,this.aspectRatio.vertical)},H.prototype.setCropLayerAspectRatio=function(){this.cropLayer&&(this.aspectRatio&&this.aspectRatio.horizontal!==0&&this.aspectRatio.vertical!==0?this.cropLayer.aspectRatio=new kr(this.aspectRatio.horizontal,this.aspectRatio.vertical):this.cropLayer.aspectRatio=void 0)},H.prototype.closeUI=function(){this.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},H.prototype.getState=function(){return{width:this.imageWidth,height:this.imageHeight,rotationAngle:this.rotationAngle,flippedHorizontally:this.flippedHorizontally,flippedVertically:this.flippedVertically,cropRect:Object.assign({},this.cropRect)}},H.prototype.restoreState=function(m){if(m){var C=this.cropLayer.getRescaledRect(m.width,m.height,this.imageWidth,this.imageHeight,m.cropRect,this.CANVAS_MARGIN);this.cropLayer.setCropRectangle(C),this.cropRectChanged(C),this.flippedHorizontally=m.flippedHorizontally,this.flippedVertically=m.flippedVertically,this.applyFlip(),this.rotationAngle=m.rotationAngle,this.applyRotation()}},H.prototype.clientToLocalCoordinates=function(m,C){var k=this.cropImage.getBoundingClientRect();return{x:m-k.left,y:C-k.top}},H.prototype.onWindowResize=function(){this.positionUI()},H.prototype.positionUI=function(){switch(this.setTopLeft(),this.displayMode){case"inline":var m=this.target.offsetTop>this.toolbarHeight?this.target.offsetTop-this.toolbarHeight:0;this.coverDiv.style.top=m+"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()},H.prototype.rotateLeftButtonClicked=function(){var m=this.rotationAngle-90;this.rotationAngle%90!=0&&(m+=this.rotationAngle>=0?90-this.rotationAngle%90:-this.rotationAngle%90),this.rotateTo(m)},H.prototype.rotateRightButtonClicked=function(){var m=this.rotationAngle+90;this.rotationAngle%90!=0&&(m-=this.rotationAngle>=0?this.rotationAngle%90:90+this.rotationAngle%90),this.rotateTo(m)},H.prototype.rotateTo=function(m){m=(m=m>180?m-360:m)<=-180?m+360:m,this.rotationAngle=m,this.applyRotation()},H.prototype.rotateBy=function(m){this.rotateTo((this.rotationAngle+m)%360)},H.prototype.applyRotation=function(){var m=this.zoomToCropEnabled;this.zoomToCropEnabled=!1,this.editingTargetRotationScaleContainer.style.transformOrigin=this.imageWidth/2+"px "+this.imageHeight/2+"px",this.editingTargetRotationScaleContainer.style.transform="scale(1)";var C=this.editingTargetRotationContainer.transform.baseVal.getItem(0);C.setRotate(this.rotationAngle,this.imageWidth/2,this.imageHeight/2),this.editingTargetRotationContainer.transform.baseVal.replaceItem(C,0);var k=this.editingTarget.getBoundingClientRect();this.scaleFactor=Math.min(this.imageWidth/k.width,this.imageHeight/k.height),this.editingTargetRotationScaleContainer.style.transform="scale("+this.scaleFactor+")",this.zoomToCropEnabled=m},H.prototype.flipHorizontallyButtonClicked=function(){this.flippedHorizontally=!this.flippedHorizontally,this.applyFlip()},H.prototype.flipVerticallyButtonClicked=function(){this.flippedVertically=!this.flippedVertically,this.applyFlip()},H.prototype.applyFlip=function(){this.editingTarget.style.transform="scale("+(this.flippedHorizontally?-1:1)+","+(this.flippedVertically?-1:1)+")"},H.prototype.startRenderAndClose=function(){return Ft(this,void 0,void 0,function(){var m,C;return rr(this,function(k){switch(k.label){case 0:return[4,this.render()];case 1:return m=k.sent(),C=this.getState(),this.renderEventListeners.forEach(function(Z){return Z(m,C)}),this.close(!0),[2]}})})},H.prototype.render=function(){return Ft(this,void 0,void 0,function(){var m;return rr(this,function(C){switch(C.label){case 0:return(m=new Dr).naturalSize=this.renderAtNaturalSize,m.imageType=this.renderImageType,m.imageQuality=this.renderImageQuality,m.width=this.renderWidth,m.height=this.renderHeight,this.unzoomFromCrop(),ut.setAttributes(this.cropLayerContainer,[["display","none"]]),[4,m.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 C.sent(),[4,m.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,C.sent()]}})})},H.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new dt("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 dt("toolbar_colors",`
|
|
background-color: `+this.styles.settings.toolbarBackgroundColor+`;
|
|
`)),this.toolbarBlockStyleClass=this.styles.addClass(new dt("toolbar-block",`
|
|
display: flex;
|
|
align-items: center;
|
|
box-sizing: content-box;
|
|
`));var m=this.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new dt("toolbar_button",`
|
|
display: inline-block;
|
|
width: `+(this.toolbarHeight-2*m)+`px;
|
|
height: `+(this.toolbarHeight-2*m)+`px;
|
|
padding: `+m+`px;
|
|
cursor: default;
|
|
user-select: none;
|
|
box-sizing: content-box;
|
|
`)),this.toolbarButtonStyleColorsClass=this.styles.addClass(new dt("toolbar_button_colors",`
|
|
color: `+this.styles.settings.toolbarColor+`;
|
|
fill: currentColor;
|
|
`)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new dt("toolbar_active_button",`
|
|
color: `+this.styles.settings.toolbarColor+`;
|
|
fill: currentColor;
|
|
background-color: `+this.styles.settings.toolbarBackgroundActiveColor+`
|
|
`)),this.styles.addRule(new wt("."+this.toolbarButtonStyleClass.name+" svg",`
|
|
height: `+this.toolbarHeight/2+`px;
|
|
`)),this.styles.addRule(new wt("."+this.toolbarButtonStyleColorsClass.name+":hover",`
|
|
background-color: `+this.styles.settings.toolbarBackgroundHoverColor+`
|
|
`)),this.toolbarDropdownStyleClass=this.styles.addClass(new dt("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 dt("toolbar_dropdown_colors",`
|
|
background-color: `+this.styles.settings.toolbarBackgroundColor+`;
|
|
`)),this.toolbarStraightenerBlockStyleClass=this.styles.addClass(new dt("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 dt("toolbar_straightener",`
|
|
display: flex;
|
|
overflow: hidden;
|
|
justify-content: center;
|
|
height: `+(this.toolbarHeight-2*m)+`px;
|
|
padding: `+m+`px;
|
|
cursor: default;
|
|
user-select: none;
|
|
box-sizing: content-box;
|
|
`)),this.toolbarStraightenerStyleColorsClass=this.styles.addClass(new dt("toolbar_straightener_colors",`
|
|
color: `+this.styles.settings.toolbarColor+`;
|
|
fill: currentColor;
|
|
`))},H.instanceCounter=0,H}(),se=K("8hTe"),me=K.n(se),Se=/<pre[^>]*>/g;function Ye(H){var m=document.createElement("div");return m.innerHTML=H,m.childNodes.length===0?"":m.childNodes[0].nodeValue}var tt=_e.a=function(H){var m=H.value,C=m===void 0?"":m,k=H.edit,Z=k===void 0?!1:k,Q=H.className,ye=H.showTextOnly,Qe=H.showLines,Be=H.replaces,ot=H.zoomImg,Xe=H.hasMask,mt=H.style,pt=mt===void 0?{}:mt,Et=H.stylesPrev,Rt=Et===void 0?{}:Et,ir=String(C),Nt=Object(R.useRef)(),er=Object(R.useRef)(),Ot=Object(R.useState)(""),mr=Object(X.a)(Ot,2),Kt=mr[0],_r=mr[1],gr=Object(R.useState)("office"),Sr=Object(X.a)(gr,2),Ir=Sr[0],vr=Sr[1],yr=function(){var Ut=new ae(er.current);Ut.displayMode="popup",Ut.addRenderEventListener(function(){var tr=Object(O.a)(e.a.mark(function Yt(wr){var ar;return e.a.wrap(function(Mt){for(;;)switch(Mt.prev=Mt.next){case 0:return Nt.current.style.display="none",Mt.next=3,Object(Le.a)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:"educoder.png",file:wr}});case 3:ar=Mt.sent,ar!=null&&ar.id&&Be(er.current.getAttribute("src").replace(ee.a.API_SERVER,""),"/api/attachments/".concat(ar==null?void 0:ar.id,"?type=").concat(ar.content_type));case 5:case"end":return Mt.stop()}},Yt)}));return function(Yt){return tr.apply(this,arguments)}}()),Ut.show()},Er=function(){var Ut=new Qt(er.current);Ut.settings.displayMode="popup",Ut.addEventListener("render",function(){var tr=Object(O.a)(e.a.mark(function Yt(wr){var ar;return e.a.wrap(function(Mt){for(;;)switch(Mt.prev=Mt.next){case 0:if(Nt.current.style.display="none",!er.current){Mt.next=6;break}return Mt.next=4,Object(Le.a)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:"educoder.png",file:wr.dataUrl}});case 4:ar=Mt.sent,ar!=null&&ar.id&&Be(er.current.getAttribute("src").replace(ee.a.API_SERVER,""),"/api/attachments/".concat(ar==null?void 0:ar.id,"?type=").concat(ar.content_type));case 6:case"end":return Mt.stop()}},Yt)}));return function(Yt){return tr.apply(this,arguments)}}()),Ut.show(),window.markerArea=Ut},Rr=Object(R.useMemo)(function(){Nt.current&&(Nt.current.style.zIndex=-1);try{var Xt=/\(\s+\/api\/attachments\/|\(\/api\/attachments\/|\(\/attachments\/download\//g,Ut=/\"\/api\/attachments\/|\"\/attachments\/download\//g,tr=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g;ir=ir.replace(Xt,"("+ee.a.API_SERVER+"/api/attachments/").replace(Ut,'"'+ee.a.API_SERVER+"/api/attachments/").replace(tr,'"'+ee.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(gn){}var Yt=P(ir),wr=w();if(ir.match(/\[TOC\]/)&&(Yt=Yt.replace("<p>[TOC]</p>",x()),_()),Yt=Yt.replace(/(__special_katext_id_\d+__)/g,function(gn,Mt){var Ht=wr[Mt],Lt=Ht.type,nr=Ht.expression;return Object(pe.renderToString)(Ye(nr)||"",{displayMode:Lt==="block",throwOnError:!1,output:"html"})}),Yt=Yt.replace(/▁/g,"\u2581\u2581\u2581"),g(),ye){var ar=document.createElement("div");return ar.innerHTML=Yt,ar.innerText}return setTimeout(function(){return Fr()},500),Yt},[ir]),Br=Object(R.useRef)();y.WebkitLineClamp=Qe,Qe&&(pt=Object(N.a)(Object(N.a)({},pt),y));function Ur(Xt){var Ut=Xt.target;if(Ut.tagName.toUpperCase()==="IMG"){if(ot){var tr=Ut.getAttribute("src");_r(tr),vr("image")}}else if(Ut.tagName.toUpperCase()==="A"){var Yt=Ut.getAttribute("href");if(Yt.indexOf("office")>-1)Xt.preventDefault(),_r(Yt),vr("office");else if(Yt.indexOf("application/pdf")>-1)Xt.preventDefault(),_r(Yt),vr("pdf");else if(Yt.indexOf("text/html")>-1)Xt.preventDefault(),_r(Yt),vr("html");else if(Yt.startsWith("#")){Xt.preventDefault();var wr=document.getElementById(Yt.replace("#",""));wr&&wr.scrollIntoView(!0)}}}var Fr=function(){var Ut,tr=(Ut=Br.current)===null||Ut===void 0?void 0:Ut.querySelectorAll("video");tr==null||tr.forEach(function(Yt){if(Yt.oncontextmenu=function(){return!1},Yt.src.indexOf(".m3u8")>-1&&!Yt.canPlayType("application/vnd.apple.mpegurl")){if($.a.isSupported()){var wr=new $.a;wr.loadSource(Yt.src),wr.attachMedia(Yt)}}})};Object(R.useEffect)(function(){if(Br.current&&Rr&&(Rr.match(Se)&&window.PR.prettyPrint()),Br.current)return Br.current.addEventListener("click",Ur),function(){Br.current.removeEventListener("click",Ur),g(),_()}},[Rr,Br.current,Ur]);var or=function(Ut){if(!Z)return;Ut.target.nodeName==="IMG"?(Nt.current.style.zIndex=1,Nt.current.style.display="flex",Nt.current.style.width=Ut.target.clientWidth+"px",Nt.current.style.height=Ut.target.clientHeight+"px",Nt.current.style.top=Ut.target.offsetTop+"px",Nt.current.style.left=Ut.target.offsetLeft+"px",er.current.src=Ut.target.getAttribute("src")):Nt.current.style.display="none"};return f.a.createElement("div",{style:{position:"relative"}},f.a.createElement("div",{ref:Br,style:Object(N.a)({},pt),className:"".concat(Q||""," markdown-body ").concat(me.a.mdBody),onMouseOver:or,dangerouslySetInnerHTML:{__html:Rr}}),f.a.createElement("div",{ref:Nt,className:me.a.button},f.a.createElement(G.a,null,f.a.createElement(j.a,{onClick:function(){return yr()}},"\u88C1\u526A"),f.a.createElement(j.a,{onClick:function(){return Er()}},"\u7F16\u8F91"))),f.a.createElement("img",{ref:er,src:"",alt:"sample",crossOrigin:"anonymous",style:{maxWidth:"90%",opacity:0,position:"absolute",zIndex:-1}}),f.a.createElement(fe.a,{close:!0,data:Kt,type:Kt!=null&&Kt.length?Ir:"",style:Object(N.a)({},Rt),onClose:function(){return _r("")}}))}},BU3w:function(ct,_e,K){"use strict";K.d(_e,"a",function(){return O});var oe=K("MNnm"),G="rc-util-key";function D(X){if(X.attachTo)return X.attachTo;var M=document.querySelector("head");return M||document.body}function j(X){var M,e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!Object(oe.a)())return null;var R=document.createElement("style");if((M=e.csp)===null||M===void 0?void 0:M.nonce){var f;R.nonce=(f=e.csp)===null||f===void 0?void 0:f.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 N=new Map;function O(X,M){var e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},R=D(e);if(!N.has(R)){var f=j("",e),v=f.parentNode;N.set(R,v),v.removeChild(f)}var u=Array.from(N.get(R).children).find(function(a){return a.tagName==="STYLE"&&a[G]===M});if(u){var s,i;if(((s=e.csp)===null||s===void 0?void 0:s.nonce)&&u.nonce!==((i=e.csp)===null||i===void 0?void 0:i.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=j(X,e);return o[G]=M,o}},"C/vA":function(ct,_e,K){"use strict";K.d(_e,"a",function(){return oe});function oe(G){const D=this;let j=!1,N;return function(){return j||(j=!0,N=G.apply(D,arguments)),N}}},"Cg/j":function(ct,_e,K){"use strict";K.d(_e,"b",function(){return oe}),K.d(_e,"a",function(){return G}),K.d(_e,"c",function(){return j}),K.d(_e,"d",function(){return N});var oe;(function(O){O.serviceIds=new Map,O.DI_TARGET="$di$target",O.DI_DEPENDENCIES="$di$dependencies";function X(M){return M[O.DI_DEPENDENCIES]||[]}O.getServiceDependencies=X})(oe||(oe={}));const G=j("instantiationService");function D(O,X,M,e){X[oe.DI_TARGET]===X?X[oe.DI_DEPENDENCIES].push({id:O,index:M,optional:e}):(X[oe.DI_DEPENDENCIES]=[{id:O,index:M,optional:e}],X[oe.DI_TARGET]=X)}function j(O){if(oe.serviceIds.has(O))return oe.serviceIds.get(O);const X=function(M,e,R){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");D(X,M,R,!1)};return X.toString=()=>O,oe.serviceIds.set(O,X),X}function N(O){return function(X,M,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(ct,_e,K){(function(oe,G){ct.exports=G()})(this,function(){"use strict";function oe(Ce,ce){for(var ge=0;ge<ce.length;ge++){var te=ce[ge];te.enumerable=te.enumerable||!1,te.configurable=!0,"value"in te&&(te.writable=!0),Object.defineProperty(Ce,te.key,te)}}function G(Ce,ce,ge){return ce&&oe(Ce.prototype,ce),ge&&oe(Ce,ge),Ce}function D(Ce,ce){if(!Ce)return;if(typeof Ce=="string")return j(Ce,ce);var ge=Object.prototype.toString.call(Ce).slice(8,-1);if(ge==="Object"&&Ce.constructor&&(ge=Ce.constructor.name),ge==="Map"||ge==="Set")return Array.from(Ce);if(ge==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(ge))return j(Ce,ce)}function j(Ce,ce){(ce==null||ce>Ce.length)&&(ce=Ce.length);for(var ge=0,te=new Array(ce);ge<ce;ge++)te[ge]=Ce[ge];return te}function N(Ce,ce){var ge;if(typeof Symbol=="undefined"||Ce[Symbol.iterator]==null){if(Array.isArray(Ce)||(ge=D(Ce))||ce&&Ce&&typeof Ce.length=="number"){ge&&(Ce=ge);var te=0;return function(){return te>=Ce.length?{done:!0}:{done:!1,value:Ce[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 ge=Ce[Symbol.iterator](),ge.next.bind(ge)}function O(Ce,ce){return ce={exports:{}},Ce(ce,ce.exports),ce.exports}var X=O(function(Ce){function ce(){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 ge(te){Ce.exports.defaults=te}Ce.exports={defaults:ce(),getDefaults:ce,changeDefaults:ge}}),M=X.defaults,e=X.getDefaults,R=X.changeDefaults,f=/[&<>"']/,v=/[&<>"']/g,u=/[<>"']|&(?!#?\w+;)/,s=/[<>"']|&(?!#?\w+;)/g,i={"&":"&","<":"<",">":">",'"':""","'":"'"},A=function(ce){return i[ce]};function o(Ce,ce){if(ce){if(f.test(Ce))return Ce.replace(v,A)}else if(u.test(Ce))return Ce.replace(s,A);return Ce}var a=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function r(Ce){return Ce.replace(a,function(ce,ge){return ge=ge.toLowerCase(),ge==="colon"?":":ge.charAt(0)==="#"?ge.charAt(1)==="x"?String.fromCharCode(parseInt(ge.substring(2),16)):String.fromCharCode(+ge.substring(1)):""})}var t=/(^|[^\[])\^/g;function _(Ce,ce){Ce=Ce.source||Ce,ce=ce||"";var ge={replace:function(ne,le){return le=le.source||le,le=le.replace(t,"$1"),Ce=Ce.replace(ne,le),ge},getRegex:function(){return new RegExp(Ce,ce)}};return ge}var y=/[^\w:]/g,b=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function x(Ce,ce,ge){if(Ce){var te;try{te=decodeURIComponent(r(ge)).replace(y,"").toLowerCase()}catch(ne){return null}if(te.indexOf("javascript:")===0||te.indexOf("vbscript:")===0||te.indexOf("data:")===0)return null}ce&&!b.test(ge)&&(ge=h(ce,ge));try{ge=encodeURI(ge).replace(/%25/g,"%")}catch(ne){return null}return ge}var E={},d=/^[^:]+:\/*[^/]*$/,n=/^([^:]+:)[\s\S]*$/,l=/^([^:]+:\/*[^/]*)[\s\S]*$/;function h(Ce,ce){E[" "+Ce]||(d.test(Ce)?E[" "+Ce]=Ce+"/":E[" "+Ce]=L(Ce,"/",!0)),Ce=E[" "+Ce];var ge=Ce.indexOf(":")===-1;return ce.substring(0,2)==="//"?ge?ce:Ce.replace(n,"$1")+ce:ce.charAt(0)==="/"?ge?ce:Ce.replace(l,"$1")+ce:Ce+ce}var w={exec:function(){}};function g(Ce){for(var ce=1,ge,te;ce<arguments.length;ce++){ge=arguments[ce];for(te in ge)Object.prototype.hasOwnProperty.call(ge,te)&&(Ce[te]=ge[te])}return Ce}function c(Ce,ce){var ge=Ce.replace(/\|/g,function(le,de,Re){for(var Me=!1,qe=de;--qe>=0&&Re[qe]==="\\";)Me=!Me;return Me?"|":" |"}),te=ge.split(/ \|/),ne=0;if(te.length>ce)te.splice(ce);else for(;te.length<ce;)te.push("");for(;ne<te.length;ne++)te[ne]=te[ne].trim().replace(/\\\|/g,"|");return te}function L(Ce,ce,ge){var te=Ce.length;if(te===0)return"";for(var ne=0;ne<te;){var le=Ce.charAt(te-ne-1);if(le===ce&&!ge)ne++;else if(le!==ce&&ge)ne++;else break}return Ce.substr(0,te-ne)}function F(Ce,ce){if(Ce.indexOf(ce[1])===-1)return-1;for(var ge=Ce.length,te=0,ne=0;ne<ge;ne++)if(Ce[ne]==="\\")ne++;else if(Ce[ne]===ce[0])te++;else if(Ce[ne]===ce[1]&&(te--,te<0))return ne;return-1}function B(Ce){Ce&&Ce.sanitize&&!Ce.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 P={escape:o,unescape:r,edit:_,cleanUrl:x,resolveUrl:h,noopTest:w,merge:g,splitCells:c,rtrim:L,findClosingBracket:F,checkSanitizeDeprecation:B},W=X.defaults,U=P.rtrim,$=P.splitCells,ee=P.escape,pe=P.findClosingBracket;function fe(Ce,ce,ge){var te=ce.href,ne=ce.title?ee(ce.title):null,le=Ce[1].replace(/\\([\[\]])/g,"$1");return Ce[0].charAt(0)!=="!"?{type:"link",raw:ge,href:te,title:ne,text:le}:{type:"image",raw:ge,href:te,title:ne,text:ee(le)}}function Le(Ce,ce){var ge=Ce.match(/^(\s+)(?:```)/);if(ge===null)return ce;var te=ge[1];return ce.split(`
|
|
`).map(function(ne){var le=ne.match(/^\s+/);if(le===null)return ne;var de=le[0];return de.length>=te.length?ne.slice(te.length):ne}).join(`
|
|
`)}var Ie=function(){function Ce(ge){this.options=ge||W}var ce=Ce.prototype;return ce.space=function(te){var ne=this.rules.block.newline.exec(te);if(ne)return ne[0].length>1?{type:"space",raw:ne[0]}:{raw:`
|
|
`}},ce.code=function(te,ne){var le=this.rules.block.code.exec(te);if(le){var de=ne[ne.length-1];if(de&&de.type==="paragraph")return{raw:le[0],text:le[0].trimRight()};var Re=le[0].replace(/^ {4}/gm,"");return{type:"code",raw:le[0],codeBlockStyle:"indented",text:this.options.pedantic?Re:U(Re,`
|
|
`)}}},ce.fences=function(te){var ne=this.rules.block.fences.exec(te);if(ne){var le=ne[0],de=Le(le,ne[3]||"");return{type:"code",raw:le,lang:ne[2]?ne[2].trim():ne[2],text:de}}},ce.heading=function(te){var ne=this.rules.block.heading.exec(te);if(ne)return{type:"heading",raw:ne[0],depth:ne[1].length,text:ne[2]}},ce.nptable=function(te){var ne=this.rules.block.nptable.exec(te);if(ne){var le={type:"table",header:$(ne[1].replace(/^ *| *\| *$/g,"")),align:ne[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:ne[3]?ne[3].replace(/\n$/,"").split(`
|
|
`):[],raw:ne[0]};if(le.header.length===le.align.length){var de=le.align.length,Re;for(Re=0;Re<de;Re++)/^ *-+: *$/.test(le.align[Re])?le.align[Re]="right":/^ *:-+: *$/.test(le.align[Re])?le.align[Re]="center":/^ *:-+ *$/.test(le.align[Re])?le.align[Re]="left":le.align[Re]=null;for(de=le.cells.length,Re=0;Re<de;Re++)le.cells[Re]=$(le.cells[Re],le.header.length);return le}}},ce.hr=function(te){var ne=this.rules.block.hr.exec(te);if(ne)return{type:"hr",raw:ne[0]}},ce.blockquote=function(te){var ne=this.rules.block.blockquote.exec(te);if(ne){var le=ne[0].replace(/^ *> ?/gm,"");return{type:"blockquote",raw:ne[0],text:le}}},ce.list=function(te){var ne=this.rules.block.list.exec(te);if(ne){for(var le=ne[0],de=ne[2],Re=de.length>1,Me=de[de.length-1]===")",qe={type:"list",raw:le,ordered:Re,start:Re?+de.slice(0,-1):"",loose:!1,items:[]},lt=ne[0].match(this.rules.block.item),ft=!1,At,Bt,St,it,Wt,Qt,It,qt=lt.length,Ft=0;Ft<qt;Ft++)At=lt[Ft],le=At,Bt=At.length,At=At.replace(/^ *([*+-]|\d+[.)]) */,""),~At.indexOf(`
|
|
`)&&(Bt-=At.length,At=this.options.pedantic?At.replace(/^ {1,4}/gm,""):At.replace(new RegExp("^ {1,"+Bt+"}","gm"),"")),Ft!==qt-1&&(St=this.rules.block.bullet.exec(lt[Ft+1])[0],(Re?St.length===1||!Me&&St[St.length-1]===")":St.length>1||this.options.smartLists&&St!==de)&&(it=lt.slice(Ft+1).join(`
|
|
`),qe.raw=qe.raw.substring(0,qe.raw.length-it.length),Ft=qt-1)),Wt=ft||/\n\n(?!\s*$)/.test(At),Ft!==qt-1&&(ft=At.charAt(At.length-1)===`
|
|
`,Wt||(Wt=ft)),Wt&&(qe.loose=!0),Qt=/^\[[ xX]\] /.test(At),It=void 0,Qt&&(It=At[1]!==" ",At=At.replace(/^\[[ xX]\] +/,"")),qe.items.push({type:"list_item",raw:le,task:Qt,checked:It,loose:Wt,text:At});return qe}},ce.html=function(te){var ne=this.rules.block.html.exec(te);if(ne)return{type:this.options.sanitize?"paragraph":"html",raw:ne[0],pre:!this.options.sanitizer&&(ne[1]==="pre"||ne[1]==="script"||ne[1]==="style"),text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(ne[0]):ee(ne[0]):ne[0]}},ce.def=function(te){var ne=this.rules.block.def.exec(te);if(ne){ne[3]&&(ne[3]=ne[3].substring(1,ne[3].length-1));var le=ne[1].toLowerCase().replace(/\s+/g," ");return{tag:le,raw:ne[0],href:ne[2],title:ne[3]}}},ce.table=function(te){var ne=this.rules.block.table.exec(te);if(ne){var le={type:"table",header:$(ne[1].replace(/^ *| *\| *$/g,"")),align:ne[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:ne[3]?ne[3].replace(/\n$/,"").split(`
|
|
`):[]};if(le.header.length===le.align.length){le.raw=ne[0];var de=le.align.length,Re;for(Re=0;Re<de;Re++)/^ *-+: *$/.test(le.align[Re])?le.align[Re]="right":/^ *:-+: *$/.test(le.align[Re])?le.align[Re]="center":/^ *:-+ *$/.test(le.align[Re])?le.align[Re]="left":le.align[Re]=null;for(de=le.cells.length,Re=0;Re<de;Re++)le.cells[Re]=$(le.cells[Re].replace(/^ *\| *| *\| *$/g,""),le.header.length);return le}}},ce.lheading=function(te){var ne=this.rules.block.lheading.exec(te);if(ne)return{type:"heading",raw:ne[0],depth:ne[2].charAt(0)==="="?1:2,text:ne[1]}},ce.paragraph=function(te){var ne=this.rules.block.paragraph.exec(te);if(ne)return{type:"paragraph",raw:ne[0],text:ne[1].charAt(ne[1].length-1)===`
|
|
`?ne[1].slice(0,-1):ne[1]}},ce.text=function(te,ne){var le=this.rules.block.text.exec(te);if(le){var de=ne[ne.length-1];return de&&de.type==="text"?{raw:le[0],text:le[0]}:{type:"text",raw:le[0],text:le[0]}}},ce.escape=function(te){var ne=this.rules.inline.escape.exec(te);if(ne)return{type:"escape",raw:ne[0],text:ee(ne[1])}},ce.tag=function(te,ne,le){var de=this.rules.inline.tag.exec(te);if(de)return!ne&&/^<a /i.test(de[0])?ne=!0:ne&&/^<\/a>/i.test(de[0])&&(ne=!1),!le&&/^<(pre|code|kbd|script)(\s|>)/i.test(de[0])?le=!0:le&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(de[0])&&(le=!1),{type:this.options.sanitize?"text":"html",raw:de[0],inLink:ne,inRawBlock:le,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(de[0]):ee(de[0]):de[0]}},ce.link=function(te){var ne=this.rules.inline.link.exec(te);if(ne){var le=pe(ne[2],"()");if(le>-1){var de=ne[0].indexOf("!")===0?5:4,Re=de+ne[1].length+le;ne[2]=ne[2].substring(0,le),ne[0]=ne[0].substring(0,Re).trim(),ne[3]=""}var Me=ne[2],qe="";if(this.options.pedantic){var lt=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(Me);lt?(Me=lt[1],qe=lt[3]):qe=""}else qe=ne[3]?ne[3].slice(1,-1):"";Me=Me.trim().replace(/^<([\s\S]*)>$/,"$1");var ft=fe(ne,{href:Me&&Me.replace(this.rules.inline._escapes,"$1"),title:qe&&qe.replace(this.rules.inline._escapes,"$1")},ne[0]);return ft}},ce.reflink=function(te,ne){var le;if((le=this.rules.inline.reflink.exec(te))||(le=this.rules.inline.nolink.exec(te))){var de=(le[2]||le[1]).replace(/\s+/g," ");if(de=ne[de.toLowerCase()],!de||!de.href){var Re=le[0].charAt(0);return{type:"text",raw:Re,text:Re}}var Me=fe(le,de,le[0]);return Me}},ce.strong=function(te,ne,le){le===void 0&&(le="");var de=this.rules.inline.strong.start.exec(te);if(de&&(!de[1]||de[1]&&(le===""||this.rules.inline.punctuation.exec(le)))){ne=ne.slice(-1*te.length);var Re=de[0]==="**"?this.rules.inline.strong.endAst:this.rules.inline.strong.endUnd;Re.lastIndex=0;for(var Me;(de=Re.exec(ne))!=null;)if(Me=this.rules.inline.strong.middle.exec(ne.slice(0,de.index+3)),Me)return{type:"strong",raw:te.slice(0,Me[0].length),text:te.slice(2,Me[0].length-2)}}},ce.em=function(te,ne,le){le===void 0&&(le="");var de=this.rules.inline.em.start.exec(te);if(de&&(!de[1]||de[1]&&(le===""||this.rules.inline.punctuation.exec(le)))){ne=ne.slice(-1*te.length);var Re=de[0]==="*"?this.rules.inline.em.endAst:this.rules.inline.em.endUnd;Re.lastIndex=0;for(var Me;(de=Re.exec(ne))!=null;)if(Me=this.rules.inline.em.middle.exec(ne.slice(0,de.index+2)),Me)return{type:"em",raw:te.slice(0,Me[0].length),text:te.slice(1,Me[0].length-1)}}},ce.codespan=function(te){var ne=this.rules.inline.code.exec(te);if(ne){var le=ne[2].replace(/\n/g," "),de=/[^ ]/.test(le),Re=le.startsWith(" ")&&le.endsWith(" ");return de&&Re&&(le=le.substring(1,le.length-1)),le=ee(le,!0),{type:"codespan",raw:ne[0],text:le}}},ce.br=function(te){var ne=this.rules.inline.br.exec(te);if(ne)return{type:"br",raw:ne[0]}},ce.del=function(te){var ne=this.rules.inline.del.exec(te);if(ne)return{type:"del",raw:ne[0],text:ne[1]}},ce.autolink=function(te,ne){var le=this.rules.inline.autolink.exec(te);if(le){var de,Re;return le[2]==="@"?(de=ee(this.options.mangle?ne(le[1]):le[1]),Re="mailto:"+de):(de=ee(le[1]),Re=de),{type:"link",raw:le[0],text:de,href:Re,tokens:[{type:"text",raw:de,text:de}]}}},ce.url=function(te,ne){var le;if(le=this.rules.inline.url.exec(te)){var de,Re;if(le[2]==="@")de=ee(this.options.mangle?ne(le[0]):le[0]),Re="mailto:"+de;else{var Me;do Me=le[0],le[0]=this.rules.inline._backpedal.exec(le[0])[0];while(Me!==le[0]);de=ee(le[0]),le[1]==="www."?Re="http://"+de:Re=de}return{type:"link",raw:le[0],text:de,href:Re,tokens:[{type:"text",raw:de,text:de}]}}},ce.inlineText=function(te,ne,le){var de=this.rules.inline.text.exec(te);if(de){var Re;return ne?Re=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(de[0]):ee(de[0]):de[0]:Re=ee(this.options.smartypants?le(de[0]):de[0]),{type:"text",raw:de[0],text:Re}}},Ce}(),xe=P.noopTest,Ue=P.edit,Fe=P.merge,we={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:xe,table:xe,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html)[^\n]+)*)/,text:/^[^\n]+/};we._label=/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,we._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,we.def=Ue(we.def).replace("label",we._label).replace("title",we._title).getRegex(),we.bullet=/(?:[*+-]|\d{1,9}[.)])/,we.item=/^( *)(bull) ?[^\n]*(?:\n(?!\1bull ?)[^\n]*)*/,we.item=Ue(we.item,"gm").replace(/bull/g,we.bullet).getRegex(),we.list=Ue(we.list).replace(/bull/g,we.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+we.def.source+")").getRegex(),we._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",we._comment=/<!--(?!-?>)[\s\S]*?-->/,we.html=Ue(we.html,"i").replace("comment",we._comment).replace("tag",we._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),we.paragraph=Ue(we._paragraph).replace("hr",we.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",we._tag).getRegex(),we.blockquote=Ue(we.blockquote).replace("paragraph",we.paragraph).getRegex(),we.normal=Fe({},we),we.gfm=Fe({},we.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*|$)"}),we.gfm.nptable=Ue(we.gfm.nptable).replace("hr",we.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",we._tag).getRegex(),we.gfm.table=Ue(we.gfm.table).replace("hr",we.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",we._tag).getRegex(),we.pedantic=Fe({},we.normal,{html:Ue(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",we._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:xe,paragraph:Ue(we.normal._paragraph).replace("hr",we.hr).replace("heading",` *#{1,6} *[^
|
|
]`).replace("lheading",we.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var ve={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:xe,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:xe,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\<!\[`*]|\b_|$)|[^ ](?= {2,}\n))|(?= {2,}\n))/,punctuation:/^([\s*punctuation])/};ve._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~",ve.punctuation=Ue(ve.punctuation).replace(/punctuation/g,ve._punctuation).getRegex(),ve._blockSkip="\\[[^\\]]*?\\]\\([^\\)]*?\\)|`[^`]*?`|<[^>]*?>",ve._overlapSkip="__[^_]*?__|\\*\\*\\[^\\*\\]*?\\*\\*",ve.em.start=Ue(ve.em.start).replace(/punctuation/g,ve._punctuation).getRegex(),ve.em.middle=Ue(ve.em.middle).replace(/punctuation/g,ve._punctuation).replace(/overlapSkip/g,ve._overlapSkip).getRegex(),ve.em.endAst=Ue(ve.em.endAst,"g").replace(/punctuation/g,ve._punctuation).getRegex(),ve.em.endUnd=Ue(ve.em.endUnd,"g").replace(/punctuation/g,ve._punctuation).getRegex(),ve.strong.start=Ue(ve.strong.start).replace(/punctuation/g,ve._punctuation).getRegex(),ve.strong.middle=Ue(ve.strong.middle).replace(/punctuation/g,ve._punctuation).replace(/blockSkip/g,ve._blockSkip).getRegex(),ve.strong.endAst=Ue(ve.strong.endAst,"g").replace(/punctuation/g,ve._punctuation).getRegex(),ve.strong.endUnd=Ue(ve.strong.endUnd,"g").replace(/punctuation/g,ve._punctuation).getRegex(),ve.blockSkip=Ue(ve._blockSkip,"g").getRegex(),ve.overlapSkip=Ue(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=Ue(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=Ue(ve.tag).replace("comment",we._comment).replace("attribute",ve._attribute).getRegex(),ve._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,ve._href=/<(?:\\[<>]?|[^\s<>\\])*>|[^\s\x00-\x1f]*/,ve._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,ve.link=Ue(ve.link).replace("label",ve._label).replace("href",ve._href).replace("title",ve._title).getRegex(),ve.reflink=Ue(ve.reflink).replace("label",ve._label).getRegex(),ve.reflinkSearch=Ue(ve.reflinkSearch,"g").replace("reflink",ve.reflink).replace("nolink",ve.nolink).getRegex(),ve.normal=Fe({},ve),ve.pedantic=Fe({},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:Ue(/^!?\[(label)\]\((.*?)\)/).replace("label",ve._label).getRegex(),reflink:Ue(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",ve._label).getRegex()}),ve.gfm=Fe({},ve.normal,{escape:Ue(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=Ue(ve.gfm.url,"i").replace("email",ve.gfm._extended_email).getRegex(),ve.breaks=Fe({},ve.gfm,{br:Ue(ve.br).replace("{2,}","*").getRegex(),text:Ue(ve.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()});var ze={block:we,inline:ve},at=X.defaults,nt=ze.block,et=ze.inline;function Ke(Ce){return Ce.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(Ce){var ce="",ge,te,ne=Ce.length;for(ge=0;ge<ne;ge++)te=Ce.charCodeAt(ge),Math.random()>.5&&(te="x"+te.toString(16)),ce+="&#"+te+";";return ce}var z=function(){function Ce(ge){this.tokens=[],this.tokens.links=Object.create(null),this.options=ge||at,this.options.tokenizer=this.options.tokenizer||new Ie,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;var te={block:nt.normal,inline:et.normal};this.options.pedantic?(te.block=nt.pedantic,te.inline=et.pedantic):this.options.gfm&&(te.block=nt.gfm,this.options.breaks?te.inline=et.breaks:te.inline=et.gfm),this.tokenizer.rules=te}Ce.lex=function(te,ne){var le=new Ce(ne);return le.lex(te)};var ce=Ce.prototype;return ce.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},ce.blockTokens=function(te,ne,le){ne===void 0&&(ne=[]),le===void 0&&(le=!0),te=te.replace(/^ +$/gm,"");for(var de,Re,Me,qe;te;){if(de=this.tokenizer.space(te)){te=te.substring(de.raw.length),de.type&&ne.push(de);continue}if(de=this.tokenizer.code(te,ne)){te=te.substring(de.raw.length),de.type?ne.push(de):(qe=ne[ne.length-1],qe.raw+=`
|
|
`+de.raw,qe.text+=`
|
|
`+de.text);continue}if(de=this.tokenizer.fences(te)){te=te.substring(de.raw.length),ne.push(de);continue}if(de=this.tokenizer.heading(te)){te=te.substring(de.raw.length),ne.push(de);continue}if(de=this.tokenizer.nptable(te)){te=te.substring(de.raw.length),ne.push(de);continue}if(de=this.tokenizer.hr(te)){te=te.substring(de.raw.length),ne.push(de);continue}if(de=this.tokenizer.blockquote(te)){te=te.substring(de.raw.length),de.tokens=this.blockTokens(de.text,[],le),ne.push(de);continue}if(de=this.tokenizer.list(te)){for(te=te.substring(de.raw.length),Me=de.items.length,Re=0;Re<Me;Re++)de.items[Re].tokens=this.blockTokens(de.items[Re].text,[],!1);ne.push(de);continue}if(de=this.tokenizer.html(te)){te=te.substring(de.raw.length),ne.push(de);continue}if(le&&(de=this.tokenizer.def(te))){te=te.substring(de.raw.length),this.tokens.links[de.tag]||(this.tokens.links[de.tag]={href:de.href,title:de.title});continue}if(de=this.tokenizer.table(te)){te=te.substring(de.raw.length),ne.push(de);continue}if(de=this.tokenizer.lheading(te)){te=te.substring(de.raw.length),ne.push(de);continue}if(le&&(de=this.tokenizer.paragraph(te))){te=te.substring(de.raw.length),ne.push(de);continue}if(de=this.tokenizer.text(te,ne)){te=te.substring(de.raw.length),de.type?ne.push(de):(qe=ne[ne.length-1],qe.raw+=`
|
|
`+de.raw,qe.text+=`
|
|
`+de.text);continue}if(te){var lt="Infinite loop on byte: "+te.charCodeAt(0);if(this.options.silent){console.error(lt);break}else throw new Error(lt)}}return ne},ce.inline=function(te){var ne,le,de,Re,Me,qe,lt=te.length;for(ne=0;ne<lt;ne++){qe=te[ne];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:[]},Re=qe.header.length,le=0;le<Re;le++)qe.tokens.header[le]=[],this.inlineTokens(qe.header[le],qe.tokens.header[le]);for(Re=qe.cells.length,le=0;le<Re;le++)for(Me=qe.cells[le],qe.tokens.cells[le]=[],de=0;de<Me.length;de++)qe.tokens.cells[le][de]=[],this.inlineTokens(Me[de],qe.tokens.cells[le][de]);break}case"blockquote":{this.inline(qe.tokens);break}case"list":{for(Re=qe.items.length,le=0;le<Re;le++)this.inline(qe.items[le].tokens);break}}}return te},ce.inlineTokens=function(te,ne,le,de,Re){ne===void 0&&(ne=[]),le===void 0&&(le=!1),de===void 0&&(de=!1),Re===void 0&&(Re="");var Me,qe=te,lt;if(this.tokens.links){var ft=Object.keys(this.tokens.links);if(ft.length>0)for(;(lt=this.tokenizer.rules.inline.reflinkSearch.exec(qe))!=null;)ft.includes(lt[0].slice(lt[0].lastIndexOf("[")+1,-1))&&(qe=qe.slice(0,lt.index)+"["+"a".repeat(lt[0].length-2)+"]"+qe.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(lt=this.tokenizer.rules.inline.blockSkip.exec(qe))!=null;)qe=qe.slice(0,lt.index)+"["+"a".repeat(lt[0].length-2)+"]"+qe.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;te;){if(Me=this.tokenizer.escape(te)){te=te.substring(Me.raw.length),ne.push(Me);continue}if(Me=this.tokenizer.tag(te,le,de)){te=te.substring(Me.raw.length),le=Me.inLink,de=Me.inRawBlock,ne.push(Me);continue}if(Me=this.tokenizer.link(te)){te=te.substring(Me.raw.length),Me.type==="link"&&(Me.tokens=this.inlineTokens(Me.text,[],!0,de)),ne.push(Me);continue}if(Me=this.tokenizer.reflink(te,this.tokens.links)){te=te.substring(Me.raw.length),Me.type==="link"&&(Me.tokens=this.inlineTokens(Me.text,[],!0,de)),ne.push(Me);continue}if(Me=this.tokenizer.strong(te,qe,Re)){te=te.substring(Me.raw.length),Me.tokens=this.inlineTokens(Me.text,[],le,de),ne.push(Me);continue}if(Me=this.tokenizer.em(te,qe,Re)){te=te.substring(Me.raw.length),Me.tokens=this.inlineTokens(Me.text,[],le,de),ne.push(Me);continue}if(Me=this.tokenizer.codespan(te)){te=te.substring(Me.raw.length),ne.push(Me);continue}if(Me=this.tokenizer.br(te)){te=te.substring(Me.raw.length),ne.push(Me);continue}if(Me=this.tokenizer.del(te)){te=te.substring(Me.raw.length),Me.tokens=this.inlineTokens(Me.text,[],le,de),ne.push(Me);continue}if(Me=this.tokenizer.autolink(te,re)){te=te.substring(Me.raw.length),ne.push(Me);continue}if(!le&&(Me=this.tokenizer.url(te,re))){te=te.substring(Me.raw.length),ne.push(Me);continue}if(Me=this.tokenizer.inlineText(te,de,Ke)){te=te.substring(Me.raw.length),Re=Me.raw.slice(-1),ne.push(Me);continue}if(te){var At="Infinite loop on byte: "+te.charCodeAt(0);if(this.options.silent){console.error(At);break}else throw new Error(At)}}return ne},G(Ce,null,[{key:"rules",get:function(){return{block:nt,inline:et}}}]),Ce}(),Y=X.defaults,J=P.cleanUrl,ie=P.escape,ue=function(){function Ce(ge){this.options=ge||Y}var ce=Ce.prototype;return ce.code=function(te,ne,le){var de=(ne||"").match(/\S*/)[0];if(this.options.highlight){var Re=this.options.highlight(te,de);Re!=null&&Re!==te&&(le=!0,te=Re)}return de?'<pre><code class="'+this.options.langPrefix+ie(de,!0)+'">'+(le?te:ie(te,!0))+`</code></pre>
|
|
`:"<pre><code>"+(le?te:ie(te,!0))+`</code></pre>
|
|
`},ce.blockquote=function(te){return`<blockquote>
|
|
`+te+`</blockquote>
|
|
`},ce.html=function(te){return te},ce.heading=function(te,ne,le,de){return this.options.headerIds?"<h"+ne+' id="'+this.options.headerPrefix+de.slug(le)+'">'+te+"</h"+ne+`>
|
|
`:"<h"+ne+">"+te+"</h"+ne+`>
|
|
`},ce.hr=function(){return this.options.xhtml?`<hr/>
|
|
`:`<hr>
|
|
`},ce.list=function(te,ne,le){var de=ne?"ol":"ul",Re=ne&&le!==1?' start="'+le+'"':"";return"<"+de+Re+`>
|
|
`+te+"</"+de+`>
|
|
`},ce.listitem=function(te){return"<li>"+te+`</li>
|
|
`},ce.checkbox=function(te){return"<input "+(te?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "},ce.paragraph=function(te){return"<p>"+te+`</p>
|
|
`},ce.table=function(te,ne){return ne&&(ne="<tbody>"+ne+"</tbody>"),`<table>
|
|
<thead>
|
|
`+te+`</thead>
|
|
`+ne+`</table>
|
|
`},ce.tablerow=function(te){return`<tr>
|
|
`+te+`</tr>
|
|
`},ce.tablecell=function(te,ne){var le=ne.header?"th":"td",de=ne.align?"<"+le+' align="'+ne.align+'">':"<"+le+">";return de+te+"</"+le+`>
|
|
`},ce.strong=function(te){return"<strong>"+te+"</strong>"},ce.em=function(te){return"<em>"+te+"</em>"},ce.codespan=function(te){return"<code>"+te+"</code>"},ce.br=function(){return this.options.xhtml?"<br/>":"<br>"},ce.del=function(te){return"<del>"+te+"</del>"},ce.link=function(te,ne,le){if(te=J(this.options.sanitize,this.options.baseUrl,te),te===null)return le;var de='<a href="'+ie(te)+'"';return ne&&(de+=' title="'+ne+'"'),de+=">"+le+"</a>",de},ce.image=function(te,ne,le){if(te=J(this.options.sanitize,this.options.baseUrl,te),te===null)return le;var de='<img src="'+te+'" alt="'+le+'"';return ne&&(de+=' title="'+ne+'"'),de+=this.options.xhtml?"/>":">",de},ce.text=function(te){return te},Ce}(),he=function(){function Ce(){}var ce=Ce.prototype;return ce.strong=function(te){return te},ce.em=function(te){return te},ce.codespan=function(te){return te},ce.del=function(te){return te},ce.html=function(te){return te},ce.text=function(te){return te},ce.link=function(te,ne,le){return""+le},ce.image=function(te,ne,le){return""+le},ce.br=function(){return""},Ce}(),He=function(){function Ce(){this.seen={}}var ce=Ce.prototype;return ce.slug=function(te){var ne=te.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-");if(this.seen.hasOwnProperty(ne)){var le=ne;do this.seen[le]++,ne=le+"-"+this.seen[le];while(this.seen.hasOwnProperty(ne))}return this.seen[ne]=0,ne},Ce}(),We=X.defaults,je=P.unescape,Ge=function(){function Ce(ge){this.options=ge||We,this.options.renderer=this.options.renderer||new ue,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new he,this.slugger=new He}Ce.parse=function(te,ne){var le=new Ce(ne);return le.parse(te)};var ce=Ce.prototype;return ce.parse=function(te,ne){ne===void 0&&(ne=!0);var le="",de,Re,Me,qe,lt,ft,At,Bt,St,it,Wt,Qt,It,qt,Ft,rr,kt,ut,lr=te.length;for(de=0;de<lr;de++){it=te[de];switch(it.type){case"space":continue;case"hr":{le+=this.renderer.hr();continue}case"heading":{le+=this.renderer.heading(this.parseInline(it.tokens),it.depth,je(this.parseInline(it.tokens,this.textRenderer)),this.slugger);continue}case"code":{le+=this.renderer.code(it.text,it.lang,it.escaped);continue}case"table":{for(Bt="",At="",qe=it.header.length,Re=0;Re<qe;Re++)At+=this.renderer.tablecell(this.parseInline(it.tokens.header[Re]),{header:!0,align:it.align[Re]});for(Bt+=this.renderer.tablerow(At),St="",qe=it.cells.length,Re=0;Re<qe;Re++){for(ft=it.tokens.cells[Re],At="",lt=ft.length,Me=0;Me<lt;Me++)At+=this.renderer.tablecell(this.parseInline(ft[Me]),{header:!1,align:it.align[Me]});St+=this.renderer.tablerow(At)}le+=this.renderer.table(Bt,St);continue}case"blockquote":{St=this.parse(it.tokens),le+=this.renderer.blockquote(St);continue}case"list":{for(Wt=it.ordered,Qt=it.start,It=it.loose,qe=it.items.length,St="",Re=0;Re<qe;Re++)Ft=it.items[Re],rr=Ft.checked,kt=Ft.task,qt="",Ft.task&&(ut=this.renderer.checkbox(rr),It?Ft.tokens.length>0&&Ft.tokens[0].type==="text"?(Ft.tokens[0].text=ut+" "+Ft.tokens[0].text,Ft.tokens[0].tokens&&Ft.tokens[0].tokens.length>0&&Ft.tokens[0].tokens[0].type==="text"&&(Ft.tokens[0].tokens[0].text=ut+" "+Ft.tokens[0].tokens[0].text)):Ft.tokens.unshift({type:"text",text:ut}):qt+=ut),qt+=this.parse(Ft.tokens,It),St+=this.renderer.listitem(qt,kt,rr);le+=this.renderer.list(St,Wt,Qt);continue}case"html":{le+=this.renderer.html(it.text);continue}case"paragraph":{le+=this.renderer.paragraph(this.parseInline(it.tokens));continue}case"text":{for(St=it.tokens?this.parseInline(it.tokens):it.text;de+1<lr&&te[de+1].type==="text";)it=te[++de],St+=`
|
|
`+(it.tokens?this.parseInline(it.tokens):it.text);le+=ne?this.renderer.paragraph(St):St;continue}default:{var wt='Token with "'+it.type+'" type was not found.';if(this.options.silent){console.error(wt);return}else throw new Error(wt)}}}return le},ce.parseInline=function(te,ne){ne=ne||this.renderer;var le="",de,Re,Me=te.length;for(de=0;de<Me;de++){Re=te[de];switch(Re.type){case"escape":{le+=ne.text(Re.text);break}case"html":{le+=ne.html(Re.text);break}case"link":{le+=ne.link(Re.href,Re.title,this.parseInline(Re.tokens,ne));break}case"image":{le+=ne.image(Re.href,Re.title,Re.text);break}case"strong":{le+=ne.strong(this.parseInline(Re.tokens,ne));break}case"em":{le+=ne.em(this.parseInline(Re.tokens,ne));break}case"codespan":{le+=ne.codespan(Re.text);break}case"br":{le+=ne.br();break}case"del":{le+=ne.del(this.parseInline(Re.tokens,ne));break}case"text":{le+=ne.text(Re.text);break}default:{var qe='Token with "'+Re.type+'" type was not found.';if(this.options.silent){console.error(qe);return}else throw new Error(qe)}}}return le},Ce}(),rt=P.merge,st=P.checkSanitizeDeprecation,Te=P.escape,De=X.getDefaults,Ve=X.changeDefaults,$e=X.defaults;function Ne(Ce,ce,ge){if(typeof Ce=="undefined"||Ce===null)throw new Error("marked(): input parameter is undefined or null");if(typeof Ce!="string")throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(Ce)+", string expected");if(typeof ce=="function"&&(ge=ce,ce=null),ce=rt({},Ne.defaults,ce||{}),st(ce),ge){var te=ce.highlight,ne;try{ne=z.lex(Ce,ce)}catch(Me){return ge(Me)}var le=function(qe){var lt;if(!qe)try{lt=Ge.parse(ne,ce)}catch(ft){qe=ft}return ce.highlight=te,qe?ge(qe):ge(null,lt)};if(!te||te.length<3)return le();if(delete ce.highlight,!ne.length)return le();var de=0;Ne.walkTokens(ne,function(Me){Me.type==="code"&&(de++,setTimeout(function(){te(Me.text,Me.lang,function(qe,lt){if(qe)return le(qe);lt!=null&<!==Me.text&&(Me.text=lt,Me.escaped=!0),de--,de===0&&le()})},0))}),de===0&&le();return}try{var Re=z.lex(Ce,ce);return ce.walkTokens&&Ne.walkTokens(Re,ce.walkTokens),Ge.parse(Re,ce)}catch(Me){if(Me.message+=`
|
|
Please report this to https://github.com/markedjs/marked.`,ce.silent)return"<p>An error occurred:</p><pre>"+Te(Me.message+"",!0)+"</pre>";throw Me}}Ne.options=Ne.setOptions=function(Ce){return rt(Ne.defaults,Ce),Ve(Ne.defaults),Ne},Ne.getDefaults=De,Ne.defaults=$e,Ne.use=function(Ce){var ce=rt({},Ce);if(Ce.renderer&&function(){var te=Ne.defaults.renderer||new ue,ne=function(Re){var Me=te[Re];te[Re]=function(){for(var qe=arguments.length,lt=new Array(qe),ft=0;ft<qe;ft++)lt[ft]=arguments[ft];var At=Ce.renderer[Re].apply(te,lt);return At===!1&&(At=Me.apply(te,lt)),At}};for(var le in Ce.renderer)ne(le);ce.renderer=te}(),Ce.tokenizer&&function(){var te=Ne.defaults.tokenizer||new Ie,ne=function(Re){var Me=te[Re];te[Re]=function(){for(var qe=arguments.length,lt=new Array(qe),ft=0;ft<qe;ft++)lt[ft]=arguments[ft];var At=Ce.tokenizer[Re].apply(te,lt);return At===!1&&(At=Me.apply(te,lt)),At}};for(var le in Ce.tokenizer)ne(le);ce.tokenizer=te}(),Ce.walkTokens){var ge=Ne.defaults.walkTokens;ce.walkTokens=function(te){Ce.walkTokens(te),ge&&ge(te)}}Ne.setOptions(ce)},Ne.walkTokens=function(Ce,ce){for(var ge=N(Ce),te;!(te=ge()).done;){var ne=te.value;ce(ne);switch(ne.type){case"table":{for(var le=N(ne.tokens.header),de;!(de=le()).done;){var Re=de.value;Ne.walkTokens(Re,ce)}for(var Me=N(ne.tokens.cells),qe;!(qe=Me()).done;)for(var lt=qe.value,ft=N(lt),At;!(At=ft()).done;){var Bt=At.value;Ne.walkTokens(Bt,ce)}break}case"list":{Ne.walkTokens(ne.items,ce);break}default:ne.tokens&&Ne.walkTokens(ne.tokens,ce)}}},Ne.Parser=Ge,Ne.parser=Ge.parse,Ne.Renderer=ue,Ne.TextRenderer=he,Ne.Lexer=z,Ne.lexer=z.lex,Ne.Tokenizer=Ie,Ne.Slugger=He,Ne.parse=Ne;var Pe=Ne;return Pe})},F0VM:function(ct,_e,K){ct.exports={flex_box_center:"flex_box_center___2fDN3",flex_space_between:"flex_space_between___BHBBv",flex_box_vertical_center:"flex_box_vertical_center___tpxsE",flex_box_center_end:"flex_box_center_end___rP7bQ",flex_box_column:"flex_box_column___1_rF-",md:"md___3SObb",title:"title___HfZ1b"}},FJUb:function(ct,_e,K){"use strict";K.r(_e);var oe=K("cWXX"),G=K("/ezw"),D=K("g9YV"),j=K("wCAj"),N=K("miYZ"),O=K("tsqr"),X=K("/zsF"),M=K("PArb"),e=K("+L6B"),R=K("2/Rp"),f=K("14J3"),v=K("BMrR"),u=K("jCWc"),s=K("kPKH"),i=K("sPJy"),A=K("bE4q"),o=K("2qtc"),a=K("kLXV"),r=K("9og8"),t=K("Pv/L"),_=K("k1fw"),y=K("tJVT"),b=K("PpiC"),x=K("WmNS"),E=K.n(x),d=K("q1tI"),n=K.n(d),l=K("xOOu"),h=K.n(l),w=K("Ty5D"),g=K("9kvl"),c=K("55Ip"),L=K("jhfD"),F=K("CTES"),B=K("RCxd"),P=K("/MfK"),W=K("m3rI"),U=K("xKgJ"),$=K("1vsH"),ee=K("GeSD"),pe=K.n(ee),fe=K("deN7"),Le=K("ErOA"),Ie=K("J66h"),xe=function(he){var He=he.shixunHomeworks,We=he.autoHeight,je=he.dispatch,Ge=He.shixunWorkReport,rt=Ge.stage_list,st=Ge.work_id,Te=Object(w.i)(),De=Object(U.c)(),Ve=[{title:"\u8BC4\u6D4B\u6B21\u6570",dataIndex:"query_index",width:120},{title:"\u8BE6\u7EC6\u7ED3\u679C",dataIndex:"result",render:function(Ce,ce,ge){return Ie.Base64.decode(Ce)||"- -"}}];function $e(Pe,Ce){return Object(Le.c)("student_works/".concat(st,"/rep_passed_content.json"),{path:Ce,game_id:Pe})}var Ne=Object($.p)(5,Ge.hack);return n.a.createElement(n.a.Fragment,null,Ne==null?void 0:Ne.map(function(Pe,Ce){return n.a.createElement("div",{key:Ce},Pe.map(function(ce,ge){var te;return n.a.createElement("aside",{className:"pl30 pr30",key:ge},n.a.createElement("div",{className:"".concat(pe.a.shixunTitle," mt10")},n.a.createElement("div",{style:{display:"flex",width:"100%"}},n.a.createElement("span",{className:"fa fa-code "}),n.a.createElement("strong",{style:{flex:1},className:"c-black"},"\u7B2C",Ce*5+ge+1,"\u9898 ",ce.name),ce.is_finish&&n.a.createElement(c.a,{style:{marginLeft:20},onClick:function(le){le.preventDefault(),window.open(ce==null?void 0:ce.url),localStorage.setItem("program_homework",[Te.coursesId,Te.categoryId])},to:"".concat(ce==null?void 0:ce.url)},"\u67E5\u770B\u7B54\u9898\u8BE6\u60C5>>"))),n.a.createElement("div",{className:"font16 mt10"},ce.is_finish===!1&&"\u672C\u5173\u6682\u672A\u901A\u8FC7\uFF0C\u65E0\u901A\u5173\u4EE3\u7801",ce.is_finish&&n.a.createElement("aside",{className:pe.a.shixunWrp},n.a.createElement(fe.a,{v:ce,shixunWorkReport:Ge,dispatch:je,autoHeight:We,languages:ce.languages,language:ce.language,game_id:ce.id,data:Ie.Base64.decode(ce.code),diff_code_count:ce.diff_code_count,onPathChange:$e}))),n.a.createElement("aside",{className:"mt10 font16"},(te=ce.history)!==null&&te!==void 0&&te.length?n.a.createElement(j.a,{columns:Ve,pagination:{hideOnSinglePage:!0},dataSource:ce.history}):"\u672C\u5173\u65E0\u8BC4\u6D4B\u8BB0\u5F55"))}))}))},Ue=Object(g.a)(function(ue){var he=ue.shixunHomeworks,He=ue.loading,We=ue.globalSetting;return{shixunHomeworks:he,globalSetting:We,loading:He.effects}})(xe),Fe=K("5NDa"),we=K("5rEg"),ve=K("y8nQ"),ze=K("Vl3Y"),at=function(he){var He,We,je,Ge=he.shixunHomeworks,rt=he.dispatch,st=Object(b.a)(he,["shixunHomeworks","dispatch"]),Te=Object(w.i)(),De=Object(d.useState)(!1),Ve=Object(y.a)(De,2),$e=Ve[0],Ne=Ve[1],Pe=ze.a.useForm(),Ce=Object(y.a)(Pe,1),ce=Ce[0];Object(d.useEffect)(function(){if(Ge.actionTabs.key==="\u66F4\u6539\u70B9\u8BC4")if(Ge.actionTabs.selectArrs.type==="1")ce.setFieldsValue({comment:Ge.actionTabs.selectArrs.v.comment,hidden_comment:Ge.actionTabs.selectArrs.v.hidden_comment});else{var te,ne,le,de,Re,Me;ce.setFieldsValue({comment:(te=Ge.actionTabs.selectArrs)===null||te===void 0||((ne=te.data)===null||ne===void 0||((le=ne.data)===null||le===void 0))?void 0:le.work_comment,hidden_comment:(de=Ge.actionTabs.selectArrs)===null||de===void 0||((Re=de.data)===null||Re===void 0||((Me=Re.data)===null||Me===void 0))?void 0:Me.work_comment_hidden})}},[Ge.actionTabs.key]);var ge=function(){var te=Object(r.a)(E.a.mark(function ne(){var le,de,Re,Me,qe,lt,ft;return E.a.wrap(function(Bt){for(;;)switch(Bt.prev=Bt.next){case 0:return qe=ce.getFieldValue(),lt=Ge.actionTabs.selectArrs.type==="1"?"/api/problems/".concat(Ge.actionTabs.selectArrs.v.identifier,"/hack_comment.json"):"/api/student_works/".concat(Te.homeworkId,"/shixun_work_comment.json"),Bt.next=4,Object(Le.a)(lt,{method:"post",body:{hidden_comment:qe.hidden_comment,comment:qe.comment,language:(le=Ge.actionTabs.selectArrs)===null||le===void 0?void 0:le.language,user_id:(de=Ge.actionTabs.selectArrs)===null||de===void 0||((Re=de.data)===null||Re===void 0||((Me=Re.data)===null||Me===void 0))?void 0:Me.user_id}});case 4:ft=Bt.sent,ft.status===0&&(O.b.success("\u8BC4\u9605\u6210\u529F"),ce.resetFields(),rt({type:"shixunHomeworks/setActionTabs",payload:{}}),rt({type:"shixunHomeworks/getShixunWorkReports",payload:Object(_.a)({},Te)}));case 6:case"end":return Bt.stop()}},ne)}));return function(){return te.apply(this,arguments)}}();return n.a.createElement(n.a.Fragment,null,n.a.createElement(a.a,{centered:!0,title:n.a.createElement("span",null,((He=Ge.actionTabs.selectArrs)===null||He===void 0?void 0:He.type)==="1"?"\u70B9\u8BC4\u4EE3\u7801":"\u66F4\u6539\u70B9\u8BC4",((We=Ge.actionTabs.selectArrs)===null||We===void 0?void 0:We.language)&&n.a.createElement("span",{style:{marginLeft:10,fontSize:14}},"\u4F7F\u7528\u8BED\u8A00\uFF1A",(je=Ge.actionTabs.selectArrs)===null||je===void 0?void 0:je.language)),visible:Ge.actionTabs.key==="\u66F4\u6539\u70B9\u8BC4",okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",onOk:Object(r.a)(E.a.mark(function te(){var ne;return E.a.wrap(function(de){for(;;)switch(de.prev=de.next){case 0:ne=ce.getFieldValue(),JSON.stringify(ne)==="{}"||ne.hidden_comment===""&&ne.comment===""?Ne(!0):ge();case 2:case"end":return de.stop()}},te)})),onCancel:function(){rt({type:"shixunHomeworks/setActionTabs",payload:{}})}},n.a.createElement(ze.a,{form:ce,onChange:function(){$e&&Ne(!1)}},n.a.createElement("p",null,"\u5B66\u751F\u548C\u8BFE\u5802\u8001\u5E08\u53EF\u89C1"),n.a.createElement(ze.a.Item,{name:"comment"},n.a.createElement(we.a.TextArea,{placeholder:"\u8BF7\u8F93\u5165\u8BC4\u9605\u5185\u5BB9",rows:8})),n.a.createElement("p",null,"\u4EC5\u8BFE\u5802\u8001\u5E08\u53EF\u89C1"),n.a.createElement(ze.a.Item,{name:"hidden_comment"},n.a.createElement(we.a.TextArea,{placeholder:"\u8BF7\u8F93\u5165\u8BC4\u9605\u5185\u5BB9",rows:8}))),$e&&n.a.createElement("p",{className:"c-red"},"\u8BC4\u9605\u5185\u5BB9\u81F3\u5C11\u6709\u4E00\u4E2A\u4E0D\u4E3A\u7A7A")))},nt=Object(g.a)(function(ue){var he=ue.shixunHomeworks;return{shixunHomeworks:he}})(at),et=K("T7RX"),Ke=K("9Bee"),re=K("XYT7"),z=K("1n7x"),Y=K.n(z),J=function(he){var He,We,je,Ge,rt,st,Te,De,Ve,$e,Ne,Pe,Ce,ce,ge,te,ne,le,de,Re,Me,qe,lt,ft,At,Bt,St,it,Wt,Qt,It,qt=he.shixunHomeworks,Ft=he.globalSetting,rr=he.loading,kt=he.dispatch,ut=Object(b.a)(he,["shixunHomeworks","globalSetting","loading","dispatch"]),lr=Object(d.useState)(Object(_.a)({},Object(w.i)())),wt=Object(y.a)(lr,2),dt=wt[0],Dt=wt[1],dr=Object(w.i)(),xr=Object(d.useState)([]),Tr=Object(t.a)(xr),Pr=Object(d.useState)({last:!1}),kr=Object(y.a)(Pr,2),Gt=kr[0],fr=kr[1],Qr=Object(d.useState)({last:!1}),pr=Object(y.a)(Qr,2),Kr=pr[0],Dr=pr[1],ae=Object(d.useRef)(),se=Object(d.useRef)(),me=Object(d.useState)(!1),Se=Object(y.a)(me,2),Ye=Se[0],tt=Se[1],H=Object(d.useState)(!1),m=Object(y.a)(H,2),C=m[0],k=m[1],Z=Object(d.useState)(!1),Q=Object(y.a)(Z,2),ye=Q[0],Qe=Q[1],Be=qt.shixunWorkReport,ot=Object(U.c)(),Xe=Object(d.useState)(new h.a),mt=Object(y.a)(Xe,2),pt=mt[0],Et=mt[1],Rt=Object(d.useState)(0),ir=Object(y.a)(Rt,2),Nt=ir[0],er=ir[1],Ot=Object(d.useState)([]),mr=Object(y.a)(Ot,2),Kt=mr[0],_r=mr[1],gr=Object(d.useState)(!1),Sr=Object(y.a)(gr,2),Ir=Sr[0],vr=Sr[1],yr=Object(d.useState)(!1),Er=Object(y.a)(yr,2),Rr=Er[0],Br=Er[1];Object(d.useEffect)(function(){return kt({type:"globalSetting/footerToggle",payload:!1}),function(){kt({type:"globalSetting/footerToggle",payload:!0})}},[]),Object(d.useEffect)(function(){qt.actionTabs.key==="\u5BFC\u51FA\u5B9E\u8BAD\u62A5\u544A"&&Kt.length>0&&tr("all")},[Kt]),Object(d.useEffect)(function(){Dt(Object(_.a)({},dr))},[ut.location.pathname]);var Ur=function(){document.body.scrollIntoView()};function Fr(){return or.apply(this,arguments)}function or(){return or=Object(r.a)(E.a.mark(function Mt(){var Ht,Lt,nr,xt,Jt,Vt,nn;return E.a.wrap(function(vn){for(;;)switch(vn.prev=vn.next){case 0:return nr=JSON.parse(sessionStorage.all_student_works_params||"{}"),vn.next=3,kt({type:"shixunHomeworks/getAllStudentWorks",payload:Object(_.a)(Object(_.a)({},dt),nr)});case 3:xt=vn.sent,_r(xt.all_student_works),Jt=(Ht=xt.all_student_works)===null||Ht===void 0?void 0:Ht.map(function(zr){return String(zr.user_id)}).indexOf(dt.homeworkId),Jt===((Lt=xt.all_student_works)===null||Lt===void 0?void 0:Lt.length)-1?fr({last:!0}):fr((Vt=xt.all_student_works)===null||Vt===void 0?void 0:Vt[Jt+1]),Jt===0?Dr({last:!0}):Dr((nn=xt.all_student_works)===null||nn===void 0?void 0:nn[Jt-1]);case 8:case"end":return vn.stop()}},Mt)})),or.apply(this,arguments)}var Xt=function(){document.querySelectorAll("canvas").forEach(function(Ht){(!Ht.clientWidth||!Ht.clientHeight)&&Ht.remove()})},Ut=function(){ae.current.offsetHeight>62e3?Qe(!1):Qe(!0)},tr=function(){var Mt=Object(r.a)(E.a.mark(function Ht(Lt){var nr,xt,Jt,Vt,nn,an;return E.a.wrap(function(zr){for(;;)switch(zr.prev=zr.next){case 0:if(nn=function(){return nn=Object(r.a)(E.a.mark(function sn(){var Xr;return E.a.wrap(function(Lr){for(;;)switch(Lr.prev=Lr.next){case 0:return Lr.next=2,kt({type:"shixunHomeworks/getShixunWorkReports",payload:{homeworkId:Kt[nr].user_id}});case 2:Xr=Lr.sent,Ur(),nr++,setTimeout(Object(r.a)(E.a.mark(function un(){var Zr,bn,_n,qr,tn,on,hn;return E.a.wrap(function(jr){for(;;)switch(jr.prev=jr.next){case 0:Xt(),bn=pt.folder("".concat(Xr==null?void 0:Xr.username)),_n=document.querySelector("#export-all").children,qr=Y()(),tn=E.a.mark(function An(wn){return E.a.wrap(function(jt){for(;;)switch(jt.prev=jt.next){case 0:return jt.next=2,qr.set(Jt).from(_n[wn]).toContainer().toCanvas().toPdf().get("pdf").then(function(){var zt=Object(r.a)(E.a.mark(function Nr(en){return E.a.wrap(function(Cn){for(;;)switch(Cn.prev=Cn.next){case 0:if(!(wn<_n.length-1)){Cn.next=3;break}return Cn.next=3,en.addPage();case 3:case"end":return Cn.stop()}},Nr)}));return function(Nr){return zt.apply(this,arguments)}}());case 2:case"end":return jt.stop()}},An)}),on=0;case 6:if(!(on<_n.length)){jr.next=11;break}return jr.delegateYield(tn(on),"t0",8);case 8:on++,jr.next=6;break;case 11:bn.file("".concat(Kt[nr-1].student_work_user_name).concat(nr,".pdf"),qr.output("blob")),hn=bn.folder("\u4EE3\u7801\u6587\u4EF6"),Xr==null||((Zr=Xr.shixun_detail)===null||Zr===void 0)||Zr.map(function(An,wn){var Rn,jt=hn.folder("\u7B2C".concat(wn+1,"\u5173-").concat(An.subject,"-").concat(An.id));An==null||((Rn=An.game_codes)===null||Rn===void 0)||Rn.map(function(zt){jt.file("".concat(zt.filename,".txt"),zt==null?void 0:zt.content)})}),xt.update({content:n.a.createElement("div",null,"\u5F53\u524D\u8FDB\u5EA6: ",n.a.createElement("span",{className:"c-blue"},nr),"/",Kt==null?void 0:Kt.length,n.a.createElement("br",null),"\u8BF7\u52FF\u5173\u95ED\u6D4F\u89C8\u5668\u7A97\u53E3")}),nr==(Kt==null?void 0:Kt.length)?(xt.destroy(),Yt()):Vt();case 16:case"end":return jr.stop()}},un)})),2200);case 6:case"end":return Lr.stop()}},sn)})),nn.apply(this,arguments)},Vt=function(){return nn.apply(this,arguments)},nr=0,xt=a.a.info({width:460,title:n.a.createElement("div",null,"\u6B63\u5728\u5BFC\u51FA\u5B9E\u8BAD\u62A5\u544A,",n.a.createElement("span",{className:"c-red"},"\u8BF7\u52FF\u5173\u95ED\u6216\u64CD\u4F5C\u5F53\u524D\u6D4F\u89C8\u5668\u7A97\u53E3")),content:n.a.createElement("div",null,"\u5F53\u524D\u8FDB\u5EA6: ",n.a.createElement("span",{className:"c-blue"},nr+1),"/",Lt!=="all"?1:Kt==null?void 0:Kt.length,n.a.createElement("br",null),"\u8BF7\u52FF\u5173\u95ED\u6D4F\u89C8\u5668\u7A97\u53E3"),maskClosable:!1,className:pe.a.modal,onOk:function(){}}),Jt={margin:[0,0],filename:"".concat(Be.username,".pdf"),html2canvas:{useCORS:!0,letterRendering:!0},jsPDF:{unit:"mm",format:"a4",orientation:"landscape"}},!(Lt!=="all"||(Kt==null?void 0:Kt.length)<2)){zr.next=12;break}return zr.delegateYield(E.a.mark(function $r(){var sn,Xr,In,Lr,un,Zr,bn;return E.a.wrap(function(qr){for(;;)switch(qr.prev=qr.next){case 0:Xt(),Ur(),Xr=se.current.children,In=Y()(),Lr=pt.folder("".concat(Be==null?void 0:Be.username)),un=E.a.mark(function tn(on){return E.a.wrap(function(yn){for(;;)switch(yn.prev=yn.next){case 0:return yn.next=2,In.set(Jt).from(Xr[on]).toContainer().toCanvas().toPdf().get("pdf").then(function(){var jr=Object(r.a)(E.a.mark(function An(wn){return E.a.wrap(function(jt){for(;;)switch(jt.prev=jt.next){case 0:if(!(on<Xr.length-1)){jt.next=3;break}return jt.next=3,wn.addPage();case 3:case"end":return jt.stop()}},An)}));return function(An){return jr.apply(this,arguments)}}());case 2:case"end":return yn.stop()}},tn)}),Zr=0;case 7:if(!(Zr<Xr.length)){qr.next=12;break}return qr.delegateYield(un(Zr),"t0",9);case 9:Zr++,qr.next=7;break;case 12:return tt(!1),Lr.file("".concat(Be.username,".pdf"),In.output("blob"),{base64:!1}),bn=Lr.folder("\u4EE3\u7801\u6587\u4EF6"),Be==null||((sn=Be.shixun_detail)===null||sn===void 0)||sn.map(function(tn,on){var hn,yn=bn.folder("\u7B2C".concat(on+1,"\u5173-").concat(tn.subject,"-").concat(tn.id));tn==null||((hn=tn.game_codes)===null||hn===void 0)||hn.map(function(jr){yn.file("".concat(jr.filename,".txt"),jr==null?void 0:jr.content)})}),xt.destroy(),Yt(),qr.abrupt("return",{v:void 0});case 19:case"end":return qr.stop()}},$r)})(),"t0",7);case 7:if(an=zr.t0,!(typeof an=="object")){zr.next=10;break}return zr.abrupt("return",an.v);case 10:zr.next=13;break;case 12:Vt();case 13:case"end":return zr.stop()}},Ht)}));return function(Lt){return Mt.apply(this,arguments)}}(),Yt=function(){pt.generateAsync({type:"blob"}).then(function(Ht){var Lt=document.createElement("a");Lt.href=window.URL.createObjectURL(Ht),Lt.download=Be.course_name+".zip",document.body.appendChild(Lt);var nr=document.createEvent("MouseEvents");nr.initEvent("click",!1,!1),Lt.dispatchEvent(nr),document.body.removeChild(Lt),Et(new h.a)}),Qe(!1)};Object(d.useEffect)(function(){wr()},[dt.homeworkId]);var wr=function(){var Mt=Object(r.a)(E.a.mark(function Ht(){return E.a.wrap(function(nr){for(;;)switch(nr.prev=nr.next){case 0:return k(!0),nr.next=3,kt({type:"shixunHomeworks/getShixunWorkReports",payload:Object(_.a)({},dt)});case 3:k(!1),Object(U.c)()&&Fr();case 5:case"end":return nr.stop()}},Ht)}));return function(){return Mt.apply(this,arguments)}}(),ar=[{title:"\u9898\u53F7",dataIndex:"name",render:function(Ht,Lt,nr){return nr+1}},{title:"\u9898\u76EE\u540D\u79F0",dataIndex:"name",ellipsis:!0,width:"30%"},{title:"\u5B8C\u6210\u65F6\u95F4",dataIndex:"finish_time",width:"200px",render:function(Ht,Lt,nr){var xt,Jt;return n.a.createElement("div",null,n.a.createElement("p",null,Ht||"- -"),Lt==null||((xt=Lt.subitem)===null||xt===void 0||((Jt=xt.map(function(Vt){return Vt.finish_time}))===null||Jt===void 0))?void 0:Jt.map(function(Vt){return n.a.createElement("p",null,Vt||"- -")}))}},{title:"\u8BC4\u6D4B\u6B21\u6570",dataIndex:"submit_count",render:function(Ht,Lt,nr){var xt,Jt;return n.a.createElement("div",null,n.a.createElement("p",null,Ht||"- -"),Lt==null||((xt=Lt.subitem)===null||xt===void 0||((Jt=xt.map(function(Vt){return Vt.submit_count}))===null||Jt===void 0))?void 0:Jt.map(function(Vt){return n.a.createElement("p",null,Vt||"- -")}))}},{title:"\u8FD0\u884C\u65F6\u95F4\uFF08ms\uFF09",dataIndex:"run_time",render:function(Ht,Lt,nr){var xt,Jt;return n.a.createElement("div",null,n.a.createElement("p",null,Ht||"- -"),Lt==null||((xt=Lt.subitem)===null||xt===void 0||((Jt=xt.map(function(Vt){return Vt.run_time}))===null||Jt===void 0))?void 0:Jt.map(function(Vt){return n.a.createElement("p",null,Vt||"- -")}))}},{title:"\u5185\u5B58\uFF08kb\uFF09",dataIndex:"memory",render:function(Ht,Lt,nr){var xt,Jt;return n.a.createElement("div",null,n.a.createElement("p",null,Ht||"- -"),Lt==null||((xt=Lt.subitem)===null||xt===void 0||((Jt=xt.map(function(Vt){return Vt.memory}))===null||Jt===void 0))?void 0:Jt.map(function(Vt){return n.a.createElement("p",null,Vt||"- -")}))}},{title:"\u4F7F\u7528\u8BED\u8A00",dataIndex:"language",render:function(Ht,Lt,nr){var xt,Jt;return n.a.createElement("div",null,n.a.createElement("p",null,Ht||"- -"),Lt==null||((xt=Lt.subitem)===null||xt===void 0||((Jt=xt.map(function(Vt){return Vt.language}))===null||Jt===void 0))?void 0:Jt.map(function(Vt){return n.a.createElement("p",null,Vt||"- -")}))}},{title:"\u5F97\u5206",dataIndex:"score",render:function(Ht,Lt,nr){return n.a.createElement("div",null,n.a.createElement("p",null,Ht||"- -"))}},{title:"\u6392\u540D",dataIndex:"rank",render:function(Ht,Lt,nr){var xt,Jt;return n.a.createElement("div",null,n.a.createElement("p",null,Ht||"- -"),Lt==null||((xt=Lt.subitem)===null||xt===void 0||((Jt=xt.map(function(Vt){return Vt.rank}))===null||Jt===void 0))?void 0:Jt.map(function(Vt){return n.a.createElement("p",null,Vt||"- -")}))}}],gn=function(Ht){kt({type:"shixunHomeworks/setActionTabs",payload:{key:"",type:2}}),setTimeout(function(){Ht==="next"?g.d.push("/classrooms/".concat(dt.coursesId,"/program_homework/").concat(dt.categoryId,"/").concat(Gt==null?void 0:Gt.student_work_id,"/").concat(Gt==null?void 0:Gt.user_id,"/comment")):g.d.push("/classrooms/".concat(dt.coursesId,"/program_homework/").concat(dt.categoryId,"/").concat(Gt==null?void 0:Gt.student_work_id,"/").concat(Kr==null?void 0:Kr.user_id,"/comment"))},200)};return n.a.createElement("section",{className:"bg-fafafa",style:{position:"sticky",top:0}},n.a.createElement("div",{className:"edu-container mt10",style:{paddingBottom:100}},n.a.createElement(G.a,{loading:C,active:!0,avatar:{size:40},paragraph:{rows:5}},n.a.createElement("div",{className:"edu-container"},(Be==null||((He=Be.category)===null||He===void 0)?void 0:He.course_id)&&n.a.createElement("section",{className:"animated fadeIn"},n.a.createElement("aside",{className:""},(Be==null?void 0:Be.category)&&n.a.createElement(A.a,{separator:">"},n.a.createElement(A.a.Item,null,n.a.createElement(c.a,{to:"/classrooms/".concat(Be==null||((We=Be.category)===null||We===void 0)?void 0:We.course_id,"/program_homework")},Be==null||((je=Be.category)===null||je===void 0)?void 0:je.course_name)),n.a.createElement(A.a.Item,null,n.a.createElement(c.a,{to:"/classrooms/".concat(Be==null||((Ge=Be.category)===null||Ge===void 0)?void 0:Ge.course_id,"/program_homework")},Be.category.category_name)),n.a.createElement(A.a.Item,null,n.a.createElement(c.a,{to:"/classrooms/".concat(Be==null||((rt=Be.category)===null||rt===void 0)?void 0:rt.course_id,"/program_homework/").concat(dt==null?void 0:dt.categoryId,"/detail")},"\u4F5C\u4E1A\u8BE6\u60C5")),n.a.createElement(A.a.Item,null,Be==null||((st=Be.data)===null||st===void 0)?void 0:st.user_name))),n.a.createElement("aside",{className:[pe.a.title1,"mt20"].join(" ")},n.a.createElement(v.a,{align:"middle"},n.a.createElement(s.a,{flex:1},n.a.createElement(c.a,{to:"/classrooms/".concat(dt.coursesId,"/program_homework/").concat(dt==null?void 0:dt.categoryId,"/detail")},n.a.createElement(L.a,{className:"font16 c-black"})),n.a.createElement("strong",{className:"font20 ml5"},Be==null||((Te=Be.category)===null||Te===void 0)?void 0:Te.homework_name),n.a.createElement($.m,{temporary:!0,status:Be.homework_status}))))),n.a.createElement("aside",{className:"mt30 relative"})),n.a.createElement("aside",{className:"edu-container bg-white",ref:ae},n.a.createElement("div",{id:"export-all",ref:se},n.a.createElement("div",{id:"export-all-1"},n.a.createElement("div",{className:pe.a.title},n.a.createElement("h1",null,"\u603B\u4F53\u8BC4\u4EF7"),n.a.createElement("div",null,Object(U.c)()&&n.a.createElement(R.a,{className:"mr20",type:"primary",onClick:function(){kt({type:"shixunHomeworks/setActionTabs",payload:{key:"\u66F4\u6539\u70B9\u8BC4",selectArrs:{myshixun_identifier:Be.user_id,data:Object(_.a)({},Be)}}})}},n.a.createElement(F.a,null),Be!=null&&(De=Be.data)!==null&&De!==void 0&&De.has_comment?"\u66F4\u6539\u70B9\u8BC4":"\u70B9\u8BC4\u4F5C\u4E1A"))),n.a.createElement(M.a,{style:{marginTop:0}}),n.a.createElement(v.a,{className:"pl30 pr30"},n.a.createElement(s.a,null,n.a.createElement("img",{className:pe.a.userPic,src:"".concat(W.a.IMG_SERVER,"/images/").concat(Be==null||((Ve=Be.data)===null||Ve===void 0)?void 0:Ve.image_url),alt:Be==null||(($e=Be.data)===null||$e===void 0)?void 0:$e.username})),n.a.createElement(s.a,null,n.a.createElement("span",{className:"font16 ml40"},Be==null||((Ne=Be.data)===null||Ne===void 0)?void 0:Ne.user_name),n.a.createElement($.e,{status:Be==null||((Pe=Be.data)===null||Pe===void 0)?void 0:Pe.compelete_status}),n.a.createElement("ul",{className:pe.a.userInfo},n.a.createElement("li",null,"\u5B66\u53F7\uFF1A",(Be==null||((Ce=Be.data)===null||Ce===void 0)?void 0:Ce.student_id)||"--"),n.a.createElement("li",null,"\u5206\u73ED\uFF1A",(Be==null||((ce=Be.data)===null||ce===void 0)?void 0:ce.course_group)||"--"),n.a.createElement("br",null),n.a.createElement("li",null,"\u622A\u6B62\u524D\u5B8C\u6210\u5237\u9898\uFF1A",n.a.createElement("span",{className:"c-red"},Be==null||((ge=Be.data)===null||ge===void 0)?void 0:ge.finish_do)),n.a.createElement("li",null,"\u6700\u65B0\u5B8C\u6210\u5237\u9898\uFF1A",n.a.createElement("span",{className:"c-red"},(Be==null||((te=Be.data)===null||te===void 0)?void 0:te.latest_do)||"-")))),n.a.createElement("ul",{className:[pe.a.listItem,"mt10"].join(" ")},n.a.createElement("li",null,n.a.createElement("strong",null,"\u5B8C\u6210\u65F6\u95F4"),n.a.createElement("div",{className:"c-light-black mt20"},(Be==null?void 0:Be.data)&&(Be==null||((ne=Be.data)===null||ne===void 0)?void 0:ne.finish_time))),n.a.createElement("li",null,n.a.createElement("strong",null,"\u5B8C\u6210\u65F6\u957F",n.a.createElement("i",{onClick:function(Ht){Ht.stopPropagation(),Ht.preventDefault(),Br(!0)},style:{marginLeft:4,display:"none",color:"#145DFF",fontSize:16,cursor:"pointer"},className:"iconfont icon-tishixiaowenhao"})),n.a.createElement("div",{className:"c-light-black mt20"},Be==null||((le=Be.data)===null||le===void 0)?void 0:le.finish_time_long)),n.a.createElement("li",null,n.a.createElement("strong",null,"\u8BC4\u6D4B\u6B21\u6570"),n.a.createElement("div",{className:"mt20"},Be==null||((de=Be.data)===null||de===void 0)?void 0:de.submit_count)),n.a.createElement("li",null,n.a.createElement("strong",null,"\u901A\u8FC7\u7387"),n.a.createElement("div",{className:"mt20"},n.a.createElement("span",null,(Be==null||((Re=Be.data)===null||Re===void 0)?void 0:Re.pass_rate)||"- -"))),n.a.createElement("li",null,n.a.createElement("strong",null,"\u5F97\u5206"),n.a.createElement("div",{className:"mt20"},n.a.createElement("span",{className:"c-orange"},Be==null||((Me=Be.data)===null||Me===void 0)?void 0:Me.score))),n.a.createElement("li",null,n.a.createElement("strong",null,"\u7EC3\u4E60\u603B\u6392\u540D"),n.a.createElement("div",{className:"mt20"},n.a.createElement("span",{className:"c-orange"},Be==null||((qe=Be.data)===null||qe===void 0)?void 0:qe.total_rank))),n.a.createElement("li",null,n.a.createElement("strong",null,"\u5206\u73ED\u6392\u540D"),n.a.createElement("div",{className:"mt20"},n.a.createElement("span",{className:"c-orange"},Be==null||((lt=Be.data)===null||lt===void 0)?void 0:lt.class_rank))))),n.a.createElement(M.a,{style:{margin:0}}),((Be==null||((ft=Be.data)===null||ft===void 0)?void 0:ft.work_comment_hidden)||(Be==null||((At=Be.data)===null||At===void 0)?void 0:At.work_comment))&&n.a.createElement("div",null,n.a.createElement(v.a,{align:"middle"},n.a.createElement(s.a,{flex:1},n.a.createElement("h1",{className:pe.a.title},"\u70B9\u8BC4\u5185\u5BB9")),n.a.createElement(s.a,{className:"pr30"},Object(U.c)()&&n.a.createElement(R.a,{onClick:Object(r.a)(E.a.mark(function Mt(){return E.a.wrap(function(Lt){for(;;)switch(Lt.prev=Lt.next){case 0:a.a.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",icon:n.a.createElement(B.a,null),content:"\u662F\u5426\u786E\u8BA4\u5220\u9664\uFF1F",onOk:function(){return Object(r.a)(E.a.mark(function xt(){var Jt,Vt;return E.a.wrap(function(an){for(;;)switch(an.prev=an.next){case 0:return an.next=2,Object(re.m)({comment_id:Be==null||((Jt=Be.data)===null||Jt===void 0)?void 0:Jt.comment_id,homeworkId:dt.homeworkId});case 2:Vt=an.sent,Vt.status===0&&(O.b.success("\u5220\u9664\u6210\u529F"),kt({type:"shixunHomeworks/getShixunWorkReports",payload:Object(_.a)({},dt)}));case 4:case"end":return an.stop()}},xt)}))()}});case 1:case"end":return Lt.stop()}},Mt)}))},n.a.createElement(P.a,null),"\u5220\u9664"))),n.a.createElement(M.a,{style:{margin:0}}),(Be==null||((Bt=Be.data)===null||Bt===void 0)?void 0:Bt.work_comment)&&n.a.createElement("aside",{className:"pl30 pr30 mt20"},n.a.createElement("span",{className:"c-light-black font12"},"# \u5B66\u751F\u548C\u8BFE\u5802\u8001\u5E08\u53EF\u89C1"),n.a.createElement("br",null),n.a.createElement(Ke.a,{value:Be==null||((St=Be.data)===null||St===void 0)?void 0:St.work_comment})),(Be==null||((it=Be.data)===null||it===void 0)?void 0:it.work_comment_hidden)&&n.a.createElement("aside",{className:"pl30 pr30 mt20"},n.a.createElement("span",{className:"c-light-black font12"},"# \u4EC5\u8BFE\u5802\u8001\u5E08\u53EF\u89C1"),n.a.createElement("br",null),n.a.createElement(Ke.a,{value:Be==null||((Wt=Be.data)===null||Wt===void 0)?void 0:Wt.work_comment_hidden}))),n.a.createElement("h1",{className:pe.a.title},"\u9636\u6BB5\u6210\u7EE9"),n.a.createElement("aside",{className:"pl30 pr30"},n.a.createElement(j.a,{dataSource:Be==null?void 0:Be.hack,pagination:!1,columns:ar})),(Be==null||((Qt=Be.data)===null||Qt===void 0)?void 0:Qt.work_description)&&n.a.createElement(n.a.Fragment,null,n.a.createElement("h1",{className:pe.a.title},"\u4E2A\u4EBA\u603B\u7ED3"),n.a.createElement("aside",{className:"pl30 pr30"},n.a.createElement(Ke.a,{value:Be==null||((It=Be.data)===null||It===void 0)?void 0:It.work_description}))),n.a.createElement("h1",{className:pe.a.title},"\u5237\u9898\u8BE6\u60C5")),n.a.createElement(Ue,{autoHeight:ye}))),Object(U.c)()&&n.a.createElement("aside",{className:"".concat(pe.a.footerBar," ").concat(Ye?pe.a.footerBarStatic:"")},n.a.createElement("aside",{className:"edu-container"},n.a.createElement(v.a,{align:"middle"},n.a.createElement(s.a,{flex:"1"},n.a.createElement(c.a,{className:pe.a.exitComment,to:"/classrooms/".concat(dt.coursesId,"/program_homework/").concat(dt.categoryId,"/detail")},"\u8FD4\u56DE\u5217\u8868")),n.a.createElement(s.a,{flex:"1",className:"tr"},Object(U.c)()&&n.a.createElement(R.a,{type:"primary",onClick:Object(r.a)(E.a.mark(function Mt(){return E.a.wrap(function(Lt){for(;;)switch(Lt.prev=Lt.next){case 0:kt({type:"shixunHomeworks/setActionTabs",payload:{key:"\u66F4\u6539\u70B9\u8BC4",selectArrs:{myshixun_identifier:Be.user_id,data:Object(_.a)({},Be)}}});case 1:case"end":return Lt.stop()}},Mt)}))},"\u70B9\u8BC4\u4F5C\u4E1A"))))))),n.a.createElement(nt,null),n.a.createElement(et.a,null),n.a.createElement(a.a,{visible:Ir,width:860,centered:!0,onCancel:function(){vr(!1)},title:"\u8BA1\u65F6\u89C4\u5219\u8BF4\u660E",footer:null},n.a.createElement("div",{style:{color:"#333333",fontWeight:400}},n.a.createElement("span",{style:{fontWeight:500}},"1\u3001\u9875\u9762\u505C\u7559\u65F6\u957F"),n.a.createElement("br",null),n.a.createElement("span",null,"\u5B66\u751F\u8FDB\u5165\u5173\u5361\u7684\u7B54\u9898\u9875\u9762\u5F00\u59CB\u8BA1\u65F6\uFF0C\u76F4\u81F3\u5B66\u751F\u5173\u5361\u8BC4\u6D4B\u901A\u8FC7\uFF0C\u5219\u8BA1\u65F6\u7ED3\u675F\uFF1B"),n.a.createElement("br",null),n.a.createElement("span",null," ","\u5B66\u751F\u8FDB\u5165\u5173\u5361\u7684\u7B54\u9898\u9875\u9762\u5F00\u59CB\u8BA1\u65F6\uFF0C\u82E5\u5B66\u751F\u5173\u95ED/\u9000\u51FA\u7B54\u9898\u9875\u9762\uFF0C\u5219\u8BA1\u65F6\u6682\u505C\uFF0C\u518D\u6B21\u8FDB\u5165\u7B54\u9898\u9875\u9762\u65F6\u5F00\u59CB\u7D2F\u8BA1\u8BA1\u65F6\u76F4\u81F3\u8BC4\u6D4B\u901A\u8FC7\uFF0C\u5219\u8BA1\u65F6\u7ED3\u675F\uFF1B"),n.a.createElement("span",{style:{color:"#FA6400",display:"flex",height:34,alignItems:"center"}}," ","\u53EF\u80FD\u4F1A\u9020\u6210\u65F6\u957F\u8BC4\u4F30\u4E0E\u5B9E\u9645\u505A\u9898\u80FD\u529B\u4E0D\u7B26\u7684\u60C5\u51B5"," "),n.a.createElement("span",null,"a\u3001\u5B66\u751F\u8FDB\u5165\u5173\u5361\u770B\u5B8C\u9898\u540E\uFF0C\u9000\u51FA\u7B54\u9898\u9875\u9762\u5B8C\u6210\u4EE3\u7801\u8BBE\u8BA1\uFF0C\u518D\u590D\u5236\u8FDB\u5E73\u53F0\u7B54\u9898\u9875\u9762\u8FDB\u884C\u8BC4\u6D4B\uFF0C\u65E0\u6CD5\u8BC4\u4F30\u5B66\u751F\u7684\u5B66\u4E60\u548C\u601D\u8003\u65F6\u95F4\u3002")),n.a.createElement("div",{style:{color:"#333333",marginTop:20,fontWeight:400}},n.a.createElement("span",{style:{fontWeight:500}},"2\u3001\u5173\u5361\u603B\u8017\u65F6"),n.a.createElement("br",null),n.a.createElement("span",{style:{}},"\u5B66\u751F\u7B2C\u4E00\u6B21\u8FDB\u5165\u5173\u5361\u7B54\u9898\u9875\u9762\u5F00\u59CB\u8BA1\u65F6\uFF0C\u76F4\u81F3\u8BE5\u5173\u5361\u8BC4\u6D4B\u901A\u8FC7\uFF0C\u5219\u8BA1\u65F6\u7ED3\u675F\u3002"," "),n.a.createElement("br",null),n.a.createElement("span",null," ","\u53E6\uFF0C\u5373\u4F7F\u5173\u5361\u95EF\u5173\u8FC7\u7A0B\u4E2D\uFF0C\u5B66\u751F\u9000\u51FA/\u5173\u95ED\u7B54\u9898\u9875\u9762\uFF0C\u4E5F\u5C06\u6301\u7EED\u8BA1\u65F6\uFF0C\u76F4\u81F3\u8BE5\u5173\u5361\u901A\u8FC7\u3002"),n.a.createElement("span",{style:{color:"#FA6400",display:"flex",height:44,paddingTop:10}}," ","\u53EF\u80FD\u4F1A\u9020\u6210\u65F6\u957F\u8BC4\u4F30\u4E0E\u5B9E\u9645\u505A\u9898\u80FD\u529B\u4E0D\u7B26\u7684\u60C5\u51B5"," "),n.a.createElement("span",null,"a\u3001\u5B66\u751F\u4ECE\u5176\u4ED6\u540C\u5B66\u5904\u770B\u5230\u9898\u76EE\u540E\uFF0C\u5B8C\u6210\u4EE3\u7801\u8BBE\u8BA1\uFF0C\u518D\u8FDB\u5165\u5173\u5361\u7B54\u9898\u9875\u9762\uFF0C\u5C06\u5DF2\u5B8C\u6210\u7684\u4EE3\u7801\u590D\u5236\u81F3\u5E73\u53F0\u8FDB\u884C\u8BC4\u6D4B\uFF1B"),n.a.createElement("br",null),n.a.createElement("span",null,"b\u3001\u5B66\u751F\u7B2C\u4E00\u6B21\u6253\u5F00\u5173\u5361\u540E\uFF0C\u56E0\u4E3A\u67D0\u79CD\u539F\u56E0\u79BB\u5F00\u9875\u9762\uFF0C\u65F6\u9694\u591A\u65E5\u624D\u518D\u6B21\u8FDB\u5165\u5E73\u53F0\u95EF\u5173\uFF0C\u5C31\u4F1A\u5BFC\u81F4\u5B66\u751F\u5173\u5361\u603B\u8017\u65F6\u8FC7\u957F\uFF1B")),n.a.createElement("div",{style:{color:"#333333",marginTop:20,fontWeight:400}},n.a.createElement("span",{style:{fontWeight:500}},"3\u3001\u4F5C\u4E1A\u901A\u5173\u65F6\u957F"),n.a.createElement("br",null),n.a.createElement("span",{style:{}},"\u4ECE\u8001\u5E08\u53D1\u5E03\u7684\u5B9E\u8BAD\u4F5C\u4E1A\u5F00\u59CB\u65F6\u95F4\uFF0C\u5F00\u59CB\u8BA1\u65F6\uFF0C\u76F4\u81F3\u5B66\u751F\u5B9E\u8BAD\u901A\u5173\uFF08\u5305\u62EC\u8FDF\u4EA4\u901A\u5173\uFF09\uFF0C\u7ED3\u675F\u8BA1\u65F6\u3002\u5982\u679C\u5B66\u751F\u672A\u901A\u5173\uFF0C\u5219\u8BE5\u751F\u7684\u95EF\u5173\u8017\u65F6\u4E3A\u8001\u5E08\u8BBE\u7F6E\u7684\u5B9E\u8BAD\u5F00\u59CB\u65F6\u95F4\u81F3\u5B9E\u8BAD\u622A\u6B62\u65F6\u95F4\uFF0C\u5982\u679C\u8001\u5E08\u5F00\u542F\u4E86\u8865\u4EA4\uFF0C\u5219\u8BE5\u751F\u7684\u95EF\u5173\u8017\u65F6\u4E3A\u5B9E\u8BAD\u5F00\u59CB\u65F6\u95F4\u81F3\u5B9E\u8BAD\u8865\u4EA4\u622A\u6B62\u65F6\u95F4\u3002")),n.a.createElement("div",{style:{color:"#333333",marginTop:20,fontWeight:400}},n.a.createElement("span",{style:{fontWeight:500}},"\u89C4\u5219\u76EE\u7684"),n.a.createElement("br",null),n.a.createElement("span",{style:{}},"\u9F13\u52B1\u5B66\u751F\u5728\u5B9E\u8BAD\u4F5C\u4E1A\u53D1\u5E03\u7684\u7B2C\u4E00\u65F6\u95F4\uFF0C\u7ACB\u5373\u767B\u5F55\u5E73\u53F0\u5B8C\u6210\u5B9E\u8BAD\u4F5C\u4E1A\u7684\u901A\u5173\u3002"))),n.a.createElement(a.a,{visible:Rr,title:"\u5B9E\u8BAD\u603B\u8017\u65F6\u8BF4\u660E",centered:!0,footer:null,onCancel:function(){Br(!1)},width:600},n.a.createElement("div",{style:{fontWeight:400,color:"#333333"}},n.a.createElement("div",null,"1\u3001\u5F53\u8BA1\u65F6\u89C4\u5219\u4E3A\u201C",n.a.createElement("span",{style:{color:"#145DFF"}},"\u9875\u9762\u505C\u7559\u65F6\u957F"),"\u201D\u65F6\uFF0C\u5B9E\u8BAD\u603B\u8017\u65F6\u4E3A\u6240\u6709\u5173\u5361\u8017\u65F6\u76F8\u52A0\u4E4B\u548C\uFF1B"),n.a.createElement("div",{style:{margin:"20px 0px"}},"2\u3001\u5F53\u8BA1\u65F6\u89C4\u5219\u4E3A\u201C",n.a.createElement("span",{style:{color:"#145DFF"}},"\u5173\u5361\u603B\u8017\u65F6"),"\u201D\u65F6\uFF0C\u5B9E\u8BAD\u603B\u8017\u65F6\u4E3A\u6240\u6709\u5173\u5361\u8017\u65F6\u76F8\u52A0\u4E4B\u548C\uFF1B"),n.a.createElement("div",null,"3\u3001\u5F53\u8BA1\u65F6\u89C4\u5219\u4E3A\u201C",n.a.createElement("span",{style:{color:"#145DFF"}},"\u4F5C\u4E1A\u901A\u5173\u65F6\u957F"),"\u201D\u65F6\uFF0C\u5B9E\u8BAD\u603B\u8017\u65F6\u4E3A\u5B9E\u8BAD\u53D1\u5E03\u65F6\u95F4\u81F3\u5B9E\u8BAD\u901A\u5173\u65F6\u95F4\uFF0C\u5F53\u5B66\u751F\u672A\u901A\u5173\u65F6\uFF0C\u5B9E\u8BAD\u603B\u8017\u65F6\u4E3A\u5B9E\u8BAD\u53D1\u5E03\u65F6\u95F4\u81F3\u5B9E\u8BAD\u622A\u6B62\u65F6\u95F4\u3002"))))},ie=_e.default=Object(g.a)(function(ue){var he=ue.shixunHomeworks,He=ue.loading,We=ue.globalSetting;return{shixunHomeworks:he,globalSetting:We,loading:He.effects}})(J)},FWmy:function(ct,_e,K){"use strict";K.d(_e,"a",function(){return oe});function oe(G,D){if(!G)throw new Error(D?`Assertion failed (${D})`:"Assertion Failed")}},GeSD:function(ct,_e,K){ct.exports={flex_box_center:"flex_box_center___3psDK",flex_space_between:"flex_space_between___3-Gwv",flex_box_vertical_center:"flex_box_vertical_center___KuXCa",flex_box_center_end:"flex_box_center_end___3yf7b",flex_box_column:"flex_box_column___CeV--",title:"title___1pfhN",export:"export___1Foif",title1_right:"title1_right___1b0PH",userPic:"userPic___2fhW8",userInfo:"userInfo___3ELpM",listItem:"listItem___2hXBP",rightInfo:"rightInfo___35dRu",shixunTitle:"shixunTitle___1yeYv",shixunWrp:"shixunWrp___5RaDa",footerBar:"footerBar___1_Vn_",footerBarStatic:"footerBarStatic___KgV2n",exitComment:"exitComment___2Z6mb",nextComment:"nextComment___2qKB7",modal:"modal___2apBa"}},H7XF:function(ct,_e,K){"use strict";_e.byteLength=M,_e.toByteArray=R,_e.fromByteArray=u;for(var oe=[],G=[],D=typeof Uint8Array!="undefined"?Uint8Array:Array,j="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",N=0,O=j.length;N<O;++N)oe[N]=j[N],G[j.charCodeAt(N)]=N;G["-".charCodeAt(0)]=62,G["_".charCodeAt(0)]=63;function X(s){var i=s.length;if(i%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var A=s.indexOf("=");A===-1&&(A=i);var o=A===i?0:4-A%4;return[A,o]}function M(s){var i=X(s),A=i[0],o=i[1];return(A+o)*3/4-o}function e(s,i,A){return(i+A)*3/4-A}function R(s){var i,A=X(s),o=A[0],a=A[1],r=new D(e(s,o,a)),t=0,_=a>0?o-4:o,y;for(y=0;y<_;y+=4)i=G[s.charCodeAt(y)]<<18|G[s.charCodeAt(y+1)]<<12|G[s.charCodeAt(y+2)]<<6|G[s.charCodeAt(y+3)],r[t++]=i>>16&255,r[t++]=i>>8&255,r[t++]=i&255;return a===2&&(i=G[s.charCodeAt(y)]<<2|G[s.charCodeAt(y+1)]>>4,r[t++]=i&255),a===1&&(i=G[s.charCodeAt(y)]<<10|G[s.charCodeAt(y+1)]<<4|G[s.charCodeAt(y+2)]>>2,r[t++]=i>>8&255,r[t++]=i&255),r}function f(s){return oe[s>>18&63]+oe[s>>12&63]+oe[s>>6&63]+oe[s&63]}function v(s,i,A){for(var o,a=[],r=i;r<A;r+=3)o=(s[r]<<16&16711680)+(s[r+1]<<8&65280)+(s[r+2]&255),a.push(f(o));return a.join("")}function u(s){for(var i,A=s.length,o=A%3,a=[],r=16383,t=0,_=A-o;t<_;t+=r)a.push(v(s,t,t+r>_?_:t+r));return o===1?(i=s[A-1],a.push(oe[i>>2]+oe[i<<4&63]+"==")):o===2&&(i=(s[A-2]<<8)+s[A-1],a.push(oe[i>>10]+oe[i>>4&63]+oe[i<<2&63]+"=")),a.join("")}},HDXh:function(ct,_e,K){"use strict";(function(oe){/*!
|
|
* The buffer module from node.js, for the browser.
|
|
*
|
|
* @author Feross Aboukhadijeh <http://feross.org>
|
|
* @license MIT
|
|
*/var G=K("H7XF"),D=K("kVK+"),j=K("49sm");_e.Buffer=M,_e.SlowBuffer=a,_e.INSPECT_MAX_BYTES=50,M.TYPED_ARRAY_SUPPORT=oe.TYPED_ARRAY_SUPPORT!==void 0?oe.TYPED_ARRAY_SUPPORT:N(),_e.kMaxLength=O();function N(){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(z){return!1}}function O(){return M.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function X(re,z){if(O()<z)throw new RangeError("Invalid typed array length");return M.TYPED_ARRAY_SUPPORT?(re=new Uint8Array(z),re.__proto__=M.prototype):(re===null&&(re=new M(z)),re.length=z),re}function M(re,z,Y){if(!M.TYPED_ARRAY_SUPPORT&&!(this instanceof M))return new M(re,z,Y);if(typeof re=="number"){if(typeof z=="string")throw new Error("If encoding is specified then the first argument must be a string");return v(this,re)}return e(this,re,z,Y)}M.poolSize=8192,M._augment=function(re){return re.__proto__=M.prototype,re};function e(re,z,Y,J){if(typeof z=="number")throw new TypeError('"value" argument must not be a number');return typeof ArrayBuffer!="undefined"&&z instanceof ArrayBuffer?i(re,z,Y,J):typeof z=="string"?u(re,z,Y):A(re,z)}M.from=function(re,z,Y){return e(null,re,z,Y)},M.TYPED_ARRAY_SUPPORT&&(M.prototype.__proto__=Uint8Array.prototype,M.__proto__=Uint8Array,typeof Symbol!="undefined"&&Symbol.species&&M[Symbol.species]===M&&Object.defineProperty(M,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 f(re,z,Y,J){return R(z),z<=0?X(re,z):Y!==void 0?typeof J=="string"?X(re,z).fill(Y,J):X(re,z).fill(Y):X(re,z)}M.alloc=function(re,z,Y){return f(null,re,z,Y)};function v(re,z){if(R(z),re=X(re,z<0?0:o(z)|0),!M.TYPED_ARRAY_SUPPORT)for(var Y=0;Y<z;++Y)re[Y]=0;return re}M.allocUnsafe=function(re){return v(null,re)},M.allocUnsafeSlow=function(re){return v(null,re)};function u(re,z,Y){if((typeof Y!="string"||Y==="")&&(Y="utf8"),!M.isEncoding(Y))throw new TypeError('"encoding" must be a valid string encoding');var J=r(z,Y)|0;re=X(re,J);var ie=re.write(z,Y);return ie!==J&&(re=re.slice(0,ie)),re}function s(re,z){var Y=z.length<0?0:o(z.length)|0;re=X(re,Y);for(var J=0;J<Y;J+=1)re[J]=z[J]&255;return re}function i(re,z,Y,J){if(z.byteLength,Y<0||z.byteLength<Y)throw new RangeError("'offset' is out of bounds");if(z.byteLength<Y+(J||0))throw new RangeError("'length' is out of bounds");return Y===void 0&&J===void 0?z=new Uint8Array(z):J===void 0?z=new Uint8Array(z,Y):z=new Uint8Array(z,Y,J),M.TYPED_ARRAY_SUPPORT?(re=z,re.__proto__=M.prototype):re=s(re,z),re}function A(re,z){if(M.isBuffer(z)){var Y=o(z.length)|0;return re=X(re,Y),re.length===0||z.copy(re,0,0,Y),re}if(z){if(typeof ArrayBuffer!="undefined"&&z.buffer instanceof ArrayBuffer||"length"in z)return typeof z.length!="number"||Ke(z.length)?X(re,0):s(re,z);if(z.type==="Buffer"&&j(z.data))return s(re,z.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 a(re){return+re!=re&&(re=0),M.alloc(+re)}M.isBuffer=function(z){return!!(z!=null&&z._isBuffer)},M.compare=function(z,Y){if(!M.isBuffer(z)||!M.isBuffer(Y))throw new TypeError("Arguments must be Buffers");if(z===Y)return 0;for(var J=z.length,ie=Y.length,ue=0,he=Math.min(J,ie);ue<he;++ue)if(z[ue]!==Y[ue]){J=z[ue],ie=Y[ue];break}return J<ie?-1:ie<J?1:0},M.isEncoding=function(z){switch(String(z).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}},M.concat=function(z,Y){if(!j(z))throw new TypeError('"list" argument must be an Array of Buffers');if(z.length===0)return M.alloc(0);var J;if(Y===void 0)for(Y=0,J=0;J<z.length;++J)Y+=z[J].length;var ie=M.allocUnsafe(Y),ue=0;for(J=0;J<z.length;++J){var he=z[J];if(!M.isBuffer(he))throw new TypeError('"list" argument must be an Array of Buffers');he.copy(ie,ue),ue+=he.length}return ie};function r(re,z){if(M.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 Y=re.length;if(Y===0)return 0;for(var J=!1;;)switch(z){case"ascii":case"latin1":case"binary":return Y;case"utf8":case"utf-8":case void 0:return ve(re).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Y*2;case"hex":return Y>>>1;case"base64":return nt(re).length;default:if(J)return ve(re).length;z=(""+z).toLowerCase(),J=!0}}M.byteLength=r;function t(re,z,Y){var J=!1;if((z===void 0||z<0)&&(z=0),z>this.length)return"";if((Y===void 0||Y>this.length)&&(Y=this.length),Y<=0)return"";if(Y>>>=0,z>>>=0,Y<=z)return"";for(re||(re="utf8");;)switch(re){case"hex":return P(this,z,Y);case"utf8":case"utf-8":return g(this,z,Y);case"ascii":return F(this,z,Y);case"latin1":case"binary":return B(this,z,Y);case"base64":return w(this,z,Y);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return W(this,z,Y);default:if(J)throw new TypeError("Unknown encoding: "+re);re=(re+"").toLowerCase(),J=!0}}M.prototype._isBuffer=!0;function _(re,z,Y){var J=re[z];re[z]=re[Y],re[Y]=J}M.prototype.swap16=function(){var z=this.length;if(z%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var Y=0;Y<z;Y+=2)_(this,Y,Y+1);return this},M.prototype.swap32=function(){var z=this.length;if(z%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var Y=0;Y<z;Y+=4)_(this,Y,Y+3),_(this,Y+1,Y+2);return this},M.prototype.swap64=function(){var z=this.length;if(z%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var Y=0;Y<z;Y+=8)_(this,Y,Y+7),_(this,Y+1,Y+6),_(this,Y+2,Y+5),_(this,Y+3,Y+4);return this},M.prototype.toString=function(){var z=this.length|0;return z===0?"":arguments.length===0?g(this,0,z):t.apply(this,arguments)},M.prototype.equals=function(z){if(!M.isBuffer(z))throw new TypeError("Argument must be a Buffer");return this===z?!0:M.compare(this,z)===0},M.prototype.inspect=function(){var z="",Y=_e.INSPECT_MAX_BYTES;return this.length>0&&(z=this.toString("hex",0,Y).match(/.{2}/g).join(" "),this.length>Y&&(z+=" ... ")),"<Buffer "+z+">"},M.prototype.compare=function(z,Y,J,ie,ue){if(!M.isBuffer(z))throw new TypeError("Argument must be a Buffer");if(Y===void 0&&(Y=0),J===void 0&&(J=z?z.length:0),ie===void 0&&(ie=0),ue===void 0&&(ue=this.length),Y<0||J>z.length||ie<0||ue>this.length)throw new RangeError("out of range index");if(ie>=ue&&Y>=J)return 0;if(ie>=ue)return-1;if(Y>=J)return 1;if(Y>>>=0,J>>>=0,ie>>>=0,ue>>>=0,this===z)return 0;for(var he=ue-ie,He=J-Y,We=Math.min(he,He),je=this.slice(ie,ue),Ge=z.slice(Y,J),rt=0;rt<We;++rt)if(je[rt]!==Ge[rt]){he=je[rt],He=Ge[rt];break}return he<He?-1:He<he?1:0};function y(re,z,Y,J,ie){if(re.length===0)return-1;if(typeof Y=="string"?(J=Y,Y=0):Y>2147483647?Y=2147483647:Y<-2147483648&&(Y=-2147483648),Y=+Y,isNaN(Y)&&(Y=ie?0:re.length-1),Y<0&&(Y=re.length+Y),Y>=re.length){if(ie)return-1;Y=re.length-1}else if(Y<0)if(ie)Y=0;else return-1;if(typeof z=="string"&&(z=M.from(z,J)),M.isBuffer(z))return z.length===0?-1:b(re,z,Y,J,ie);if(typeof z=="number")return z=z&255,M.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?ie?Uint8Array.prototype.indexOf.call(re,z,Y):Uint8Array.prototype.lastIndexOf.call(re,z,Y):b(re,[z],Y,J,ie);throw new TypeError("val must be string, number or Buffer")}function b(re,z,Y,J,ie){var ue=1,he=re.length,He=z.length;if(J!==void 0&&(J=String(J).toLowerCase(),J==="ucs2"||J==="ucs-2"||J==="utf16le"||J==="utf-16le")){if(re.length<2||z.length<2)return-1;ue=2,he/=2,He/=2,Y/=2}function We(Te,De){return ue===1?Te[De]:Te.readUInt16BE(De*ue)}var je;if(ie){var Ge=-1;for(je=Y;je<he;je++)if(We(re,je)===We(z,Ge===-1?0:je-Ge)){if(Ge===-1&&(Ge=je),je-Ge+1===He)return Ge*ue}else Ge!==-1&&(je-=je-Ge),Ge=-1}else for(Y+He>he&&(Y=he-He),je=Y;je>=0;je--){for(var rt=!0,st=0;st<He;st++)if(We(re,je+st)!==We(z,st)){rt=!1;break}if(rt)return je}return-1}M.prototype.includes=function(z,Y,J){return this.indexOf(z,Y,J)!==-1},M.prototype.indexOf=function(z,Y,J){return y(this,z,Y,J,!0)},M.prototype.lastIndexOf=function(z,Y,J){return y(this,z,Y,J,!1)};function x(re,z,Y,J){Y=Number(Y)||0;var ie=re.length-Y;J?(J=Number(J),J>ie&&(J=ie)):J=ie;var ue=z.length;if(ue%2!==0)throw new TypeError("Invalid hex string");J>ue/2&&(J=ue/2);for(var he=0;he<J;++he){var He=parseInt(z.substr(he*2,2),16);if(isNaN(He))return he;re[Y+he]=He}return he}function E(re,z,Y,J){return et(ve(z,re.length-Y),re,Y,J)}function d(re,z,Y,J){return et(ze(z),re,Y,J)}function n(re,z,Y,J){return d(re,z,Y,J)}function l(re,z,Y,J){return et(nt(z),re,Y,J)}function h(re,z,Y,J){return et(at(z,re.length-Y),re,Y,J)}M.prototype.write=function(z,Y,J,ie){if(Y===void 0)ie="utf8",J=this.length,Y=0;else if(J===void 0&&typeof Y=="string")ie=Y,J=this.length,Y=0;else if(isFinite(Y))Y=Y|0,isFinite(J)?(J=J|0,ie===void 0&&(ie="utf8")):(ie=J,J=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var ue=this.length-Y;if((J===void 0||J>ue)&&(J=ue),z.length>0&&(J<0||Y<0)||Y>this.length)throw new RangeError("Attempt to write outside buffer bounds");ie||(ie="utf8");for(var he=!1;;)switch(ie){case"hex":return x(this,z,Y,J);case"utf8":case"utf-8":return E(this,z,Y,J);case"ascii":return d(this,z,Y,J);case"latin1":case"binary":return n(this,z,Y,J);case"base64":return l(this,z,Y,J);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return h(this,z,Y,J);default:if(he)throw new TypeError("Unknown encoding: "+ie);ie=(""+ie).toLowerCase(),he=!0}},M.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function w(re,z,Y){return z===0&&Y===re.length?G.fromByteArray(re):G.fromByteArray(re.slice(z,Y))}function g(re,z,Y){Y=Math.min(re.length,Y);for(var J=[],ie=z;ie<Y;){var ue=re[ie],he=null,He=ue>239?4:ue>223?3:ue>191?2:1;if(ie+He<=Y){var We,je,Ge,rt;switch(He){case 1:ue<128&&(he=ue);break;case 2:We=re[ie+1],(We&192)===128&&(rt=(ue&31)<<6|We&63,rt>127&&(he=rt));break;case 3:We=re[ie+1],je=re[ie+2],(We&192)===128&&(je&192)===128&&(rt=(ue&15)<<12|(We&63)<<6|je&63,rt>2047&&(rt<55296||rt>57343)&&(he=rt));break;case 4:We=re[ie+1],je=re[ie+2],Ge=re[ie+3],(We&192)===128&&(je&192)===128&&(Ge&192)===128&&(rt=(ue&15)<<18|(We&63)<<12|(je&63)<<6|Ge&63,rt>65535&&rt<1114112&&(he=rt))}}he===null?(he=65533,He=1):he>65535&&(he-=65536,J.push(he>>>10&1023|55296),he=56320|he&1023),J.push(he),ie+=He}return L(J)}var c=4096;function L(re){var z=re.length;if(z<=c)return String.fromCharCode.apply(String,re);for(var Y="",J=0;J<z;)Y+=String.fromCharCode.apply(String,re.slice(J,J+=c));return Y}function F(re,z,Y){var J="";Y=Math.min(re.length,Y);for(var ie=z;ie<Y;++ie)J+=String.fromCharCode(re[ie]&127);return J}function B(re,z,Y){var J="";Y=Math.min(re.length,Y);for(var ie=z;ie<Y;++ie)J+=String.fromCharCode(re[ie]);return J}function P(re,z,Y){var J=re.length;(!z||z<0)&&(z=0),(!Y||Y<0||Y>J)&&(Y=J);for(var ie="",ue=z;ue<Y;++ue)ie+=we(re[ue]);return ie}function W(re,z,Y){for(var J=re.slice(z,Y),ie="",ue=0;ue<J.length;ue+=2)ie+=String.fromCharCode(J[ue]+J[ue+1]*256);return ie}M.prototype.slice=function(z,Y){var J=this.length;z=~~z,Y=Y===void 0?J:~~Y,z<0?(z+=J,z<0&&(z=0)):z>J&&(z=J),Y<0?(Y+=J,Y<0&&(Y=0)):Y>J&&(Y=J),Y<z&&(Y=z);var ie;if(M.TYPED_ARRAY_SUPPORT)ie=this.subarray(z,Y),ie.__proto__=M.prototype;else{var ue=Y-z;ie=new M(ue,void 0);for(var he=0;he<ue;++he)ie[he]=this[he+z]}return ie};function U(re,z,Y){if(re%1!==0||re<0)throw new RangeError("offset is not uint");if(re+z>Y)throw new RangeError("Trying to access beyond buffer length")}M.prototype.readUIntLE=function(z,Y,J){z=z|0,Y=Y|0,J||U(z,Y,this.length);for(var ie=this[z],ue=1,he=0;++he<Y&&(ue*=256);)ie+=this[z+he]*ue;return ie},M.prototype.readUIntBE=function(z,Y,J){z=z|0,Y=Y|0,J||U(z,Y,this.length);for(var ie=this[z+--Y],ue=1;Y>0&&(ue*=256);)ie+=this[z+--Y]*ue;return ie},M.prototype.readUInt8=function(z,Y){return Y||U(z,1,this.length),this[z]},M.prototype.readUInt16LE=function(z,Y){return Y||U(z,2,this.length),this[z]|this[z+1]<<8},M.prototype.readUInt16BE=function(z,Y){return Y||U(z,2,this.length),this[z]<<8|this[z+1]},M.prototype.readUInt32LE=function(z,Y){return Y||U(z,4,this.length),(this[z]|this[z+1]<<8|this[z+2]<<16)+this[z+3]*16777216},M.prototype.readUInt32BE=function(z,Y){return Y||U(z,4,this.length),this[z]*16777216+(this[z+1]<<16|this[z+2]<<8|this[z+3])},M.prototype.readIntLE=function(z,Y,J){z=z|0,Y=Y|0,J||U(z,Y,this.length);for(var ie=this[z],ue=1,he=0;++he<Y&&(ue*=256);)ie+=this[z+he]*ue;return ue*=128,ie>=ue&&(ie-=Math.pow(2,8*Y)),ie},M.prototype.readIntBE=function(z,Y,J){z=z|0,Y=Y|0,J||U(z,Y,this.length);for(var ie=Y,ue=1,he=this[z+--ie];ie>0&&(ue*=256);)he+=this[z+--ie]*ue;return ue*=128,he>=ue&&(he-=Math.pow(2,8*Y)),he},M.prototype.readInt8=function(z,Y){return Y||U(z,1,this.length),this[z]&128?(255-this[z]+1)*-1:this[z]},M.prototype.readInt16LE=function(z,Y){Y||U(z,2,this.length);var J=this[z]|this[z+1]<<8;return J&32768?J|4294901760:J},M.prototype.readInt16BE=function(z,Y){Y||U(z,2,this.length);var J=this[z+1]|this[z]<<8;return J&32768?J|4294901760:J},M.prototype.readInt32LE=function(z,Y){return Y||U(z,4,this.length),this[z]|this[z+1]<<8|this[z+2]<<16|this[z+3]<<24},M.prototype.readInt32BE=function(z,Y){return Y||U(z,4,this.length),this[z]<<24|this[z+1]<<16|this[z+2]<<8|this[z+3]},M.prototype.readFloatLE=function(z,Y){return Y||U(z,4,this.length),D.read(this,z,!0,23,4)},M.prototype.readFloatBE=function(z,Y){return Y||U(z,4,this.length),D.read(this,z,!1,23,4)},M.prototype.readDoubleLE=function(z,Y){return Y||U(z,8,this.length),D.read(this,z,!0,52,8)},M.prototype.readDoubleBE=function(z,Y){return Y||U(z,8,this.length),D.read(this,z,!1,52,8)};function $(re,z,Y,J,ie,ue){if(!M.isBuffer(re))throw new TypeError('"buffer" argument must be a Buffer instance');if(z>ie||z<ue)throw new RangeError('"value" argument is out of bounds');if(Y+J>re.length)throw new RangeError("Index out of range")}M.prototype.writeUIntLE=function(z,Y,J,ie){if(z=+z,Y=Y|0,J=J|0,!ie){var ue=Math.pow(2,8*J)-1;$(this,z,Y,J,ue,0)}var he=1,He=0;for(this[Y]=z&255;++He<J&&(he*=256);)this[Y+He]=z/he&255;return Y+J},M.prototype.writeUIntBE=function(z,Y,J,ie){if(z=+z,Y=Y|0,J=J|0,!ie){var ue=Math.pow(2,8*J)-1;$(this,z,Y,J,ue,0)}var he=J-1,He=1;for(this[Y+he]=z&255;--he>=0&&(He*=256);)this[Y+he]=z/He&255;return Y+J},M.prototype.writeUInt8=function(z,Y,J){return z=+z,Y=Y|0,J||$(this,z,Y,1,255,0),M.TYPED_ARRAY_SUPPORT||(z=Math.floor(z)),this[Y]=z&255,Y+1};function ee(re,z,Y,J){z<0&&(z=65535+z+1);for(var ie=0,ue=Math.min(re.length-Y,2);ie<ue;++ie)re[Y+ie]=(z&255<<8*(J?ie:1-ie))>>>(J?ie:1-ie)*8}M.prototype.writeUInt16LE=function(z,Y,J){return z=+z,Y=Y|0,J||$(this,z,Y,2,65535,0),M.TYPED_ARRAY_SUPPORT?(this[Y]=z&255,this[Y+1]=z>>>8):ee(this,z,Y,!0),Y+2},M.prototype.writeUInt16BE=function(z,Y,J){return z=+z,Y=Y|0,J||$(this,z,Y,2,65535,0),M.TYPED_ARRAY_SUPPORT?(this[Y]=z>>>8,this[Y+1]=z&255):ee(this,z,Y,!1),Y+2};function pe(re,z,Y,J){z<0&&(z=4294967295+z+1);for(var ie=0,ue=Math.min(re.length-Y,4);ie<ue;++ie)re[Y+ie]=z>>>(J?ie:3-ie)*8&255}M.prototype.writeUInt32LE=function(z,Y,J){return z=+z,Y=Y|0,J||$(this,z,Y,4,4294967295,0),M.TYPED_ARRAY_SUPPORT?(this[Y+3]=z>>>24,this[Y+2]=z>>>16,this[Y+1]=z>>>8,this[Y]=z&255):pe(this,z,Y,!0),Y+4},M.prototype.writeUInt32BE=function(z,Y,J){return z=+z,Y=Y|0,J||$(this,z,Y,4,4294967295,0),M.TYPED_ARRAY_SUPPORT?(this[Y]=z>>>24,this[Y+1]=z>>>16,this[Y+2]=z>>>8,this[Y+3]=z&255):pe(this,z,Y,!1),Y+4},M.prototype.writeIntLE=function(z,Y,J,ie){if(z=+z,Y=Y|0,!ie){var ue=Math.pow(2,8*J-1);$(this,z,Y,J,ue-1,-ue)}var he=0,He=1,We=0;for(this[Y]=z&255;++he<J&&(He*=256);)z<0&&We===0&&this[Y+he-1]!==0&&(We=1),this[Y+he]=(z/He>>0)-We&255;return Y+J},M.prototype.writeIntBE=function(z,Y,J,ie){if(z=+z,Y=Y|0,!ie){var ue=Math.pow(2,8*J-1);$(this,z,Y,J,ue-1,-ue)}var he=J-1,He=1,We=0;for(this[Y+he]=z&255;--he>=0&&(He*=256);)z<0&&We===0&&this[Y+he+1]!==0&&(We=1),this[Y+he]=(z/He>>0)-We&255;return Y+J},M.prototype.writeInt8=function(z,Y,J){return z=+z,Y=Y|0,J||$(this,z,Y,1,127,-128),M.TYPED_ARRAY_SUPPORT||(z=Math.floor(z)),z<0&&(z=255+z+1),this[Y]=z&255,Y+1},M.prototype.writeInt16LE=function(z,Y,J){return z=+z,Y=Y|0,J||$(this,z,Y,2,32767,-32768),M.TYPED_ARRAY_SUPPORT?(this[Y]=z&255,this[Y+1]=z>>>8):ee(this,z,Y,!0),Y+2},M.prototype.writeInt16BE=function(z,Y,J){return z=+z,Y=Y|0,J||$(this,z,Y,2,32767,-32768),M.TYPED_ARRAY_SUPPORT?(this[Y]=z>>>8,this[Y+1]=z&255):ee(this,z,Y,!1),Y+2},M.prototype.writeInt32LE=function(z,Y,J){return z=+z,Y=Y|0,J||$(this,z,Y,4,2147483647,-2147483648),M.TYPED_ARRAY_SUPPORT?(this[Y]=z&255,this[Y+1]=z>>>8,this[Y+2]=z>>>16,this[Y+3]=z>>>24):pe(this,z,Y,!0),Y+4},M.prototype.writeInt32BE=function(z,Y,J){return z=+z,Y=Y|0,J||$(this,z,Y,4,2147483647,-2147483648),z<0&&(z=4294967295+z+1),M.TYPED_ARRAY_SUPPORT?(this[Y]=z>>>24,this[Y+1]=z>>>16,this[Y+2]=z>>>8,this[Y+3]=z&255):pe(this,z,Y,!1),Y+4};function fe(re,z,Y,J,ie,ue){if(Y+J>re.length)throw new RangeError("Index out of range");if(Y<0)throw new RangeError("Index out of range")}function Le(re,z,Y,J,ie){return ie||fe(re,z,Y,4,34028234663852886e22,-34028234663852886e22),D.write(re,z,Y,J,23,4),Y+4}M.prototype.writeFloatLE=function(z,Y,J){return Le(this,z,Y,!0,J)},M.prototype.writeFloatBE=function(z,Y,J){return Le(this,z,Y,!1,J)};function Ie(re,z,Y,J,ie){return ie||fe(re,z,Y,8,17976931348623157e292,-17976931348623157e292),D.write(re,z,Y,J,52,8),Y+8}M.prototype.writeDoubleLE=function(z,Y,J){return Ie(this,z,Y,!0,J)},M.prototype.writeDoubleBE=function(z,Y,J){return Ie(this,z,Y,!1,J)},M.prototype.copy=function(z,Y,J,ie){if(J||(J=0),!ie&&ie!==0&&(ie=this.length),Y>=z.length&&(Y=z.length),Y||(Y=0),ie>0&&ie<J&&(ie=J),ie===J)return 0;if(z.length===0||this.length===0)return 0;if(Y<0)throw new RangeError("targetStart out of bounds");if(J<0||J>=this.length)throw new RangeError("sourceStart out of bounds");if(ie<0)throw new RangeError("sourceEnd out of bounds");ie>this.length&&(ie=this.length),z.length-Y<ie-J&&(ie=z.length-Y+J);var ue=ie-J,he;if(this===z&&J<Y&&Y<ie)for(he=ue-1;he>=0;--he)z[he+Y]=this[he+J];else if(ue<1e3||!M.TYPED_ARRAY_SUPPORT)for(he=0;he<ue;++he)z[he+Y]=this[he+J];else Uint8Array.prototype.set.call(z,this.subarray(J,J+ue),Y);return ue},M.prototype.fill=function(z,Y,J,ie){if(typeof z=="string"){if(typeof Y=="string"?(ie=Y,Y=0,J=this.length):typeof J=="string"&&(ie=J,J=this.length),z.length===1){var ue=z.charCodeAt(0);ue<256&&(z=ue)}if(ie!==void 0&&typeof ie!="string")throw new TypeError("encoding must be a string");if(typeof ie=="string"&&!M.isEncoding(ie))throw new TypeError("Unknown encoding: "+ie)}else typeof z=="number"&&(z=z&255);if(Y<0||this.length<Y||this.length<J)throw new RangeError("Out of range index");if(J<=Y)return this;Y=Y>>>0,J=J===void 0?this.length:J>>>0,z||(z=0);var he;if(typeof z=="number")for(he=Y;he<J;++he)this[he]=z;else{var He=M.isBuffer(z)?z:ve(new M(z,ie).toString()),We=He.length;for(he=0;he<J-Y;++he)this[he+Y]=He[he%We]}return this};var xe=/[^+\/0-9A-Za-z-_]/g;function Ue(re){if(re=Fe(re).replace(xe,""),re.length<2)return"";for(;re.length%4!==0;)re=re+"=";return re}function Fe(re){return re.trim?re.trim():re.replace(/^\s+|\s+$/g,"")}function we(re){return re<16?"0"+re.toString(16):re.toString(16)}function ve(re,z){z=z||Infinity;for(var Y,J=re.length,ie=null,ue=[],he=0;he<J;++he){if(Y=re.charCodeAt(he),Y>55295&&Y<57344){if(!ie){if(Y>56319){(z-=3)>-1&&ue.push(239,191,189);continue}else if(he+1===J){(z-=3)>-1&&ue.push(239,191,189);continue}ie=Y;continue}if(Y<56320){(z-=3)>-1&&ue.push(239,191,189),ie=Y;continue}Y=(ie-55296<<10|Y-56320)+65536}else ie&&((z-=3)>-1&&ue.push(239,191,189));if(ie=null,Y<128){if((z-=1)<0)break;ue.push(Y)}else if(Y<2048){if((z-=2)<0)break;ue.push(Y>>6|192,Y&63|128)}else if(Y<65536){if((z-=3)<0)break;ue.push(Y>>12|224,Y>>6&63|128,Y&63|128)}else if(Y<1114112){if((z-=4)<0)break;ue.push(Y>>18|240,Y>>12&63|128,Y>>6&63|128,Y&63|128)}else throw new Error("Invalid code point")}return ue}function ze(re){for(var z=[],Y=0;Y<re.length;++Y)z.push(re.charCodeAt(Y)&255);return z}function at(re,z){for(var Y,J,ie,ue=[],he=0;he<re.length&&!((z-=2)<0);++he)Y=re.charCodeAt(he),J=Y>>8,ie=Y%256,ue.push(ie),ue.push(J);return ue}function nt(re){return G.toByteArray(Ue(re))}function et(re,z,Y,J){for(var ie=0;ie<J&&!(ie+Y>=z.length||ie>=re.length);++ie)z[ie+Y]=re[ie];return ie}function Ke(re){return re!==re}}).call(this,K("IyRk"))},IBYe:function(ct,_e,K){"use strict";function oe(G){return null}_e.a=oe},J66h:function(ct,_e,K){(function(oe){var G,D;(function(j,N){ct.exports=N(j)})(typeof self!="undefined"?self:typeof window!="undefined"?window:typeof oe!="undefined"?oe:this,function(j){"use strict";j=j||{};var N=j.Base64,O="2.6.4",X="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",M=function(c){for(var L={},F=0,B=c.length;F<B;F++)L[c.charAt(F)]=F;return L}(X),e=String.fromCharCode,R=function(c){if(c.length<2){var L=c.charCodeAt(0);return L<128?c: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+(c.charCodeAt(0)-55296)*1024+(c.charCodeAt(1)-56320);return e(240|L>>>18&7)+e(128|L>>>12&63)+e(128|L>>>6&63)+e(128|L&63)}},f=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,v=function(c){return c.replace(f,R)},u=function(c){var L=[0,2,1][c.length%3],F=c.charCodeAt(0)<<16|(c.length>1?c.charCodeAt(1):0)<<8|(c.length>2?c.charCodeAt(2):0),B=[X.charAt(F>>>18),X.charAt(F>>>12&63),L>=2?"=":X.charAt(F>>>6&63),L>=1?"=":X.charAt(F&63)];return B.join("")},s=j.btoa&&typeof j.btoa=="function"?function(c){return j.btoa(c)}:function(c){if(c.match(/[^\x00-\xFF]/))throw new RangeError("The string contains invalid characters.");return c.replace(/[\s\S]{1,3}/g,u)},i=function(c){return s(v(String(c)))},A=function(c){return c.replace(/[+\/]/g,function(L){return L=="+"?"-":"_"}).replace(/=/g,"")},o=function(c,L){return L?A(i(c)):i(c)},a=function(c){return o(c,!0)},r;j.Uint8Array&&(r=function(c,L){for(var F="",B=0,P=c.length;B<P;B+=3){var W=c[B],U=c[B+1],$=c[B+2],ee=W<<16|U<<8|$;F+=X.charAt(ee>>>18)+X.charAt(ee>>>12&63)+(typeof U!="undefined"?X.charAt(ee>>>6&63):"=")+(typeof $!="undefined"?X.charAt(ee&63):"=")}return L?A(F):F});var t=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,_=function(c){switch(c.length){case 4:var L=(7&c.charCodeAt(0))<<18|(63&c.charCodeAt(1))<<12|(63&c.charCodeAt(2))<<6|63&c.charCodeAt(3),F=L-65536;return e((F>>>10)+55296)+e((F&1023)+56320);case 3:return e((15&c.charCodeAt(0))<<12|(63&c.charCodeAt(1))<<6|63&c.charCodeAt(2));default:return e((31&c.charCodeAt(0))<<6|63&c.charCodeAt(1))}},y=function(c){return c.replace(t,_)},b=function(c){var L=c.length,F=L%4,B=(L>0?M[c.charAt(0)]<<18:0)|(L>1?M[c.charAt(1)]<<12:0)|(L>2?M[c.charAt(2)]<<6:0)|(L>3?M[c.charAt(3)]:0),P=[e(B>>>16),e(B>>>8&255),e(B&255)];return P.length-=[0,0,2,1][F],P.join("")},x=j.atob&&typeof j.atob=="function"?function(c){return j.atob(c)}:function(c){return c.replace(/\S{1,4}/g,b)},E=function(c){return x(String(c).replace(/[^A-Za-z0-9\+\/]/g,""))},d=function(c){return y(x(c))},n=function(c){return String(c).replace(/[-_]/g,function(L){return L=="-"?"+":"/"}).replace(/[^A-Za-z0-9\+\/]/g,"")},l=function(c){return d(n(c))},h;j.Uint8Array&&(h=function(c){return Uint8Array.from(E(n(c)),function(L){return L.charCodeAt(0)})});var w=function(){var c=j.Base64;return j.Base64=N,c};if(j.Base64={VERSION:O,atob:E,btoa:s,fromBase64:l,toBase64:o,utob:v,encode:o,encodeURI:a,btou:y,decode:l,noConflict:w,fromUint8Array:r,toUint8Array:h},typeof Object.defineProperty=="function"){var g=function(c){return{value:c,enumerable:!1,writable:!0,configurable:!0}};j.Base64.extendString=function(){Object.defineProperty(String.prototype,"fromBase64",g(function(){return l(this)})),Object.defineProperty(String.prototype,"toBase64",g(function(c){return o(this,c)})),Object.defineProperty(String.prototype,"toBase64URI",g(function(){return o(this,!0)}))}}return j.Meteor&&(Base64=j.Base64),ct.exports?ct.exports.Base64=j.Base64:!(G=[],D=function(){return j.Base64}.apply(_e,G),D!==void 0&&(ct.exports=D)),{Base64:j.Base64}})}).call(this,K("IyRk"))},JYp7:function(ct,_e,K){"use strict";K.d(_e,"a",function(){return oe});var oe;(function(G){function D(t){return t&&typeof t=="object"&&typeof t[Symbol.iterator]=="function"}G.is=D;const j=Object.freeze([]);function N(){return j}G.empty=N;function*O(t){yield t}G.single=O;function X(t){return t||j}G.from=X;function M(t){return!t||t[Symbol.iterator]().next().done===!0}G.isEmpty=M;function e(t){return t[Symbol.iterator]().next().value}G.first=e;function R(t,_){for(const y of t)if(_(y))return!0;return!1}G.some=R;function f(t,_){for(const y of t)if(_(y))return y;return}G.find=f;function*v(t,_){for(const y of t)_(y)&&(yield y)}G.filter=v;function*u(t,_){let y=0;for(const b of t)yield _(b,y++)}G.map=u;function*s(...t){for(const _ of t)for(const y of _)yield y}G.concat=s;function*i(t){for(const _ of t)for(const y of _)yield y}G.concatNested=i;function A(t,_,y){let b=y;for(const x of t)b=_(b,x);return b}G.reduce=A;function*o(t,_,y=t.length){for(_<0&&(_+=t.length),y<0?y+=t.length:y>t.length&&(y=t.length);_<y;_++)yield t[_]}G.slice=o;function a(t,_=Number.POSITIVE_INFINITY){const y=[];if(_===0)return[y,t];const b=t[Symbol.iterator]();for(let x=0;x<_;x++){const E=b.next();if(E.done)return[y,G.empty()];y.push(E.value)}return[y,{[Symbol.iterator](){return b}}]}G.consume=a;function r(t,_,y=(b,x)=>b===x){const b=t[Symbol.iterator](),x=_[Symbol.iterator]();for(;;){const E=b.next(),d=x.next();if(E.done!==d.done)return!1;if(E.done)return!0;if(!y(E.value,d.value))return!1}}G.equals=r})(oe||(oe={}))},LdHM:function(ct,_e,K){"use strict";K.d(_e,"b",function(){return t}),K.d(_e,"a",function(){return y});var oe=K("1OyB"),G=K("vuIU"),D=K("Ji7U"),j=K("LK+K"),N=K("q1tI"),O=K("rePB"),X=K("Ff2n"),M=K("ODXe"),e=K("4IlW"),R=K("bX4T"),f=K("YrtM"),v=K("TSYQ"),u=K.n(v),s=K("+nKL"),i=K("8OUc"),A=function($,ee){var pe=$.prefixCls,fe=$.id,Le=$.flattenOptions,Ie=$.childrenAsData,xe=$.values,Ue=$.searchValue,Fe=$.multiple,we=$.defaultActiveFirstOption,ve=$.height,ze=$.itemHeight,at=$.notFoundContent,nt=$.open,et=$.menuItemSelectedIcon,Ke=$.virtual,re=$.onSelect,z=$.onToggleOpen,Y=$.onActiveValue,J=$.onScroll,ie=$.onMouseEnter,ue="".concat(pe,"-item"),he=Object(f.a)(function(){return Le},[nt,Le],function(Pe,Ce){return Ce[0]&&Pe[1]!==Ce[1]}),He=N.useRef(null),We=function(Ce){Ce.preventDefault()},je=function(Ce){He.current&&He.current.scrollTo({index:Ce})},Ge=function(Ce){for(var ce=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,ge=he.length,te=0;te<ge;te+=1){var ne=(Ce+te*ce+ge)%ge,le=he[ne],de=le.group,Re=le.data;if(!de&&!Re.disabled)return ne}return-1},rt=N.useState(function(){return Ge(0)}),st=Object(M.a)(rt,2),Te=st[0],De=st[1],Ve=function(Ce){De(Ce);var ce=he[Ce];if(!ce){Y(null,-1);return}Y(ce.data.value,Ce)};N.useEffect(function(){Ve(we!==!1?Ge(0):-1)},[he.length,Ue]),N.useEffect(function(){var Pe=setTimeout(function(){if(!Fe&&nt&&xe.size===1){var Ce=Array.from(xe)[0],ce=he.findIndex(function(ge){var te=ge.data;return te.value===Ce});Ve(ce),je(ce)}});return function(){return clearTimeout(Pe)}},[nt]);var $e=function(Ce){Ce!==void 0&&re(Ce,{selected:!xe.has(Ce)}),Fe||z(!1)};if(N.useImperativeHandle(ee,function(){return{onKeyDown:function(Ce){var ce=Ce.which;switch(ce){case e.a.UP:case e.a.DOWN:{var ge=0;if(ce===e.a.UP?ge=-1:ce===e.a.DOWN&&(ge=1),ge!==0){var te=Ge(Te+ge,ge);je(te),Ve(te)}break}case e.a.ENTER:{var ne=he[Te];ne&&!ne.data.disabled?$e(ne.data.value):$e(void 0),nt&&Ce.preventDefault();break}case e.a.ESC:z(!1)}},onKeyUp:function(){},scrollTo:function(Ce){je(Ce)}}}),he.length===0)return N.createElement("div",{role:"listbox",id:"".concat(fe,"_list"),className:"".concat(ue,"-empty"),onMouseDown:We},at);function Ne(Pe){var Ce=he[Pe];if(!Ce)return null;var ce=Ce.data||{},ge=ce.value,te=ce.label,ne=ce.children,le=Object(R.a)(ce,!0),de=Ie?ne:te;return Ce?N.createElement("div",Object.assign({"aria-label":typeof de=="string"?de:null},le,{key:Pe,role:"option",id:"".concat(fe,"_list_").concat(Pe),"aria-selected":xe.has(ge)}),ge):null}return N.createElement(N.Fragment,null,N.createElement("div",{role:"listbox",id:"".concat(fe,"_list"),style:{height:0,width:0,overflow:"hidden"}},Ne(Te-1),Ne(Te),Ne(Te+1)),N.createElement(s.a,{itemKey:"key",ref:He,data:he,height:ve,itemHeight:ze,fullHeight:!1,onMouseDown:We,onScroll:J,virtual:Ke,onMouseEnter:ie},function(Pe,Ce){var ce,ge=Pe.group,te=Pe.groupOption,ne=Pe.data,le=ne.label,de=ne.key;if(ge)return N.createElement("div",{className:u()(ue,"".concat(ue,"-group"))},le!==void 0?le:de);var Re=ne.disabled,Me=ne.value,qe=ne.title,lt=ne.children,ft=ne.style,At=ne.className,Bt=Object(X.a)(ne,["disabled","value","title","children","style","className"]),St=xe.has(Me),it="".concat(ue,"-option"),Wt=u()(ue,it,At,(ce={},Object(O.a)(ce,"".concat(it,"-grouped"),te),Object(O.a)(ce,"".concat(it,"-active"),Te===Ce&&!Re),Object(O.a)(ce,"".concat(it,"-disabled"),Re),Object(O.a)(ce,"".concat(it,"-selected"),St),ce)),Qt=Ie?lt:le,It=!et||typeof et=="function"||St;return N.createElement("div",Object.assign({},Bt,{"aria-selected":St,className:Wt,title:qe,onMouseMove:function(){if(Te===Ce||Re)return;Ve(Ce)},onClick:function(){Re||$e(Me)},style:ft}),N.createElement("div",{className:"".concat(it,"-content")},Qt||Me),N.isValidElement(et)||St,It&&N.createElement(i.a,{className:"".concat(ue,"-option-state"),customizeIcon:et,customizeIconProps:{isSelected:St}},St?"\u2713":null))}))},o=N.forwardRef(A);o.displayName="OptionList";var a=o,r=function(){return null};r.isSelectOption=!0;var t=r,_=function(){return null};_.isSelectOptGroup=!0;var y=_,b=K("VTBJ"),x=K("Zm9Q");function E(U){var $=U.key,ee=U.props,pe=ee.children,fe=ee.value,Le=Object(X.a)(ee,["children","value"]);return Object(b.a)({key:$,value:fe!==void 0?fe:$,children:pe},Le)}function d(U){var $=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return Object(x.a)(U).map(function(ee,pe){if(!N.isValidElement(ee)||!ee.type)return null;var fe=ee.type.isSelectOptGroup,Le=ee.key,Ie=ee.props,xe=Ie.children,Ue=Object(X.a)(Ie,["children"]);return $||!fe?E(ee):Object(b.a)(Object(b.a)({key:"__RC_SELECT_GRP__".concat(Le===null?pe:Le,"__"),label:Le},Ue),{},{options:d(xe)})}).filter(function(ee){return ee})}var n=K("2Qr1"),l=K("qNPg"),h=K("U8pU"),w=K("Kwbf"),g=K("WKfj");function c(U){var $=U.mode,ee=U.options,pe=U.children,fe=U.backfill,Le=U.allowClear,Ie=U.placeholder,xe=U.getInputElement,Ue=U.showSearch,Fe=U.onSearch,we=U.defaultOpen,ve=U.autoFocus,ze=U.labelInValue,at=U.value,nt=U.inputValue,et=U.optionLabelProp,Ke=$==="multiple"||$==="tags",re=Ue!==void 0?Ue:Ke||$==="combobox",z=ee||d(pe);if(Object(w.a)($!=="tags"||z.every(function(ue){return!ue.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),$==="tags"||$==="combobox"){var Y=z.some(function(ue){return ue.options?ue.options.some(function(he){return typeof("value"in he?he.value:he.key)=="number"}):typeof("value"in ue?ue.value:ue.key)=="number"});Object(w.a)(!Y,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(Object(w.a)($!=="combobox"||!et,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),Object(w.a)($==="combobox"||!fe,"`backfill` only works with `combobox` mode."),Object(w.a)($==="combobox"||!xe,"`getInputElement` only work with `combobox` mode."),Object(w.b)($!=="combobox"||!xe||!Le||!Ie,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),Fe&&!re&&$!=="combobox"&&$!=="tags"&&Object(w.a)(!1,"`onSearch` should work with `showSearch` instead of use alone."),Object(w.b)(!we||ve,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),at!=null){var J=Object(g.d)(at);Object(w.a)(!ze||J.every(function(ue){return Object(h.a)(ue)==="object"&&("key"in ue||"value"in ue)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),Object(w.a)(!Ke||Array.isArray(at),"`value` should be array when `mode` is `multiple` or `tags`")}if(pe){var ie=null;Object(x.a)(pe).some(function(ue){if(!N.isValidElement(ue)||!ue.type)return!1;var he=ue.type;if(he.isSelectOption)return!1;if(he.isSelectOptGroup){var He=Object(x.a)(ue.props.children).every(function(We){return!N.isValidElement(We)||!ue.type||We.type.isSelectOption?!0:(ie=We.type,!1)});return!He}return ie=he,!0}),ie&&Object(w.a)(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(ie.displayName||ie.name||ie,"`.")),Object(w.a)(nt===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}var L=c,F=Object(l.a)({prefixCls:"rc-select",components:{optionList:a},convertChildrenToData:d,flattenOptions:n.d,getLabeledValue:n.e,filterOptions:n.b,isValueDisabled:n.g,findValueOption:n.c,warningProps:L,fillOptionsWithMissingValue:n.a}),B=function(U){Object(D.a)(ee,U);var $=Object(j.a)(ee);function ee(){var pe;return Object(oe.a)(this,ee),pe=$.apply(this,arguments),pe.selectRef=N.createRef(),pe.focus=function(){pe.selectRef.current.focus()},pe.blur=function(){pe.selectRef.current.blur()},pe}return Object(G.a)(ee,[{key:"render",value:function(){return N.createElement(F,Object.assign({ref:this.selectRef},this.props))}}]),ee}(N.Component);B.Option=t,B.OptGroup=y;var P=B,W=_e.c=P},MI8n:function(ct,_e,K){"use strict";K.d(_e,"c",function(){return N}),K.d(_e,"b",function(){return e}),K.d(_e,"e",function(){return R}),K.d(_e,"a",function(){return f}),K.d(_e,"d",function(){return v}),K.d(_e,"f",function(){return u});var oe=K("/cxE"),G=K("pmY6"),D=K("24hK"),j=K("5Y4S"),N;(function(s){s.None=()=>G.a.None;function i(c){return(L,F=null,B)=>{let P=!1,W;return W=c(U=>P?void 0:(W?W.dispose():P=!0,L.call(F,U)),null,B),P&&W.dispose(),W}}s.once=i;function A(c,L){return y((F,B=null,P)=>c(W=>F.call(B,L(W)),null,P))}s.map=A;function o(c,L){return y((F,B=null,P)=>c(W=>{L(W),F.call(B,W)},null,P))}s.forEach=o;function a(c,L){return y((F,B=null,P)=>c(W=>L(W)&&F.call(B,W),null,P))}s.filter=a;function r(c){return c}s.signal=r;function t(...c){return(L,F=null,B)=>Object(G.e)(...c.map(P=>P(W=>L.call(F,W),null,B)))}s.any=t;function _(c,L,F){let B=F;return A(c,P=>(B=L(B,P),B))}s.reduce=_;function y(c){let L;const F=new e({onFirstListenerAdd(){L=c(F.fire,F)},onLastListenerRemove(){L.dispose()}});return F.event}function b(c,L,F=100,B=!1,P){let W,U,$,ee=0;const pe=new e({leakWarningThreshold:P,onFirstListenerAdd(){W=c(fe=>{ee++,U=L(U,fe),B&&!$&&(pe.fire(U),U=void 0),clearTimeout($),$=setTimeout(()=>{const Le=U;U=void 0,$=void 0,(!B||ee>1)&&pe.fire(Le),ee=0},F)})},onLastListenerRemove(){W.dispose()}});return pe.event}s.debounce=b;function x(c,L=(F,B)=>F===B){let F=!0,B;return a(c,P=>{const W=F||!L(P,B);return F=!1,B=P,W})}s.latch=x;function E(c,L){return[s.filter(c,L),s.filter(c,F=>!L(F))]}s.split=E;function d(c,L=!1,F=[]){let B=F.slice(),P=c($=>{B?B.push($):U.fire($)});const W=()=>{B&&B.forEach($=>U.fire($)),B=null},U=new e({onFirstListenerAdd(){P||(P=c($=>U.fire($)))},onFirstListenerDidAdd(){B&&(L?setTimeout(W):W())},onLastListenerRemove(){P&&P.dispose(),P=null}});return U.event}s.buffer=d;class n{constructor(c){this.event=c}map(c){return new n(A(this.event,c))}forEach(c){return new n(o(this.event,c))}filter(c){return new n(a(this.event,c))}reduce(c,L){return new n(_(this.event,c,L))}latch(){return new n(x(this.event))}debounce(c,L=100,F=!1,B){return new n(b(this.event,c,L,F,B))}on(c,L,F){return this.event(c,L,F)}once(c,L,F){return i(this.event)(c,L,F)}}function l(c){return new n(c)}s.chain=l;function h(c,L,F=B=>B){const B=(...$)=>U.fire(F(...$)),P=()=>c.on(L,B),W=()=>c.removeListener(L,B),U=new e({onFirstListenerAdd:P,onLastListenerRemove:W});return U.event}s.fromNodeEventEmitter=h;function w(c,L,F=B=>B){const B=(...$)=>U.fire(F(...$)),P=()=>c.addEventListener(L,B),W=()=>c.removeEventListener(L,B),U=new e({onFirstListenerAdd:P,onLastListenerRemove:W});return U.event}s.fromDOMEventEmitter=w;function g(c){return new Promise(L=>i(c)(L))}s.toPromise=g})(N||(N={}));class O{constructor(s){this._listenerCount=0,this._invocationCount=0,this._elapsedOverall=0,this._name=`${s}_${O._idPool++}`}start(s){this._stopWatch=new j.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 M{constructor(s,i=Math.random().toString(18).slice(2,5)){this.customThreshold=s,this.name=i,this._warnCountdown=0}dispose(){this._stacks&&this._stacks.clear()}check(s){let i=X;if(typeof this.customThreshold=="number"&&(i=this.customThreshold),i<=0||s<i)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=i*.5;let a,r=0;for(const[t,_]of this._stacks)(!a||r<_)&&(a=t,r=_);console.warn(`[${this.name}] potential listener LEAK detected, having ${s} listeners already. MOST frequent listener (${r}):`),console.warn(a)}return()=>{const a=this._stacks.get(A)||0;this._stacks.set(A,a-1)}}}class e{constructor(s){var i;this._disposed=!1,this._options=s,this._leakageMon=X>0?new M(this._options&&this._options.leakWarningThreshold):void 0,this._perfMon=((i=this._options)===null||i===void 0?void 0:i._profName)?new O(this._options._profName):void 0}get event(){return this._event||(this._event=(s,i,A)=>{var o;this._listeners||(this._listeners=new D.a);const a=this._listeners.isEmpty();a&&this._options&&this._options.onFirstListenerAdd&&this._options.onFirstListenerAdd(this);const r=this._listeners.push(i?[s,i]:s);a&&this._options&&this._options.onFirstListenerDidAdd&&this._options.onFirstListenerDidAdd(this),this._options&&this._options.onListenerDidAdd&&this._options.onListenerDidAdd(this,s,i);const t=(o=this._leakageMon)===null||o===void 0?void 0:o.check(this._listeners.size),_=Object(G.i)(()=>{if(t&&t(),!this._disposed&&(r(),this._options&&this._options.onLastListenerRemove)){const y=this._listeners&&!this._listeners.isEmpty();y||this._options.onLastListenerRemove(this)}});return A instanceof G.b?A.add(_):Array.isArray(A)&&A.push(_),_}),this._event}fire(s){var i,A;if(this._listeners){this._deliveryQueue||(this._deliveryQueue=new D.a);for(let o of this._listeners)this._deliveryQueue.push([o,s]);for((i=this._perfMon)===null||i===void 0||i.start(this._deliveryQueue.size);this._deliveryQueue.size>0;){const[o,a]=this._deliveryQueue.shift();try{typeof o=="function"?o.call(void 0,a):o[0].call(o[1],a)}catch(r){Object(oe.f)(r)}}(A=this._perfMon)===null||A===void 0||A.stop()}}dispose(){var s,i,A,o,a;this._disposed||(this._disposed=!0,(s=this._listeners)===null||s===void 0||s.clear(),(i=this._deliveryQueue)===null||i===void 0||i.clear(),(o=(A=this._options)===null||A===void 0?void 0:A.onLastListenerRemove)===null||o===void 0||o.call(A),(a=this._leakageMon)===null||a===void 0||a.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 f extends R{constructor(s){var i;super(s);this._delay=(i=s.delay)!==null&&i!==void 0?i: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(i,A,o)=>s(a=>{const r=this.buffers[this.buffers.length-1];r?r.push(()=>i.call(A,a)):i.call(A,a)},void 0,o)}bufferEvents(s){const i=[];this.buffers.push(i);const A=s();return this.buffers.pop(),i.forEach(o=>o()),A}}class u{constructor(){this.listening=!1,this.inputEvent=N.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(ct,_e,K){"use strict";(function(oe,G){K.d(_e,"b",function(){return A}),K.d(_e,"i",function(){return t}),K.d(_e,"f",function(){return _}),K.d(_e,"d",function(){return y}),K.d(_e,"g",function(){return b}),K.d(_e,"h",function(){return x}),K.d(_e,"c",function(){return E}),K.d(_e,"k",function(){return d}),K.d(_e,"j",function(){return n}),K.d(_e,"a",function(){return l}),K.d(_e,"e",function(){return g});var D;const j="en";let N=!1,O=!1,X=!1,M=!1,e=!1,R=!1,f=!1,v,u=j,s,i;const A=typeof self=="object"?self:typeof oe=="object"?oe:{};let o;typeof A.vscode!="undefined"&&typeof A.vscode.process!="undefined"?o=A.vscode.process:typeof G!="undefined"&&(o=G);const a=typeof((D=o==null?void 0:o.versions)===null||D===void 0?void 0:D.electron)=="string"&&o.type==="renderer";if(typeof navigator=="object"&&!a)i=navigator.userAgent,N=i.indexOf("Windows")>=0,O=i.indexOf("Macintosh")>=0,f=(i.indexOf("Macintosh")>=0||i.indexOf("iPad")>=0||i.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,X=i.indexOf("Linux")>=0,R=!0,v=navigator.language,u=v;else if(typeof o=="object"){N=o.platform==="win32",O=o.platform==="darwin",X=o.platform==="linux",M=X&&!!o.env.SNAP&&!!o.env.SNAP_REVISION,v=j,u=j;const c=o.env.VSCODE_NLS_CONFIG;if(c)try{const L=JSON.parse(c),F=L.availableLanguages["*"];v=L.locale,u=F||j,s=L._translationsConfigFile}catch(L){}e=!0}else console.error("Unable to resolve platform.");let r=0;O?r=1:N?r=3:X&&(r=2);const t=N,_=O,y=X,b=e,x=R,E=f,d=i,n=function(){if(A.setImmediate)return A.setImmediate.bind(A);if(typeof A.postMessage=="function"&&!A.importScripts){let F=[];A.addEventListener("message",P=>{if(P.data&&P.data.vscodeSetImmediateId)for(let W=0,U=F.length;W<U;W++){const $=F[W];if($.id===P.data.vscodeSetImmediateId){F.splice(W,1),$.callback();return}}});let B=0;return P=>{const W=++B;F.push({id:W,callback:P}),A.postMessage({vscodeSetImmediateId:W},"*")}}if(typeof(o==null?void 0:o.nextTick)=="function")return o.nextTick.bind(o);const L=Promise.resolve();return F=>L.then(F)}(),l=O||f?2:N?1:3;let h=!0,w=!1;function g(){if(!w){w=!0;const c=new Uint8Array(2);c[0]=1,c[1]=2;const L=new Uint16Array(c.buffer);h=L[0]===(2<<8)+1}return h}}).call(this,K("IyRk"),K("Q2Ig"))},N0LK:function(ct,_e,K){"use strict";K.d(_e,"C",function(){return oe}),K.d(_e,"v",function(){return D}),K.d(_e,"s",function(){return j}),K.d(_e,"t",function(){return N}),K.d(_e,"U",function(){return O}),K.d(_e,"J",function(){return X}),K.d(_e,"O",function(){return M}),K.d(_e,"p",function(){return e}),K.d(_e,"T",function(){return R}),K.d(_e,"q",function(){return f}),K.d(_e,"N",function(){return v}),K.d(_e,"M",function(){return u}),K.d(_e,"Q",function(){return s}),K.d(_e,"u",function(){return i}),K.d(_e,"x",function(){return A}),K.d(_e,"I",function(){return o}),K.d(_e,"f",function(){return a}),K.d(_e,"h",function(){return r}),K.d(_e,"g",function(){return t}),K.d(_e,"i",function(){return _}),K.d(_e,"G",function(){return y}),K.d(_e,"H",function(){return b}),K.d(_e,"r",function(){return x}),K.d(_e,"R",function(){return E}),K.d(_e,"d",function(){return d}),K.d(_e,"e",function(){return n}),K.d(_e,"E",function(){return l}),K.d(_e,"F",function(){return h}),K.d(_e,"j",function(){return w}),K.d(_e,"z",function(){return g}),K.d(_e,"K",function(){return L}),K.d(_e,"L",function(){return F}),K.d(_e,"m",function(){return P}),K.d(_e,"k",function(){return U}),K.d(_e,"A",function(){return ee}),K.d(_e,"a",function(){return pe}),K.d(_e,"n",function(){return fe}),K.d(_e,"l",function(){return Le}),K.d(_e,"D",function(){return Ie}),K.d(_e,"B",function(){return xe}),K.d(_e,"b",function(){return Ue}),K.d(_e,"S",function(){return Fe}),K.d(_e,"o",function(){return we}),K.d(_e,"P",function(){return ve}),K.d(_e,"w",function(){return ze}),K.d(_e,"c",function(){return at}),K.d(_e,"y",function(){return Ke});function oe(J){return!J||typeof J!="string"?!0:J.trim().length===0}const G=/{(\d+)}/g;function D(J,...ie){return ie.length===0?J:J.replace(G,function(ue,he){const He=parseInt(he,10);return isNaN(He)||He<0||He>=ie.length?ue:ie[He]})}function j(J){return J.replace(/[<>&]/g,function(ie){switch(ie){case"<":return"<";case">":return">";case"&":return"&";default:return ie}})}function N(J){return J.replace(/[\\\{\}\*\+\?\|\^\$\.\[\]\(\)]/g,"\\$&")}function O(J,ie=" "){const ue=X(J,ie);return M(ue,ie)}function X(J,ie){if(!J||!ie)return J;const ue=ie.length;if(ue===0||J.length===0)return J;let he=0;for(;J.indexOf(ie,he)===he;)he=he+ue;return J.substring(he)}function M(J,ie){if(!J||!ie)return J;const ue=ie.length,he=J.length;if(ue===0||he===0)return J;let He=he,We=-1;for(;!(We=J.lastIndexOf(ie,He-1),We===-1||We+ue!==He);){if(We===0)return"";He=We}return J.substring(0,He)}function e(J){return J.replace(/[\-\\\{\}\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&").replace(/[\*]/g,".*")}function R(J){return J.replace(/\*/g,"")}function f(J,ie,ue={}){if(!J)throw new Error("Cannot create regex from empty string");ie||(J=N(J)),ue.wholeWord&&(/\B/.test(J.charAt(0))||(J="\\b"+J),/\B/.test(J.charAt(J.length-1))||(J=J+"\\b"));let he="";return ue.global&&(he+="g"),ue.matchCase||(he+="i"),ue.multiline&&(he+="m"),ue.unicode&&(he+="u"),new RegExp(J,he)}function v(J){if(J.source==="^"||J.source==="^$"||J.source==="$"||J.source==="^\\s*$")return!1;const ie=J.exec("");return!!(ie&&J.lastIndex===0)}function u(J){return(J.global?"g":"")+(J.ignoreCase?"i":"")+(J.multiline?"m":"")+(J.unicode?"u":"")}function s(J){return J.split(/\r\n|\r|\n/)}function i(J){for(let ie=0,ue=J.length;ie<ue;ie++){const he=J.charCodeAt(ie);if(he!==32&&he!==9)return ie}return-1}function A(J,ie=0,ue=J.length){for(let he=ie;he<ue;he++){const He=J.charCodeAt(he);if(He!==32&&He!==9)return J.substring(ie,he)}return J.substring(ie,ue)}function o(J,ie=J.length-1){for(let ue=ie;ue>=0;ue--){const he=J.charCodeAt(ue);if(he!==32&&he!==9)return ue}return-1}function a(J,ie){return J<ie?-1:J>ie?1:0}function r(J,ie,ue=0,he=J.length,He=0,We=ie.length){for(;ue<he&&He<We;ue++,He++){let rt=J.charCodeAt(ue),st=ie.charCodeAt(He);if(rt<st)return-1;if(rt>st)return 1}const je=he-ue,Ge=We-He;return je<Ge?-1:je>Ge?1:0}function t(J,ie){return _(J,ie,0,J.length,0,ie.length)}function _(J,ie,ue=0,he=J.length,He=0,We=ie.length){for(;ue<he&&He<We;ue++,He++){let rt=J.charCodeAt(ue),st=ie.charCodeAt(He);if(rt===st)continue;if(rt>=128||st>=128)return r(J.toLowerCase(),ie.toLowerCase(),ue,he,He,We);y(rt)&&(rt-=32),y(st)&&(st-=32);const Te=rt-st;if(Te===0)continue;return Te}const je=he-ue,Ge=We-He;return je<Ge?-1:je>Ge?1:0}function y(J){return J>=97&&J<=122}function b(J){return J>=65&&J<=90}function x(J,ie){return J.length===ie.length&&_(J,ie)===0}function E(J,ie){const ue=ie.length;return ie.length>J.length?!1:_(J,ie,0,ue)===0}function d(J,ie){let ue,he=Math.min(J.length,ie.length);for(ue=0;ue<he;ue++)if(J.charCodeAt(ue)!==ie.charCodeAt(ue))return ue;return he}function n(J,ie){let ue,he=Math.min(J.length,ie.length);const He=J.length-1,We=ie.length-1;for(ue=0;ue<he;ue++)if(J.charCodeAt(He-ue)!==ie.charCodeAt(We-ue))return ue;return he}function l(J){return 55296<=J&&J<=56319}function h(J){return 56320<=J&&J<=57343}function w(J,ie){return(J-55296<<10)+(ie-56320)+65536}function g(J,ie,ue){const he=J.charCodeAt(ue);if(l(he)&&ue+1<ie){const He=J.charCodeAt(ue+1);if(h(He))return w(he,He)}return he}function c(J,ie){const ue=J.charCodeAt(ie-1);if(h(ue)&&ie>1){const he=J.charCodeAt(ie-2);if(l(he))return w(he,ue)}return ue}function L(J,ie){const ue=nt.getInstance(),he=ie,He=J.length,We=g(J,He,ie);ie+=We>=65536?2:1;let je=ue.getGraphemeBreakType(We);for(;ie<He;){const Ge=g(J,He,ie),rt=ue.getGraphemeBreakType(Ge);if(at(je,rt))break;ie+=Ge>=65536?2:1,je=rt}return ie-he}function F(J,ie){const ue=nt.getInstance(),he=ie,He=c(J,ie);ie-=He>=65536?2:1;let We=ue.getGraphemeBreakType(He);for(;ie>0;){const je=c(J,ie),Ge=ue.getGraphemeBreakType(je);if(at(Ge,We))break;ie-=je>=65536?2:1,We=Ge}return he-ie}const B=/(?:[\u05BE\u05C0\u05C3\u05C6\u05D0-\u05F4\u0608\u060B\u060D\u061B-\u064A\u066D-\u066F\u0671-\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u0710\u0712-\u072F\u074D-\u07A5\u07B1-\u07EA\u07F4\u07F5\u07FA-\u0815\u081A\u0824\u0828\u0830-\u0858\u085E-\u08BD\u200F\uFB1D\uFB1F-\uFB28\uFB2A-\uFD3D\uFD50-\uFDFC\uFE70-\uFEFC]|\uD802[\uDC00-\uDD1B\uDD20-\uDE00\uDE10-\uDE33\uDE40-\uDEE4\uDEEB-\uDF35\uDF40-\uDFFF]|\uD803[\uDC00-\uDCFF]|\uD83A[\uDC00-\uDCCF\uDD00-\uDD43\uDD50-\uDFFF]|\uD83B[\uDC00-\uDEBB])/;function P(J){return B.test(J)}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(J){return W.test(J)}const $=/^[\t\n\r\x20-\x7E]*$/;function ee(J){return $.test(J)}const pe=/[\u2028\u2029]/;function fe(J){return pe.test(J)}function Le(J){for(let ie=0,ue=J.length;ie<ue;ie++)if(Ie(J.charCodeAt(ie)))return!0;return!1}function Ie(J){return J=+J,J>=11904&&J<=55215||J>=63744&&J<=64255||J>=65281&&J<=65374}function xe(J){return J>=127462&&J<=127487||J===8986||J===8987||J===9200||J===9203||J>=9728&&J<=10175||J===11088||J===11093||J>=127744&&J<=128591||J>=128640&&J<=128764||J>=128992&&J<=129003||J>=129280&&J<=129535||J>=129648&&J<=129750}const Ue=String.fromCharCode(65279);function Fe(J){return!!(J&&J.length>0&&J.charCodeAt(0)===65279)}function we(J,ie=!1){return J?(ie&&(J=J.replace(/\\./g,"")),J.toLowerCase()!==J):!1}function ve(J){const ie=90-65+1;return J=J%(2*ie),J<ie?String.fromCharCode(97+J):String.fromCharCode(65+J-ie)}function ze(J){const ie=nt.getInstance();return ie.getGraphemeBreakType(J)}function at(J,ie){return J===0?ie!==5&&ie!==7:J===2&&ie===3?!1:J===4||J===2||J===3||(ie===4||ie===2||ie===3)?!0:J===8&&(ie===8||ie===9||ie===11||ie===12)||((J===11||J===9)&&(ie===9||ie===10)||((J===12||J===10)&&ie===10||(ie===5||ie===13||(ie===7||(J===1||J===13&&ie===14)))))?!1:!(J===6&&ie===6)}class nt{constructor(){this._data=et()}static getInstance(){return nt._INSTANCE||(nt._INSTANCE=new nt),nt._INSTANCE}getGraphemeBreakType(J){if(J<32)return J===10?3:J===13?2:4;if(J<127)return 0;const ie=this._data,ue=ie.length/3;let he=1;for(;he<=ue;)if(J<ie[3*he])he=2*he;else if(J>ie[3*he+1])he=2*he+1;else return ie[3*he+2];return 0}}nt._INSTANCE=null;function et(){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 Ke(J,ie){if(J===0)return 0;const ue=re(J,ie);if(ue!==void 0)return ue;const he=c(ie,J);return J-=z(he),J}function re(J,ie){let ue=c(ie,J);for(J-=z(ue);Y(ue)||ue===65039||ue===8419;){if(J===0)return;ue=c(ie,J),J-=z(ue)}if(!xe(ue))return;if(J>=0){const he=c(ie,J);he===8205&&(J-=z(he))}return J}function z(J){return J>=65536?2:1}function Y(J){return 127995<=J&&J<=127999}},NvD2:function(ct,_e,K){"use strict";K.d(_e,"a",function(){return O});var oe=K("Kwbf");function G(X,M){var e=new Set;return X.forEach(function(R){M.has(R)||e.add(R)}),e}function D(X){var M=X||{},e=M.disabled,R=M.disableCheckbox,f=M.checkable;return!!(e||R)||f===!1}function j(X,M,e,R){for(var f=new Set(X),v=new Set,u=0;u<=e;u+=1){var s=M.get(u)||new Set;s.forEach(function(a){var r=a.key,t=a.node,_=a.children,y=_===void 0?[]:_;f.has(r)&&!R(t)&&y.filter(function(b){return!R(b.node)}).forEach(function(b){f.add(b.key)})})}for(var i=new Set,A=e;A>=0;A-=1){var o=M.get(A)||new Set;o.forEach(function(a){var r=a.parent,t=a.node;if(R(t)||!a.parent||i.has(a.parent.key))return;if(R(a.parent.node)){i.add(r.key);return}var _=!0,y=!1;(r.children||[]).filter(function(b){return!R(b.node)}).forEach(function(b){var x=b.key,E=f.has(x);_&&!E&&(_=!1),!y&&(E||v.has(x))&&(y=!0)}),_&&f.add(r.key),y&&v.add(r.key),i.add(r.key)})}return{checkedKeys:Array.from(f),halfCheckedKeys:Array.from(G(v,f))}}function N(X,M,e,R,f){for(var v=new Set(X),u=new Set(M),s=0;s<=R;s+=1){var i=e.get(s)||new Set;i.forEach(function(r){var t=r.key,_=r.node,y=r.children,b=y===void 0?[]:y;!v.has(t)&&!u.has(t)&&!f(_)&&b.filter(function(x){return!f(x.node)}).forEach(function(x){v.delete(x.key)})})}u=new Set;for(var A=new Set,o=R;o>=0;o-=1){var a=e.get(o)||new Set;a.forEach(function(r){var t=r.parent,_=r.node;if(f(_)||!r.parent||A.has(r.parent.key))return;if(f(r.parent.node)){A.add(t.key);return}var y=!0,b=!1;(t.children||[]).filter(function(x){return!f(x.node)}).forEach(function(x){var E=x.key,d=v.has(E);y&&!d&&(y=!1),!b&&(d||u.has(E))&&(b=!0)}),y||v.delete(t.key),b&&u.add(t.key),A.add(t.key)})}return{checkedKeys:Array.from(v),halfCheckedKeys:Array.from(G(u,v))}}function O(X,M,e,R){var f=[],v;R?v=R:v=D;var u=new Set(X.filter(function(o){var a=!!e[o];return a||f.push(o),a})),s=new Map,i=0;Object.keys(e).forEach(function(o){var a=e[o],r=a.level,t=s.get(r);t||(t=new Set,s.set(r,t)),t.add(a),i=Math.max(i,r)}),Object(oe.a)(!f.length,"Tree missing follow keys: ".concat(f.slice(0,100).map(function(o){return"'".concat(o,"'")}).join(", ")));var A;return M===!0?A=j(u,s,i,v):A=N(u,M.halfCheckedKeys,s,i,v),A}},OZM5:function(ct,_e,K){"use strict";K.d(_e,"b",function(){return R}),K.d(_e,"a",function(){return f}),K.d(_e,"k",function(){return v}),K.d(_e,"h",function(){return u}),K.d(_e,"i",function(){return s}),K.d(_e,"g",function(){return i}),K.d(_e,"c",function(){return A}),K.d(_e,"d",function(){return o}),K.d(_e,"j",function(){return t}),K.d(_e,"e",function(){return _}),K.d(_e,"f",function(){return y});var oe=K("KQm4"),G=K("U8pU"),D=K("Ff2n"),j=K("q1tI"),N=K.n(j),O=K("Kwbf"),X=K("WaYH"),M=.25,e=2;function R(b,x){var E=b.slice(),d=E.indexOf(x);return d>=0&&E.splice(d,1),E}function f(b,x){var E=b.slice();return E.indexOf(x)===-1&&E.push(x),E}function v(b){return b.split("-")}function u(b,x){return"".concat(b,"-").concat(x)}function s(b){return b&&b.type&&b.type.isTreeNode}function i(b,x){var E=[b],d=x[b];function n(){var l=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];l.forEach(function(h){var w=h.key,g=h.children;E.push(w),n(g)})}return n(d.children),E}function A(b,x){var E=b.clientY,d=x.selectHandle.getBoundingClientRect(),n=d.top,l=d.bottom,h=d.height,w=Math.max(h*M,e);return E<=n+w?-1:E>=l-w?1:0}function o(b,x){if(!b)return;var E=x.multiple;return E?b.slice():b.length?[b[0]]:b}var a=function(x){return x};function r(b,x){if(!b)return[];var E=x||{},d=E.processProps,n=d===void 0?a:d,l=Array.isArray(b)?b:[b];return l.map(function(h){var w=h.children,g=Object(D.a)(h,["children"]),c=r(w,x);return N.a.createElement(X.a,Object.assign({},n(g)),c)})}function t(b){if(!b)return null;var x;if(Array.isArray(b))x={checkedKeys:b,halfCheckedKeys:void 0};else if(Object(G.a)(b)==="object")x={checkedKeys:b.checked||void 0,halfCheckedKeys:b.halfChecked||void 0};else return Object(O.a)(!1,"`checkedKeys` is not an array or an object"),null;return x}function _(b,x){var E=new Set;function d(n){if(E.has(n))return;var l=x[n];if(!l)return;E.add(n);var h=l.parent,w=l.node;if(w.disabled)return;h&&d(h.key)}return(b||[]).forEach(function(n){d(n)}),Object(oe.a)(E)}function y(b){var x={};return Object.keys(b).forEach(function(E){(E.startsWith("data-")||E.startsWith("aria-"))&&(x[E]=b[E])}),x}},"SA+Z":function(ct,_e,K){var oe=K("wTVA"),G=K("EbDI"),D=K("ZhPi"),j=K("wkBT");function N(O){return oe(O)||G(O)||D(O)||j()}ct.exports=N,ct.exports.__esModule=!0,ct.exports.default=ct.exports},SJMd:function(ct,_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 K,oe,G,D=!1,j,N;window.PR_SHOULD_USE_CONTINUATION=!0;var O,X;(function(){var M=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"],f=[R,"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],v=[f,"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=[f,"abstract,assert,boolean,byte,extends,finally,final,implements,import,instanceof,interface,null,native,package,strictfp,super,synchronized,throws,transient"],s=[f,"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"],i="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=[f,"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",a=[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"],_=[v,s,u,A,o,a,r,t],y=/^(DIR|FILE|array|vector|(de|priority_)?queue|(forward_)?list|stack|(const_)?(reverse_)?iterator|(unordered_)?(multi)?(set|map)|bitset|u?(int|float)\d*)\b/,b="str",x="kwd",E="com",d="typ",n="lit",l="pun",h="pln",w="tag",g="dec",c="src",L="atn",F="atv",B="nocode",P="(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<<?=?|>>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";function W(re){for(var z=0,Y=!1,J=!1,ie=0,ue=re.length;ie<ue;++ie){var he=re[ie];if(he.ignoreCase)J=!0;else if(/[a-z]/i.test(he.source.replace(/\\u[0-9a-f]{4}|\\x[0-9a-f]{2}|\\[^ux]/gi,""))){Y=!0,J=!1;break}}var He={b:8,t:9,n:10,v:11,f:12,r:13};function We(Te){var De=Te.charCodeAt(0);if(De!==92)return De;var Ve=Te.charAt(1);return De=He[Ve],De||("0"<=Ve&&Ve<="7"?parseInt(Te.substring(1),8):Ve==="u"||Ve==="x"?parseInt(Te.substring(2),16):Te.charCodeAt(1))}function je(Te){if(Te<32)return(Te<16?"\\x0":"\\x")+Te.toString(16);var De=String.fromCharCode(Te);return De==="\\"||De==="-"||De==="]"||De==="^"?"\\"+De:De}function Ge(Te){var De=Te.substring(1,Te.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")),Ve=[],$e=De[0]==="^",Ne=["["];$e&&Ne.push("^");for(var Pe=$e?1:0,Ce=De.length;Pe<Ce;++Pe){var ce=De[Pe];if(/\\[bdsw]/i.test(ce))Ne.push(ce);else{var ge=We(ce),te;Pe+2<Ce&&De[Pe+1]==="-"?(te=We(De[Pe+2]),Pe+=2):te=ge,Ve.push([ge,te]),te<65||ge>122||(te<65||ge>90||Ve.push([Math.max(65,ge)|32,Math.min(te,90)|32]),te<97||ge>122||Ve.push([Math.max(97,ge)&~32,Math.min(te,122)&~32]))}}Ve.sort(function(Re,Me){return Re[0]-Me[0]||Me[1]-Re[1]});for(var ne=[],le=[],Pe=0;Pe<Ve.length;++Pe){var de=Ve[Pe];de[0]<=le[1]+1?le[1]=Math.max(le[1],de[1]):ne.push(le=de)}for(var Pe=0;Pe<ne.length;++Pe){var de=ne[Pe];Ne.push(je(de[0])),de[1]>de[0]&&(de[1]+1>de[0]&&Ne.push("-"),Ne.push(je(de[1])))}return Ne.push("]"),Ne.join("")}function rt(Te){for(var De=Te.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")),Ve=De.length,$e=[],Ne=0,Pe=0;Ne<Ve;++Ne){var Ce=De[Ne];if(Ce==="(")++Pe;else if(Ce.charAt(0)==="\\"){var ce=+Ce.substring(1);ce&&(ce<=Pe?$e[ce]=-1:De[Ne]=je(ce))}}for(var Ne=1;Ne<$e.length;++Ne)$e[Ne]===-1&&($e[Ne]=++z);for(var Ne=0,Pe=0;Ne<Ve;++Ne){var Ce=De[Ne];if(Ce==="(")++Pe,$e[Pe]||(De[Ne]="(?:");else if(Ce.charAt(0)==="\\"){var ce=+Ce.substring(1);ce&&ce<=Pe&&(De[Ne]="\\"+$e[ce])}}for(var Ne=0;Ne<Ve;++Ne)De[Ne]==="^"&&De[Ne+1]!=="^"&&(De[Ne]="");if(Te.ignoreCase&&Y)for(var Ne=0;Ne<Ve;++Ne){var Ce=De[Ne],ge=Ce.charAt(0);Ce.length>=2&&ge==="["?De[Ne]=Ge(Ce):ge!=="\\"&&(De[Ne]=Ce.replace(/[a-zA-Z]/g,function(le){var de=le.charCodeAt(0);return"["+String.fromCharCode(de&~32,de|32)+"]"}))}return De.join("")}for(var st=[],ie=0,ue=re.length;ie<ue;++ie){var he=re[ie];if(he.global||he.multiline)throw new Error(""+he);st.push("(?:"+rt(he)+")")}return new RegExp(st.join("|"),J?"gi":"g")}function U(re,z){var Y=/(?:^|\s)nocode(?:\s|$)/,J=[],ie=0,ue=[],he=0;function He(We){var je=We.nodeType;if(je==1){if(Y.test(We.className))return;for(var Ge=We.firstChild;Ge;Ge=Ge.nextSibling)He(Ge);var rt=We.nodeName.toLowerCase();(rt==="br"||rt==="li")&&(J[he]=`
|
|
`,ue[he<<1]=ie++,ue[he++<<1|1]=We)}else if(je==3||je==4){var st=We.nodeValue;st.length&&(z?st=st.replace(/\r\n?/g,`
|
|
`):st=st.replace(/[ \t\r\n]+/g," "),J[he]=st,ue[he<<1]=ie,ie+=st.length,ue[he++<<1|1]=We)}}return He(re),{sourceCode:J.join("").replace(/\n$/,""),spans:ue}}function $(re,z,Y,J,ie){if(!Y)return;var ue={sourceNode:re,pre:1,langExtension:null,numberLines:null,sourceCode:Y,spans:null,basePos:z,decorations:null};J(ue),ie.push.apply(ie,ue.decorations)}var ee=/\S/;function pe(re){for(var z=void 0,Y=re.firstChild;Y;Y=Y.nextSibling){var J=Y.nodeType;z=J===1?z?re:Y:J===3&&ee.test(Y.nodeValue)?re:z}return z===re?void 0:z}function fe(re,z){var Y={},J;(function(){for(var he=re.concat(z),He=[],We={},je=0,Ge=he.length;je<Ge;++je){var rt=he[je],st=rt[3];if(st)for(var Te=st.length;--Te>=0;)Y[st.charAt(Te)]=rt;var De=rt[1],Ve=""+De;We.hasOwnProperty(Ve)||(He.push(De),We[Ve]=null)}He.push(/[\0-\uffff]/),J=W(He)})();var ie=z.length,ue=function(he){for(var He=he.sourceCode,We=he.basePos,je=he.sourceNode,Ge=[We,h],rt=0,st=He.match(J)||[],Te={},De=0,Ve=st.length;De<Ve;++De){var $e=st[De],Ne=Te[$e],Pe=void 0,Ce;if(typeof Ne=="string")Ce=!1;else{var ce=Y[$e.charAt(0)];if(ce)Pe=$e.match(ce[1]),Ne=ce[0];else{for(var ge=0;ge<ie;++ge)if(ce=z[ge],Pe=$e.match(ce[1]),Pe){Ne=ce[0];break}Pe||(Ne=h)}Ce=Ne.length>=5&&Ne.substring(0,5)==="lang-",Ce&&!(Pe&&typeof Pe[1]=="string")&&(Ce=!1,Ne=c),Ce||(Te[$e]=Ne)}var te=rt;if(rt+=$e.length,!Ce)Ge.push(We+te,Ne);else{var ne=Pe[1],le=$e.indexOf(ne),de=le+ne.length;Pe[2]&&(de=$e.length-Pe[2].length,le=de-ne.length);var Re=Ne.substring(5);$(je,We+te,$e.substring(0,le),ue,Ge),$(je,We+te+le,ne,ve(Re,ne),Ge),$(je,We+te+de,$e.substring(de),ue,Ge)}}he.decorations=Ge};return ue}function Le(re){var z=[],Y=[];re.tripleQuotedStrings?z.push([b,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,`'"`]):re.multiLineStrings?z.push([b,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"]):z.push([b,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,`"'`]),re.verbatimStrings&&Y.push([b,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null]);var J=re.hashComments;J&&(re.cStyleComments?(J>1?z.push([E,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"]):z.push([E,/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"]),Y.push([b,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,null])):z.push([E,/^#[^\r\n]*/,null,"#"])),re.cStyleComments&&(Y.push([E,/^\/\/[^\r\n]*/,null]),Y.push([E,/^\/\*[\s\S]*?(?:\*\/|$)/,null]));var ie=re.regexLiterals;if(ie){var ue=ie>1?"":`
|
|
\r`,he=ue?".":"[\\S\\s]",He="/(?=[^/*"+ue+"])(?:[^/\\x5B\\x5C"+ue+"]|\\x5C"+he+"|\\x5B(?:[^\\x5C\\x5D"+ue+"]|\\x5C"+he+")*(?:\\x5D|$))+/";Y.push(["lang-regex",RegExp("^"+P+"("+He+")")])}var We=re.types;We&&Y.push([d,We]);var je=(""+re.keywords).replace(/^ | $/g,"");je.length&&Y.push([x,new RegExp("^(?:"+je.replace(/[\s,]+/g,"|")+")\\b"),null]),z.push([h,/^\s+/,null,` \r
|
|
\xA0`]);var Ge="^.[^\\s\\w.$@'\"`/\\\\]*";return re.regexLiterals&&(Ge+="(?!s*/)"),Y.push([n,/^@[a-z_$][a-z_$@0-9]*/i,null],[d,/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],[h,/^[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"],[h,/^\\[\s\S]?/,null],[l,new RegExp(Ge),null]),fe(z,Y)}var Ie=Le({keywords:_,hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0});function xe(re,z,Y){for(var J=/(?:^|\s)nocode(?:\s|$)/,ie=/\r\n?|\n/,ue=re.ownerDocument,he=ue.createElement("li");re.firstChild;)he.appendChild(re.firstChild);var He=[he];function We(De){var Ve=De.nodeType;if(Ve==1&&!J.test(De.className))if(De.nodeName==="br")je(De),De.parentNode&&De.parentNode.removeChild(De);else for(var $e=De.firstChild;$e;$e=$e.nextSibling)We($e);else if((Ve==3||Ve==4)&&Y){var Ne=De.nodeValue,Pe=Ne.match(ie);if(Pe){var Ce=Ne.substring(0,Pe.index);De.nodeValue=Ce;var ce=Ne.substring(Pe.index+Pe[0].length);if(ce){var ge=De.parentNode;ge.insertBefore(ue.createTextNode(ce),De.nextSibling)}je(De),Ce||De.parentNode.removeChild(De)}}}function je(De){for(;!De.nextSibling;)if(De=De.parentNode,!De)return;function Ve(Pe,Ce){var ce=Ce?Pe.cloneNode(!1):Pe,ge=Pe.parentNode;if(ge){var te=Ve(ge,1),ne=Pe.nextSibling;te.appendChild(ce);for(var le=ne;le;le=ne)ne=le.nextSibling,te.appendChild(le)}return ce}for(var $e=Ve(De.nextSibling,0),Ne;(Ne=$e.parentNode)&&Ne.nodeType===1;)$e=Ne;He.push($e)}for(var Ge=0;Ge<He.length;++Ge)We(He[Ge]);z===(z|0)&&He[0].setAttribute("value",z);var rt=ue.createElement("ol");rt.className="linenums";for(var st=Math.max(0,z-1|0)||0,Ge=0,Te=He.length;Ge<Te;++Ge)he=He[Ge],he.className="L"+(Ge+st)%10,he.firstChild||he.appendChild(ue.createTextNode("\xA0")),rt.appendChild(he);re.appendChild(rt)}function Ue(re){var z=/\bMSIE\s(\d+)/.exec(navigator.userAgent);z=z&&+z[1]<=8;var Y=/\n/g,J=re.sourceCode,ie=J.length,ue=0,he=re.spans,He=he.length,We=0,je=re.decorations,Ge=je.length,rt=0;je[Ge]=ie;var st,Te;for(Te=st=0;Te<Ge;)je[Te]!==je[Te+2]?(je[st++]=je[Te++],je[st++]=je[Te++]):Te+=2;for(Ge=st,Te=st=0;Te<Ge;){for(var De=je[Te],Ve=je[Te+1],$e=Te+2;$e+2<=Ge&&je[$e+1]===Ve;)$e+=2;je[st++]=De,je[st++]=Ve,Te=$e}Ge=je.length=st;var Ne=re.sourceNode,Pe="";Ne&&(Pe=Ne.style.display,Ne.style.display="none");try{for(var Ce=null;We<He;){var ce=he[We],ge=he[We+2]||ie,te=je[rt+2]||ie,$e=Math.min(ge,te),ne=he[We+1],le;if(ne.nodeType!==1&&(le=J.substring(ue,$e))){z&&(le=le.replace(Y,"\r")),ne.nodeValue=le;var de=ne.ownerDocument,Re=de.createElement("span");Re.className=je[rt+1];var Me=ne.parentNode;Me.replaceChild(Re,ne),Re.appendChild(ne),ue<ge&&(he[We+1]=ne=de.createTextNode(J.substring($e,ge)),Me.insertBefore(ne,Re.nextSibling))}ue=$e,ue>=ge&&(We+=2),ue>=te&&(rt+=2)}}finally{Ne&&(Ne.style.display=Pe)}}var Fe={};function we(re,z){for(var Y=z.length;--Y>=0;){var J=z[Y];Fe.hasOwnProperty(J)?M.console&&console.warn("cannot override language handler %s",J):Fe[J]=re}}function ve(re,z){return re&&Fe.hasOwnProperty(re)||(re=/^\s*</.test(z)?"default-markup":"default-code"),Fe[re]}we(Ie,["default-code"]),we(fe([],[[h,/^[^<?]+/],[g,/^<!\w[^>]*(?:>|$)/],[E,/^<\!--[\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"]),we(fe([[h,/^[\s]+/,null,` \r
|
|
`],[F,/^(?:\"[^\"]*\"?|\'[^\']*\'?)/,null,`"'`]],[[w,/^^<\/?[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"]),we(fe([],[[F,/^[\s\S]+/]]),["uq.val"]),we(Le({keywords:v,hashComments:!0,cStyleComments:!0,types:y}),["c","cc","cpp","cxx","cyc","m"]),we(Le({keywords:"null,true,false"}),["json"]),we(Le({keywords:s,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:y}),["cs"]),we(Le({keywords:u,cStyleComments:!0}),["java"]),we(Le({keywords:t,hashComments:!0,multiLineStrings:!0}),["bash","bsh","csh","sh"]),we(Le({keywords:a,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),["cv","py","python"]),we(Le({keywords:o,hashComments:!0,multiLineStrings:!0,regexLiterals:2}),["perl","pl","pm"]),we(Le({keywords:r,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb","ruby"]),we(Le({keywords:A,cStyleComments:!0,regexLiterals:!0}),["javascript","js","ts","typescript"]),we(Le({keywords:i,hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]),we(fe([],[[b,/^[\s\S]+/]]),["regex"]);function ze(re){var z=re.langExtension;try{var Y=U(re.sourceNode,re.pre),J=Y.sourceCode;re.sourceCode=J,re.spans=Y.spans,re.basePos=0,ve(z,J)(re),Ue(re)}catch(ie){M.console&&console.log(ie&&ie.stack||ie)}}function at(re,z,Y){var J=Y||!1,ie=z||null,ue=document.createElement("div");ue.innerHTML="<pre>"+re+"</pre>",ue=ue.firstChild,J&&xe(ue,J,!0);var he={langExtension:ie,numberLines:J,sourceNode:ue,pre:1,sourceCode:null,basePos:null,spans:null,decorations:null};return ze(he),ue.innerHTML}function nt(re,z){var Y=z||document.body,J=Y.ownerDocument||document;function ie(ce){return Y.getElementsByTagName(ce)}for(var ue=[ie("pre"),ie("code"),ie("xmp")],he=[],He=0;He<ue.length;++He)for(var We=0,je=ue[He].length;We<je;++We)he.push(ue[He][We]);ue=null;var Ge=Date;Ge.now||(Ge={now:function(){return+new Date}});var rt=0,st=/\blang(?:uage)?-([\w.]+)(?!\S)/,Te=/\bprettyprint\b/,De=/\bprettyprinted\b/,Ve=/pre|xmp/i,$e=/^code$/i,Ne=/^(?:pre|code|xmp)$/i,Pe={};function Ce(){for(var ce=M.PR_SHOULD_USE_CONTINUATION?Ge.now()+250:Infinity;rt<he.length&&Ge.now()<ce;rt++){for(var ge=he[rt],te=Pe,ne=ge;ne=ne.previousSibling;){var le=ne.nodeType,de=(le===7||le===8)&&ne.nodeValue;if(de?!/^\??prettify\b/.test(de):le!==3||/\S/.test(ne.nodeValue))break;if(de){te={},de.replace(/\b(\w+)=([\w:.%+-]+)/g,function(qt,Ft,rr){te[Ft]=rr});break}}var Re=ge.className;if((te!==Pe||Te.test(Re))&&!De.test(Re)){for(var Me=!1,qe=ge.parentNode;qe;qe=qe.parentNode){var lt=qe.tagName;if(Ne.test(lt)&&qe.className&&Te.test(qe.className)){Me=!0;break}}if(!Me){ge.className+=" prettyprinted";var ft=te.lang;if(!ft){ft=Re.match(st);var At;!ft&&(At=pe(ge))&&$e.test(At.tagName)&&(ft=At.className.match(st)),ft&&(ft=ft[1])}var Bt;if(Ve.test(ge.tagName))Bt=1;else{var St=ge.currentStyle,it=J.defaultView,Wt=St?St.whiteSpace:it&&it.getComputedStyle?it.getComputedStyle(ge,null).getPropertyValue("white-space"):0;Bt=Wt&&Wt.substring(0,3)==="pre"}var Qt=te.linenums;(Qt=Qt==="true"||+Qt)||(Qt=Re.match(/\blinenums\b(?::(\d+))?/),Qt=Qt?Qt[1]&&Qt[1].length?+Qt[1]:!0:!1),Qt&&xe(ge,Qt,Bt);var It={langExtension:ft,sourceNode:ge,numberLines:Qt,pre:Bt,sourceCode:null,basePos:null,spans:null,decorations:null};ze(It)}}}rt<he.length?M.setTimeout(Ce,250):typeof re=="function"&&re()}Ce()}var et=M.PR={createSimpleLexer:fe,registerLangHandler:we,sourceDecorator:Le,PR_ATTRIB_NAME:L,PR_ATTRIB_VALUE:F,PR_COMMENT:E,PR_DECLARATION:g,PR_KEYWORD:x,PR_LITERAL:n,PR_NOCODE:B,PR_PLAIN:h,PR_PUNCTUATION:l,PR_SOURCE:c,PR_STRING:b,PR_TAG:w,PR_TYPE:d,prettyPrintOne:D?M.prettyPrintOne=at:O=at,prettyPrint:X=D?M.prettyPrint=nt:X=nt},Ke=M.define;typeof Ke=="function"&&Ke.amd&&Ke("google-code-prettify",[],function(){return et})})()},T7RX:function(ct,_e,K){"use strict";var oe=K("2qtc"),G=K("kLXV"),D=K("k1fw"),j=K("miYZ"),N=K("tsqr"),O=K("9og8"),X=K("PpiC"),M=K("WmNS"),e=K.n(M),R=K("q1tI"),f=K.n(R),v=K("ErOA"),u=K("Ty5D"),s=K("9kvl"),i=function(o){var a=o.shixunHomeworks,r=o.dispatch,t=Object(X.a)(o,["shixunHomeworks","dispatch"]),_=Object(u.i)();return f.a.createElement(G.a,{centered:!0,title:"\u63D0\u793A",visible:a.actionTabs.key==="\u6253\u56DE\u91CD\u505A",okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",onOk:Object(O.a)(e.a.mark(function y(){var b;return e.a.wrap(function(E){for(;;)switch(E.prev=E.next){case 0:return E.next=2,Object(v.a)("/api/myshixuns/".concat(a.actionTabs.selectArrs.myshixun_identifier,"/reset_my_game.json"),{method:"GET",params:{course_id:_.coursesId}});case 2:b=E.sent,b.shixun_identifier&&(N.b.success("\u64CD\u4F5C\u6210\u529F"),r({type:"shixunHomeworks/setActionTabs",payload:{}}),r({type:"shixunHomeworks/getWorkList",payload:Object(D.a)({},a.actionTabs.params)}));case 4:case"end":return E.stop()}},y)})),onCancel:function(){r({type:"shixunHomeworks/setActionTabs",payload:{}})}},f.a.createElement("p",null,"\u8BE5\u4F5C\u4E1A\u5C06\u88AB\u6253\u56DE\u91CD\u505A\uFF0C\u5B66\u751F\u5B9E\u8BAD\u8BB0\u5F55\u5C06\u88AB\u6E05\u7A7A!"),f.a.createElement("p",null,"\u786E\u5B9A\u6253\u56DE?"))};_e.a=Object(s.a)(function(A){var o=A.shixunHomeworks;return{shixunHomeworks:o}})(i)},T8No:function(ct,_e,K){"use strict";K.d(_e,"a",function(){return X}),K.d(_e,"e",function(){return M}),K.d(_e,"c",function(){return l}),K.d(_e,"b",function(){return h}),K.d(_e,"d",function(){return w}),K.d(_e,"f",function(){return L});var oe=K("MNsG"),G=K("N0LK"),D=K("Cg/j");let j=oe.k||"";const N=new Map;N.set("false",!1),N.set("true",!0),N.set("isMac",oe.f),N.set("isLinux",oe.d),N.set("isWindows",oe.i),N.set("isWeb",oe.h),N.set("isMacNative",oe.f&&!oe.h),N.set("isEdge",j.indexOf("Edg/")>=0),N.set("isFirefox",j.indexOf("Firefox")>=0),N.set("isChrome",j.indexOf("Chrome")>=0),N.set("isSafari",j.indexOf("Safari")>=0);const O=Object.prototype.hasOwnProperty;class X{static has(B){return v.create(B)}static equals(B,P){return u.create(B,P)}static regex(B,P){return b.create(B,P)}static not(B){return o.create(B)}static and(...B){return d.create(B,null)}static or(...B){return n.create(B,null,!0)}static deserialize(B,P=!1){return B?this._deserializeOrExpression(B,P):void 0}static _deserializeOrExpression(B,P){let W=B.split("||");return n.create(W.map(U=>this._deserializeAndExpression(U,P)),null,!0)}static _deserializeAndExpression(B,P){let W=B.split("&&");return d.create(W.map(U=>this._deserializeOne(U,P)),null)}static _deserializeOne(B,P){if(B=B.trim(),B.indexOf("!=")>=0){let W=B.split("!=");return A.create(W[0].trim(),this._deserializeValue(W[1],P))}if(B.indexOf("==")>=0){let W=B.split("==");return u.create(W[0].trim(),this._deserializeValue(W[1],P))}if(B.indexOf("=~")>=0){let W=B.split("=~");return b.create(W[0].trim(),this._deserializeRegexValue(W[1],P))}if(B.indexOf(" in ")>=0){let W=B.split(" in ");return s.create(W[0].trim(),W[1].trim())}if(/^[^<=>]+>=[^<=>]+$/.test(B)){const W=B.split(">=");return t.create(W[0].trim(),W[1].trim())}if(/^[^<=>]+>[^<=>]+$/.test(B)){const W=B.split(">");return r.create(W[0].trim(),W[1].trim())}if(/^[^<=>]+<=[^<=>]+$/.test(B)){const W=B.split("<=");return y.create(W[0].trim(),W[1].trim())}if(/^[^<=>]+<[^<=>]+$/.test(B)){const W=B.split("<");return _.create(W[0].trim(),W[1].trim())}return/^\!\s*/.test(B)?o.create(B.substr(1).trim()):v.create(B)}static _deserializeValue(B,P){if(B=B.trim(),B==="true")return!0;if(B==="false")return!1;let W=/^'([^']*)'$/.exec(B);return W?W[1].trim():B}static _deserializeRegexValue(B,P){if(Object(G.C)(B)){if(P)throw new Error("missing regexp-value for =~-expression");return console.warn("missing regexp-value for =~-expression"),null}let W=B.indexOf("/"),U=B.lastIndexOf("/");if(W===U||W<0){if(P)throw new Error(`bad regexp-value '${B}', missing /-enclosure`);return console.warn(`bad regexp-value '${B}', missing /-enclosure`),null}let $=B.slice(W+1,U),ee=B[U+1]==="i"?"i":"";try{return new RegExp($,ee)}catch(pe){if(P)throw new Error(`bad regexp-value '${B}', parse error: ${pe}`);return console.warn(`bad regexp-value '${B}', parse error: ${pe}`),null}}}function M(B,P){const W=B?B.substituteConstants():void 0,U=P?P.substituteConstants():void 0;return!W&&!U?!0:!W||!U?!1:W.equals(U)}function e(B,P){return B.cmp(P)}class R{constructor(){this.type=0}cmp(B){return this.type-B.type}equals(B){return B.type===this.type}substituteConstants(){return this}evaluate(B){return!1}serialize(){return"false"}keys(){return[]}negate(){return f.INSTANCE}}R.INSTANCE=new R;class f{constructor(){this.type=1}cmp(B){return this.type-B.type}equals(B){return B.type===this.type}substituteConstants(){return this}evaluate(B){return!0}serialize(){return"true"}keys(){return[]}negate(){return R.INSTANCE}}f.INSTANCE=new f;class v{constructor(B,P){this.key=B,this.negated=P,this.type=2}static create(B,P=null){const W=N.get(B);return typeof W=="boolean"?W?f.INSTANCE:R.INSTANCE:new v(B,P)}cmp(B){return B.type!==this.type?this.type-B.type:g(this.key,B.key)}equals(B){return B.type===this.type?this.key===B.key:!1}substituteConstants(){const B=N.get(this.key);return typeof B=="boolean"?B?f.INSTANCE:R.INSTANCE:this}evaluate(B){return!!B.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(B,P,W){this.key=B,this.value=P,this.negated=W,this.type=4}static create(B,P,W=null){if(typeof P=="boolean")return P?v.create(B,W):o.create(B,W);const U=N.get(B);if(typeof U=="boolean"){const $=U?"true":"false";return P===$?f.INSTANCE:R.INSTANCE}return new u(B,P,W)}cmp(B){return B.type!==this.type?this.type-B.type:c(this.key,this.value,B.key,B.value)}equals(B){return B.type===this.type?this.key===B.key&&this.value===B.value:!1}substituteConstants(){const B=N.get(this.key);if(typeof B=="boolean"){const P=B?"true":"false";return this.value===P?f.INSTANCE:R.INSTANCE}return this}evaluate(B){return B.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(B,P){this.key=B,this.valueKey=P,this.type=10,this.negated=null}static create(B,P){return new s(B,P)}cmp(B){return B.type!==this.type?this.type-B.type:c(this.key,this.valueKey,B.key,B.valueKey)}equals(B){return B.type===this.type?this.key===B.key&&this.valueKey===B.valueKey:!1}substituteConstants(){return this}evaluate(B){const P=B.getValue(this.valueKey),W=B.getValue(this.key);return Array.isArray(P)?P.indexOf(W)>=0:typeof W=="string"&&typeof P=="object"&&P!==null?O.call(P,W):!1}serialize(){return`${this.key} in '${this.valueKey}'`}keys(){return[this.key,this.valueKey]}negate(){return this.negated||(this.negated=i.create(this)),this.negated}}class i{constructor(B){this._actual=B,this.type=11}static create(B){return new i(B)}cmp(B){return B.type!==this.type?this.type-B.type:this._actual.cmp(B._actual)}equals(B){return B.type===this.type?this._actual.equals(B._actual):!1}substituteConstants(){return this}evaluate(B){return!this._actual.evaluate(B)}serialize(){throw new Error("Method not implemented.")}keys(){return this._actual.keys()}negate(){return this._actual}}class A{constructor(B,P,W){this.key=B,this.value=P,this.negated=W,this.type=5}static create(B,P,W=null){if(typeof P=="boolean")return P?o.create(B,W):v.create(B,W);const U=N.get(B);if(typeof U=="boolean"){const $=U?"true":"false";return P===$?R.INSTANCE:f.INSTANCE}return new A(B,P,W)}cmp(B){return B.type!==this.type?this.type-B.type:c(this.key,this.value,B.key,B.value)}equals(B){return B.type===this.type?this.key===B.key&&this.value===B.value:!1}substituteConstants(){const B=N.get(this.key);if(typeof B=="boolean"){const P=B?"true":"false";return this.value===P?R.INSTANCE:f.INSTANCE}return this}evaluate(B){return B.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(B,P){this.key=B,this.negated=P,this.type=3}static create(B,P=null){const W=N.get(B);return typeof W=="boolean"?W?R.INSTANCE:f.INSTANCE:new o(B,P)}cmp(B){return B.type!==this.type?this.type-B.type:g(this.key,B.key)}equals(B){return B.type===this.type?this.key===B.key:!1}substituteConstants(){const B=N.get(this.key);return typeof B=="boolean"?B?R.INSTANCE:f.INSTANCE:this}evaluate(B){return!B.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 a(B,P){if(typeof B=="string"){const W=parseFloat(B);isNaN(W)||(B=W)}return typeof B=="string"||typeof B=="number"?P(B):R.INSTANCE}class r{constructor(B,P,W){this.key=B,this.value=P,this.negated=W,this.type=12}static create(B,P,W=null){return a(P,U=>new r(B,U,W))}cmp(B){return B.type!==this.type?this.type-B.type:c(this.key,this.value,B.key,B.value)}equals(B){return B.type===this.type?this.key===B.key&&this.value===B.value:!1}substituteConstants(){return this}evaluate(B){return typeof this.value=="string"?!1:parseFloat(B.getValue(this.key))>this.value}serialize(){return`${this.key} > ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=y.create(this.key,this.value,this)),this.negated}}class t{constructor(B,P,W){this.key=B,this.value=P,this.negated=W,this.type=13}static create(B,P,W=null){return a(P,U=>new t(B,U,W))}cmp(B){return B.type!==this.type?this.type-B.type:c(this.key,this.value,B.key,B.value)}equals(B){return B.type===this.type?this.key===B.key&&this.value===B.value:!1}substituteConstants(){return this}evaluate(B){return typeof this.value=="string"?!1:parseFloat(B.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 _{constructor(B,P,W){this.key=B,this.value=P,this.negated=W,this.type=14}static create(B,P,W=null){return a(P,U=>new _(B,U,W))}cmp(B){return B.type!==this.type?this.type-B.type:c(this.key,this.value,B.key,B.value)}equals(B){return B.type===this.type?this.key===B.key&&this.value===B.value:!1}substituteConstants(){return this}evaluate(B){return typeof this.value=="string"?!1:parseFloat(B.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 y{constructor(B,P,W){this.key=B,this.value=P,this.negated=W,this.type=15}static create(B,P,W=null){return a(P,U=>new y(B,U,W))}cmp(B){return B.type!==this.type?this.type-B.type:c(this.key,this.value,B.key,B.value)}equals(B){return B.type===this.type?this.key===B.key&&this.value===B.value:!1}substituteConstants(){return this}evaluate(B){return typeof this.value=="string"?!1:parseFloat(B.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 b{constructor(B,P){this.key=B,this.regexp=P,this.type=7,this.negated=null}static create(B,P){return new b(B,P)}cmp(B){if(B.type!==this.type)return this.type-B.type;if(this.key<B.key)return-1;if(this.key>B.key)return 1;const P=this.regexp?this.regexp.source:"",W=B.regexp?B.regexp.source:"";return P<W?-1:P>W?1:0}equals(B){if(B.type===this.type){const P=this.regexp?this.regexp.source:"",W=B.regexp?B.regexp.source:"";return this.key===B.key&&P===W}return!1}substituteConstants(){return this}evaluate(B){let P=B.getValue(this.key);return this.regexp?this.regexp.test(P):!1}serialize(){const B=this.regexp?`/${this.regexp.source}/${this.regexp.ignoreCase?"i":""}`:"/invalid/";return`${this.key} =~ ${B}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=x.create(this)),this.negated}}class x{constructor(B){this._actual=B,this.type=8}static create(B){return new x(B)}cmp(B){return B.type!==this.type?this.type-B.type:this._actual.cmp(B._actual)}equals(B){return B.type===this.type?this._actual.equals(B._actual):!1}substituteConstants(){return this}evaluate(B){return!this._actual.evaluate(B)}serialize(){throw new Error("Method not implemented.")}keys(){return this._actual.keys()}negate(){return this._actual}}function E(B){let P=null;for(let W=0,U=B.length;W<U;W++){const $=B[W].substituteConstants();if(B[W]!==$&&P===null){P=[];for(let ee=0;ee<W;ee++)P[ee]=B[ee]}P!==null&&(P[W]=$)}return P===null?B:P}class d{constructor(B,P){this.expr=B,this.negated=P,this.type=6}static create(B,P){return d._normalizeArr(B,P)}cmp(B){if(B.type!==this.type)return this.type-B.type;if(this.expr.length<B.expr.length)return-1;if(this.expr.length>B.expr.length)return 1;for(let P=0,W=this.expr.length;P<W;P++){const U=e(this.expr[P],B.expr[P]);if(U!==0)return U}return 0}equals(B){if(B.type===this.type){if(this.expr.length!==B.expr.length)return!1;for(let P=0,W=this.expr.length;P<W;P++)if(!this.expr[P].equals(B.expr[P]))return!1;return!0}return!1}substituteConstants(){const B=E(this.expr);return B===this.expr?this:d.create(B,this.negated)}evaluate(B){for(let P=0,W=this.expr.length;P<W;P++)if(!this.expr[P].evaluate(B))return!1;return!0}static _normalizeArr(B,P){const W=[];let U=!1;for(const $ of B){if(!$)continue;if($.type===1){U=!0;continue}if($.type===0)return R.INSTANCE;if($.type===6){W.push(...$.expr);continue}W.push($)}if(W.length===0&&U)return f.INSTANCE;if(W.length===0)return;if(W.length===1)return W[0];W.sort(e);for(let $=1;$<W.length;$++)W[$-1].equals(W[$])&&(W.splice($,1),$--);if(W.length===1)return W[0];for(;W.length>1;){const $=W[W.length-1];if($.type!==9)break;W.pop();const ee=W.pop(),pe=W.length===0,fe=n.create($.expr.map(Le=>d.create([Le,ee],null)),null,pe);fe&&(W.push(fe),W.sort(e))}return W.length===1?W[0]:new d(W,P)}serialize(){return this.expr.map(B=>B.serialize()).join(" && ")}keys(){const B=[];for(let P of this.expr)B.push(...P.keys());return B}negate(){if(!this.negated){const B=[];for(let P of this.expr)B.push(P.negate());this.negated=n.create(B,this,!0)}return this.negated}}class n{constructor(B,P){this.expr=B,this.negated=P,this.type=9}static create(B,P,W){return n._normalizeArr(B,P,W)}cmp(B){if(B.type!==this.type)return this.type-B.type;if(this.expr.length<B.expr.length)return-1;if(this.expr.length>B.expr.length)return 1;for(let P=0,W=this.expr.length;P<W;P++){const U=e(this.expr[P],B.expr[P]);if(U!==0)return U}return 0}equals(B){if(B.type===this.type){if(this.expr.length!==B.expr.length)return!1;for(let P=0,W=this.expr.length;P<W;P++)if(!this.expr[P].equals(B.expr[P]))return!1;return!0}return!1}substituteConstants(){const B=E(this.expr);return B===this.expr?this:n.create(B,this.negated,!1)}evaluate(B){for(let P=0,W=this.expr.length;P<W;P++)if(this.expr[P].evaluate(B))return!0;return!1}static _normalizeArr(B,P,W){let U=[],$=!1;if(B){for(let ee=0,pe=B.length;ee<pe;ee++){const fe=B[ee];if(!fe)continue;if(fe.type===0){$=!0;continue}if(fe.type===1)return f.INSTANCE;if(fe.type===9){U=U.concat(fe.expr);continue}U.push(fe)}if(U.length===0&&$)return R.INSTANCE;U.sort(e)}if(U.length===0)return;if(U.length===1)return U[0];for(let ee=1;ee<U.length;ee++)U[ee-1].equals(U[ee])&&(U.splice(ee,1),ee--);if(U.length===1)return U[0];if(W){for(let ee=0;ee<U.length;ee++)for(let pe=ee+1;pe<U.length;pe++)L(U[ee],U[pe])&&(U.splice(pe,1),pe--);if(U.length===1)return U[0]}return new n(U,P)}serialize(){return this.expr.map(B=>B.serialize()).join(" || ")}keys(){const B=[];for(let P of this.expr)B.push(...P.keys());return B}negate(){if(!this.negated){let B=[];for(let P of this.expr)B.push(P.negate());for(;B.length>1;){const P=B.shift(),W=B.shift(),U=[];for(const ee of F(P))for(const pe of F(W))U.push(d.create([ee,pe],null));const $=B.length===0;B.unshift(n.create(U,null,$))}this.negated=B[0]}return this.negated}}class l extends v{constructor(B,P,W){super(B,null);this._defaultValue=P,typeof W=="object"?l._info.push(Object.assign(Object.assign({},W),{key:B})):W!==!0&&l._info.push({key:B,description:W,type:P!=null?typeof P:void 0})}static all(){return l._info.values()}bindTo(B){return B.createKey(this.key,this._defaultValue)}getValue(B){return B.getContextKeyValue(this.key)}toNegated(){return this.negate()}isEqualTo(B){return u.create(this.key,B)}}l._info=[];const h=Object(D.c)("contextKeyService"),w="setContext";function g(B,P){return B<P?-1:B>P?1:0}function c(B,P,W,U){return B<W?-1:B>W?1:P<U?-1:P>U?1:0}function L(B,P){if(P.type===6&&B.type!==9&&B.type!==6){for(const $ of P.expr)if(B.equals($))return!0}const W=B.negate(),U=F(W).concat(F(P));U.sort(e);for(let $=0;$<U.length;$++){const ee=U[$],pe=ee.negate();for(let fe=$+1;fe<U.length;fe++){const Le=U[fe];if(pe.equals(Le))return!0}}return!1}function F(B){return B.type===9?B.expr:[B]}},TXwP:function(ct,_e,K){var oe,G;(function(){var D;(function(){"use strict";var N=[,,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 f(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}f.prototype.get_indent_size=function(u,s){var i=this.__base_string_length;return s=s||0,u<0&&(i=0),i+=u*this.__indent_size,i+=s,i},f.prototype.get_indent_string=function(u,s){var i=this.__base_string;return s=s||0,u<0&&(u=0,i=""),s+=u*this.__indent_size,this.__ensure_cache(s),i+=this.__cache[s],i},f.prototype.__ensure_cache=function(u){for(;u>=this.__cache.length;)this.__add_column()},f.prototype.__add_column=function(){var u=this.__cache.length,s=0,i="";this.__indent_size&&u>=this.__indent_size&&(s=Math.floor(u/this.__indent_size),u-=s*this.__indent_size,i=new Array(s+1).join(this.__indent_string)),u&&(i+=new Array(u+1).join(" ")),this.__cache.push(i)};function v(u,s){this.__indent_cache=new f(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 i=this.__lines.join(`
|
|
`);return u!==`
|
|
`&&(i=i.replace(/[\n]/g,u)),i},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 i=this.__lines.length-2;i>=0;){var A=this.__lines[i];if(A.is_empty())break;if(A.item(0).indexOf(u)!==0&&A.item(-1)!==s){this.__lines.splice(i+1,0,new R(this)),this.previous_line=this.__lines[this.__lines.length-2];break}i--}},e.exports.Output=v},,,,function(e){function R(u,s){this.raw_options=f(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 i=this.raw_options[u],A=s||[];return typeof i=="object"?i!==null&&typeof i.concat=="function"&&(A=i.concat()):typeof i=="string"&&(A=i.split(/[^a-zA-Z0-9_\/\-]+/)),A},R.prototype._get_boolean=function(u,s){var i=this.raw_options[u],A=i===void 0?!!s:!!i;return A},R.prototype._get_characters=function(u,s){var i=this.raw_options[u],A=s||"";return typeof i=="string"&&(A=i.replace(/\\r/,"\r").replace(/\\n/,`
|
|
`).replace(/\\t/," ")),A},R.prototype._get_number=function(u,s){var i=this.raw_options[u];s=parseInt(s,10),isNaN(s)&&(s=0);var A=parseInt(i,10);return isNaN(A)&&(A=s),A},R.prototype._get_selection=function(u,s,i){var A=this._get_selection_list(u,s,i);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,i){if(!s||s.length===0)throw new Error("Selection list cannot be empty.");if(i=i||[s[0]],!this._is_valid_selection(i,s))throw new Error("Invalid Default Value!");var A=this._get_array(u,i);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(i){return s.indexOf(i)===-1})};function f(u,s){var i={};u=v(u);var A;for(A in u)A!==s&&(i[A]=u[A]);if(s&&u[s])for(A in u[s])i[A]=u[s][A];return i}function v(u){var s={},i;for(i in u){var A=i.replace(/-/g,"_");s[A]=u[i]}return s}e.exports.Options=R,e.exports.normalizeOpts=v,e.exports.mergeOpts=f},,function(e){var R=RegExp.prototype.hasOwnProperty("sticky");function f(v){this.__input=v||"",this.__input_length=this.__input.length,this.__position=0}f.prototype.restart=function(){this.__position=0},f.prototype.back=function(){this.__position>0&&(this.__position-=1)},f.prototype.hasNext=function(){return this.__position<this.__input_length},f.prototype.next=function(){var v=null;return this.hasNext()&&(v=this.__input.charAt(this.__position),this.__position+=1),v},f.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},f.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},f.prototype.test=function(v,u){return u=u||0,u+=this.__position,u>=0&&u<this.__input_length?!!this.__match(v,u):!1},f.prototype.testChar=function(v,u){var s=this.peek(u);return v.lastIndex=0,s!==null&&v.test(s)},f.prototype.match=function(v){var u=this.__match(v,this.__position);return u?this.__position+=u[0].length:u=null,u},f.prototype.read=function(v,u,s){var i="",A;return v&&(A=this.match(v),A&&(i+=A[0])),u&&(A||!v)&&(i+=this.readUntil(u,s)),i},f.prototype.readUntil=function(v,u){var s="",i=this.__position;v.lastIndex=this.__position;var A=v.exec(this.__input);return A?(i=A.index,u&&(i+=A[0].length)):i=this.__input_length,s=this.__input.substring(this.__position,i),this.__position=i,s},f.prototype.readUntilAfter=function(v){return this.readUntil(v,!0)},f.prototype.get_regexp=function(v,u){var s=null,i="g";return u&&R&&(i="y"),typeof v=="string"&&v!==""?s=new RegExp(v,i):v&&(s=new RegExp(v.source,i)),s},f.prototype.get_literal_regexp=function(v){return RegExp(v.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},f.prototype.peekUntilAfter=function(v){var u=this.__position,s=this.readUntilAfter(v);return this.__position=u,s},f.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=f},,,,,function(e){function R(f,v){f=typeof f=="string"?f:f.source,v=typeof v=="string"?v:v.source,this.__directives_block_pattern=new RegExp(f+/ beautify( \w+[:]\w+)+ /.source+v,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(f+/\sbeautify\signore:end\s/.source+v,"g")}R.prototype.get_directives=function(f){if(!f.match(this.__directives_block_pattern))return null;var v={};this.__directive_pattern.lastIndex=0;for(var u=this.__directive_pattern.exec(f);u;)v[u[1]]=u[2],u=this.__directive_pattern.exec(f);return v},R.prototype.readIgnored=function(f){return f.readUntilAfter(this.__directives_end_ignore_pattern)},e.exports.Directives=R},,function(e,R,f){var v=f(16).Beautifier,u=f(17).Options;function s(i,A){var o=new v(i,A);return o.beautify()}e.exports=s,e.exports.defaultOptions=function(){return new u}},function(e,R,f){var v=f(17).Options,u=f(2).Output,s=f(8).InputScanner,i=f(13).Directives,A=new i(/\/\*/,/\*\//),o=/\r\n|[\r\n]/,a=/\r\n|[\r\n]/g,r=/\s/,t=/(?:\s|\n)+/g,_=/\/\*(?:[\s\S]*?)((?:\*\/)|$)/g,y=/\/\/(?:[^\n\r\u2028\u2029]*)/g;function b(x,E){this._source_text=x||"",this._options=new v(E),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"]}b.prototype.eatString=function(x){var E="";for(this._ch=this._input.next();this._ch;){if(E+=this._ch,this._ch==="\\")E+=this._input.next();else if(x.indexOf(this._ch)!==-1||this._ch===`
|
|
`)break;this._ch=this._input.next()}return E},b.prototype.eatWhitespace=function(x){for(var E=r.test(this._input.peek()),d=0;r.test(this._input.peek());)this._ch=this._input.next(),x&&this._ch===`
|
|
`&&((d===0||d<this._options.max_preserve_newlines)&&(d++,this._output.add_new_line(!0)));return E},b.prototype.foundNestedPseudoClass=function(){for(var x=0,E=1,d=this._input.peek(E);d;){if(d==="{")return!0;if(d==="(")x+=1;else if(d===")"){if(x===0)return!1;x-=1}else if(d===";"||d==="}")return!1;E++,d=this._input.peek(E)}return!1},b.prototype.print_string=function(x){this._output.set_indent(this._indentLevel),this._output.non_breaking_space=!0,this._output.add_token(x)},b.prototype.preserveSingleSpace=function(x){x&&(this._output.space_before_token=!0)},b.prototype.indent=function(){this._indentLevel++},b.prototype.outdent=function(){this._indentLevel>0&&this._indentLevel--},b.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var x=this._source_text,E=this._options.eol;E==="auto"&&(E=`
|
|
`,x&&o.test(x||"")&&(E=x.match(o)[0])),x=x.replace(a,`
|
|
`);var d=x.match(/^[\t ]*/)[0];this._output=new u(this._options,d),this._input=new s(x),this._indentLevel=0,this._nestedLevel=0,this._ch=null;for(var n=0,l=!1,h=!1,w=!1,g=!1,c=!1,L=!1,F=this._ch,B=!1,P,W,U;P=this._input.read(t),W=P!=="",U=F,this._ch=this._input.next(),this._ch==="\\"&&this._input.hasNext()&&(this._ch+=this._input.next()),F=this._ch,this._ch;)if(this._ch==="/"&&this._input.peek()==="*"){this._output.add_new_line(),this._input.back();var $=this._input.read(_),ee=A.get_directives($);ee&&ee.ignore==="start"&&($+=A.readIgnored(this._input)),this.print_string($),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(y)),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 pe=this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);pe.match(/[ :]$/)&&(pe=this.eatString(": ").replace(/\s$/,""),this.print_string(pe),this._output.space_before_token=!0),pe=pe.replace(/\s$/,""),pe==="extend"?g=!0:pe==="import"&&(c=!0),pe in this.NESTED_AT_RULE?(this._nestedLevel+=1,pe in this.CONDITIONAL_GROUP_RULE&&(w=!0)):!l&&n===0&&pe.indexOf(":")!==-1&&(h=!0,this.indent())}else if(this._ch==="#"&&this._input.peek()==="{")this.preserveSingleSpace(W),this.print_string(this._ch+this.eatString("}"));else if(this._ch==="{")h&&(h=!1,this.outdent()),w?(w=!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),c=!1,g=!1,h&&(this.outdent(),h=!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 fe=0;fe<this.NON_SEMICOLON_NEWLINE_PROPERTY.length;fe++)if(this._input.lookBack(this.NON_SEMICOLON_NEWLINE_PROPERTY[fe])){B=!0;break}(l||w)&&!(this._input.lookBack("&")||this.foundNestedPseudoClass())&&!this._input.lookBack("(")&&!g&&n===0?(this.print_string(":"),h||(h=!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 Le=U==='"'||U==="'";this.preserveSingleSpace(Le||W),this.print_string(this._ch+this.eatString(this._ch)),this.eatWhitespace(!0)}else if(this._ch===";")B=!1,n===0?(h&&(this.outdent(),h=!1),g=!1,c=!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 Ie=!1;this._input.lookBack("with")&&(Ie=!0),this.preserveSingleSpace(W||Ie),this.print_string(this._ch),h&&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&&(!h||L)&&n===0&&!c&&!g?this._output.add_new_line():this._output.space_before_token=!0;else if((this._ch===">"||this._ch==="+"||this._ch==="~")&&!h&&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 xe=U==='"'||U==="'";this.preserveSingleSpace(xe||W),this.print_string(this._ch),!this._output.just_added_newline()&&this._input.peek()===`
|
|
`&&B&&this._output.add_new_line()}var Ue=this._output.get_code(E);return Ue},e.exports.Beautifier=b},function(e,R,f){var v=f(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 i=this._get_boolean("space_around_selector_separator");this.space_around_combinator=this._get_boolean("space_around_combinator")||i;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 f=O[e]={exports:{}};return N[e](f,f.exports,X),f.exports}var M=X(15);D=M})();var j=D;!(oe=[],G=function(){return{css_beautify:j}}.apply(_e,oe),G!==void 0&&(ct.exports=G))})()},Vhoy:function(ct,_e,K){"use strict";K.d(_e,"d",function(){return j}),K.d(_e,"e",function(){return N}),K.d(_e,"c",function(){return O}),K.d(_e,"b",function(){return X}),K.d(_e,"a",function(){return M});var oe=K("MI8n");class G{constructor(){this._icons=new Map,this._onDidRegister=new oe.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,j=D;function N(e,R){return new X(e,R)}function O(e){return e?e.replace(/\$\((.*?)\)/g,(R,f)=>` ${f} `).trim():""}class X{constructor(e,R,f){this.id=e,this.definition=R,this.description=f,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 M;(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 f(s){if(s instanceof X)return["codicon","codicon-"+s.id];const i=R.exec(s.id);if(!i)return f(X.error);let[,A,o]=i;const a=["codicon","codicon-"+A];return o&&a.push("codicon-modifier-"+o.substr(1)),a}e.asClassNameArray=f;function v(s){return f(s).join(" ")}e.asClassName=v;function u(s){return"."+f(s).join(".")}e.asCSSSelector=u})(M||(M={})),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(ct,_e,K){"use strict";var oe=K("rePB"),G=K("Ff2n"),D=K("VTBJ"),j=K("1OyB"),N=K("vuIU"),O=K("JX7q"),X=K("Ji7U"),M=K("LK+K"),e=K("q1tI"),R=K("TSYQ"),f=K.n(R),v=K("sboe"),u=K("OZM5"),s=function(x){var E=x.prefixCls,d=x.level,n=x.isStart,l=x.isEnd;if(!d)return null;for(var h="".concat(E,"-indent-unit"),w=[],g=0;g<d;g+=1){var c;w.push(e.createElement("span",{key:g,className:f()(h,(c={},Object(oe.a)(c,"".concat(h,"-start"),n[g+1]),Object(oe.a)(c,"".concat(h,"-end"),l[g+1]),Object(oe.a)(c,"".concat(h,"-end-first-level"),!g&&l[0]),c))}))}return e.createElement("span",{"aria-hidden":"true",className:"".concat(E,"-indent")},w)},i=s,A=K("815F"),o="open",a="close",r="---",t=function(b){Object(X.a)(E,b);var x=Object(M.a)(E);function E(){var d;return Object(j.a)(this,E),d=x.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,h=l.disableCheckbox,w=l.checked,g=d.props.context.onNodeCheck;if(!d.isCheckable()||h)return;n.preventDefault();var c=!w;g(n,Object(A.b)(d.props),c)},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(h){}},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:a},d.hasChildren=function(){var n=d.props.eventKey,l=d.props.context.keyEntities,h=l[n]||{},w=h.children;return!!(w||[]).length},d.isLeaf=function(){var n=d.props,l=n.isLeaf,h=n.loaded,w=d.props.context.loadData,g=d.hasChildren();return l===!1?!1:l||!w&&!g||w&&h&&!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,h=n.loading,w=n.loaded,g=d.props.context,c=g.loadData,L=g.onNodeLoad;if(h)return;c&&l&&!d.isLeaf()&&(!d.hasChildren()&&!w&&L(Object(A.b)(d.props)))},d.renderSwitcher=function(){var n=d.props,l=n.expanded,h=n.switcherIcon,w=d.props.context,g=w.prefixCls,c=w.switcherIcon,L=h||c;if(d.isLeaf())return e.createElement("span",{className:f()("".concat(g,"-switcher"),"".concat(g,"-switcher-noop"))},typeof L=="function"?L(Object(D.a)(Object(D.a)({},d.props),{},{isLeaf:!0})):L);var F=f()("".concat(g,"-switcher"),"".concat(g,"-switcher_").concat(l?o:a));return e.createElement("span",{onClick:d.onExpand,className:F},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,h=n.halfChecked,w=n.disableCheckbox,g=d.props.context.prefixCls,c=d.isDisabled(),L=d.isCheckable();if(!L)return null;var F=typeof L!="boolean"?L:null;return e.createElement("span",{className:f()("".concat(g,"-checkbox"),l&&"".concat(g,"-checkbox-checked"),!l&&h&&"".concat(g,"-checkbox-indeterminate"),(c||w)&&"".concat(g,"-checkbox-disabled")),onClick:d.onCheck},F)},d.renderIcon=function(){var n=d.props.loading,l=d.props.context.prefixCls;return e.createElement("span",{className:f()("".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,h=l.title,w=l.selected,g=l.icon,c=l.loading,L=l.data,F=d.props.context,B=F.prefixCls,P=F.showIcon,W=F.icon,U=F.draggable,$=F.loadData,ee=F.titleRender,pe=d.isDisabled(),fe="".concat(B,"-node-content-wrapper"),Le;if(P){var Ie=g||W;Le=Ie?e.createElement("span",{className:f()("".concat(B,"-iconEle"),"".concat(B,"-icon__customize"))},typeof Ie=="function"?Ie(d.props):Ie):d.renderIcon()}else $&&c&&(Le=d.renderIcon());var xe;typeof h=="function"?xe=h(L):ee?xe=ee(L):xe=h;var Ue=e.createElement("span",{className:"".concat(B,"-title")},xe);return e.createElement("span",{ref:d.setSelectHandle,title:typeof h=="string"?h:"",className:f()("".concat(fe),"".concat(fe,"-").concat(d.getNodeState()||"normal"),!pe&&(w||n)&&"".concat(B,"-node-selected"),!pe&&U&&"draggable"),draggable:!pe&&U||void 0,"aria-grabbed":!pe&&U||void 0,onMouseEnter:d.onMouseEnter,onMouseLeave:d.onMouseLeave,onContextMenu:d.onContextMenu,onClick:d.onSelectorClick,onDoubleClick:d.onSelectorDoubleClick,onDragStart:U?d.onDragStart:void 0},Le,Ue)},d}return Object(N.a)(E,[{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,h=l.eventKey,w=l.className,g=l.style,c=l.dragOver,L=l.dragOverGapTop,F=l.dragOverGapBottom,B=l.isLeaf,P=l.isStart,W=l.isEnd,U=l.expanded,$=l.selected,ee=l.checked,pe=l.halfChecked,fe=l.loading,Le=l.domRef,Ie=l.active,xe=l.onMouseMove,Ue=Object(G.a)(l,["eventKey","className","style","dragOver","dragOverGapTop","dragOverGapBottom","isLeaf","isStart","isEnd","expanded","selected","checked","halfChecked","loading","domRef","active","onMouseMove"]),Fe=this.props.context,we=Fe.prefixCls,ve=Fe.filterTreeNode,ze=Fe.draggable,at=Fe.keyEntities,nt=this.isDisabled(),et=Object(u.f)(Ue),Ke=at[h]||{},re=Ke.level,z=W[W.length-1];return e.createElement("div",Object.assign({ref:Le,className:f()(w,"".concat(we,"-treenode"),(n={},Object(oe.a)(n,"".concat(we,"-treenode-disabled"),nt),Object(oe.a)(n,"".concat(we,"-treenode-switcher-").concat(U?"open":"close"),!B),Object(oe.a)(n,"".concat(we,"-treenode-checkbox-checked"),ee),Object(oe.a)(n,"".concat(we,"-treenode-checkbox-indeterminate"),pe),Object(oe.a)(n,"".concat(we,"-treenode-selected"),$),Object(oe.a)(n,"".concat(we,"-treenode-loading"),fe),Object(oe.a)(n,"".concat(we,"-treenode-active"),Ie),Object(oe.a)(n,"".concat(we,"-treenode-leaf-last"),z),Object(oe.a)(n,"drag-over",!nt&&c),Object(oe.a)(n,"drag-over-gap-top",!nt&&L),Object(oe.a)(n,"drag-over-gap-bottom",!nt&&F),Object(oe.a)(n,"filter-node",ve&&ve(Object(A.b)(this.props))),n)),style:g,onDragEnter:ze?this.onDragEnter:void 0,onDragOver:ze?this.onDragOver:void 0,onDragLeave:ze?this.onDragLeave:void 0,onDrop:ze?this.onDrop:void 0,onDragEnd:ze?this.onDragEnd:void 0,onMouseMove:xe},et),e.createElement(i,{prefixCls:we,level:re,isStart:P,isEnd:W}),this.renderSwitcher(),this.renderCheckbox(),this.renderSelector())}}]),E}(e.Component),_=function(x){return e.createElement(v.a.Consumer,null,function(E){return e.createElement(t,Object.assign({},x,{context:E}))})};_.displayName="TreeNode",_.defaultProps={title:r},_.isTreeNode=1;var y=_e.a=_},Y1PL:function(ct,_e,K){"use strict";K.r(_e),K.d(_e,"ResizableTextArea",function(){return pe});var oe=K("wx14"),G=K("1OyB"),D=K("vuIU"),j=K("Ji7U"),N=K("LK+K"),O=K("q1tI"),X=K("VTBJ"),M=K("rePB"),e=K("Zm9Q"),R=K("Kwbf"),f=K("c+Xe"),v=K("m+aA"),u=K("bdgK"),s=new Map;function i(Ie){Ie.forEach(function(xe){var Ue,Fe=xe.target;(Ue=s.get(Fe))===null||Ue===void 0||Ue.forEach(function(we){return we(Fe)})})}var A=new u.default(i),o=null,a=null;function r(Ie,xe){s.has(Ie)||(s.set(Ie,new Set),A.observe(Ie)),s.get(Ie).add(xe)}function t(Ie,xe){s.has(Ie)&&(s.get(Ie).delete(xe),s.get(Ie).size||(A.unobserve(Ie),s.delete(Ie)))}var _=function(Ie){Object(j.a)(Ue,Ie);var xe=Object(N.a)(Ue);function Ue(){return Object(G.a)(this,Ue),xe.apply(this,arguments)}return Object(D.a)(Ue,[{key:"render",value:function(){return this.props.children}}]),Ue}(O.Component),y=O.createContext(null);function b(Ie){var xe=Ie.children,Ue=Ie.onBatchResize,Fe=O.useRef(0),we=O.useRef([]),ve=O.useContext(y),ze=O.useCallback(function(at,nt,et){Fe.current+=1;var Ke=Fe.current;we.current.push({size:at,element:nt,data:et}),Promise.resolve().then(function(){Ke===Fe.current&&(Ue==null||Ue(we.current),we.current=[])}),ve==null||ve(at,nt,et)},[Ue,ve]);return O.createElement(y.Provider,{value:ze},xe)}function x(Ie){var xe=Ie.children,Ue=Ie.disabled,Fe=O.useRef(null),we=O.useRef(null),ve=O.useContext(y),ze=O.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),at=O.isValidElement(xe)&&Object(f.c)(xe),nt=at?xe.ref:null,et=O.useMemo(function(){return Object(f.a)(nt,Fe)},[nt,Fe]),Ke=O.useRef(Ie);Ke.current=Ie;var re=O.useCallback(function(z){var Y=Ke.current,J=Y.onResize,ie=Y.data,ue=z.getBoundingClientRect(),he=ue.width,He=ue.height,We=z.offsetWidth,je=z.offsetHeight,Ge=Math.floor(he),rt=Math.floor(He);if(ze.current.width!==Ge||ze.current.height!==rt||ze.current.offsetWidth!==We||ze.current.offsetHeight!==je){var st={width:Ge,height:rt,offsetWidth:We,offsetHeight:je};ze.current=st;var Te=We===Math.round(he)?he:We,De=je===Math.round(He)?He:je,Ve=Object(X.a)(Object(X.a)({},st),{},{offsetWidth:Te,offsetHeight:De});ve==null||ve(Ve,z,ie),J&&Promise.resolve().then(function(){J(Ve,z)})}},[]);return O.useEffect(function(){var z=Object(v.a)(Fe.current)||Object(v.a)(we.current);return z&&!Ue&&r(z,re),function(){return t(z,re)}},[Fe.current,Ue]),O.createElement(_,{ref:we},at?O.cloneElement(xe,{ref:et}):xe)}var E="rc-observer-key";function d(Ie){var xe=Ie.children,Ue=Object(e.a)(xe);return Ue.map(function(Fe,we){var ve=(Fe==null?void 0:Fe.key)||"".concat(E,"-").concat(we);return O.createElement(x,Object(oe.a)({},Ie,{key:ve}),Fe)})}d.Collection=b;var n=d,l=K("bT9E"),h=K("TSYQ"),w=K.n(h),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
|
|
`,c=["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={},F;function B(Ie){var xe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Ue=Ie.getAttribute("id")||Ie.getAttribute("data-reactid")||Ie.getAttribute("name");if(xe&&L[Ue])return L[Ue];var Fe=window.getComputedStyle(Ie),we=Fe.getPropertyValue("box-sizing")||Fe.getPropertyValue("-moz-box-sizing")||Fe.getPropertyValue("-webkit-box-sizing"),ve=parseFloat(Fe.getPropertyValue("padding-bottom"))+parseFloat(Fe.getPropertyValue("padding-top")),ze=parseFloat(Fe.getPropertyValue("border-bottom-width"))+parseFloat(Fe.getPropertyValue("border-top-width")),at=c.map(function(et){return"".concat(et,":").concat(Fe.getPropertyValue(et))}).join(";"),nt={sizingStyle:at,paddingSize:ve,borderSize:ze,boxSizing:we};return xe&&Ue&&(L[Ue]=nt),nt}function P(Ie){var xe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Ue=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,Fe=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;F||(F=document.createElement("textarea"),F.setAttribute("tab-index","-1"),F.setAttribute("aria-hidden","true"),document.body.appendChild(F)),Ie.getAttribute("wrap")?F.setAttribute("wrap",Ie.getAttribute("wrap")):F.removeAttribute("wrap");var we=B(Ie,xe),ve=we.paddingSize,ze=we.borderSize,at=we.boxSizing,nt=we.sizingStyle;F.setAttribute("style","".concat(nt,";").concat(g)),F.value=Ie.value||Ie.placeholder||"";var et=Number.MIN_SAFE_INTEGER,Ke=Number.MAX_SAFE_INTEGER,re=F.scrollHeight,z;if(at==="border-box"?re+=ze:at==="content-box"&&(re-=ve),Ue!==null||Fe!==null){F.value=" ";var Y=F.scrollHeight-ve;Ue!==null&&(et=Y*Ue,at==="border-box"&&(et=et+ve+ze),re=Math.max(et,re)),Fe!==null&&(Ke=Y*Fe,at==="border-box"&&(Ke=Ke+ve+ze),z=re>Ke?"":"hidden",re=Math.min(Ke,re))}return{height:re,minHeight:et,maxHeight:Ke,overflowY:z,resize:"none"}}var W=K("Gytx"),U=K.n(W),$;(function(Ie){Ie[Ie.NONE=0]="NONE",Ie[Ie.RESIZING=1]="RESIZING",Ie[Ie.RESIZED=2]="RESIZED"})($||($={}));var ee=function(Ie){Object(j.a)(Ue,Ie);var xe=Object(N.a)(Ue);function Ue(Fe){var we;return Object(G.a)(this,Ue),we=xe.call(this,Fe),we.nextFrameActionId=void 0,we.resizeFrameId=void 0,we.textArea=void 0,we.saveTextArea=function(ve){we.textArea=ve},we.handleResize=function(ve){var ze=we.state.resizeStatus,at=we.props,nt=at.autoSize,et=at.onResize;if(ze!==$.NONE)return;typeof et=="function"&&et(ve),nt&&we.resizeOnNextFrame()},we.resizeOnNextFrame=function(){cancelAnimationFrame(we.nextFrameActionId),we.nextFrameActionId=requestAnimationFrame(we.resizeTextarea)},we.resizeTextarea=function(){var ve=we.props.autoSize;if(!ve||!we.textArea)return;var ze=ve.minRows,at=ve.maxRows,nt=P(we.textArea,!1,ze,at);we.setState({textareaStyles:nt,resizeStatus:$.RESIZING},function(){cancelAnimationFrame(we.resizeFrameId),we.resizeFrameId=requestAnimationFrame(function(){we.setState({resizeStatus:$.RESIZED},function(){we.resizeFrameId=requestAnimationFrame(function(){we.setState({resizeStatus:$.NONE}),we.fixFirefoxAutoScroll()})})})})},we.renderTextArea=function(){var ve=we.props,ze=ve.prefixCls,at=ze===void 0?"rc-textarea":ze,nt=ve.autoSize,et=ve.onResize,Ke=ve.className,re=ve.disabled,z=we.state,Y=z.textareaStyles,J=z.resizeStatus,ie=Object(l.a)(we.props,["prefixCls","onPressEnter","autoSize","defaultValue","onResize"]),ue=w()(at,Ke,Object(M.a)({},"".concat(at,"-disabled"),re));"value"in ie&&(ie.value=ie.value||"");var he=Object(X.a)(Object(X.a)(Object(X.a)({},we.props.style),Y),J===$.RESIZING?{overflowX:"hidden",overflowY:"hidden"}:null);return O.createElement(n,{onResize:we.handleResize,disabled:!(nt||et)},O.createElement("textarea",Object(oe.a)({},ie,{className:ue,style:he,ref:we.saveTextArea})))},we.state={textareaStyles:{},resizeStatus:$.NONE},we}return Object(D.a)(Ue,[{key:"componentDidUpdate",value:function(we){(we.value!==this.props.value||!U()(we.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 we=this.textArea.selectionStart,ve=this.textArea.selectionEnd;this.textArea.setSelectionRange(we,ve)}}catch(ze){}}},{key:"render",value:function(){return this.renderTextArea()}}]),Ue}(O.Component),pe=ee,fe=function(Ie){Object(j.a)(Ue,Ie);var xe=Object(N.a)(Ue);function Ue(Fe){var we;Object(G.a)(this,Ue),we=xe.call(this,Fe),we.resizableTextArea=void 0,we.focus=function(){we.resizableTextArea.textArea.focus()},we.saveTextArea=function(ze){we.resizableTextArea=ze},we.handleChange=function(ze){var at=we.props.onChange;we.setValue(ze.target.value,function(){we.resizableTextArea.resizeTextarea()}),at&&at(ze)},we.handleKeyDown=function(ze){var at=we.props,nt=at.onPressEnter,et=at.onKeyDown;ze.keyCode===13&&nt&&nt(ze),et&&et(ze)};var ve=typeof Fe.value=="undefined"||Fe.value===null?Fe.defaultValue:Fe.value;return we.state={value:ve},we}return Object(D.a)(Ue,[{key:"setValue",value:function(we,ve){"value"in this.props||this.setState({value:we},ve)}},{key:"blur",value:function(){this.resizableTextArea.textArea.blur()}},{key:"render",value:function(){return O.createElement(pe,Object(oe.a)({},this.props,{value:this.state.value,onKeyDown:this.handleKeyDown,onChange:this.handleChange,ref:this.saveTextArea}))}}],[{key:"getDerivedStateFromProps",value:function(we){return"value"in we?{value:we.value}:null}}]),Ue}(O.Component),Le=_e.default=fe},ZW9T:function(ct,_e,K){"use strict";K.d(_e,"a",function(){return W});var oe=K("k1fw"),G=K("oBTY"),D=K("miYZ"),j=K("tsqr"),N=K("rAM+"),O=K("tJVT"),X=K("PpiC"),M=K("q1tI"),e=K.n(M),R=K("bdgK"),f=K("9og8"),v=K("WmNS"),u=K.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"]},i={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(`
|
|
`)}]},a=K("5VLF"),r=K.n(a),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"]}},_=function($,ee){return ee.map(function(pe){return{label:pe,kind:$.languages.CompletionItemKind.Keyword,insertText:pe}})},y=function($){return Object.keys(t.tables).map(function(ee){return{label:ee,kind:$.languages.CompletionItemKind.Variable,insertText:ee}})},b=function($,ee){var pe=t.tables[$];return pe?pe.map(function(fe){return{label:fe,kind:ee.languages.CompletionItemKind.Field,insertText:fe}}):[]};function x(U,$,ee,pe,fe){var Le=$.getWordUntilPosition(ee),Ie={startLineNumber:ee.lineNumber,endLineNumber:ee.lineNumber,startColumn:Le.startColumn,endColumn:Le.endColumn},xe=pe.map(function(Ue){return{label:Ue,kind:U.languages.CompletionItemKind.Keyword,insertText:Ue,insertTextRules:U.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Ie}});return fe.map(function(Ue){xe.push(Object(oe.a)(Object(oe.a)({},Ue),{},{range:Ie}))}),xe}var E=function(U){t.languages.map(function(fe){return U.languages.registerDocumentFormattingEditProvider(fe,{provideDocumentFormattingEdits:function(Ie,xe,Ue){return Object(f.a)(u.a.mark(function Fe(){var we;return u.a.wrap(function(ze){for(;;)switch(ze.prev=ze.next){case 0:return we=r()(Ie.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}),ze.abrupt("return",[{range:Ie.getFullModelRange(),text:we}]);case 2:case"end":return ze.stop()}},Fe)}))()}}),fe});var $=A.quickKey.map(function(fe){return{label:fe.label,kind:U.languages.CompletionItemKind.Method,insertText:fe.content,insertTextRules:U.languages.CompletionItemInsertTextRule.InsertAsSnippet}}),ee=o.quickKey.map(function(fe){return{label:fe.label,kind:U.languages.CompletionItemKind.Method,insertText:fe.content,insertTextRules:U.languages.CompletionItemInsertTextRule.InsertAsSnippet}}),pe=i.quickKey.map(function(fe){return{label:fe.label,kind:U.languages.CompletionItemKind.Method,insertText:fe.content,insertTextRules:U.languages.CompletionItemInsertTextRule.InsertAsSnippet}});U.languages.registerCompletionItemProvider("cpp",{provideCompletionItems:function(Le,Ie){var xe=Le.getWordUntilPosition(Ie),Ue={startLineNumber:Ie.lineNumber,endLineNumber:Ie.lineNumber,startColumn:xe.startColumn,endColumn:xe.endColumn},Fe=Le.getLineContent(Ie.lineNumber).substring(xe.startColumn-2,xe.endColumn);return{suggestions:[].concat(Object(G.a)(A.keywords.map(function(we){return{label:we,kind:U.languages.CompletionItemKind.Function,documentation:we,insertText:we,insertTextRules:U.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Ue}})),Object(G.a)(A.quickKey.map(function(we){return{label:we.label,kind:U.languages.CompletionItemKind.Function,documentation:we.content,insertText:Fe.startsWith("#")?we.content.replace(/#/,""):we.content,insertTextRules:U.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Ue}})))}}}),U.languages.registerCompletionItemProvider("c",{provideCompletionItems:function(Le,Ie){var xe=Le.getWordUntilPosition(Ie),Ue={startLineNumber:Ie.lineNumber,endLineNumber:Ie.lineNumber,startColumn:xe.startColumn,endColumn:xe.endColumn};return{suggestions:Object(G.a)(s.keywords.map(function(Fe){return{label:Fe,kind:U.languages.CompletionItemKind.Function,documentation:Fe,insertText:Fe,insertTextRules:U.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Ue}}))}}}),U.languages.registerCompletionItemProvider("java",{provideCompletionItems:function(Le,Ie){var xe=Le.getWordUntilPosition(Ie),Ue={startLineNumber:Ie.lineNumber,endLineNumber:Ie.lineNumber,startColumn:xe.startColumn,endColumn:xe.endColumn},Fe=Le.getLineContent(Ie.lineNumber).substring(xe.startColumn-2,xe.endColumn);return{suggestions:[].concat(Object(G.a)(i.keywords.map(function(we){return{label:we,kind:U.languages.CompletionItemKind.Function,documentation:we,insertText:we,insertTextRules:U.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Ue}})),Object(G.a)(i.quickKey.map(function(we){return{label:we.label,kind:U.languages.CompletionItemKind.Function,documentation:we.content,insertText:Fe.startsWith("#")?we.content.replace(/#/,""):we.content,insertTextRules:U.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Ue}})))}}}),U.languages.registerCompletionItemProvider("python",{provideCompletionItems:function(Le,Ie){var xe=Le.getWordUntilPosition(Ie),Ue={startLineNumber:Ie.lineNumber,endLineNumber:Ie.lineNumber,startColumn:xe.startColumn,endColumn:xe.endColumn},Fe=Le.getLineContent(Ie.lineNumber).substring(xe.startColumn-2,xe.endColumn);return{suggestions:[].concat(Object(G.a)(o.keywords.map(function(we){return{label:we,kind:U.languages.CompletionItemKind.Function,documentation:we,insertText:we,insertTextRules:U.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Ue}})),Object(G.a)(o.quickKey.map(function(we){return{label:we.label,kind:U.languages.CompletionItemKind.Function,documentation:we.content,insertText:Fe.startsWith("#")?we.content.replace(/#/,""):we.content,insertTextRules:U.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Ue}})))}}})},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=K("fjLI"),l=K("LvDl"),h=K("+ua5");function w(U){return/^\d+$/.test(U)?"".concat(U,"px"):U}function g(){}var c=!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 F(){var U=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],$=U;if(Array.isArray(U)){for(var ee=0;ee<U.length;ee++){var pe=L[U[ee]];if(pe)return pe}return $[0]}return L[$]||$}var B=null,P=_e.b=function(U){var $=U.width,ee=$===void 0?"100%":$,pe=U.height,fe=pe===void 0?"100%":pe,Le=U.value,Ie=U.language,xe=Ie===void 0?"javascript":Ie,Ue=U.style,Fe=Ue===void 0?{}:Ue,we=U.options,ve=we===void 0?{}:we,ze=U.overrideServices,at=ze===void 0?{}:ze,nt=U.theme,et=nt===void 0?"vs-dark":nt,Ke=U.onEditBlur,re=U.onSave,z=U.autoHeight,Y=z===void 0?!1:z,J=U.forbidCopy,ie=J===void 0?!1:J,ue=U.onChange,he=ue===void 0?g:ue,He=U.editorDidMount,We=He===void 0?g:He,je=U.onFocus,Ge=je===void 0?g:je,rt=U.filename,st=rt===void 0?"educoder.txt":rt,Te=U.errorLine,De=U.errorContent,Ve=De===void 0?"":De,$e=Object(X.a)(U,["width","height","value","language","style","options","overrideServices","theme","onEditBlur","onSave","autoHeight","forbidCopy","onChange","editorDidMount","onFocus","filename","errorLine","errorContent"]),Ne=Object(M.useRef)(),Pe=Object(M.useRef)({}),Ce=Object(M.useRef)(),ce=Object(M.useRef)(),ge=Object(M.useRef)(!1),te=Object(M.useRef)(),ne=Object(M.useState)(!1),le=Object(O.a)(ne,2),de=le[0],Re=le[1];function Me(){var wt;return Ne.current&&(wt=new R.default(function(dt){var Dt=Object(N.a)(dt),dr;try{for(Dt.s();!(dr=Dt.n()).done;){var xr=dr.value;(xr.target.offsetHeight>0||xr.target.offsetWidth>0)&&Pe.current.instance.layout()}}catch(Tr){Dt.e(Tr)}finally{Dt.f()}}),wt.observe(Ne.current)),wt}function qe(){j.b.warn(decodeURIComponent(d))}var lt=function(){var dt=Pe.current.instance;if(Le!=null&&dt&&de){var Dt=dt.getModel();Dt&&Le!==Dt.getValue()&&(c=!0,Dt.setValue(Le),dt.layout(),c=!1)}};Object(M.useEffect)(function(){ce.current&&clearTimeout(ce.current),ce.current=setTimeout(function(){lt()},500)},[Le,de,Pe.current]),Object(M.useEffect)(function(){if(Te&&Pe.current&&Pe.current.instance){var wt=Pe.current.instance;wt.changeViewZones(function(Dt){var dr=document.createElement("div");dr.style.padding="10px 20px",dr.style.width="calc(100% - 20px)",dr.className="my-error-line-wrp",dr.innerHTML=Ve,Dt.addZone({afterLineNumber:Te||11,heightInLines:3,domNode:dr})});var dt={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}};wt.addOverlayWidget(dt),wt.revealPositionInCenter({lineNumber:20,column:1})}},[Te,Pe.current,de]);function ft(){var wt=Pe.current.instance;if(wt){var dt=wt.getSelection(),Dt=Pe.current.pastePos||{},dr=new B.Range(Dt.startLineNumber||dt.endLineNumber,Dt.startColumn||dt.endColumn,Dt.endLineNumber||dt.endLineNumber,Dt.endColumn||dt.endColumn);setTimeout(function(){wt.executeEdits("",[{range:dr,text:""}])},300)}}function At(wt){(window.navigator.platform.match("Mac")?wt.metaKey:wt.ctrlKey)&&wt.keyCode==83&&(wt.preventDefault(),re())}var Bt=function(){if(Y&&Pe.current.instance){var dt=Pe.current.instance.getContentHeight();ut(dt<fe?fe:dt)}else ut(fe)};function St(wt){var dt=document.createEvent("MouseEvents");dt.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),wt.dispatchEvent(dt)}function it(wt,dt){var Dt=window.URL||window.webkitURL||window,dr=new Blob([dt]),xr=document.createElementNS("http://www.w3.org/1999/xhtml","a");xr.href=Dt.createObjectURL(dr),xr.download=wt,St(xr)}Object(M.useEffect)(function(){Bt()},[Bt]),Object(M.useEffect)(function(){Ne.current&&!de&&Promise.all([K.e(16),K.e(28)]).then(K.t.bind(null,"M/lh",7)).then(function(wt){try{B=wt,Pe.current.instance=B.editor.create(Ne.current,{value:Le,language:F(xe),theme:et,requireConfig:{"vs/nls":{availableLanguages:{"*":"zh-cn"}}},wordWrap:!0,autoIndent:!0,contextmenu:!0,formatOnType:!0},at);var dt=Pe.current.instance,Dt=n.d._menuItems,dr=Object(G.a)(Dt).find(function(Gt){return Gt[0]._debugName=="EditorContext"}),xr=dr[1],Tr=["editor.action.clipboardCopyWithSyntaxHighlightingAction","editor.action.quickCommand","editor.action.clipboardCopyAction","editor.action.clipboardPasteAction","editor.action.clipboardCutAction"],Pr=function(fr,Qr){var pr=fr._first;do{var Kr,Dr,ae=Qr.includes((Kr=pr.element)===null||Kr===void 0||((Dr=Kr.command)===null||Dr===void 0)?void 0:Dr.id);ae&&fr._remove(pr)}while(pr=pr.next)};if(We(dt,B),setTimeout(function(){Bt(),Pe.current.instance.addAction({id:"d123123",label:"Download File",contextMenuGroupId:"9_cutcopypaste",run:function(){it(st||"educoder.txt",dt.getValue())}}),dt.getDomNode().addEventListener("input",function(){Ce.current.autoFormat&&dt.getAction("editor.action.formatDocument").run()})},500),Pe.current.subscription=dt.onDidChangeModelContent(function(Gt){ge.current?clearTimeout(te.current):(Bt(),he(dt.getValue(),Gt)),te.current=setTimeout(function(){ge.current=!1},500)}),window.Monaco||E(B,F(xe)),ie&&(Pr(xr,Tr),Ne.current.classList.add("noCopyPaste"),dt.onKeyDown(function(Gt){var fr=Gt.keyCode,Qr=Gt.ctrlKey,pr=Gt.metaKey;(fr===33||fr===52)&&(pr||Qr)&&(qe(),Gt.preventDefault())})),window.Monaco=B,Ke&&dt.onDidBlurEditorWidget(function(){Ke(dt.getValue())}),Ge&&dt.onDidFocusEditorText(function(){Ge(dt.getValue())}),ie){dt.addCommand(B.KeyMod.CtrlCmd|B.KeyCode.KEY_V,function(){return qe(),null}),dt.onDidPaste(function(Gt){Pe.current.pastePos=Gt});try{window.addEventListener("paste",ft)}catch(Gt){}}var kr=Me();return Re(!0),function(){var Gt=Pe.current.instance;Gt.dispose();var fr=Gt.getModel();fr&&fr.dispose(),Pe.current.subscription&&Pe.current.subscription.dispose(),ie&&window.removeEventListener("paste",ft),kr.unobserve(Ne.current)}}catch(Gt){}})},[]),Object(M.useEffect)(function(){var wt=Pe.current.instance;if(wt&&de)return document.addEventListener("keydown",At,!1),function(){document.removeEventListener("keydown",At)}},[re,de]),Object(M.useEffect)(function(){var wt=Pe.current.instance;if(wt&&de){var dt=F(xe);B.editor.setModelLanguage(wt.getModel(),dt),console.log("language:",xe,wt.getModel(),dt)}},[xe,de]),Object(M.useEffect)(function(){var wt=Pe.current.instance;wt&&de&&B.editor.setTheme(et)},[et,de]),Object(M.useEffect)(function(){var wt=Pe.current.instance;Ce.current=ve,wt&&de&&(wt.updateOptions(Object(oe.a)({},ve)),setTimeout(function(){wt.getModel().updateOptions(Object(oe.a)({},ve))},200))},[JSON.stringify(ve),de]),Object(M.useEffect)(function(){var wt=Pe.current.instance;wt&&de&&wt.layout()},[ee,fe,de]);var Wt=Object(M.useState)(w(ee)),Qt=Object(O.a)(Wt,2),It=Qt[0],qt=Qt[1],Ft=Object(M.useState)(w(fe)),rr=Object(O.a)(Ft,2),kt=rr[0],ut=rr[1],lr=Object(oe.a)(Object(oe.a)({},Fe),{},{width:It,height:kt});return e.a.createElement("div",{className:"my-monaco-editor",ref:Ne,style:lr})};function W(U){var $=U.width,ee=$===void 0?"100%":$,pe=U.height,fe=pe===void 0?"100%":pe,Le=U.original,Ie=U.modified,xe=U.language,Ue=U.options,Fe=Ue===void 0?{}:Ue,we=Object(M.useRef)(),ve=Object(M.useState)(null),ze=Object(O.a)(ve,2),at=ze[0],nt=ze[1];function et(Y){var J;return we.current&&(J=new R.default(function(ie){var ue=Object(N.a)(ie),he;try{for(ue.s();!(he=ue.n()).done;){var He=he.value;(He.target.offsetHeight>0||He.target.offsetWidth>0)&&Y.layout()}}catch(We){ue.e(We)}finally{ue.f()}}),J.observe(we.current)),J}Object(M.useEffect)(function(){we.current&&Promise.all([K.e(16),K.e(28)]).then(K.t.bind(null,"M/lh",7)).then(function(Y){B=Y;var J=B.editor.createDiffEditor(we.current,Object(oe.a)(Object(oe.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},Fe),{},{wordWrap:!0}));nt(J);var ie=et(J);return function(){J.dispose();var ue=J.getModel();ue&&ue.dispose(),ie.unobserve(we.current)}})},[]),Object(M.useEffect)(function(){at&&at.setModel({original:B.editor.createModel(Le,xe),modified:B.editor.createModel(Ie,xe)})},[Le,Ie,xe,at]);var Ke=w(ee),re=w(fe),z={width:Ke,height:re};return e.a.createElement("div",{className:"my-diff-editor",ref:we,style:z})}},ZpRC:function(ct,_e,K){"use strict";function oe(f){return typeof f=="object"&&f!=null&&f.nodeType===1}function G(f,v){return(!v||f!=="hidden")&&f!=="visible"&&f!=="clip"}function D(f,v){if(f.clientHeight<f.scrollHeight||f.clientWidth<f.scrollWidth){var u=getComputedStyle(f,null);return G(u.overflowY,v)||G(u.overflowX,v)||function(s){var i=function(A){if(!A.ownerDocument||!A.ownerDocument.defaultView)return null;try{return A.ownerDocument.defaultView.frameElement}catch(o){return null}}(s);return!!i&&(i.clientHeight<s.scrollHeight||i.clientWidth<s.scrollWidth)}(f)}return!1}function j(f,v,u,s,i,A,o,a){return A<f&&o>v||A>f&&o<v?0:A<=f&&a<=u||o>=v&&a>=u?A-f-s:o>v&&a<u||A<f&&a>u?o-v+i:0}var N=function(f,v){var u=window,s=v.scrollMode,i=v.block,A=v.inline,o=v.boundary,a=v.skipOverflowHiddenElements,r=typeof o=="function"?o:function(Y){return Y!==o};if(!oe(f))throw new TypeError("Invalid target");for(var t=document.scrollingElement||document.documentElement,_=[],y=f;oe(y)&&r(y);){if((y=y.parentElement)===t){_.push(y);break}y!=null&&y===document.body&&D(y)&&!D(document.documentElement)||y!=null&&D(y,a)&&_.push(y)}for(var b=u.visualViewport?u.visualViewport.width:innerWidth,x=u.visualViewport?u.visualViewport.height:innerHeight,E=window.scrollX||pageXOffset,d=window.scrollY||pageYOffset,n=f.getBoundingClientRect(),l=n.height,h=n.width,w=n.top,g=n.right,c=n.bottom,L=n.left,F=i==="start"||i==="nearest"?w:i==="end"?c:w+l/2,B=A==="center"?L+h/2:A==="end"?g:L,P=[],W=0;W<_.length;W++){var U=_[W],$=U.getBoundingClientRect(),ee=$.height,pe=$.width,fe=$.top,Le=$.right,Ie=$.bottom,xe=$.left;if(s==="if-needed"&&w>=0&&L>=0&&c<=x&&g<=b&&w>=fe&&c<=Ie&&L>=xe&&g<=Le)return P;var Ue=getComputedStyle(U),Fe=parseInt(Ue.borderLeftWidth,10),we=parseInt(Ue.borderTopWidth,10),ve=parseInt(Ue.borderRightWidth,10),ze=parseInt(Ue.borderBottomWidth,10),at=0,nt=0,et="offsetWidth"in U?U.offsetWidth-U.clientWidth-Fe-ve:0,Ke="offsetHeight"in U?U.offsetHeight-U.clientHeight-we-ze:0;if(t===U)at=i==="start"?F:i==="end"?F-x:i==="nearest"?j(d,d+x,x,we,ze,d+F,d+F+l,l):F-x/2,nt=A==="start"?B:A==="center"?B-b/2:A==="end"?B-b:j(E,E+b,b,Fe,ve,E+B,E+B+h,h),at=Math.max(0,at+d),nt=Math.max(0,nt+E);else{at=i==="start"?F-fe-we:i==="end"?F-Ie+ze+Ke:i==="nearest"?j(fe,Ie,ee,we,ze+Ke,F,F+l,l):F-(fe+ee/2)+Ke/2,nt=A==="start"?B-xe-Fe:A==="center"?B-(xe+pe/2)+et/2:A==="end"?B-Le+ve+et:j(xe,Le,pe,Fe,ve+et,B,B+h,h);var re=U.scrollLeft,z=U.scrollTop;F+=z-(at=Math.max(0,Math.min(z+at,U.scrollHeight-ee+Ke))),B+=re-(nt=Math.max(0,Math.min(re+nt,U.scrollWidth-pe+et)))}P.push({el:U,top:at,left:nt})}return P};function O(f){return f===Object(f)&&Object.keys(f).length!==0}function X(f,v){v===void 0&&(v="auto");var u="scrollBehavior"in document.body.style;f.forEach(function(s){var i=s.el,A=s.top,o=s.left;i.scroll&&u?i.scroll({top:A,left:o,behavior:v}):(i.scrollTop=A,i.scrollLeft=o)})}function M(f){return f===!1?{block:"end",inline:"nearest"}:O(f)?f:{block:"start",inline:"nearest"}}function e(f,v){var u=!f.ownerDocument.documentElement.contains(f);if(O(v)&&typeof v.behavior=="function")return v.behavior(u?[]:N(f,v));if(u)return;var s=M(v);return X(N(f,s),s.behavior)}var R=_e.a=e},bT9E:function(ct,_e,K){"use strict";K.d(_e,"a",function(){return G});var oe=K("VTBJ");function G(D,j){var N=Object(oe.a)({},D);return Array.isArray(j)&&j.forEach(function(O){delete N[O]}),N}},biw7:function(ct,_e,K){"use strict";var oe=K("q1tI"),G=K.n(oe),D=oe.createContext(null);_e.a=D},crp1:function(ct,_e,K){"use strict";K.d(_e,"b",function(){return It}),K.d(_e,"a",function(){return kt});var oe={},G=function(ae,se,me,Se,Ye){var tt=oe[se]||(oe[se]=URL.createObjectURL(new Blob([ae],{type:"text/javascript"}))),H=new Worker(tt);return H.onerror=function(m){return Ye(m.error,null)},H.onmessage=function(m){return Ye(null,m.data)},H.postMessage(me,Se),H},D=Uint8Array,j=Uint16Array,N=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]),M=new D([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),e=function(ae,se){for(var me=new j(31),Se=0;Se<31;++Se)me[Se]=se+=1<<ae[Se-1];for(var Ye=new N(me[30]),Se=1;Se<30;++Se)for(var tt=me[Se];tt<me[Se+1];++tt)Ye[tt]=tt-me[Se]<<5|Se;return[me,Ye]},R=e(O,2),f=R[0],v=R[1];f[28]=258,v[258]=28;for(var u=e(X,0),s=u[0],i=u[1],A=new j(32768),o=0;o<32768;++o){var a=(o&43690)>>>1|(o&21845)<<1;a=(a&52428)>>>2|(a&13107)<<2,a=(a&61680)>>>4|(a&3855)<<4,A[o]=((a&65280)>>>8|(a&255)<<8)>>>1}for(var r=function(ae,se,me){for(var Se=ae.length,Ye=0,tt=new j(se);Ye<Se;++Ye)++tt[ae[Ye]-1];var H=new j(se);for(Ye=0;Ye<se;++Ye)H[Ye]=H[Ye-1]+tt[Ye-1]<<1;var m;if(me){m=new j(1<<se);var C=15-se;for(Ye=0;Ye<Se;++Ye)if(ae[Ye])for(var k=Ye<<4|ae[Ye],Z=se-ae[Ye],Q=H[ae[Ye]-1]++<<Z,ye=Q|(1<<Z)-1;Q<=ye;++Q)m[A[Q]>>>C]=k}else for(m=new j(Se),Ye=0;Ye<Se;++Ye)m[Ye]=A[H[ae[Ye]-1]++]>>>15-ae[Ye];return m},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 _=new D(32),o=0;o<32;++o)_[o]=5;var y=r(t,9,0),b=r(t,9,1),x=r(_,5,0),E=r(_,5,1),d=function(ae){for(var se=ae[0],me=1;me<ae.length;++me)ae[me]>se&&(se=ae[me]);return se},n=function(ae,se,me){var Se=se/8>>0;return(ae[Se]|ae[Se+1]<<8)>>>(se&7)&me},l=function(ae,se){var me=se/8>>0;return(ae[me]|ae[me+1]<<8|ae[me+2]<<16)>>>(se&7)},h=function(ae){return(ae/8>>0)+(ae&7&&1)},w=function(ae,se,me){(se==null||se<0)&&(se=0),(me==null||me>ae.length)&&(me=ae.length);var Se=new(ae instanceof j?j:ae instanceof N?N:D)(me-se);return Se.set(ae.subarray(se,me)),Se},g=function(ae,se,me){var Se=ae.length,Ye=!se||me,tt=!me||me.i;me||(me={}),se||(se=new D(Se*3));var H=function(Yt){var wr=se.length;if(Yt>wr){var ar=new D(Math.max(wr*2,Yt));ar.set(se),se=ar}},m=me.f||0,C=me.p||0,k=me.b||0,Z=me.l,Q=me.d,ye=me.m,Qe=me.n,Be=Se*8;do{if(!Z){me.f=m=n(ae,C,1);var ot=n(ae,C+1,3);if(C+=3,ot)if(ot==1)Z=b,Q=E,ye=9,Qe=5;else if(ot==2){var Et=n(ae,C,31)+257,Rt=n(ae,C+10,15)+4,ir=Et+n(ae,C+5,31)+1;C+=14;for(var Nt=new D(ir),er=new D(19),Ot=0;Ot<Rt;++Ot)er[M[Ot]]=n(ae,C+Ot*3,7);C+=Rt*3;var mr=d(er),Kt=(1<<mr)-1;if(!tt&&C+ir*(mr+7)>Be)break;for(var _r=r(er,mr,1),Ot=0;Ot<ir;){var gr=_r[n(ae,C,Kt)];C+=gr&15;var Xe=gr>>>4;if(Xe<16)Nt[Ot++]=Xe;else{var Sr=0,Ir=0;for(Xe==16?(Ir=3+n(ae,C,3),C+=2,Sr=Nt[Ot-1]):Xe==17?(Ir=3+n(ae,C,7),C+=3):Xe==18&&(Ir=11+n(ae,C,127),C+=7);Ir--;)Nt[Ot++]=Sr}}var vr=Nt.subarray(0,Et),yr=Nt.subarray(Et);ye=d(vr),Qe=d(yr),Z=r(vr,ye,1),Q=r(yr,Qe,1)}else throw"invalid block type";else{var Xe=h(C)+4,mt=ae[Xe-4]|ae[Xe-3]<<8,pt=Xe+mt;if(pt>Se){if(tt)throw"unexpected EOF";break}Ye&&H(k+mt),se.set(ae.subarray(Xe,pt),k),me.b=k+=mt,me.p=C=pt*8;continue}if(C>Be)throw"unexpected EOF"}Ye&&H(k+131072);for(var Er=(1<<ye)-1,Rr=(1<<Qe)-1,Br=ye+Qe+18;tt||C+Br<Be;){var Sr=Z[l(ae,C)&Er],Ur=Sr>>>4;if(C+=Sr&15,C>Be)throw"unexpected EOF";if(!Sr)throw"invalid length/literal";if(Ur<256)se[k++]=Ur;else if(Ur==256){Z=null;break}else{var Fr=Ur-254;if(Ur>264){var Ot=Ur-257,or=O[Ot];Fr=n(ae,C,(1<<or)-1)+f[Ot],C+=or}var Xt=Q[l(ae,C)&Rr],Ut=Xt>>>4;if(!Xt)throw"invalid distance";C+=Xt&15;var yr=s[Ut];if(Ut>3){var or=X[Ut];yr+=l(ae,C)&(1<<or)-1,C+=or}if(C>Be)throw"unexpected EOF";Ye&&H(k+131072);for(var tr=k+Fr;k<tr;k+=4)se[k]=se[k-yr],se[k+1]=se[k+1-yr],se[k+2]=se[k+2-yr],se[k+3]=se[k+3-yr];k=tr}}me.l=Z,me.p=C,me.b=k,Z&&(m=1,me.m=ye,me.d=Q,me.n=Qe)}while(!m);return k==se.length?se:w(se,0,k)},c=function(ae,se,me){me<<=se&7;var Se=se/8>>0;ae[Se]|=me,ae[Se+1]|=me>>>8},L=function(ae,se,me){me<<=se&7;var Se=se/8>>0;ae[Se]|=me,ae[Se+1]|=me>>>8,ae[Se+2]|=me>>>16},F=function(ae,se){for(var me=[],Se=0;Se<ae.length;++Se)ae[Se]&&me.push({s:Se,f:ae[Se]});var Ye=me.length,tt=me.slice();if(!Ye)return[new D(0),0];if(Ye==1){var H=new D(me[0].s+1);return H[me[0].s]=1,[H,1]}me.sort(function(ir,Nt){return ir.f-Nt.f}),me.push({s:-1,f:25001});var m=me[0],C=me[1],k=0,Z=1,Q=2;for(me[0]={s:-1,f:m.f+C.f,l:m,r:C};Z!=Ye-1;)m=me[me[k].f<me[Q].f?k++:Q++],C=me[k!=Z&&me[k].f<me[Q].f?k++:Q++],me[Z++]={s:-1,f:m.f+C.f,l:m,r:C};for(var ye=tt[0].s,Se=1;Se<Ye;++Se)tt[Se].s>ye&&(ye=tt[Se].s);var Qe=new j(ye+1),Be=B(me[Z-1],Qe,0);if(Be>se){var Se=0,ot=0,Xe=Be-se,mt=1<<Xe;for(tt.sort(function(Nt,er){return Qe[er.s]-Qe[Nt.s]||Nt.f-er.f});Se<Ye;++Se){var pt=tt[Se].s;if(Qe[pt]>se)ot+=mt-(1<<Be-Qe[pt]),Qe[pt]=se;else break}for(ot>>>=Xe;ot>0;){var Et=tt[Se].s;Qe[Et]<se?ot-=1<<se-Qe[Et]++-1:++Se}for(;Se>=0&&ot;--Se){var Rt=tt[Se].s;Qe[Rt]==se&&(--Qe[Rt],++ot)}Be=se}return[new D(Qe),Be]},B=function(ae,se,me){return ae.s==-1?Math.max(B(ae.l,se,me+1),B(ae.r,se,me+1)):se[ae.s]=me},P=function(ae){for(var se=ae.length;se&&!ae[--se];);for(var me=new j(++se),Se=0,Ye=ae[0],tt=1,H=function(C){me[Se++]=C},m=1;m<=se;++m)if(ae[m]==Ye&&m!=se)++tt;else{if(!Ye&&tt>2){for(;tt>138;tt-=138)H(32754);tt>2&&(H(tt>10?tt-11<<5|28690:tt-3<<5|12305),tt=0)}else if(tt>3){for(H(Ye),--tt;tt>6;tt-=6)H(8304);tt>2&&(H(tt-3<<5|8208),tt=0)}for(;tt--;)H(Ye);tt=1,Ye=ae[m]}return[me.subarray(0,Se),se]},W=function(ae,se){for(var me=0,Se=0;Se<se.length;++Se)me+=ae[Se]*se[Se];return me},U=function(ae,se,me){var Se=me.length,Ye=h(se+2);ae[Ye]=Se&255,ae[Ye+1]=Se>>>8,ae[Ye+2]=ae[Ye]^255,ae[Ye+3]=ae[Ye+1]^255;for(var tt=0;tt<Se;++tt)ae[Ye+tt+4]=me[tt];return(Ye+4+Se)*8},$=function(ae,se,me,Se,Ye,tt,H,m,C,k,Z){c(se,Z++,me),++Ye[256];for(var Q=F(Ye,15),ye=Q[0],Qe=Q[1],Be=F(tt,15),ot=Be[0],Xe=Be[1],mt=P(ye),pt=mt[0],Et=mt[1],Rt=P(ot),ir=Rt[0],Nt=Rt[1],er=new j(19),Ot=0;Ot<pt.length;++Ot)er[pt[Ot]&31]++;for(var Ot=0;Ot<ir.length;++Ot)er[ir[Ot]&31]++;for(var mr=F(er,7),Kt=mr[0],_r=mr[1],gr=19;gr>4&&!Kt[M[gr-1]];--gr);var Sr=k+5<<3,Ir=W(Ye,t)+W(tt,_)+H,vr=W(Ye,ye)+W(tt,ot)+H+14+3*gr+W(er,Kt)+(2*er[16]+3*er[17]+7*er[18]);if(Sr<=Ir&&Sr<=vr)return U(se,Z,ae.subarray(C,C+k));var yr,Er,Rr,Br;if(c(se,Z,1+(vr<Ir)),Z+=2,vr<Ir){yr=r(ye,Qe,0),Er=ye,Rr=r(ot,Xe,0),Br=ot;var Ur=r(Kt,_r,0);c(se,Z,Et-257),c(se,Z+5,Nt-1),c(se,Z+10,gr-4),Z+=14;for(var Ot=0;Ot<gr;++Ot)c(se,Z+3*Ot,Kt[M[Ot]]);Z+=3*gr;for(var Fr=[pt,ir],or=0;or<2;++or)for(var Xt=Fr[or],Ot=0;Ot<Xt.length;++Ot){var Ut=Xt[Ot]&31;c(se,Z,Ur[Ut]),Z+=Kt[Ut],Ut>15&&(c(se,Z,Xt[Ot]>>>5&127),Z+=Xt[Ot]>>>12)}}else yr=y,Er=t,Rr=x,Br=_;for(var Ot=0;Ot<m;++Ot)if(Se[Ot]>255){var Ut=Se[Ot]>>>18&31;L(se,Z,yr[Ut+257]),Z+=Er[Ut+257],Ut>7&&(c(se,Z,Se[Ot]>>>23&31),Z+=O[Ut]);var tr=Se[Ot]&31;L(se,Z,Rr[tr]),Z+=Br[tr],tr>3&&(L(se,Z,Se[Ot]>>>5&8191),Z+=X[tr])}else L(se,Z,yr[Se[Ot]]),Z+=Er[Se[Ot]];return L(se,Z,yr[256]),Z+Er[256]},ee=new N([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),pe=new D(0),fe=function(ae,se,me,Se,Ye,tt){var H=ae.length,m=new D(Se+H+5*(1+Math.floor(H/7e3))+Ye),C=m.subarray(Se,m.length-Ye),k=0;if(!se||H<8)for(var Z=0;Z<=H;Z+=65535){var Q=Z+65535;Q<H?k=U(C,k,ae.subarray(Z,Q)):(C[Z]=tt,k=U(C,k,ae.subarray(Z,H)))}else{for(var ye=ee[se-1],Qe=ye>>>13,Be=ye&8191,ot=(1<<me)-1,Xe=new j(32768),mt=new j(ot+1),pt=Math.ceil(me/3),Et=2*pt,Rt=function(xt){return(ae[xt]^ae[xt+1]<<pt^ae[xt+2]<<Et)&ot},ir=new N(25e3),Nt=new j(288),er=new j(32),Ot=0,mr=0,Z=0,Kt=0,_r=0,gr=0;Z<H;++Z){var Sr=Rt(Z),Ir=Z&32767,vr=mt[Sr];if(Xe[Ir]=vr,mt[Sr]=Ir,_r<=Z){var yr=H-Z;if((Ot>7e3||Kt>24576)&&yr>423){k=$(ae,C,0,ir,Nt,er,mr,Kt,gr,Z-gr,k),Kt=Ot=mr=0,gr=Z;for(var Er=0;Er<286;++Er)Nt[Er]=0;for(var Er=0;Er<30;++Er)er[Er]=0}var Rr=2,Br=0,Ur=Be,Fr=Ir-vr&32767;if(yr>2&&Sr==Rt(Z-Fr))for(var or=Math.min(Qe,yr)-1,Xt=Math.min(32767,Z),Ut=Math.min(258,yr);Fr<=Xt&&--Ur&&Ir!=vr;){if(ae[Z+Rr]==ae[Z+Rr-Fr]){for(var tr=0;tr<Ut&&ae[Z+tr]==ae[Z+tr-Fr];++tr);if(tr>Rr){if(Rr=tr,Br=Fr,tr>or)break;for(var Yt=Math.min(Fr,tr-2),wr=0,Er=0;Er<Yt;++Er){var ar=Z-Fr+Er+32768&32767,gn=Xe[ar],Mt=ar-gn+32768&32767;Mt>wr&&(wr=Mt,vr=ar)}}}Ir=vr,vr=Xe[Ir],Fr+=Ir-vr+32768&32767}if(Br){ir[Kt++]=268435456|v[Rr]<<18|i[Br];var Ht=v[Rr]&31,Lt=i[Br]&31;mr+=O[Ht]+X[Lt],++Nt[257+Ht],++er[Lt],_r=Z+Rr,++Ot}else ir[Kt++]=ae[Z],++Nt[ae[Z]]}}k=$(ae,C,tt,ir,Nt,er,mr,Kt,gr,Z-gr,k),tt||(k=U(C,k,pe))}return w(m,0,Se+h(k)+Ye)},Le=function(){for(var ae=new N(256),se=0;se<256;++se){for(var me=se,Se=9;--Se;)me=(me&1&&3988292384)^me>>>1;ae[se]=me}return ae}(),Ie=function(){var ae=4294967295;return{p:function(se){for(var me=ae,Se=0;Se<se.length;++Se)me=Le[me&255^se[Se]]^me>>>8;ae=me},d:function(){return ae^4294967295}}},xe=function(){var ae=1,se=0;return{p:function(me){for(var Se=ae,Ye=se,tt=me.length,H=0;H!=tt;){for(var m=Math.min(H+5552,tt);H<m;++H)Se+=me[H],Ye+=Se;Se%=65521,Ye%=65521}ae=Se,se=Ye},d:function(){return(ae>>>8<<16|(se&255)<<8|se>>>8)+((ae&255)<<23)*2}}},Ue=function(ae,se,me,Se,Ye){return fe(ae,se.level==null?6:se.level,se.mem==null?Math.ceil(Math.max(8,Math.min(13,Math.log(ae.length)))*1.5):12+se.mem,me,Se,!Ye)},Fe=function(ae,se){var me={};for(var Se in ae)me[Se]=ae[Se];for(var Se in se)me[Se]=se[Se];return me},we=function(ae,se,me){for(var Se=ae(),Ye=ae.toString(),tt=Ye.slice(Ye.indexOf("[")+1,Ye.lastIndexOf("]")).replace(/ /g,"").split(","),H=0;H<Se.length;++H){var m=Se[H],C=tt[H];if(typeof m=="function"){se+=";"+C+"=";var k=m.toString();if(m.prototype)if(k.indexOf("[native code]")!=-1){var Z=k.indexOf(" ",8)+1;se+=k.slice(Z,k.indexOf("(",Z))}else{se+=k;for(var Q in m.prototype)se+=";"+C+".prototype."+Q+"="+m.prototype[Q].toString()}else se+=k}else me[C]=m}return[se,me]},ve=[],ze=function(ae){var se=[];for(var me in ae)(ae[me]instanceof D||ae[me]instanceof j||ae[me]instanceof N)&&se.push((ae[me]=new ae[me].constructor(ae[me])).buffer);return se},at=function(ae,se,me,Se){var Ye;if(!ve[me]){for(var tt="",H={},m=ae.length-1,C=0;C<m;++C)Ye=we(ae[C],tt,H),tt=Ye[0],H=Ye[1];ve[me]=we(ae[m],tt,H)}var k=Fe({},ve[me][1]);return G(ve[me][0]+";onmessage=function(e){for(var k in e.data)self[k]=e.data[k];onmessage="+se.toString()+"}",me,k,ze(k),Se)},nt=function(){return[D,j,N,O,X,M,f,s,b,E,A,r,d,n,l,h,w,g,de,J,ie]},et=function(){return[D,j,N,O,X,M,v,i,y,t,x,_,A,ee,pe,r,c,L,F,B,P,W,U,$,h,w,fe,Ue,ge,J]},Ke=function(){return[rt,De,Ge,Ie,Le]},re=function(){return[st,Te]},z=function(){return[Ve,Ge,xe]},Y=function(){return[$e]},J=function(ae){return postMessage(ae,[ae.buffer])},ie=function(ae){return ae&&ae.size&&new D(ae.size)},ue=function(ae,se,me,Se,Ye,tt){var H=at(me,Se,Ye,function(m,C){H.terminate(),tt(m,C)});return se.consume||(ae=new D(ae)),H.postMessage([ae,se],[ae.buffer]),function(){H.terminate()}},he=function(ae){return ae.ondata=function(se,me){return postMessage([se,me],[se.buffer])},function(se){return ae.push(se.data[0],se.data[1])}},He=function(ae,se,me,Se,Ye){var tt,H=at(ae,Se,Ye,function(m,C){m?(H.terminate(),se.ondata.call(se,m)):(C[1]&&H.terminate(),se.ondata.call(se,m,C[0],C[1]))});H.postMessage(me),se.push=function(m,C){if(tt)throw"stream finished";if(!se.ondata)throw"no stream handler";H.postMessage([m,tt=C],[m.buffer])},se.terminate=function(){H.terminate()}},We=function(ae,se){return ae[se]|ae[se+1]<<8},je=function(ae,se){return(ae[se]|ae[se+1]<<8|ae[se+2]<<16)+(ae[se+3]<<23)*2},Ge=function(ae,se,me){for(;me;++se)ae[se]=me,me>>>=8},rt=function(ae,se){var me=se.filename;if(ae[0]=31,ae[1]=139,ae[2]=8,ae[8]=se.level<2?4:se.level==9?2:0,ae[9]=3,se.mtime!=0&&Ge(ae,4,Math.floor(new Date(se.mtime||Date.now())/1e3)),me){ae[3]=8;for(var Se=0;Se<=me.length;++Se)ae[Se+10]=me.charCodeAt(Se)}},st=function(ae){if(ae[0]!=31||ae[1]!=139||ae[2]!=8)throw"invalid gzip data";var se=ae[3],me=10;se&4&&(me+=ae[10]|(ae[11]<<8)+2);for(var Se=(se>>3&1)+(se>>4&1);Se>0;Se-=!ae[me++]);return me+(se&2)},Te=function(ae){var se=ae.length;return(ae[se-4]|ae[se-3]<<8|ae[se-2]<<16)+2*(ae[se-1]<<23)},De=function(ae){return 10+(ae.filename&&ae.filename.length+1||0)},Ve=function(ae,se){var me=se.level,Se=me==0?0:me<6?1:me==9?3:2;ae[0]=120,ae[1]=Se<<6|(Se?32-2*Se:1)},$e=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 Ne(ae,se){return!se&&typeof ae=="function"&&(se=ae,ae={}),this.ondata=se,ae}var Pe=function(){function ae(se,me){!me&&typeof se=="function"&&(me=se,se={}),this.ondata=me,this.o=se||{}}return ae.prototype.p=function(se,me){this.ondata(Ue(se,this.o,0,0,!me),me)},ae.prototype.push=function(se,me){if(this.d)throw"stream finished";if(!this.ondata)throw"no stream handler";this.d=me,this.p(se,me||!1)},ae}(),Ce=function(){function ae(se,me){He([et,function(){return[he,Pe]}],this,Ne.call(this,se,me),function(Se){var Ye=new Pe(Se.data);onmessage=he(Ye)},6)}return ae}();function ce(ae,se,me){if(me||(me=se,se={}),typeof me!="function")throw"no callback";return ue(ae,se,[et],function(Se){return J(ge(Se.data[0],Se.data[1]))},0,me)}function ge(ae,se){return se===void 0&&(se={}),Ue(ae,se,0,0)}var te=function(){function ae(se){this.s={},this.p=new D(0),this.ondata=se}return ae.prototype.e=function(se){if(this.d)throw"stream finished";if(!this.ondata)throw"no stream handler";var me=this.p.length,Se=new D(me+se.length);Se.set(this.p),Se.set(se,me),this.p=Se},ae.prototype.c=function(se){this.d=this.s.i=se||!1;var me=this.s.b,Se=g(this.p,this.o,this.s);this.ondata(w(Se,me,this.s.b),this.d),this.o=w(Se,this.s.b-32768),this.s.b=this.o.length,this.p=w(this.p,this.s.p/8>>0),this.s.p&=7},ae.prototype.push=function(se,me){this.e(se),this.c(me)},ae}(),ne=function(){function ae(se){this.ondata=se,He([nt,function(){return[he,te]}],this,0,function(){var me=new te;onmessage=he(me)},7)}return ae}();function le(ae,se,me){if(me||(me=se,se={}),typeof me!="function")throw"no callback";return ue(ae,se,[nt],function(Se){return J(de(Se.data[0],ie(Se.data[1])))},1,me)}function de(ae,se){return g(ae,se)}var Re=function(){function ae(se,me){this.c=Ie(),this.l=0,this.v=1,Pe.call(this,se,me)}return ae.prototype.push=function(se,me){Pe.prototype.push.call(this,se,me)},ae.prototype.p=function(se,me){this.c.p(se),this.l+=se.length;var Se=Ue(se,this.o,this.v&&De(this.o),me&&8,!me);this.v&&(rt(Se,this.o),this.v=0),me&&(Ge(Se,Se.length-8,this.c.d()),Ge(Se,Se.length-4,this.l)),this.ondata(Se,me)},ae}(),Me=function(){function ae(se,me){He([et,Ke,function(){return[he,Pe,Re]}],this,Ne.call(this,se,me),function(Se){var Ye=new Re(Se.data);onmessage=he(Ye)},8)}return ae}();function qe(ae,se,me){if(me||(me=se,se={}),typeof me!="function")throw"no callback";return ue(ae,se,[et,Ke,function(){return[lt]}],function(Se){return J(lt(Se.data[0],Se.data[1]))},2,me)}function lt(ae,se){se===void 0&&(se={});var me=Ie(),Se=ae.length;me.p(ae);var Ye=Ue(ae,se,De(se),8),tt=Ye.length;return rt(Ye,se),Ge(Ye,tt-8,me.d()),Ge(Ye,tt-4,Se),Ye}var ft=function(){function ae(se){this.v=1,te.call(this,se)}return ae.prototype.push=function(se,me){if(te.prototype.e.call(this,se),this.v){var Se=st(this.p);if(Se>=this.p.length&&!me)return;this.p=this.p.subarray(Se),this.v=0}if(me){if(this.p.length<8)throw"invalid gzip stream";this.p=this.p.subarray(0,-8)}te.prototype.c.call(this,me)},ae}(),At=function(){function ae(se){this.ondata=se,He([nt,re,function(){return[he,te,ft]}],this,0,function(){var me=new ft;onmessage=he(me)},9)}return ae}();function Bt(ae,se,me){if(me||(me=se,se={}),typeof me!="function")throw"no callback";return ue(ae,se,[nt,re,function(){return[St]}],function(Se){return J(St(Se.data[0]))},3,me)}function St(ae,se){return g(ae.subarray(st(ae),-8),se||new D(Te(ae)))}var it=function(){function ae(se,me){this.c=xe(),this.v=1,Pe.call(this,se,me)}return ae.prototype.push=function(se,me){Pe.prototype.push.call(this,se,me)},ae.prototype.p=function(se,me){this.c.p(se);var Se=Ue(se,this.o,this.v&&2,me&&4,!me);this.v&&(Ve(Se,this.o),this.v=0),me&&Ge(Se,Se.length-4,this.c.d()),this.ondata(Se,me)},ae}(),Wt=function(){function ae(se,me){He([et,z,function(){return[he,Pe,it]}],this,Ne.call(this,se,me),function(Se){var Ye=new it(Se.data);onmessage=he(Ye)},10)}return ae}();function Qt(ae,se,me){if(me||(me=se,se={}),typeof me!="function")throw"no callback";return ue(ae,se,[et,z,function(){return[It]}],function(Se){return J(It(Se.data[0],Se.data[1]))},4,me)}function It(ae,se){se===void 0&&(se={});var me=xe();me.p(ae);var Se=Ue(ae,se,2,4);return Ve(Se,se),Ge(Se,Se.length-4,me.d()),Se}var qt=function(){function ae(se){this.v=1,te.call(this,se)}return ae.prototype.push=function(se,me){if(te.prototype.e.call(this,se),this.v){if(this.p.length<2&&!me)return;this.p=this.p.subarray(2),this.v=0}if(me){if(this.p.length<4)throw"invalid zlib stream";this.p=this.p.subarray(0,-4)}te.prototype.c.call(this,me)},ae}(),Ft=function(){function ae(se){this.ondata=se,He([nt,Y,function(){return[he,te,qt]}],this,0,function(){var me=new qt;onmessage=he(me)},11)}return ae}();function rr(ae,se,me){if(me||(me=se,se={}),typeof me!="function")throw"no callback";return ue(ae,se,[nt,Y,function(){return[kt]}],function(Se){return J(kt(Se.data[0],ie(Se.data[1])))},5,me)}function kt(ae,se){return g(($e(ae),ae.subarray(2,-4)),se)}var ut=function(){function ae(se){this.G=ft,this.I=te,this.Z=qt,this.ondata=se}return ae.prototype.push=function(se,me){if(!this.ondata)throw"no stream handler";if(this.s)this.s.push(se,me);else{if(this.p&&this.p.length){var Se=new D(this.p.length+se.length);Se.set(this.p),Se.set(se,this.p.length)}else this.p=se;if(this.p.length>2){var Ye=this,tt=function(){Ye.ondata.apply(Ye,arguments)};this.s=this.p[0]==31&&this.p[1]==139&&this.p[2]==8?new this.G(tt):(this.p[0]&15)!=8||this.p[0]>>4>7||(this.p[0]<<8|this.p[1])%31?new this.I(tt):new this.Z(tt),this.s.push(this.p,me),this.p=null}}},ae}(),lr=function(){function ae(se){this.G=At,this.I=ne,this.Z=Ft,this.ondata=se}return ae.prototype.push=function(se,me){ut.prototype.push.call(this,se,me)},ae}();function wt(ae,se,me){if(me||(me=se,se={}),typeof me!="function")throw"no callback";return ae[0]==31&&ae[1]==139&&ae[2]==8?Bt(ae,se,me):(ae[0]&15)!=8||ae[0]>>4>7||(ae[0]<<8|ae[1])%31?le(ae,se,me):rr(ae,se,me)}function dt(ae,se){return ae[0]==31&&ae[1]==139&&ae[2]==8?St(ae,se):(ae[0]&15)!=8||ae[0]>>4>7||(ae[0]<<8|ae[1])%31?de(ae,se):kt(ae,se)}var Dt=function(ae,se,me,Se){for(var Ye in ae){var tt=ae[Ye],H=se+Ye;tt instanceof D?me[H]=[tt,Se]:Array.isArray(tt)?me[H]=[tt[0],Fe(Se,tt[1])]:Dt(tt,H+"/",me,Se)}};function dr(ae,se){var me=ae.length;if(!se&&typeof TextEncoder!="undefined")return new TextEncoder().encode(ae);for(var Se=new D(ae.length+(ae.length>>>1)),Ye=0,tt=function(k){Se[Ye++]=k},H=0;H<me;++H){if(Ye+5>Se.length){var m=new D(Ye+8+(me-H<<1));m.set(Se),Se=m}var C=ae.charCodeAt(H);C<128||se?tt(C):C<2048?(tt(192|C>>>6),tt(128|C&63)):C>55295&&C<57344?(C=65536+(C&1023<<10)|ae.charCodeAt(++H)&1023,tt(240|C>>>18),tt(128|C>>>12&63),tt(128|C>>>6&63),tt(128|C&63)):(tt(224|C>>>12),tt(128|C>>>6&63),tt(128|C&63))}return w(Se,0,Ye)}function xr(ae,se){var me="";if(!se&&typeof TextDecoder!="undefined")return new TextDecoder().decode(ae);for(var Se=0;Se<ae.length;){var Ye=ae[Se++];Ye<128||se?me+=String.fromCharCode(Ye):Ye<224?me+=String.fromCharCode((Ye&31)<<6|ae[Se++]&63):Ye<240?me+=String.fromCharCode((Ye&15)<<12|(ae[Se++]&63)<<6|ae[Se++]&63):(Ye=((Ye&15)<<18|(ae[Se++]&63)<<12|(ae[Se++]&63)<<6|ae[Se++]&63)-65536,me+=String.fromCharCode(55296|Ye>>10,56320|Ye&1023))}return me}var Tr=function(ae,se){return se+30+We(ae,se+26)+We(ae,se+28)},Pr=function(ae,se,me){var Se=We(ae,se+28),Ye=xr(ae.subarray(se+46,se+46+Se),!(We(ae,se+8)&2048)),tt=se+46+Se,H=me?kr(ae,tt):[je(ae,se+20),je(ae,se+24),je(ae,se+42)],m=H[0],C=H[1],k=H[2];return[We(ae,se+10),m,C,Ye,tt+We(ae,se+30)+We(ae,se+32),k]},kr=function(ae,se){for(;We(ae,se)!=1;se+=4+We(ae,se+2));return[je(ae,se+12),je(ae,se+4),je(ae,se+20)]},Gt=function(ae,se,me,Se,Ye,tt,H,m,C,k){var Z=tt.length,Q=Se.length;Ge(ae,se,C!=null?33639248:67324752),se+=4,C!=null&&(ae[se]=20,se+=2),ae[se]=20,se+=2,ae[se++]=k==8&&(m.level==1?6:m.level<6?4:m.level==9?2:0),ae[se++]=H&&8,ae[se]=k,se+=2;var ye=new Date(m.mtime||Date.now()),Qe=ye.getFullYear()-1980;if(Qe<0||Qe>119)throw"date not in range 1980-2099";Ge(ae,se,(Qe<<24)*2|ye.getMonth()+1<<21|ye.getDate()<<16|ye.getHours()<<11|ye.getMinutes()<<5|ye.getSeconds()>>>1),se+=4,Ge(ae,se,me),Ge(ae,se+4,Q),Ge(ae,se+8,Ye),Ge(ae,se+12,Z),se+=16,C!=null&&(Ge(ae,se+=10,C),se+=4),ae.set(tt,se),se+=Z,C==null&&ae.set(Se,se)},fr=function(ae,se,me,Se,Ye){Ge(ae,se,101010256),Ge(ae,se+8,me),Ge(ae,se+10,me),Ge(ae,se+12,Se),Ge(ae,se+16,Ye)};function Qr(ae,se,me){if(me||(me=se,se={}),typeof me!="function")throw"no callback";var Se={};Dt(ae,"",Se,se);var Ye=Object.keys(Se),tt=Ye.length,H=0,m=0,C=tt,k=new Array(tt),Z=[],Q=function(){for(var ot=0;ot<Z.length;++ot)Z[ot]()},ye=function(){var ot=new D(m+22),Xe=H,mt=m-H;m=0;for(var pt=0;pt<C;++pt){var Et=k[pt];try{Gt(ot,m,Et.c,Et.d,Et.m,Et.n,Et.u,Et.p,null,Et.t),Gt(ot,H,Et.c,Et.d,Et.m,Et.n,Et.u,Et.p,m,Et.t),H+=46+Et.n.length,m+=30+Et.n.length+Et.d.length}catch(Rt){return me(Rt,null)}}fr(ot,H,k.length,mt,Xe),me(null,ot)};tt||ye();for(var Qe=function(ot){var Xe=Ye[ot],mt=Se[Xe],pt=mt[0],Et=mt[1],Rt=Ie(),ir=pt.length;Rt.p(pt);var Nt=dr(Xe),er=Nt.length,Ot=Et.level==0?0:8,mr=function(Kt,_r){if(Kt)Q(),me(Kt,null);else{var gr=_r.length;k[ot]={t:Ot,d:_r,m:ir,c:Rt.d(),u:Xe.length!=gr,n:Nt,p:Et},H+=30+er+gr,m+=76+2*er+gr,--tt||ye()}};if(Nt.length>65535&&mr("filename too long",null),!Ot)mr(null,pt);else if(ir<16e4)try{mr(null,ge(pt,Et))}catch(Kt){mr(Kt,null)}else Z.push(ce(pt,Et,mr))},Be=0;Be<C;++Be)Qe(Be);return Q}function pr(ae,se){se===void 0&&(se={});var me={},Se=[];Dt(ae,"",me,se);var Ye=0,tt=0;for(var H in me){var m=me[H],C=m[0],k=m[1],Z=k.level==0?0:8,Q=dr(H),ye=Q.length;if(Q.length>65535)throw"filename too long";var Qe=Z?ge(C,k):C,Be=Qe.length,ot=Ie();ot.p(C),Se.push({t:Z,d:Qe,m:C.length,c:ot.d(),u:H.length!=ye,n:Q,o:Ye,p:k}),Ye+=30+ye+Be,tt+=76+2*ye+Be}for(var Xe=new D(tt+22),mt=Ye,pt=tt-Ye,Et=0;Et<Se.length;++Et){var Rt=Se[Et];Gt(Xe,Rt.o,Rt.c,Rt.d,Rt.m,Rt.n,Rt.u,Rt.p,null,Rt.t),Gt(Xe,Ye,Rt.c,Rt.d,Rt.m,Rt.n,Rt.u,Rt.p,Rt.o,Rt.t),Ye+=46+Rt.n.length}return fr(Xe,Ye,Se.length,pt,mt),Xe}function Kr(ae,se){if(typeof se!="function")throw"no callback";for(var me=[],Se=function(){for(var ye=0;ye<me.length;++ye)me[ye]()},Ye={},tt=ae.length-22;je(ae,tt)!=101010256;--tt)if(!tt||ae.length-tt>65558){se("invalid zip file",null);return}var H=We(ae,tt+8);H||se(null,{});var m=H,C=je(ae,tt+16),k=C==4294967295;if(k){if(tt=je(ae,tt-12),je(ae,tt)!=101075792)throw"invalid zip file";m=H=je(ae,tt+32),C=je(ae,tt+48)}for(var Z=function(ye){var Qe=Pr(ae,C,k),Be=Qe[0],ot=Qe[1],Xe=Qe[2],mt=Qe[3],pt=Qe[4],Et=Qe[5],Rt=Tr(ae,Et);C=pt;var ir=function(er,Ot){er?(Se(),se(er,null)):(Ye[mt]=Ot,--H||se(null,Ye))};if(!Be)ir(null,w(ae,Rt,Rt+ot));else if(Be==8){var Nt=ae.subarray(Rt,Rt+ot);if(ot<32e4)try{ir(null,de(Nt,new D(Xe)))}catch(er){ir(er,null)}else me.push(le(Nt,{size:Xe},ir))}else ir("unknown compression type "+Be,null)},Q=0;Q<m;++Q)Z(Q);return Se}function Dr(ae){for(var se={},me=ae.length-22;je(ae,me)!=101010256;--me)if(!me||ae.length-me>65558)throw"invalid zip file";var Se=We(ae,me+8);if(!Se)return{};var Ye=je(ae,me+16),tt=Ye==4294967295;if(tt){if(me=je(ae,me-12),je(ae,me)!=101075792)throw"invalid zip file";Se=je(ae,me+32),Ye=je(ae,me+48)}for(var H=0;H<Se;++H){var m=Pr(ae,Ye,tt),C=m[0],k=m[1],Z=m[2],Q=m[3],ye=m[4],Qe=m[5],Be=Tr(ae,Qe);if(Ye=ye,!C)se[Q]=w(ae,Be,Be+k);else if(C==8)se[Q]=de(ae.subarray(Be,Be+k),new D(Z));else throw"unknown compression type "+C}return se}},deN7:function(ct,_e,K){"use strict";var oe=K("/zsF"),G=K("PArb"),D=K("14J3"),j=K("BMrR"),N=K("jCWc"),O=K("kPKH"),X=K("+L6B"),M=K("2/Rp"),e=K("miYZ"),R=K("tsqr"),f=K("9og8"),v=K("giR+"),u=K("fyUT"),s=K("2qtc"),i=K("kLXV"),A=K("7Kak"),o=K("9yH6"),a=K("tJVT"),r=K("k1fw"),t=K("OaEy"),_=K("2fM7"),y=K("WmNS"),b=K.n(y),x=K("q1tI"),E=K.n(x),d=K("ZW9T"),n=K("F0VM"),l=K.n(n),h=K("xKgJ"),w=K("J66h"),g=K.n(w),c=K("ErOA"),L=K("Ty5D"),F=K("9Bee"),B=K("XYT7"),P=K("RCxd"),W=K("/MfK"),U=_.a.Option,$={selectOnLineNumbers:!0,readOnly:!0,minimap:{enabled:!1},scrollBeyondLastLine:!1,enableSplitViewResizing:!1,roundedSelection:!1,renderIndicators:!1,useShadows:!1},ee;(function(fe){fe[fe.SET_PATH=0]="SET_PATH",fe[fe.GET_PASSED_CONTENT=1]="GET_PASSED_CONTENT"})(ee||(ee={}));function pe(fe,Le){switch(Le.type){case ee.SET_PATH:return Object(r.a)(Object(r.a)({},fe),{},{selectedPath:Le.payload});case ee.GET_PASSED_CONTENT:return Object(r.a)(Object(r.a)({},fe),{},{passedContent:Le.payload});default:throw new Error}}_e.a=function(fe){var Le=fe.language,Ie=fe.dispatch,xe=fe.shixunWorkReport,Ue=fe.v,Fe=fe.languages,we=fe.onPathChange,ve=fe.autoHeight,ze=fe.diff_code_count,at=fe.data,nt=Object(x.useState)(Fe==null?void 0:Fe[0]),et=Object(a.a)(nt,2),Ke=et[0],re=et[1],z=xe!="shixunWorkReport"&&Object(L.i)();return Object(x.useEffect)(function(){re(Fe==null?void 0:Fe[0])},[]),Object(x.useEffect)(function(){var Y;re(Fe==null||((Y=Fe.filter(function(J){return J.language===(Ke==null?void 0:Ke.language)}))===null||Y===void 0)?void 0:Y[0])},[Fe]),E.a.createElement(E.a.Fragment,null,E.a.createElement("h2",null," ",E.a.createElement("span",null,E.a.createElement("span",null,"\u6700\u540E\u901A\u5173\u7684\u4EE3\u7801"),(Fe==null?void 0:Fe.length)>1&&E.a.createElement(o.a.Group,{defaultValue:Le,style:{marginLeft:10},onChange:function(J){var ie;re(Fe==null||((ie=Fe.filter(function(ue){return ue.language===J.target.value}))===null||ie===void 0)?void 0:ie[0])}},Fe==null?void 0:Fe.map(function(Y){return E.a.createElement(o.a,{value:Y==null?void 0:Y.language},Y==null?void 0:Y.language)}))),Object(h.c)()&&xe!="shixunWorkReport"&&E.a.createElement("span",null,E.a.createElement("span",null,"\u5F97\u5206 ",Ke==null?void 0:Ke.score,"/",Ke==null?void 0:Ke.total_score),E.a.createElement(M.a,{style:{margin:"0px 10px"},onClick:function(){var J=Ke==null?void 0:Ke.score;i.a.confirm({title:"\u8C03\u5206",content:E.a.createElement("div",null,E.a.createElement("p",null,"\u5F97\u5206\uFF1A",Ke==null?void 0:Ke.score,"/",Ke==null?void 0:Ke.total_score),E.a.createElement("p",null,"\u8C03\u5206\uFF1A",E.a.createElement(u.a,{min:0,max:Ke==null?void 0:Ke.total_score,defaultValue:Ke==null?void 0:Ke.score,onChange:function(ue){J=ue}}))),okText:"\u786E\u8BA4",onOk:function(){var ie=Object(f.a)(b.a.mark(function he(){var He;return b.a.wrap(function(je){for(;;)switch(je.prev=je.next){case 0:return je.next=2,Object(c.a)("/api/courses/".concat(z==null?void 0:z.coursesId,"/homework_commons/update_hack_score"),{method:"put",body:{course_id:z==null?void 0:z.coursesId,hack_user_code_id:Ke==null?void 0:Ke.hack_user_id,score:J}});case 2:He=je.sent,He.status===0&&(R.b.success("\u8C03\u5206\u6210\u529F"),Ie({type:"shixunHomeworks/setActionTabs",payload:{}}),Ie({type:"shixunHomeworks/getShixunWorkReports",payload:Object(r.a)({},z)}));case 4:case"end":return je.stop()}},he)}));function ue(){return ie.apply(this,arguments)}return ue}(),cancelText:"\u53D6\u6D88"})},type:"primary"},"\u8C03\u5206"),Object(h.c)()&&xe!="shixunWorkReport"&&E.a.createElement(M.a,{onClick:function(){Ie({type:"shixunHomeworks/setActionTabs",payload:{key:"\u66F4\u6539\u70B9\u8BC4",selectArrs:{myshixun_identifier:xe.user_id,type:"1",language:Ke==null?void 0:Ke.language,v:Ue,data:Object(r.a)({},xe)}}})}},"\u70B9\u8BC4\u4EE3\u7801"))),E.a.createElement(d.b,{height:300,language:Ke==null?void 0:Ke.language,value:w.Base64.decode(Ke==null?void 0:Ke.code),autoHeight:ve,theme:"default",options:$}),((Ke==null?void 0:Ke.comment)||(Ke==null?void 0:Ke.hidden_comment))&&E.a.createElement("div",null,E.a.createElement(j.a,{align:"middle",style:{borderTop:"1px solid #eee"}},E.a.createElement(O.a,{flex:1},E.a.createElement("h1",{className:l.a.title},"\u70B9\u8BC4\u5185\u5BB9")),E.a.createElement(O.a,{className:"pr30"},Object(h.c)()&&E.a.createElement(M.a,{onClick:Object(f.a)(b.a.mark(function Y(){return b.a.wrap(function(ie){for(;;)switch(ie.prev=ie.next){case 0:i.a.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",icon:E.a.createElement(P.a,null),content:"\u662F\u5426\u786E\u8BA4\u5220\u9664\uFF1F",onOk:function(){return Object(f.a)(b.a.mark(function he(){var He;return b.a.wrap(function(je){for(;;)switch(je.prev=je.next){case 0:return je.next=2,Object(B.m)({comment_id:Ke==null?void 0:Ke.comment_id,homeworkId:z.homeworkId,type:"hack"});case 2:He=je.sent,He.status===0&&(R.b.success("\u5220\u9664\u6210\u529F"),Ie({type:"shixunHomeworks/getShixunWorkReports",payload:Object(r.a)({},z)}));case 4:case"end":return je.stop()}},he)}))()}});case 1:case"end":return ie.stop()}},Y)}))},E.a.createElement(W.a,null),"\u5220\u9664"))),E.a.createElement(G.a,{style:{margin:0}}),(Ke==null?void 0:Ke.comment)&&E.a.createElement("aside",{className:"pl30 pr30 mt20"},E.a.createElement("span",{className:"c-light-black font12"},"# \u5B66\u751F\u548C\u8BFE\u5802\u8001\u5E08\u53EF\u89C1"),E.a.createElement("br",null),E.a.createElement(F.a,{value:Ke==null?void 0:Ke.comment})),(Ke==null?void 0:Ke.hidden_comment)&&E.a.createElement("aside",{className:"pl30 pr30 mt20"},E.a.createElement("span",{className:"c-light-black font12"},"# \u4EC5\u8BFE\u5802\u8001\u5E08\u53EF\u89C1"),E.a.createElement("br",null),E.a.createElement(F.a,{value:Ke==null?void 0:Ke.hidden_comment}))))}},dmUQ:function(ct,_e,K){"use strict";var oe=K("Ff2n"),G=K("rePB"),D=K("1OyB"),j=K("vuIU"),N=K("Ji7U"),O=K("md7G"),X=K("foSv"),M=K("q1tI"),e=K.n(M),R=K("TSYQ"),f=K.n(R),v=K("4IlW");function u(l,h){var w=Object.keys(l);if(Object.getOwnPropertySymbols){var g=Object.getOwnPropertySymbols(l);h&&(g=g.filter(function(c){return Object.getOwnPropertyDescriptor(l,c).enumerable})),w.push.apply(w,g)}return w}function s(l){for(var h=1;h<arguments.length;h++){var w=arguments[h]!=null?arguments[h]:{};h%2?u(Object(w),!0).forEach(function(g){Object(G.a)(l,g,w[g])}):Object.getOwnPropertyDescriptors?Object.defineProperties(l,Object.getOwnPropertyDescriptors(w)):u(Object(w)).forEach(function(g){Object.defineProperty(l,g,Object.getOwnPropertyDescriptor(w,g))})}return l}function i(l){var h=A();return function(){var g=Object(X.a)(l),c;if(h){var L=Object(X.a)(this).constructor;c=Reflect.construct(g,arguments,L)}else c=g.apply(this,arguments);return Object(O.a)(this,c)}}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 a(l){l.preventDefault()}var r=function(h){return h.replace(/[^\w.-]+/g,"")},t=200,_=600,y=Number.MAX_SAFE_INTEGER||Math.pow(2,53)-1,b=function(h){return h!=null},x=function(h,w){return w===h||typeof w=="number"&&typeof h=="number"&&isNaN(w)&&isNaN(h)},E=function(l){Object(N.a)(w,l);var h=i(w);function w(g){var c;Object(D.a)(this,w),c=h.call(this,g),c.onKeyDown=function(B){var P=c.props,W=P.onKeyDown,U=P.onPressEnter;if(B.keyCode===v.a.UP){var $=c.getRatio(B);c.up(B,$,null),c.stop()}else if(B.keyCode===v.a.DOWN){var ee=c.getRatio(B);c.down(B,ee,null),c.stop()}else B.keyCode===v.a.ENTER&&U&&U(B);if(c.recordCursorPosition(),c.lastKeyCode=B.keyCode,W){for(var pe=arguments.length,fe=new Array(pe>1?pe-1:0),Le=1;Le<pe;Le++)fe[Le-1]=arguments[Le];W.apply(void 0,[B].concat(fe))}},c.onKeyUp=function(B){var P=c.props.onKeyUp;if(c.stop(),c.recordCursorPosition(),P){for(var W=arguments.length,U=new Array(W>1?W-1:0),$=1;$<W;$++)U[$-1]=arguments[$];P.apply(void 0,[B].concat(U))}},c.onChange=function(B){var P=c.props.onChange;c.state.focused&&(c.inputting=!0),c.rawInput=c.props.parser(c.getValueFromEvent(B)),c.setState({inputValue:c.rawInput}),P(c.toNumber(c.rawInput))},c.onMouseUp=function(){var B=c.props.onMouseUp;c.recordCursorPosition(),B&&B.apply(void 0,arguments)},c.onFocus=function(){var B;c.setState({focused:!0}),(B=c.props).onFocus.apply(B,arguments)},c.onBlur=function(){var B=c.props.onBlur;c.inputting=!1,c.setState({focused:!1});var P=c.getCurrentValidValue(c.state.inputValue),W=c.setValue(P,o);if(B){var U=c.input.value,$=c.getInputDisplayValue({focus:!1,value:W});c.input.value=$&&Number($),B.apply(void 0,arguments),c.input.value=U}},c.getRatio=function(B){var P=1;return B.metaKey||B.ctrlKey?P=.1:B.shiftKey&&(P=10),P},c.getFullNum=function(B){return isNaN(B)?B:/e/i.test(String(B))?Number(B).toFixed(18).replace(/\.?0+$/,""):B},c.getPrecision=function(B){if(b(c.props.precision))return c.props.precision;var P=String(B);if(P.indexOf("e-")>=0)return parseInt(P.slice(P.indexOf("e-")+2),10);var W=0;return P.indexOf(".")>=0&&(W=P.length-P.indexOf(".")-1),W},c.getInputDisplayValue=function(B){var P=B||c.state,W=P.focused,U=P.inputValue,$=P.value,ee;W?ee=U:ee=c.toPrecisionAsStep($),ee==null&&(ee="");var pe=c.formatWrapper(ee);return b(c.props.decimalSeparator)&&(pe=pe.toString().replace(".",c.props.decimalSeparator)),pe},c.recordCursorPosition=function(){try{c.cursorStart=c.input.selectionStart,c.cursorEnd=c.input.selectionEnd,c.currentValue=c.input.value,c.cursorBefore=c.input.value.substring(0,c.cursorStart),c.cursorAfter=c.input.value.substring(c.cursorEnd)}catch(B){}},c.restoreByAfter=function(B){if(B===void 0)return!1;var P=c.input.value,W=P.lastIndexOf(B);if(W===-1)return!1;var U=c.cursorBefore.length;return c.lastKeyCode===v.a.DELETE&&c.cursorBefore.charAt(U-1)===B[0]?(c.fixCaret(U,U),!0):W+B.length===P.length?(c.fixCaret(W,W),!0):!1},c.partRestoreByAfter=function(B){return B===void 0?!1:Array.prototype.some.call(B,function(P,W){var U=B.substring(W);return c.restoreByAfter(U)})},c.isNotCompleteNumber=function(B){return isNaN(B)||B===""||B===null||B&&B.toString().indexOf(".")===B.toString().length-1},c.stop=function(){c.autoStepTimer&&clearTimeout(c.autoStepTimer)},c.down=function(B,P,W){c.pressingUpOrDown=!0,c.step("down",B,P,W)},c.up=function(B,P,W){c.pressingUpOrDown=!0,c.step("up",B,P,W)},c.saveInput=function(B){c.input=B};var L=g.value;L===void 0&&(L=g.defaultValue),c.state={focused:g.autoFocus};var F=c.getValidValue(c.toNumber(L));return c.state=s(s({},c.state),{},{inputValue:c.toPrecisionAsStep(F),value:F}),c}return Object(j.a)(w,[{key:"componentDidMount",value:function(){this.componentDidUpdate(null)}},{key:"componentDidUpdate",value:function(c){var L=this.props,F=L.value,B=L.onChange,P=L.max,W=L.min,U=this.state.focused;if(c){if(!x(c.value,F)||!x(c.max,P)||!x(c.min,W)){var $=U?F:this.getValidValue(F),ee;this.pressingUpOrDown?ee=$:this.inputting?ee=this.rawInput:ee=this.toPrecisionAsStep($),this.setState({value:$,inputValue:ee})}var pe="value"in this.props?F:this.state.value;"max"in this.props&&c.max!==P&&typeof pe=="number"&&pe>P&&B&&B(P),"min"in this.props&&c.min!==W&&typeof pe=="number"&&pe<W&&B&&B(W)}try{if(this.cursorStart!==void 0&&this.state.focused){if(!this.partRestoreByAfter(this.cursorAfter)&&this.state.value!==this.props.value){var fe=this.cursorStart+1;this.cursorAfter?this.lastKeyCode===v.a.BACKSPACE?fe=this.cursorStart-1:this.lastKeyCode===v.a.DELETE&&(fe=this.cursorStart):fe=this.input.value.length,this.fixCaret(fe,fe)}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(Le){}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(c){var L=c;return L===""?L="":this.isNotCompleteNumber(parseFloat(L))?L=this.state.value:L=this.getValidValue(L),this.toNumber(L)}},{key:"getValueFromEvent",value:function(c){var L=c.target.value.trim().replace(/。/g,".");return b(this.props.decimalSeparator)&&(L=L.replace(this.props.decimalSeparator,".")),L}},{key:"getValidValue",value:function(c){var L=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.props.min,F=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.props.max,B=parseFloat(c);return isNaN(B)?c:(B<L&&(B=L),B>F&&(B=F),B)}},{key:"setValue",value:function(c,L){var F=this.props.precision,B=this.isNotCompleteNumber(parseFloat(c))?null:parseFloat(c),P=this.state.value,W=P===void 0?null:P,U=this.state.inputValue,$=U===void 0?null:U,ee=typeof B=="number"?B.toFixed(F):"".concat(B),pe=B!==W||ee!=="".concat($);return"value"in this.props?($=this.toPrecisionAsStep(this.state.value),this.setState({inputValue:$},L)):this.setState({value:B,inputValue:this.toPrecisionAsStep(c)},L),pe&&this.props.onChange(B),B}},{key:"getMaxPrecision",value:function(c){var L=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,F=this.props,B=F.precision,P=F.step;if(b(B))return B;var W=this.getPrecision(L),U=this.getPrecision(P),$=this.getPrecision(c);return c?Math.max($,W+U):W+U}},{key:"getPrecisionFactor",value:function(c){var L=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,F=this.getMaxPrecision(c,L);return Math.pow(10,F)}},{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(c){return this.props.formatter?this.props.formatter(c):c}},{key:"toPrecisionAsStep",value:function(c){if(this.isNotCompleteNumber(c)||c==="")return c;var L=Math.abs(this.getMaxPrecision(c));return isNaN(L)?c.toString():Number(c).toFixed(L)}},{key:"toNumber",value:function(c){var L=this.props.precision,F=this.state.focused,B=c&&c.length>16&&F;return this.isNotCompleteNumber(c)||B?c:b(L)?Math.round(c*Math.pow(10,L))/Math.pow(10,L):Number(c)}},{key:"upStep",value:function(c,L){var F=this.props.step,B=this.getPrecisionFactor(c,L),P=Math.abs(this.getMaxPrecision(c,L)),W=((B*c+B*F*L)/B).toFixed(P);return this.toNumber(W)}},{key:"downStep",value:function(c,L){var F=this.props.step,B=this.getPrecisionFactor(c,L),P=Math.abs(this.getMaxPrecision(c,L)),W=((B*c-B*F*L)/B).toFixed(P);return this.toNumber(W)}},{key:"step",value:function(c,L){var F=this,B=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,P=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 $=this["".concat(c,"Step")](U,B),ee=$>W.max||$<W.min;if($>W.max?$=W.max:$<W.min&&($=W.min),this.setValue($,null),this.setState({focused:!0},function(){F.pressingUpOrDown=!1}),ee)return;this.autoStepTimer=setTimeout(function(){F[c](L,B,!0)},P?t:_)}},{key:"fixCaret",value:function(c,L){if(c===void 0||L===void 0||!this.input||!this.input.value)return;try{var F=this.input.selectionStart,B=this.input.selectionEnd;(c!==F||L!==B)&&this.input.setSelectionRange(c,L)}catch(P){}}},{key:"render",value:function(){var c,L=this.props,F=L.prefixCls,B=L.disabled,P=L.readOnly,W=L.useTouch,U=L.autoComplete,$=L.upHandler,ee=L.downHandler,pe=L.className,fe=L.max,Le=L.min,Ie=L.style,xe=L.title,Ue=L.onMouseEnter,Fe=L.onMouseLeave,we=L.onMouseOver,ve=L.onMouseOut,ze=L.required,at=L.onClick,nt=L.tabIndex,et=L.type,Ke=L.placeholder,re=L.id,z=L.inputMode,Y=L.pattern,J=L.step,ie=L.maxLength,ue=L.autoFocus,he=L.name,He=L.onPaste,We=L.onInput,je=Object(oe.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"]),Ge=this.state,rt=Ge.value,st=Ge.focused,Te=f()(F,(c={},Object(G.a)(c,pe,!!pe),Object(G.a)(c,"".concat(F,"-disabled"),B),Object(G.a)(c,"".concat(F,"-focused"),st),c)),De={};Object.keys(je).forEach(function(de){(de.substr(0,5)==="data-"||de.substr(0,5)==="aria-"||de==="role")&&(De[de]=je[de])});var Ve=!P&&!B,$e=this.getInputDisplayValue(null),Ne=(rt||rt===0)&&(isNaN(rt)||Number(rt)>=fe),Pe=(rt||rt===0)&&(isNaN(rt)||Number(rt)<=Le),Ce=Ne||B||P,ce=Pe||B||P,ge=f()("".concat(F,"-handler"),"".concat(F,"-handler-up"),Object(G.a)({},"".concat(F,"-handler-up-disabled"),Ce)),te=f()("".concat(F,"-handler"),"".concat(F,"-handler-down"),Object(G.a)({},"".concat(F,"-handler-down-disabled"),ce)),ne=W?{onTouchStart:Ce?o:this.up,onTouchEnd:this.stop}:{onMouseDown:Ce?o:this.up,onMouseUp:this.stop,onMouseLeave:this.stop},le=W?{onTouchStart:ce?o:this.down,onTouchEnd:this.stop}:{onMouseDown:ce?o:this.down,onMouseUp:this.stop,onMouseLeave:this.stop};return e.a.createElement("div",{className:Te,style:Ie,title:xe,onMouseEnter:Ue,onMouseLeave:Fe,onMouseOver:we,onMouseOut:ve,onFocus:function(){return null},onBlur:function(){return null}},e.a.createElement("div",{className:"".concat(F,"-handler-wrap")},e.a.createElement("span",Object.assign({unselectable:"on"},ne,{role:"button","aria-label":"Increase Value","aria-disabled":Ce,className:ge}),$||e.a.createElement("span",{unselectable:"on",className:"".concat(F,"-handler-up-inner"),onClick:a})),e.a.createElement("span",Object.assign({unselectable:"on"},le,{role:"button","aria-label":"Decrease Value","aria-disabled":ce,className:te}),ee||e.a.createElement("span",{unselectable:"on",className:"".concat(F,"-handler-down-inner"),onClick:a}))),e.a.createElement("div",{className:"".concat(F,"-input-wrap")},e.a.createElement("input",Object.assign({role:"spinbutton","aria-valuemin":Le,"aria-valuemax":fe,"aria-valuenow":rt,required:ze,type:et,placeholder:Ke,onPaste:He,onClick:at,onMouseUp:this.onMouseUp,className:"".concat(F,"-input"),tabIndex:nt,autoComplete:U,onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:Ve?this.onKeyDown:o,onKeyUp:Ve?this.onKeyUp:o,autoFocus:ue,maxLength:ie,readOnly:P,disabled:B,max:fe,min:Le,step:J,name:he,title:xe,id:re,onChange:this.onChange,ref:this.saveInput,value:this.getFullNum($e),pattern:Y,inputMode:z,onInput:We},De))))}}]),w}(e.a.Component);E.defaultProps={focusOnUpDown:!0,useTouch:!1,prefixCls:"rc-input-number",max:y,min:-y,step:1,style:{},onChange:o,onKeyDown:o,onPressEnter:o,onFocus:o,onBlur:o,parser:r,required:!1,autoComplete:"off"};var d=E,n=_e.a=d},fjLI:function(ct,_e,K){"use strict";K.d(_e,"f",function(){return u}),K.d(_e,"b",function(){return s}),K.d(_e,"a",function(){return i}),K.d(_e,"d",function(){return A}),K.d(_e,"e",function(){return o}),K.d(_e,"c",function(){return a});var oe=K("8HAY"),G=K("Vhoy"),D=K("MI8n"),j=K("JYp7"),N=K("pmY6"),O=K("24hK"),X=K("nnTU"),M=K("T8No"),e=K("Cg/j"),R=K("t9D7"),f=function(r,t,_,y){var b=arguments.length,x=b<3?t:y===null?y=Object.getOwnPropertyDescriptor(t,_):y,E;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")x=Reflect.decorate(r,t,_,y);else for(var d=r.length-1;d>=0;d--)(E=r[d])&&(x=(b<3?E(x):b>3?E(t,_,x):E(t,_))||x);return b>3&&x&&Object.defineProperty(t,_,x),x},v=function(r,t){return function(_,y){t(_,y,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 i=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(j.a.single(r))}addCommands(r){for(const t of r)this._commands.set(t.id,t);return this._onDidChangeMenu.fire(this._commandPaletteChangeEvent),Object(N.i)(()=>{let t=!1;for(const _ of r)t=this._commands.delete(_.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,_)=>r.set(_,t)),r}appendMenuItem(r,t){return this.appendMenuItems(j.a.single({id:r,item:t}))}appendMenuItems(r){const t=new Set,_=new O.a;for(const{id:y,item:b}of r){let x=this._menuItems.get(y);x||(x=new O.a,this._menuItems.set(y,x)),_.push(x.push(b)),t.add(y)}return this._onDidChangeMenu.fire(t),Object(N.i)(()=>{if(_.size>0){for(let y of _)y();this._onDidChangeMenu.fire(t),_.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 _ of r)u(_)&&(t.add(_.command.id),_.alt&&t.add(_.alt.id));this._commands.forEach((_,y)=>{t.has(y)||r.push({command:_})})}};class o extends oe.e{constructor(r,t,_,y){super(`submenuitem.${r.submenu.id}`,typeof r.title=="string"?r.title:r.title.value,[],"submenu");this.item=r,this._menuService=t,this._contextKeyService=_,this._options=y}get actions(){const r=[],t=this._menuService.createMenu(this.item.submenu,this._contextKeyService),_=t.getActions(this._options);t.dispose();for(const[,y]of _)y.length>0&&(r.push(...y),r.push(new oe.d));return r.length&&r.pop(),r}}let a=class r{constructor(t,_,y,b,x){var E,d;if(this._commandService=x,this.id=t.id,this.label=(y==null?void 0:y.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:(E=t.tooltip)===null||E===void 0?void 0:E.value)!==null&&d!==void 0?d:"",this.enabled=!t.precondition||b.contextMatchesRules(t.precondition),this.checked=void 0,t.toggled){const n=t.toggled.condition?t.toggled:{condition:t.toggled};this.checked=b.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=_?new r(_,void 0,y,b,x):void 0,this._options=y,R.d.isThemeIcon(t.icon)&&(this.class=G.a.asClassName(t.icon))}dispose(){}run(...t){var _,y;let b=[];return((_=this._options)===null||_===void 0?void 0:_.arg)&&(b=[...b,this._options.arg]),((y=this._options)===null||y===void 0?void 0:y.shouldForwardArgs)&&(b=[...b,...t]),this._commandService.executeCommand(this.id,...b)}};a=f([v(3,M.b),v(4,X.b)],a)},fyJ8:function(ct,_e,K){"use strict";var oe=K("rePB"),G=K("VTBJ"),D=K("Ff2n"),j=K("U8pU"),N=K("q1tI"),O=K.n(N),X=K("TSYQ"),M=K.n(X),e=K("c+Xe"),R=K("sR1s");function f(A){return A&&Object(j.a)(A)==="object"&&!Array.isArray(A)&&!N.isValidElement(A)}function v(A){return typeof A=="string"?!0:Object(e.c)(A)}function u(A,o){var a,r=A.prefixCls,t=A.className,_=A.record,y=A.index,b=A.dataIndex,x=A.render,E=A.children,d=A.component,n=d===void 0?"td":d,l=A.colSpan,h=A.rowSpan,w=A.fixLeft,g=A.fixRight,c=A.firstFixLeft,L=A.lastFixLeft,F=A.firstFixRight,B=A.lastFixRight,P=A.appendNode,W=A.additionalProps,U=W===void 0?{}:W,$=A.ellipsis,ee=A.align,pe=A.rowType,fe=A.isSticky,Le="".concat(r,"-cell"),Ie,xe;if(E)xe=E;else{var Ue=Object(R.b)(_,b);if(xe=Ue,x){var Fe=x(Ue,_,y);f(Fe)?(xe=Fe.children,Ie=Fe.props):xe=Fe}}Object(j.a)(xe)==="object"&&!Array.isArray(xe)&&!N.isValidElement(xe)&&(xe=null),$&&(L||F)&&(xe=N.createElement("span",{className:"".concat(Le,"-content")},xe));var we=Ie||{},ve=we.colSpan,ze=we.rowSpan,at=we.style,nt=we.className,et=Object(D.a)(we,["colSpan","rowSpan","style","className"]),Ke=ve!==void 0?ve:l,re=ze!==void 0?ze:h;if(Ke===0||re===0)return null;var z={},Y=typeof w=="number",J=typeof g=="number";Y&&(z.position="sticky",z.left=w),J&&(z.position="sticky",z.right=g);var ie={};ee&&(ie.textAlign=ee);var ue,he=$===!0?{showTitle:!0}:$;he&&(he.showTitle||pe==="header")&&(typeof xe=="string"||typeof xe=="number"?ue=xe.toString():N.isValidElement(xe)&&typeof xe.props.children=="string"&&(ue=xe.props.children));var He=Object(G.a)(Object(G.a)(Object(G.a)({title:ue},et),U),{},{colSpan:Ke&&Ke!==1?Ke:null,rowSpan:re&&re!==1?re:null,className:M()(Le,t,(a={},Object(oe.a)(a,"".concat(Le,"-fix-left"),Y),Object(oe.a)(a,"".concat(Le,"-fix-left-first"),c),Object(oe.a)(a,"".concat(Le,"-fix-left-last"),L),Object(oe.a)(a,"".concat(Le,"-fix-right"),J),Object(oe.a)(a,"".concat(Le,"-fix-right-first"),F),Object(oe.a)(a,"".concat(Le,"-fix-right-last"),B),Object(oe.a)(a,"".concat(Le,"-ellipsis"),$),Object(oe.a)(a,"".concat(Le,"-with-append"),P),Object(oe.a)(a,"".concat(Le,"-fix-sticky"),(Y||J)&&fe),a),U.className,nt),style:Object(G.a)(Object(G.a)(Object(G.a)(Object(G.a)({},U.style),ie),z),at),ref:v(n)?o:null});return N.createElement(n,Object.assign({},He),P,xe)}var s=N.forwardRef(u);s.displayName="Cell";var i=N.memo(s,function(A,o){return o.shouldCellUpdate?!o.shouldCellUpdate(o.record,A.record):!1});_e.a=i},hW8S:function(ct,_e,K){"use strict";K.d(_e,"a",function(){return j}),K.d(_e,"c",function(){return N}),K.d(_e,"b",function(){return O});var oe=K("VTBJ"),G=K("Ff2n"),D=K("Kwbf"),j="RC_TABLE_INTERNAL_COL_DEFINE";function N(X){var M=X.expandable,e=Object(G.a)(X,["expandable"]);return"expandable"in X?Object(oe.a)(Object(oe.a)({},e),M):e}function O(X){return Object.keys(X).reduce(function(M,e){return(e.substr(0,5)==="data-"||e.substr(0,5)==="aria-")&&(M[e]=X[e]),M},{})}},ic2d:function(ct,_e,K){"use strict";K.d(_e,"a",function(){return j});var oe=K("FWmy"),G=K("746U");class D{constructor(){this.data=new Map}add(N,O){oe.a(G.l(N)),oe.a(G.k(O)),oe.a(!this.data.has(N),"There is already an extension with this id"),this.data.set(N,O)}as(N){return this.data.get(N)||null}}const j=new D},"kVK+":function(ct,_e){/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */_e.read=function(K,oe,G,D,j){var N,O,X=j*8-D-1,M=(1<<X)-1,e=M>>1,R=-7,f=G?j-1:0,v=G?-1:1,u=K[oe+f];for(f+=v,N=u&(1<<-R)-1,u>>=-R,R+=X;R>0;N=N*256+K[oe+f],f+=v,R-=8);for(O=N&(1<<-R)-1,N>>=-R,R+=D;R>0;O=O*256+K[oe+f],f+=v,R-=8);if(N===0)N=1-e;else{if(N===M)return O?NaN:(u?-1:1)*Infinity;O=O+Math.pow(2,D),N=N-e}return(u?-1:1)*O*Math.pow(2,N-D)},_e.write=function(K,oe,G,D,j,N){var O,X,M,e=N*8-j-1,R=(1<<e)-1,f=R>>1,v=j===23?Math.pow(2,-24)-Math.pow(2,-77):0,u=D?0:N-1,s=D?1:-1,i=oe<0||oe===0&&1/oe<0?1:0;for(oe=Math.abs(oe),isNaN(oe)||oe===Infinity?(X=isNaN(oe)?1:0,O=R):(O=Math.floor(Math.log(oe)/Math.LN2),oe*(M=Math.pow(2,-O))<1&&(O--,M*=2),O+f>=1?oe+=v/M:oe+=v*Math.pow(2,1-f),oe*M>=2&&(O++,M/=2),O+f>=R?(X=0,O=R):O+f>=1?(X=(oe*M-1)*Math.pow(2,j),O=O+f):(X=oe*Math.pow(2,f-1)*Math.pow(2,j),O=0));j>=8;K[G+u]=X&255,u+=s,X/=256,j-=8);for(O=O<<j|X,e+=j;e>0;K[G+u]=O&255,u+=s,O/=256,e-=8);K[G+u-s]|=i*128}},n6Qo:function(ct,_e,K){"use strict";K.d(_e,"a",function(){return M});var oe=K("q1tI"),G=K("biw7"),D=K("fyJ8");function j(e){var R=e.className,f=e.index,v=e.children,u=e.colSpan,s=e.rowSpan,i=oe.useContext(G.a),A=i.prefixCls,o=i.fixedInfoList,a=o[f];return oe.createElement(D.a,Object.assign({className:R,index:f,component:"td",prefixCls:A,record:null,dataIndex:null,render:function(){return{children:v,props:{colSpan:u,rowSpan:s}}}},a))}function N(e){return oe.createElement("tr",Object.assign({},e))}function O(e){var R=e.children,f=oe.useContext(G.a),v=f.prefixCls;return oe.createElement("tfoot",{className:"".concat(v,"-summary")},R)}var X=_e.b=O,M={Cell:j,Row:N}},nEHx:function(ct,_e,K){"use strict";K.d(_e,"a",function(){return oe});var oe;(function(G){G.DARK="dark",G.LIGHT="light",G.HIGH_CONTRAST="hc"})(oe||(oe={}))},nnTU:function(ct,_e,K){"use strict";K.d(_e,"b",function(){return X}),K.d(_e,"a",function(){return M});var oe=K("MI8n"),G=K("JYp7"),D=K("pmY6"),j=K("24hK"),N=K("746U"),O=K("Cg/j");const X=Object(O.c)("commandService"),M=new class{constructor(){this._commands=new Map,this._onDidRegisterCommand=new oe.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 i=[];for(let o of e.description.args)i.push(o.constraint);const A=e.handler;e.handler=function(o,...a){return Object(N.o)(a,i),A(o,...a)}}const{id:f}=e;let v=this._commands.get(f);v||(v=new j.a,this._commands.set(f,v));let u=v.unshift(e),s=Object(D.i)(()=>{u();const i=this._commands.get(f);(i==null?void 0:i.isEmpty())&&this._commands.delete(f)});return this._onDidRegisterCommand.fire(f),s}registerCommandAlias(e,R){return M.registerCommand(e,(f,...v)=>f.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 f=this.getCommand(R);f&&e.set(R,f)}return e}};M.registerCommand("noop",()=>{})},p5ED:function(ct,_e,K){"use strict";var oe=K("+L6B"),G=K("2/Rp"),D=K("5Dmo"),j=K("3S7+"),N=K("k1fw"),O=K("9og8"),X=K("tJVT"),M=K("WmNS"),e=K.n(M),R=K("q1tI"),f=K.n(R),v=K("vHTk"),u=K.n(v),s=K("yEEn"),i=K("ZW9T"),A=K("1vsH"),o=K("V0Rq"),a=K("m3rI");_e.a=function(r){var t,_,y,b,x,E,d,n=r.editOffice,l=n===void 0?"view":n,h=r.data,w=r.theme,g=r.type,c=r.filename,L=r.monacoEditor,F=r.className,B=r.style,P=r.close,W=r.onClose,U=r.hasMask,$=r.disabledDownload,ee=Object(R.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),pe=Object(X.a)(ee,2),fe=pe[0],Le=pe[1],Ie=Object(R.useState)(""),xe=Object(X.a)(Ie,2),Ue=xe[0],Fe=xe[1],we=Object(R.useState)(),ve=Object(X.a)(we,2),ze=ve[0],at=ve[1],nt=window.ENV==="build"?"/react/build":"",et=a.a.PROXY_SERVER||location.origin,Ke,re=1024*1024,z=10*re,Y=Object(R.useRef)();(t=h)!==null&&t!==void 0&&t.startsWith("/api")&&g!=="txt"&&(h=a.a.API_SERVER+h),g==="office"&&(Ke=Object(A.T)(h).filesize,Ke>z&&(g="other")),c&&L&&(L.filename=c),Object(R.useEffect)(function(){var he,He,We=(he=document.cookie)===null||he===void 0||((He=he.replace(/\s/g,""))===null||He===void 0)?void 0:He.split(";");We==null||We.map(function(je){var Ge=je.split("=");Ge[0]==="_educoder_session"&&Fe(Ge[1])})},[]),Object(R.useEffect)(function(){g==="office"&&J()},[g,h]);var J=function(){var he=Object(O.a)(e.a.mark(function He(){var We,je,Ge;return e.a.wrap(function(st){for(;;)switch(st.prev=st.next){case 0:return console.log("data:",h),We=h,h.startsWith("http")||(We=location.origin+We),je=new URL(We).pathname.split("/").pop(),st.next=6,Object(o.V)({attachment_id:je});case 6:Ge=st.sent,at(Ge);case 8:case"end":return st.stop()}},He)}));return function(){return he.apply(this,arguments)}}(),ie=function(){if(h.startsWith("http")||h.startsWith("blob:")){ue();return}Object(A.z)(c||"educoder",h,c)},ue=function(){Object(A.x)(c||"educoder",decodeURIComponent(h))};return f.a.createElement("div",{style:Object(N.a)({},B||{}),className:"".concat(U&&u.a.bgBlack," ").concat(g?u.a.wrp:"hide")},P&&f.a.createElement("div",{className:u.a.close,ref:Y},!$&&f.a.createElement(j.a,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:function(){return Y.current}},f.a.createElement("span",{onClick:ue},f.a.createElement("i",{className:"icon-quxiaozhiding"}))),f.a.createElement(j.a,{title:"\u5173\u95ED",getPopupContainer:function(){return Y.current}},f.a.createElement("span",{className:"",onClick:W},f.a.createElement("i",{className:"icon-guanbi1"})))),f.a.createElement("div",{className:"".concat(u.a[F]," ").concat(F," ").concat(u.a.monaco," ").concat(g==="txt"?"show":"hide")},g==="txt"&&f.a.createElement(i.b,L)),g==="audio"&&f.a.createElement("audio",{src:"".concat(((_=h)===null||_===void 0?void 0:_.indexOf("http://"))>-1||((y=h)===null||y===void 0?void 0:y.indexOf("https://"))>-1?"":"data:audio/mp3;base64,").concat(h),autoPlay:!0}),g==="video"&&f.a.createElement(f.a.Fragment,null,((b=h)===null||b===void 0?void 0:b.indexOf("http"))>-1?f.a.createElement("video",{controls:!0,src:"".concat(h),autoPlay:!0}):f.a.createElement("video",{controls:!0,src:"data:video/mp4;base64,".concat(h),autoPlay:!0})),g==="office"&&ze&&f.a.createElement("iframe",{src:"".concat(nt,"/office.html?key=").concat(ze.key,"&url=").concat(et+ze.url,"&callbackUrl=").concat(et+ze.callbackUrl,"&fileType=").concat(ze.fileType,"&title=").concat(ze.title,"&model=").concat(l,"&officeServer=").concat(a.a.OFFICE_SERVER,"&disabledDownload=").concat(!!$)}),g==="html"&&f.a.createElement("iframe",{src:h+"&disposition=inline"}),g==="pdf"&&f.a.createElement("iframe",{src:"".concat(nt,"/js/pdfview/index.html?url=").concat(h,"&disabledDownload=").concat(!!$)}),g==="image"&&f.a.createElement("img",{src:"".concat(((x=h)===null||x===void 0?void 0:x.indexOf("http://"))>-1||((E=h)===null||E===void 0?void 0:E.indexOf("https://"))>-1||(d=h)!==null&&d!==void 0&&d.startsWith("/api")?"":"data:image/png;base64,").concat(h)}),g==="other"&&f.a.createElement("div",null,f.a.createElement(G.a,{type:"primary",size:"large",onClick:ie},f.a.createElement(s.a,null),"\u70B9\u51FB\u4E0B\u8F7D")),g==="download"&&f.a.createElement(G.a,{type:"primary",size:"large",onClick:ie},f.a.createElement(s.a,null),"\u70B9\u51FB\u4E0B\u8F7D"))}},pmY6:function(ct,_e,K){"use strict";K.d(_e,"h",function(){return R}),K.d(_e,"g",function(){return v}),K.d(_e,"f",function(){return u}),K.d(_e,"e",function(){return s}),K.d(_e,"i",function(){return i}),K.d(_e,"b",function(){return A}),K.d(_e,"a",function(){return o}),K.d(_e,"d",function(){return a}),K.d(_e,"c",function(){return r});var oe=K("C/vA"),G=K("JYp7");const D=!1;let j=null;function N(t){j=t}if(D){const t="__is_disposable_tracked__";N(new class{trackDisposable(_){const y=new Error("Potentially leaked disposable").stack;setTimeout(()=>{_[t]||console.log(y)},3e3)}setParent(_,y){if(_&&_!==o.None)try{_[t]=!0}catch(b){}}markAsDisposed(_){if(_&&_!==o.None)try{_[t]=!0}catch(y){}}markAsSingleton(_){}})}function O(t){return j==null||j.trackDisposable(t),t}function X(t){j==null||j.markAsDisposed(t)}function M(t,_){j==null||j.setParent(t,_)}function e(t,_){if(!j)return;for(const y of t)j.setParent(y,_)}function R(t){return j==null||j.markAsSingleton(t),t}class f 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 _=[];for(const y of t)if(y)try{y.dispose()}catch(b){_.push(b)}if(_.length===1)throw _[0];if(_.length>1)throw new f(_);return Array.isArray(t)?[]:t}else if(t)return t.dispose(),t}function s(...t){const _=i(()=>u(t));return e(t,_),_}function i(t){const _=O({dispose:Object(oe.a)(()=>{X(_),t()})});return _}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 M(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),M(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 a{constructor(){this._isDisposed=!1,O(this)}get value(){return this._isDisposed?void 0:this._value}set value(t){var _;if(this._isDisposed||t===this._value)return;(_=this._value)===null||_===void 0||_.dispose(),t&&M(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&&M(t,null),t}}class r{constructor(t){this.object=t}dispose(){}}},psGv:function(ct,_e,K){var oe,G;(function(){var D;(function(){"use strict";var X=[,,function(f){function v(i){this.__parent=i,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 i=new v(this.__parent);return i.set_indent(this.__indent_count,this.__alignment_count),i},v.prototype.item=function(i){return i<0?this.__items[this.__items.length+i]:this.__items[i]},v.prototype.has_match=function(i){for(var A=this.__items.length-1;A>=0;A--)if(this.__items[A].match(i))return!0;return!1},v.prototype.set_indent=function(i,A){this.is_empty()&&(this.__indent_count=i||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 i=this.__parent.current_line;return i.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),i.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),i.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,i.__items[0]===" "&&(i.__items.splice(0,1),i.__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(i){this.__items.push(i);var A=i.lastIndexOf(`
|
|
`);A!==-1?this.__character_count=i.length-A:this.__character_count+=i.length},v.prototype.pop=function(){var i=null;return this.is_empty()||(i=this.__items.pop(),this.__character_count-=i.length),i},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 i="";return this.is_empty()?this.__parent.indent_empty_lines&&(i=this.__parent.get_indent_string(this.__indent_count)):(i=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),i+=this.__items.join("")),i};function u(i,A){this.__cache=[""],this.__indent_size=i.indent_size,this.__indent_string=i.indent_char,i.indent_with_tabs||(this.__indent_string=new Array(i.indent_size+1).join(i.indent_char)),A=A||"",i.indent_level>0&&(A=new Array(i.indent_level+1).join(this.__indent_string)),this.__base_string=A,this.__base_string_length=A.length}u.prototype.get_indent_size=function(i,A){var o=this.__base_string_length;return A=A||0,i<0&&(o=0),o+=i*this.__indent_size,o+=A,o},u.prototype.get_indent_string=function(i,A){var o=this.__base_string;return A=A||0,i<0&&(i=0,o=""),A+=i*this.__indent_size,this.__ensure_cache(A),o+=this.__cache[A],o},u.prototype.__ensure_cache=function(i){for(;i>=this.__cache.length;)this.__add_column()},u.prototype.__add_column=function(){var i=this.__cache.length,A=0,o="";this.__indent_size&&i>=this.__indent_size&&(A=Math.floor(i/this.__indent_size),i-=A*this.__indent_size,o=new Array(A+1).join(this.__indent_string)),i&&(o+=new Array(i+1).join(" ")),this.__cache.push(o)};function s(i,A){this.__indent_cache=new u(i,A),this.raw=!1,this._end_with_newline=i.end_with_newline,this.indent_size=i.indent_size,this.wrap_line_length=i.wrap_line_length,this.indent_empty_lines=i.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(i,A){return this.__indent_cache.get_indent_string(i,A)},s.prototype.get_indent_size=function(i,A){return this.__indent_cache.get_indent_size(i,A)},s.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},s.prototype.add_new_line=function(i){return this.is_empty()||!i&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},s.prototype.get_code=function(i){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 i!==`
|
|
`&&(o=o.replace(/[\n]/g,i)),o},s.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},s.prototype.set_indent=function(i,A){return i=i||0,A=A||0,this.next_line.set_indent(i,A),this.__lines.length>1?(this.current_line.set_indent(i,A),!0):(this.current_line.set_indent(),!1)},s.prototype.add_raw_token=function(i){for(var A=0;A<i.newlines;A++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(i.whitespace_before),this.current_line.push(i.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},s.prototype.add_token=function(i){this.__add_space_before_token(),this.current_line.push(i),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(i){for(var A=this.__lines.length;i<A;)this.__lines[i]._remove_indent(),i++;this.current_line._remove_wrap_indent()},s.prototype.trim=function(i){for(i=i===void 0?!1:i,this.current_line.trim();i&&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(i,A){for(var o=this.__lines.length-2;o>=0;){var a=this.__lines[o];if(a.is_empty())break;if(a.item(0).indexOf(i)!==0&&a.item(-1)!==A){this.__lines.splice(o+1,0,new v(this)),this.previous_line=this.__lines[this.__lines.length-2];break}o--}},f.exports.Output=s},function(f){function v(u,s,i,A){this.type=u,this.text=s,this.comments_before=null,this.newlines=i||0,this.whitespace_before=A||"",this.parent=null,this.next=null,this.previous=null,this.opened=null,this.closed=null,this.directives=null}f.exports.Token=v},,,function(f){function v(i,A){this.raw_options=u(i,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(i,A){var o=this.raw_options[i],a=A||[];return typeof o=="object"?o!==null&&typeof o.concat=="function"&&(a=o.concat()):typeof o=="string"&&(a=o.split(/[^a-zA-Z0-9_\/\-]+/)),a},v.prototype._get_boolean=function(i,A){var o=this.raw_options[i],a=o===void 0?!!A:!!o;return a},v.prototype._get_characters=function(i,A){var o=this.raw_options[i],a=A||"";return typeof o=="string"&&(a=o.replace(/\\r/,"\r").replace(/\\n/,`
|
|
`).replace(/\\t/," ")),a},v.prototype._get_number=function(i,A){var o=this.raw_options[i];A=parseInt(A,10),isNaN(A)&&(A=0);var a=parseInt(o,10);return isNaN(a)&&(a=A),a},v.prototype._get_selection=function(i,A,o){var a=this._get_selection_list(i,A,o);if(a.length!==1)throw new Error("Invalid Option Value: The option '"+i+`' can only be one of the following values:
|
|
`+A+`
|
|
You passed in: '`+this.raw_options[i]+"'");return a[0]},v.prototype._get_selection_list=function(i,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 a=this._get_array(i,o);if(!this._is_valid_selection(a,A))throw new Error("Invalid Option Value: The option '"+i+`' can contain only the following values:
|
|
`+A+`
|
|
You passed in: '`+this.raw_options[i]+"'");return a},v.prototype._is_valid_selection=function(i,A){return i.length&&A.length&&!i.some(function(o){return A.indexOf(o)===-1})};function u(i,A){var o={};i=s(i);var a;for(a in i)a!==A&&(o[a]=i[a]);if(A&&i[A])for(a in i[A])o[a]=i[A][a];return o}function s(i){var A={},o;for(o in i){var a=o.replace(/-/g,"_");A[a]=i[o]}return A}f.exports.Options=v,f.exports.normalizeOpts=s,f.exports.mergeOpts=u},,function(f){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 i=null;return s=s||0,s+=this.__position,s>=0&&s<this.__input_length&&(i=this.__input.charAt(s)),i},u.prototype.__match=function(s,i){s.lastIndex=i;var A=s.exec(this.__input);return A&&!(v&&s.sticky)&&(A.index!==i&&(A=null)),A},u.prototype.test=function(s,i){return i=i||0,i+=this.__position,i>=0&&i<this.__input_length?!!this.__match(s,i):!1},u.prototype.testChar=function(s,i){var A=this.peek(i);return s.lastIndex=0,A!==null&&s.test(A)},u.prototype.match=function(s){var i=this.__match(s,this.__position);return i?this.__position+=i[0].length:i=null,i},u.prototype.read=function(s,i,A){var o="",a;return s&&(a=this.match(s),a&&(o+=a[0])),i&&(a||!s)&&(o+=this.readUntil(i,A)),o},u.prototype.readUntil=function(s,i){var A="",o=this.__position;s.lastIndex=this.__position;var a=s.exec(this.__input);return a?(o=a.index,i&&(o+=a[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,i){var A=null,o="g";return i&&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 i=this.__position,A=this.readUntilAfter(s);return this.__position=i,A},u.prototype.lookBack=function(s){var i=this.__position-1;return i>=s.length&&this.__input.substring(i-s.length,i).toLowerCase()===s},f.exports.InputScanner=u},function(f,v,u){var s=u(8).InputScanner,i=u(3).Token,A=u(10).TokenStream,o=u(11).WhitespacePattern,a={START:"TK_START",RAW:"TK_RAW",EOF:"TK_EOF"},r=function(t,_){this._input=new s(t),this._options=_||{},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,_=new i(a.START,""),y=null,b=[],x=new A;_.type!==a.EOF;){for(t=this._get_next_token(_,y);this._is_comment(t);)x.add(t),t=this._get_next_token(_,y);x.isEmpty()||(t.comments_before=x,x=new A),t.parent=y,this._is_opening(t)?(b.push(y),y=t):y&&this._is_closing(t,y)&&(t.opened=y,y.closed=t,y=b.pop(),t.parent=y),t.previous=_,_.next=t,this.__tokens.add(t),_=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,_){this._readWhitespace();var y=this._input.read(/.+/g);return y?this._create_token(a.RAW,y):this._create_token(a.EOF,"")},r.prototype._is_comment=function(t){return!1},r.prototype._is_opening=function(t){return!1},r.prototype._is_closing=function(t,_){return!1},r.prototype._create_token=function(t,_){var y=new i(t,_,this._patterns.whitespace.newline_count,this._patterns.whitespace.whitespace_before_token);return y},r.prototype._readWhitespace=function(){return this._patterns.whitespace.read()},f.exports.Tokenizer=r,f.exports.TOKEN=a},function(f){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},f.exports.TokenStream=v},function(f,v,u){var s=u(12).Pattern;function i(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=""}i.prototype=new s,i.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+"]")},i.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},i.prototype.matching=function(A,o){var a=this._create();return a.__set_whitespace_patterns(A,o),a._update(),a},i.prototype._create=function(){return new i(this._input,this)},i.prototype.__split=function(A,o){A.lastIndex=0;for(var a=0,r=[],t=A.exec(o);t;)r.push(o.substring(a,t.index)),a=t.index+t[0].length,t=A.exec(o);return a<o.length?r.push(o.substring(a,o.length)):r.push(""),r},f.exports.WhitespacePattern=i},function(f){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(){},f.exports.Pattern=v},function(f){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 i=this.__directive_pattern.exec(u);i;)s[i[1]]=i[2],i=this.__directive_pattern.exec(u);return s},v.prototype.readIgnored=function(u){return u.readUntilAfter(this.__directives_end_ignore_pattern)},f.exports.Directives=v},function(f,v,u){var s=u(12).Pattern,i={django:!1,erb:!1,handlebars:!1,php:!1,smarty:!1};function A(o,a){s.call(this,o,a),this.__template_pattern=null,this._disabled=Object.assign({},i),this._excluded=Object.assign({},i),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 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 a=this._create();return a._disabled[o]=!0,a._update(),a},A.prototype.read_options=function(o){var a=this._create();for(var r in i)a._disabled[r]=o.templating.indexOf(r)===-1;return a._update(),a},A.prototype.exclude=function(o){var a=this._create();return a._excluded[o]=!0,a._update(),a},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 a=this._read_template();a;)this._match_pattern?a+=this._input.read(this._match_pattern):a+=this._input.readUntil(this.__template_pattern),o+=a,a=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="",a=this._input.peek();if(a==="<"){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 a==="{"&&(!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},f.exports.TemplatablePattern=A},,,,function(f,v,u){var s=u(19).Beautifier,i=u(20).Options;function A(o,a,r,t){var _=new s(o,a,r,t);return _.beautify()}f.exports=A,f.exports.defaultOptions=function(){return new i}},function(f,v,u){var s=u(20).Options,i=u(2).Output,A=u(21).Tokenizer,o=u(21).TOKEN,a=/\r\n|[\r\n]/,r=/\r\n|[\r\n]/g,t=function(w,g){this.indent_level=0,this.alignment_size=0,this.max_preserve_newlines=w.max_preserve_newlines,this.preserve_newlines=w.preserve_newlines,this._output=new i(w,g)};t.prototype.current_line_has_match=function(w){return this._output.current_line.has_match(w)},t.prototype.set_space_before_token=function(w,g){this._output.space_before_token=w,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(w){this._output.add_raw_token(w)},t.prototype.print_preserved_newlines=function(w){var g=0;w.type!==o.TEXT&&w.previous.type!==o.TEXT&&(g=w.newlines?1:0),this.preserve_newlines&&(g=w.newlines<this.max_preserve_newlines+1?w.newlines:this.max_preserve_newlines+1);for(var c=0;c<g;c++)this.print_newline(c>0);return g!==0},t.prototype.traverse_whitespace=function(w){return w.whitespace_before||w.newlines?(this.print_preserved_newlines(w)||(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(w){this._output.add_new_line(w)},t.prototype.print_token=function(w){w.text&&(this._output.set_indent(this.indent_level,this.alignment_size),this._output.add_token(w.text))},t.prototype.indent=function(){this.indent_level++},t.prototype.get_full_indent=function(w){return w=this.indent_level+(w||0),w<1?"":this._output.get_indent_string(w)};var _=function(w){for(var g=null,c=w.next;c.type!==o.EOF&&w.closed!==c;){if(c.type===o.ATTRIBUTE&&c.text==="type"){c.next&&c.next.type===o.EQUALS&&c.next.next&&c.next.next.type===o.VALUE&&(g=c.next.next.text);break}c=c.next}return g},y=function(w,g){var c=null,L=null;return g.closed?(w==="script"?c="text/javascript":w==="style"&&(c="text/css"),c=_(g)||c,c.search("text/css")>-1?L="css":c.search(/module|((text|application|dojo)\/(x-)?(javascript|ecmascript|jscript|livescript|(ld\+)?json|method|aspect))/)>-1?L="javascript":c.search(/(text|application|dojo)\/(x-)?(html)/)>-1?L="html":c.search(/test\/null/)>-1&&(L="null"),L):null};function b(w,g){return g.indexOf(w)!==-1}function x(w,g,c){this.parent=w||null,this.tag=g?g.tag_name:"",this.indent_level=c||0,this.parser_token=g||null}function E(w){this._printer=w,this._current_frame=null}E.prototype.get_parser_token=function(){return this._current_frame?this._current_frame.parser_token:null},E.prototype.record_tag=function(w){var g=new x(this._current_frame,w,this._printer.indent_level);this._current_frame=g},E.prototype._try_pop_frame=function(w){var g=null;return w&&(g=w.parser_token,this._printer.indent_level=w.indent_level,this._current_frame=w.parent),g},E.prototype._get_frame=function(w,g){for(var c=this._current_frame;c&&!(w.indexOf(c.tag)!==-1);){if(g&&g.indexOf(c.tag)!==-1){c=null;break}c=c.parent}return c},E.prototype.try_pop=function(w,g){var c=this._get_frame([w],g);return this._try_pop_frame(c)},E.prototype.indent_to_tag=function(w){var g=this._get_frame(w);g&&(this._printer.indent_level=g.indent_level)};function d(w,g,c,L){this._source_text=w||"",g=g||{},this._js_beautify=c,this._css_beautify=L,this._tag_stack=null;var F=new s(g,"html");this._options=F,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 w=this._source_text,g=this._options.eol;this._options.eol==="auto"&&(g=`
|
|
`,w&&a.test(w)&&(g=w.match(a)[0])),w=w.replace(r,`
|
|
`);var c=w.match(/^[\t ]*/)[0],L={text:"",type:""},F=new n,B=new t(this._options,c),P=new A(w,this._options).tokenize();this._tag_stack=new E(B);for(var W=null,U=P.next();U.type!==o.EOF;)U.type===o.TAG_OPEN||U.type===o.COMMENT?(W=this._handle_tag_open(B,U,F,L),F=W):U.type===o.ATTRIBUTE||U.type===o.EQUALS||U.type===o.VALUE||U.type===o.TEXT&&!F.tag_complete?W=this._handle_inside_tag(B,U,F,P):U.type===o.TAG_CLOSE?W=this._handle_tag_close(B,U,F):U.type===o.TEXT?W=this._handle_text(B,U,F):B.add_raw_token(U),L=W,U=P.next();var $=B._output.get_code(g);return $},d.prototype._handle_tag_close=function(w,g,c){var L={text:g.text,type:g.type};return w.alignment_size=0,c.tag_complete=!0,w.set_space_before_token(g.newlines||g.whitespace_before!=="",!0),c.is_unformatted?w.add_raw_token(g):(c.tag_start_char==="<"&&(w.set_space_before_token(g.text[0]==="/",!0),this._is_wrap_attributes_force_expand_multiline&&c.has_wrapped_attrs&&w.print_newline(!1)),w.print_token(g)),c.indent_content&&!(c.is_unformatted||c.is_content_unformatted)&&(w.indent(),c.indent_content=!1),!c.is_inline_element&&!(c.is_unformatted||c.is_content_unformatted)&&w.set_wrap_point(),L},d.prototype._handle_inside_tag=function(w,g,c,L){var F=c.has_wrapped_attrs,B={text:g.text,type:g.type};if(w.set_space_before_token(g.newlines||g.whitespace_before!=="",!0),c.is_unformatted)w.add_raw_token(g);else if(c.tag_start_char==="{"&&g.type===o.TEXT)w.print_preserved_newlines(g)?(g.newlines=0,w.add_raw_token(g)):w.print_token(g);else{if(g.type===o.ATTRIBUTE?(w.set_space_before_token(!0),c.attr_count+=1):(g.type===o.EQUALS||g.type===o.VALUE&&g.previous.type===o.EQUALS)&&w.set_space_before_token(!1),g.type===o.ATTRIBUTE&&c.tag_start_char==="<"&&((this._is_wrap_attributes_preserve||this._is_wrap_attributes_preserve_aligned)&&(w.traverse_whitespace(g),F=F||g.newlines!==0),this._is_wrap_attributes_force)){var P=c.attr_count>1;if(this._is_wrap_attributes_force_expand_multiline&&c.attr_count===1){var W=!0,U=0,$;do{if($=L.peek(U),$.type===o.ATTRIBUTE){W=!1;break}U+=1}while(U<4&&$.type!==o.EOF&&$.type!==o.TAG_CLOSE);P=!W}P&&(w.print_newline(!1),F=!0)}w.print_token(g),F=F||w.previous_token_wrapped(),c.has_wrapped_attrs=F}return B},d.prototype._handle_text=function(w,g,c){var L={text:g.text,type:"TK_CONTENT"};return c.custom_beautifier_name?this._print_custom_beatifier_text(w,g,c):c.is_unformatted||c.is_content_unformatted?w.add_raw_token(g):(w.traverse_whitespace(g),w.print_token(g)),L},d.prototype._print_custom_beatifier_text=function(w,g,c){var L=this;if(g.text!==""){var F=g.text,B,P=1,W="",U="";c.custom_beautifier_name==="javascript"&&typeof this._js_beautify=="function"?B=this._js_beautify:c.custom_beautifier_name==="css"&&typeof this._css_beautify=="function"?B=this._css_beautify:c.custom_beautifier_name==="html"&&(B=function(Ie,xe){var Ue=new d(Ie,xe,L._js_beautify,L._css_beautify);return Ue.beautify()}),this._options.indent_scripts==="keep"?P=0:this._options.indent_scripts==="separate"&&(P=-w.indent_level);var $=w.get_full_indent(P);if(F=F.replace(/\n[ \t]*$/,""),c.custom_beautifier_name!=="html"&&F[0]==="<"&&F.match(/^(<!--|<!\[CDATA\[)/)){var ee=/^(<!--[^\n]*|<!\[CDATA\[)(\n?)([ \t\n]*)([\s\S]*)(-->|]]>)$/.exec(F);if(!ee){w.add_raw_token(g);return}W=$+ee[1]+`
|
|
`,F=ee[4],ee[5]&&(U=$+ee[5]),F=F.replace(/\n[ \t]*$/,""),(ee[2]||ee[3].indexOf(`
|
|
`)!==-1)&&(ee=ee[3].match(/[ \t]+$/),ee&&(g.whitespace_before=ee[0]))}if(F)if(B){var pe=function(){this.eol=`
|
|
`};pe.prototype=this._options.raw_options;var fe=new pe;F=B($+F,fe)}else{var Le=g.whitespace_before;Le&&(F=F.replace(new RegExp(`
|
|
(`+Le+")?","g"),`
|
|
`)),F=$+F.replace(/\n/g,`
|
|
`+$)}W&&(F?F=W+F+`
|
|
`+U:F=W+U),w.print_newline(!1),F&&(g.text=F,g.whitespace_before="",g.newlines=0,w.add_raw_token(g),w.print_newline(!0))}},d.prototype._handle_tag_open=function(w,g,c,L){var F=this._get_tag_open_token(g);return(c.is_unformatted||c.is_content_unformatted)&&!c.is_empty_element&&g.type===o.TAG_OPEN&&g.text.indexOf("</")===0?(w.add_raw_token(g),F.start_tag_token=this._tag_stack.try_pop(F.tag_name)):(w.traverse_whitespace(g),this._set_tag_position(w,g,F,c,L),F.is_inline_element||w.set_wrap_point(),w.print_token(g)),(this._is_wrap_attributes_force_aligned||this._is_wrap_attributes_aligned_multiple||this._is_wrap_attributes_preserve_aligned)&&(F.alignment_size=g.text.length+1),!F.tag_complete&&!F.is_unformatted&&(w.alignment_size=F.alignment_size),F};var n=function(w,g){if(this.parent=w||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 c;this.tag_start_char=g.text[0],this.text=g.text,this.tag_start_char==="<"?(c=g.text.match(/^<([^\s>]*)/),this.tag_check=c?c[1]:""):(c=g.text.match(/^{{~?(?:[\^]|#\*?)?([^\s}]+)/),this.tag_check=c?c[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(w){var g=new n(this._tag_stack.get_parser_token(),w);return g.alignment_size=this._options.wrap_attributes_indent_size,g.is_end_tag=g.is_end_tag||b(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&&b(g.tag_check,this._options.unformatted),g.is_content_unformatted=!g.is_empty_element&&b(g.tag_check,this._options.content_unformatted),g.is_inline_element=b(g.tag_name,this._options.inline)||g.tag_name.includes("-")||g.tag_start_char==="{",g},d.prototype._set_tag_position=function(w,g,c,L,F){if(c.is_empty_element||(c.is_end_tag?c.start_tag_token=this._tag_stack.try_pop(c.tag_name):(this._do_optional_end_element(c)&&(c.is_inline_element||w.print_newline(!1)),this._tag_stack.record_tag(c),(c.tag_name==="script"||c.tag_name==="style")&&!(c.is_unformatted||c.is_content_unformatted)&&(c.custom_beautifier_name=y(c.tag_check,g)))),b(c.tag_check,this._options.extra_liners)&&(w.print_newline(!1),w._output.just_added_blankline()||w.print_newline(!0)),c.is_empty_element){if(c.tag_start_char==="{"&&c.tag_check==="else"){this._tag_stack.indent_to_tag(["if","unless","each"]),c.indent_content=!0;var B=w.current_line_has_match(/{{#if/);B||w.print_newline(!1)}c.tag_name==="!--"&&F.type===o.TAG_CLOSE&&L.is_end_tag&&c.text.indexOf(`
|
|
`)===-1||(c.is_inline_element||c.is_unformatted||w.print_newline(!1),this._calcluate_parent_multiline(w,c))}else if(c.is_end_tag){var P=!1;P=c.start_tag_token&&c.start_tag_token.multiline_content,P=P||!c.is_inline_element&&!(L.is_inline_element||L.is_unformatted)&&!(F.type===o.TAG_CLOSE&&c.start_tag_token===L)&&F.type!=="TK_CONTENT",(c.is_content_unformatted||c.is_unformatted)&&(P=!1),P&&w.print_newline(!1)}else c.indent_content=!c.custom_beautifier_name,c.tag_start_char==="<"&&(c.tag_name==="html"?c.indent_content=this._options.indent_inner_html:c.tag_name==="head"?c.indent_content=this._options.indent_head_inner_html:c.tag_name==="body"&&(c.indent_content=this._options.indent_body_inner_html)),!(c.is_inline_element||c.is_unformatted)&&(F.type!=="TK_CONTENT"||c.is_content_unformatted)&&w.print_newline(!1),this._calcluate_parent_multiline(w,c)},d.prototype._calcluate_parent_multiline=function(w,g){g.parent&&w._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"],h=["a","audio","del","ins","map","noscript","video"];d.prototype._do_optional_end_element=function(w){var g=null;if(w.is_empty_element||!w.is_start_tag||!w.parent)return;if(w.tag_name==="body")g=g||this._tag_stack.try_pop("head");else if(w.tag_name==="li")g=g||this._tag_stack.try_pop("li",["ol","ul"]);else if(w.tag_name==="dd"||w.tag_name==="dt")g=g||this._tag_stack.try_pop("dt",["dl"]),g=g||this._tag_stack.try_pop("dd",["dl"]);else if(w.parent.tag_name==="p"&&l.indexOf(w.tag_name)!==-1){var c=w.parent.parent;(!c||h.indexOf(c.tag_name)===-1)&&(g=g||this._tag_stack.try_pop("p"))}else w.tag_name==="rp"||w.tag_name==="rt"?(g=g||this._tag_stack.try_pop("rt",["ruby","rtc"]),g=g||this._tag_stack.try_pop("rp",["ruby","rtc"])):w.tag_name==="optgroup"?g=g||this._tag_stack.try_pop("optgroup",["select"]):w.tag_name==="option"?g=g||this._tag_stack.try_pop("option",["select","datalist","optgroup"]):w.tag_name==="colgroup"?g=g||this._tag_stack.try_pop("caption",["table"]):w.tag_name==="thead"?(g=g||this._tag_stack.try_pop("caption",["table"]),g=g||this._tag_stack.try_pop("colgroup",["table"])):w.tag_name==="tbody"||w.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"])):w.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"])):(w.tag_name==="th"||w.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 w.parent=this._tag_stack.get_parser_token(),g},f.exports.Beautifier=d},function(f,v,u){var s=u(6).Options;function i(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"])}i.prototype=new s,f.exports.Options=i},function(f,v,u){var s=u(9).Tokenizer,i=u(9).TOKEN,A=u(13).Directives,o=u(14).TemplatablePattern,a=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:i.START,RAW:i.RAW,EOF:i.EOF},t=new A(/<\!--/,/-->/),_=function(y,b){s.call(this,y,b),this._current_tag_name="";var x=new o(this._input).read_options(this._options),E=new a(this._input);if(this.__patterns={word:x.until(/[\n\r\t <]/),single_quote:x.until_after(/'/),double_quote:x.until_after(/"/),attribute:x.until(/[\n\r\t =>]|\/>/),element_name:x.until(/[\n\r\t >\/]/),handlebars_comment:E.starting_with(/{{!--/).until_after(/--}}/),handlebars:E.starting_with(/{{/).until_after(/}}/),handlebars_open:E.until(/[\n\r\t }]/),handlebars_raw_close:E.until(/}}/),comment:E.starting_with(/<!--/).until_after(/-->/),cdata:E.starting_with(/<!\[CDATA\[/).until_after(/]]>/),conditional_comment:E.starting_with(/<!\[/).until_after(/]>/),processing:E.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=E.matching(d).until_after(d)}};_.prototype=new s,_.prototype._is_comment=function(y){return!1},_.prototype._is_opening=function(y){return y.type===r.TAG_OPEN},_.prototype._is_closing=function(y,b){return y.type===r.TAG_CLOSE&&b&&((y.text===">"||y.text==="/>")&&b.text[0]==="<"||y.text==="}}"&&b.text[0]==="{"&&b.text[1]==="{")},_.prototype._reset=function(){this._current_tag_name=""},_.prototype._get_next_token=function(y,b){var x=null;this._readWhitespace();var E=this._input.peek();return E===null?this._create_token(r.EOF,""):(x=x||this._read_open_handlebars(E,b),x=x||this._read_attribute(E,y,b),x=x||this._read_close(E,b),x=x||this._read_raw_content(E,y,b),x=x||this._read_content_word(E),x=x||this._read_comment_or_cdata(E),x=x||this._read_processing(E),x=x||this._read_open(E,b),x=x||this._create_token(r.UNKNOWN,this._input.next()),x)},_.prototype._read_comment_or_cdata=function(y){var b=null,x=null,E=null;if(y==="<"){var d=this._input.peek(1);d==="!"&&(x=this.__patterns.comment.read(),x?(E=t.get_directives(x),E&&E.ignore==="start"&&(x+=t.readIgnored(this._input))):x=this.__patterns.cdata.read()),x&&(b=this._create_token(r.COMMENT,x),b.directives=E)}return b},_.prototype._read_processing=function(y){var b=null,x=null,E=null;if(y==="<"){var d=this._input.peek(1);(d==="!"||d==="?")&&(x=this.__patterns.conditional_comment.read(),x=x||this.__patterns.processing.read()),x&&(b=this._create_token(r.COMMENT,x),b.directives=E)}return b},_.prototype._read_open=function(y,b){var x=null,E=null;return b||y==="<"&&(x=this._input.next(),this._input.peek()==="/"&&(x+=this._input.next()),x+=this.__patterns.element_name.read(),E=this._create_token(r.TAG_OPEN,x)),E},_.prototype._read_open_handlebars=function(y,b){var x=null,E=null;return b||this._options.indent_handlebars&&y==="{"&&this._input.peek(1)==="{"&&(this._input.peek(2)==="!"?(x=this.__patterns.handlebars_comment.read(),x=x||this.__patterns.handlebars.read(),E=this._create_token(r.COMMENT,x)):(x=this.__patterns.handlebars_open.read(),E=this._create_token(r.TAG_OPEN,x))),E},_.prototype._read_close=function(y,b){var x=null,E=null;return b&&(b.text[0]==="<"&&(y===">"||y==="/"&&this._input.peek(1)===">")?(x=this._input.next(),y==="/"&&(x+=this._input.next()),E=this._create_token(r.TAG_CLOSE,x)):b.text[0]==="{"&&y==="}"&&this._input.peek(1)==="}"&&(this._input.next(),this._input.next(),E=this._create_token(r.TAG_CLOSE,"}}"))),E},_.prototype._read_attribute=function(y,b,x){var E=null,d="";if(x&&x.text[0]==="<")if(y==="=")E=this._create_token(r.EQUALS,this._input.next());else if(y==='"'||y==="'"){var n=this._input.next();y==='"'?n+=this.__patterns.double_quote.read():n+=this.__patterns.single_quote.read(),E=this._create_token(r.VALUE,n)}else d=this.__patterns.attribute.read(),d&&(b.type===r.EQUALS?E=this._create_token(r.VALUE,d):E=this._create_token(r.ATTRIBUTE,d));return E},_.prototype._is_content_unformatted=function(y){return this._options.void_elements.indexOf(y)===-1&&(this._options.content_unformatted.indexOf(y)!==-1||this._options.unformatted.indexOf(y)!==-1)},_.prototype._read_raw_content=function(y,b,x){var E="";if(x&&x.text[0]==="{")E=this.__patterns.handlebars_raw_close.read();else if(b.type===r.TAG_CLOSE&&b.opened.text[0]==="<"&&b.text[0]!=="/"){var d=b.opened.text.substr(1).toLowerCase();if(d==="script"||d==="style"){var n=this._read_comment_or_cdata(y);if(n)return n.type=r.TEXT,n;E=this._input.readUntil(new RegExp("</"+d+"[\\n\\r\\t ]*?>","ig"))}else this._is_content_unformatted(d)&&(E=this._input.readUntil(new RegExp("</"+d+"[\\n\\r\\t ]*?>","ig")))}return E?this._create_token(r.TEXT,E):null},_.prototype._read_content_word=function(y){var b="";if(this._options.unformatted_content_delimiter&&(y===this._options.unformatted_content_delimiter[0]&&(b=this.__patterns.unformatted_content_delimiter.read())),b||(b=this.__patterns.word.read()),b)return this._create_token(r.TEXT,b)},f.exports.Tokenizer=_,f.exports.TOKEN=r}],M={};function e(f){var v=M[f];if(v!==void 0)return v.exports;var u=M[f]={exports:{}};return X[f](u,u.exports,e),u.exports}var R=e(18);D=R})();var j=D;if(!0)!(oe=[K,K("6UM0"),K("TXwP")],G=function(X){var M=K("6UM0"),e=K("TXwP");return{html_beautify:function(R,f){return j(R,f,M.js_beautify,e.css_beautify)}}}.apply(_e,oe),G!==void 0&&(ct.exports=G));else var N,O})()},"rAM+":function(ct,_e,K){"use strict";K.d(_e,"a",function(){return G});var oe=K("Qw5x");function G(D,j){var N;if(typeof Symbol=="undefined"||D[Symbol.iterator]==null){if(Array.isArray(D)||(N=Object(oe.a)(D))||j&&D&&typeof D.length=="number"){N&&(D=N);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 M=!0,e=!1,R;return{s:function(){N=D[Symbol.iterator]()},n:function(){var v=N.next();return M=v.done,v},e:function(v){e=!0,R=v},f:function(){try{!M&&N.return!=null&&N.return()}finally{if(e)throw R}}}}},rUJ1:function(ct,_e){const K=/[&<>"']/,oe=/[&<>"']/g,G=/[<>"']|&(?!#?\w+;)/,D=/[<>"']|&(?!#?\w+;)/g,j={"&":"&","<":"<",">":">",'"':""","'":"'"},N=E=>j[E];function O(E,d){if(d){if(K.test(E))return E.replace(oe,N)}else if(G.test(E))return E.replace(D,N);return E}const X=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function M(E){return E.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(E,d){E=E.source||E,d=d||"";const n={replace:(l,h)=>(h=h.source||h,h=h.replace(e,"$1"),E=E.replace(l,h),n),getRegex:()=>new RegExp(E,d)};return n}const f=/[^\w:]/g,v=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function u(E,d,n){if(E){let l;try{l=decodeURIComponent(M(n)).replace(f,"").toLowerCase()}catch(h){return null}if(l.indexOf("javascript:")===0||l.indexOf("vbscript:")===0||l.indexOf("data:")===0)return null}d&&!v.test(n)&&(n=a(d,n));try{n=encodeURI(n).replace(/%25/g,"%")}catch(l){return null}return n}const s={},i=/^[^:]+:\/*[^/]*$/,A=/^([^:]+:)[\s\S]*$/,o=/^([^:]+:\/*[^/]*)[\s\S]*$/;function a(E,d){s[" "+E]||(i.test(E)?s[" "+E]=E+"/":s[" "+E]=y(E,"/",!0)),E=s[" "+E];const n=E.indexOf(":")===-1;return d.substring(0,2)==="//"?n?d:E.replace(A,"$1")+d:d.charAt(0)==="/"?n?d:E.replace(o,"$1")+d:E+d}const r={exec:function(){}};function t(E){let d=1,n,l;for(;d<arguments.length;d++){n=arguments[d];for(l in n)Object.prototype.hasOwnProperty.call(n,l)&&(E[l]=n[l])}return E}function _(E,d){const n=E.replace(/\|/g,(w,g,c)=>{let L=!1,F=g;for(;--F>=0&&c[F]==="\\";)L=!L;return L?"|":" |"}),l=n.split(/ \|/);let h=0;if(l.length>d)l.splice(d);else for(;l.length<d;)l.push("");for(;h<l.length;h++)l[h]=l[h].trim().replace(/\\\|/g,"|");return l}function y(E,d,n){const l=E.length;if(l===0)return"";let h=0;for(;h<l;){const w=E.charAt(l-h-1);if(w===d&&!n)h++;else if(w!==d&&n)h++;else break}return E.substr(0,l-h)}function b(E,d){if(E.indexOf(d[1])===-1)return-1;const n=E.length;let l=0,h=0;for(;h<n;h++)if(E[h]==="\\")h++;else if(E[h]===d[0])l++;else if(E[h]===d[1]&&(l--,l<0))return h;return-1}function x(E){E&&E.sanitize&&!E.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")}ct.exports={escape:O,unescape:M,edit:R,cleanUrl:u,resolveUrl:a,noopTest:r,merge:t,splitCells:_,rtrim:y,findClosingBracket:b,checkSanitizeDeprecation:x}},sR1s:function(ct,_e,K){"use strict";K.d(_e,"b",function(){return j}),K.d(_e,"a",function(){return N}),K.d(_e,"c",function(){return O}),K.d(_e,"d",function(){return X});var oe=K("U8pU"),G="RC_TABLE_KEY";function D(M){return M==null?[]:Array.isArray(M)?M:[M]}function j(M,e){if(!e&&typeof e!="number")return M;for(var R=D(e),f=M,v=0;v<R.length;v+=1){if(!f)return null;var u=R[v];f=f[u]}return f}function N(M){var e=[],R={};return M.forEach(function(f){for(var v=f||{},u=v.key,s=v.dataIndex,i=u||D(s).join("-")||G;R[i];)i="".concat(i,"_next");R[i]=!0,e.push(i)}),e}function O(){var M={};function e(u,s){s&&Object.keys(s).forEach(function(i){var A=s[i];A&&Object(oe.a)(A)==="object"?(u[i]=u[i]||{},e(u[i],A)):u[i]=A})}for(var R=arguments.length,f=new Array(R),v=0;v<R;v++)f[v]=arguments[v];return f.forEach(function(u){e(M,u)}),M}function X(M){return M!=null}},sboe:function(ct,_e,K){"use strict";K.d(_e,"a",function(){return D});var oe=K("q1tI"),G=K.n(oe),D=oe.createContext(null)},t23M:function(ct,_e,K){"use strict";var oe=K("VTBJ"),G=K("1OyB"),D=K("vuIU"),j=K("Ji7U"),N=K("LK+K"),O=K("q1tI"),X=K.n(O),M=K("m+aA"),e=K("Zm9Q"),R=K("Kwbf"),f=K("c+Xe"),v=K("bdgK"),u="rc-observer-key",s=function(i){Object(j.a)(o,i);var A=Object(N.a)(o);function o(){var a;return Object(G.a)(this,o),a=A.apply(this,arguments),a.resizeObserver=null,a.childNode=null,a.currentElement=null,a.state={width:0,height:0,offsetHeight:0,offsetWidth:0},a.onResize=function(r){var t=a.props.onResize,_=r[0].target,y=_.getBoundingClientRect(),b=y.width,x=y.height,E=_.offsetWidth,d=_.offsetHeight,n=Math.floor(b),l=Math.floor(x);if(a.state.width!==n||a.state.height!==l||a.state.offsetWidth!==E||a.state.offsetHeight!==d){var h={width:n,height:l,offsetWidth:E,offsetHeight:d};a.setState(h),t&&Promise.resolve().then(function(){t(Object(oe.a)(Object(oe.a)({},h),{},{offsetWidth:E,offsetHeight:d}))})}},a.setChildNode=function(r){a.childNode=r},a}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(M.a)(this.childNode||this),_=t!==this.currentElement;_&&(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 _=t[0];if(O.isValidElement(_)&&Object(f.c)(_)){var y=_.ref;t[0]=O.cloneElement(_,{ref:Object(f.a)(y,this.setChildNode)})}return t.length===1?t[0]:t.map(function(b,x){return!O.isValidElement(b)||"key"in b&&b.key!==null?b:O.cloneElement(b,{key:"".concat(u,"-").concat(x)})})}}]),o}(O.Component);s.displayName="ResizeObserver",_e.a=s},t9D7:function(ct,_e,K){"use strict";K.d(_e,"b",function(){return X}),K.d(_e,"g",function(){return e}),K.d(_e,"d",function(){return R}),K.d(_e,"e",function(){return f}),K.d(_e,"a",function(){return v}),K.d(_e,"f",function(){return i}),K.d(_e,"c",function(){return A});var oe=K("Vhoy"),G=K("MI8n"),D=K("pmY6"),j=K("Cg/j"),N=K("ic2d"),O=K("nEHx");const X=Object(j.c)("themeService");var M;(function(o){function a(r){return r&&typeof r=="object"&&typeof r.id=="string"}o.isThemeColor=a})(M||(M={}));function e(o){return{id:o}}var R;(function(o){function a(x){return x&&typeof x=="object"&&typeof x.id=="string"&&(typeof x.color=="undefined"||M.isThemeColor(x.color))}o.isThemeIcon=a;const r=new RegExp(`^\\$\\((${oe.a.iconNameExpression}(?:${oe.a.iconModifierExpression})?)\\)$`);function t(x){const E=r.exec(x);if(!E)return;let[,d]=E;return{id:d}}o.fromString=t;function _(x,E){let d=x.id;const n=d.lastIndexOf("~");return n!==-1&&(d=d.substring(0,n)),E&&(d=`${d}~${E}`),{id:d}}o.modify=_;function y(x,E){var d,n;return x.id===E.id&&((d=x.color)===null||d===void 0?void 0:d.id)===((n=E.color)===null||n===void 0?void 0:n.id)}o.isEqual=y;function b(x,E){return{id:x.id,color:E?e(E):void 0}}o.asThemeIcon=b,o.asClassNameArray=oe.a.asClassNameArray,o.asClassName=oe.a.asClassName,o.asCSSSelector=oe.a.asCSSSelector})(R||(R={}));function f(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 a=this.themingParticipants.indexOf(o);this.themingParticipants.splice(a,1)})}getThemingParticipants(){return this.themingParticipants}}let s=new u;N.a.add(v.ThemingContribution,s);function i(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(a=>this.onThemeChange(a)))}onThemeChange(o){this.theme=o,this.updateStyles()}updateStyles(){}}},ulZh:function(ct,_e,K){typeof window!="undefined"&&function(G,D){ct.exports=D()}(this,function(){return function(oe){var G={};function D(j){if(G[j])return G[j].exports;var N=G[j]={i:j,l:!1,exports:{}};return oe[j].call(N.exports,N,N.exports,D),N.l=!0,N.exports}return D.m=oe,D.c=G,D.d=function(j,N,O){D.o(j,N)||Object.defineProperty(j,N,{enumerable:!0,get:O})},D.r=function(j){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(j,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(j,"__esModule",{value:!0})},D.t=function(j,N){if(N&1&&(j=D(j)),N&8)return j;if(N&4&&typeof j=="object"&&j&&j.__esModule)return j;var O=Object.create(null);if(D.r(O),Object.defineProperty(O,"default",{enumerable:!0,value:j}),N&2&&typeof j!="string")for(var X in j)D.d(O,X,function(M){return j[M]}.bind(null,X));return O},D.n=function(j){var N=j&&j.__esModule?function(){return j.default}:function(){return j};return D.d(N,"a",N),N},D.o=function(j,N){return Object.prototype.hasOwnProperty.call(j,N)},D.p="/dist/",D(D.s="./src/hls.ts")}({"./node_modules/eventemitter3/index.js":function(oe,G,D){"use strict";var j=Object.prototype.hasOwnProperty,N="~";function O(){}Object.create&&(O.prototype=Object.create(null),new O().__proto__||(N=!1));function X(f,v,u){this.fn=f,this.context=v,this.once=u||!1}function M(f,v,u,s,i){if(typeof u!="function")throw new TypeError("The listener must be a function");var A=new X(u,s||f,i),o=N?N+v:v;return f._events[o]?f._events[o].fn?f._events[o]=[f._events[o],A]:f._events[o].push(A):(f._events[o]=A,f._eventsCount++),f}function e(f,v){--f._eventsCount===0?f._events=new O:delete f._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)j.call(u,s)&&v.push(N?s.slice(1):s);return Object.getOwnPropertySymbols?v.concat(Object.getOwnPropertySymbols(u)):v},R.prototype.listeners=function(v){var u=N?N+v:v,s=this._events[u];if(!s)return[];if(s.fn)return[s.fn];for(var i=0,A=s.length,o=new Array(A);i<A;i++)o[i]=s[i].fn;return o},R.prototype.listenerCount=function(v){var u=N?N+v:v,s=this._events[u];return s?s.fn?1:s.length:0},R.prototype.emit=function(v,u,s,i,A,o){var a=N?N+v:v;if(!this._events[a])return!1;var r=this._events[a],t=arguments.length,_,y;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,i),!0;case 5:return r.fn.call(r.context,u,s,i,A),!0;case 6:return r.fn.call(r.context,u,s,i,A,o),!0}for(y=1,_=new Array(t-1);y<t;y++)_[y-1]=arguments[y];r.fn.apply(r.context,_)}else{var b=r.length,x;for(y=0;y<b;y++){r[y].once&&this.removeListener(v,r[y].fn,void 0,!0);switch(t){case 1:r[y].fn.call(r[y].context);break;case 2:r[y].fn.call(r[y].context,u);break;case 3:r[y].fn.call(r[y].context,u,s);break;case 4:r[y].fn.call(r[y].context,u,s,i);break;default:if(!_)for(x=1,_=new Array(t-1);x<t;x++)_[x-1]=arguments[x];r[y].fn.apply(r[y].context,_)}}}return!0},R.prototype.on=function(v,u,s){return M(this,v,u,s,!1)},R.prototype.once=function(v,u,s){return M(this,v,u,s,!0)},R.prototype.removeListener=function(v,u,s,i){var A=N?N+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&&(!i||o.once)&&(!s||o.context===s)&&e(this,A);else{for(var a=0,r=[],t=o.length;a<t;a++)(o[a].fn!==u||i&&!o[a].once||s&&o[a].context!==s)&&r.push(o[a]);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=N?N+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=N,R.EventEmitter=R,oe.exports=R},"./node_modules/url-toolkit/src/url-toolkit.js":function(oe,G,D){(function(j){var N=/^((?:[a-zA-Z0-9+\-.]+:)?)(\/\/[^\/?#]*)?((?:[^\/?#]*\/)*[^;?#]*)?(;[^?#]*)?(\?[^#]*)?(#[^]*)?$/,O=/^([^\/?#]*)([^]*)$/,X=/(?:\/|^)\.(?=\/)/g,M=/(?:\/|^)\.\.\/(?!\.\.\/)[^\/]*(?=\/)/g,e={buildAbsoluteURL:function(R,f,v){if(v=v||{},R=R.trim(),f=f.trim(),!f){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(f);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)):f;var i=e.parseURL(R);if(!i)throw new Error("Error trying to parse base URL.");if(!i.netLoc&&i.path&&i.path[0]!=="/"){var A=O.exec(i.path);i.netLoc=A[1],i.path=A[2]}i.netLoc&&!i.path&&(i.path="/");var o={scheme:i.scheme,netLoc:s.netLoc,path:null,params:s.params,query:s.query,fragment:s.fragment};if(!s.netLoc&&(o.netLoc=i.netLoc,s.path[0]!=="/"))if(!s.path)o.path=i.path,s.params||(o.params=i.params,s.query||(o.query=i.query));else{var a=i.path,r=a.substring(0,a.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 f=N.exec(R);return f?{scheme:f[1]||"",netLoc:f[2]||"",path:f[3]||"",params:f[4]||"",query:f[5]||"",fragment:f[6]||""}:null},normalizePath:function(R){for(R=R.split("").reverse().join("").replace(X,"");R.length!==(R=R.replace(M,"")).length;);return R.split("").reverse().join("")},buildURLFromParts:function(R){return R.scheme+R.netLoc+R.path+R.params+R.query+R.fragment}};oe.exports=e})(this)},"./node_modules/webworkify-webpack/index.js":function(oe,G,D){function j(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,a){s.o(A,o)||Object.defineProperty(A,o,{configurable:!1,enumerable:!0,get:a})},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 i=s(s.s=ENTRY_MODULE);return i.default||i}var N="[\\.|\\-|\\+|\\w|/|@]+",O="\\(\\s*(/\\*.*?\\*/)?\\s*.*?("+N+").*?\\)";function X(v){return(v+"").replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}function M(v){return!isNaN(1*v)}function e(v,u,s){var i={};i[s]=[];var A=u.toString(),o=A.match(/^function\s?\w*\(\w+,\s*\w+,\s*(\w+)\)/);if(!o)return i;for(var a=o[1],r=new RegExp("(\\\\n|\\W)"+X(a)+O,"g"),t;t=r.exec(A);){if(t[3]==="dll-reference")continue;i[s].push(t[3])}for(r=new RegExp("\\("+X(a)+'\\("(dll-reference\\s('+N+'))"\\)\\)'+O,"g");t=r.exec(A);)v[t[2]]||(i[s].push(t[1]),v[t[2]]=D(t[1]).m),i[t[2]]=i[t[2]]||[],i[t[2]].push(t[4]);for(var _=Object.keys(i),y=0;y<_.length;y++)for(var b=0;b<i[_[y]].length;b++)M(i[_[y]][b])&&(i[_[y]][b]=1*i[_[y]][b]);return i}function R(v){var u=Object.keys(v);return u.reduce(function(s,i){return s||v[i].length>0},!1)}function f(v,u){for(var s={main:[u]},i={main:[]},A={main:{}};R(s);)for(var o=Object.keys(s),a=0;a<o.length;a++){var r=o[a],t=s[r],_=t.pop();if(A[r]=A[r]||{},A[r][_]||!v[r][_])continue;A[r][_]=!0,i[r]=i[r]||[],i[r].push(_);for(var y=e(v,v[r][_],r),b=Object.keys(y),x=0;x<b.length;x++)s[b[x]]=s[b[x]]||[],s[b[x]]=s[b[x]].concat(y[b[x]])}return i}oe.exports=function(v,u){u=u||{};var s={main:D.m},i=u.all?{main:Object.keys(s.main)}:f(s,v),A="";Object.keys(i).filter(function(_){return _!=="main"}).forEach(function(_){for(var y=0;i[_][y];)y++;i[_].push(y),s[_][y]="(function(module, exports, __webpack_require__) { module.exports = __webpack_require__; })",A=A+"var "+_+" = ("+j.toString().replace("ENTRY_MODULE",JSON.stringify(y))+")({"+i[_].map(function(b){return""+JSON.stringify(b)+": "+s[_][b].toString()}).join(",")+`});
|
|
`}),A=A+"new (("+j.toString().replace("ENTRY_MODULE",JSON.stringify(v))+")({"+i.main.map(function(_){return""+JSON.stringify(_)+": "+s.main[_].toString()}).join(",")+"}))(self);";var o=new window.Blob([A],{type:"text/javascript"});if(u.bare)return o;var a=window.URL||window.webkitURL||window.mozURL||window.msURL,r=a.createObjectURL(o),t=new window.Worker(r);return t.objectURL=r,t}},"./src/config.ts":function(oe,G,D){"use strict";D.r(G),D.d(G,"hlsDefaultConfig",function(){return x}),D.d(G,"mergeConfig",function(){return d}),D.d(G,"enableStreamingMode",function(){return n});var j=D("./src/controller/abr-controller.ts"),N=D("./src/controller/audio-stream-controller.ts"),O=D("./src/controller/audio-track-controller.ts"),X=D("./src/controller/subtitle-stream-controller.ts"),M=D("./src/controller/subtitle-track-controller.ts"),e=D("./src/controller/buffer-controller.ts"),R=D("./src/controller/timeline-controller.ts"),f=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"),i=D("./src/utils/xhr-loader.ts"),A=D("./src/utils/fetch-loader.ts"),o=D("./src/utils/cues.ts"),a=D("./src/utils/mediakeys-helper.ts"),r=D("./src/utils/logger.ts");function t(){return t=Object.assign||function(l){for(var h=1;h<arguments.length;h++){var w=arguments[h];for(var g in w)Object.prototype.hasOwnProperty.call(w,g)&&(l[g]=w[g])}return l},t.apply(this,arguments)}function _(l,h){var w=Object.keys(l);if(Object.getOwnPropertySymbols){var g=Object.getOwnPropertySymbols(l);h&&(g=g.filter(function(c){return Object.getOwnPropertyDescriptor(l,c).enumerable})),w.push.apply(w,g)}return w}function y(l){for(var h=1;h<arguments.length;h++){var w=arguments[h]!=null?arguments[h]:{};h%2?_(Object(w),!0).forEach(function(g){b(l,g,w[g])}):Object.getOwnPropertyDescriptors?Object.defineProperties(l,Object.getOwnPropertyDescriptors(w)):_(Object(w)).forEach(function(g){Object.defineProperty(l,g,Object.getOwnPropertyDescriptor(w,g))})}return l}function b(l,h,w){return h in l?Object.defineProperty(l,h,{value:w,enumerable:!0,configurable:!0,writable:!0}):l[h]=w,l}var x=y(y({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:i.default,fLoader:void 0,pLoader:void 0,xhrSetup:void 0,licenseXhrSetup:void 0,licenseResponseCallback:void 0,abrController:j.default,bufferController:e.default,capLevelController:f.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:a.requestMediaKeySystemAccess,testBandwidth:!0,progressive:!1,lowLatencyMode:!0,cmcd:void 0},E()),{},{subtitleStreamController:X.SubtitleStreamController,subtitleTrackController:M.default,timelineController:R.TimelineController,audioStreamController:N.default,audioTrackController:O.default,emeController:u.default,cmcdController:s.default});function E(){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,h){if((h.liveSyncDurationCount||h.liveMaxLatencyDurationCount)&&(h.liveSyncDuration||h.liveMaxLatencyDuration))throw new Error("Illegal hls.js config: don't mix up liveSyncDurationCount/liveMaxLatencyDurationCount and liveSyncDuration/liveMaxLatencyDuration");if(h.liveMaxLatencyDurationCount!==void 0&&(h.liveSyncDurationCount===void 0||h.liveMaxLatencyDurationCount<=h.liveSyncDurationCount))throw new Error('Illegal hls.js config: "liveMaxLatencyDurationCount" must be greater than "liveSyncDurationCount"');if(h.liveMaxLatencyDuration!==void 0&&(h.liveSyncDuration===void 0||h.liveMaxLatencyDuration<=h.liveSyncDuration))throw new Error('Illegal hls.js config: "liveMaxLatencyDuration" must be greater than "liveSyncDuration"');return t({},l,h)}function n(l){var h=l.loader;if(h!==A.default&&h!==i.default)r.logger.log("[config]: Custom loader detected, cannot enable progressive streaming"),l.progressive=!1;else{var w=Object(A.fetchSupported)();w&&(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(oe,G,D){"use strict";D.r(G);var j=D("./src/polyfills/number.ts"),N=D("./src/utils/ewma-bandwidth-estimator.ts"),O=D("./src/events.ts"),X=D("./src/utils/buffer-helper.ts"),M=D("./src/errors.ts"),e=D("./src/types/loader.ts"),R=D("./src/utils/logger.ts");function f(s,i){for(var A=0;A<i.length;A++){var o=i[A];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(s,o.key,o)}}function v(s,i,A){return i&&f(s.prototype,i),A&&f(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 N.default(o.abrEwmaSlowVoD,o.abrEwmaFastVoD,o.abrEwmaDefaultEstimate),this.registerListeners()}var i=s.prototype;return i.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)},i.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)},i.destroy=function(){this.unregisterListeners(),this.clearTimer(),this.hls=this.onCheck=null,this.fragCurrent=this.partCurrent=null},i.onFragLoading=function(o,a){var r=a.frag;if(r.type===e.PlaylistLevelType.MAIN&&!this.timer){var t;this.fragCurrent=r,this.partCurrent=(t=a.part)!=null?t:null,this.timer=self.setInterval(this.onCheck,100)}},i.onLevelLoaded=function(o,a){var r=this.hls.config;a.details.live?this.bwEstimator.update(r.abrEwmaSlowLive,r.abrEwmaFastLive):this.bwEstimator.update(r.abrEwmaSlowVoD,r.abrEwmaFastVoD)},i._abandonRulesCheck=function(){var o=this.fragCurrent,a=this.partCurrent,r=this.hls,t=r.autoLevelEnabled,_=r.config,y=r.media;if(!o||!y)return;var b=a?a.stats:o.stats,x=a?a.duration:o.duration;if(b.aborted){R.logger.warn("frag loader destroy or aborted, disarm abandonRules"),this.clearTimer(),this._nextAutoLevel=-1;return}if(!t||y.paused||!y.playbackRate||!y.readyState)return;var E=performance.now()-b.loading.start,d=Math.abs(y.playbackRate);if(E<=500*x/d)return;var n=r.levels,l=r.minAutoLevel,h=n[o.level],w=b.total||Math.max(b.loaded,Math.round(x*h.maxBitrate/8)),g=Math.max(1,b.bwEstimate?b.bwEstimate/8:b.loaded*1e3/E),c=(w-b.loaded)/g,L=y.currentTime,F=(X.BufferHelper.bufferInfo(y,L,_.maxBufferHole).end-L)/d;if(F>=2*x/d||c<=F)return;var B=Number.POSITIVE_INFINITY,P;for(P=o.level-1;P>l;P--){var W=n[P].maxBitrate;if(B=x*W/(8*.8*g),B<F)break}if(B>=c)return;var U=this.bwEstimator.getEstimate();R.logger.warn("Fragment "+o.sn+(a?" part "+a.index:"")+" of level "+o.level+" is loading too slowly and will cause an underbuffer; aborting and switching to level "+P+`
|
|
Current BW estimate: `+(Object(j.isFiniteNumber)(U)?(U/1024).toFixed(3):"Unknown")+` Kb/s
|
|
Estimated load time for current fragment: `+c.toFixed(3)+` s
|
|
Estimated load time for the next fragment: `+B.toFixed(3)+` s
|
|
Time to underbuffer: `+F.toFixed(3)+" s"),r.nextLoadLevel=P,this.bwEstimator.sample(E,b.loaded),this.clearTimer(),o.loader&&(this.fragCurrent=this.partCurrent=null,o.loader.abort()),r.trigger(O.Events.FRAG_LOAD_EMERGENCY_ABORTED,{frag:o,part:a,stats:b})},i.onFragLoaded=function(o,a){var r=a.frag,t=a.part;if(r.type===e.PlaylistLevelType.MAIN&&Object(j.isFiniteNumber)(r.sn)){var _=t?t.stats:r.stats,y=t?t.duration:r.duration;if(this.clearTimer(),this.lastLoadedFragLevel=r.level,this._nextAutoLevel=-1,this.hls.config.abrMaxWithRealBitrate){var b=this.hls.levels[r.level],x=(b.loaded?b.loaded.bytes:0)+_.loaded,E=(b.loaded?b.loaded.duration:0)+y;b.loaded={bytes:x,duration:E},b.realBitrate=Math.round(8*x/E)}if(r.bitrateTest){var d={stats:_,frag:r,part:t,id:r.type};this.onFragBuffered(O.Events.FRAG_BUFFERED,d),r.bitrateTest=!1}}},i.onFragBuffered=function(o,a){var r=a.frag,t=a.part,_=t?t.stats:r.stats;if(_.aborted)return;if(r.type!==e.PlaylistLevelType.MAIN||r.sn==="initSegment")return;var y=_.parsing.end-_.loading.start;this.bwEstimator.sample(y,_.loaded),_.bwEstimate=this.bwEstimator.getEstimate(),r.bitrateTest?this.bitrateTestDelay=y/1e3:this.bitrateTestDelay=0},i.onError=function(o,a){switch(a.details){case M.ErrorDetails.FRAG_LOAD_ERROR:case M.ErrorDetails.FRAG_LOAD_TIMEOUT:this.clearTimer();break;default:break}},i.clearTimer=function(){self.clearInterval(this.timer),this.timer=void 0},i.getNextABRAutoLevel=function(){var o=this.fragCurrent,a=this.partCurrent,r=this.hls,t=r.maxAutoLevel,_=r.config,y=r.minAutoLevel,b=r.media,x=a?a.duration:o?o.duration:0,E=b?b.currentTime:0,d=b&&b.playbackRate!==0?Math.abs(b.playbackRate):1,n=this.bwEstimator?this.bwEstimator.getEstimate():_.abrEwmaDefaultEstimate,l=(X.BufferHelper.bufferInfo(b,E,_.maxBufferHole).end-E)/d,h=this.findBestLevel(n,y,t,l,_.abrBandWidthFactor,_.abrBandWidthUpFactor);if(h>=0)return h;R.logger.trace((l?"rebuffering expected":"buffer is empty")+", finding optimal quality level");var w=x?Math.min(x,_.maxStarvationDelay):_.maxStarvationDelay,g=_.abrBandWidthFactor,c=_.abrBandWidthUpFactor;if(!l){var L=this.bitrateTestDelay;if(L){var F=x?Math.min(x,_.maxLoadingDelay):_.maxLoadingDelay;w=F-L,R.logger.trace("bitrate test took "+Math.round(1e3*L)+"ms, set first fragment max fetchDuration to "+Math.round(1e3*w)+" ms"),g=c=1}}return h=this.findBestLevel(n,y,t,l+w,g,c),Math.max(h,0)},i.findBestLevel=function(o,a,r,t,_,y){for(var b,x=this.fragCurrent,E=this.partCurrent,d=this.lastLoadedFragLevel,n=this.hls.levels,l=n[d],h=!!(l!=null&&(b=l.details)!==null&&b!==void 0&&b.live),w=l==null?void 0:l.codecSet,g=E?E.duration:x?x.duration:0,c=r;c>=a;c--){var L=n[c];if(!L||w&&L.codecSet!==w)continue;var F=L.details,B=(E?F==null?void 0:F.partTarget:F==null?void 0:F.averagetargetduration)||g,P=void 0;c<=d?P=_*o:P=y*o;var W=n[c].maxBitrate,U=W*B/P;if(R.logger.trace("level/adjustedbw/bitrate/avgDuration/maxFetchDuration/fetchDuration: "+c+"/"+Math.round(P)+"/"+W+"/"+B+"/"+t+"/"+U),P>W&&(!U||h&&!this.bitrateTestDelay||U<t))return c}return-1},v(s,[{key:"nextAutoLevel",get:function(){var o=this._nextAutoLevel,a=this.bwEstimator;if(o!==-1&&(!a||!a.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(oe,G,D){"use strict";D.r(G);var j=D("./src/polyfills/number.ts"),N=D("./src/controller/base-stream-controller.ts"),O=D("./src/events.ts"),X=D("./src/utils/buffer-helper.ts"),M=D("./src/controller/fragment-tracker.ts"),e=D("./src/types/level.ts"),R=D("./src/types/loader.ts"),f=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"),i=D("./src/controller/fragment-finders.ts"),A=D("./src/utils/discontinuities.ts"),o=D("./src/errors.ts"),a=D("./src/utils/logger.ts");function r(){return r=Object.assign||function(x){for(var E=1;E<arguments.length;E++){var d=arguments[E];for(var n in d)Object.prototype.hasOwnProperty.call(d,n)&&(x[n]=d[n])}return x},r.apply(this,arguments)}function t(x,E){x.prototype=Object.create(E.prototype),x.prototype.constructor=x,_(x,E)}function _(x,E){return _=Object.setPrototypeOf||function(n,l){return n.__proto__=l,n},_(x,E)}var y=100,b=function(x){t(E,x);function E(n,l){var h;return h=x.call(this,n,l,"[audio-stream-controller]")||this,h.videoBuffer=null,h.videoTrackCC=-1,h.waitingVideoCC=-1,h.audioSwitch=!1,h.trackId=-1,h.waitingData=null,h.mainDetails=null,h.bufferFlushed=!1,h._registerListeners(),h}var d=E.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,h){var w=h.frag,g=h.id,c=h.initPTS;if(g==="main"){var L=w.cc;this.initPTS[w.cc]=c,this.log("InitPTS for cc: "+L+" found from main: "+c),this.videoTrackCC=L,this.state===N.State.WAITING_INIT_PTS&&this.tick()}},d.startLoad=function(l){if(!this.levels){this.startPosition=l,this.state=N.State.STOPPED;return}var h=this.lastCurrentTime;this.stopLoad(),this.setInterval(y),this.fragLoadError=0,h>0&&l===-1?(this.log("Override startPosition with lastCurrentTime @"+h.toFixed(3)),this.state=N.State.IDLE):(this.loadedmetadata=!1,this.state=N.State.WAITING_TRACK),this.nextLoadPosition=this.startPosition=this.lastCurrentTime=l,this.tick()},d.doTick=function(){switch(this.state){case N.State.IDLE:this.doTickIdle();break;case N.State.WAITING_TRACK:{var l,h=this.levels,w=this.trackId,g=h==null||((l=h[w])===null||l===void 0)?void 0:l.details;if(g){if(this.waitForCdnTuneIn(g))break;this.state=N.State.WAITING_INIT_PTS}break}case N.State.FRAG_LOADING_WAITING_RETRY:{var c,L=performance.now(),F=this.retryDate;(!F||L>=F||(c=this.media)!==null&&c!==void 0&&c.seeking)&&(this.log("RetryDate reached, switch back to IDLE state"),this.state=N.State.IDLE);break}case N.State.WAITING_INIT_PTS:{var B=this.waitingData;if(B){var P=B.frag,W=B.part,U=B.cache,$=B.complete;if(this.initPTS[P.cc]!==void 0){this.waitingData=null,this.waitingVideoCC=-1,this.state=N.State.FRAG_LOADING;var ee=U.flush(),pe={frag:P,part:W,payload:ee,networkDetails:null};this._handleFragmentLoadProgress(pe),$&&x.prototype._handleFragmentLoadComplete.call(this,pe)}else if(this.videoTrackCC!==this.waitingVideoCC)a.logger.log("Waiting fragment cc ("+P.cc+") cancelled because video is at cc "+this.videoTrackCC),this.clearWaitingFragment();else{var fe=this.getLoadPosition(),Le=X.BufferHelper.bufferInfo(this.mediaBuffer,fe,this.config.maxBufferHole),Ie=Object(i.fragmentWithinToleranceTest)(Le.end,this.config.maxFragLookUpTolerance,P);Ie<0&&(a.logger.log("Waiting fragment cc ("+P.cc+") @ "+P.start+" cancelled because another fragment at "+Le.end+" is needed"),this.clearWaitingFragment())}}else this.state=N.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=N.State.IDLE)},d.onTickEnd=function(){var l=this.media;if(!l||!l.readyState)return;var h=this.mediaBuffer?this.mediaBuffer:l,w=h.buffered;!this.loadedmetadata&&w.length&&(this.loadedmetadata=!0),this.lastCurrentTime=l.currentTime},d.doTickIdle=function(){var l,h,w=this.hls,g=this.levels,c=this.media,L=this.trackId,F=w.config;if(!g||!g[L])return;if(!c&&(this.startFragRequested||!F.startFragPrefetch))return;var B=g[L],P=B.details;if(!P||P.live&&this.levelLastLoaded!==L||this.waitForCdnTuneIn(P)){this.state=N.State.WAITING_TRACK;return}this.bufferFlushed&&(this.bufferFlushed=!1,this.afterBufferFlushed(this.mediaBuffer?this.mediaBuffer:this.media,f.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,$=this.getMaxBufferLength(),ee=this.audioSwitch;if(U>=$&&!ee)return;if(!ee&&this._streamEnded(W,P)){w.trigger(O.Events.BUFFER_EOS,{type:"audio"}),this.state=N.State.ENDED;return}var pe=P.fragments,fe=pe[0].start,Le=W.end;if(ee){var Ie=this.getLoadPosition();Le=Ie,P.PTSKnown&&Ie<fe&&((W.end>fe||W.nextStart)&&(this.log("Alt audio track ahead of main track, seek to start of alt audio track"),c.currentTime=fe+.05))}var xe=this.getNextFragment(Le,P);if(!xe){this.bufferFlushed=!0;return}((l=xe.decryptdata)===null||l===void 0?void 0:l.keyFormat)==="identity"&&!((h=xe.decryptdata)!==null&&h!==void 0&&h.key)?this.loadKey(xe,P):this.loadFragment(xe,P,Le)},d.getMaxBufferLength=function(){var l=x.prototype.getMaxBufferLength.call(this),h=this.getFwdBufferInfo(this.videoBuffer?this.videoBuffer:this.media,R.PlaylistLevelType.MAIN);return h===null?l:Math.max(l,h.len)},d.onMediaDetaching=function(){this.videoBuffer=null,x.prototype.onMediaDetaching.call(this)},d.onAudioTracksUpdated=function(l,h){var w=h.audioTracks;this.resetTransmuxer(),this.levels=w.map(function(g){return new e.Level(g)})},d.onAudioTrackSwitching=function(l,h){var w=!!h.url;this.trackId=h.id;var g=this.fragCurrent;g!=null&&g.loader&&g.loader.abort(),this.fragCurrent=null,this.clearWaitingFragment(),w?this.setInterval(y):this.resetTransmuxer(),w?(this.audioSwitch=!0,this.state=N.State.IDLE):this.state=N.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,h){this.mainDetails=h.details},d.onAudioTrackLoaded=function(l,h){var w,g=this.levels,c=h.details,L=h.id;if(!g){this.warn("Audio tracks were reset while loading level "+L);return}this.log("Track "+L+" loaded ["+c.startSN+","+c.endSN+"],duration:"+c.totalduration);var F=g[L],B=0;if(c.live||(w=F.details)!==null&&w!==void 0&&w.live){var P=this.mainDetails;if(c.fragments[0]||(c.deltaUpdateFailed=!0),c.deltaUpdateFailed||!P)return;!F.details&&c.hasProgramDateTime&&P.hasProgramDateTime?(Object(A.alignMediaPlaylistByPDT)(c,P),B=c.fragments[0].start):B=this.alignPlaylists(c,F.details)}F.details=c,this.levelLastLoaded=L,!this.startFragRequested&&(this.mainDetails||!c.live)&&this.setStartPosition(F.details,B),this.state===N.State.WAITING_TRACK&&!this.waitForCdnTuneIn(c)&&(this.state=N.State.IDLE),this.tick()},d._handleFragmentLoadProgress=function(l){var h,w=l.frag,g=l.part,c=l.payload,L=this.config,F=this.trackId,B=this.levels;if(!B){this.warn("Audio tracks were reset while fragment load was in progress. Fragment "+w.sn+" of level "+w.level+" will not be buffered");return}var P=B[F];console.assert(P,"Audio track is defined on fragment load progress");var W=P.details;console.assert(W,"Audio track details are defined on fragment load progress");var U=L.defaultAudioCodec||P.audioCodec||"mp4a.40.2",$=this.transmuxer;$||($=this.transmuxer=new u.default(this.hls,R.PlaylistLevelType.AUDIO,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)));var ee=this.initPTS[w.cc],pe=(h=w.initSegment)===null||h===void 0?void 0:h.data;if(ee!==void 0){var fe=!1,Le=g?g.index:-1,Ie=Le!==-1,xe=new s.ChunkMetadata(w.level,w.sn,w.stats.chunkCount,c.byteLength,Le,Ie);$.push(c,pe,U,"",w,g,W.totalduration,fe,xe,ee)}else{a.logger.log("Unknown video PTS for cc "+w.cc+", waiting for video PTS before demuxing audio frag "+w.sn+" of ["+W.startSN+" ,"+W.endSN+"],track "+F);var Ue=this.waitingData=this.waitingData||{frag:w,part:g,cache:new v.default,complete:!1},Fe=Ue.cache;Fe.push(new Uint8Array(c)),this.waitingVideoCC=this.videoTrackCC,this.state=N.State.WAITING_INIT_PTS}},d._handleFragmentLoadComplete=function(l){if(this.waitingData){this.waitingData.complete=!0;return}x.prototype._handleFragmentLoadComplete.call(this,l)},d.onBufferReset=function(){this.mediaBuffer=this.videoBuffer=null,this.loadedmetadata=!1},d.onBufferCreated=function(l,h){var w=h.tracks.audio;w&&(this.mediaBuffer=w.buffer),h.tracks.video&&(this.videoBuffer=h.tracks.video.buffer)},d.onFragBuffered=function(l,h){var w=h.frag,g=h.part;if(w.type!==R.PlaylistLevelType.AUDIO)return;if(this.fragContextChanged(w)){this.warn("Fragment "+w.sn+(g?" p: "+g.index:"")+" of level "+w.level+" finished buffering, but was aborted. state: "+this.state+", audioSwitch: "+this.audioSwitch);return}w.sn!=="initSegment"&&(this.fragPrevious=w,this.audioSwitch&&(this.audioSwitch=!1,this.hls.trigger(O.Events.AUDIO_TRACK_SWITCHED,{id:this.trackId}))),this.fragBufferedComplete(w,g)},d.onError=function(l,h){switch(h.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,h);break;case o.ErrorDetails.AUDIO_TRACK_LOAD_ERROR:case o.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:this.state!==N.State.ERROR&&this.state!==N.State.STOPPED&&(this.state=h.fatal?N.State.ERROR:N.State.IDLE,this.warn(h.details+" while loading frag, switching to "+this.state+" state"));break;case o.ErrorDetails.BUFFER_FULL_ERROR:if(h.parent==="audio"&&(this.state===N.State.PARSING||this.state===N.State.PARSED)){var w=!0,g=this.getFwdBufferInfo(this.mediaBuffer,R.PlaylistLevelType.AUDIO);g&&g.len>.5&&(w=!this.reduceMaxBufferLength(g.len)),w&&(this.warn("Buffer full error also media.currentTime is not buffered, flush audio buffer"),this.fragCurrent=null,x.prototype.flushMainBuffer.call(this,0,Number.POSITIVE_INFINITY,"audio")),this.resetLoadingState()}break;default:break}},d.onBufferFlushed=function(l,h){var w=h.type;w===f.ElementaryStreamTypes.AUDIO&&(this.bufferFlushed=!0)},d._handleTransmuxComplete=function(l){var h,w="audio",g=this.hls,c=l.remuxResult,L=l.chunkMeta,F=this.getCurrentContext(L);if(!F){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 B=F.frag,P=F.part,W=c.audio,U=c.text,$=c.id3,ee=c.initSegment;if(this.fragContextChanged(B))return;if(this.state=N.State.PARSING,this.audioSwitch&&W&&this.completeAudioSwitch(),ee!=null&&ee.tracks&&(this._bufferInitSegment(ee.tracks,B,L),g.trigger(O.Events.FRAG_PARSING_INIT_SEGMENT,{frag:B,id:w,tracks:ee.tracks})),W){var pe=W.startPTS,fe=W.endPTS,Le=W.startDTS,Ie=W.endDTS;P&&(P.elementaryStreams[f.ElementaryStreamTypes.AUDIO]={startPTS:pe,endPTS:fe,startDTS:Le,endDTS:Ie}),B.setElementaryStreamInfo(f.ElementaryStreamTypes.AUDIO,pe,fe,Le,Ie),this.bufferFragmentData(W,B,P,L)}if($!=null&&(h=$.samples)!==null&&h!==void 0&&h.length){var xe=r({frag:B,id:w},$);g.trigger(O.Events.FRAG_PARSING_METADATA,xe)}if(U){var Ue=r({frag:B,id:w},U);g.trigger(O.Events.FRAG_PARSING_USERDATA,Ue)}},d._bufferInitSegment=function(l,h,w){if(this.state!==N.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 c=g.initSegment;if(c!=null&&c.byteLength){var L={type:"audio",frag:h,part:null,chunkMeta:w,parent:h.type,data:c};this.hls.trigger(O.Events.BUFFER_APPENDING,L)}this.tick()},d.loadFragment=function(l,h,w){var g=this.fragmentTracker.getState(l);this.fragCurrent=l,(this.audioSwitch||g===M.FragmentState.NOT_LOADED||g===M.FragmentState.PARTIAL)&&(l.sn==="initSegment"?this._loadInitSegment(l):h.live&&!Object(j.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=N.State.WAITING_INIT_PTS):(this.startFragRequested=!0,x.prototype.loadFragment.call(this,l,h,w)))},d.completeAudioSwitch=function(){var l=this.hls,h=this.media,w=this.trackId;h&&(this.log("Switching audio track : flushing all audio"),x.prototype.flushMainBuffer.call(this,0,Number.POSITIVE_INFINITY,"audio")),this.audioSwitch=!1,l.trigger(O.Events.AUDIO_TRACK_SWITCHED,{id:w})},E}(N.default);G.default=b},"./src/controller/audio-track-controller.ts":function(oe,G,D){"use strict";D.r(G);var j=D("./src/events.ts"),N=D("./src/errors.ts"),O=D("./src/controller/base-playlist-controller.ts"),X=D("./src/types/loader.ts");function M(u,s){for(var i=0;i<s.length;i++){var A=s[i];A.enumerable=A.enumerable||!1,A.configurable=!0,"value"in A&&(A.writable=!0),Object.defineProperty(u,A.key,A)}}function e(u,s,i){return s&&M(u.prototype,s),i&&M(u,i),u}function R(u,s){u.prototype=Object.create(s.prototype),u.prototype.constructor=u,f(u,s)}function f(u,s){return f=Object.setPrototypeOf||function(A,o){return A.__proto__=o,A},f(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 i=s.prototype;return i.registerListeners=function(){var o=this.hls;o.on(j.Events.MANIFEST_LOADING,this.onManifestLoading,this),o.on(j.Events.MANIFEST_PARSED,this.onManifestParsed,this),o.on(j.Events.LEVEL_LOADING,this.onLevelLoading,this),o.on(j.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),o.on(j.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),o.on(j.Events.ERROR,this.onError,this)},i.unregisterListeners=function(){var o=this.hls;o.off(j.Events.MANIFEST_LOADING,this.onManifestLoading,this),o.off(j.Events.MANIFEST_PARSED,this.onManifestParsed,this),o.off(j.Events.LEVEL_LOADING,this.onLevelLoading,this),o.off(j.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),o.off(j.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),o.off(j.Events.ERROR,this.onError,this)},i.destroy=function(){this.unregisterListeners(),this.tracks.length=0,this.tracksInGroup.length=0,u.prototype.destroy.call(this)},i.onManifestLoading=function(){this.tracks=[],this.groupId=null,this.tracksInGroup=[],this.trackId=-1,this.trackName="",this.selectDefaultTrack=!0},i.onManifestParsed=function(o,a){this.tracks=a.audioTracks||[]},i.onAudioTrackLoaded=function(o,a){var r=a.id,t=a.details,_=this.tracksInGroup[r];if(!_){this.warn("Invalid audio track id "+r);return}var y=_.details;_.details=a.details,this.log("audioTrack "+r+" loaded ["+t.startSN+"-"+t.endSN+"]"),r===this.trackId&&(this.retryCount=0,this.playlistLoaded(r,a,y))},i.onLevelLoading=function(o,a){this.switchLevel(a.level)},i.onLevelSwitching=function(o,a){this.switchLevel(a.level)},i.switchLevel=function(o){var a=this.hls.levels[o];if(!(a!=null&&a.audioGroupIds))return;var r=a.audioGroupIds[a.urlId];if(this.groupId!==r){this.groupId=r;var t=this.tracks.filter(function(y){return!r||y.groupId===r});this.selectDefaultTrack&&!t.some(function(y){return y.default})&&(this.selectDefaultTrack=!1),this.tracksInGroup=t;var _={audioTracks:t};this.log("Updating audio tracks, "+t.length+' track(s) found in "'+r+'" group-id'),this.hls.trigger(j.Events.AUDIO_TRACKS_UPDATED,_),this.selectInitialTrack()}},i.onError=function(o,a){if(u.prototype.onError.call(this,o,a),a.fatal||!a.context)return;a.context.type===X.PlaylistContextType.AUDIO_TRACK&&a.context.id===this.trackId&&a.context.groupId===this.groupId&&this.retryLoadingOrFail(a)},i.setAudioTrack=function(o){var a=this.tracksInGroup;if(o<0||o>=a.length){this.warn("Invalid id passed to audio-track controller");return}this.clearTimer();var r=a[this.trackId];this.log("Now switching to audio-track index "+o);var t=a[o],_=t.id,y=t.groupId,b=y===void 0?"":y,x=t.name,E=t.type,d=t.url;if(this.trackId=o,this.trackName=x,this.selectDefaultTrack=!1,this.hls.trigger(j.Events.AUDIO_TRACK_SWITCHING,{id:_,groupId:b,name:x,type:E,url:d}),t.details&&!t.details.live)return;var n=this.switchParams(t.url,r==null?void 0:r.details);this.loadPlaylist(n)},i.selectInitialTrack=function(){var o=this.tracksInGroup;console.assert(o.length,"Initial audio track should be selected when tracks are known");var a=this.trackName,r=this.findTrackId(a)||this.findTrackId();r!==-1?this.setAudioTrack(r):(this.warn("No track found for running audio group-ID: "+this.groupId),this.hls.trigger(j.Events.ERROR,{type:N.ErrorTypes.MEDIA_ERROR,details:N.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,fatal:!0}))},i.findTrackId=function(o){for(var a=this.tracksInGroup,r=0;r<a.length;r++){var t=a[r];if((!this.selectDefaultTrack||t.default)&&(!o||o===t.name))return t.id}return-1},i.loadPlaylist=function(o){var a=this.tracksInGroup[this.trackId];if(this.shouldLoadTrack(a)){var r=a.id,t=a.groupId,_=a.url;if(o)try{_=o.addDirectives(_)}catch(y){this.warn("Could not construct new URL with HLS Delivery Directives: "+y)}this.log("loading audio-track playlist for id: "+r),this.clearTimer(),this.hls.trigger(j.Events.AUDIO_TRACK_LOADING,{url:_,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(oe,G,D){"use strict";D.r(G),D.d(G,"default",function(){return e});var j=D("./src/polyfills/number.ts"),N=D("./src/types/level.ts"),O=D("./src/controller/level-helper.ts"),X=D("./src/utils/logger.ts"),M=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 f=R.prototype;return f.destroy=function(){this.clearTimer(),this.hls=this.log=this.warn=null},f.onError=function(u,s){s.fatal&&s.type===M.ErrorTypes.NETWORK_ERROR&&this.clearTimer()},f.clearTimer=function(){clearTimeout(this.timer),this.timer=-1},f.startLoad=function(){this.canLoad=!0,this.retryCount=0,this.loadPlaylist()},f.stopLoad=function(){this.canLoad=!1,this.clearTimer()},f.switchParams=function(u,s){var i=s==null?void 0:s.renditionReports;if(i)for(var A=0;A<i.length;A++){var o=i[A],a=""+o.URI;if(a===u.substr(-a.length)){var r=parseInt(o["LAST-MSN"]),t=parseInt(o["LAST-PART"]);if(s&&this.hls.config.lowLatencyMode){var _=Math.min(s.age-s.partTarget,s.targetduration);t!==void 0&&_>s.partTarget&&(t+=1)}if(Object(j.isFiniteNumber)(r))return new N.HlsUrlParameters(r,Object(j.isFiniteNumber)(t)?t:void 0,N.HlsSkip.No)}}},f.loadPlaylist=function(u){},f.shouldLoadTrack=function(u){return this.canLoad&&u&&!!u.url&&(!u.details||u.details.live)},f.playlistLoaded=function(u,s,i){var A=this,o=s.details,a=s.stats,r=a.loading.end?Math.max(0,self.performance.now()-a.loading.end):0;if(o.advancedDateTime=Date.now()-r,o.live||i!=null&&i.live){if(o.reloaded(i),i&&this.log("live playlist "+u+" "+(o.advanced?"REFRESHED "+o.lastPartSn+"-"+o.lastPartIndex:"MISSED")),i&&o.fragments.length>0&&Object(O.mergeDetails)(i,o),!this.canLoad||!o.live)return;var t,_=void 0,y=void 0;if(o.canBlockReload&&o.endSN&&o.advanced){var b=this.hls.config.lowLatencyMode,x=o.lastPartSn,E=o.endSN,d=o.lastPartIndex,n=d!==-1,l=x===E,h=b?0:d;n?(_=l?E+1:x,y=l?h:d+1):_=E+1;var w=o.age,g=w+o.ageHeader,c=Math.min(g-o.partTarget,o.targetduration*1.5);if(c>0){if(i&&c>i.tuneInGoal)this.warn("CDN Tune-in goal increased from: "+i.tuneInGoal+" to: "+c+" with playlist age: "+o.age),c=0;else{var L=Math.floor(c/o.targetduration);if(_+=L,y!==void 0){var F=Math.round(c%o.targetduration/o.partTarget);y+=F}this.log("CDN Tune-in age: "+o.ageHeader+"s last advanced "+w.toFixed(2)+"s goal: "+c+" skip sn "+L+" to part "+y)}o.tuneInGoal=c}if(t=this.getDeliveryDirectives(o,s.deliveryDirectives,_,y),b||!l){this.loadPlaylist(t);return}}else t=this.getDeliveryDirectives(o,s.deliveryDirectives,_,y);var B=Object(O.computeReloadInterval)(o,a);_!==void 0&&o.canBlockReload&&(B-=o.partTarget||1),this.log("reload live playlist "+u+" in "+Math.round(B)+" ms"),this.timer=self.setTimeout(function(){return A.loadPlaylist(t)},B)}else this.clearTimer()},f.getDeliveryDirectives=function(u,s,i,A){var o=Object(N.getSkipValue)(u,i);return s!=null&&s.skip&&u.deltaUpdateFailed&&(i=s.msn,A=s.part,o=N.HlsSkip.No),new N.HlsUrlParameters(i,A,o)},f.retryLoadingOrFail=function(u){var s=this,i=this.hls.config,A=this.retryCount<i.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 a=Math.min(Math.pow(2,this.retryCount)*i.levelLoadingRetryDelay,i.levelLoadingMaxRetryTimeout);this.timer=self.setTimeout(function(){return s.loadPlaylist()},a),this.warn("retry playlist loading #"+this.retryCount+" in "+a+' 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(oe,G,D){"use strict";D.r(G),D.d(G,"State",function(){return E}),D.d(G,"default",function(){return d});var j=D("./src/polyfills/number.ts"),N=D("./src/task-loop.ts"),O=D("./src/controller/fragment-tracker.ts"),X=D("./src/utils/buffer-helper.ts"),M=D("./src/utils/logger.ts"),e=D("./src/events.ts"),R=D("./src/errors.ts"),f=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"),i=D("./src/controller/level-helper.ts"),A=D("./src/loader/fragment-loader.ts"),o=D("./src/crypt/decrypter.ts"),a=D("./src/utils/time-ranges.ts"),r=D("./src/types/loader.ts");function t(n,l){for(var h=0;h<l.length;h++){var w=l[h];w.enumerable=w.enumerable||!1,w.configurable=!0,"value"in w&&(w.writable=!0),Object.defineProperty(n,w.key,w)}}function _(n,l,h){return l&&t(n.prototype,l),h&&t(n,h),n}function y(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}function b(n,l){n.prototype=Object.create(l.prototype),n.prototype.constructor=n,x(n,l)}function x(n,l){return x=Object.setPrototypeOf||function(w,g){return w.__proto__=g,w},x(n,l)}var E={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){b(l,n);function l(w,g,c){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=E.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=c,L.log=M.logger.log.bind(M.logger,c+":"),L.warn=M.logger.warn.bind(M.logger,c+":"),L.hls=w,L.fragmentLoader=new A.default(w.config),L.fragmentTracker=g,L.config=w.config,L.decrypter=new o.default(w,w.config),w.on(e.Events.KEY_LOADED,L.onKeyLoaded,y(L)),L}var h=l.prototype;return h.doTick=function(){this.onTickEnd()},h.onTickEnd=function(){},h.startLoad=function(g){},h.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=E.STOPPED},h._streamEnded=function(g,c){var L=this.fragCurrent,F=this.fragmentTracker;if(!c.live&&L&&L.sn===c.endSN&&!g.nextStart){var B=F.getState(L);return B===O.FragmentState.PARTIAL||B===O.FragmentState.OK}return!1},h.onMediaAttached=function(g,c){var L=this.media=this.mediaBuffer=c.media;this.onvseeking=this.onMediaSeeking.bind(this),this.onvended=this.onMediaEnded.bind(this),L.addEventListener("seeking",this.onvseeking),L.addEventListener("ended",this.onvended);var F=this.config;this.levels&&F.autoStartLoad&&this.state===E.STOPPED&&this.startLoad(F.startPosition)},h.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()},h.onMediaSeeking=function(){var g=this.config,c=this.fragCurrent,L=this.media,F=this.mediaBuffer,B=this.state,P=L?L.currentTime:0,W=X.BufferHelper.bufferInfo(F||L,P,g.maxBufferHole);if(this.log("media seeking to "+(Object(j.isFiniteNumber)(P)?P.toFixed(3):P)+", state: "+B),B===E.ENDED)this.resetLoadingState();else if(c&&!W.len){var U=g.maxFragLookUpTolerance,$=c.start-U,ee=c.start+c.duration+U,pe=P>ee;(P<$||pe)&&(pe&&c.loader&&(this.log("seeking outside of buffer while fragment load in progress, cancel fragment load"),c.loader.abort()),this.resetLoadingState())}L&&(this.lastCurrentTime=P),!this.loadedmetadata&&!W.len&&(this.nextLoadPosition=this.startPosition=P),this.tickImmediate()},h.onMediaEnded=function(){this.startPosition=this.lastCurrentTime=0},h.onKeyLoaded=function(g,c){if(this.state!==E.KEY_LOADING||c.frag!==this.fragCurrent||!this.levels)return;this.state=E.IDLE;var L=this.levels[c.frag.level].details;L&&this.loadFragment(c.frag,L,c.frag.start)},h.onHandlerDestroying=function(){this.stopLoad(),n.prototype.onHandlerDestroying.call(this)},h.onHandlerDestroyed=function(){this.state=E.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)},h.loadKey=function(g,c){this.log("Loading key for "+g.sn+" of ["+c.startSN+"-"+c.endSN+"], "+(this.logPrefix==="[stream-controller]"?"level":"track")+" "+g.level),this.state=E.KEY_LOADING,this.fragCurrent=g,this.hls.trigger(e.Events.KEY_LOADING,{frag:g})},h.loadFragment=function(g,c,L){this._loadFragForPlayback(g,c,L)},h._loadFragForPlayback=function(g,c,L){var F=this,B=function(W){if(F.fragContextChanged(g)){F.warn("Fragment "+g.sn+(W.part?" p: "+W.part.index:"")+" of level "+g.level+" was dropped during download."),F.fragmentTracker.removeFragment(g);return}g.stats.chunkCount++,F._handleFragmentLoadProgress(W)};this._doFragLoad(g,c,L,B).then(function(P){if(!P)return;F.fragLoadError=0;var W=F.state;if(F.fragContextChanged(g)){(W===E.FRAG_LOADING||W===E.BACKTRACKING||!F.fragCurrent&&W===E.PARSING)&&(F.fragmentTracker.removeFragment(g),F.state=E.IDLE);return}if("payload"in P&&(F.log("Loaded fragment "+g.sn+" of level "+g.level),F.hls.trigger(e.Events.FRAG_LOADED,P),F.state===E.BACKTRACKING)){F.fragmentTracker.backtrack(g,P),F.resetFragmentLoading(g);return}F._handleFragmentLoadComplete(P)}).catch(function(P){F.warn(P),F.resetFragmentLoading(g)})},h.flushMainBuffer=function(g,c,L){if(L===void 0&&(L=null),!(g-c))return;var F={startOffset:g,endOffset:c,type:L};this.fragLoadError=0,this.hls.trigger(e.Events.BUFFER_FLUSHING,F)},h._loadInitSegment=function(g){var c=this;this._doFragLoad(g).then(function(L){if(!L||c.fragContextChanged(g)||!c.levels)throw new Error("init load aborted");return L}).then(function(L){var F=c.hls,B=L.payload,P=g.decryptdata;if(B&&B.byteLength>0&&P&&P.key&&P.iv&&P.method==="AES-128"){var W=self.performance.now();return c.decrypter.webCryptoDecrypt(new Uint8Array(B),P.key.buffer,P.iv.buffer).then(function(U){var $=self.performance.now();return F.trigger(e.Events.FRAG_DECRYPTED,{frag:g,payload:U,stats:{tstart:W,tdecrypt:$}}),L.payload=U,L})}return L}).then(function(L){var F=c.fragCurrent,B=c.hls,P=c.levels;if(!P)throw new Error("init load aborted, missing levels");var W=P[g.level].details;console.assert(W,"Level details are defined when init segment is loaded");var U=g.stats;c.state=E.IDLE,c.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===F&&B.trigger(e.Events.FRAG_BUFFERED,{stats:U,frag:F,part:null,id:g.type}),c.tick()}).catch(function(L){c.warn(L),c.resetFragmentLoading(g)})},h.fragContextChanged=function(g){var c=this.fragCurrent;return!g||!c||g.level!==c.level||g.sn!==c.sn||g.urlId!==c.urlId},h.fragBufferedComplete=function(g,c){var L=this.mediaBuffer?this.mediaBuffer:this.media;this.log("Buffered "+g.type+" sn: "+g.sn+(c?" part: "+c.index:"")+" of "+(this.logPrefix==="[stream-controller]"?"level":"track")+" "+g.level+" "+a.default.toString(X.BufferHelper.getBuffered(L))),this.state=E.IDLE,this.tick()},h._handleFragmentLoadComplete=function(g){var c=this.transmuxer;if(!c)return;var L=g.frag,F=g.part,B=g.partsLoaded,P=!B||B.length===0||B.some(function(U){return!U}),W=new f.ChunkMetadata(L.level,L.sn,L.stats.chunkCount+1,0,F?F.index:-1,!P);c.flush(W)},h._handleFragmentLoadProgress=function(g){},h._doFragLoad=function(g,c,L,F){var B=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&&c){var P=c.partList;if(P&&F){L>g.end&&c.fragmentHint&&(g=c.fragmentHint);var W=this.getNextPart(P,g,L);if(W>-1){var U=P[W];return this.log("Loading part sn: "+g.sn+" p: "+U.index+" cc: "+g.cc+" of playlist ["+c.startSN+"-"+c.endSN+"] parts [0-"+W+"-"+(P.length-1)+"] "+(this.logPrefix==="[stream-controller]"?"level":"track")+": "+g.level+", target: "+parseFloat(L.toFixed(3))),this.nextLoadPosition=U.start+U.duration,this.state=E.FRAG_LOADING,this.hls.trigger(e.Events.FRAG_LOADING,{frag:g,part:P[W],targetBufferTime:L}),this.doFragPartsLoad(g,P,W,F).catch(function($){return B.handleFragLoadError($)})}else if(!g.url||this.loadedEndOfParts(P,L))return Promise.resolve(null)}}return this.log("Loading fragment "+g.sn+" cc: "+g.cc+" "+(c?"of ["+c.startSN+"-"+c.endSN+"] ":"")+(this.logPrefix==="[stream-controller]"?"level":"track")+": "+g.level+", target: "+parseFloat(L.toFixed(3))),Object(j.isFiniteNumber)(g.sn)&&!this.bitrateTest&&(this.nextLoadPosition=g.start+g.duration),this.state=E.FRAG_LOADING,this.hls.trigger(e.Events.FRAG_LOADING,{frag:g,targetBufferTime:L}),this.fragmentLoader.load(g,F).catch(function($){return B.handleFragLoadError($)})},h.doFragPartsLoad=function(g,c,L,F){var B=this;return new Promise(function(P,W){var U=[],$=function ee(pe){var fe=c[pe];B.fragmentLoader.loadPart(g,fe,F).then(function(Le){U[fe.index]=Le;var Ie=Le.part;B.hls.trigger(e.Events.FRAG_LOADED,Le);var xe=c[pe+1];if(xe&&xe.fragment===g)ee(pe+1);else return P({frag:g,part:Ie,partsLoaded:U})}).catch(W)};$(L)})},h.handleFragLoadError=function(g){var c=g.data;return c&&c.details===R.ErrorDetails.INTERNAL_ABORTED?this.handleFragLoadAborted(c.frag,c.part):this.hls.trigger(e.Events.ERROR,c),null},h._handleTransmuxerFlush=function(g){var c=this.getCurrentContext(g);if(!c||this.state!==E.PARSING){this.fragCurrent||(this.state=E.IDLE);return}var L=c.frag,F=c.part,B=c.level,P=self.performance.now();L.stats.parsing.end=P,F&&(F.stats.parsing.end=P),this.updateLevelTiming(L,F,B,g.partial)},h.getCurrentContext=function(g){var c=this.levels,L=g.level,F=g.sn,B=g.part;if(!c||!c[L])return this.warn("Levels object was unset while buffering fragment "+F+" of level "+L+". The current chunk will not be buffered."),null;var P=c[L],W=B>-1?Object(i.getPartWith)(P,F,B):null,U=W?W.fragment:Object(i.getFragmentWithSN)(P,F,this.fragCurrent);return U?{frag:U,part:W,level:P}:null},h.bufferFragmentData=function(g,c,L,F){if(!g||this.state!==E.PARSING)return;var B=g.data1,P=g.data2,W=B;if(B&&P&&(W=Object(v.appendUint8Array)(B,P)),!W||!W.length)return;var U={type:g.type,frag:c,part:L,chunkMeta:F,parent:c.type,data:W};this.hls.trigger(e.Events.BUFFER_APPENDING,U),g.dropped&&g.independent&&!L&&this.flushBufferGap(c)},h.flushBufferGap=function(g){var c=this.media;if(!c)return;if(!X.BufferHelper.isBuffered(c,c.currentTime)){this.flushMainBuffer(0,g.start);return}var L=c.currentTime,F=X.BufferHelper.bufferInfo(c,L,0),B=g.duration,P=Math.min(this.config.maxFragLookUpTolerance*2,B*.25),W=Math.max(Math.min(g.start-P,F.end-P),L+P);g.start-W>P&&this.flushMainBuffer(W,g.start)},h.getFwdBufferInfo=function(g,c){var L=this.config,F=this.getLoadPosition();if(!Object(j.isFiniteNumber)(F))return null;var B=X.BufferHelper.bufferInfo(g,F,L.maxBufferHole);if(B.len===0&&B.nextStart!==void 0){var P=this.fragmentTracker.getBufferedFrag(F,c);if(P&&B.nextStart<P.end)return X.BufferHelper.bufferInfo(g,F,Math.max(B.nextStart,L.maxBufferHole))}return B},h.getMaxBufferLength=function(g){var c=this.config,L;return g?L=Math.max(8*c.maxBufferSize/g,c.maxBufferLength):L=c.maxBufferLength,Math.min(L,c.maxMaxBufferLength)},h.reduceMaxBufferLength=function(g){var c=this.config,L=g||c.maxBufferLength;return c.maxMaxBufferLength>=L?(c.maxMaxBufferLength/=2,this.warn("Reduce max buffer length to "+c.maxMaxBufferLength+"s"),!0):!1},h.getNextFragment=function(g,c){var L,F,B=c.fragments,P=B.length;if(!P)return null;var W=this.config,U=B[0].start,$;if(c.live){var ee=W.initialLiveManifestSize;if(P<ee)return this.warn("Not enough fragments to start playback (have: "+P+", need: "+ee+")"),null;!c.PTSKnown&&!this.startFragRequested&&this.startPosition===-1&&($=this.getInitialLiveFragment(c,B),this.startPosition=$?this.hls.liveSyncPosition||$.start:g)}else g<=U&&($=B[0]);if(!$){var pe=W.lowLatencyMode?c.partEnd:c.fragmentEnd;$=this.getFragmentAtPosition(g,pe,c)}return(L=$)!==null&&L!==void 0&&L.initSegment&&!((F=$)!==null&&F!==void 0&&F.initSegment.data)&&!this.bitrateTest&&($=$.initSegment),$},h.getNextPart=function(g,c,L){for(var F=-1,B=!1,P=!0,W=0,U=g.length;W<U;W++){var $=g[W];if(P=P&&!$.independent,F>-1&&L<$.start)break;var ee=$.loaded;!ee&&(B||$.independent||P)&&$.fragment===c&&(F=W),B=ee}return F},h.loadedEndOfParts=function(g,c){var L=g[g.length-1];return L&&c>L.start&&L.loaded},h.getInitialLiveFragment=function(g,c){var L=this.fragPrevious,F=null;if(L){if(g.hasProgramDateTime&&(this.log("Live playlist, switching playlist, load frag with same PDT: "+L.programDateTime),F=Object(s.findFragmentByPDT)(c,L.endProgramDateTime,this.config.maxFragLookUpTolerance)),!F){var B=L.sn+1;if(B>=g.startSN&&B<=g.endSN){var P=c[B-g.startSN];L.cc===P.cc&&(F=P,this.log("Live playlist, switching playlist, load frag with next SN: "+F.sn))}F||(F=Object(s.findFragWithCC)(c,L.cc),F&&this.log("Live playlist, switching playlist, load frag with same CC: "+F.sn))}}else{var W=this.hls.liveSyncPosition;W!==null&&(F=this.getFragmentAtPosition(W,this.bitrateTest?g.fragmentEnd:g.edge,g))}return F},h.getFragmentAtPosition=function(g,c,L){var F=this.config,B=this.fragPrevious,P=L.fragments,W=L.endSN,U=L.fragmentHint,$=F.maxFragLookUpTolerance,ee=!!(F.lowLatencyMode&&L.partList&&U);ee&&U&&!this.bitrateTest&&(P=P.concat(U),W=U.sn);var pe;if(g<c){var fe=g>c-$?0:$;pe=Object(s.findFragmentByPTS)(B,P,g,fe)}else pe=P[P.length-1];if(pe){var Le=pe.sn-L.startSN,Ie=B&&pe.level===B.level,xe=P[Le+1],Ue=this.fragmentTracker.getState(pe);if(Ue===O.FragmentState.BACKTRACKED){pe=null;for(var Fe=Le;P[Fe]&&this.fragmentTracker.getState(P[Fe])===O.FragmentState.BACKTRACKED;)B?pe=P[Fe--]:pe=P[--Fe];pe||(pe=xe)}else B&&pe.sn===B.sn&&!ee&&(Ie&&(pe.sn<W&&this.fragmentTracker.getState(xe)!==O.FragmentState.OK?(this.log("SN "+pe.sn+" just loaded, load next one: "+xe.sn),pe=xe):pe=null))}return pe},h.synchronizeToLiveEdge=function(g){var c=this.config,L=this.media;if(!L)return;var F=this.hls.liveSyncPosition,B=L.currentTime,P=g.fragments[0].start,W=g.edge,U=B>=P-c.maxFragLookUpTolerance&&B<=W;if(F!==null&&L.duration>F&&(B<F||!U)){var $=c.liveMaxLatencyDuration!==void 0?c.liveMaxLatencyDuration:c.liveMaxLatencyDurationCount*g.targetduration;(!U&&L.readyState<4||B<W-$)&&(this.loadedmetadata||(this.nextLoadPosition=F),L.readyState&&(this.warn("Playback: "+B.toFixed(3)+" is located too far from the end of live sliding playlist: "+W+", reset currentTime to : "+F.toFixed(3)),L.currentTime=F))}},h.alignPlaylists=function(g,c){var L=this.levels,F=this.levelLastLoaded,B=this.fragPrevious,P=F!==null?L[F]:null,W=g.fragments.length;if(!W)return this.warn("No fragments in live playlist"),0;var U=g.fragments[0].start,$=!c,ee=g.alignedSliding&&Object(j.isFiniteNumber)(U);if($||!ee&&!U){Object(u.alignStream)(B,P,g);var pe=g.fragments[0].start;return this.log("Live playlist sliding: "+pe.toFixed(2)+" start-sn: "+(c?c.startSN:"na")+"->"+g.startSN+" prev-sn: "+(B?B.sn:"na")+" fragments: "+W),pe}return U},h.waitForCdnTuneIn=function(g){var c=3;return g.live&&g.canBlockReload&&g.tuneInGoal>Math.max(g.partHoldBack,g.partTarget*c)},h.setStartPosition=function(g,c){var L=this.startPosition;if(L<c&&(L=-1),L===-1||this.lastCurrentTime===-1){var F=g.startTimeOffset;Object(j.isFiniteNumber)(F)?(L=c+F,F<0&&(L+=g.totalduration),L=Math.min(Math.max(c,L),c+g.totalduration),this.log("Start time offset "+F+" found in playlist, adjust startPosition to "+L),this.startPosition=L):g.live?L=this.hls.liveSyncPosition||c:this.startPosition=L=0,this.lastCurrentTime=L}this.nextLoadPosition=L},h.getLoadPosition=function(){var g=this.media,c=0;return this.loadedmetadata&&g?c=g.currentTime:this.nextLoadPosition&&(c=this.nextLoadPosition),c},h.handleFragLoadAborted=function(g,c){this.transmuxer&&g.sn!=="initSegment"&&g.stats.aborted&&(this.warn("Fragment "+g.sn+(c?" part"+c.index:"")+" of level "+g.level+" was aborted"),this.resetFragmentLoading(g))},h.resetFragmentLoading=function(g){(!this.fragCurrent||!this.fragContextChanged(g))&&(this.state=E.IDLE)},h.onFragmentOrKeyLoadError=function(g,c){if(c.fatal)return;var L=c.frag;if(!L||L.type!==g)return;var F=this.fragCurrent;console.assert(F&&L.sn===F.sn&&L.level===F.level&&L.urlId===F.urlId,"Frag load error must match current frag to retry");var B=this.config;if(this.fragLoadError+1<=B.fragLoadingMaxRetry){if(this.resetLiveStartWhenNotLoaded(L.level))return;var P=Math.min(Math.pow(2,this.fragLoadError)*B.fragLoadingRetryDelay,B.fragLoadingMaxRetryTimeout);this.warn("Fragment "+L.sn+" of "+g+" "+L.level+" failed to load, retrying in "+P+"ms"),this.retryDate=self.performance.now()+P,this.fragLoadError++,this.state=E.FRAG_LOADING_WAITING_RETRY}else c.levelRetry?(g===r.PlaylistLevelType.AUDIO&&(this.fragCurrent=null),this.fragLoadError=0,this.state=E.IDLE):(M.logger.error(c.details+" reaches max retry, redispatch as fatal ..."),c.fatal=!0,this.hls.stopLoad(),this.state=E.ERROR)},h.afterBufferFlushed=function(g,c,L){if(!g)return;var F=X.BufferHelper.getBuffered(g);this.fragmentTracker.detectEvictedFragments(c,F,L),this.state===E.ENDED&&this.resetLoadingState()},h.resetLoadingState=function(){this.fragCurrent=null,this.fragPrevious=null,this.state=E.IDLE},h.resetLiveStartWhenNotLoaded=function(g){if(!this.loadedmetadata){this.startFragRequested=!1;var c=this.levels?this.levels[g].details:null;if(c!=null&&c.live)return this.startPosition=-1,this.setStartPosition(c,0),this.resetLoadingState(),!0;this.nextLoadPosition=this.startPosition}return!1},h.updateLevelTiming=function(g,c,L,F){var B=this,P=L.details;console.assert(!!P,"level.details must be defined");var W=Object.keys(g.elementaryStreams).reduce(function(U,$){var ee=g.elementaryStreams[$];if(ee){var pe=ee.endPTS-ee.startPTS;if(pe<=0)return B.warn("Could not parse fragment "+g.sn+" "+$+" duration reliably ("+pe+") resetting transmuxer to fallback to playlist timing"),B.resetTransmuxer(),U||!1;var fe=F?0:Object(i.updateFragPTSDTS)(P,g,ee.startPTS,ee.endPTS,ee.startDTS,ee.endDTS);return B.hls.trigger(e.Events.LEVEL_PTS_UPDATED,{details:P,level:L,drift:fe,type:$,frag:g,start:ee.startPTS,end:ee.endPTS}),!0}return U},!1);W?(this.state=E.PARSED,this.hls.trigger(e.Events.FRAG_PARSED,{frag:g,part:c})):this.resetLoadingState()},h.resetTransmuxer=function(){this.transmuxer&&(this.transmuxer.destroy(),this.transmuxer=null)},_(l,[{key:"state",get:function(){return this._state},set:function(g){var c=this._state;c!==g&&(this._state=g,this.log(c+"->"+g))}}]),l}(N.default)},"./src/controller/buffer-controller.ts":function(oe,G,D){"use strict";D.r(G),D.d(G,"default",function(){return s});var j=D("./src/polyfills/number.ts"),N=D("./src/events.ts"),O=D("./src/utils/logger.ts"),X=D("./src/errors.ts"),M=D("./src/utils/buffer-helper.ts"),e=D("./src/utils/mediasource-helper.ts"),R=D("./src/loader/fragment.ts"),f=D("./src/controller/buffer-operation-queue.ts"),v=Object(e.getMediaSource)(),u=/([ha]vc.)(?:\.[^.,]+)+/,s=function(){function i(o){var a=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=a.hls,t=a.media,_=a.mediaSource;O.logger.log("[buffer-controller]: Media source opened"),t&&(a.updateMediaElementDuration(),r.trigger(N.Events.MEDIA_ATTACHED,{media:t})),_&&_.removeEventListener("sourceopen",a._onMediaSourceOpen),a.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=i.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 a=this.hls;a.on(N.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),a.on(N.Events.MEDIA_DETACHING,this.onMediaDetaching,this),a.on(N.Events.MANIFEST_PARSED,this.onManifestParsed,this),a.on(N.Events.BUFFER_RESET,this.onBufferReset,this),a.on(N.Events.BUFFER_APPENDING,this.onBufferAppending,this),a.on(N.Events.BUFFER_CODECS,this.onBufferCodecs,this),a.on(N.Events.BUFFER_EOS,this.onBufferEos,this),a.on(N.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),a.on(N.Events.LEVEL_UPDATED,this.onLevelUpdated,this),a.on(N.Events.FRAG_PARSED,this.onFragParsed,this),a.on(N.Events.FRAG_CHANGED,this.onFragChanged,this)},A.unregisterListeners=function(){var a=this.hls;a.off(N.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),a.off(N.Events.MEDIA_DETACHING,this.onMediaDetaching,this),a.off(N.Events.MANIFEST_PARSED,this.onManifestParsed,this),a.off(N.Events.BUFFER_RESET,this.onBufferReset,this),a.off(N.Events.BUFFER_APPENDING,this.onBufferAppending,this),a.off(N.Events.BUFFER_CODECS,this.onBufferCodecs,this),a.off(N.Events.BUFFER_EOS,this.onBufferEos,this),a.off(N.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),a.off(N.Events.LEVEL_UPDATED,this.onLevelUpdated,this),a.off(N.Events.FRAG_PARSED,this.onFragParsed,this),a.off(N.Events.FRAG_CHANGED,this.onFragChanged,this)},A._initSourceBuffer=function(){this.sourceBuffer={},this.operationQueue=new f.default(this.sourceBuffer),this.listeners={audio:[],video:[],audiovideo:[]}},A.onManifestParsed=function(a,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(a,r){var t=this.media=r.media;if(t&&v){var _=this.mediaSource=new v;_.addEventListener("sourceopen",this._onMediaSourceOpen),_.addEventListener("sourceended",this._onMediaSourceEnded),_.addEventListener("sourceclose",this._onMediaSourceClose),t.src=self.URL.createObjectURL(_),this._objectUrl=t.src}},A.onMediaDetaching=function(){var a=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(_){O.logger.warn("[buffer-controller]: onMediaDetaching: "+_.message+" while calling endOfStream")}this.onBufferReset(),r.removeEventListener("sourceopen",this._onMediaSourceOpen),r.removeEventListener("sourceended",this._onMediaSourceEnded),r.removeEventListener("sourceclose",this._onMediaSourceClose),a&&(t&&self.URL.revokeObjectURL(t),a.src===t?(a.removeAttribute("src"),a.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(N.Events.MEDIA_DETACHED,void 0)},A.onBufferReset=function(){var a=this;this.getSourceBufferTypes().forEach(function(r){var t=a.sourceBuffer[r];try{t&&(a.removeBufferListeners(r),a.mediaSource&&a.mediaSource.removeSourceBuffer(t),a.sourceBuffer[r]=void 0)}catch(_){O.logger.warn("[buffer-controller]: Failed to reset the "+r+" buffer",_)}}),this._initSourceBuffer()},A.onBufferCodecs=function(a,r){var t=this,_=this.getSourceBufferTypes().length;if(Object.keys(r).forEach(function(y){if(_){var b=t.tracks[y];if(b&&typeof b.buffer.changeType=="function"){var x=r[y],E=x.codec,d=x.levelCodec,n=x.container,l=(b.levelCodec||b.codec).replace(u,"$1"),h=(d||E).replace(u,"$1");if(l!==h){var w=n+";codecs="+(d||E);t.appendChangeType(y,w)}}}else t.pendingTracks[y]=r[y]}),_)return;this.bufferCodecEventsExpected=Math.max(this.bufferCodecEventsExpected-1,0),this.mediaSource&&this.mediaSource.readyState==="open"&&this.checkPendingTracks()},A.appendChangeType=function(a,r){var t=this,_=this.operationQueue,y={execute:function(){var x=t.sourceBuffer[a];x&&(O.logger.log("[buffer-controller]: changing "+a+" sourceBuffer type to "+r),x.changeType(r)),_.shiftAndExecuteNext(a)},onStart:function(){},onComplete:function(){},onError:function(x){O.logger.warn("[buffer-controller]: Failed to change "+a+" SourceBuffer type",x)}};_.append(y,a)},A.onBufferAppending=function(a,r){var t=this,_=this.hls,y=this.operationQueue,b=this.tracks,x=r.data,E=r.type,d=r.frag,n=r.part,l=r.chunkMeta,h=l.buffering[E],w=self.performance.now();h.start=w;var g=d.stats.buffering,c=n?n.stats.buffering:null;g.start===0&&(g.start=w),c&&c.start===0&&(c.start=w);var L=b.audio,F=E==="audio"&&l.id===1&&(L==null?void 0:L.container)==="audio/mpeg",B={execute:function(){if(h.executeStart=self.performance.now(),F){var W=t.sourceBuffer[E];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(x,E)},onStart:function(){},onComplete:function(){var W=self.performance.now();h.executeEnd=h.end=W,g.first===0&&(g.first=W),c&&c.first===0&&(c.first=W);var U=t.sourceBuffer,$={};for(var ee in U)$[ee]=M.BufferHelper.getBuffered(U[ee]);t.appendError=0,t.hls.trigger(N.Events.BUFFER_APPENDED,{type:E,frag:d,part:n,chunkMeta:l,parent:d.type,timeRanges:$})},onError:function(W){O.logger.error("[buffer-controller]: Error encountered while trying to append to the "+E+" 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>_.config.appendErrorMaxRetry&&(O.logger.error("[buffer-controller]: Failed "+_.config.appendErrorMaxRetry+" times to append segment in sourceBuffer"),U.fatal=!0)),_.trigger(N.Events.ERROR,U)}};y.append(B,E)},A.onBufferFlushing=function(a,r){var t=this,_=this.operationQueue,y=function(x){return{execute:t.removeExecutor.bind(t,x,r.startOffset,r.endOffset),onStart:function(){},onComplete:function(){t.hls.trigger(N.Events.BUFFER_FLUSHED,{type:x})},onError:function(d){O.logger.warn("[buffer-controller]: Failed to remove from "+x+" SourceBuffer",d)}}};r.type?_.append(y(r.type),r.type):this.getSourceBufferTypes().forEach(function(b){_.append(y(b),b)})},A.onFragParsed=function(a,r){var t=this,_=r.frag,y=r.part,b=[],x=y?y.elementaryStreams:_.elementaryStreams;x[R.ElementaryStreamTypes.AUDIOVIDEO]?b.push("audiovideo"):(x[R.ElementaryStreamTypes.AUDIO]&&b.push("audio"),x[R.ElementaryStreamTypes.VIDEO]&&b.push("video"));var E=function(){var n=self.performance.now();_.stats.buffering.end=n,y&&(y.stats.buffering.end=n);var l=y?y.stats:_.stats;t.hls.trigger(N.Events.FRAG_BUFFERED,{frag:_,part:y,stats:l,id:_.type})};b.length===0&&O.logger.warn("Fragments must have at least one ElementaryStreamType set. type: "+_.type+" level: "+_.level+" sn: "+_.sn),this.blockBuffers(E,b)},A.onFragChanged=function(a,r){this.flushBackBuffer()},A.onBufferEos=function(a,r){var t=this,_=this.getSourceBufferTypes().reduce(function(y,b){var x=t.sourceBuffer[b];return(!r.type||r.type===b)&&(x&&!x.ended&&(x.ended=!0,O.logger.log("[buffer-controller]: "+b+" sourceBuffer now EOS"))),y&&!!(!x||x.ended)},!0);_&&this.blockBuffers(function(){var y=t.mediaSource;if(!y||y.readyState!=="open")return;y.endOfStream()})},A.onLevelUpdated=function(a,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 a=this.hls,r=this.details,t=this.media,_=this.sourceBuffer;if(!t||r===null)return;var y=this.getSourceBufferTypes();if(!y.length)return;var b=r.live&&a.config.liveBackBufferLength!==null?a.config.liveBackBufferLength:a.config.backBufferLength;if(!Object(j.isFiniteNumber)(b)||b<0)return;var x=t.currentTime,E=r.levelTargetDuration,d=Math.max(b,E),n=Math.floor(x/E)*E-d;y.forEach(function(l){var h=_[l];if(h){var w=M.BufferHelper.getBuffered(h);w.length>0&&n>w.start(0)&&(a.trigger(N.Events.BACK_BUFFER_REACHED,{bufferEnd:n}),r.live&&a.trigger(N.Events.LIVE_BACK_BUFFER_REACHED,{bufferEnd:n}),a.trigger(N.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 a=this.details,r=this.hls,t=this.media,_=this.mediaSource,y=a.fragments[0].start+a.totalduration,b=t.duration,x=Object(j.isFiniteNumber)(_.duration)?_.duration:0;a.live&&r.config.liveDurationInfinity?(O.logger.log("[buffer-controller]: Media Source duration is set to Infinity"),_.duration=Infinity,this.updateSeekableRange(a)):(y>x&&y>b||!Object(j.isFiniteNumber)(b))&&(O.logger.log("[buffer-controller]: Updating Media Source duration to "+y.toFixed(3)),_.duration=y)},A.updateSeekableRange=function(a){var r=this.mediaSource,t=a.fragments,_=t.length;if(_&&a.live&&r!==null&&r!==void 0&&r.setLiveSeekableRange){var y=Math.max(0,t[0].start),b=Math.max(y,y+a.totalduration);r.setLiveSeekableRange(y,b)}},A.checkPendingTracks=function(){var a=this.bufferCodecEventsExpected,r=this.operationQueue,t=this.pendingTracks,_=Object.keys(t).length;if(_&&!a||_===2){this.createSourceBuffers(t),this.pendingTracks={};var y=this.getSourceBufferTypes();if(y.length===0){this.hls.trigger(N.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}y.forEach(function(b){r.executeNext(b)})}},A.createSourceBuffers=function(a){var r=this.sourceBuffer,t=this.mediaSource;if(!t)throw Error("createSourceBuffers called when mediaSource was null");var _=0;for(var y in a)if(!r[y]){var b=a[y];if(!b)throw Error("source buffer exists for track "+y+", however track does not");var x=b.levelCodec||b.codec,E=b.container+";codecs="+x;O.logger.log("[buffer-controller]: creating sourceBuffer("+E+")");try{var d=r[y]=t.addSourceBuffer(E),n=y;this.addBufferListener(n,"updatestart",this._onSBUpdateStart),this.addBufferListener(n,"updateend",this._onSBUpdateEnd),this.addBufferListener(n,"error",this._onSBUpdateError),this.tracks[y]={buffer:d,codec:x,container:b.container,levelCodec:b.levelCodec,id:b.id},_++}catch(l){O.logger.error("[buffer-controller]: error while trying to add sourceBuffer: "+l.message),this.hls.trigger(N.Events.ERROR,{type:X.ErrorTypes.MEDIA_ERROR,details:X.ErrorDetails.BUFFER_ADD_CODEC_ERROR,fatal:!1,error:l,mimeType:E})}}_&&this.hls.trigger(N.Events.BUFFER_CREATED,{tracks:this.tracks})},A._onSBUpdateStart=function(a){var r=this.operationQueue,t=r.current(a);t.onStart()},A._onSBUpdateEnd=function(a){var r=this.operationQueue,t=r.current(a);t.onComplete(),r.shiftAndExecuteNext(a)},A._onSBUpdateError=function(a,r){O.logger.error("[buffer-controller]: "+a+" SourceBuffer error",r),this.hls.trigger(N.Events.ERROR,{type:X.ErrorTypes.MEDIA_ERROR,details:X.ErrorDetails.BUFFER_APPENDING_ERROR,fatal:!1});var t=this.operationQueue.current(a);t&&t.onError(r)},A.removeExecutor=function(a,r,t){var _=this.media,y=this.mediaSource,b=this.operationQueue,x=this.sourceBuffer,E=x[a];if(!_||!y||!E){O.logger.warn("[buffer-controller]: Attempting to remove from the "+a+" SourceBuffer, but it does not exist"),b.shiftAndExecuteNext(a);return}var d=Object(j.isFiniteNumber)(_.duration)?_.duration:Infinity,n=Object(j.isFiniteNumber)(y.duration)?y.duration:Infinity,l=Math.max(0,r),h=Math.min(t,d,n);h>l?(O.logger.log("[buffer-controller]: Removing ["+l+","+h+"] from the "+a+" SourceBuffer"),console.assert(!E.updating,a+" sourceBuffer must not be updating"),E.remove(l,h)):b.shiftAndExecuteNext(a)},A.appendExecutor=function(a,r){var t=this.operationQueue,_=this.sourceBuffer,y=_[r];if(!y){O.logger.warn("[buffer-controller]: Attempting to append to the "+r+" SourceBuffer, but it does not exist"),t.shiftAndExecuteNext(r);return}y.ended=!1,console.assert(!y.updating,r+" sourceBuffer must not be updating"),y.appendBuffer(a)},A.blockBuffers=function(a,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(a);return}var _=this.operationQueue,y=r.map(function(b){return _.appendBlocker(b)});Promise.all(y).then(function(){a(),r.forEach(function(b){var x=t.sourceBuffer[b];(!x||!x.updating)&&_.shiftAndExecuteNext(b)})})},A.getSourceBufferTypes=function(){return Object.keys(this.sourceBuffer)},A.addBufferListener=function(a,r,t){var _=this.sourceBuffer[a];if(!_)return;var y=t.bind(this,a);this.listeners[a].push({event:r,listener:y}),_.addEventListener(r,y)},A.removeBufferListeners=function(a){var r=this.sourceBuffer[a];if(!r)return;this.listeners[a].forEach(function(t){r.removeEventListener(t.event,t.listener)})},i}()},"./src/controller/buffer-operation-queue.ts":function(oe,G,D){"use strict";D.r(G),D.d(G,"default",function(){return N});var j=D("./src/utils/logger.ts"),N=function(){function O(M){this.buffers=void 0,this.queues={video:[],audio:[],audiovideo:[]},this.buffers=M}var X=O.prototype;return X.append=function(e,R){var f=this.queues[R];f.push(e),f.length===1&&this.buffers[R]&&this.executeNext(R)},X.insertAbort=function(e,R){var f=this.queues[R];f.unshift(e),this.executeNext(R)},X.appendBlocker=function(e){var R,f=new Promise(function(u){R=u}),v={execute:R,onStart:function(){},onComplete:function(){},onError:function(){}};return this.append(v,e),f},X.executeNext=function(e){var R=this.buffers,f=this.queues,v=R[e],u=f[e];if(u.length){var s=u[0];try{s.execute()}catch(i){j.logger.warn("[buffer-operation-queue]: Unhandled exception executing the current operation"),s.onError(i),(!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(oe,G,D){"use strict";D.r(G);var j=D("./src/events.ts");function N(M,e){for(var R=0;R<e.length;R++){var f=e[R];f.enumerable=f.enumerable||!1,f.configurable=!0,"value"in f&&(f.writable=!0),Object.defineProperty(M,f.key,f)}}function O(M,e,R){return e&&N(M.prototype,e),R&&N(M,R),M}var X=function(){function M(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=M.prototype;return e.setStreamController=function(f){this.streamController=f},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 f=this.hls;f.on(j.Events.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),f.on(j.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),f.on(j.Events.MANIFEST_PARSED,this.onManifestParsed,this),f.on(j.Events.BUFFER_CODECS,this.onBufferCodecs,this),f.on(j.Events.MEDIA_DETACHING,this.onMediaDetaching,this)},e.unregisterListener=function(){var f=this.hls;f.off(j.Events.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),f.off(j.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),f.off(j.Events.MANIFEST_PARSED,this.onManifestParsed,this),f.off(j.Events.BUFFER_CODECS,this.onBufferCodecs,this),f.off(j.Events.MEDIA_DETACHING,this.onMediaDetaching,this)},e.onFpsDropLevelCapping=function(f,v){M.isLevelAllowed(v.droppedLevel,this.restrictedLevels)&&this.restrictedLevels.push(v.droppedLevel)},e.onMediaAttaching=function(f,v){this.media=v.media instanceof HTMLVideoElement?v.media:null},e.onManifestParsed=function(f,v){var u=this.hls;this.restrictedLevels=[],this.firstLevel=v.firstLevel,u.config.capLevelToPlayerSize&&v.video&&this.startCapping()},e.onBufferCodecs=function(f,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 f=this.hls.levels;if(f.length){var v=this.hls;v.autoLevelCapping=this.getMaxLevel(f.length-1),v.autoLevelCapping>this.autoLevelCapping&&this.streamController&&this.streamController.nextLevelSwitch(),this.autoLevelCapping=v.autoLevelCapping}}},e.getMaxLevel=function(f){var v=this,u=this.hls.levels;if(!u.length)return-1;var s=u.filter(function(i,A){return M.isLevelAllowed(A,v.restrictedLevels)&&A<=f});return this.clientRect=null,M.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 f=this.media,v={width:0,height:0};if(f){var u=f.getBoundingClientRect();v.width=u.width,v.height=u.height,!v.width&&!v.height&&(v.width=u.right-u.left||f.width||0,v.height=u.bottom-u.top||f.height||0)}return this.clientRect=v,v},M.isLevelAllowed=function(f,v){return v===void 0&&(v=[]),v.indexOf(f)===-1},M.getMaxLevelByMediaSize=function(f,v,u){if(!f||!f.length)return-1;for(var s=function(r,t){return t?r.width!==t.width||r.height!==t.height:!0},i=f.length-1,A=0;A<f.length;A+=1){var o=f[A];if((o.width>=v||o.height>=u)&&s(o,f[A+1])){i=A;break}}return i},O(M,[{key:"mediaWidth",get:function(){return this.getDimensions().width*M.contentScaleFactor}},{key:"mediaHeight",get:function(){return this.getDimensions().height*M.contentScaleFactor}}],[{key:"contentScaleFactor",get:function(){var f=1;try{f=self.devicePixelRatio}catch(v){}return f}}]),M}();G.default=X},"./src/controller/cmcd-controller.ts":function(oe,G,D){"use strict";D.r(G),D.d(G,"default",function(){return s});var j=D("./src/events.ts"),N=D("./src/types/cmcd.ts"),O=D("./src/utils/buffer-helper.ts"),X=D("./src/utils/logger.ts");function M(i,A){for(var o=0;o<A.length;o++){var a=A[o];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(i,a.key,a)}}function e(i,A,o){return A&&M(i.prototype,A),o&&M(i,o),i}function R(i,A){var o=typeof Symbol!="undefined"&&i[Symbol.iterator]||i["@@iterator"];if(o)return(o=o.call(i)).next.bind(o);if(Array.isArray(i)||(o=f(i))||A&&i&&typeof i.length=="number"){o&&(i=o);var a=0;return function(){return a>=i.length?{done:!0}:{done:!1,value:i[a++]}}}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 f(i,A){if(!i)return;if(typeof i=="string")return v(i,A);var o=Object.prototype.toString.call(i).slice(8,-1);if(o==="Object"&&i.constructor&&(o=i.constructor.name),o==="Map"||o==="Set")return Array.from(i);if(o==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o))return v(i,A)}function v(i,A){(A==null||A>i.length)&&(A=i.length);for(var o=0,a=new Array(A);o<A;o++)a[o]=i[o];return a}function u(){return u=Object.assign||function(i){for(var A=1;A<arguments.length;A++){var o=arguments[A];for(var a in o)Object.prototype.hasOwnProperty.call(o,a)&&(i[a]=o[a])}return i},u.apply(this,arguments)}var s=function(){function i(o){var a=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(){a.initialized&&(a.starved=!0),a.buffering=!0},this.onPlaying=function(){a.initialized||(a.initialized=!0),a.buffering=!1},this.applyPlaylistData=function(_){try{a.apply(_,{ot:N.CMCDObjectType.MANIFEST,su:!a.initialized})}catch(y){X.logger.warn("Could not generate manifest CMCD data.",y)}},this.applyFragmentData=function(_){try{var y=_.frag,b=a.hls.levels[y.level],x=a.getObjectType(y),E={d:y.duration*1e3,ot:x};(x===N.CMCDObjectType.VIDEO||x===N.CMCDObjectType.AUDIO||x==N.CMCDObjectType.MUXED)&&(E.br=b.bitrate/1e3,E.tb=a.getTopBandwidth(x),E.bl=a.getBufferLength(x)),a.apply(_,E)}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||i.uuid(),this.cid=t.contentId,this.useHeaders=t.useHeaders===!0,this.registerListeners())}var A=i.prototype;return A.registerListeners=function(){var a=this.hls;a.on(j.Events.MEDIA_ATTACHED,this.onMediaAttached,this),a.on(j.Events.MEDIA_DETACHED,this.onMediaDetached,this),a.on(j.Events.BUFFER_CREATED,this.onBufferCreated,this)},A.unregisterListeners=function(){var a=this.hls;a.off(j.Events.MEDIA_ATTACHED,this.onMediaAttached,this),a.off(j.Events.MEDIA_DETACHED,this.onMediaDetached,this),a.off(j.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(a,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(a,r){var t,_;this.audioBuffer=(t=r.tracks.audio)===null||t===void 0?void 0:t.buffer,this.videoBuffer=(_=r.tracks.video)===null||_===void 0?void 0:_.buffer},A.createData=function(){var a;return{v:N.CMCDVersion,sf:N.CMCDStreamingFormat.HLS,sid:this.sid,cid:this.cid,pr:(a=this.media)===null||a===void 0?void 0:a.playbackRate,mtp:this.hls.bandwidthEstimate/1e3}},A.apply=function(a,r){r===void 0&&(r={}),u(r,this.createData());var t=r.ot===N.CMCDObjectType.INIT||r.ot===N.CMCDObjectType.VIDEO||r.ot===N.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 _=i.toHeaders(r);if(!Object.keys(_).length)return;a.headers||(a.headers={}),u(a.headers,_)}else{var y=i.toQuery(r);if(!y)return;a.url=i.appendQueryToUri(a.url,y)}},A.getObjectType=function(a){var r=a.type;return r==="subtitle"?N.CMCDObjectType.TIMED_TEXT:a.sn==="initSegment"?N.CMCDObjectType.INIT:r==="audio"?N.CMCDObjectType.AUDIO:r==="main"?this.hls.audioTracks.length?N.CMCDObjectType.VIDEO:N.CMCDObjectType.MUXED:void 0},A.getTopBandwidth=function(a){for(var r=0,t=a===N.CMCDObjectType.AUDIO?this.hls.audioTracks:this.hls.levels,_=R(t),y;!(y=_()).done;){var b=y.value;b.bitrate>r&&(r=b.bitrate)}return r>0?r:NaN},A.getBufferLength=function(a){var r=this.hls.media,t=a===N.CMCDObjectType.AUDIO?this.audioBuffer:this.videoBuffer;if(!t||!r)return NaN;var _=O.BufferHelper.bufferInfo(t,r.currentTime,this.config.maxBufferHole);return _.len*1e3},A.createPlaylistLoader=function(){var a=this.config.pLoader,r=this.applyPlaylistData,t=a||this.config.loader;return function(){function _(b){this.loader=void 0,this.loader=new t(b)}var y=_.prototype;return y.destroy=function(){this.loader.destroy()},y.abort=function(){this.loader.abort()},y.load=function(x,E,d){r(x),this.loader.load(x,E,d)},e(_,[{key:"stats",get:function(){return this.loader.stats}},{key:"context",get:function(){return this.loader.context}}]),_}()},A.createFragmentLoader=function(){var a=this.config.fLoader,r=this.applyFragmentData,t=a||this.config.loader;return function(){function _(b){this.loader=void 0,this.loader=new t(b)}var y=_.prototype;return y.destroy=function(){this.loader.destroy()},y.abort=function(){this.loader.abort()},y.load=function(x,E,d){r(x),this.loader.load(x,E,d)},e(_,[{key:"stats",get:function(){return this.loader.stats}},{key:"context",get:function(){return this.loader.context}}]),_}()},i.uuid=function(){var a=URL.createObjectURL(new Blob),r=a.toString();return URL.revokeObjectURL(a),r.substr(r.lastIndexOf("/")+1)},i.serialize=function(a){for(var r=[],t=function(F){return!Number.isNaN(F)&&F!=null&&F!==""&&F!==!1},_=function(F){return Math.round(F)},y=function(F){return _(F/100)*100},b=function(F){return encodeURIComponent(F)},x={br:_,d:_,bl:y,dl:y,mtp:y,nor:b,rtp:y,tb:_},E=Object.keys(a||{}).sort(),d=R(E),n;!(n=d()).done;){var l=n.value,h=a[l];if(!t(h))continue;if(l==="v"&&h===1)continue;if(l=="pr"&&h===1)continue;var w=x[l];w&&(h=w(h));var g=typeof h,c=void 0;l==="ot"||l==="sf"||l==="st"?c=l+"="+h:g==="boolean"?c=l:g==="number"?c=l+"="+h:c=l+"="+JSON.stringify(h),r.push(c)}return r.join(",")},i.toHeaders=function(a){for(var r=Object.keys(a),t={},_=["Object","Request","Session","Status"],y=[{},{},{},{}],b={br:0,d:0,ot:0,tb:0,bl:1,dl:1,mtp:1,nor:1,nrr:1,su:1,cid:2,pr:2,sf:2,sid:2,st:2,v:2,bs:3,rtp:3},x=0,E=r;x<E.length;x++){var d=E[x],n=b[d]!=null?b[d]:1;y[n][d]=a[d]}for(var l=0;l<y.length;l++){var h=i.serialize(y[l]);h&&(t["CMCD-"+_[l]]=h)}return t},i.toQuery=function(a){return"CMCD="+encodeURIComponent(i.serialize(a))},i.appendQueryToUri=function(a,r){if(!r)return a;var t=a.includes("?")?"&":"?";return""+a+t+r},i}()},"./src/controller/eme-controller.ts":function(oe,G,D){"use strict";D.r(G);var j=D("./src/events.ts"),N=D("./src/errors.ts"),O=D("./src/utils/logger.ts"),X=D("./src/utils/mediakeys-helper.ts");function M(s,i){for(var A=0;A<i.length;A++){var o=i[A];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(s,o.key,o)}}function e(s,i,A){return i&&M(s.prototype,i),A&&M(s,A),s}var R=3,f=function(i,A,o){var a={audioCapabilities:[],videoCapabilities:[]};return i.forEach(function(r){a.audioCapabilities.push({contentType:'audio/mp4; codecs="'+r+'"',robustness:o.audioRobustness||""})}),A.forEach(function(r){a.videoCapabilities.push({contentType:'video/mp4; codecs="'+r+'"',robustness:o.videoRobustness||""})}),[a]},v=function(i,A,o,a){switch(i){case X.KeySystems.WIDEVINE:return f(A,o,a);default:throw new Error("Unknown key-system: "+i)}},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 i=s.prototype;return i.destroy=function(){this._unregisterListeners(),this.hls=this._onMediaEncrypted=null,this._requestMediaKeySystemAccess=null},i._registerListeners=function(){this.hls.on(j.Events.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.on(j.Events.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.on(j.Events.MANIFEST_PARSED,this.onManifestParsed,this)},i._unregisterListeners=function(){this.hls.off(j.Events.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.off(j.Events.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.off(j.Events.MANIFEST_PARSED,this.onManifestParsed,this)},i.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+'"')},i._attemptKeySystemAccess=function(o,a,r){var t=this,_=v(o,a,r,this._drmSystemOptions);O.logger.log("Requesting encrypted media key-system access");var y=this.requestMediaKeySystemAccess(o,_);this.mediaKeysPromise=y.then(function(b){return t._onMediaKeySystemAccessObtained(o,b)}),y.catch(function(b){O.logger.error('Failed to obtain key-system "'+o+'" access:',b)})},i._onMediaKeySystemAccessObtained=function(o,a){var r=this;O.logger.log('Access for key-system "'+o+'" obtained');var t={mediaKeysSessionInitialized:!1,mediaKeySystemAccess:a,mediaKeySystemDomain:o};this._mediaKeysList.push(t);var _=Promise.resolve().then(function(){return a.createMediaKeys()}).then(function(y){return t.mediaKeys=y,O.logger.log('Media-keys created for key-system "'+o+'"'),r._onMediaKeysCreated(),y});return _.catch(function(y){O.logger.error("Failed to create media-keys:",y)}),_},i._onMediaKeysCreated=function(){var o=this;this._mediaKeysList.forEach(function(a){a.mediaKeysSession||(a.mediaKeysSession=a.mediaKeys.createSession(),o._onNewMediaKeySession(a.mediaKeysSession))})},i._onNewMediaKeySession=function(o){var a=this;O.logger.log("New key-system session "+o.sessionId),o.addEventListener("message",function(r){a._onKeySessionMessage(o,r.message)},!1)},i._onKeySessionMessage=function(o,a){O.logger.log("Got EME message event, creating license request"),this._requestLicense(a,function(r){O.logger.log("Received license data (length: "+(r&&r.byteLength)+"), updating key-session"),o.update(r)})},i.onMediaEncrypted=function(o){var a=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(j.Events.ERROR,{type:N.ErrorTypes.KEY_SYSTEM_ERROR,details:N.ErrorDetails.KEY_SYSTEM_NO_KEYS,fatal:!0});return}var r=function(_){if(!a._media)return;a._attemptSetMediaKeys(_),a._generateRequestWithPreferredKeySession(o.initDataType,o.initData)};this.mediaKeysPromise.then(r).catch(r)},i._attemptSetMediaKeys=function(o){if(!this._media)throw new Error("Attempted to set mediaKeys without first attaching a media element");if(!this._hasSetMediaKeys){var a=this._mediaKeysList[0];if(!a||!a.mediaKeys){O.logger.error("Fatal: Media is encrypted but no CDM access or no keys have been obtained yet"),this.hls.trigger(j.Events.ERROR,{type:N.ErrorTypes.KEY_SYSTEM_ERROR,details:N.ErrorDetails.KEY_SYSTEM_NO_KEYS,fatal:!0});return}O.logger.log("Setting keys for encrypted media"),this._media.setMediaKeys(a.mediaKeys),this._hasSetMediaKeys=!0}},i._generateRequestWithPreferredKeySession=function(o,a){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(j.Events.ERROR,{type:N.ErrorTypes.KEY_SYSTEM_ERROR,details:N.ErrorDetails.KEY_SYSTEM_NO_ACCESS,fatal:!0});return}if(t.mediaKeysSessionInitialized){O.logger.warn("Key-Session already initialized but requested again");return}var _=t.mediaKeysSession;if(!_){O.logger.error("Fatal: Media is encrypted but no key-session existing"),this.hls.trigger(j.Events.ERROR,{type:N.ErrorTypes.KEY_SYSTEM_ERROR,details:N.ErrorDetails.KEY_SYSTEM_NO_SESSION,fatal:!0});return}if(!a){O.logger.warn("Fatal: initData required for generating a key session is null"),this.hls.trigger(j.Events.ERROR,{type:N.ErrorTypes.KEY_SYSTEM_ERROR,details:N.ErrorDetails.KEY_SYSTEM_NO_INIT_DATA,fatal:!0});return}O.logger.log('Generating key-session request for "'+o+'" init data type'),t.mediaKeysSessionInitialized=!0,_.generateRequest(o,a).then(function(){O.logger.debug("Key-session generation succeeded")}).catch(function(y){O.logger.error("Error generating key-session request:",y),r.hls.trigger(j.Events.ERROR,{type:N.ErrorTypes.KEY_SYSTEM_ERROR,details:N.ErrorDetails.KEY_SYSTEM_NO_SESSION,fatal:!1})})},i._createLicenseXhr=function(o,a,r){var t=new XMLHttpRequest;t.responseType="arraybuffer",t.onreadystatechange=this._onLicenseRequestReadyStageChange.bind(this,t,o,a,r);var _=this._licenseXhrSetup;if(_)try{_.call(this.hls,t,o),_=void 0}catch(y){O.logger.error(y)}try{t.readyState||t.open("POST",o,!0),_&&_.call(this.hls,t,o)}catch(y){throw new Error("issue setting up KeySystem license XHR "+y)}return t},i._onLicenseRequestReadyStageChange=function(o,a,r,t){switch(o.readyState){case 4:if(o.status===200){this._requestLicenseFailureCount=0,O.logger.log("License request succeeded");var _=o.response,y=this._licenseResponseCallback;if(y)try{_=y.call(this.hls,o,a)}catch(x){O.logger.error(x)}t(_)}else{if(O.logger.error("License Request XHR failed ("+a+"). Status: "+o.status+" ("+o.statusText+")"),this._requestLicenseFailureCount++,this._requestLicenseFailureCount>R){this.hls.trigger(j.Events.ERROR,{type:N.ErrorTypes.KEY_SYSTEM_ERROR,details:N.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0});return}var b=R-this._requestLicenseFailureCount+1;O.logger.warn("Retrying license request, "+b+" attempts left"),this._requestLicense(r,t)}break}},i._generateLicenseRequestChallenge=function(o,a){switch(o.mediaKeySystemDomain){case X.KeySystems.WIDEVINE:return a}throw new Error("unsupported key-system: "+o.mediaKeySystemDomain)},i._requestLicense=function(o,a){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(j.Events.ERROR,{type:N.ErrorTypes.KEY_SYSTEM_ERROR,details:N.ErrorDetails.KEY_SYSTEM_NO_ACCESS,fatal:!0});return}try{var t=this.getLicenseServerUrl(r.mediaKeySystemDomain),_=this._createLicenseXhr(t,o,a);O.logger.log("Sending license request to URL: "+t);var y=this._generateLicenseRequestChallenge(r,o);_.send(y)}catch(b){O.logger.error("Failure requesting DRM license: "+b),this.hls.trigger(j.Events.ERROR,{type:N.ErrorTypes.KEY_SYSTEM_ERROR,details:N.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0})}},i.onMediaAttached=function(o,a){if(!this._emeEnabled)return;var r=a.media;this._media=r,r.addEventListener("encrypted",this._onMediaEncrypted)},i.onMediaDetached=function(){var o=this._media,a=this._mediaKeysList;if(!o)return;o.removeEventListener("encrypted",this._onMediaEncrypted),this._media=null,this._mediaKeysList=[],Promise.all(a.map(function(r){if(r.mediaKeysSession)return r.mediaKeysSession.close().catch(function(){})})).then(function(){return o.setMediaKeys(null)}).catch(function(){})},i.onManifestParsed=function(o,a){if(!this._emeEnabled)return;var r=a.levels.map(function(_){return _.audioCodec}).filter(function(_){return!!_}),t=a.levels.map(function(_){return _.videoCodec}).filter(function(_){return!!_});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(oe,G,D){"use strict";D.r(G);var j=D("./src/events.ts"),N=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 M=X.prototype;return M.setStreamController=function(R){this.streamController=R},M.registerListeners=function(){this.hls.on(j.Events.MEDIA_ATTACHING,this.onMediaAttaching,this)},M.unregisterListeners=function(){this.hls.off(j.Events.MEDIA_ATTACHING,this.onMediaAttaching)},M.destroy=function(){this.timer&&clearInterval(this.timer),this.unregisterListeners(),this.isVideoPlaybackQualityAvailable=!1,this.media=null},M.onMediaAttaching=function(R,f){var v=this.hls.config;if(v.capLevelOnFPSDrop){var u=f.media instanceof self.HTMLVideoElement?f.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)}},M.checkFPS=function(R,f,v){var u=performance.now();if(f){if(this.lastTime){var s=u-this.lastTime,i=v-this.lastDroppedFrames,A=f-this.lastDecodedFrames,o=1e3*i/s,a=this.hls;if(a.trigger(j.Events.FPS_DROP,{currentDropped:i,currentDecoded:A,totalDroppedFrames:v}),o>0&&i>a.config.fpsDroppedMonitoringThreshold*A){var r=a.currentLevel;N.logger.warn("drop FPS ratio greater than max allowed value for currentLevel: "+r),r>0&&(a.autoLevelCapping===-1||a.autoLevelCapping>=r)&&(r=r-1,a.trigger(j.Events.FPS_DROP_LEVEL_CAPPING,{level:r,droppedLevel:a.currentLevel}),a.autoLevelCapping=r,this.streamController.nextLevelSwitch())}}this.lastTime=u,this.lastDroppedFrames=v,this.lastDecodedFrames=f}},M.checkFPSInterval=function(){var R=this.media;if(R)if(this.isVideoPlaybackQualityAvailable){var f=R.getVideoPlaybackQuality();this.checkFPS(R,f.totalVideoFrames,f.droppedVideoFrames)}else this.checkFPS(R,R.webkitDecodedFrameCount,R.webkitDroppedFrameCount)},X}();G.default=O},"./src/controller/fragment-finders.ts":function(oe,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 M}),D.d(G,"pdtWithinToleranceTest",function(){return e}),D.d(G,"findFragWithCC",function(){return R});var j=D("./src/polyfills/number.ts"),N=D("./src/utils/binary-search.ts");function O(f,v,u){if(v===null||!Array.isArray(f)||!f.length||!Object(j.isFiniteNumber)(v))return null;var s=f[0].programDateTime;if(v<(s||0))return null;var i=f[f.length-1].endProgramDateTime;if(v>=(i||0))return null;u=u||0;for(var A=0;A<f.length;++A){var o=f[A];if(e(v,u,o))return o}return null}function X(f,v,u,s){u===void 0&&(u=0),s===void 0&&(s=0);var i=null;if(f?i=v[f.sn-v[0].sn+1]||null:u===0&&v[0].start===0&&(i=v[0]),i&&M(u,s,i)===0)return i;var A=N.default.search(v,M.bind(null,u,s));return A||i}function M(f,v,u){f===void 0&&(f=0),v===void 0&&(v=0);var s=Math.min(v,u.duration+(u.deltaPTS?u.deltaPTS:0));return u.start+u.duration-s<=f?1:u.start-s>f&&u.start?-1:0}function e(f,v,u){var s=Math.min(v,u.duration+(u.deltaPTS?u.deltaPTS:0))*1e3,i=u.endProgramDateTime||0;return i-s>f}function R(f,v){return N.default.search(f,function(u){return u.cc<v?1:u.cc>v?-1:0})}},"./src/controller/fragment-tracker.ts":function(oe,G,D){"use strict";D.r(G),D.d(G,"FragmentState",function(){return O}),D.d(G,"FragmentTracker",function(){return X});var j=D("./src/events.ts"),N=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 f=R.prototype;return f._registerListeners=function(){var u=this.hls;u.on(j.Events.BUFFER_APPENDED,this.onBufferAppended,this),u.on(j.Events.FRAG_BUFFERED,this.onFragBuffered,this),u.on(j.Events.FRAG_LOADED,this.onFragLoaded,this)},f._unregisterListeners=function(){var u=this.hls;u.off(j.Events.BUFFER_APPENDED,this.onBufferAppended,this),u.off(j.Events.FRAG_BUFFERED,this.onFragBuffered,this),u.off(j.Events.FRAG_LOADED,this.onFragLoaded,this)},f.destroy=function(){this._unregisterListeners(),this.fragments=this.timeRanges=null},f.getAppendedFrag=function(u,s){if(s===N.PlaylistLevelType.MAIN){var i=this.activeFragment,A=this.activeParts;if(!i)return null;if(A)for(var o=A.length;o--;){var a=A[o],r=a?a.end:i.appendedPTS;if(a.start<=u&&r!==void 0&&u<=r)return o>9&&(this.activeParts=A.slice(o-9)),a}else if(i.start<=u&&i.appendedPTS!==void 0&&u<=i.appendedPTS)return i}return this.getBufferedFrag(u,s)},f.getBufferedFrag=function(u,s){for(var i=this.fragments,A=Object.keys(i),o=A.length;o--;){var a=i[A[o]];if((a==null?void 0:a.body.type)===s&&a.buffered){var r=a.body;if(r.start<=u&&u<=r.end)return r}}return null},f.detectEvictedFragments=function(u,s,i){var A=this;Object.keys(this.fragments).forEach(function(o){var a=A.fragments[o];if(!a)return;if(!a.buffered){a.body.type===i&&A.removeFragment(a.body);return}var r=a.range[u];if(!r)return;r.time.some(function(t){var _=!A.isTimeBuffered(t.startPTS,t.endPTS,s);return _&&A.removeFragment(a.body),_})})},f.detectPartialFragments=function(u){var s=this,i=this.timeRanges,A=u.frag,o=u.part;if(!i||A.sn==="initSegment")return;var a=e(A),r=this.fragments[a];if(!r)return;Object.keys(i).forEach(function(t){var _=A.elementaryStreams[t];if(!_)return;var y=i[t],b=o!==null||_.partial===!0;r.range[t]=s.getBufferedTimes(A,o,b,y)}),r.backtrack=r.loaded=null,Object.keys(r.range).length?r.buffered=!0:this.removeFragment(r.body)},f.fragBuffered=function(u){var s=e(u),i=this.fragments[s];i&&(i.backtrack=i.loaded=null,i.buffered=!0)},f.getBufferedTimes=function(u,s,i,A){for(var o={time:[],partial:i},a=s?s.start:u.start,r=s?s.end:u.end,t=u.minEndPTS||r,_=u.maxStartPTS||a,y=0;y<A.length;y++){var b=A.start(y)-this.bufferPadding,x=A.end(y)+this.bufferPadding;if(_>=b&&t<=x){o.time.push({startPTS:Math.max(a,A.start(y)),endPTS:Math.min(r,A.end(y))});break}else if(a<x&&r>b)o.partial=!0,o.time.push({startPTS:Math.max(a,A.start(y)),endPTS:Math.min(r,A.end(y))});else if(r<=b)break}return o},f.getPartialFragment=function(u){var s=null,i,A,o,a=0,r=this.bufferPadding,t=this.fragments;return Object.keys(t).forEach(function(_){var y=t[_];if(!y)return;M(y)&&(A=y.body.start-r,o=y.body.end+r,u>=A&&u<=o&&(i=Math.min(u-A,o-u),a<=i&&(s=y.body,a=i)))}),s},f.getState=function(u){var s=e(u),i=this.fragments[s];return i?i.buffered?M(i)?O.PARTIAL:O.OK:i.backtrack?O.BACKTRACKED:O.APPENDING:O.NOT_LOADED},f.backtrack=function(u,s){var i=e(u),A=this.fragments[i];if(!A||A.backtrack)return null;var o=A.backtrack=s||A.loaded;return A.loaded=null,o},f.getBacktrackData=function(u){var s=e(u),i=this.fragments[s];if(i){var A,o=i.backtrack;if(o!=null&&(A=o.payload)!==null&&A!==void 0&&A.byteLength)return o;this.removeFragment(u)}return null},f.isTimeBuffered=function(u,s,i){for(var A,o,a=0;a<i.length;a++){if(A=i.start(a)-this.bufferPadding,o=i.end(a)+this.bufferPadding,u>=A&&s<=o)return!0;if(s<=A)return!1}return!1},f.onFragLoaded=function(u,s){var i=s.frag,A=s.part;if(i.sn==="initSegment"||i.bitrateTest||A)return;var o=e(i);this.fragments[o]={body:i,loaded:s,backtrack:null,buffered:!1,range:Object.create(null)}},f.onBufferAppended=function(u,s){var i=this,A=s.frag,o=s.part,a=s.timeRanges;if(A.type===N.PlaylistLevelType.MAIN)if(this.activeFragment=A,o){var r=this.activeParts;r||(this.activeParts=r=[]),r.push(o)}else this.activeParts=null;this.timeRanges=a,Object.keys(a).forEach(function(t){var _=a[t];if(i.detectEvictedFragments(t,_),!o)for(var y=0;y<_.length;y++)A.appendedPTS=Math.max(_.end(y),A.appendedPTS||0)})},f.onFragBuffered=function(u,s){this.detectPartialFragments(s)},f.hasFragment=function(u){var s=e(u);return!!this.fragments[s]},f.removeFragmentsInRange=function(u,s,i){var A=this;Object.keys(this.fragments).forEach(function(o){var a=A.fragments[o];if(!a)return;if(a.buffered){var r=a.body;r.type===i&&r.start<s&&r.end>u&&A.removeFragment(r)}})},f.removeFragment=function(u){var s=e(u);u.stats.loaded=0,u.clearElementaryStreamInfo(),delete this.fragments[s]},f.removeAllFragments=function(){this.fragments=Object.create(null),this.activeFragment=null,this.activeParts=null},R}();function M(R){var f,v;return R.buffered&&(((f=R.range.video)===null||f===void 0?void 0:f.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(oe,G,D){"use strict";D.r(G),D.d(G,"STALL_MINIMUM_DURATION_MS",function(){return M}),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 f}),D.d(G,"default",function(){return v});var j=D("./src/utils/buffer-helper.ts"),N=D("./src/errors.ts"),O=D("./src/events.ts"),X=D("./src/utils/logger.ts"),M=250,e=2,R=.1,f=.05,v=function(){function u(i,A,o,a){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=i,this.media=A,this.fragmentTracker=o,this.hls=a}var s=u.prototype;return s.destroy=function(){this.hls=this.fragmentTracker=this.media=null},s.poll=function(A){var o=this.config,a=this.media,r=this.stalled,t=a.currentTime,_=a.seeking,y=this.seeking&&!_,b=!this.seeking&&_;if(this.seeking=_,t!==A){if(this.moved=!0,r!==null){if(this.stallReported){var x=self.performance.now()-r;X.logger.warn("playback not stuck anymore @"+t+", after "+Math.round(x)+"ms"),this.stallReported=!1}this.stalled=null,this.nudgeRetry=0}return}if((b||y)&&(this.stalled=null),a.paused||a.ended||a.playbackRate===0||!j.BufferHelper.getBuffered(a).length)return;var E=j.BufferHelper.bufferInfo(a,t,0),d=E.len>0,n=E.nextStart||0;if(!d&&!n)return;if(_){var l=E.len>e,h=!n||n-t>e&&!this.fragmentTracker.getPartialFragment(t);if(l||h)return;this.moved=!1}if(!this.moved&&this.stalled!==null){var w,g=Math.max(n,E.start||0)-t,c=this.hls.levels?this.hls.levels[this.hls.currentLevel]:null,L=c==null||((w=c.details)===null||w===void 0)?void 0:w.live,F=L?c.details.targetduration*2:e;if(g>0&&g<=F){this._trySkipBufferHole(null);return}}var B=self.performance.now();if(r===null){this.stalled=B;return}var P=B-r;!_&&P>=M&&this._reportStall(E.len);var W=j.BufferHelper.bufferInfo(a,t,o.maxBufferHole);this._tryFixBufferStall(W,P)},s._tryFixBufferStall=function(A,o){var a=this.config,r=this.fragmentTracker,t=this.media,_=t.currentTime,y=r.getPartialFragment(_);if(y){var b=this._trySkipBufferHole(y);if(b)return}A.len>a.maxBufferHole&&o>a.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,a=this.media,r=this.stallReported;r||(this.stallReported=!0,X.logger.warn("Playback stalling at @"+a.currentTime+" due to low buffer (buffer="+A+")"),o.trigger(O.Events.ERROR,{type:N.ErrorTypes.MEDIA_ERROR,details:N.ErrorDetails.BUFFER_STALLED_ERROR,fatal:!1,buffer:A}))},s._trySkipBufferHole=function(A){for(var o=this.config,a=this.hls,r=this.media,t=r.currentTime,_=0,y=j.BufferHelper.getBuffered(r),b=0;b<y.length;b++){var x=y.start(b);if(t+o.maxBufferHole>=_&&t<x){var E=Math.max(x+f,r.currentTime+R);return X.logger.warn("skipping hole, adjusting currentTime from "+t+" to "+E),this.moved=!0,this.stalled=null,r.currentTime=E,A&&a.trigger(O.Events.ERROR,{type:N.ErrorTypes.MEDIA_ERROR,details:N.ErrorDetails.BUFFER_SEEK_OVER_HOLE,fatal:!1,reason:"fragment loaded with buffer holes, seeking from "+t+" to "+E,frag:A}),E}_=y.end(b)}return 0},s._tryNudgeBuffer=function(){var A=this.config,o=this.hls,a=this.media,r=a.currentTime,t=(this.nudgeRetry||0)+1;if(this.nudgeRetry=t,t<A.nudgeMaxRetry){var _=r+t*A.nudgeOffset;X.logger.warn("Nudging 'currentTime' from "+r+" to "+_),a.currentTime=_,o.trigger(O.Events.ERROR,{type:N.ErrorTypes.MEDIA_ERROR,details:N.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:N.ErrorTypes.MEDIA_ERROR,details:N.ErrorDetails.BUFFER_STALLED_ERROR,fatal:!0})},u}()},"./src/controller/id3-track-controller.ts":function(oe,G,D){"use strict";D.r(G);var j=D("./src/events.ts"),N=D("./src/utils/texttrack-utils.ts"),O=D("./src/demux/id3.ts"),X=.25,M=function(){function e(f){this.hls=void 0,this.id3Track=null,this.media=null,this.hls=f,this._registerListeners()}var R=e.prototype;return R.destroy=function(){this._unregisterListeners()},R._registerListeners=function(){var v=this.hls;v.on(j.Events.MEDIA_ATTACHED,this.onMediaAttached,this),v.on(j.Events.MEDIA_DETACHING,this.onMediaDetaching,this),v.on(j.Events.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),v.on(j.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},R._unregisterListeners=function(){var v=this.hls;v.off(j.Events.MEDIA_ATTACHED,this.onMediaAttached,this),v.off(j.Events.MEDIA_DETACHING,this.onMediaDetaching,this),v.off(j.Events.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),v.off(j.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},R.onMediaAttached=function(v,u){this.media=u.media},R.onMediaDetaching=function(){if(!this.id3Track)return;Object(N.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(N.sendAddTrackEvent)(s,this.media),s}return this.media.addTextTrack("metadata","id3")},R.onFragParsingMetadata=function(v,u){if(!this.media)return;var s=u.frag,i=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<i.length;o++){var a=O.getID3Frames(i[o].data);if(a){var r=i[o].pts,t=o<i.length-1?i[o+1].pts:s.end,_=t-r;_<=0&&(t=r+X);for(var y=0;y<a.length;y++){var b=a[y];if(!O.isTimeStampFrame(b)){var x=new A(r,t,"");x.value=b,this.id3Track.addCue(x)}}}}},R.onBufferFlushing=function(v,u){var s=u.startOffset,i=u.endOffset,A=u.type;if(!A||A==="audio"){var o=this.id3Track;o&&Object(N.removeCuesInRange)(o,s,i)}},e}();G.default=M},"./src/controller/latency-controller.ts":function(oe,G,D){"use strict";D.r(G),D.d(G,"default",function(){return e});var j=D("./src/errors.ts"),N=D("./src/events.ts"),O=D("./src/utils/logger.ts");function X(R,f){for(var v=0;v<f.length;v++){var u=f[v];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(R,u.key,u)}}function M(R,f,v){return f&&X(R.prototype,f),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 f=R.prototype;return f.destroy=function(){this.unregisterListeners(),this.onMediaDetaching(),this.levelDetails=null,this.hls=this.timeupdateHandler=null},f.registerListeners=function(){this.hls.on(N.Events.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.on(N.Events.MEDIA_DETACHING,this.onMediaDetaching,this),this.hls.on(N.Events.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.on(N.Events.LEVEL_UPDATED,this.onLevelUpdated,this),this.hls.on(N.Events.ERROR,this.onError,this)},f.unregisterListeners=function(){this.hls.off(N.Events.MEDIA_ATTACHED,this.onMediaAttached),this.hls.off(N.Events.MEDIA_DETACHING,this.onMediaDetaching),this.hls.off(N.Events.MANIFEST_LOADING,this.onManifestLoading),this.hls.off(N.Events.LEVEL_UPDATED,this.onLevelUpdated),this.hls.off(N.Events.ERROR,this.onError)},f.onMediaAttached=function(u,s){this.media=s.media,this.media.addEventListener("timeupdate",this.timeupdateHandler)},f.onMediaDetaching=function(){this.media&&(this.media.removeEventListener("timeupdate",this.timeupdateHandler),this.media=null)},f.onManifestLoading=function(){this.levelDetails=null,this._latency=null,this.stallCount=0},f.onLevelUpdated=function(u,s){var i=s.details;this.levelDetails=i,i.advanced&&this.timeupdate(),!i.live&&this.media&&this.media.removeEventListener("timeupdate",this.timeupdateHandler)},f.onError=function(u,s){if(s.details!==j.ErrorDetails.BUFFER_STALLED_ERROR)return;this.stallCount++,O.logger.warn("[playback-rate-controller]: Stall detected, adjusting target latency")},f.timeupdate=function(){var u=this.media,s=this.levelDetails;if(!u||!s)return;this.currentTime=u.currentTime;var i=this.computeLatency();if(i===null)return;this._latency=i;var A=this.config,o=A.lowLatencyMode,a=A.maxLiveSyncPlaybackRate;if(!o||a===1)return;var r=this.targetLatency;if(r===null)return;var t=i-r,_=Math.min(this.maxLatency,r+s.targetduration),y=t<_;if(s.live&&y&&t>.05&&this.forwardBufferLength>1){var b=Math.min(2,Math.max(1,a)),x=Math.round(2/(1+Math.exp(-.75*t-this.edgeStalled))*20)/20;u.playbackRate=Math.min(b,Math.max(1,x))}else u.playbackRate!==1&&u.playbackRate!==0&&(u.playbackRate=1)},f.estimateLiveEdge=function(){var u=this.levelDetails;return u===null?null:u.edge+u.age},f.computeLatency=function(){var u=this.estimateLiveEdge();return u===null?null:u-this.currentTime},M(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,i=u.partHoldBack,A=u.targetduration,o=this.config,a=o.liveSyncDuration,r=o.liveSyncDurationCount,t=o.lowLatencyMode,_=this.hls.userConfig,y=t&&i||s;(_.liveSyncDuration||_.liveSyncDurationCount||y===0)&&(y=a!==void 0?a:r*A);var b=A,x=1;return y+Math.min(this.stallCount*x,b)}},{key:"liveSyncPosition",get:function(){var u=this.estimateLiveEdge(),s=this.targetLatency,i=this.levelDetails;if(u===null||s===null||i===null)return null;var A=i.edge,o=u-s-this.edgeStalled,a=A-i.totalduration,r=A-(this.config.lowLatencyMode&&i.partTarget||i.targetduration);return Math.min(Math.max(a,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 i=u.buffered.length;return i?u.buffered.end(i-1):s.edge-this.currentTime}}]),R}()},"./src/controller/level-controller.ts":function(oe,G,D){"use strict";D.r(G),D.d(G,"default",function(){return o});var j=D("./src/types/level.ts"),N=D("./src/events.ts"),O=D("./src/errors.ts"),X=D("./src/utils/codecs.ts"),M=D("./src/controller/level-helper.ts"),e=D("./src/controller/base-playlist-controller.ts"),R=D("./src/types/loader.ts");function f(){return f=Object.assign||function(a){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var _ in t)Object.prototype.hasOwnProperty.call(t,_)&&(a[_]=t[_])}return a},f.apply(this,arguments)}function v(a,r){for(var t=0;t<r.length;t++){var _=r[t];_.enumerable=_.enumerable||!1,_.configurable=!0,"value"in _&&(_.writable=!0),Object.defineProperty(a,_.key,_)}}function u(a,r,t){return r&&v(a.prototype,r),t&&v(a,t),a}function s(a,r){a.prototype=Object.create(r.prototype),a.prototype.constructor=a,i(a,r)}function i(a,r){return i=Object.setPrototypeOf||function(_,y){return _.__proto__=y,_},i(a,r)}var A=/chrome|firefox/.test(navigator.userAgent.toLowerCase()),o=function(a){s(r,a);function r(_){var y;return y=a.call(this,_,"[level-controller]")||this,y._levels=[],y._firstLevel=-1,y._startLevel=void 0,y.currentLevelIndex=-1,y.manualLevelIndex=-1,y.onParsedComplete=void 0,y._registerListeners(),y}var t=r.prototype;return t._registerListeners=function(){var y=this.hls;y.on(N.Events.MANIFEST_LOADED,this.onManifestLoaded,this),y.on(N.Events.LEVEL_LOADED,this.onLevelLoaded,this),y.on(N.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),y.on(N.Events.FRAG_LOADED,this.onFragLoaded,this),y.on(N.Events.ERROR,this.onError,this)},t._unregisterListeners=function(){var y=this.hls;y.off(N.Events.MANIFEST_LOADED,this.onManifestLoaded,this),y.off(N.Events.LEVEL_LOADED,this.onLevelLoaded,this),y.off(N.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),y.off(N.Events.FRAG_LOADED,this.onFragLoaded,this),y.off(N.Events.ERROR,this.onError,this)},t.destroy=function(){this._unregisterListeners(),this.manualLevelIndex=-1,this._levels.length=0,a.prototype.destroy.call(this)},t.startLoad=function(){var y=this._levels;y.forEach(function(b){b.loadError=0}),a.prototype.startLoad.call(this)},t.onManifestLoaded=function(y,b){var x=[],E=[],d=[],n,l={},h,w=!1,g=!1,c=!1;if(b.levels.forEach(function(P){var W=P.attrs;w=w||!!(P.width&&P.height),g=g||!!P.videoCodec,c=c||!!P.audioCodec,A&&P.audioCodec&&P.audioCodec.indexOf("mp4a.40.34")!==-1&&(P.audioCodec=void 0);var U=P.bitrate+"-"+P.attrs.RESOLUTION+"-"+P.attrs.CODECS;h=l[U],h?h.url.push(P.url):(h=new j.Level(P),l[U]=h,x.push(h)),W&&(W.AUDIO&&Object(M.addGroupId)(h,"audio",W.AUDIO),W.SUBTITLES&&Object(M.addGroupId)(h,"text",W.SUBTITLES))}),(w||g)&&c&&(x=x.filter(function(P){var W=P.videoCodec,U=P.width,$=P.height;return!!W||!!(U&&$)})),x=x.filter(function(P){var W=P.audioCodec,U=P.videoCodec;return(!W||Object(X.isCodecSupportedInMp4)(W,"audio"))&&(!U||Object(X.isCodecSupportedInMp4)(U,"video"))}),b.audioTracks&&(E=b.audioTracks.filter(function(P){return!P.audioCodec||Object(X.isCodecSupportedInMp4)(P.audioCodec,"audio")}),Object(M.assignTrackIdsByGroup)(E)),b.subtitles&&(d=b.subtitles,Object(M.assignTrackIdsByGroup)(d)),x.length>0){n=x[0].bitrate,x.sort(function(P,W){return P.bitrate-W.bitrate}),this._levels=x;for(var L=0;L<x.length;L++)if(x[L].bitrate===n){this._firstLevel=L,this.log("manifest loaded, "+x.length+" level(s) found, first bitrate: "+n);break}var F=c&&!g,B={levels:x,audioTracks:E,subtitleTracks:d,firstLevel:this._firstLevel,stats:b.stats,audio:c,video:g,altAudio:!F&&E.some(function(P){return!!P.url})};this.hls.trigger(N.Events.MANIFEST_PARSED,B),(this.hls.config.autoStartLoad||this.hls.forceStartLoad)&&this.hls.startLoad(this.hls.config.startPosition)}else this.hls.trigger(N.Events.ERROR,{type:O.ErrorTypes.MEDIA_ERROR,details:O.ErrorDetails.MANIFEST_INCOMPATIBLE_CODECS_ERROR,fatal:!0,url:b.url,reason:"no level with compatible codecs found in manifest"})},t.onError=function(y,b){if(a.prototype.onError.call(this,y,b),b.fatal)return;var x=b.context,E=this._levels[this.currentLevelIndex];if(x&&(x.type===R.PlaylistContextType.AUDIO_TRACK&&E.audioGroupIds&&x.groupId===E.audioGroupIds[E.urlId]||x.type===R.PlaylistContextType.SUBTITLE_TRACK&&E.textGroupIds&&x.groupId===E.textGroupIds[E.urlId])){this.redundantFailover(this.currentLevelIndex);return}var d=!1,n=!0,l;switch(b.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(b.frag){var h=this._levels[b.frag.level];h?(h.fragmentError++,h.fragmentError>this.hls.config.fragLoadingMaxRetry&&(l=b.frag.level)):l=b.frag.level}break;case O.ErrorDetails.LEVEL_LOAD_ERROR:case O.ErrorDetails.LEVEL_LOAD_TIMEOUT:x&&(x.deliveryDirectives&&(n=!1),l=x.level),d=!0;break;case O.ErrorDetails.REMUX_ALLOC_ERROR:l=b.level,d=!0;break}l!==void 0&&this.recoverLevel(b,l,d,n)},t.recoverLevel=function(y,b,x,E){var d=y.details,n=this._levels[b];if(n.loadError++,x){var l=this.retryLoadingOrFail(y);if(l)y.levelRetry=!0;else{this.currentLevelIndex=-1;return}}if(E){var h=n.url.length;if(h>1&&n.loadError<h)y.levelRetry=!0,this.redundantFailover(b);else if(this.manualLevelIndex===-1){var w=b===0?this._levels.length-1:b-1;this.currentLevelIndex!==w&&this._levels[w].loadError===0&&(this.warn(d+": switch to "+w),y.levelRetry=!0,this.hls.nextAutoLevel=w)}}},t.redundantFailover=function(y){var b=this._levels[y],x=b.url.length;if(x>1){var E=(b.urlId+1)%x;this.warn("Switching to redundant URL-id "+E),this._levels.forEach(function(d){d.urlId=E}),this.level=y}},t.onFragLoaded=function(y,b){var x=b.frag;if(x!==void 0&&x.type===R.PlaylistLevelType.MAIN){var E=this._levels[x.level];E!==void 0&&(E.fragmentError=0,E.loadError=0)}},t.onLevelLoaded=function(y,b){var x,E=b.level,d=b.details,n=this._levels[E];if(!n){var l;this.warn("Invalid level index "+E),(l=b.deliveryDirectives)!==null&&l!==void 0&&l.skip&&(d.deltaUpdateFailed=!0);return}E===this.currentLevelIndex?(n.fragmentError===0&&(n.loadError=0,this.retryCount=0),this.playlistLoaded(E,b,n.details)):(x=b.deliveryDirectives)!==null&&x!==void 0&&x.skip&&(d.deltaUpdateFailed=!0)},t.onAudioTrackSwitched=function(y,b){var x=this.hls.levels[this.currentLevelIndex];if(!x)return;if(x.audioGroupIds){for(var E=-1,d=this.hls.audioTracks[b.id].groupId,n=0;n<x.audioGroupIds.length;n++)if(x.audioGroupIds[n]===d){E=n;break}E!==x.urlId&&(x.urlId=E,this.startLoad())}},t.loadPlaylist=function(y){var b=this.currentLevelIndex,x=this._levels[b];if(this.canLoad&&x&&x.url.length>0){var E=x.urlId,d=x.url[E];if(y)try{d=y.addDirectives(d)}catch(n){this.warn("Could not construct new URL with HLS Delivery Directives: "+n)}this.log("Attempt loading level index "+b+(y?" at sn "+y.msn+" part "+y.part:"")+" with URL-id "+E+" "+d),this.clearTimer(),this.hls.trigger(N.Events.LEVEL_LOADING,{url:d,level:b,id:E,deliveryDirectives:y||null})}},t.removeLevel=function(y,b){var x=function(n,l){return l!==b},E=this._levels.filter(function(d,n){return n!==y?!0:d.url.length>1&&b!==void 0?(d.url=d.url.filter(x),d.audioGroupIds&&(d.audioGroupIds=d.audioGroupIds.filter(x)),d.textGroupIds&&(d.textGroupIds=d.textGroupIds.filter(x)),d.urlId=0,!0):!1}).map(function(d,n){var l=d.details;return l!=null&&l.fragments&&l.fragments.forEach(function(h){h.level=n}),d});this._levels=E,this.hls.trigger(N.Events.LEVELS_UPDATED,{levels:E})},u(r,[{key:"levels",get:function(){return this._levels.length===0?null:this._levels}},{key:"level",get:function(){return this.currentLevelIndex},set:function(y){var b,x=this._levels;if(x.length===0)return;if(this.currentLevelIndex===y&&(b=x[y])!==null&&b!==void 0&&b.details)return;if(y<0||y>=x.length){var E=y<0;if(this.hls.trigger(N.Events.ERROR,{type:O.ErrorTypes.OTHER_ERROR,details:O.ErrorDetails.LEVEL_SWITCH_ERROR,level:y,fatal:E,reason:"invalid level idx"}),E)return;y=Math.min(y,x.length-1)}this.clearTimer();var d=this.currentLevelIndex,n=x[d],l=x[y];this.log("switching to level "+y+" from "+d),this.currentLevelIndex=y;var h=f({},l,{level:y,maxBitrate:l.maxBitrate,uri:l.uri,urlId:l.urlId});delete h._urlId,this.hls.trigger(N.Events.LEVEL_SWITCHING,h);var w=l.details;if(!w||w.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(y){this.manualLevelIndex=y,this._startLevel===void 0&&(this._startLevel=y),y!==-1&&(this.level=y)}},{key:"firstLevel",get:function(){return this._firstLevel},set:function(y){this._firstLevel=y}},{key:"startLevel",get:function(){if(this._startLevel===void 0){var y=this.hls.config.startLevel;return y!==void 0?y:this._firstLevel}else return this._startLevel},set:function(y){this._startLevel=y}},{key:"nextLoadLevel",get:function(){return this.manualLevelIndex!==-1?this.manualLevelIndex:this.hls.nextAutoLevel},set:function(y){this.level=y,this.manualLevelIndex===-1&&(this.hls.nextAutoLevel=y)}}]),r}(e.default)},"./src/controller/level-helper.ts":function(oe,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 M}),D.d(G,"updateFragPTSDTS",function(){return R}),D.d(G,"mergeDetails",function(){return f}),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 i}),D.d(G,"computeReloadInterval",function(){return A}),D.d(G,"getFragmentWithSN",function(){return o}),D.d(G,"getPartWith",function(){return a});var j=D("./src/polyfills/number.ts"),N=D("./src/utils/logger.ts");function O(r,t,_){switch(t){case"audio":r.audioGroupIds||(r.audioGroupIds=[]),r.audioGroupIds.push(_);break;case"text":r.textGroupIds||(r.textGroupIds=[]),r.textGroupIds.push(_);break}}function X(r){var t={};r.forEach(function(_){var y=_.groupId||"";_.id=t[y]=t[y]||0,t[y]++})}function M(r,t,_){var y=r[t],b=r[_];e(y,b)}function e(r,t){var _=t.startPTS;if(Object(j.isFiniteNumber)(_)){var y=0,b;t.sn>r.sn?(y=_-r.start,b=r):(y=r.start-_,b=t),b.duration!==y&&(b.duration=y)}else if(t.sn>r.sn){var x=r.cc===t.cc;x&&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,_,y,b,x){var E=y-_;E<=0&&(N.logger.warn("Fragment should have a positive duration",t),y=_+t.duration,x=b+t.duration);var d=_,n=y,l=t.startPTS,h=t.endPTS;if(Object(j.isFiniteNumber)(l)){var w=Math.abs(l-_);Object(j.isFiniteNumber)(t.deltaPTS)?t.deltaPTS=Math.max(w,t.deltaPTS):t.deltaPTS=w,d=Math.max(_,l),_=Math.min(_,l),b=Math.min(b,t.startDTS),n=Math.min(y,h),y=Math.max(y,h),x=Math.max(x,t.endDTS)}t.duration=y-_;var g=_-t.start;t.appendedPTS=y,t.start=t.startPTS=_,t.maxStartPTS=d,t.startDTS=b,t.endPTS=y,t.minEndPTS=n,t.endDTS=x;var c=t.sn;if(!r||c<r.startSN||c>r.endSN)return 0;var L,F=c-r.startSN,B=r.fragments;for(B[F]=t,L=F;L>0;L--)e(B[L],B[L-1]);for(L=F;L<B.length-1;L++)e(B[L],B[L+1]);return r.fragmentHint&&e(B[B.length-1],r.fragmentHint),r.PTSKnown=r.alignedSliding=!0,g}function f(r,t){for(var _=null,y=r.fragments,b=y.length-1;b>=0;b--){var x=y[b].initSegment;if(x){_=x;break}}r.fragmentHint&&delete r.fragmentHint.endPTS;var E=0,d;if(u(r,t,function(L,F){L.relurl&&(E=L.cc-F.cc),Object(j.isFiniteNumber)(L.startPTS)&&Object(j.isFiniteNumber)(L.endPTS)&&(F.start=F.startPTS=L.startPTS,F.startDTS=L.startDTS,F.appendedPTS=L.appendedPTS,F.maxStartPTS=L.maxStartPTS,F.endPTS=L.endPTS,F.endDTS=L.endDTS,F.minEndPTS=L.minEndPTS,F.duration=L.endPTS-L.startPTS,F.duration&&(d=F),t.PTSKnown=t.alignedSliding=!0),F.elementaryStreams=L.elementaryStreams,F.loader=L.loader,F.stats=L.stats,F.urlId=L.urlId,L.initSegment&&(F.initSegment=L.initSegment,_=L.initSegment)}),_){var n=t.fragmentHint?t.fragments.concat(t.fragmentHint):t.fragments;n.forEach(function(L){var F;(!L.initSegment||L.initSegment.relurl===((F=_)===null||F===void 0?void 0:F.relurl))&&(L.initSegment=_)})}if(t.skippedSegments&&(t.deltaUpdateFailed=t.fragments.some(function(L){return!L}),t.deltaUpdateFailed)){N.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 h=t.fragments;if(E){N.logger.warn("discontinuity sliding from playlist, take drift into account");for(var w=0;w<h.length;w++)h[w].cc+=E}t.skippedSegments&&(t.startCC=t.fragments[0].cc),v(r.partList,t.partList,function(L,F){F.elementaryStreams=L.elementaryStreams,F.stats=L.stats}),d?R(t,d,d.startPTS,d.endPTS,d.startDTS,d.endDTS):s(r,t),h.length&&(t.totalduration=t.edge-h[0].start),t.driftStartTime=r.driftStartTime,t.driftStart=r.driftStart;var g=t.advancedDateTime;if(t.advanced&&g){var c=t.edge;t.driftStart||(t.driftStartTime=g,t.driftStart=c),t.driftEndTime=g,t.driftEnd=c}else t.driftEndTime=r.driftEndTime,t.driftEnd=r.driftEnd,t.advancedDateTime=r.advancedDateTime}function v(r,t,_){if(r&&t)for(var y=0,b=0,x=r.length;b<=x;b++){var E=r[b],d=t[b+y];E&&d&&E.index===d.index&&E.fragment.sn===d.fragment.sn?_(E,d):y--}}function u(r,t,_){for(var y=t.skippedSegments,b=Math.max(r.startSN,t.startSN)-t.startSN,x=(r.fragmentHint?1:0)+(y?t.endSN:Math.min(r.endSN,t.endSN))-t.startSN,E=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=b;l<=x;l++){var h=n[E+l],w=d[l];y&&!w&&l<y&&(w=t.fragments[l]=h),h&&w&&_(h,w)}}function s(r,t){var _=t.startSN+t.skippedSegments-r.startSN,y=r.fragments;if(_<0||_>=y.length)return;i(t,y[_].start)}function i(r,t){if(t){for(var _=r.fragments,y=r.skippedSegments;y<_.length;y++)_[y].start+=t;r.fragmentHint&&(r.fragmentHint.start+=t)}}function A(r,t){var _=1e3*r.levelTargetDuration,y=_/2,b=r.age,x=b>0&&b<_*3,E=t.loading.end-t.loading.start,d,n=r.availabilityDelay;if(r.updated===!1)if(x){var l=333*r.misses;d=Math.max(Math.min(y,E*2),l),r.availabilityDelay=(r.availabilityDelay||0)+d}else d=y;else x?(n=Math.min(n||_/2,b),r.availabilityDelay=n,d=n+_-b):d=_-E;return Math.round(d)}function o(r,t,_){if(!r||!r.details)return null;var y=r.details,b=y.fragments[t-y.startSN];return b||(b=y.fragmentHint,b&&b.sn===t?b:t<y.startSN&&_&&_.sn===t?_:null)}function a(r,t,_){if(!r||!r.details)return null;var y=r.details.partList;if(y)for(var b=y.length;b--;){var x=y[b];if(x.index===_&&x.fragment.sn===t)return x}return null}},"./src/controller/stream-controller.ts":function(oe,G,D){"use strict";D.r(G),D.d(G,"default",function(){return y});var j=D("./src/polyfills/number.ts"),N=D("./src/controller/base-stream-controller.ts"),O=D("./src/is-supported.ts"),X=D("./src/events.ts"),M=D("./src/utils/buffer-helper.ts"),e=D("./src/controller/fragment-tracker.ts"),R=D("./src/types/loader.ts"),f=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"),i=D("./src/errors.ts"),A=D("./src/utils/logger.ts");function o(b,x){for(var E=0;E<x.length;E++){var d=x[E];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(b,d.key,d)}}function a(b,x,E){return x&&o(b.prototype,x),E&&o(b,E),b}function r(b,x){b.prototype=Object.create(x.prototype),b.prototype.constructor=b,t(b,x)}function t(b,x){return t=Object.setPrototypeOf||function(d,n){return d.__proto__=n,d},t(b,x)}var _=100,y=function(b){r(x,b);function x(d,n){var l;return l=b.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 E=x.prototype;return E._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)},E._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)},E.onHandlerDestroying=function(){this._unregisterListeners(),this.onMediaDetaching()},E.startLoad=function(n){if(this.levels){var l=this.lastCurrentTime,h=this.hls;if(this.stopLoad(),this.setInterval(_),this.level=-1,this.fragLoadError=0,!this.startFragRequested){var w=h.startLevel;w===-1&&(h.config.testBandwidth?(w=0,this.bitrateTest=!0):w=h.nextAutoLevel),this.level=h.nextLoadLevel=w,this.loadedmetadata=!1}l>0&&n===-1&&(this.log("Override startPosition with lastCurrentTime @"+l.toFixed(3)),n=l),this.state=N.State.IDLE,this.nextLoadPosition=this.startPosition=this.lastCurrentTime=n,this.tick()}else this._forceStartLoad=!0,this.state=N.State.STOPPED},E.stopLoad=function(){this._forceStartLoad=!1,b.prototype.stopLoad.call(this)},E.doTick=function(){switch(this.state){case N.State.IDLE:this.doTickIdle();break;case N.State.WAITING_LEVEL:{var n,l=this.levels,h=this.level,w=l==null||((n=l[h])===null||n===void 0)?void 0:n.details;if(w&&(!w.live||this.levelLastLoaded===this.level)){if(this.waitForCdnTuneIn(w))break;this.state=N.State.IDLE;break}break}case N.State.FRAG_LOADING_WAITING_RETRY:{var g,c=self.performance.now(),L=this.retryDate;(!L||c>=L||(g=this.media)!==null&&g!==void 0&&g.seeking)&&(this.log("retryDate reached, switch back to IDLE state"),this.state=N.State.IDLE)}break;default:break}this.onTickEnd()},E.onTickEnd=function(){b.prototype.onTickEnd.call(this),this.checkBuffer(),this.checkFragmentChanged()},E.doTickIdle=function(){var n,l,h=this.hls,w=this.levelLastLoaded,g=this.levels,c=this.media,L=h.config,F=h.nextLoadLevel;if(w===null||!c&&(this.startFragRequested||!L.startFragPrefetch))return;if(this.altAudio&&this.audioOnly)return;if(!g||!g[F])return;var B=g[F];this.level=h.nextLoadLevel=F;var P=B.details;if(!P||this.state===N.State.WAITING_LEVEL||P.live&&this.levelLastLoaded!==F){this.state=N.State.WAITING_LEVEL;return}var W=this.getFwdBufferInfo(this.mediaBuffer?this.mediaBuffer:c,R.PlaylistLevelType.MAIN);if(W===null)return;var U=W.len,$=this.getMaxBufferLength(B.maxBitrate);if(U>=$)return;if(this._streamEnded(W,P)){var ee={};this.altAudio&&(ee.type="video"),this.hls.trigger(X.Events.BUFFER_EOS,ee),this.state=N.State.ENDED;return}var pe=W.end,fe=this.getNextFragment(pe,P);if(this.couldBacktrack&&!this.fragPrevious&&fe&&fe.sn!=="initSegment"){var Le=fe.sn-P.startSN;Le>1&&(fe=P.fragments[Le-1],this.fragmentTracker.removeFragment(fe))}if(fe&&this.fragmentTracker.getState(fe)===e.FragmentState.OK&&this.nextLoadPosition>pe){var Ie=this.audioOnly&&!this.altAudio?f.ElementaryStreamTypes.AUDIO:f.ElementaryStreamTypes.VIDEO;this.afterBufferFlushed(c,Ie,R.PlaylistLevelType.MAIN),fe=this.getNextFragment(this.nextLoadPosition,P)}if(!fe)return;fe.initSegment&&!fe.initSegment.data&&!this.bitrateTest&&(fe=fe.initSegment),((n=fe.decryptdata)===null||n===void 0?void 0:n.keyFormat)==="identity"&&!((l=fe.decryptdata)!==null&&l!==void 0&&l.key)?this.loadKey(fe,P):this.loadFragment(fe,P,pe)},E.loadFragment=function(n,l,h){var w,g=this.fragmentTracker.getState(n);if(this.fragCurrent=n,g===e.FragmentState.BACKTRACKED){var c=this.fragmentTracker.getBacktrackData(n);if(c){this._handleFragmentLoadProgress(c),this._handleFragmentLoadComplete(c);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,b.prototype.loadFragment.call(this,n,l,h)):g===e.FragmentState.APPENDING?this.reduceMaxBufferLength(n.duration)&&this.fragmentTracker.removeFragment(n):((w=this.media)===null||w===void 0?void 0:w.buffered.length)===0&&this.fragmentTracker.removeAllFragments()},E.getAppendedFrag=function(n){var l=this.fragmentTracker.getAppendedFrag(n,R.PlaylistLevelType.MAIN);return l&&"fragment"in l?l.fragment:l},E.getBufferedFrag=function(n){return this.fragmentTracker.getBufferedFrag(n,R.PlaylistLevelType.MAIN)},E.followingBufferedFrag=function(n){return n?this.getBufferedFrag(n.end+.5):null},E.immediateLevelSwitch=function(){this.abortCurrentFrag(),this.flushMainBuffer(0,Number.POSITIVE_INFINITY)},E.nextLevelSwitch=function(){var n=this.levels,l=this.media;if(l!=null&&l.readyState){var h,w=this.getAppendedFrag(l.currentTime);if(w&&w.start>1&&this.flushMainBuffer(0,w.start-1),!l.paused&&n){var g=this.hls.nextLoadLevel,c=n[g],L=this.fragLastKbps;L&&this.fragCurrent?h=this.fragCurrent.duration*c.maxBitrate/(1e3*L)+1:h=0}else h=0;var F=this.getBufferedFrag(l.currentTime+h);if(F){var B=this.followingBufferedFrag(F);if(B){this.abortCurrentFrag();var P=B.maxStartPTS?B.maxStartPTS:B.start,W=B.duration,U=Math.max(F.end,P+Math.min(Math.max(W-this.config.maxFragLookUpTolerance,W*.5),W*.75));this.flushMainBuffer(U,Number.POSITIVE_INFINITY)}}}},E.abortCurrentFrag=function(){var n=this.fragCurrent;this.fragCurrent=null,n!=null&&n.loader&&n.loader.abort(),this.state===N.State.KEY_LOADING&&(this.state=N.State.IDLE),this.nextLoadPosition=this.getLoadPosition()},E.flushMainBuffer=function(n,l){b.prototype.flushMainBuffer.call(this,n,l,this.altAudio?"video":null)},E.onMediaAttached=function(n,l){b.prototype.onMediaAttached.call(this,n,l);var h=l.media;this.onvplaying=this.onMediaPlaying.bind(this),this.onvseeked=this.onMediaSeeked.bind(this),h.addEventListener("playing",this.onvplaying),h.addEventListener("seeked",this.onvseeked),this.gapController=new s.default(this.config,h,this.fragmentTracker,this.hls)},E.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),b.prototype.onMediaDetaching.call(this)},E.onMediaPlaying=function(){this.tick()},E.onMediaSeeked=function(){var n=this.media,l=n?n.currentTime:null;Object(j.isFiniteNumber)(l)&&this.log("Media seeked to "+l.toFixed(3)),this.tick()},E.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},E.onManifestParsed=function(n,l){var h=!1,w=!1,g;l.levels.forEach(function(c){g=c.audioCodec,g&&(g.indexOf("mp4a.40.2")!==-1&&(h=!0),g.indexOf("mp4a.40.5")!==-1&&(w=!0))}),this.audioCodecSwitch=h&&w&&!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},E.onLevelLoading=function(n,l){var h=this.levels;if(!h||this.state!==N.State.IDLE)return;var w=h[l.level];(!w.details||w.details.live&&this.levelLastLoaded!==l.level||this.waitForCdnTuneIn(w.details))&&(this.state=N.State.WAITING_LEVEL)},E.onLevelLoaded=function(n,l){var h,w=this.levels,g=l.level,c=l.details,L=c.totalduration;if(!w){this.warn("Levels were reset while loading level "+g);return}this.log("Level "+g+" loaded ["+c.startSN+","+c.endSN+"], cc ["+c.startCC+", "+c.endCC+"] duration:"+L);var F=this.fragCurrent;F&&(this.state===N.State.FRAG_LOADING||this.state===N.State.FRAG_LOADING_WAITING_RETRY)&&(F.level!==l.level&&F.loader&&(this.state=N.State.IDLE,F.loader.abort()));var B=w[g],P=0;if(c.live||(h=B.details)!==null&&h!==void 0&&h.live){if(c.fragments[0]||(c.deltaUpdateFailed=!0),c.deltaUpdateFailed)return;P=this.alignPlaylists(c,B.details)}if(B.details=c,this.levelLastLoaded=g,this.hls.trigger(X.Events.LEVEL_UPDATED,{details:c,level:g}),this.state===N.State.WAITING_LEVEL){if(this.waitForCdnTuneIn(c))return;this.state=N.State.IDLE}this.startFragRequested?c.live&&this.synchronizeToLiveEdge(c):this.setStartPosition(c,P),this.tick()},E._handleFragmentLoadProgress=function(n){var l,h=n.frag,w=n.part,g=n.payload,c=this.levels;if(!c){this.warn("Levels were reset while fragment load was in progress. Fragment "+h.sn+" of level "+h.level+" will not be buffered");return}var L=c[h.level],F=L.details;if(!F){this.warn("Dropping fragment "+h.sn+" of level "+h.level+" after level details were reset");return}var B=L.videoCodec,P=F.PTSKnown||!F.live,W=(l=h.initSegment)===null||l===void 0?void 0:l.data,U=this._getAudioCodec(L),$=this.transmuxer=this.transmuxer||new v.default(this.hls,R.PlaylistLevelType.MAIN,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)),ee=w?w.index:-1,pe=ee!==-1,fe=new u.ChunkMetadata(h.level,h.sn,h.stats.chunkCount,g.byteLength,ee,pe),Le=this.initPTS[h.cc];$.push(g,W,U,B,h,w,F.totalduration,P,fe,Le)},E.onAudioTrackSwitching=function(n,l){var h=this.altAudio,w=!!l.url,g=l.id;if(!w){if(this.mediaBuffer!==this.media){this.log("Switching on main audio, use media.buffered to schedule main fragment loading"),this.mediaBuffer=this.media;var c=this.fragCurrent;c!=null&&c.loader&&(this.log("Switching to main audio track, cancel main fragment load"),c.loader.abort()),this.resetTransmuxer(),this.resetLoadingState()}else this.audioOnly&&this.resetTransmuxer();var L=this.hls;h&&L.trigger(X.Events.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:"audio"}),L.trigger(X.Events.AUDIO_TRACK_SWITCHED,{id:g})}},E.onAudioTrackSwitched=function(n,l){var h=l.id,w=!!this.hls.audioTracks[h].url;if(w){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=w,this.tick()},E.onBufferCreated=function(n,l){var h=l.tracks,w,g,c=!1;for(var L in h){var F=h[L];if(F.id==="main"){if(g=L,w=F,L==="video"){var B=h[L];B&&(this.videoBuffer=B.buffer)}}else c=!0}c&&w?(this.log("Alternate track found, use "+g+".buffered to schedule main fragment loading"),this.mediaBuffer=w.buffer):this.mediaBuffer=this.media},E.onFragBuffered=function(n,l){var h=l.frag,w=l.part;if(h&&h.type!==R.PlaylistLevelType.MAIN)return;if(this.fragContextChanged(h)){this.warn("Fragment "+h.sn+(w?" p: "+w.index:"")+" of level "+h.level+" finished buffering, but was aborted. state: "+this.state),this.state===N.State.PARSED&&(this.state=N.State.IDLE);return}var g=w?w.stats:h.stats;this.fragLastKbps=Math.round(8*g.total/(g.buffering.end-g.loading.first)),h.sn!=="initSegment"&&(this.fragPrevious=h),this.fragBufferedComplete(h,w)},E.onError=function(n,l){switch(l.details){case i.ErrorDetails.FRAG_LOAD_ERROR:case i.ErrorDetails.FRAG_LOAD_TIMEOUT:case i.ErrorDetails.KEY_LOAD_ERROR:case i.ErrorDetails.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(R.PlaylistLevelType.MAIN,l);break;case i.ErrorDetails.LEVEL_LOAD_ERROR:case i.ErrorDetails.LEVEL_LOAD_TIMEOUT:this.state!==N.State.ERROR&&(l.fatal?(this.warn(""+l.details),this.state=N.State.ERROR):!l.levelRetry&&this.state===N.State.WAITING_LEVEL&&(this.state=N.State.IDLE));break;case i.ErrorDetails.BUFFER_FULL_ERROR:if(l.parent==="main"&&(this.state===N.State.PARSING||this.state===N.State.PARSED)){var h=!0,w=this.getFwdBufferInfo(this.media,R.PlaylistLevelType.MAIN);w&&w.len>.5&&(h=!this.reduceMaxBufferLength(w.len)),h&&(this.warn("buffer full error also media.currentTime is not buffered, flush main"),this.immediateLevelSwitch()),this.resetLoadingState()}break;default:break}},E.checkBuffer=function(){var n=this.media,l=this.gapController;if(!n||!l||!n.readyState)return;var h=M.BufferHelper.getBuffered(n);!this.loadedmetadata&&h.length?(this.loadedmetadata=!0,this.seekToStartPos()):l.poll(this.lastCurrentTime),this.lastCurrentTime=n.currentTime},E.onFragLoadEmergencyAborted=function(){this.state=N.State.IDLE,this.loadedmetadata||(this.startFragRequested=!1,this.nextLoadPosition=this.startPosition),this.tickImmediate()},E.onBufferFlushed=function(n,l){var h=l.type;if(h!==f.ElementaryStreamTypes.AUDIO||this.audioOnly&&!this.altAudio){var w=(h===f.ElementaryStreamTypes.VIDEO?this.videoBuffer:this.mediaBuffer)||this.media;this.afterBufferFlushed(w,h,R.PlaylistLevelType.MAIN)}},E.onLevelsUpdated=function(n,l){this.levels=l.levels},E.swapAudioCodec=function(){this.audioCodecSwap=!this.audioCodecSwap},E.seekToStartPos=function(){var n=this.media,l=n.currentTime,h=this.startPosition;if(h>=0&&l<h){if(n.seeking){A.logger.log("could not seek to "+h+", already seeking at "+l);return}var w=M.BufferHelper.getBuffered(n),g=w.length?w.start(0):0,c=g-h;c>0&&(c<this.config.maxBufferHole||c<this.config.maxFragLookUpTolerance)&&(A.logger.log("adjusting start position by "+c+" to match buffer start"),h+=c,this.startPosition=h),this.log("seek to target start position "+h+" from current time "+l),n.currentTime=h}},E._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},E._loadBitrateTestFrag=function(n){var l=this;this._doFragLoad(n).then(function(h){var w=l.hls;if(!h||w.nextLoadLevel||l.fragContextChanged(n))return;l.fragLoadError=0,l.state=N.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(),w.trigger(X.Events.FRAG_LOADED,h)})},E._handleTransmuxComplete=function(n){var l,h="main",w=this.hls,g=n.remuxResult,c=n.chunkMeta,L=this.getCurrentContext(c);if(!L){this.warn("The loading context changed while buffering fragment "+c.sn+" of level "+c.level+". This chunk will not be buffered."),this.resetLiveStartWhenNotLoaded(c.level);return}var F=L.frag,B=L.part,P=L.level,W=g.video,U=g.text,$=g.id3,ee=g.initSegment,pe=this.altAudio?void 0:g.audio;if(this.fragContextChanged(F))return;if(this.state=N.State.PARSING,ee){ee.tracks&&(this._bufferInitSegment(P,ee.tracks,F,c),w.trigger(X.Events.FRAG_PARSING_INIT_SEGMENT,{frag:F,id:h,tracks:ee.tracks}));var fe=ee.initPTS,Le=ee.timescale;Object(j.isFiniteNumber)(fe)&&(this.initPTS[F.cc]=fe,w.trigger(X.Events.INIT_PTS_FOUND,{frag:F,id:h,initPTS:fe,timescale:Le}))}if(W&&g.independent!==!1){if(P.details){var Ie=W.startPTS,xe=W.endPTS,Ue=W.startDTS,Fe=W.endDTS;if(B)B.elementaryStreams[W.type]={startPTS:Ie,endPTS:xe,startDTS:Ue,endDTS:Fe};else if(W.firstKeyFrame&&W.independent&&(this.couldBacktrack=!0),W.dropped&&W.independent){var we=this.getLoadPosition()+this.config.maxBufferHole;if(we<Ie){this.backtrack(F);return}F.setElementaryStreamInfo(W.type,F.start,xe,F.start,Fe,!0)}F.setElementaryStreamInfo(W.type,Ie,xe,Ue,Fe),this.bufferFragmentData(W,F,B,c)}}else if(g.independent===!1){this.backtrack(F);return}if(pe){var ve=pe.startPTS,ze=pe.endPTS,at=pe.startDTS,nt=pe.endDTS;B&&(B.elementaryStreams[f.ElementaryStreamTypes.AUDIO]={startPTS:ve,endPTS:ze,startDTS:at,endDTS:nt}),F.setElementaryStreamInfo(f.ElementaryStreamTypes.AUDIO,ve,ze,at,nt),this.bufferFragmentData(pe,F,B,c)}if($!=null&&(l=$.samples)!==null&&l!==void 0&&l.length){var et={frag:F,id:h,samples:$.samples};w.trigger(X.Events.FRAG_PARSING_METADATA,et)}if(U){var Ke={frag:F,id:h,samples:U.samples};w.trigger(X.Events.FRAG_PARSING_USERDATA,Ke)}},E._bufferInitSegment=function(n,l,h,w){var g=this;if(this.state!==N.State.PARSING)return;this.audioOnly=!!l.audio&&!l.video,this.altAudio&&!this.audioOnly&&delete l.audio;var c=l.audio,L=l.video,F=l.audiovideo;if(c){var B=n.audioCodec,P=navigator.userAgent.toLowerCase();this.audioCodecSwitch&&(B&&(B.indexOf("mp4a.40.5")!==-1?B="mp4a.40.2":B="mp4a.40.5"),c.metadata.channelCount!==1&&P.indexOf("firefox")===-1&&(B="mp4a.40.5")),P.indexOf("android")!==-1&&c.container!=="audio/mpeg"&&(B="mp4a.40.2",this.log("Android: force audio codec to "+B)),n.audioCodec&&n.audioCodec!==B&&this.log('Swapping manifest audio codec "'+n.audioCodec+'" for "'+B+'"'),c.levelCodec=B,c.id="main",this.log("Init audio buffer, container:"+c.container+", codecs[selected/level/parsed]=["+(B||"")+"/"+(n.audioCodec||"")+"/"+c.codec+"]")}L&&(L.levelCodec=n.videoCodec,L.id="main",this.log("Init video buffer, container:"+L.container+", codecs[level/parsed]=["+(n.videoCodec||"")+"/"+L.codec+"]")),F&&this.log("Init audiovideo buffer, container:"+F.container+", codecs[level/parsed]=["+(n.attrs.CODECS||"")+"/"+F.codec+"]"),this.hls.trigger(X.Events.BUFFER_CODECS,l),Object.keys(l).forEach(function(W){var U=l[W],$=U.initSegment;$!=null&&$.byteLength&&g.hls.trigger(X.Events.BUFFER_APPENDING,{type:W,data:$,frag:h,part:null,chunkMeta:w,parent:h.type})}),this.tick()},E.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=N.State.BACKTRACKING},E.checkFragmentChanged=function(){var n=this.media,l=null;if(n&&n.readyState>1&&n.seeking===!1){var h=n.currentTime;if(M.BufferHelper.isBuffered(n,h)?l=this.getAppendedFrag(h):M.BufferHelper.isBuffered(n,h+.1)&&(l=this.getAppendedFrag(h+.1)),l){var w=this.fragPlaying,g=l.level;(!w||l.sn!==w.sn||w.level!==g||l.urlId!==w.urlId)&&(this.hls.trigger(X.Events.FRAG_CHANGED,{frag:l}),(!w||w.level!==g)&&this.hls.trigger(X.Events.LEVEL_SWITCHED,{level:g}),this.fragPlaying=l)}}},a(x,[{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}}]),x}(N.default)},"./src/controller/subtitle-stream-controller.ts":function(oe,G,D){"use strict";D.r(G),D.d(G,"SubtitleStreamController",function(){return r});var j=D("./src/events.ts"),N=D("./src/utils/logger.ts"),O=D("./src/utils/buffer-helper.ts"),X=D("./src/controller/fragment-finders.ts"),M=D("./src/utils/discontinuities.ts"),e=D("./src/controller/level-helper.ts"),R=D("./src/controller/fragment-tracker.ts"),f=D("./src/controller/base-stream-controller.ts"),v=D("./src/types/loader.ts"),u=D("./src/types/level.ts");function s(t,_){for(var y=0;y<_.length;y++){var b=_[y];b.enumerable=b.enumerable||!1,b.configurable=!0,"value"in b&&(b.writable=!0),Object.defineProperty(t,b.key,b)}}function i(t,_,y){return _&&s(t.prototype,_),y&&s(t,y),t}function A(t,_){t.prototype=Object.create(_.prototype),t.prototype.constructor=t,o(t,_)}function o(t,_){return o=Object.setPrototypeOf||function(b,x){return b.__proto__=x,b},o(t,_)}var a=500,r=function(t){A(_,t);function _(b,x){var E;return E=t.call(this,b,x,"[subtitle-stream-controller]")||this,E.levels=[],E.currentTrackId=-1,E.tracksBuffered=[],E.mainDetails=null,E._registerListeners(),E}var y=_.prototype;return y.onHandlerDestroying=function(){this._unregisterListeners(),this.mainDetails=null},y._registerListeners=function(){var x=this.hls;x.on(j.Events.MEDIA_ATTACHED,this.onMediaAttached,this),x.on(j.Events.MEDIA_DETACHING,this.onMediaDetaching,this),x.on(j.Events.MANIFEST_LOADING,this.onManifestLoading,this),x.on(j.Events.LEVEL_LOADED,this.onLevelLoaded,this),x.on(j.Events.ERROR,this.onError,this),x.on(j.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),x.on(j.Events.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),x.on(j.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),x.on(j.Events.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),x.on(j.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},y._unregisterListeners=function(){var x=this.hls;x.off(j.Events.MEDIA_ATTACHED,this.onMediaAttached,this),x.off(j.Events.MEDIA_DETACHING,this.onMediaDetaching,this),x.off(j.Events.MANIFEST_LOADING,this.onManifestLoading,this),x.off(j.Events.LEVEL_LOADED,this.onLevelLoaded,this),x.off(j.Events.ERROR,this.onError,this),x.off(j.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),x.off(j.Events.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),x.off(j.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),x.off(j.Events.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),x.off(j.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},y.startLoad=function(){this.stopLoad(),this.state=f.State.IDLE,this.setInterval(a),this.tick()},y.onManifestLoading=function(){this.mainDetails=null,this.fragmentTracker.removeAllFragments()},y.onLevelLoaded=function(x,E){this.mainDetails=E.details},y.onSubtitleFragProcessed=function(x,E){var d=E.frag,n=E.success;if(this.fragPrevious=d,this.state=f.State.IDLE,!n)return;var l=this.tracksBuffered[this.currentTrackId];if(!l)return;for(var h,w=d.start,g=0;g<l.length;g++)if(w>=l[g].start&&w<=l[g].end){h=l[g];break}var c=d.start+d.duration;h?h.end=c:(h={start:w,end:c},l.push(h)),this.fragmentTracker.fragBuffered(d)},y.onBufferFlushing=function(x,E){var d=E.startOffset,n=E.endOffset;if(d===0&&n!==Number.POSITIVE_INFINITY){var l=this.currentTrackId,h=this.levels;if(!h.length||!h[l]||!h[l].details)return;var w=h[l].details,g=w.targetduration,c=n-g;if(c<=0)return;E.endOffsetSubtitles=Math.max(0,c),this.tracksBuffered.forEach(function(L){for(var F=0;F<L.length;){if(L[F].end<=c){L.shift();continue}else if(L[F].start<c)L[F].start=c;else break;F++}}),this.fragmentTracker.removeFragmentsInRange(d,c,v.PlaylistLevelType.SUBTITLE)}},y.onError=function(x,E){var d,n=E.frag;if(!n||n.type!==v.PlaylistLevelType.SUBTITLE)return;(d=this.fragCurrent)!==null&&d!==void 0&&d.loader&&this.fragCurrent.loader.abort(),this.state=f.State.IDLE},y.onSubtitleTracksUpdated=function(x,E){var d=this,n=E.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},y.onSubtitleTrackSwitch=function(x,E){if(this.currentTrackId=E.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(a)},y.onSubtitleTrackLoaded=function(x,E){var d,n=E.details,l=E.id,h=this.currentTrackId,w=this.levels;if(!w.length)return;var g=w[h];if(l>=w.length||l!==h||!g)return;if(this.mediaBuffer=this.mediaBufferTimeRanges,n.live||(d=g.details)!==null&&d!==void 0&&d.live){var c=this.mainDetails;if(n.deltaUpdateFailed||!c)return;var L=c.fragments[0];if(!g.details)n.hasProgramDateTime&&c.hasProgramDateTime?Object(M.alignMediaPlaylistByPDT)(n,c):L&&Object(e.addSliding)(n,L.start);else{var F=this.alignPlaylists(n,g.details);F===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===f.State.IDLE){var B=Object(X.findFragmentByPTS)(null,n.fragments,this.media.currentTime,0);B||(this.warn("Subtitle playlist not aligned with playback"),g.details=void 0)}},y._handleFragmentLoadComplete=function(x){var E=x.frag,d=x.payload,n=E.decryptdata,l=this.hls;if(this.fragContextChanged(E))return;if(d&&d.byteLength>0&&n&&n.key&&n.iv&&n.method==="AES-128"){var h=performance.now();this.decrypter.webCryptoDecrypt(new Uint8Array(d),n.key.buffer,n.iv.buffer).then(function(w){var g=performance.now();l.trigger(j.Events.FRAG_DECRYPTED,{frag:E,payload:w,stats:{tstart:h,tdecrypt:g}})})}},y.doTick=function(){if(!this.media){this.state=f.State.IDLE;return}if(this.state===f.State.IDLE){var x,E=this.currentTrackId,d=this.levels;if(!d.length||!d[E]||!d[E].details)return;var n=d[E].details,l=n.targetduration,h=this.config,w=this.media,g=O.BufferHelper.bufferedInfo(this.mediaBufferTimeRanges,w.currentTime-l,h.maxBufferHole),c=g.end,L=g.len,F=this.getMaxBufferLength()+l;if(L>F)return;console.assert(n,"Subtitle track details are defined on idle subtitle stream controller tick");var B=n.fragments,P=B.length,W=n.edge,U,$=this.fragPrevious;if(c<W){var ee=h.maxFragLookUpTolerance;$&&n.hasProgramDateTime&&(U=Object(X.findFragmentByPDT)(B,$.endProgramDateTime,ee)),U||(U=Object(X.findFragmentByPTS)($,B,c,ee),!U&&$&&$.start<B[0].start&&(U=B[0]))}else U=B[P-1];(x=U)!==null&&x!==void 0&&x.encrypted?(N.logger.log("Loading key for "+U.sn),this.state=f.State.KEY_LOADING,this.hls.trigger(j.Events.KEY_LOADING,{frag:U})):U&&this.fragmentTracker.getState(U)===R.FragmentState.NOT_LOADED&&this.loadFragment(U,n,c)}},y.loadFragment=function(x,E,d){this.fragCurrent=x,t.prototype.loadFragment.call(this,x,E,d)},i(_,[{key:"mediaBufferTimeRanges",get:function(){return this.tracksBuffered[this.currentTrackId]||[]}}]),_}(f.default)},"./src/controller/subtitle-track-controller.ts":function(oe,G,D){"use strict";D.r(G);var j=D("./src/events.ts"),N=D("./src/utils/texttrack-utils.ts"),O=D("./src/controller/base-playlist-controller.ts"),X=D("./src/types/loader.ts");function M(s,i){for(var A=0;A<i.length;A++){var o=i[A];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(s,o.key,o)}}function e(s,i,A){return i&&M(s.prototype,i),A&&M(s,A),s}function R(s,i){s.prototype=Object.create(i.prototype),s.prototype.constructor=s,f(s,i)}function f(s,i){return f=Object.setPrototypeOf||function(o,a){return o.__proto__=a,o},f(s,i)}var v=function(s){R(i,s);function i(o){var a;return a=s.call(this,o,"[subtitle-track-controller]")||this,a.media=null,a.tracks=[],a.groupId=null,a.tracksInGroup=[],a.trackId=-1,a.selectDefaultTrack=!0,a.queuedDefaultTrack=-1,a.trackChangeListener=function(){return a.onTextTracksChanged()},a.asyncPollTrackChange=function(){return a.pollTrackChange(0)},a.useTextTrackPolling=!1,a.subtitlePollingInterval=-1,a.subtitleDisplay=!0,a.registerListeners(),a}var A=i.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 a=this.hls;a.on(j.Events.MEDIA_ATTACHED,this.onMediaAttached,this),a.on(j.Events.MEDIA_DETACHING,this.onMediaDetaching,this),a.on(j.Events.MANIFEST_LOADING,this.onManifestLoading,this),a.on(j.Events.MANIFEST_PARSED,this.onManifestParsed,this),a.on(j.Events.LEVEL_LOADING,this.onLevelLoading,this),a.on(j.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),a.on(j.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),a.on(j.Events.ERROR,this.onError,this)},A.unregisterListeners=function(){var a=this.hls;a.off(j.Events.MEDIA_ATTACHED,this.onMediaAttached,this),a.off(j.Events.MEDIA_DETACHING,this.onMediaDetaching,this),a.off(j.Events.MANIFEST_LOADING,this.onManifestLoading,this),a.off(j.Events.MANIFEST_PARSED,this.onManifestParsed,this),a.off(j.Events.LEVEL_LOADING,this.onLevelLoading,this),a.off(j.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),a.off(j.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),a.off(j.Events.ERROR,this.onError,this)},A.onMediaAttached=function(a,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(a){self.clearInterval(this.subtitlePollingInterval),this.subtitlePollingInterval=self.setInterval(this.trackChangeListener,a)},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 a=u(this.media.textTracks);a.forEach(function(r){Object(N.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(a,r){this.tracks=r.subtitleTracks},A.onSubtitleTrackLoaded=function(a,r){var t=r.id,_=r.details,y=this.trackId,b=this.tracksInGroup[y];if(!b){this.warn("Invalid subtitle track id "+t);return}var x=b.details;b.details=r.details,this.log("subtitle track "+t+" loaded ["+_.startSN+"-"+_.endSN+"]"),t===this.trackId&&(this.retryCount=0,this.playlistLoaded(t,r,x))},A.onLevelLoading=function(a,r){this.switchLevel(r.level)},A.onLevelSwitching=function(a,r){this.switchLevel(r.level)},A.switchLevel=function(a){var r=this.hls.levels[a];if(!(r!=null&&r.textGroupIds))return;var t=r.textGroupIds[r.urlId];if(this.groupId!==t){var _=this.tracksInGroup?this.tracksInGroup[this.trackId]:void 0,y=this.tracks.filter(function(E){return!t||E.groupId===t});this.tracksInGroup=y;var b=this.findTrackId(_==null?void 0:_.name)||this.findTrackId();this.groupId=t;var x={subtitleTracks:y};this.log("Updating subtitle tracks, "+y.length+' track(s) found in "'+t+'" group-id'),this.hls.trigger(j.Events.SUBTITLE_TRACKS_UPDATED,x),b!==-1&&this.setSubtitleTrack(b,_)}},A.findTrackId=function(a){for(var r=this.tracksInGroup,t=0;t<r.length;t++){var _=r[t];if((!this.selectDefaultTrack||_.default)&&(!a||a===_.name))return _.id}return-1},A.onError=function(a,r){if(s.prototype.onError.call(this,a,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(a){var r=this.tracksInGroup[this.trackId];if(this.shouldLoadTrack(r)){var t=r.id,_=r.groupId,y=r.url;if(a)try{y=a.addDirectives(y)}catch(b){this.warn("Could not construct new URL with HLS Delivery Directives: "+b)}this.log("Loading subtitle playlist for id "+t),this.hls.trigger(j.Events.SUBTITLE_TRACK_LOADING,{url:y,id:t,groupId:_,deliveryDirectives:a||null})}},A.toggleTrackModes=function(a){var r=this,t=this.media,_=this.subtitleDisplay,y=this.trackId;if(!t)return;var b=u(t.textTracks),x=b.filter(function(n){return n.groupId===r.groupId});if(a===-1)[].slice.call(b).forEach(function(n){n.mode="disabled"});else{var E=x[y];E&&(E.mode="disabled")}var d=x[a];d&&(d.mode=_?"showing":"hidden")},A.setSubtitleTrack=function(a,r){var t,_=this.tracksInGroup;if(!this.media){this.queuedDefaultTrack=a;return}if(this.trackId!==a&&this.toggleTrackModes(a),this.trackId===a&&(a===-1||(t=_[a])!==null&&t!==void 0&&t.details)||a<-1||a>=_.length)return;this.clearTimer();var y=_[a];if(this.log("Switching to subtitle track "+a),this.trackId=a,y){var b=y.id,x=y.groupId,E=x===void 0?"":x,d=y.name,n=y.type,l=y.url;this.hls.trigger(j.Events.SUBTITLE_TRACK_SWITCH,{id:b,groupId:E,name:d,type:n,url:l});var h=this.switchParams(y.url,r==null?void 0:r.details);this.loadPlaylist(h)}else this.hls.trigger(j.Events.SUBTITLE_TRACK_SWITCH,{id:a})},A.onTextTracksChanged=function(){if(this.useTextTrackPolling||self.clearInterval(this.subtitlePollingInterval),!this.media||!this.hls.config.renderTextTracksNatively)return;for(var a=-1,r=u(this.media.textTracks),t=0;t<r.length;t++)if(r[t].mode==="hidden")a=t;else if(r[t].mode==="showing"){a=t;break}this.subtitleTrack!==a&&(this.subtitleTrack=a)},e(i,[{key:"subtitleTracks",get:function(){return this.tracksInGroup}},{key:"subtitleTrack",get:function(){return this.trackId},set:function(a){this.selectDefaultTrack=!1;var r=this.tracksInGroup?this.tracksInGroup[this.trackId]:void 0;this.setSubtitleTrack(a,r)}}]),i}(O.default);function u(s){for(var i=[],A=0;A<s.length;A++){var o=s[A];o.kind==="subtitles"&&o.label&&i.push(s[A])}return i}G.default=v},"./src/controller/timeline-controller.ts":function(oe,G,D){"use strict";D.r(G),D.d(G,"TimelineController",function(){return u});var j=D("./src/polyfills/number.ts"),N=D("./src/events.ts"),O=D("./src/utils/cea-608-parser.ts"),X=D("./src/utils/output-filter.ts"),M=D("./src/utils/webvtt-parser.ts"),e=D("./src/utils/texttrack-utils.ts"),R=D("./src/utils/imsc1-ttml-parser.ts"),f=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"),_=new X.default(this,"textTrack2"),y=new X.default(this,"textTrack3"),b=new X.default(this,"textTrack4");this.cea608Parser1=new O.default(1,t,_),this.cea608Parser2=new O.default(3,y,b)}r.on(N.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),r.on(N.Events.MEDIA_DETACHING,this.onMediaDetaching,this),r.on(N.Events.MANIFEST_LOADING,this.onManifestLoading,this),r.on(N.Events.MANIFEST_LOADED,this.onManifestLoaded,this),r.on(N.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),r.on(N.Events.FRAG_LOADING,this.onFragLoading,this),r.on(N.Events.FRAG_LOADED,this.onFragLoaded,this),r.on(N.Events.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),r.on(N.Events.FRAG_DECRYPTED,this.onFragDecrypted,this),r.on(N.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),r.on(N.Events.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),r.on(N.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)}var a=o.prototype;return a.destroy=function(){var t=this.hls;t.off(N.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),t.off(N.Events.MEDIA_DETACHING,this.onMediaDetaching,this),t.off(N.Events.MANIFEST_LOADING,this.onManifestLoading,this),t.off(N.Events.MANIFEST_LOADED,this.onManifestLoaded,this),t.off(N.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),t.off(N.Events.FRAG_LOADING,this.onFragLoading,this),t.off(N.Events.FRAG_LOADED,this.onFragLoaded,this),t.off(N.Events.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),t.off(N.Events.FRAG_DECRYPTED,this.onFragDecrypted,this),t.off(N.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),t.off(N.Events.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),t.off(N.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),this.hls=this.config=this.cea608Parser1=this.cea608Parser2=null},a.addCues=function(t,_,y,b,x){for(var E=!1,d=x.length;d--;){var n=x[d],l=i(n[0],n[1],_,y);if(l>=0&&(n[0]=Math.min(n[0],_),n[1]=Math.max(n[1],y),E=!0,l/(y-_)>.5))return}if(E||x.push([_,y]),this.config.renderTextTracksNatively){var h=this.captionsTracks[t];this.Cues.newCue(h,_,y,b)}else{var w=this.Cues.newCue(null,_,y,b);this.hls.trigger(N.Events.CUES_PARSED,{type:"captions",cues:w,track:t})}},a.onInitPtsFound=function(t,_){var y=this,b=_.frag,x=_.id,E=_.initPTS,d=_.timescale,n=this.unparsedVttFrags;x==="main"&&(this.initPTS[b.cc]=E,this.timescale[b.cc]=d),n.length&&(this.unparsedVttFrags=[],n.forEach(function(l){y.onFragLoaded(N.Events.FRAG_LOADED,l)}))},a.getExistingTrack=function(t){var _=this.media;if(_)for(var y=0;y<_.textTracks.length;y++){var b=_.textTracks[y];if(b[t])return b}return null},a.createCaptionsTrack=function(t){this.config.renderTextTracksNatively?this.createNativeTrack(t):this.createNonNativeTrack(t)},a.createNativeTrack=function(t){if(this.captionsTracks[t])return;var _=this.captionsProperties,y=this.captionsTracks,b=this.media,x=_[t],E=x.label,d=x.languageCode,n=this.getExistingTrack(t);if(n)y[t]=n,Object(e.clearCurrentCues)(y[t]),Object(e.sendAddTrackEvent)(y[t],b);else{var l=this.createTextTrack("captions",E,d);l&&(l[t]=!0,y[t]=l)}},a.createNonNativeTrack=function(t){if(this.nonNativeCaptionsTracks[t])return;var _=this.captionsProperties[t];if(!_)return;var y=_.label,b={_id:t,label:y,kind:"captions",default:_.media?!!_.media.default:!1,closedCaptions:_.media};this.nonNativeCaptionsTracks[t]=b,this.hls.trigger(N.Events.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:[b]})},a.createTextTrack=function(t,_,y){var b=this.media;return b?b.addTextTrack(t,_,y):void 0},a.onMediaAttaching=function(t,_){this.media=_.media,this._cleanTracks()},a.onMediaDetaching=function(){var t=this.captionsTracks;Object.keys(t).forEach(function(_){Object(e.clearCurrentCues)(t[_]),delete t[_]}),this.nonNativeCaptionsTracks={}},a.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())},a._cleanTracks=function(){var t=this.media;if(!t)return;var _=t.textTracks;if(_)for(var y=0;y<_.length;y++)Object(e.clearCurrentCues)(_[y])},a.onSubtitleTracksUpdated=function(t,_){var y=this;this.textTracks=[];var b=_.subtitleTracks||[],x=b.some(function(l){return l.textCodec===R.IMSC1_CODEC});if(this.config.enableWebVTT||x&&this.config.enableIMSC1){var E=this.tracks&&b&&this.tracks.length===b.length;if(this.tracks=b||[],this.config.renderTextTracksNatively){var d=this.media?this.media.textTracks:[];this.tracks.forEach(function(l,h){var w;if(h<d.length){for(var g=null,c=0;c<d.length;c++)if(s(d[c],l)){g=d[c];break}g&&(w=g)}w?Object(e.clearCurrentCues)(w):(w=y.createTextTrack("subtitles",l.name,l.lang),w&&(w.mode="disabled")),w&&(w.groupId=l.groupId,y.textTracks.push(w))})}else if(!E&&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(N.Events.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:n})}}},a.onManifestLoaded=function(t,_){var y=this;this.config.enableCEA708Captions&&_.captions&&_.captions.forEach(function(b){var x=/(?:CC|SERVICE)([1-4])/.exec(b.instreamId);if(!x)return;var E="textTrack"+x[1],d=y.captionsProperties[E];if(!d)return;d.label=b.name,b.lang&&(d.languageCode=b.lang),d.media=b})},a.onFragLoading=function(t,_){var y=this.cea608Parser1,b=this.cea608Parser2,x=this.lastSn,E=this.lastPartIndex;if(!this.enabled||!(y&&b))return;if(_.frag.type===f.PlaylistLevelType.MAIN){var d,n,l=_.frag.sn,h=(d=_==null||((n=_.part)===null||n===void 0)?void 0:n.index)!=null?d:-1;l===x+1||l===x&&h===E+1||(y.reset(),b.reset()),this.lastSn=l,this.lastPartIndex=h}},a.onFragLoaded=function(t,_){var y=_.frag,b=_.payload,x=this.initPTS,E=this.unparsedVttFrags;if(y.type===f.PlaylistLevelType.SUBTITLE)if(b.byteLength){if(!Object(j.isFiniteNumber)(x[y.cc])){E.push(_),x.length&&this.hls.trigger(N.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:y,error:new Error("Missing initial subtitle PTS")});return}var d=y.decryptdata;if(d==null||d.key==null||d.method!=="AES-128"){var n=this.tracks[y.level],l=this.vttCCs;l[y.cc]||(l[y.cc]={start:y.start,prevCC:this.prevCC,new:!0},this.prevCC=y.cc),n&&n.textCodec===R.IMSC1_CODEC?this._parseIMSC1(y,b):this._parseVTTs(y,b,l)}}else this.hls.trigger(N.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:y,error:new Error("Empty subtitle payload")})},a._parseIMSC1=function(t,_){var y=this,b=this.hls;Object(R.parseIMSC1)(_,this.initPTS[t.cc],this.timescale[t.cc],function(x){y._appendCues(x,t.level),b.trigger(N.Events.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:t})},function(x){v.logger.log("Failed to parse IMSC1: "+x),b.trigger(N.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:t,error:x})})},a._parseVTTs=function(t,_,y){var b=this,x=this.hls;Object(M.parseWebVTT)(_,this.initPTS[t.cc],this.timescale[t.cc],y,t.cc,t.start,function(E){b._appendCues(E,t.level),x.trigger(N.Events.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:t})},function(E){b._fallbackToIMSC1(t,_),v.logger.log("Failed to parse VTT cue: "+E),x.trigger(N.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:t,error:E})})},a._fallbackToIMSC1=function(t,_){var y=this,b=this.tracks[t.level];b.textCodec||Object(R.parseIMSC1)(_,this.initPTS[t.cc],this.timescale[t.cc],function(){b.textCodec=R.IMSC1_CODEC,y._parseIMSC1(t,_)},function(){b.textCodec="wvtt"})},a._appendCues=function(t,_){var y=this.hls;if(this.config.renderTextTracksNatively){var b=this.textTracks[_];if(b.mode==="disabled")return;t.forEach(function(d){return Object(e.addCueToTrack)(b,d)})}else{var x=this.tracks[_],E=x.default?"default":"subtitles"+_;y.trigger(N.Events.CUES_PARSED,{type:"subtitles",cues:t,track:E})}},a.onFragDecrypted=function(t,_){var y=_.frag;if(y.type===f.PlaylistLevelType.SUBTITLE){if(!Object(j.isFiniteNumber)(this.initPTS[y.cc])){this.unparsedVttFrags.push(_);return}this.onFragLoaded(N.Events.FRAG_LOADED,_)}},a.onSubtitleTracksCleared=function(){this.tracks=[],this.captionsTracks={}},a.onFragParsingUserdata=function(t,_){var y=this.cea608Parser1,b=this.cea608Parser2;if(!this.enabled||!(y&&b))return;for(var x=0;x<_.samples.length;x++){var E=_.samples[x].bytes;if(E){var d=this.extractCea608Data(E);y.addData(_.samples[x].pts,d[0]),b.addData(_.samples[x].pts,d[1])}}},a.onBufferFlushing=function(t,_){var y=_.startOffset,b=_.endOffset,x=_.endOffsetSubtitles,E=_.type,d=this.media;if(!d||d.currentTime<b)return;if(!E||E==="video"){var n=this.captionsTracks;Object.keys(n).forEach(function(h){return Object(e.removeCuesInRange)(n[h],y,b)})}if(this.config.renderTextTracksNatively&&(y===0&&x!==void 0)){var l=this.textTracks;Object.keys(l).forEach(function(h){return Object(e.removeCuesInRange)(l[h],y,x)})}},a.extractCea608Data=function(t){for(var _=t[0]&31,y=2,b=[[],[]],x=0;x<_;x++){var E=t[y++],d=127&t[y++],n=127&t[y++],l=(4&E)!==0,h=3&E;if(d===0&&n===0)continue;l&&((h===0||h===1)&&(b[h].push(d),b[h].push(n)))}return b},o}();function s(o,a){return o&&o.label===a.name&&!(o.textTrack1||o.textTrack2)}function i(o,a,r,t){return Math.min(a,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(oe,G,D){"use strict";D.r(G),D.d(G,"default",function(){return j});var j=function(){function N(X,M){this.subtle=void 0,this.aesIV=void 0,this.subtle=X,this.aesIV=M}var O=N.prototype;return O.decrypt=function(M,e){return this.subtle.decrypt({name:"AES-CBC",iv:this.aesIV},e,M)},N}()},"./src/crypt/aes-decryptor.ts":function(oe,G,D){"use strict";D.r(G),D.d(G,"removePadding",function(){return N}),D.d(G,"default",function(){return O});var j=D("./src/utils/typed-array.ts");function N(X){var M=X.byteLength,e=M&&new DataView(X.buffer).getUint8(M-1);return e?Object(j.sliceUint8)(X,0,M-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 M=X.prototype;return M.uint8ArrayToUint32Array_=function(R){for(var f=new DataView(R),v=new Uint32Array(4),u=0;u<4;u++)v[u]=f.getUint32(u*4);return v},M.initTable=function(){var R=this.sBox,f=this.invSBox,v=this.subMix,u=v[0],s=v[1],i=v[2],A=v[3],o=this.invSubMix,a=o[0],r=o[1],t=o[2],_=o[3],y=new Uint32Array(256),b=0,x=0,E=0;for(E=0;E<256;E++)E<128?y[E]=E<<1:y[E]=E<<1^283;for(E=0;E<256;E++){var d=x^x<<1^x<<2^x<<3^x<<4;d=d>>>8^d&255^99,R[b]=d,f[d]=b;var n=y[b],l=y[n],h=y[l],w=y[d]*257^d*16843008;u[b]=w<<24|w>>>8,s[b]=w<<16|w>>>16,i[b]=w<<8|w>>>24,A[b]=w,w=h*16843009^l*65537^n*257^b*16843008,a[d]=w<<24|w>>>8,r[d]=w<<16|w>>>16,t[d]=w<<8|w>>>24,_[d]=w,b?(b=n^y[y[y[h^n]]],x^=y[y[x]]):b=x=1}},M.expandKey=function(R){for(var f=this.uint8ArrayToUint32Array_(R),v=!0,u=0;u<f.length&&v;)v=f[u]===this.key[u],u++;if(v)return;this.key=f;var s=this.keySize=f.length;if(s!==4&&s!==6&&s!==8)throw new Error("Invalid aes key size="+s);var i=this.ksRows=(s+6+1)*4,A,o,a=this.keySchedule=new Uint32Array(i),r=this.invKeySchedule=new Uint32Array(i),t=this.sBox,_=this.rcon,y=this.invSubMix,b=y[0],x=y[1],E=y[2],d=y[3],n,l;for(A=0;A<i;A++){if(A<s){n=a[A]=f[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^=_[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]),a[A]=n=(a[A-s]^l)>>>0}for(o=0;o<i;o++)A=i-o,o&3?l=a[A]:l=a[A-4],o<4||A<=4?r[o]=l:r[o]=b[t[l>>>24]]^x[t[l>>>16&255]]^E[t[l>>>8&255]]^d[t[l&255]],r[o]=r[o]>>>0},M.networkToHostOrderSwap=function(R){return R<<24|(R&65280)<<8|(R&16711680)>>8|R>>>24},M.decrypt=function(R,f,v){for(var u=this.keySize+6,s=this.invKeySchedule,i=this.invSBox,A=this.invSubMix,o=A[0],a=A[1],r=A[2],t=A[3],_=this.uint8ArrayToUint32Array_(v),y=_[0],b=_[1],x=_[2],E=_[3],d=new Int32Array(R),n=new Int32Array(d.length),l,h,w,g,c,L,F,B,P,W,U,$,ee,pe,fe=this.networkToHostOrderSwap;f<d.length;){for(P=fe(d[f]),W=fe(d[f+1]),U=fe(d[f+2]),$=fe(d[f+3]),c=P^s[0],L=$^s[1],F=U^s[2],B=W^s[3],ee=4,pe=1;pe<u;pe++)l=o[c>>>24]^a[L>>16&255]^r[F>>8&255]^t[B&255]^s[ee],h=o[L>>>24]^a[F>>16&255]^r[B>>8&255]^t[c&255]^s[ee+1],w=o[F>>>24]^a[B>>16&255]^r[c>>8&255]^t[L&255]^s[ee+2],g=o[B>>>24]^a[c>>16&255]^r[L>>8&255]^t[F&255]^s[ee+3],c=l,L=h,F=w,B=g,ee=ee+4;l=i[c>>>24]<<24^i[L>>16&255]<<16^i[F>>8&255]<<8^i[B&255]^s[ee],h=i[L>>>24]<<24^i[F>>16&255]<<16^i[B>>8&255]<<8^i[c&255]^s[ee+1],w=i[F>>>24]<<24^i[B>>16&255]<<16^i[c>>8&255]<<8^i[L&255]^s[ee+2],g=i[B>>>24]<<24^i[c>>16&255]<<16^i[L>>8&255]<<8^i[F&255]^s[ee+3],n[f]=fe(l^y),n[f+1]=fe(g^b),n[f+2]=fe(w^x),n[f+3]=fe(h^E),y=P,b=W,x=U,E=$,f=f+4}return n.buffer},X}()},"./src/crypt/decrypter.ts":function(oe,G,D){"use strict";D.r(G),D.d(G,"default",function(){return f});var j=D("./src/crypt/aes-crypto.ts"),N=D("./src/crypt/fast-aes-key.ts"),O=D("./src/crypt/aes-decryptor.ts"),X=D("./src/utils/logger.ts"),M=D("./src/utils/mp4-tools.ts"),e=D("./src/utils/typed-array.ts"),R=16,f=function(){function v(s,i,A){var o=A===void 0?{}:A,a=o.removePKCS7Padding,r=a===void 0?!0:a;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=i,this.removePKCS7Padding=r,r)try{var t=self.crypto;t&&(this.subtle=t.subtle||t.webkitSubtle)}catch(_){}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 i=this.currentResult;if(!i){this.reset();return}var A=new Uint8Array(i);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(i,A,o,a){if(this.config.enableSoftwareAES){this.softwareDecrypt(new Uint8Array(i),A,o);var r=this.flush();r&&a(r.buffer)}else this.webCryptoDecrypt(new Uint8Array(i),A,o).then(a)},u.softwareDecrypt=function(i,A,o){var a=this.currentIV,r=this.currentResult,t=this.remainderData;this.logOnce("JS AES decrypt"),t&&(i=Object(M.appendUint8Array)(t,i),this.remainderData=null);var _=this.getValidChunk(i);if(!_.length)return null;a&&(o=a);var y=this.softwareDecrypter;y||(y=this.softwareDecrypter=new O.default),y.expandKey(A);var b=r;return this.currentResult=y.decrypt(_.buffer,0,o),this.currentIV=Object(e.sliceUint8)(_,-16).buffer,b||null},u.webCryptoDecrypt=function(i,A,o){var a=this,r=this.subtle;return(this.key!==A||!this.fastAesKey)&&(this.key=A,this.fastAesKey=new N.default(r,A)),this.fastAesKey.expandKey().then(function(t){if(!r)return Promise.reject(new Error("web crypto not initialized"));var _=new j.default(r,o);return _.decrypt(i.buffer,t)}).catch(function(t){return a.onWebCryptoError(t,i,A,o)})},u.onWebCryptoError=function(i,A,o,a){return X.logger.warn("[decrypter.ts]: WebCrypto Error, disable WebCrypto API:",i),this.config.enableSoftwareAES=!0,this.logEnabled=!0,this.softwareDecrypt(A,o,a)},u.getValidChunk=function(i){var A=i,o=i.length-i.length%R;return o!==i.length&&(A=Object(e.sliceUint8)(i,0,o),this.remainderData=Object(e.sliceUint8)(i,o)),A},u.logOnce=function(i){if(!this.logEnabled)return;X.logger.log("[decrypter.ts]: "+i),this.logEnabled=!1},v}()},"./src/crypt/fast-aes-key.ts":function(oe,G,D){"use strict";D.r(G),D.d(G,"default",function(){return j});var j=function(){function N(X,M){this.subtle=void 0,this.key=void 0,this.subtle=X,this.key=M}var O=N.prototype;return O.expandKey=function(){return this.subtle.importKey("raw",this.key,{name:"AES-CBC"},!1,["encrypt","decrypt"])},N}()},"./src/demux/aacdemuxer.ts":function(oe,G,D){"use strict";D.r(G);var j=D("./src/demux/base-audio-demuxer.ts"),N=D("./src/demux/adts.ts"),O=D("./src/utils/logger.ts"),X=D("./src/demux/id3.ts");function M(f,v){f.prototype=Object.create(v.prototype),f.prototype.constructor=f,e(f,v)}function e(f,v){return e=Object.setPrototypeOf||function(s,i){return s.__proto__=i,s},e(f,v)}var R=function(f){M(v,f);function v(s,i){var A;return A=f.call(this)||this,A.observer=void 0,A.config=void 0,A.observer=s,A.config=i,A}var u=v.prototype;return u.resetInitSegment=function(i,A,o){f.prototype.resetInitSegment.call(this,i,A,o),this._audioTrack={container:"audio/adts",type:"audio",id:2,pid:-1,sequenceNumber:0,isAAC:!0,samples:[],manifestCodec:i,duration:o,inputTimeScale:9e4,dropped:0}},v.probe=function(i){if(!i)return!1;for(var A=X.getID3Data(i,0)||[],o=A.length,a=i.length;o<a;o++)if(N.probe(i,o))return O.logger.log("ADTS sync word found !"),!0;return!1},u.canParse=function(i,A){return N.canParse(i,A)},u.appendFrame=function(i,A,o){N.initTrackConfig(i,this.observer,A,o,i.manifestCodec);var a=N.appendFrame(i,A,o,this.initPTS,this.frameIndex);if(a&&a.missing===0)return a},v}(j.default);R.minProbeByteLength=9,G.default=R},"./src/demux/adts.ts":function(oe,G,D){"use strict";D.r(G),D.d(G,"getAudioConfig",function(){return X}),D.d(G,"isHeaderPattern",function(){return M}),D.d(G,"getHeaderLength",function(){return e}),D.d(G,"getFullFrameLength",function(){return R}),D.d(G,"canGetFrameLength",function(){return f}),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 i}),D.d(G,"getFrameDuration",function(){return A}),D.d(G,"parseFrameHeader",function(){return o}),D.d(G,"appendFrame",function(){return a});var j=D("./src/utils/logger.ts"),N=D("./src/errors.ts"),O=D("./src/events.ts");function X(r,t,_,y){var b,x,E,d,n=navigator.userAgent.toLowerCase(),l=y,h=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];b=((t[_+2]&192)>>>6)+1;var w=(t[_+2]&60)>>>2;if(w>h.length-1){r.trigger(O.Events.ERROR,{type:N.ErrorTypes.MEDIA_ERROR,details:N.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"invalid ADTS sampling index:"+w});return}return E=(t[_+2]&1)<<2,E|=(t[_+3]&192)>>>6,j.logger.log("manifest codec:"+y+", ADTS type:"+b+", samplingIndex:"+w),/firefox/i.test(n)?w>=6?(b=5,d=new Array(4),x=w-3):(b=2,d=new Array(2),x=w):n.indexOf("android")!==-1?(b=2,d=new Array(2),x=w):(b=5,d=new Array(4),y&&(y.indexOf("mp4a.40.29")!==-1||y.indexOf("mp4a.40.5")!==-1)||!y&&w>=6?x=w-3:((y&&y.indexOf("mp4a.40.2")!==-1&&(w>=6&&E===1||/vivaldi/i.test(n))||!y&&E===1)&&(b=2,d=new Array(2)),x=w)),d[0]=b<<3,d[0]|=(w&14)>>1,d[1]|=(w&1)<<7,d[1]|=E<<3,b===5&&(d[1]|=(x&14)>>1,d[2]=(x&1)<<7,d[2]|=2<<2,d[3]=0),{config:d,samplerate:h[w],channelCount:E,codec:"mp4a.40."+b,manifestCodec:l}}function M(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 f(r,t){return t+5<r.length}function v(r,t){return t+1<r.length&&M(r,t)}function u(r,t){return f(r,t)&&M(r,t)&&R(r,t)<=r.length-t}function s(r,t){if(v(r,t)){var _=e(r,t);if(t+_>=r.length)return!1;var y=R(r,t);if(y<=_)return!1;var b=t+y;return b===r.length||v(r,b)}return!1}function i(r,t,_,y,b){if(!r.samplerate){var x=X(t,_,y,b);if(!x)return;r.config=x.config,r.samplerate=x.samplerate,r.channelCount=x.channelCount,r.codec=x.codec,r.manifestCodec=x.manifestCodec,j.logger.log("parsed codec:"+r.codec+", rate:"+x.samplerate+", channels:"+x.channelCount)}}function A(r){return 1024*9e4/r}function o(r,t,_,y,b){var x=e(r,t),E=R(r,t);if(E-=x,E>0){var d=_+y*b;return{headerLength:x,frameLength:E,stamp:d}}}function a(r,t,_,y,b){var x=A(r.samplerate),E=o(t,_,y,b,x);if(E){var d=E.frameLength,n=E.headerLength,l=E.stamp,h=n+d,w=Math.max(0,_+h-t.length),g;w?(g=new Uint8Array(h-n),g.set(t.subarray(_+n,t.length),0)):g=t.subarray(_+n,_+h);var c={unit:g,pts:l};return w||r.samples.push(c),{sample:c,length:h,missing:w}}}},"./src/demux/base-audio-demuxer.ts":function(oe,G,D){"use strict";D.r(G),D.d(G,"initPTSFn",function(){return R});var j=D("./src/polyfills/number.ts"),N=D("./src/demux/id3.ts"),O=D("./src/demux/dummy-demuxed-track.ts"),X=D("./src/utils/mp4-tools.ts"),M=D("./src/utils/typed-array.ts"),e=function(){function f(){this._audioTrack=void 0,this._id3Track=void 0,this.frameIndex=0,this.cachedData=null,this.initPTS=null}var v=f.prototype;return v.resetInitSegment=function(s,i,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,i){return!1},v.appendFrame=function(s,i,A){},v.demux=function(s,i){this.cachedData&&(s=Object(X.appendUint8Array)(this.cachedData,s),this.cachedData=null);var A=N.getID3Data(s,0),o=A?A.length:0,a,r,t=this._audioTrack,_=this._id3Track,y=A?N.getTimeStamp(A):void 0,b=s.length;for((this.frameIndex===0||this.initPTS===null)&&(this.initPTS=R(y,i)),A&&A.length>0&&_.samples.push({pts:this.initPTS,dts:this.initPTS,data:A}),r=this.initPTS;o<b;){if(this.canParse(s,o)){var x=this.appendFrame(t,s,o);x?(this.frameIndex++,r=x.sample.pts,o+=x.length,a=o):o=b}else N.canParse(s,o)?(A=N.getID3Data(s,o),_.samples.push({pts:r,dts:r,data:A}),o+=A.length,a=o):o++;if(o===b&&a!==b){var E=Object(M.sliceUint8)(s,a);this.cachedData?this.cachedData=Object(X.appendUint8Array)(this.cachedData,E):this.cachedData=E}}return{audioTrack:t,avcTrack:Object(O.dummyTrack)(),id3Track:_,textTrack:Object(O.dummyTrack)()}},v.demuxSampleAes=function(s,i,A){return Promise.reject(new Error("["+this+"] This demuxer does not support Sample-AES decryption"))},v.flush=function(s){var i=this.cachedData;return i&&(this.cachedData=null,this.demux(i,0)),this.frameIndex=0,{audioTrack:this._audioTrack,avcTrack:Object(O.dummyTrack)(),id3Track:this._id3Track,textTrack:Object(O.dummyTrack)()}},v.destroy=function(){},f}(),R=function(v,u){return Object(j.isFiniteNumber)(v)?v*90:u*9e4};G.default=e},"./src/demux/chunk-cache.ts":function(oe,G,D){"use strict";D.r(G),D.d(G,"default",function(){return j});var j=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,f;if(e.length)e.length===1?f=e[0]:f=N(e,R);else return new Uint8Array(0);return this.reset(),f},X.reset=function(){this.chunks.length=0,this.dataLength=0},O}();function N(O,X){for(var M=new Uint8Array(X),e=0,R=0;R<O.length;R++){var f=O[R];M.set(f,e),e+=f.length}return M}},"./src/demux/dummy-demuxed-track.ts":function(oe,G,D){"use strict";D.r(G),D.d(G,"dummyTrack",function(){return j});function j(){return{type:"",id:-1,pid:-1,inputTimeScale:9e4,sequenceNumber:-1,samples:[],dropped:0}}},"./src/demux/exp-golomb.ts":function(oe,G,D){"use strict";D.r(G);var j=D("./src/utils/logger.ts"),N=function(){function O(M){this.data=void 0,this.bytesAvailable=void 0,this.word=void 0,this.bitsAvailable=void 0,this.data=M,this.bytesAvailable=M.byteLength,this.word=0,this.bitsAvailable=0}var X=O.prototype;return X.loadWord=function(){var e=this.data,R=this.bytesAvailable,f=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(f,f+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),f=this.word>>>32-R;return e>32&&j.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?f<<R|this.readBits(R):f},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,f=8,v,u=0;u<e;u++)f!==0&&(v=this.readEG(),f=(R+v+256)%256),R=f===0?R:f},X.readSPS=function(){var e=0,R=0,f=0,v=0,u,s,i,A=this.readUByte.bind(this),o=this.readBits.bind(this),a=this.readUEG.bind(this),r=this.readBoolean.bind(this),t=this.skipBits.bind(this),_=this.skipEG.bind(this),y=this.skipUEG.bind(this),b=this.skipScalingList.bind(this);A();var x=A();if(o(5),t(3),A(),y(),x===100||x===110||x===122||x===244||x===44||x===83||x===86||x===118||x===128){var E=a();if(E===3&&t(1),y(),y(),t(1),r())for(s=E!==3?8:12,i=0;i<s;i++)r()&&(i<6?b(16):b(64))}y();var d=a();if(d===0)a();else if(d===1)for(t(1),_(),_(),u=a(),i=0;i<u;i++)_();y(),t(1);var n=a(),l=a(),h=o(1);h===0&&t(1),t(1),r()&&(e=a(),R=a(),f=a(),v=a());var w=[1,1];if(r()&&r()){var g=A();switch(g){case 1:w=[1,1];break;case 2:w=[12,11];break;case 3:w=[10,11];break;case 4:w=[16,11];break;case 5:w=[40,33];break;case 6:w=[24,11];break;case 7:w=[20,11];break;case 8:w=[32,11];break;case 9:w=[80,33];break;case 10:w=[18,11];break;case 11:w=[15,11];break;case 12:w=[64,33];break;case 13:w=[160,99];break;case 14:w=[4,3];break;case 15:w=[3,2];break;case 16:w=[2,1];break;case 255:{w=[A()<<8|A(),A()<<8|A()];break}}}return{width:Math.ceil((n+1)*16-e*2-R*2),height:(2-h)*(l+1)*16-(h?2:4)*(f+v),pixelRatio:w}},X.readSliceType=function(){return this.readUByte(),this.readUEG(),this.readUEG()},O}();G.default=N},"./src/demux/id3.ts":function(oe,G,D){"use strict";D.r(G),D.d(G,"isHeader",function(){return j}),D.d(G,"isFooter",function(){return N}),D.d(G,"getID3Data",function(){return O}),D.d(G,"canParse",function(){return M}),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 a}),D.d(G,"testables",function(){return r});var j=function(b,x){return x+10<=b.length&&(b[x]===73&&b[x+1]===68&&b[x+2]===51&&(b[x+3]<255&&b[x+4]<255&&(b[x+6]<128&&b[x+7]<128&&b[x+8]<128&&b[x+9]<128)))},N=function(b,x){return x+10<=b.length&&(b[x]===51&&b[x+1]===68&&b[x+2]===73&&(b[x+3]<255&&b[x+4]<255&&(b[x+6]<128&&b[x+7]<128&&b[x+8]<128&&b[x+9]<128)))},O=function(b,x){for(var E=x,d=0;j(b,x);){d+=10;var n=X(b,x+6);d+=n,N(b,x+10)&&(d+=10),x+=d}return d>0?b.subarray(E,E+d):void 0},X=function(b,x){var E=0;return E=(b[x]&127)<<21,E|=(b[x+1]&127)<<14,E|=(b[x+2]&127)<<7,E|=b[x+3]&127,E},M=function(b,x){return j(b,x)&&X(b,x+6)+10<=b.length-x},e=function(b){for(var x=v(b),E=0;E<x.length;E++){var d=x[E];if(R(d))return o(d)}return},R=function(b){return b&&b.key==="PRIV"&&b.info==="com.apple.streaming.transportStreamTimestamp"},f=function(b){var x=String.fromCharCode(b[0],b[1],b[2],b[3]),E=X(b,4),d=10;return{type:x,size:E,data:b.subarray(d,d+E)}},v=function(b){for(var x=0,E=[];j(b,x);){var d=X(b,x+6);x+=10;for(var n=x+d;x+8<n;){var l=f(b.subarray(x)),h=u(l);h&&E.push(h),x+=l.size+10}N(b,x)&&(x+=10)}return E},u=function(b){return b.type==="PRIV"?s(b):b.type[0]==="W"?A(b):i(b)},s=function(b){if(b.size<2)return;var x=a(b.data,!0),E=new Uint8Array(b.data.subarray(x.length+1));return{key:b.type,info:x,data:E.buffer}},i=function(b){if(b.size<2)return;if(b.type==="TXXX"){var x=1,E=a(b.data.subarray(x),!0);x+=E.length+1;var d=a(b.data.subarray(x));return{key:b.type,info:E,data:d}}var n=a(b.data.subarray(1));return{key:b.type,data:n}},A=function(b){if(b.type==="WXXX"){if(b.size<2)return;var x=1,E=a(b.data.subarray(x),!0);x+=E.length+1;var d=a(b.data.subarray(x));return{key:b.type,info:E,data:d}}var n=a(b.data);return{key:b.type,data:n}},o=function(b){if(b.data.byteLength===8){var x=new Uint8Array(b.data),E=x[3]&1,d=(x[4]<<23)+(x[5]<<15)+(x[6]<<7)+x[7];return d/=45,E&&(d+=4772185884e-2),Math.round(d)}return},a=function(b,x){x===void 0&&(x=!1);var E=_();if(E){var d=E.decode(b);if(x){var n=d.indexOf("\0");return n!==-1?d.substring(0,n):d}return d.replace(/\0/g,"")}for(var l=b.length,h,w,g,c="",L=0;L<l;){if(h=b[L++],h===0&&x)return c;if(h===0||h===3)continue;switch(h>>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:c+=String.fromCharCode(h);break;case 12:case 13:w=b[L++],c+=String.fromCharCode((h&31)<<6|w&63);break;case 14:w=b[L++],g=b[L++],c+=String.fromCharCode((h&15)<<12|(w&63)<<6|(g&63)<<0);break;default:}}return c},r={decodeTextFrame:i},t;function _(){return!t&&typeof self.TextDecoder!="undefined"&&(t=new self.TextDecoder("utf-8")),t}},"./src/demux/mp3demuxer.ts":function(oe,G,D){"use strict";D.r(G);var j=D("./src/demux/base-audio-demuxer.ts"),N=D("./src/demux/id3.ts"),O=D("./src/utils/logger.ts"),X=D("./src/demux/mpegaudio.ts");function M(f,v){f.prototype=Object.create(v.prototype),f.prototype.constructor=f,e(f,v)}function e(f,v){return e=Object.setPrototypeOf||function(s,i){return s.__proto__=i,s},e(f,v)}var R=function(f){M(v,f);function v(){return f.apply(this,arguments)||this}var u=v.prototype;return u.resetInitSegment=function(i,A,o){f.prototype.resetInitSegment.call(this,i,A,o),this._audioTrack={container:"audio/mpeg",type:"audio",id:2,pid:-1,sequenceNumber:0,isAAC:!1,samples:[],manifestCodec:i,duration:o,inputTimeScale:9e4,dropped:0}},v.probe=function(i){if(!i)return!1;for(var A=N.getID3Data(i,0)||[],o=A.length,a=i.length;o<a;o++)if(X.probe(i,o))return O.logger.log("MPEG Audio sync word found !"),!0;return!1},u.canParse=function(i,A){return X.canParse(i,A)},u.appendFrame=function(i,A,o){return this.initPTS===null?void 0:X.appendFrame(i,A,o,this.initPTS,this.frameIndex)},v}(j.default);R.minProbeByteLength=4,G.default=R},"./src/demux/mp4demuxer.ts":function(oe,G,D){"use strict";D.r(G);var j=D("./src/utils/mp4-tools.ts"),N=D("./src/demux/dummy-demuxed-track.ts"),O=function(){function X(e,R){this.remainderData=null,this.config=void 0,this.config=R}var M=X.prototype;return M.resetTimeStamp=function(){},M.resetInitSegment=function(){},M.resetContiguity=function(){},X.probe=function(R){return Object(j.findBox)({data:R,start:0,end:Math.min(R.length,16384)},["moof"]).length>0},M.demux=function(R){var f=R,v=Object(N.dummyTrack)();if(this.config.progressive){this.remainderData&&(f=Object(j.appendUint8Array)(this.remainderData,R));var u=Object(j.segmentValidRange)(f);this.remainderData=u.remainder,v.samples=u.valid||new Uint8Array}else v.samples=f;return{audioTrack:Object(N.dummyTrack)(),avcTrack:v,id3Track:Object(N.dummyTrack)(),textTrack:Object(N.dummyTrack)()}},M.flush=function(){var R=Object(N.dummyTrack)();return R.samples=this.remainderData||new Uint8Array,this.remainderData=null,{audioTrack:Object(N.dummyTrack)(),avcTrack:R,id3Track:Object(N.dummyTrack)(),textTrack:Object(N.dummyTrack)()}},M.demuxSampleAes=function(R,f,v){return Promise.reject(new Error("The MP4 demuxer does not support SAMPLE-AES decryption"))},M.destroy=function(){},X}();O.minProbeByteLength=1024,G.default=O},"./src/demux/mpegaudio.ts":function(oe,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 f}),D.d(G,"isHeader",function(){return v}),D.d(G,"canParse",function(){return u}),D.d(G,"probe",function(){return s});var j=null,N=[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]],M=[0,1,1,4];function e(i,A,o,a,r){if(o+24>A.length)return;var t=R(A,o);if(t&&o+t.frameLength<=A.length){var _=t.samplesPerFrame*9e4/t.sampleRate,y=a+r*_,b={unit:A.subarray(o,o+t.frameLength),pts:y,dts:y};return i.config=[],i.channelCount=t.channelCount,i.samplerate=t.sampleRate,i.samples.push(b),{sample:b,length:t.frameLength,missing:0}}}function R(i,A){var o=i[A+1]>>3&3,a=i[A+1]>>1&3,r=i[A+2]>>4&15,t=i[A+2]>>2&3;if(o!==1&&r!==0&&r!==15&&t!==3){var _=i[A+2]>>1&1,y=i[A+3]>>6,b=o===3?3-a:a===3?3:4,x=N[b*14+r-1]*1e3,E=o===3?0:o===2?1:2,d=O[E*3+t],n=y===3?1:2,l=X[o][a],h=M[a],w=l*8*h,g=Math.floor(l*x/d+_)*h;if(j===null){var c=navigator.userAgent||"",L=c.match(/Chrome\/(\d+)/i);j=L?parseInt(L[1]):0}var F=!!j&&j<=87;return F&&a===2&&x>=224e3&&y===0&&(i[A+3]=i[A+3]|128),{sampleRate:d,channelCount:n,frameLength:g,samplesPerFrame:w}}}function f(i,A){return i[A]===255&&(i[A+1]&224)===224&&(i[A+1]&6)!==0}function v(i,A){return A+1<i.length&&f(i,A)}function u(i,A){var o=4;return f(i,A)&&o<=i.length-A}function s(i,A){if(A+1<i.length&&f(i,A)){var o=4,a=R(i,A),r=o;a!=null&&a.frameLength&&(r=a.frameLength);var t=A+r;return t===i.length||v(i,t)}return!1}},"./src/demux/sample-aes.ts":function(oe,G,D){"use strict";D.r(G);var j=D("./src/crypt/decrypter.ts"),N=D("./src/demux/tsdemuxer.ts"),O=function(){function X(e,R,f){this.keyData=void 0,this.decrypter=void 0,this.keyData=f,this.decrypter=new j.default(e,R,{removePKCS7Padding:!1})}var M=X.prototype;return M.decryptBuffer=function(R,f){this.decrypter.decrypt(R,this.keyData.key.buffer,this.keyData.iv.buffer,f)},M.decryptAacSample=function(R,f,v,u){var s=R[f].unit,i=s.subarray(16,s.length-s.length%16),A=i.buffer.slice(i.byteOffset,i.byteOffset+i.length),o=this;this.decryptBuffer(A,function(a){var r=new Uint8Array(a);s.set(r,16),u||o.decryptAacSamples(R,f+1,v)})},M.decryptAacSamples=function(R,f,v){for(;;f++){if(f>=R.length){v();return}if(R[f].unit.length<32)continue;var u=this.decrypter.isSync();if(this.decryptAacSample(R,f,v,u),!u)return}},M.getAvcEncryptedData=function(R){for(var f=Math.floor((R.length-48)/160)*16+16,v=new Int8Array(f),u=0,s=32;s<=R.length-16;s+=160,u+=16)v.set(R.subarray(s,s+16),u);return v},M.getAvcDecryptedUnit=function(R,f){for(var v=new Uint8Array(f),u=0,s=32;s<=R.length-16;s+=160,u+=16)R.set(v.subarray(u,u+16),s);return R},M.decryptAvcSample=function(R,f,v,u,s,i){var A=Object(N.discardEPB)(s.data),o=this.getAvcEncryptedData(A),a=this;this.decryptBuffer(o.buffer,function(r){s.data=a.getAvcDecryptedUnit(A,r),i||a.decryptAvcSamples(R,f,v+1,u)})},M.decryptAvcSamples=function(R,f,v,u){if(R instanceof Uint8Array)throw new Error("Cannot decrypt samples of type Uint8Array");for(;;f++,v=0){if(f>=R.length){u();return}for(var s=R[f].units;!(v>=s.length);v++){var i=s[v];if(i.data.length<=48||i.type!==1&&i.type!==5)continue;var A=this.decrypter.isSync();if(this.decryptAvcSample(R,f,v,u,i,A),!A)return}}},X}();G.default=O},"./src/demux/transmuxer-interface.ts":function(oe,G,D){"use strict";D.r(G),D.d(G,"default",function(){return s});var j=D("./node_modules/webworkify-webpack/index.js"),N=D.n(j),O=D("./src/events.ts"),X=D("./src/demux/transmuxer.ts"),M=D("./src/utils/logger.ts"),e=D("./src/errors.ts"),R=D("./src/utils/mediasource-helper.ts"),f=D("./node_modules/eventemitter3/index.js"),v=D.n(f),u=Object(R.getMediaSource)()||{isTypeSupported:function(){return!1}},s=function(){function i(o,a,r,t){var _=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=a,this.onTransmuxComplete=r,this.onFlush=t;var y=o.config,b=function(l,h){h=h||{},h.frag=_.frag,h.id=_.id,o.trigger(l,h)};this.observer=new f.EventEmitter,this.observer.on(O.Events.FRAG_DECRYPTED,b),this.observer.on(O.Events.ERROR,b);var x={mp4:u.isTypeSupported("video/mp4"),mpeg:u.isTypeSupported("audio/mpeg"),mp3:u.isTypeSupported('audio/mp4; codecs="mp3"')},E=navigator.vendor;if(y.enableWorker&&typeof Worker!="undefined"){M.logger.log("demuxing in webworker");var d;try{d=this.worker=j("./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:x,vendor:E,id:a,config:JSON.stringify(y)})}catch(n){M.logger.warn("Error in worker:",n),M.logger.error("Error while initializing DemuxerWorker, fallback to inline"),d&&self.URL.revokeObjectURL(d.objectURL),this.transmuxer=new X.default(this.observer,x,y,E,a),this.worker=null}}else this.transmuxer=new X.default(this.observer,x,y,E,a)}var A=i.prototype;return A.destroy=function(){var a=this.worker;if(a)a.removeEventListener("message",this.onwmsg),a.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(a,r,t,_,y,b,x,E,d,n){var l=this;d.transmuxing.start=self.performance.now();var h=this.transmuxer,w=this.worker,g=b?b.start:y.start,c=y.decryptdata,L=this.frag,F=!(L&&y.cc===L.cc),B=!(L&&d.level===L.level),P=L?d.sn-L.sn:-1,W=this.part?d.part-this.part.index:1,U=!B&&(P===1||P===0&&W===1),$=self.performance.now();(B||P||y.stats.parsing.start===0)&&(y.stats.parsing.start=$),b&&(W||!U)&&(b.stats.parsing.start=$);var ee=new X.TransmuxState(F,U,E,B,g);if(!U||F){M.logger.log("[transmuxer-interface, "+y.type+"]: Starting new transmux session for sn: "+d.sn+" p: "+d.part+" level: "+d.level+" id: "+d.id+`
|
|
discontinuity: `+F+`
|
|
trackSwitch: `+B+`
|
|
contiguous: `+U+`
|
|
accurateTimeOffset: `+E+`
|
|
timeOffset: `+g);var pe=new X.TransmuxConfig(t,_,r,x,n);this.configureTransmuxer(pe)}if(this.frag=y,this.part=b,w)w.postMessage({cmd:"demux",data:a,decryptdata:c,chunkMeta:d,state:ee},a instanceof ArrayBuffer?[a]:[]);else if(h){var fe=h.push(a,c,d,ee);Object(X.isPromise)(fe)?fe.then(function(Le){l.handleTransmuxComplete(Le)}):this.handleTransmuxComplete(fe)}},A.flush=function(a){var r=this;a.transmuxing.start=self.performance.now();var t=this.transmuxer,_=this.worker;if(_)_.postMessage({cmd:"flush",chunkMeta:a});else if(t){var y=t.flush(a);Object(X.isPromise)(y)?y.then(function(b){r.handleFlushResult(b,a)}):this.handleFlushResult(y,a)}},A.handleFlushResult=function(a,r){var t=this;a.forEach(function(_){t.handleTransmuxComplete(_)}),this.onFlush(r)},A.onWorkerMessage=function(a){var r=a.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(a){var r=this.worker,t=this.transmuxer;r?r.postMessage({cmd:"configure",config:a}):t&&t.configure(a)},A.handleTransmuxComplete=function(a){a.chunkMeta.transmuxing.end=self.performance.now(),this.onTransmuxComplete(a)},i}()},"./src/demux/transmuxer-worker.ts":function(oe,G,D){"use strict";D.r(G),D.d(G,"default",function(){return e});var j=D("./src/demux/transmuxer.ts"),N=D("./src/events.ts"),O=D("./src/utils/logger.ts"),X=D("./node_modules/eventemitter3/index.js"),M=D.n(X);function e(s){var i=new X.EventEmitter,A=function(a,r){s.postMessage({event:a,data:r})};i.on(N.Events.FRAG_DECRYPTED,A),i.on(N.Events.ERROR,A),s.addEventListener("message",function(o){var a=o.data;switch(a.cmd){case"init":{var r=JSON.parse(a.config);s.transmuxer=new j.default(i,a.typeSupported,r,a.vendor,a.id),Object(O.enableLogs)(r.debug),A("init",null);break}case"configure":{s.transmuxer.configure(a.config);break}case"demux":{var t=s.transmuxer.push(a.data,a.decryptdata,a.chunkMeta,a.state);Object(j.isPromise)(t)?t.then(function(b){R(s,b)}):R(s,t);break}case"flush":{var _=a.chunkMeta,y=s.transmuxer.flush(_);Object(j.isPromise)(y)?y.then(function(b){v(s,b,_)}):v(s,y,_);break}default:break}})}function R(s,i){if(u(i.remuxResult))return;var A=[],o=i.remuxResult,a=o.audio,r=o.video;a&&f(A,a),r&&f(A,r),s.postMessage({event:"transmuxComplete",data:i},A)}function f(s,i){i.data1&&s.push(i.data1.buffer),i.data2&&s.push(i.data2.buffer)}function v(s,i,A){i.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(oe,G,D){"use strict";D.r(G),D.d(G,"default",function(){return r}),D.d(G,"isPromise",function(){return y}),D.d(G,"TransmuxConfig",function(){return b}),D.d(G,"TransmuxState",function(){return x});var j=D("./src/events.ts"),N=D("./src/errors.ts"),O=D("./src/crypt/decrypter.ts"),X=D("./src/demux/aacdemuxer.ts"),M=D("./src/demux/mp4demuxer.ts"),e=D("./src/demux/tsdemuxer.ts"),R=D("./src/demux/mp3demuxer.ts"),f=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"),i=D("./src/utils/logger.ts"),A;try{A=self.performance.now.bind(self.performance)}catch(E){i.logger.debug("Unable to use Performance API on this environment"),A=self.Date.now}var o=[{demux:e.default,remux:f.default},{demux:M.default,remux:v.default},{demux:X.default,remux:f.default},{demux:R.default,remux:f.default}],a=1024;o.forEach(function(E){var d=E.demux;a=Math.max(a,d.minProbeByteLength)});var r=function(){function E(n,l,h,w,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=h,this.vendor=w,this.id=g}var d=E.prototype;return d.configure=function(l){this.transmuxConfig=l,this.decrypter&&this.decrypter.reset()},d.push=function(l,h,w,g){var c=this,L=w.transmuxing;L.executeStart=A();var F=new Uint8Array(l),B=this.cache,P=this.config,W=this.currentTransmuxState,U=this.transmuxConfig;g&&(this.currentTransmuxState=g);var $=t(F,h);if($&&$.method==="AES-128"){var ee=this.getDecrypter();if(P.enableSoftwareAES){var pe=ee.softwareDecrypt(F,$.key.buffer,$.iv.buffer);if(!pe)return L.executeEnd=A(),_(w);F=new Uint8Array(pe)}else return this.decryptionPromise=ee.webCryptoDecrypt(F,$.key.buffer,$.iv.buffer).then(function(z){var Y=c.push(z,null,w);return c.decryptionPromise=null,Y}),this.decryptionPromise}var fe=g||W,Le=fe.contiguous,Ie=fe.discontinuity,xe=fe.trackSwitch,Ue=fe.accurateTimeOffset,Fe=fe.timeOffset,we=U.audioCodec,ve=U.videoCodec,ze=U.defaultInitPts,at=U.duration,nt=U.initSegmentData;if((Ie||xe)&&this.resetInitSegment(nt,we,ve,at),Ie&&this.resetInitialTimestamp(ze),Le||this.resetContiguity(),this.needsProbing(F,Ie,xe)){if(B.dataLength){var et=B.flush();F=Object(s.appendUint8Array)(et,F)}this.configureTransmuxer(F,U)}var Ke=this.transmux(F,$,Fe,Ue,w),re=this.currentTransmuxState;return re.contiguous=!0,re.discontinuity=!1,re.trackSwitch=!1,L.executeEnd=A(),Ke},d.flush=function(l){var h=this,w=l.transmuxing;w.executeStart=A();var g=this.decrypter,c=this.cache,L=this.currentTransmuxState,F=this.decryptionPromise;if(F)return F.then(function(){return h.flush(l)});var B=[],P=L.timeOffset;if(g){var W=g.flush();W&&B.push(this.push(W,null,l))}var U=c.dataLength;c.reset();var $=this.demuxer,ee=this.remuxer;if(!$||!ee)return U>=a&&this.observer.emit(j.Events.ERROR,j.Events.ERROR,{type:N.ErrorTypes.MEDIA_ERROR,details:N.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"no demux matching with content found"}),w.executeEnd=A(),[_(l)];var pe=$.flush(P);return y(pe)?pe.then(function(fe){return h.flushRemux(B,fe,l),B}):(this.flushRemux(B,pe,l),B)},d.flushRemux=function(l,h,w){var g=h.audioTrack,c=h.avcTrack,L=h.id3Track,F=h.textTrack,B=this.currentTransmuxState,P=B.accurateTimeOffset,W=B.timeOffset;i.logger.log("[transmuxer.ts]: Flushed fragment "+w.sn+(w.part>-1?" p: "+w.part:"")+" of level "+w.level);var U=this.remuxer.remux(g,c,L,F,W,P,!0,this.id);l.push({remuxResult:U,chunkMeta:w}),w.transmuxing.executeEnd=A()},d.resetInitialTimestamp=function(l){var h=this.demuxer,w=this.remuxer;if(!h||!w)return;h.resetTimeStamp(l),w.resetTimeStamp(l)},d.resetContiguity=function(){var l=this.demuxer,h=this.remuxer;if(!l||!h)return;l.resetContiguity(),h.resetNextTimestamp()},d.resetInitSegment=function(l,h,w,g){var c=this.demuxer,L=this.remuxer;if(!c||!L)return;c.resetInitSegment(h,w,g),L.resetInitSegment(l,h,w)},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,h,w,g,c){var L;return h&&h.method==="SAMPLE-AES"?L=this.transmuxSampleAes(l,h,w,g,c):L=this.transmuxUnencrypted(l,w,g,c),L},d.transmuxUnencrypted=function(l,h,w,g){var c=this.demuxer.demux(l,h,!1,!this.config.progressive),L=c.audioTrack,F=c.avcTrack,B=c.id3Track,P=c.textTrack,W=this.remuxer.remux(L,F,B,P,h,w,!1,this.id);return{remuxResult:W,chunkMeta:g}},d.transmuxSampleAes=function(l,h,w,g,c){var L=this;return this.demuxer.demuxSampleAes(l,h,w).then(function(F){var B=L.remuxer.remux(F.audioTrack,F.avcTrack,F.id3Track,F.textTrack,w,g,!1,L.id);return{remuxResult:B,chunkMeta:c}})},d.configureTransmuxer=function(l,h){for(var w=this.config,g=this.observer,c=this.typeSupported,L=this.vendor,F=h.audioCodec,B=h.defaultInitPts,P=h.duration,W=h.initSegmentData,U=h.videoCodec,$,ee=0,pe=o.length;ee<pe;ee++)if(o[ee].demux.probe(l)){$=o[ee];break}$||(i.logger.warn("Failed to find demuxer by probing frag, treating as mp4 passthrough"),$={demux:M.default,remux:v.default});var fe=this.demuxer,Le=this.remuxer,Ie=$.remux,xe=$.demux;(!Le||!(Le instanceof Ie))&&(this.remuxer=new Ie(g,w,c,L)),(!fe||!(fe instanceof xe))&&(this.demuxer=new xe(g,w,c),this.probe=xe.probe),this.resetInitSegment(W,F,U,P),this.resetInitialTimestamp(B)},d.needsProbing=function(l,h,w){return!this.demuxer||!this.remuxer||h||w},d.getDecrypter=function(){var l=this.decrypter;return l||(l=this.decrypter=new O.default(this.observer,this.config)),l},E}();function t(E,d){var n=null;return E.byteLength>0&&d!=null&&d.key!=null&&d.iv!==null&&d.method!=null&&(n=d),n}var _=function(d){return{remuxResult:{},chunkMeta:d}};function y(E){return"then"in E&&E.then instanceof Function}var b=function(d,n,l,h,w){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=h,this.defaultInitPts=w},x=function(d,n,l,h,w){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=h,this.timeOffset=w}},"./src/demux/tsdemuxer.ts":function(oe,G,D){"use strict";D.r(G),D.d(G,"discardEPB",function(){return _});var j=D("./src/demux/adts.ts"),N=D("./src/demux/mpegaudio.ts"),O=D("./src/demux/exp-golomb.ts"),X=D("./src/demux/id3.ts"),M=D("./src/demux/sample-aes.ts"),e=D("./src/events.ts"),R=D("./src/utils/mp4-tools.ts"),f=D("./src/utils/logger.ts"),v=D("./src/errors.ts"),u={video:1,audio:2,id3:3,text:4},s=function(){function y(x,E,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=x,this.config=E,this.typeSupported=d}y.probe=function(E){var d=y.syncOffset(E);return d<0?!1:(d&&f.logger.warn("MPEG2-TS detected but first sync word found @ offset "+d+", junk ahead ?"),!0)},y.syncOffset=function(E){for(var d=Math.min(1e3,E.length-3*188),n=0;n<d;){if(E[n]===71&&E[n+188]===71&&E[n+2*188]===71)return n;n++}return-1},y.createTrack=function(E,d){return{container:E==="video"||E==="audio"?"video/mp2t":void 0,type:E,id:u[E],pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0,duration:E==="audio"?d:void 0}};var b=y.prototype;return b.resetInitSegment=function(E,d,n){this.pmtParsed=!1,this._pmtId=-1,this._avcTrack=y.createTrack("video",n),this._audioTrack=y.createTrack("audio",n),this._id3Track=y.createTrack("id3",n),this._txtTrack=y.createTrack("text",n),this._audioTrack.isAAC=!0,this.aacOverFlow=null,this.aacLastPTS=null,this.avcSample=null,this.audioCodec=E,this.videoCodec=d,this._duration=n},b.resetTimeStamp=function(){},b.resetContiguity=function(){var E=this._audioTrack,d=this._avcTrack,n=this._id3Track;E&&(E.pesData=null),d&&(d.pesData=null),n&&(n.pesData=null),this.aacOverFlow=null,this.aacLastPTS=null},b.demux=function(E,d,n,l){n===void 0&&(n=!1),l===void 0&&(l=!1),n||(this.sampleAes=null);var h,w=this._avcTrack,g=this._audioTrack,c=this._id3Track,L=w.pid,F=w.pesData,B=g.pid,P=c.pid,W=g.pesData,U=c.pesData,$=!1,ee=this.pmtParsed,pe=this._pmtId,fe=E.length;if(this.remainderData&&(E=Object(R.appendUint8Array)(this.remainderData,E),fe=E.length,this.remainderData=null),fe<188&&!l)return this.remainderData=E,{audioTrack:g,avcTrack:w,id3Track:c,textTrack:this._txtTrack};var Le=Math.max(0,y.syncOffset(E));fe-=(fe+Le)%188,fe<E.byteLength&&!l&&(this.remainderData=new Uint8Array(E.buffer,fe,E.buffer.byteLength-fe));for(var Ie=Le;Ie<fe;Ie+=188)if(E[Ie]===71){var xe=!!(E[Ie+1]&64),Ue=((E[Ie+1]&31)<<8)+E[Ie+2],Fe=(E[Ie+3]&48)>>4,we=void 0;if(Fe>1){if(we=Ie+5+E[Ie+4],we===Ie+188)continue}else we=Ie+4;switch(Ue){case L:xe&&(F&&(h=a(F))&&this.parseAVCPES(h,!1),F={data:[],size:0}),F&&(F.data.push(E.subarray(we,Ie+188)),F.size+=Ie+188-we);break;case B:xe&&(W&&(h=a(W))&&(g.isAAC?this.parseAACPES(h):this.parseMPEGPES(h)),W={data:[],size:0}),W&&(W.data.push(E.subarray(we,Ie+188)),W.size+=Ie+188-we);break;case P:xe&&(U&&(h=a(U))&&this.parseID3PES(h),U={data:[],size:0}),U&&(U.data.push(E.subarray(we,Ie+188)),U.size+=Ie+188-we);break;case 0:xe&&(we+=E[we]+1),pe=this._pmtId=A(E,we);break;case pe:{xe&&(we+=E[we]+1);var ve=o(E,we,this.typeSupported.mpeg===!0||this.typeSupported.mp3===!0,n);L=ve.avc,L>0&&(w.pid=L),B=ve.audio,B>0&&(g.pid=B,g.isAAC=ve.isAAC),P=ve.id3,P>0&&(c.pid=P),$&&!ee&&(f.logger.log("reparse from beginning"),$=!1,Ie=Le-188),ee=this.pmtParsed=!0;break}case 17:case 8191:break;default:$=!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"});w.pesData=F,g.pesData=W,c.pesData=U;var ze={audioTrack:g,avcTrack:w,id3Track:c,textTrack:this._txtTrack};return l&&this.extractRemainingSamples(ze),ze},b.flush=function(){var E=this.remainderData;this.remainderData=null;var d;return E?d=this.demux(E,-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},b.extractRemainingSamples=function(E){var d=E.audioTrack,n=E.avcTrack,l=E.id3Track,h=n.pesData,w=d.pesData,g=l.pesData,c;h&&(c=a(h))?(this.parseAVCPES(c,!0),n.pesData=null):n.pesData=h,w&&(c=a(w))?(d.isAAC?this.parseAACPES(c):this.parseMPEGPES(c),d.pesData=null):(w!=null&&w.size&&f.logger.log("last AAC PES packet truncated,might overlap between fragments"),d.pesData=w),g&&(c=a(g))?(this.parseID3PES(c),l.pesData=null):l.pesData=g},b.demuxSampleAes=function(E,d,n){var l=this.demux(E,n,!0,!this.config.progressive),h=this.sampleAes=new M.default(this.observer,this.config,d);return this.decrypt(l,h)},b.decrypt=function(E,d){return new Promise(function(n){var l=E.audioTrack,h=E.avcTrack;l.samples&&l.isAAC?d.decryptAacSamples(l.samples,0,function(){h.samples?d.decryptAvcSamples(h.samples,0,0,function(){n(E)}):n(E)}):h.samples&&d.decryptAvcSamples(h.samples,0,0,function(){n(E)})})},b.destroy=function(){this._initPTS=this._initDTS=null,this._duration=0},b.parseAVCPES=function(E,d){var n=this,l=this._avcTrack,h=this.parseAVCNALu(E.data),w=!1,g=this.avcSample,c,L=!1;E.data=null,g&&h.length&&!l.audFound&&(r(g,l),g=this.avcSample=i(!1,E.pts,E.dts,"")),h.forEach(function(F){switch(F.type){case 1:{c=!0,g||(g=n.avcSample=i(!0,E.pts,E.dts,"")),w&&(g.debug+="NDR "),g.frame=!0;var B=F.data;if(L&&B.length>4){var P=new O.default(B).readSliceType();(P===2||P===4||P===7||P===9)&&(g.key=!0)}break}case 5:c=!0,g||(g=n.avcSample=i(!0,E.pts,E.dts,"")),w&&(g.debug+="IDR "),g.key=!0,g.frame=!0;break;case 6:{c=!0,w&&g&&(g.debug+="SEI ");var W=new O.default(_(F.data));W.readUByte();for(var U=0,$=0,ee=!1,pe=0;!ee&&W.bytesAvailable>1;){U=0;do pe=W.readUByte(),U+=pe;while(pe===255);$=0;do pe=W.readUByte(),$+=pe;while(pe===255);if(U===4&&W.bytesAvailable!==0){ee=!0;var fe=W.readUByte();if(fe===181){var Le=W.readUShort();if(Le===49){var Ie=W.readUInt();if(Ie===1195456820){var xe=W.readUByte();if(xe===3){for(var Ue=W.readUByte(),Fe=W.readUByte(),we=31&Ue,ve=[Ue,Fe],ze=0;ze<we;ze++)ve.push(W.readUByte()),ve.push(W.readUByte()),ve.push(W.readUByte());t(n._txtTrack.samples,{type:3,pts:E.pts,bytes:ve})}}}}}else if(U===5&&W.bytesAvailable!==0){if(ee=!0,$>16){for(var at=[],nt=0;nt<16;nt++)at.push(W.readUByte().toString(16)),(nt===3||nt===5||nt===7||nt===9)&&at.push("-");for(var et=$-16,Ke=new Uint8Array(et),re=0;re<et;re++)Ke[re]=W.readUByte();t(n._txtTrack.samples,{pts:E.pts,payloadType:U,uuid:at.join(""),userData:Object(X.utf8ArrayToStr)(Ke),userDataBytes:Ke})}}else if($<W.bytesAvailable)for(var z=0;z<$;z++)W.readUByte()}break}case 7:if(c=!0,L=!0,w&&g&&(g.debug+="SPS "),!l.sps){var Y=new O.default(F.data),J=Y.readSPS();l.width=J.width,l.height=J.height,l.pixelRatio=J.pixelRatio,l.sps=[F.data],l.duration=n._duration;for(var ie=F.data.subarray(1,4),ue="avc1.",he=0;he<3;he++){var He=ie[he].toString(16);He.length<2&&(He="0"+He),ue+=He}l.codec=ue}break;case 8:c=!0,w&&g&&(g.debug+="PPS "),l.pps||(l.pps=[F.data]);break;case 9:c=!1,l.audFound=!0,g&&r(g,l),g=n.avcSample=i(!1,E.pts,E.dts,w?"AUD ":"");break;case 12:c=!1;break;default:c=!1,g&&(g.debug+="unknown NAL "+F.type+" ");break}if(g&&c){var We=g.units;We.push(F)}}),d&&g&&(r(g,l),this.avcSample=null)},b.getLastNalUnit=function(){var E,d=this.avcSample,n;if(!d||d.units.length===0){var l=this._avcTrack.samples;d=l[l.length-1]}if((E=d)!==null&&E!==void 0&&E.units){var h=d.units;n=h[h.length-1]}return n},b.parseAVCNALu=function(E){var d=E.byteLength,n=this._avcTrack,l=n.naluState||0,h=l,w=[],g=0,c,L,F,B=-1,P=0;for(l===-1&&(B=0,P=E[0]&31,l=0,g=1);g<d;){if(c=E[g++],!l){l=c?0:1;continue}if(l===1){l=c?0:2;continue}if(!c)l=3;else if(c===1){if(B>=0){var W={data:E.subarray(B,g-l-1),type:P};w.push(W)}else{var U=this.getLastNalUnit();if(U&&(h&&g<=4-h&&(U.state&&(U.data=U.data.subarray(0,U.data.byteLength-h))),L=g-l-1,L>0)){var $=new Uint8Array(U.data.byteLength+L);$.set(U.data,0),$.set(E.subarray(0,L),U.data.byteLength),U.data=$,U.state=0}}g<d?(F=E[g]&31,B=g,P=F,l=0):l=-1}else l=0}if(B>=0&&l>=0){var ee={data:E.subarray(B,d),type:P,state:l};w.push(ee)}if(w.length===0){var pe=this.getLastNalUnit();if(pe){var fe=new Uint8Array(pe.data.byteLength+E.byteLength);fe.set(pe.data,0),fe.set(E,pe.data.byteLength),pe.data=fe}}return n.naluState=l,w},b.parseAACPES=function(E){var d=0,n=this._audioTrack,l=this.aacOverFlow,h=E.data;if(l){this.aacOverFlow=null;var w=l.sample.unit.byteLength,g=Math.min(l.missing,w),c=w-g;l.sample.unit.set(h.subarray(0,g),c),n.samples.push(l.sample),d=l.missing}var L,F;for(L=d,F=h.length;L<F-1&&!j.isHeader(h,L);L++);if(L!==d){var B,P;if(L<F-1?(B="AAC PES did not start with ADTS header,offset:"+L,P=!1):(B="no ADTS header found in AAC PES",P=!0),f.logger.warn("parsing error:"+B),this.observer.emit(e.Events.ERROR,e.Events.ERROR,{type:v.ErrorTypes.MEDIA_ERROR,details:v.ErrorDetails.FRAG_PARSING_ERROR,fatal:P,reason:B}),P)return}j.initTrackConfig(n,this.observer,h,L,this.audioCodec);var W;if(E.pts!==void 0)W=E.pts;else if(l){var U=j.getFrameDuration(n.samplerate);W=l.sample.pts+U}else{f.logger.warn("[tsdemuxer]: AAC PES unknown PTS");return}for(var $=0;L<F;)if(j.isHeader(h,L)){if(L+5<F){var ee=j.appendFrame(n,h,L,W,$);if(ee)if(ee.missing)this.aacOverFlow=ee;else{L+=ee.length,$++;continue}}break}else L++},b.parseMPEGPES=function(E){var d=E.data,n=d.length,l=0,h=0,w=E.pts;if(w===void 0){f.logger.warn("[tsdemuxer]: MPEG PES unknown PTS");return}for(;h<n;)if(N.isHeader(d,h)){var g=N.appendFrame(this._audioTrack,d,h,w,l);if(g)h+=g.length,l++;else break}else h++},b.parseID3PES=function(E){if(E.pts===void 0){f.logger.warn("[tsdemuxer]: ID3 PES unknown PTS");return}this._id3Track.samples.push(E)},y}();s.minProbeByteLength=188;function i(y,b,x,E){return{key:y,frame:!1,pts:b,dts:x,units:[],debug:E,length:0}}function A(y,b){return(y[b+10]&31)<<8|y[b+11]}function o(y,b,x,E){var d={audio:-1,avc:-1,id3:-1,isAAC:!0},n=(y[b+1]&15)<<8|y[b+2],l=b+3+n-4,h=(y[b+10]&15)<<8|y[b+11];for(b+=12+h;b<l;){var w=(y[b+1]&31)<<8|y[b+2];switch(y[b]){case 207:if(!E){f.logger.log("ADTS AAC with AES-128-CBC frame encryption found in unencrypted stream");break}case 15:d.audio===-1&&(d.audio=w);break;case 21:d.id3===-1&&(d.id3=w);break;case 219:if(!E){f.logger.log("H.264 with AES-128-CBC slice encryption found in unencrypted stream");break}case 27:d.avc===-1&&(d.avc=w);break;case 3:case 4:x?d.audio===-1&&(d.audio=w,d.isAAC=!1):f.logger.log("MPEG audio found, not supported in this browser");break;case 36:f.logger.warn("Unsupported HEVC stream type found");break;default:break}b+=((y[b+3]&15)<<8|y[b+4])+5}return d}function a(y){var b=0,x,E,d,n,l,h=y.data;if(!y||y.size===0)return null;for(;h[0].length<19&&h.length>1;){var w=new Uint8Array(h[0].length+h[1].length);w.set(h[0]),w.set(h[1],h[0].length),h[0]=w,h.splice(1,1)}x=h[0];var g=(x[0]<<16)+(x[1]<<8)+x[2];if(g===1){if(E=(x[4]<<8)+x[5],E&&E>y.size-6)return null;var c=x[7];c&192&&(n=(x[9]&14)*536870912+(x[10]&255)*4194304+(x[11]&254)*16384+(x[12]&255)*128+(x[13]&254)/2,c&64?(l=(x[14]&14)*536870912+(x[15]&255)*4194304+(x[16]&254)*16384+(x[17]&255)*128+(x[18]&254)/2,n-l>60*9e4&&(f.logger.warn(Math.round((n-l)/9e4)+"s delta between PTS and DTS, align them"),n=l)):l=n),d=x[8];var L=d+9;if(y.size<=L)return null;y.size-=L;for(var F=new Uint8Array(y.size),B=0,P=h.length;B<P;B++){x=h[B];var W=x.byteLength;if(L)if(L>W){L-=W;continue}else x=x.subarray(L),W-=L,L=0;F.set(x,b),b+=W}return E&&(E-=d+3),{data:F,pts:n,dts:l,len:E}}return null}function r(y,b){if(y.units.length&&y.frame){if(y.pts===void 0){var x=b.samples,E=x.length;if(E){var d=x[E-1];y.pts=d.pts,y.dts=d.dts}else{b.dropped++;return}}b.samples.push(y)}y.debug.length&&f.logger.log(y.pts+"/"+y.dts+":"+y.debug)}function t(y,b){var x=y.length;if(x>0){if(b.pts>=y[x-1].pts)y.push(b);else for(var E=x-1;E>=0;E--)if(b.pts<y[E].pts){y.splice(E,0,b);break}}else y.push(b)}function _(y){for(var b=y.byteLength,x=[],E=1;E<b-2;)y[E]===0&&y[E+1]===0&&y[E+2]===3?(x.push(E+2),E+=2):E++;if(x.length===0)return y;var d=b-x.length,n=new Uint8Array(d),l=0;for(E=0;E<d;l++,E++)l===x[0]&&(l++,x.shift()),n[E]=y[l];return n}G.default=s},"./src/errors.ts":function(oe,G,D){"use strict";D.r(G),D.d(G,"ErrorTypes",function(){return j}),D.d(G,"ErrorDetails",function(){return N});var j;(function(O){O.NETWORK_ERROR="networkError",O.MEDIA_ERROR="mediaError",O.KEY_SYSTEM_ERROR="keySystemError",O.MUX_ERROR="muxError",O.OTHER_ERROR="otherError"})(j||(j={}));var N;(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"})(N||(N={}))},"./src/events.ts":function(oe,G,D){"use strict";D.r(G),D.d(G,"Events",function(){return j});var j;(function(N){N.MEDIA_ATTACHING="hlsMediaAttaching",N.MEDIA_ATTACHED="hlsMediaAttached",N.MEDIA_DETACHING="hlsMediaDetaching",N.MEDIA_DETACHED="hlsMediaDetached",N.BUFFER_RESET="hlsBufferReset",N.BUFFER_CODECS="hlsBufferCodecs",N.BUFFER_CREATED="hlsBufferCreated",N.BUFFER_APPENDING="hlsBufferAppending",N.BUFFER_APPENDED="hlsBufferAppended",N.BUFFER_EOS="hlsBufferEos",N.BUFFER_FLUSHING="hlsBufferFlushing",N.BUFFER_FLUSHED="hlsBufferFlushed",N.MANIFEST_LOADING="hlsManifestLoading",N.MANIFEST_LOADED="hlsManifestLoaded",N.MANIFEST_PARSED="hlsManifestParsed",N.LEVEL_SWITCHING="hlsLevelSwitching",N.LEVEL_SWITCHED="hlsLevelSwitched",N.LEVEL_LOADING="hlsLevelLoading",N.LEVEL_LOADED="hlsLevelLoaded",N.LEVEL_UPDATED="hlsLevelUpdated",N.LEVEL_PTS_UPDATED="hlsLevelPtsUpdated",N.LEVELS_UPDATED="hlsLevelsUpdated",N.AUDIO_TRACKS_UPDATED="hlsAudioTracksUpdated",N.AUDIO_TRACK_SWITCHING="hlsAudioTrackSwitching",N.AUDIO_TRACK_SWITCHED="hlsAudioTrackSwitched",N.AUDIO_TRACK_LOADING="hlsAudioTrackLoading",N.AUDIO_TRACK_LOADED="hlsAudioTrackLoaded",N.SUBTITLE_TRACKS_UPDATED="hlsSubtitleTracksUpdated",N.SUBTITLE_TRACKS_CLEARED="hlsSubtitleTracksCleared",N.SUBTITLE_TRACK_SWITCH="hlsSubtitleTrackSwitch",N.SUBTITLE_TRACK_LOADING="hlsSubtitleTrackLoading",N.SUBTITLE_TRACK_LOADED="hlsSubtitleTrackLoaded",N.SUBTITLE_FRAG_PROCESSED="hlsSubtitleFragProcessed",N.CUES_PARSED="hlsCuesParsed",N.NON_NATIVE_TEXT_TRACKS_FOUND="hlsNonNativeTextTracksFound",N.INIT_PTS_FOUND="hlsInitPtsFound",N.FRAG_LOADING="hlsFragLoading",N.FRAG_LOAD_EMERGENCY_ABORTED="hlsFragLoadEmergencyAborted",N.FRAG_LOADED="hlsFragLoaded",N.FRAG_DECRYPTED="hlsFragDecrypted",N.FRAG_PARSING_INIT_SEGMENT="hlsFragParsingInitSegment",N.FRAG_PARSING_USERDATA="hlsFragParsingUserdata",N.FRAG_PARSING_METADATA="hlsFragParsingMetadata",N.FRAG_PARSED="hlsFragParsed",N.FRAG_BUFFERED="hlsFragBuffered",N.FRAG_CHANGED="hlsFragChanged",N.FPS_DROP="hlsFpsDrop",N.FPS_DROP_LEVEL_CAPPING="hlsFpsDropLevelCapping",N.ERROR="hlsError",N.DESTROYING="hlsDestroying",N.KEY_LOADING="hlsKeyLoading",N.KEY_LOADED="hlsKeyLoaded",N.LIVE_BACK_BUFFER_REACHED="hlsLiveBackBufferReached",N.BACK_BUFFER_REACHED="hlsBackBufferReached"})(j||(j={}))},"./src/hls.ts":function(oe,G,D){"use strict";D.r(G),D.d(G,"default",function(){return y});var j=D("./node_modules/url-toolkit/src/url-toolkit.js"),N=D.n(j),O=D("./src/loader/playlist-loader.ts"),X=D("./src/loader/key-loader.ts"),M=D("./src/controller/id3-track-controller.ts"),e=D("./src/controller/latency-controller.ts"),R=D("./src/controller/level-controller.ts"),f=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"),i=D("./src/config.ts"),A=D("./node_modules/eventemitter3/index.js"),o=D.n(A),a=D("./src/events.ts"),r=D("./src/errors.ts");function t(b,x){for(var E=0;E<x.length;E++){var d=x[E];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(b,d.key,d)}}function _(b,x,E){return x&&t(b.prototype,x),E&&t(b,E),b}var y=function(){b.isSupported=function(){return Object(u.isSupported)()};function b(E){E===void 0&&(E={}),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(i.mergeConfig)(b.DefaultConfig,E);this.userConfig=E,Object(s.enableLogs)(d.debug),this._autoLevelCapping=-1,d.progressive&&Object(i.enableStreamingMode)(d);var n=d.abrController,l=d.bufferController,h=d.capLevelController,w=d.fpsController,g=this.abrController=new n(this),c=this.bufferController=new l(this),L=this.capLevelController=new h(this),F=new w(this),B=new O.default(this),P=new X.default(this),W=new M.default(this),U=this.levelController=new R.default(this),$=new f.FragmentTracker(this),ee=this.streamController=new v.default(this,$);L.setStreamController(ee),F.setStreamController(ee);var pe=[U,ee];this.networkControllers=pe;var fe=[B,P,g,c,L,F,W,$];this.audioTrackController=this.createController(d.audioTrackController,null,pe),this.createController(d.audioStreamController,$,pe),this.subtitleTrackController=this.createController(d.subtitleTrackController,null,pe),this.createController(d.subtitleStreamController,$,pe),this.createController(d.timelineController,null,fe),this.emeController=this.createController(d.emeController,null,fe),this.cmcdController=this.createController(d.cmcdController,null,fe),this.latencyController=this.createController(e.default,null,fe),this.coreComponents=fe}var x=b.prototype;return x.createController=function(d,n,l){if(d){var h=n?new d(this,n):new d(this);return l&&l.push(h),h}return null},x.on=function(d,n,l){l===void 0&&(l=this),this._emitter.on(d,n,l)},x.once=function(d,n,l){l===void 0&&(l=this),this._emitter.once(d,n,l)},x.removeAllListeners=function(d){this._emitter.removeAllListeners(d)},x.off=function(d,n,l,h){l===void 0&&(l=this),this._emitter.off(d,n,l,h)},x.listeners=function(d){return this._emitter.listeners(d)},x.emit=function(d,n,l){return this._emitter.emit(d,n,l)},x.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(a.Events.ERROR,{type:r.ErrorTypes.OTHER_ERROR,details:r.ErrorDetails.INTERNAL_EXCEPTION,fatal:!1,event:d,error:l})}return!1},x.listenerCount=function(d){return this._emitter.listenerCount(d)},x.destroy=function(){s.logger.log("destroy"),this.trigger(a.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},x.attachMedia=function(d){s.logger.log("attachMedia"),this._media=d,this.trigger(a.Events.MEDIA_ATTACHING,{media:d})},x.detachMedia=function(){s.logger.log("detachMedia"),this.trigger(a.Events.MEDIA_DETACHING,void 0),this._media=null},x.loadSource=function(d){this.stopLoad();var n=this.media,l=this.url,h=this.url=j.buildAbsoluteURL(self.location.href,d,{alwaysNormalize:!0});s.logger.log("loadSource:"+h),n&&l&&l!==h&&this.bufferController.hasSourceTypes()&&(this.detachMedia(),this.attachMedia(n)),this.trigger(a.Events.MANIFEST_LOADING,{url:d})},x.startLoad=function(d){d===void 0&&(d=-1),s.logger.log("startLoad("+d+")"),this.networkControllers.forEach(function(n){n.startLoad(d)})},x.stopLoad=function(){s.logger.log("stopLoad"),this.networkControllers.forEach(function(d){d.stopLoad()})},x.swapAudioCodec=function(){s.logger.log("swapAudioCodec"),this.streamController.swapAudioCodec()},x.recoverMediaError=function(){s.logger.log("recoverMediaError");var d=this._media;this.detachMedia(),d&&this.attachMedia(d)},x.removeLevel=function(d,n){n===void 0&&(n=0),this.levelController.removeLevel(d,n)},_(b,[{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,h=0;h<l;h++)if(d[h].maxBitrate>n)return h;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 a.Events}},{key:"ErrorTypes",get:function(){return r.ErrorTypes}},{key:"ErrorDetails",get:function(){return r.ErrorDetails}},{key:"DefaultConfig",get:function(){return b.defaultConfig?b.defaultConfig:i.hlsDefaultConfig},set:function(d){b.defaultConfig=d}}]),b}();y.defaultConfig=void 0},"./src/is-supported.ts":function(oe,G,D){"use strict";D.r(G),D.d(G,"isSupported",function(){return O}),D.d(G,"changeTypeSupported",function(){return X});var j=D("./src/utils/mediasource-helper.ts");function N(){return self.SourceBuffer||self.WebKitSourceBuffer}function O(){var M=Object(j.getMediaSource)();if(!M)return!1;var e=N(),R=M&&typeof M.isTypeSupported=="function"&&M.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"'),f=!e||e.prototype&&typeof e.prototype.appendBuffer=="function"&&typeof e.prototype.remove=="function";return!!R&&!!f}function X(){var M,e=N();return typeof(e==null||((M=e.prototype)===null||M===void 0)?void 0:M.changeType)=="function"}},"./src/loader/fragment-loader.ts":function(oe,G,D){"use strict";D.r(G),D.d(G,"default",function(){return s}),D.d(G,"LoadError",function(){return A});var j=D("./src/polyfills/number.ts"),N=D("./src/errors.ts");function O(o,a){o.prototype=Object.create(a.prototype),o.prototype.constructor=o,f(o,a)}function X(o){var a=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 a!="undefined"){if(a.has(t))return a.get(t);a.set(t,_)}function _(){return M(t,arguments,v(this).constructor)}return _.prototype=Object.create(t.prototype,{constructor:{value:_,enumerable:!1,writable:!0,configurable:!0}}),f(_,t)},X(o)}function M(o,a,r){return e()?M=Reflect.construct:M=function(_,y,b){var x=[null];x.push.apply(x,y);var E=Function.bind.apply(_,x),d=new E;return b&&f(d,b.prototype),d},M.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 f(o,a){return f=Object.setPrototypeOf||function(t,_){return t.__proto__=_,t},f(o,a)}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 a=o.prototype;return a.destroy=function(){this.loader&&(this.loader.destroy(),this.loader=null)},a.abort=function(){this.loader&&this.loader.abort()},a.load=function(t,_){var y=this,b=t.url;if(!b)return Promise.reject(new A({type:N.ErrorTypes.NETWORK_ERROR,details:N.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:t,networkDetails:null},"Fragment does not have a "+(b?"part list":"url")));this.abort();var x=this.config,E=x.fLoader,d=x.loader;return new Promise(function(n,l){y.loader&&y.loader.destroy();var h=y.loader=t.loader=E?new E(x):new d(x),w=i(t),g={timeout:x.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:x.fragLoadingMaxRetryTimeout,highWaterMark:u};t.stats=h.stats,h.load(w,g,{onSuccess:function(L,F,B,P){y.resetLoader(t,h),n({frag:t,part:null,payload:L.data,networkDetails:P})},onError:function(L,F,B){y.resetLoader(t,h),l(new A({type:N.ErrorTypes.NETWORK_ERROR,details:N.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:t,response:L,networkDetails:B}))},onAbort:function(L,F,B){y.resetLoader(t,h),l(new A({type:N.ErrorTypes.NETWORK_ERROR,details:N.ErrorDetails.INTERNAL_ABORTED,fatal:!1,frag:t,networkDetails:B}))},onTimeout:function(L,F,B){y.resetLoader(t,h),l(new A({type:N.ErrorTypes.NETWORK_ERROR,details:N.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:t,networkDetails:B}))},onProgress:function(L,F,B,P){_&&_({frag:t,part:null,payload:B,networkDetails:P})}})})},a.loadPart=function(t,_,y){var b=this;this.abort();var x=this.config,E=x.fLoader,d=x.loader;return new Promise(function(n,l){b.loader&&b.loader.destroy();var h=b.loader=t.loader=E?new E(x):new d(x),w=i(t,_),g={timeout:x.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:x.fragLoadingMaxRetryTimeout,highWaterMark:u};_.stats=h.stats,h.load(w,g,{onSuccess:function(L,F,B,P){b.resetLoader(t,h),b.updateStatsFromPart(t,_);var W={frag:t,part:_,payload:L.data,networkDetails:P};y(W),n(W)},onError:function(L,F,B){b.resetLoader(t,h),l(new A({type:N.ErrorTypes.NETWORK_ERROR,details:N.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:t,part:_,response:L,networkDetails:B}))},onAbort:function(L,F,B){t.stats.aborted=_.stats.aborted,b.resetLoader(t,h),l(new A({type:N.ErrorTypes.NETWORK_ERROR,details:N.ErrorDetails.INTERNAL_ABORTED,fatal:!1,frag:t,part:_,networkDetails:B}))},onTimeout:function(L,F,B){b.resetLoader(t,h),l(new A({type:N.ErrorTypes.NETWORK_ERROR,details:N.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:t,part:_,networkDetails:B}))}})})},a.updateStatsFromPart=function(t,_){var y=t.stats,b=_.stats,x=b.total;if(y.loaded+=b.loaded,x){var E=Math.round(t.duration/_.duration),d=Math.min(Math.round(y.loaded/x),E),n=E-d,l=n*Math.round(y.loaded/d);y.total=y.loaded+l}else y.total=Math.max(y.loaded,y.total);var h=y.loading,w=b.loading;h.start?h.first+=w.first-w.start:(h.start=w.start,h.first=w.first),h.end=w.end},a.resetLoader=function(t,_){t.loader=null,this.loader===_&&(self.clearTimeout(this.partLoadTimeout),this.loader=null),_.destroy()},o}();function i(o,a){a===void 0&&(a=null);var r=a||o,t={frag:o,part:a,responseType:"arraybuffer",url:r.url,headers:{},rangeStart:0,rangeEnd:0},_=r.byteRangeStartOffset,y=r.byteRangeEndOffset;return Object(j.isFiniteNumber)(_)&&Object(j.isFiniteNumber)(y)&&(t.rangeStart=_,t.rangeEnd=y),t}var A=function(o){O(a,o);function a(r){for(var t,_=arguments.length,y=new Array(_>1?_-1:0),b=1;b<_;b++)y[b-1]=arguments[b];return t=o.call.apply(o,[this].concat(y))||this,t.data=void 0,t.data=r,t}return a}(X(Error))},"./src/loader/fragment.ts":function(oe,G,D){"use strict";D.r(G),D.d(G,"ElementaryStreamTypes",function(){return s}),D.d(G,"BaseSegment",function(){return i}),D.d(G,"Fragment",function(){return A}),D.d(G,"Part",function(){return o});var j=D("./src/polyfills/number.ts"),N=D("./node_modules/url-toolkit/src/url-toolkit.js"),O=D.n(N),X=D("./src/utils/logger.ts"),M=D("./src/loader/level-key.ts"),e=D("./src/loader/load-stats.ts");function R(a,r){a.prototype=Object.create(r.prototype),a.prototype.constructor=a,f(a,r)}function f(a,r){return f=Object.setPrototypeOf||function(_,y){return _.__proto__=y,_},f(a,r)}function v(a,r){for(var t=0;t<r.length;t++){var _=r[t];_.enumerable=_.enumerable||!1,_.configurable=!0,"value"in _&&(_.writable=!0),Object.defineProperty(a,_.key,_)}}function u(a,r,t){return r&&v(a.prototype,r),t&&v(a,t),a}var s;(function(a){a.AUDIO="audio",a.VIDEO="video",a.AUDIOVIDEO="audiovideo"})(s||(s={}));var i=function(){function a(t){var _;this._byteRange=null,this._url=null,this.baseurl=void 0,this.relurl=void 0,this.elementaryStreams=(_={},_[s.AUDIO]=null,_[s.VIDEO]=null,_[s.AUDIOVIDEO]=null,_),this.baseurl=t}var r=a.prototype;return r.setByteRange=function(_,y){var b=_.split("@",2),x=[];b.length===1?x[0]=y?y.byteRangeEndOffset:0:x[0]=parseInt(b[1]),x[1]=parseInt(b[0])+x[0],this._byteRange=x},u(a,[{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(N.buildAbsoluteURL)(this.baseurl,this.relurl,{alwaysNormalize:!0})),this._url||""},set:function(_){this._url=_}}]),a}(),A=function(a){R(r,a);function r(_,y){var b;return b=a.call(this,y)||this,b._decryptdata=null,b.rawProgramDateTime=null,b.programDateTime=null,b.tagList=[],b.duration=0,b.sn=0,b.levelkey=void 0,b.type=void 0,b.loader=null,b.level=-1,b.cc=0,b.startPTS=void 0,b.endPTS=void 0,b.appendedPTS=void 0,b.startDTS=void 0,b.endDTS=void 0,b.start=0,b.deltaPTS=void 0,b.maxStartPTS=void 0,b.minEndPTS=void 0,b.stats=new e.LoadStats,b.urlId=0,b.data=void 0,b.bitrateTest=!1,b.title=null,b.initSegment=null,b.type=_,b}var t=r.prototype;return t.createInitializationVector=function(y){for(var b=new Uint8Array(16),x=12;x<16;x++)b[x]=y>>8*(15-x)&255;return b},t.setDecryptDataFromLevelKey=function(y,b){var x=y;return(y==null?void 0:y.method)==="AES-128"&&y.uri&&!y.iv&&(x=M.LevelKey.fromURI(y.uri),x.method=y.method,x.iv=this.createInitializationVector(b),x.keyFormat="identity"),x},t.setElementaryStreamInfo=function(y,b,x,E,d,n){n===void 0&&(n=!1);var l=this.elementaryStreams,h=l[y];if(!h){l[y]={startPTS:b,endPTS:x,startDTS:E,endDTS:d,partial:n};return}h.startPTS=Math.min(h.startPTS,b),h.endPTS=Math.max(h.endPTS,x),h.startDTS=Math.min(h.startDTS,E),h.endDTS=Math.max(h.endDTS,d)},t.clearElementaryStreamInfo=function(){var y=this.elementaryStreams;y[s.AUDIO]=null,y[s.VIDEO]=null,y[s.AUDIOVIDEO]=null},u(r,[{key:"decryptdata",get:function(){if(!this.levelkey&&!this._decryptdata)return null;if(!this._decryptdata&&this.levelkey){var y=this.sn;typeof y!="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'),y=0),this._decryptdata=this.setDecryptDataFromLevelKey(this.levelkey,y)}return this._decryptdata}},{key:"end",get:function(){return this.start+this.duration}},{key:"endProgramDateTime",get:function(){if(this.programDateTime===null)return null;if(!Object(j.isFiniteNumber)(this.programDateTime))return null;var y=Object(j.isFiniteNumber)(this.duration)?this.duration:0;return this.programDateTime+y*1e3}},{key:"encrypted",get:function(){var y;return!!((y=this.decryptdata)!==null&&y!==void 0&&y.keyFormat&&this.decryptdata.uri)}}]),r}(i),o=function(a){R(r,a);function r(t,_,y,b,x){var E;E=a.call(this,y)||this,E.fragOffset=0,E.duration=0,E.gap=!1,E.independent=!1,E.relurl=void 0,E.fragment=void 0,E.index=void 0,E.stats=new e.LoadStats,E.duration=t.decimalFloatingPoint("DURATION"),E.gap=t.bool("GAP"),E.independent=t.bool("INDEPENDENT"),E.relurl=t.enumeratedString("URI"),E.fragment=_,E.index=b;var d=t.enumeratedString("BYTERANGE");return d&&E.setByteRange(d,x),x&&(E.fragOffset=x.fragOffset+x.duration),E}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 _=this.elementaryStreams;return!!(_.audio||_.video||_.audiovideo)}}]),r}(i)},"./src/loader/key-loader.ts":function(oe,G,D){"use strict";D.r(G),D.d(G,"default",function(){return X});var j=D("./src/events.ts"),N=D("./src/errors.ts"),O=D("./src/utils/logger.ts"),X=function(){function M(R){this.hls=void 0,this.loaders={},this.decryptkey=null,this.decrypturl=null,this.hls=R,this._registerListeners()}var e=M.prototype;return e._registerListeners=function(){this.hls.on(j.Events.KEY_LOADING,this.onKeyLoading,this)},e._unregisterListeners=function(){this.hls.off(j.Events.KEY_LOADING,this.onKeyLoading)},e.destroy=function(){this._unregisterListeners();for(var f in this.loaders){var v=this.loaders[f];v&&v.destroy()}this.loaders={}},e.onKeyLoading=function(f,v){var u=v.frag,s=u.type,i=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(i&&(O.logger.warn("abort previous key loader for type:"+s),i.abort()),!A){O.logger.warn("key uri is falsy");return}var a=o.loader,r=u.loader=this.loaders[s]=new a(o);this.decrypturl=A,this.decryptkey=null;var t={url:A,frag:u,responseType:"arraybuffer"},_={timeout:o.fragLoadingTimeOut,maxRetry:0,retryDelay:o.fragLoadingRetryDelay,maxRetryDelay:o.fragLoadingMaxRetryTimeout,highWaterMark:0},y={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};r.load(t,_,y)}else this.decryptkey&&(u.decryptdata.key=this.decryptkey,this.hls.trigger(j.Events.KEY_LOADED,{frag:u}))},e.loadsuccess=function(f,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(f.data),s.loader=null,delete this.loaders[s.type],this.hls.trigger(j.Events.KEY_LOADED,{frag:s})},e.loaderror=function(f,v){var u=v.frag,s=u.loader;s&&s.abort(),delete this.loaders[u.type],this.hls.trigger(j.Events.ERROR,{type:N.ErrorTypes.NETWORK_ERROR,details:N.ErrorDetails.KEY_LOAD_ERROR,fatal:!1,frag:u,response:f})},e.loadtimeout=function(f,v){var u=v.frag,s=u.loader;s&&s.abort(),delete this.loaders[u.type],this.hls.trigger(j.Events.ERROR,{type:N.ErrorTypes.NETWORK_ERROR,details:N.ErrorDetails.KEY_LOAD_TIMEOUT,fatal:!1,frag:u})},M}()},"./src/loader/level-details.ts":function(oe,G,D){"use strict";D.r(G),D.d(G,"LevelDetails",function(){return M});var j=D("./src/polyfills/number.ts");function N(e,R){for(var f=0;f<R.length;f++){var v=R[f];v.enumerable=v.enumerable||!1,v.configurable=!0,"value"in v&&(v.writable=!0),Object.defineProperty(e,v.key,v)}}function O(e,R,f){return R&&N(e.prototype,R),f&&N(e,f),e}var X=10,M=function(){function e(f){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=f}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(j.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(oe,G,D){"use strict";D.r(G),D.d(G,"LevelKey",function(){return M});var j=D("./node_modules/url-toolkit/src/url-toolkit.js"),N=D.n(j);function O(e,R){for(var f=0;f<R.length;f++){var v=R[f];v.enumerable=v.enumerable||!1,v.configurable=!0,"value"in v&&(v.writable=!0),Object.defineProperty(e,v.key,v)}}function X(e,R,f){return R&&O(e.prototype,R),f&&O(e,f),e}var M=function(){e.fromURL=function(f,v){return new e(f,v)},e.fromURI=function(f){return new e(f)};function e(R,f){this._uri=null,this.method=null,this.keyFormat=null,this.keyFormatVersions=null,this.keyID=null,this.key=null,this.iv=null,f?this._uri=Object(j.buildAbsoluteURL)(R,f,{alwaysNormalize:!0}):this._uri=R}return X(e,[{key:"uri",get:function(){return this._uri}}]),e}()},"./src/loader/load-stats.ts":function(oe,G,D){"use strict";D.r(G),D.d(G,"LoadStats",function(){return j});var j=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(oe,G,D){"use strict";D.r(G),D.d(G,"default",function(){return r});var j=D("./src/polyfills/number.ts"),N=D("./node_modules/url-toolkit/src/url-toolkit.js"),O=D.n(N),X=D("./src/loader/fragment.ts"),M=D("./src/loader/level-details.ts"),e=D("./src/loader/level-key.ts"),R=D("./src/utils/attr-list.ts"),f=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,i=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 a(x){var E,d;return o.test((E=(d=N.parseURL(x))===null||d===void 0?void 0:d.path)!=null?E:"")}var r=function(){function x(){}return x.findGroup=function(d,n){for(var l=0;l<d.length;l++){var h=d[l];if(h.id===n)return h}},x.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},x.resolve=function(d,n){return N.buildAbsoluteURL(n,d,{alwaysNormalize:!0})},x.parseMasterPlaylist=function(d,n){var l=[],h={},w=!1;u.lastIndex=0;for(var g;(g=u.exec(d))!=null;)if(g[1]){var c=new R.AttrList(g[1]),L={attrs:c,bitrate:c.decimalInteger("AVERAGE-BANDWIDTH")||c.decimalInteger("BANDWIDTH"),name:c.NAME,url:x.resolve(g[2],n)},F=c.decimalResolution("RESOLUTION");F&&(L.width=F.width,L.height=F.height),t((c.CODECS||"").split(/[ ,]+/).filter(function(P){return P}),L),L.videoCodec&&L.videoCodec.indexOf("avc1")!==-1&&(L.videoCodec=x.convertAVC1ToAVCOTI(L.videoCodec)),l.push(L)}else if(g[3]){var B=new R.AttrList(g[3]);B["DATA-ID"]&&(w=!0,h[B["DATA-ID"]]=B)}return{levels:l,sessionData:w?h:null}},x.parseMasterPlaylistMedia=function(d,n,l,h){h===void 0&&(h=[]);var w,g=[],c=0;for(s.lastIndex=0;(w=s.exec(d))!==null;){var L=new R.AttrList(w[1]);if(L.TYPE===l){var F={attrs:L,bitrate:0,id:c++,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?x.resolve(L.URI,n):""};if(h.length){var B=x.findGroup(h,F.groupId)||h[0];_(F,B,"audioCodec"),_(F,B,"textCodec")}g.push(F)}}return g},x.parseLevelPlaylist=function(d,n,l,h,w){var g=new M.LevelDetails(n),c=g.fragments,L=null,F=0,B=0,P=0,W=0,U=null,$=new X.Fragment(h,n),ee,pe,fe,Le=-1,Ie=!1;for(i.lastIndex=0,g.m3u8=d;(ee=i.exec(d))!==null;){Ie&&(Ie=!1,$=new X.Fragment(h,n),$.start=P,$.sn=F,$.cc=W,$.level=l,L&&($.initSegment=L,$.rawProgramDateTime=L.rawProgramDateTime));var xe=ee[1];if(xe){$.duration=parseFloat(xe);var Ue=(" "+ee[2]).slice(1);$.title=Ue||null,$.tagList.push(Ue?["INF",xe,Ue]:["INF",xe])}else if(ee[3])Object(j.isFiniteNumber)($.duration)&&($.start=P,fe&&($.levelkey=fe),$.sn=F,$.level=l,$.cc=W,$.urlId=w,c.push($),$.relurl=(" "+ee[3]).slice(1),b($,U),U=$,P+=$.duration,F++,B=0,Ie=!0);else if(ee[4]){var Fe=(" "+ee[4]).slice(1);U?$.setByteRange(Fe,U):$.setByteRange(Fe)}else if(ee[5])$.rawProgramDateTime=(" "+ee[5]).slice(1),$.tagList.push(["PROGRAM-DATE-TIME",$.rawProgramDateTime]),Le===-1&&(Le=c.length);else{if(ee=ee[0].match(A),!ee){f.logger.warn("No matches on slow regex match for level playlist!");continue}for(pe=1;pe<ee.length&&!(typeof ee[pe]!="undefined");pe++);var we=(" "+ee[pe]).slice(1),ve=(" "+ee[pe+1]).slice(1),ze=ee[pe+2]?(" "+ee[pe+2]).slice(1):"";switch(we){case"PLAYLIST-TYPE":g.type=ve.toUpperCase();break;case"MEDIA-SEQUENCE":F=g.startSN=parseInt(ve);break;case"SKIP":{var at=new R.AttrList(ve),nt=at.decimalInteger("SKIPPED-SEGMENTS");if(Object(j.isFiniteNumber)(nt)){g.skippedSegments=nt;for(var et=nt;et--;)c.unshift(null);F+=nt}var Ke=at.enumeratedString("RECENTLY-REMOVED-DATERANGES");Ke&&(g.recentlyRemovedDateranges=Ke.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||ze)&&$.tagList.push(ze?[ve,ze]:[ve]);break;case"DIS":W++;case"GAP":$.tagList.push([we]);break;case"BITRATE":$.tagList.push([we,ve]);break;case"DISCONTINUITY-SEQ":W=parseInt(ve);break;case"KEY":{var re,z=new R.AttrList(ve),Y=z.enumeratedString("METHOD"),J=z.URI,ie=z.hexadecimalInteger("IV"),ue=z.enumeratedString("KEYFORMATVERSIONS"),he=z.enumeratedString("KEYID"),He=(re=z.enumeratedString("KEYFORMAT"))!=null?re:"identity",We=["com.apple.streamingkeydelivery","com.microsoft.playready","urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed","com.widevine"];if(We.indexOf(He)>-1){f.logger.warn("Keyformat "+He+" is not supported from the manifest");continue}else if(He!=="identity")continue;Y&&(fe=e.LevelKey.fromURL(n,J),J&&["AES-128","SAMPLE-AES","SAMPLE-AES-CENC"].indexOf(Y)>=0&&(fe.method=Y,fe.keyFormat=He,he&&(fe.keyID=he),ue&&(fe.keyFormatVersions=ue),fe.iv=ie));break}case"START":{var je=new R.AttrList(ve),Ge=je.decimalFloatingPoint("TIME-OFFSET");Object(j.isFiniteNumber)(Ge)&&(g.startTimeOffset=Ge);break}case"MAP":{var rt=new R.AttrList(ve);$.relurl=rt.URI,rt.BYTERANGE&&$.setByteRange(rt.BYTERANGE),$.level=l,$.sn="initSegment",fe&&($.levelkey=fe),$.initSegment=null,L=$,Ie=!0;break}case"SERVER-CONTROL":{var st=new R.AttrList(ve);g.canBlockReload=st.bool("CAN-BLOCK-RELOAD"),g.canSkipUntil=st.optionalFloat("CAN-SKIP-UNTIL",0),g.canSkipDateRanges=g.canSkipUntil>0&&st.bool("CAN-SKIP-DATERANGES"),g.partHoldBack=st.optionalFloat("PART-HOLD-BACK",0),g.holdBack=st.optionalFloat("HOLD-BACK",0);break}case"PART-INF":{var Te=new R.AttrList(ve);g.partTarget=Te.decimalFloatingPoint("PART-TARGET");break}case"PART":{var De=g.partList;De||(De=g.partList=[]);var Ve=B>0?De[De.length-1]:void 0,$e=B++,Ne=new X.Part(new R.AttrList(ve),$,n,$e,Ve);De.push(Ne),$.duration+=Ne.duration;break}case"PRELOAD-HINT":{var Pe=new R.AttrList(ve);g.preloadHint=Pe;break}case"RENDITION-REPORT":{var Ce=new R.AttrList(ve);g.renditionReports=g.renditionReports||[],g.renditionReports.push(Ce);break}default:f.logger.warn("line parsed but not handled: "+ee);break}}}U&&!U.relurl?(c.pop(),P-=U.duration,g.partList&&(g.fragmentHint=U)):g.partList&&(b($,U),$.cc=W,g.fragmentHint=$);var ce=c.length,ge=c[0],te=c[ce-1];if(P+=g.skippedSegments*g.targetduration,P>0&&ce&&te){g.averagetargetduration=P/ce;var ne=te.sn;g.endSN=ne!=="initSegment"?ne:0,ge&&(g.startCC=ge.cc,ge.initSegment||g.fragments.every(function(le){return le.relurl&&a(le.relurl)})&&(f.logger.warn("MP4 fragments found but no init segment (probably no MAP, incomplete M3U8), trying to fetch SIDX"),$=new X.Fragment(h,n),$.relurl=te.relurl,$.level=l,$.sn="initSegment",ge.initSegment=$,g.needSidxRanges=!0))}else g.endSN=0,g.startCC=0;return g.fragmentHint&&(P+=g.fragmentHint.duration),g.totalduration=P,g.endCC=W,Le>0&&y(c,Le),g},x}();function t(x,E){["video","audio","text"].forEach(function(d){var n=x.filter(function(h){return Object(v.isCodecType)(h,d)});if(n.length){var l=n.filter(function(h){return h.lastIndexOf("avc1",0)===0||h.lastIndexOf("mp4a",0)===0});E[d+"Codec"]=l.length>0?l[0]:n[0],x=x.filter(function(h){return n.indexOf(h)===-1})}}),E.unknownCodecs=x}function _(x,E,d){var n=E[d];n&&(x[d]=n)}function y(x,E){for(var d=x[E],n=E;n--;){var l=x[n];if(!l)return;l.programDateTime=d.programDateTime-l.duration*1e3,d=l}}function b(x,E){x.rawProgramDateTime?x.programDateTime=Date.parse(x.rawProgramDateTime):E!=null&&E.programDateTime&&(x.programDateTime=E.endProgramDateTime),Object(j.isFiniteNumber)(x.programDateTime)||(x.programDateTime=null,x.rawProgramDateTime=null)}},"./src/loader/playlist-loader.ts":function(oe,G,D){"use strict";D.r(G);var j=D("./src/polyfills/number.ts"),N=D("./src/events.ts"),O=D("./src/errors.ts"),X=D("./src/utils/logger.ts"),M=D("./src/utils/mp4-tools.ts"),e=D("./src/loader/m3u8-parser.ts"),R=D("./src/types/loader.ts"),f=D("./src/utils/attr-list.ts");function v(i){var A=i.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(i,A){var o=i.url;return(o===void 0||o.indexOf("data:")===0)&&(o=A.url),o}var s=function(){function i(o){this.hls=void 0,this.loaders=Object.create(null),this.hls=o,this.registerListeners()}var A=i.prototype;return A.registerListeners=function(){var a=this.hls;a.on(N.Events.MANIFEST_LOADING,this.onManifestLoading,this),a.on(N.Events.LEVEL_LOADING,this.onLevelLoading,this),a.on(N.Events.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),a.on(N.Events.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)},A.unregisterListeners=function(){var a=this.hls;a.off(N.Events.MANIFEST_LOADING,this.onManifestLoading,this),a.off(N.Events.LEVEL_LOADING,this.onLevelLoading,this),a.off(N.Events.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),a.off(N.Events.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)},A.createInternalLoader=function(a){var r=this.hls.config,t=r.pLoader,_=r.loader,y=t||_,b=new y(r);return a.loader=b,this.loaders[a.type]=b,b},A.getInternalLoader=function(a){return this.loaders[a.type]},A.resetInternalLoader=function(a){this.loaders[a]&&delete this.loaders[a]},A.destroyInternalLoaders=function(){for(var a in this.loaders){var r=this.loaders[a];r&&r.destroy(),this.resetInternalLoader(a)}},A.destroy=function(){this.unregisterListeners(),this.destroyInternalLoaders()},A.onManifestLoading=function(a,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(a,r){var t=r.id,_=r.level,y=r.url,b=r.deliveryDirectives;this.load({id:t,groupId:null,level:_,responseType:"text",type:R.PlaylistContextType.LEVEL,url:y,deliveryDirectives:b})},A.onAudioTrackLoading=function(a,r){var t=r.id,_=r.groupId,y=r.url,b=r.deliveryDirectives;this.load({id:t,groupId:_,level:null,responseType:"text",type:R.PlaylistContextType.AUDIO_TRACK,url:y,deliveryDirectives:b})},A.onSubtitleTrackLoading=function(a,r){var t=r.id,_=r.groupId,y=r.url,b=r.deliveryDirectives;this.load({id:t,groupId:_,level:null,responseType:"text",type:R.PlaylistContextType.SUBTITLE_TRACK,url:y,deliveryDirectives:b})},A.load=function(a){var r,t=this.hls.config,_=this.getInternalLoader(a);if(_){var y=_.context;if(y&&y.url===a.url){X.logger.trace("[playlist-loader]: playlist request ongoing");return}X.logger.log("[playlist-loader]: aborting previous loader for type: "+a.type),_.abort()}var b,x,E,d;switch(a.type){case R.PlaylistContextType.MANIFEST:b=t.manifestLoadingMaxRetry,x=t.manifestLoadingTimeOut,E=t.manifestLoadingRetryDelay,d=t.manifestLoadingMaxRetryTimeout;break;case R.PlaylistContextType.LEVEL:case R.PlaylistContextType.AUDIO_TRACK:case R.PlaylistContextType.SUBTITLE_TRACK:b=0,x=t.levelLoadingTimeOut;break;default:b=t.levelLoadingMaxRetry,x=t.levelLoadingTimeOut,E=t.levelLoadingRetryDelay,d=t.levelLoadingMaxRetryTimeout;break}if(_=this.createInternalLoader(a),(r=a.deliveryDirectives)!==null&&r!==void 0&&r.part){var n;if(a.type===R.PlaylistContextType.LEVEL&&a.level!==null?n=this.hls.levels[a.level].details:a.type===R.PlaylistContextType.AUDIO_TRACK&&a.id!==null?n=this.hls.audioTracks[a.id].details:a.type===R.PlaylistContextType.SUBTITLE_TRACK&&a.id!==null&&(n=this.hls.subtitleTracks[a.id].details),n){var l=n.partTarget,h=n.targetduration;l&&h&&(x=Math.min(Math.max(l*3,h*.8)*1e3,x))}}var w={timeout:x,maxRetry:b,retryDelay:E,maxRetryDelay:d,highWaterMark:0},g={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};_.load(a,w,g)},A.loadsuccess=function(a,r,t,_){if(_===void 0&&(_=null),t.isSidxRequest){this.handleSidxRequest(a,t),this.handlePlaylistLoaded(a,r,t,_);return}this.resetInternalLoader(t.type);var y=a.data;if(y.indexOf("#EXTM3U")!==0){this.handleManifestParsingError(a,t,"no EXTM3U delimiter",_);return}r.parsing.start=performance.now(),y.indexOf("#EXTINF:")>0||y.indexOf("#EXT-X-TARGETDURATION:")>0?this.handleTrackOrLevelPlaylist(a,r,t,_):this.handleMasterPlaylist(a,r,t,_)},A.loaderror=function(a,r,t){t===void 0&&(t=null),this.handleNetworkError(r,t,!1,a)},A.loadtimeout=function(a,r,t){t===void 0&&(t=null),this.handleNetworkError(r,t,!0)},A.handleMasterPlaylist=function(a,r,t,_){var y=this.hls,b=a.data,x=u(a,t),E=e.default.parseMasterPlaylist(b,x),d=E.levels,n=E.sessionData;if(!d.length){this.handleManifestParsingError(a,t,"no level found in manifest",_);return}var l=d.map(function(F){return{id:F.attrs.AUDIO,audioCodec:F.audioCodec}}),h=d.map(function(F){return{id:F.attrs.SUBTITLES,textCodec:F.textCodec}}),w=e.default.parseMasterPlaylistMedia(b,x,"AUDIO",l),g=e.default.parseMasterPlaylistMedia(b,x,"SUBTITLES",h),c=e.default.parseMasterPlaylistMedia(b,x,"CLOSED-CAPTIONS");if(w.length){var L=w.some(function(F){return!F.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"),w.unshift({type:"main",name:"main",default:!1,autoselect:!1,forced:!1,id:-1,attrs:new f.AttrList({}),bitrate:0,url:""}))}y.trigger(N.Events.MANIFEST_LOADED,{levels:d,audioTracks:w,subtitles:g,captions:c,url:x,stats:r,networkDetails:_,sessionData:n})},A.handleTrackOrLevelPlaylist=function(a,r,t,_){var y=this.hls,b=t.id,x=t.level,E=t.type,d=u(a,t),n=Object(j.isFiniteNumber)(b)?b:0,l=Object(j.isFiniteNumber)(x)?x:n,h=v(t),w=e.default.parseLevelPlaylist(a.data,d,l,h,n);if(!w.fragments.length){y.trigger(N.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(E===R.PlaylistContextType.MANIFEST){var g={attrs:new f.AttrList({}),bitrate:0,details:w,name:"",url:d};y.trigger(N.Events.MANIFEST_LOADED,{levels:[g],audioTracks:[],url:d,stats:r,networkDetails:_,sessionData:null})}if(r.parsing.end=performance.now(),w.needSidxRanges){var c,L=(c=w.fragments[0].initSegment)===null||c===void 0?void 0:c.url;this.load({url:L,isSidxRequest:!0,type:E,level:x,levelDetails:w,id:b,groupId:null,rangeStart:0,rangeEnd:2048,responseType:"arraybuffer",deliveryDirectives:null});return}t.levelDetails=w,this.handlePlaylistLoaded(a,r,t,_)},A.handleSidxRequest=function(a,r){var t=Object(M.parseSegmentIndex)(new Uint8Array(a.data));if(!t)return;var _=t.references,y=r.levelDetails;_.forEach(function(b,x){var E=b.info,d=y.fragments[x];d.byteRange.length===0&&d.setByteRange(String(1+E.end-E.start)+"@"+String(E.start)),d.initSegment&&d.initSegment.setByteRange(String(t.moovEndOffset)+"@0")})},A.handleManifestParsingError=function(a,r,t,_){this.hls.trigger(N.Events.ERROR,{type:O.ErrorTypes.NETWORK_ERROR,details:O.ErrorDetails.MANIFEST_PARSING_ERROR,fatal:r.type===R.PlaylistContextType.MANIFEST,url:a.url,reason:t,response:a,context:r,networkDetails:_})},A.handleNetworkError=function(a,r,t,_){t===void 0&&(t=!1),X.logger.warn("[playlist-loader]: A network "+(t?"timeout":"error")+" occurred while loading "+a.type+" level: "+a.level+" id: "+a.id+' group-id: "'+a.groupId+'"');var y=O.ErrorDetails.UNKNOWN,b=!1,x=this.getInternalLoader(a);switch(a.type){case R.PlaylistContextType.MANIFEST:y=t?O.ErrorDetails.MANIFEST_LOAD_TIMEOUT:O.ErrorDetails.MANIFEST_LOAD_ERROR,b=!0;break;case R.PlaylistContextType.LEVEL:y=t?O.ErrorDetails.LEVEL_LOAD_TIMEOUT:O.ErrorDetails.LEVEL_LOAD_ERROR,b=!1;break;case R.PlaylistContextType.AUDIO_TRACK:y=t?O.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:O.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,b=!1;break;case R.PlaylistContextType.SUBTITLE_TRACK:y=t?O.ErrorDetails.SUBTITLE_TRACK_LOAD_TIMEOUT:O.ErrorDetails.SUBTITLE_LOAD_ERROR,b=!1;break}x&&this.resetInternalLoader(a.type);var E={type:O.ErrorTypes.NETWORK_ERROR,details:y,fatal:b,url:a.url,loader:x,context:a,networkDetails:r};_&&(E.response=_),this.hls.trigger(N.Events.ERROR,E)},A.handlePlaylistLoaded=function(a,r,t,_){var y=t.type,b=t.level,x=t.id,E=t.groupId,d=t.loader,n=t.levelDetails,l=t.deliveryDirectives;if(!(n!=null&&n.targetduration)){this.handleManifestParsingError(a,t,"invalid target duration",_);return}if(!d)return;n.live&&(d.getCacheAge&&(n.ageHeader=d.getCacheAge()||0),(!d.getCacheAge||isNaN(n.ageHeader))&&(n.ageHeader=0));switch(y){case R.PlaylistContextType.MANIFEST:case R.PlaylistContextType.LEVEL:this.hls.trigger(N.Events.LEVEL_LOADED,{details:n,level:b||0,id:x||0,stats:r,networkDetails:_,deliveryDirectives:l});break;case R.PlaylistContextType.AUDIO_TRACK:this.hls.trigger(N.Events.AUDIO_TRACK_LOADED,{details:n,id:x||0,groupId:E||"",stats:r,networkDetails:_,deliveryDirectives:l});break;case R.PlaylistContextType.SUBTITLE_TRACK:this.hls.trigger(N.Events.SUBTITLE_TRACK_LOADED,{details:n,id:x||0,groupId:E||"",stats:r,networkDetails:_,deliveryDirectives:l});break}},i}();G.default=s},"./src/polyfills/number.ts":function(oe,G,D){"use strict";D.r(G),D.d(G,"isFiniteNumber",function(){return j}),D.d(G,"MAX_SAFE_INTEGER",function(){return N});var j=Number.isFinite||function(O){return typeof O=="number"&&isFinite(O)},N=Number.MAX_SAFE_INTEGER||9007199254740991},"./src/remux/aac-helper.ts":function(oe,G,D){"use strict";D.r(G);var j=function(){function N(){}return N.getSilentFrame=function(X,M){switch(X){case"mp4a.40.2":if(M===1)return new Uint8Array([0,200,0,128,35,128]);if(M===2)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(M===3)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(M===4)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(M===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(M===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(M===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(M===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(M===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},N}();G.default=j},"./src/remux/mp4-generator.ts":function(oe,G,D){"use strict";D.r(G);var j=Math.pow(2,32)-1,N=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 M;for(M in O.types)O.types.hasOwnProperty(M)&&(O.types[M]=[M.charCodeAt(0),M.charCodeAt(1),M.charCodeAt(2),M.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 f=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]),i=new Uint8Array([0,0,0,1]);O.FTYP=O.box(O.types.ftyp,u,i,u,s),O.DINF=O.box(O.types.dinf,O.box(O.types.dref,f))},O.box=function(M){for(var e=8,R=arguments.length,f=new Array(R>1?R-1:0),v=1;v<R;v++)f[v-1]=arguments[v];for(var u=f.length,s=u;u--;)e+=f[u].byteLength;var i=new Uint8Array(e);for(i[0]=e>>24&255,i[1]=e>>16&255,i[2]=e>>8&255,i[3]=e&255,i.set(M,4),u=0,e=8;u<s;u++)i.set(f[u],e),e+=f[u].byteLength;return i},O.hdlr=function(M){return O.box(O.types.hdlr,O.HDLR_TYPES[M])},O.mdat=function(M){return O.box(O.types.mdat,M)},O.mdhd=function(M,e){e*=M;var R=Math.floor(e/(j+1)),f=Math.floor(e%(j+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,M>>24&255,M>>16&255,M>>8&255,M&255,R>>24,R>>16&255,R>>8&255,R&255,f>>24,f>>16&255,f>>8&255,f&255,85,196,0,0]))},O.mdia=function(M){return O.box(O.types.mdia,O.mdhd(M.timescale,M.duration),O.hdlr(M.type),O.minf(M))},O.mfhd=function(M){return O.box(O.types.mfhd,new Uint8Array([0,0,0,0,M>>24,M>>16&255,M>>8&255,M&255]))},O.minf=function(M){return M.type==="audio"?O.box(O.types.minf,O.box(O.types.smhd,O.SMHD),O.DINF,O.stbl(M)):O.box(O.types.minf,O.box(O.types.vmhd,O.VMHD),O.DINF,O.stbl(M))},O.moof=function(M,e,R){return O.box(O.types.moof,O.mfhd(M),O.traf(R,e))},O.moov=function(M){for(var e=M.length,R=[];e--;)R[e]=O.trak(M[e]);return O.box.apply(null,[O.types.moov,O.mvhd(M[0].timescale,M[0].duration)].concat(R).concat(O.mvex(M)))},O.mvex=function(M){for(var e=M.length,R=[];e--;)R[e]=O.trex(M[e]);return O.box.apply(null,[O.types.mvex].concat(R))},O.mvhd=function(M,e){e*=M;var R=Math.floor(e/(j+1)),f=Math.floor(e%(j+1)),v=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,M>>24&255,M>>16&255,M>>8&255,M&255,R>>24,R>>16&255,R>>8&255,R&255,f>>24,f>>16&255,f>>8&255,f&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(M){var e=M.samples||[],R=new Uint8Array(4+e.length),f,v;for(f=0;f<e.length;f++)v=e[f].flags,R[f+4]=v.dependsOn<<4|v.isDependedOn<<2|v.hasRedundancy;return O.box(O.types.sdtp,R)},O.stbl=function(M){return O.box(O.types.stbl,O.stsd(M),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(M){var e=[],R=[],f,v,u;for(f=0;f<M.sps.length;f++)v=M.sps[f],u=v.byteLength,e.push(u>>>8&255),e.push(u&255),e=e.concat(Array.prototype.slice.call(v));for(f=0;f<M.pps.length;f++)v=M.pps[f],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|M.sps.length].concat(e).concat([M.pps.length]).concat(R))),i=M.width,A=M.height,o=M.pixelRatio[0],a=M.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,i>>8&255,i&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,a>>24,a>>16&255,a>>8&255,a&255])))},O.esds=function(M){var e=M.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(M.config).concat([6,1,2]))},O.mp4a=function(M){var e=M.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,M.channelCount,0,16,0,0,0,0,e>>8&255,e&255,0,0]),O.box(O.types.esds,O.esds(M)))},O.mp3=function(M){var e=M.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,M.channelCount,0,16,0,0,0,0,e>>8&255,e&255,0,0]))},O.stsd=function(M){return M.type==="audio"?!M.isAAC&&M.codec==="mp3"?O.box(O.types.stsd,O.STSD,O.mp3(M)):O.box(O.types.stsd,O.STSD,O.mp4a(M)):O.box(O.types.stsd,O.STSD,O.avc1(M))},O.tkhd=function(M){var e=M.id,R=M.duration*M.timescale,f=M.width,v=M.height,u=Math.floor(R/(j+1)),s=Math.floor(R%(j+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,f>>8&255,f&255,0,0,v>>8&255,v&255,0,0]))},O.traf=function(M,e){var R=O.sdtp(M),f=M.id,v=Math.floor(e/(j+1)),u=Math.floor(e%(j+1));return O.box(O.types.traf,O.box(O.types.tfhd,new Uint8Array([0,0,0,0,f>>24,f>>16&255,f>>8&255,f&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(M,R.length+16+20+8+16+8+8),R)},O.trak=function(M){return M.duration=M.duration||4294967295,O.box(O.types.trak,O.tkhd(M),O.mdia(M))},O.trex=function(M){var e=M.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(M,e){var R=M.samples||[],f=R.length,v=12+16*f,u=new Uint8Array(v),s,i,A,o,a,r;for(e+=8+v,u.set([0,0,15,1,f>>>24&255,f>>>16&255,f>>>8&255,f&255,e>>>24&255,e>>>16&255,e>>>8&255,e&255],0),s=0;s<f;s++)i=R[s],A=i.duration,o=i.size,a=i.flags,r=i.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,a.isLeading<<2|a.dependsOn,a.isDependedOn<<6|a.hasRedundancy<<4|a.paddingValue<<1|a.isNonSync,a.degradPrio&240<<8,a.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(M){O.types||O.init();var e=O.moov(M),R=new Uint8Array(O.FTYP.byteLength+e.byteLength);return R.set(O.FTYP),R.set(e,O.FTYP.byteLength),R},O}();N.types=void 0,N.HDLR_TYPES=void 0,N.STTS=void 0,N.STSC=void 0,N.STCO=void 0,N.STSZ=void 0,N.VMHD=void 0,N.SMHD=void 0,N.STSD=void 0,N.FTYP=void 0,N.DINF=void 0,G.default=N},"./src/remux/mp4-remuxer.ts":function(oe,G,D){"use strict";D.r(G),D.d(G,"default",function(){return r}),D.d(G,"normalizePts",function(){return t});var j=D("./src/polyfills/number.ts"),N=D("./src/remux/aac-helper.ts"),O=D("./src/remux/mp4-generator.ts"),X=D("./src/events.ts"),M=D("./src/errors.ts"),e=D("./src/utils/logger.ts"),R=D("./src/types/loader.ts"),f=D("./src/utils/timescale-conversion.ts");function v(){return v=Object.assign||function(x){for(var E=1;E<arguments.length;E++){var d=arguments[E];for(var n in d)Object.prototype.hasOwnProperty.call(d,n)&&(x[n]=d[n])}return x},v.apply(this,arguments)}var u=10*1e3,s=1024,i=1152,A=null,o=null,a=!1,r=function(){function x(d,n,l,h){if(h===void 0&&(h=""),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 w=navigator.userAgent||"",g=w.match(/Chrome\/(\d+)/i);A=g?parseInt(g[1]):0}if(o===null){var c=navigator.userAgent.match(/Safari\/(\d+)/i);o=c?parseInt(c[1]):0}a=!!A&&A<75||!!o&&o<600}var E=x.prototype;return E.destroy=function(){},E.resetTimeStamp=function(n){e.logger.log("[mp4-remuxer]: initPTS & initDTS reset"),this._initPTS=this._initDTS=n},E.resetNextTimestamp=function(){e.logger.log("[mp4-remuxer]: reset next timestamp"),this.isVideoContiguous=!1,this.isAudioContiguous=!1},E.resetInitSegment=function(){e.logger.log("[mp4-remuxer]: ISGenerated flag reset"),this.ISGenerated=!1},E.getVideoStartPts=function(n){var l=!1,h=n.reduce(function(w,g){var c=g.pts-w;return c<-4294967296?(l=!0,t(w,g.pts)):c>0?w:g.pts},n[0].pts);return l&&e.logger.debug("PTS rollover detected"),h},E.remux=function(n,l,h,w,g,c,L,F){var B,P,W,U,$,ee,pe=g,fe=g,Le=n.pid>-1,Ie=l.pid>-1,xe=l.samples.length,Ue=n.samples.length>0,Fe=xe>1,we=(!Le||Ue)&&(!Ie||Fe)||this.ISGenerated||L;if(we){this.ISGenerated||(W=this.generateIS(n,l,g));var ve=this.isVideoContiguous,ze=-1;if(Fe&&(ze=_(l.samples),!ve&&this.config.forceKeyFrameOnDiscontinuity))if(ee=!0,ze>0){e.logger.warn("[mp4-remuxer]: Dropped "+ze+" out of "+xe+" video samples due to a missing keyframe");var at=this.getVideoStartPts(l.samples);l.samples=l.samples.slice(ze),l.dropped+=ze,fe+=(l.samples[0].pts-at)/(l.timescale||9e4)}else ze===-1&&(e.logger.warn("[mp4-remuxer]: No keyframe found out of "+xe+" video samples"),ee=!1);if(this.ISGenerated){if(Ue&&Fe){var nt=this.getVideoStartPts(l.samples),et=t(n.samples[0].pts,nt)-nt,Ke=et/l.inputTimeScale;pe+=Math.max(0,Ke),fe+=Math.max(0,-Ke)}if(Ue){if(n.samplerate||(e.logger.warn("[mp4-remuxer]: regenerate InitSegment as audio detected"),W=this.generateIS(n,l,g)),P=this.remuxAudio(n,pe,this.isAudioContiguous,c,Ie||Fe||F===R.PlaylistLevelType.AUDIO?fe:void 0),Fe){var re=P?P.endPTS-P.startPTS:0;l.inputTimeScale||(e.logger.warn("[mp4-remuxer]: regenerate InitSegment as video detected"),W=this.generateIS(n,l,g)),B=this.remuxVideo(l,fe,ve,re)}}else Fe&&(B=this.remuxVideo(l,fe,ve,0));B&&(B.firstKeyFrame=ze,B.independent=ze!==-1)}}return this.ISGenerated&&(h.samples.length&&($=this.remuxID3(h,g)),w.samples.length&&(U=this.remuxText(w,g))),{audio:P,video:B,initSegment:W,independent:ee,text:U,id3:$}},E.generateIS=function(n,l,h){var w=n.samples,g=l.samples,c=this.typeSupported,L={},F=!Object(j.isFiniteNumber)(this._initPTS),B="audio/mp4",P,W,U;if(F&&(P=W=Infinity),n.config&&w.length&&(n.timescale=n.samplerate,n.isAAC||(c.mpeg?(B="audio/mpeg",n.codec=""):c.mp3&&(n.codec="mp3")),L.audio={id:"audio",container:B,codec:n.codec,initSegment:!n.isAAC&&c.mpeg?new Uint8Array(0):O.default.initSegment([n]),metadata:{channelCount:n.channelCount}},F&&(U=n.inputTimeScale,P=W=w[0].pts-Math.round(U*h))),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}},F)){U=l.inputTimeScale;var $=this.getVideoStartPts(g),ee=Math.round(U*h);W=Math.min(W,t(g[0].dts,$)-ee),P=Math.min(P,$-ee)}if(Object.keys(L).length)return this.ISGenerated=!0,F&&(this._initPTS=P,this._initDTS=W),{tracks:L,initPTS:P,timescale:U}},E.remuxVideo=function(n,l,h,w){var g=n.inputTimeScale,c=n.samples,L=[],F=c.length,B=this._initPTS,P=this.nextAvcDts,W=8,U,$,ee,pe=Number.POSITIVE_INFINITY,fe=Number.NEGATIVE_INFINITY,Le=0,Ie=!1;if(!h||P===null){var xe=l*g,Ue=c[0].pts-t(c[0].dts,c[0].pts);P=xe-Ue}for(var Fe=0;Fe<F;Fe++){var we=c[Fe];if(we.pts=t(we.pts-B,P),we.dts=t(we.dts-B,P),we.dts>we.pts){var ve=9e4*.2;Le=Math.max(Math.min(Le,we.pts-we.dts),-1*ve)}we.dts<c[Fe>0?Fe-1:Fe].dts&&(Ie=!0)}Ie&&c.sort(function(Bt,St){var it=Bt.dts-St.dts,Wt=Bt.pts-St.pts;return it||Wt}),$=c[0].dts,ee=c[c.length-1].dts;var ze=Math.round((ee-$)/(F-1));if(Le<0){if(Le<ze*-2){e.logger.warn("PTS < DTS detected in video samples, offsetting DTS from PTS by "+Object(f.toMsFromMpegTsClock)(-ze,!0)+" ms");for(var at=Le,nt=0;nt<F;nt++)c[nt].dts=at=Math.max(at,c[nt].pts-ze),c[nt].pts=Math.max(at,c[nt].pts)}else{e.logger.warn("PTS < DTS detected in video samples, shifting DTS by "+Object(f.toMsFromMpegTsClock)(Le,!0)+" ms to overcome this issue");for(var et=0;et<F;et++)c[et].dts=c[et].dts+Le}$=c[0].dts}if(h){var Ke=$-P,re=Ke>ze,z=Ke<-1;if(re||z){re?e.logger.warn("AVC: "+Object(f.toMsFromMpegTsClock)(Ke,!0)+" ms ("+Ke+"dts) hole between fragments detected, filling it"):e.logger.warn("AVC: "+Object(f.toMsFromMpegTsClock)(-Ke,!0)+" ms ("+Ke+"dts) overlapping between fragments detected"),$=P;var Y=c[0].pts-Ke;c[0].dts=$,c[0].pts=Y,e.logger.log("Video: First PTS/DTS adjusted: "+Object(f.toMsFromMpegTsClock)(Y,!0)+"/"+Object(f.toMsFromMpegTsClock)($,!0)+", delta: "+Object(f.toMsFromMpegTsClock)(Ke,!0)+" ms")}}a&&($=Math.max(0,$));for(var J=0,ie=0,ue=0;ue<F;ue++){for(var he=c[ue],He=he.units,We=He.length,je=0,Ge=0;Ge<We;Ge++)je+=He[Ge].data.length;ie+=je,J+=We,he.length=je,he.dts=Math.max(he.dts,$),he.pts=Math.max(he.pts,he.dts,0),pe=Math.min(he.pts,pe),fe=Math.max(he.pts,fe)}ee=c[F-1].dts;var rt=ie+4*J+8,st;try{st=new Uint8Array(rt)}catch(Bt){this.observer.emit(X.Events.ERROR,X.Events.ERROR,{type:M.ErrorTypes.MUX_ERROR,details:M.ErrorDetails.REMUX_ALLOC_ERROR,fatal:!1,bytes:rt,reason:"fail allocating video mdat "+rt});return}var Te=new DataView(st.buffer);Te.setUint32(0,rt),st.set(O.default.types.mdat,4);for(var De=0;De<F;De++){for(var Ve=c[De],$e=Ve.units,Ne=0,Pe=0,Ce=$e.length;Pe<Ce;Pe++){var ce=$e[Pe],ge=ce.data,te=ce.data.byteLength;Te.setUint32(W,te),W+=4,st.set(ge,W),W+=te,Ne+=4+te}if(De<F-1)U=c[De+1].dts-Ve.dts;else{var ne=this.config,le=Ve.dts-c[De>0?De-1:De].dts;if(ne.stretchShortVideoTrack&&this.nextAudioPts!==null){var de=Math.floor(ne.maxBufferHole*g),Re=(w?pe+w*g:this.nextAudioPts)-Ve.pts;Re>de?(U=Re-le,U<0&&(U=le),e.logger.log("[mp4-remuxer]: It is approximately "+Re/90+" ms to the next segment; using duration "+U/90+" ms for the last video frame.")):U=le}else U=le}var Me=Math.round(Ve.pts-Ve.dts);L.push(new y(Ve.key,U,Ne,Me))}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=P=ee+U,this.isVideoContiguous=!0;var lt=O.default.moof(n.sequenceNumber++,$,v({},n,{samples:L})),ft="video",At={data1:lt,data2:st,startPTS:pe/g,endPTS:(fe+U)/g,startDTS:$/g,endDTS:P/g,type:ft,hasAudio:!1,hasVideo:!0,nb:L.length,dropped:n.dropped};return n.samples=[],n.dropped=0,console.assert(st.length,"MDAT length must not be zero"),At},E.remuxAudio=function(n,l,h,w,g){var c=n.inputTimeScale,L=n.samplerate?n.samplerate:c,F=c/L,B=n.isAAC?s:i,P=B*F,W=this._initPTS,U=!n.isAAC&&this.typeSupported.mpeg,$=[],ee=n.samples,pe=U?0:8,fe=this.nextAudioPts||-1,Le=l*c;if(this.isAudioContiguous=h=h||ee.length&&fe>0&&(w&&Math.abs(Le-fe)<9e3||Math.abs(t(ee[0].pts-W,Le)-fe)<20*P),ee.forEach(function(ge){ge.pts=t(ge.pts-W,Le)}),!h||fe<0){if(ee=ee.filter(function(ge){return ge.pts>=0}),!ee.length)return;g===0?fe=0:w?fe=Math.max(0,Le):fe=ee[0].pts}if(n.isAAC)for(var Ie=g!==void 0,xe=this.config.maxAudioFramesDrift,Ue=0,Fe=fe;Ue<ee.length;Ue++){var we=ee[Ue],ve=we.pts,ze=ve-Fe,at=Math.abs(1e3*ze/c);if(ze<=-xe*P&&Ie)Ue===0&&(e.logger.warn("Audio frame @ "+(ve/c).toFixed(3)+"s overlaps nextAudioPts by "+Math.round(1e3*ze/c)+" ms."),this.nextAudioPts=fe=Fe=ve);else if(ze>=xe*P&&at<u&&Ie){var nt=Math.round(ze/P);Fe=ve-nt*P,Fe<0&&(nt--,Fe+=P),Ue===0&&(this.nextAudioPts=fe=Fe),e.logger.warn("[mp4-remuxer]: Injecting "+nt+" audio frame @ "+(Fe/c).toFixed(3)+"s due to "+Math.round(1e3*ze/c)+" ms gap.");for(var et=0;et<nt;et++){var Ke=Math.max(Fe,0),re=N.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=we.unit.subarray()),ee.splice(Ue,0,{unit:re,pts:Ke}),Fe+=P,Ue++}}we.pts=Fe,Fe+=P}for(var z=null,Y=null,J,ie=0,ue=ee.length;ue--;)ie+=ee[ue].unit.byteLength;for(var he=0,He=ee.length;he<He;he++){var We=ee[he],je=We.unit,Ge=We.pts;if(Y!==null){var rt=$[he-1];rt.duration=Math.round((Ge-Y)/F)}else if(h&&n.isAAC&&(Ge=fe),z=Ge,ie>0){ie+=pe;try{J=new Uint8Array(ie)}catch(ge){this.observer.emit(X.Events.ERROR,X.Events.ERROR,{type:M.ErrorTypes.MUX_ERROR,details:M.ErrorDetails.REMUX_ALLOC_ERROR,fatal:!1,bytes:ie,reason:"fail allocating audio mdat "+ie});return}if(!U){var st=new DataView(J.buffer);st.setUint32(0,ie),J.set(O.default.types.mdat,4)}}else return;J.set(je,pe);var Te=je.byteLength;pe+=Te,$.push(new y(!0,B,Te,0)),Y=Ge}var De=$.length;if(!De)return;var Ve=$[$.length-1];this.nextAudioPts=fe=Y+F*Ve.duration;var $e=U?new Uint8Array(0):O.default.moof(n.sequenceNumber++,z/F,v({},n,{samples:$}));n.samples=[];var Ne=z/c,Pe=fe/c,Ce="audio",ce={data1:$e,data2:J,startPTS:Ne,endPTS:Pe,startDTS:Ne,endDTS:Pe,type:Ce,hasAudio:!0,hasVideo:!1,nb:De};return this.isAudioContiguous=!0,console.assert(J.length,"MDAT length must not be zero"),ce},E.remuxEmptyAudio=function(n,l,h,w){var g=n.inputTimeScale,c=n.samplerate?n.samplerate:g,L=g/c,F=this.nextAudioPts,B=(F!==null?F:w.startDTS*g)+this._initDTS,P=w.endDTS*g+this._initDTS,W=L*s,U=Math.ceil((P-B)/W),$=N.default.getSilentFrame(n.manifestCodec||n.codec,n.channelCount);if(e.logger.warn("[mp4-remuxer]: remux empty Audio"),!$){e.logger.trace("[mp4-remuxer]: Unable to remuxEmptyAudio since we were unable to get a silent frame for given audio codec");return}for(var ee=[],pe=0;pe<U;pe++){var fe=B+pe*W;ee.push({unit:$,pts:fe,dts:fe})}return n.samples=ee,this.remuxAudio(n,l,h,!1)},E.remuxID3=function(n,l){var h=n.samples.length;if(!h)return;for(var w=n.inputTimeScale,g=this._initPTS,c=this._initDTS,L=0;L<h;L++){var F=n.samples[L];F.pts=t(F.pts-g,l*w)/w,F.dts=t(F.dts-c,l*w)/w}var B=n.samples;return n.samples=[],{samples:B}},E.remuxText=function(n,l){var h=n.samples.length;if(!h)return;for(var w=n.inputTimeScale,g=this._initPTS,c=0;c<h;c++){var L=n.samples[c];L.pts=t(L.pts-g,l*w)/w}n.samples.sort(function(B,P){return B.pts-P.pts});var F=n.samples;return n.samples=[],{samples:F}},x}();function t(x,E){var d;if(E===null)return x;for(E<x?d=-8589934592:d=8589934592;Math.abs(x-E)>4294967296;)x+=d;return x}function _(x){for(var E=0;E<x.length;E++)if(x[E].key)return E;return-1}var y=function(E,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 b(E)},b=function(E){this.isLeading=0,this.isDependedOn=0,this.hasRedundancy=0,this.degradPrio=0,this.dependsOn=1,this.isNonSync=1,this.dependsOn=E?2:1,this.isNonSync=E?0:1}},"./src/remux/passthrough-remuxer.ts":function(oe,G,D){"use strict";D.r(G);var j=D("./src/polyfills/number.ts"),N=D("./src/utils/mp4-tools.ts"),O=D("./src/loader/fragment.ts"),X=D("./src/utils/logger.ts"),M=function(){function f(){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=f.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,i,A){this.audioCodec=i,this.videoCodec=A,this.generateInitSegment(s),this.emitInitSegment=!0},v.generateInitSegment=function(s){var i=this.audioCodec,A=this.videoCodec;if(!s||!s.byteLength){this.initTracks=void 0,this.initData=void 0;return}var o=this.initData=Object(N.parseInitSegment)(s);i||(i=R(o.audio,O.ElementaryStreamTypes.AUDIO)),A||(A=R(o.video,O.ElementaryStreamTypes.VIDEO));var a={};o.audio&&o.video?a.audiovideo={container:"video/mp4",codec:i+","+A,initSegment:s,id:"main"}:o.audio?a.audio={container:"audio/mp4",codec:i,initSegment:s,id:"audio"}:o.video?a.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=a},v.remux=function(s,i,A,o,a){var r=this.initPTS,t=this.lastEndDTS,_={audio:void 0,video:void 0,text:o,id3:A,initSegment:void 0};Object(j.isFiniteNumber)(t)||(t=this.lastEndDTS=a||0);var y=i.samples;if(!y||!y.length)return _;var b={initPTS:void 0,timescale:1},x=this.initData;if((!x||!x.length)&&(this.generateInitSegment(y),x=this.initData),!x||!x.length)return X.logger.warn("[passthrough-remuxer.ts]: Failed to generate initSegment."),_;this.emitInitSegment&&(b.tracks=this.initTracks,this.emitInitSegment=!1),Object(j.isFiniteNumber)(r)||(this.initPTS=b.initPTS=r=e(x,y,t));var E=Object(N.getDuration)(y,x),d=t,n=E+d;Object(N.offsetStartDTS)(x,y,r),E>0?this.lastEndDTS=n:(X.logger.warn("Duration parsed from mp4 should be greater than zero"),this.resetNextTimestamp());var l=!!x.audio,h=!!x.video,w="";l&&(w+="audio"),h&&(w+="video");var g={data1:y,startPTS:d,startDTS:d,endPTS:n,endDTS:n,type:w,hasAudio:l,hasVideo:h,nb:1,dropped:0};return _.audio=g.type==="audio"?g:void 0,_.video=g.type!=="audio"?g:void 0,_.text=o,_.id3=A,_.initSegment=b,_},f}(),e=function(v,u,s){return Object(N.getStartDTS)(v,u)-s};function R(f,v){var u=f==null?void 0:f.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=M},"./src/task-loop.ts":function(oe,G,D){"use strict";D.r(G),D.d(G,"default",function(){return j});var j=function(){function N(){this._boundTick=void 0,this._tickTimer=null,this._tickInterval=null,this._tickCallCount=0,this._boundTick=this.tick.bind(this)}var O=N.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(M){return this._tickInterval?!1:(this._tickInterval=self.setInterval(this._boundTick,M),!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(){},N}()},"./src/types/cmcd.ts":function(oe,G,D){"use strict";D.r(G),D.d(G,"CMCDVersion",function(){return j}),D.d(G,"CMCDObjectType",function(){return N}),D.d(G,"CMCDStreamingFormat",function(){return O}),D.d(G,"CMCDStreamType",function(){return X});var j=1,N;(function(M){M.MANIFEST="m",M.AUDIO="a",M.VIDEO="v",M.MUXED="av",M.INIT="i",M.CAPTION="c",M.TIMED_TEXT="tt",M.KEY="k",M.OTHER="o"})(N||(N={}));var O;(function(M){M.DASH="d",M.HLS="h",M.SMOOTH="s",M.OTHER="o"})(O||(O={}));var X;(function(M){M.VOD="v",M.LIVE="l"})(X||(X={}))},"./src/types/level.ts":function(oe,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 M}),D.d(G,"Level",function(){return e});function j(R,f){for(var v=0;v<f.length;v++){var u=f[v];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(R,u.key,u)}}function N(R,f,v){return f&&j(R.prototype,f),v&&j(R,v),R}var O;(function(R){R.No="",R.Yes="YES",R.v2="v2"})(O||(O={}));function X(R,f){var v=R.canSkipUntil,u=R.canSkipDateRanges,s=R.endSN,i=f!==void 0?f-s:0;return v&&i<v?u?O.v2:O.Yes:O.No}var M=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 f=R.prototype;return f.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(f){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=[f.url],this.attrs=f.attrs,this.bitrate=f.bitrate,f.details&&(this.details=f.details),this.id=f.id||0,this.name=f.name,this.width=f.width||0,this.height=f.height||0,this.audioCodec=f.audioCodec,this.videoCodec=f.videoCodec,this.unknownCodecs=f.unknownCodecs,this.codecSet=[f.videoCodec,f.audioCodec].filter(function(v){return v}).join(",").replace(/\.[^.,]+/g,"")}return N(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(oe,G,D){"use strict";D.r(G),D.d(G,"PlaylistContextType",function(){return j}),D.d(G,"PlaylistLevelType",function(){return N});var j;(function(O){O.MANIFEST="manifest",O.LEVEL="level",O.AUDIO_TRACK="audioTrack",O.SUBTITLE_TRACK="subtitleTrack"})(j||(j={}));var N;(function(O){O.MAIN="main",O.AUDIO="audio",O.SUBTITLE="subtitle"})(N||(N={}))},"./src/types/transmuxer.ts":function(oe,G,D){"use strict";D.r(G),D.d(G,"ChunkMetadata",function(){return j});var j=function(X,M,e,R,f,v){R===void 0&&(R=0),f===void 0&&(f=-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=N(),this.buffering={audio:N(),video:N(),audiovideo:N()},this.level=X,this.sn=M,this.id=e,this.size=R,this.part=f,this.partial=v};function N(){return{start:0,executeStart:0,executeEnd:0,end:0}}},"./src/utils/attr-list.ts":function(oe,G,D){"use strict";D.r(G),D.d(G,"AttrList",function(){return O});var j=/^(\d+)x(\d+)$/,N=/\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 M=X.prototype;return M.decimalInteger=function(R){var f=parseInt(this[R],10);return f>Number.MAX_SAFE_INTEGER?Infinity:f},M.hexadecimalInteger=function(R){if(this[R]){var f=(this[R]||"0x").slice(2);f=(f.length&1?"0":"")+f;for(var v=new Uint8Array(f.length/2),u=0;u<f.length/2;u++)v[u]=parseInt(f.slice(u*2,u*2+2),16);return v}else return null},M.hexadecimalIntegerAsNumber=function(R){var f=parseInt(this[R],16);return f>Number.MAX_SAFE_INTEGER?Infinity:f},M.decimalFloatingPoint=function(R){return parseFloat(this[R])},M.optionalFloat=function(R,f){var v=this[R];return v?parseFloat(v):f},M.enumeratedString=function(R){return this[R]},M.bool=function(R){return this[R]==="YES"},M.decimalResolution=function(R){var f=j.exec(this[R]);return f===null?void 0:{width:parseInt(f[1],10),height:parseInt(f[2],10)}},X.parseAttrList=function(R){var f,v={},u='"';for(N.lastIndex=0;(f=N.exec(R))!==null;){var s=f[2];s.indexOf(u)===0&&s.lastIndexOf(u)===s.length-1&&(s=s.slice(1,-1)),v[f[1]]=s}return v},X}()},"./src/utils/binary-search.ts":function(oe,G,D){"use strict";D.r(G);var j={search:function(O,X){for(var M=0,e=O.length-1,R=null,f=null;M<=e;){R=(M+e)/2|0,f=O[R];var v=X(f);if(v>0)M=R+1;else if(v<0)e=R-1;else return f}return null}};G.default=j},"./src/utils/buffer-helper.ts":function(oe,G,D){"use strict";D.r(G),D.d(G,"BufferHelper",function(){return O});var j=D("./src/utils/logger.ts"),N={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 f=X.getBuffered(e),v=0;v<f.length;v++)if(R>=f.start(v)&&R<=f.end(v))return!0}}catch(u){}return!1},X.bufferInfo=function(e,R,f){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,f)}}catch(i){}return{len:0,start:R,end:R,nextStart:void 0}},X.bufferedInfo=function(e,R,f){R=Math.max(0,R),e.sort(function(b,x){var E=b.start-x.start;return E||x.end-b.end});var v=[];if(f)for(var u=0;u<e.length;u++){var s=v.length;if(s){var i=v[s-1].end;e[u].start-i<f?e[u].end>i&&(v[s-1].end=e[u].end):v.push(e[u])}else v.push(e[u])}else v=e;for(var A=0,o,a=R,r=R,t=0;t<v.length;t++){var _=v[t].start,y=v[t].end;if(R+f>=_&&R<y)a=_,r=y,A=r-R;else if(R+f<_){o=_;break}}return{len:A,start:a||0,end:r||0,nextStart:o}},X.getBuffered=function(e){try{return e.buffered}catch(R){return j.logger.log("failed to get media.buffered",R),N}},X}()},"./src/utils/cea-608-parser.ts":function(oe,G,D){"use strict";D.r(G),D.d(G,"Row",function(){return r}),D.d(G,"CaptionScreen",function(){return t});var j=D("./src/utils/logger.ts"),N={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 N.hasOwnProperty(n)&&(l=N[n]),String.fromCharCode(l)},X=15,M=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},f={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 i=function(){function d(){this.time=null,this.verboseLevel=s.ERROR}var n=d.prototype;return n.log=function(h,w){this.verboseLevel>=h&&j.logger.log(this.time+" ["+h+"] "+w)},d}(),A=function(n){for(var l=[],h=0;h<n.length;h++)l.push(n[h].toString(16));return l},o=function(){function d(l,h,w,g,c){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=h||!1,this.italics=w||!1,this.background=g||"black",this.flash=c||!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(h){for(var w=["foreground","underline","italics","background","flash"],g=0;g<w.length;g++){var c=w[g];h.hasOwnProperty(c)&&(this[c]=h[c])}},n.isDefault=function(){return this.foreground==="white"&&!this.underline&&!this.italics&&this.background==="black"&&!this.flash},n.equals=function(h){return this.foreground===h.foreground&&this.underline===h.underline&&this.italics===h.italics&&this.background===h.background&&this.flash===h.flash},n.copy=function(h){this.foreground=h.foreground,this.underline=h.underline,this.italics=h.italics,this.background=h.background,this.flash=h.flash},n.toString=function(){return"color="+this.foreground+", underline="+this.underline+", italics="+this.italics+", background="+this.background+", flash="+this.flash},d}(),a=function(){function d(l,h,w,g,c,L){this.uchar=void 0,this.penState=void 0,this.uchar=l||" ",this.penState=new o(h,w,g,c,L)}var n=d.prototype;return n.reset=function(){this.uchar=" ",this.penState.reset()},n.setChar=function(h,w){this.uchar=h,this.penState.copy(w)},n.setPenState=function(h){this.penState.copy(h)},n.equals=function(h){return this.uchar===h.uchar&&this.penState.equals(h.penState)},n.copy=function(h){this.uchar=h.uchar,this.penState.copy(h.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 h=0;h<M;h++)this.chars.push(new a);this.logger=l,this.pos=0,this.currPenState=new o}var n=d.prototype;return n.equals=function(h){for(var w=!0,g=0;g<M;g++)if(!this.chars[g].equals(h.chars[g])){w=!1;break}return w},n.copy=function(h){for(var w=0;w<M;w++)this.chars[w].copy(h.chars[w])},n.isEmpty=function(){for(var h=!0,w=0;w<M;w++)if(!this.chars[w].isEmpty()){h=!1;break}return h},n.setCursor=function(h){this.pos!==h&&(this.pos=h),this.pos<0?(this.logger.log(s.DEBUG,"Negative cursor position "+this.pos),this.pos=0):this.pos>M&&(this.logger.log(s.DEBUG,"Too large cursor position "+this.pos),this.pos=M)},n.moveCursor=function(h){var w=this.pos+h;if(h>1)for(var g=this.pos+1;g<w+1;g++)this.chars[g].setPenState(this.currPenState);this.setCursor(w)},n.backSpace=function(){this.moveCursor(-1),this.chars[this.pos].setChar(" ",this.currPenState)},n.insertChar=function(h){h>=144&&this.backSpace();var w=O(h);if(this.pos>=M){this.logger.log(s.ERROR,"Cannot insert "+h.toString(16)+" ("+w+") at position "+this.pos+". Skipping it!");return}this.chars[this.pos].setChar(w,this.currPenState),this.moveCursor(1)},n.clearFromPos=function(h){var w;for(w=h;w<M;w++)this.chars[w].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 h=[],w=!0,g=0;g<M;g++){var c=this.chars[g].uchar;c!==" "&&(w=!1),h.push(c)}return w?"":h.join("")},n.setPenStyles=function(h){this.currPenState.setStyles(h);var w=this.chars[this.pos];w.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 h=0;h<X;h++)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 h=0;h<X;h++)this.rows[h].clear();this.currRow=X-1},n.equals=function(h){for(var w=!0,g=0;g<X;g++)if(!this.rows[g].equals(h.rows[g])){w=!1;break}return w},n.copy=function(h){for(var w=0;w<X;w++)this.rows[w].copy(h.rows[w])},n.isEmpty=function(){for(var h=!0,w=0;w<X;w++)if(!this.rows[w].isEmpty()){h=!1;break}return h},n.backSpace=function(){var h=this.rows[this.currRow];h.backSpace()},n.clearToEndOfRow=function(){var h=this.rows[this.currRow];h.clearToEndOfRow()},n.insertChar=function(h){var w=this.rows[this.currRow];w.insertChar(h)},n.setPen=function(h){var w=this.rows[this.currRow];w.setPenStyles(h)},n.moveCursor=function(h){var w=this.rows[this.currRow];w.moveCursor(h)},n.setCursor=function(h){this.logger.log(s.INFO,"setCursor: "+h);var w=this.rows[this.currRow];w.setCursor(h)},n.setPAC=function(h){this.logger.log(s.INFO,"pacData = "+JSON.stringify(h));var w=h.row-1;if(this.nrRollUpRows&&w<this.nrRollUpRows-1&&(w=this.nrRollUpRows-1),this.nrRollUpRows&&this.currRow!==w){for(var g=0;g<X;g++)this.rows[g].clear();var c=this.currRow+1-this.nrRollUpRows,L=this.lastOutputScreen;if(L){var F=L.rows[c].cueStartTime,B=this.logger.time;if(F&&B!==null&&F<B)for(var P=0;P<this.nrRollUpRows;P++)this.rows[w-this.nrRollUpRows+P+1].copy(L.rows[c+P])}}this.currRow=w;var W=this.rows[this.currRow];if(h.indent!==null){var U=h.indent,$=Math.max(U-1,0);W.setCursor(h.indent),h.color=W.chars[$].penState.foreground}var ee={foreground:h.color,underline:h.underline,italics:h.italics,background:"black",flash:!1};this.setPen(ee)},n.setBkgData=function(h){this.logger.log(s.INFO,"bkgData = "+JSON.stringify(h)),this.backSpace(),this.setPen(h),this.insertChar(32)},n.setRollUpRows=function(h){this.nrRollUpRows=h},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 h=this.currRow+1-this.nrRollUpRows,w=this.rows.splice(h,1)[0];w.clear(),this.rows.splice(this.currRow,0,w),this.logger.log(s.INFO,"Rolling up")},n.getDisplayText=function(h){h=h||!1;for(var w=[],g="",c=-1,L=0;L<X;L++){var F=this.rows[L].getTextString();F&&(c=L+1,h?w.push("Row "+c+": '"+F+"'"):w.push(F.trim()))}return w.length>0&&(h?g="["+w.join(" | ")+"]":g=w.join(`
|
|
`)),g},n.getTextAndFormat=function(){return this.rows},d}(),_=function(){function d(l,h,w){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=h,this.mode=null,this.verbose=0,this.displayedMemory=new t(w),this.nonDisplayedMemory=new t(w),this.lastOutputScreen=new t(w),this.currRollUpRow=this.displayedMemory.rows[X-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null,this.logger=w}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(h){this.outputFilter=h},n.setPAC=function(h){this.writeScreen.setPAC(h)},n.setBkgData=function(h){this.writeScreen.setBkgData(h)},n.setMode=function(h){if(h===this.mode)return;this.mode=h,this.logger.log(s.INFO,"MODE="+h),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=h},n.insertChars=function(h){for(var w=0;w<h.length;w++)this.writeScreen.insertChar(h[w]);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(h){this.logger.log(s.INFO,"RU("+h+") - Roll Up"),this.writeScreen=this.displayedMemory,this.setMode("MODE_ROLL-UP"),this.writeScreen.setRollUpRows(h)},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 h=this.displayedMemory;this.displayedMemory=this.nonDisplayedMemory,this.nonDisplayedMemory=h,this.writeScreen=this.nonDisplayedMemory,this.logger.log(s.TEXT,"DISP: "+this.displayedMemory.getDisplayText())}this.outputDataUpdate(!0)},n.ccTO=function(h){this.logger.log(s.INFO,"TO("+h+") - Tab Offset"),this.writeScreen.moveCursor(h)},n.ccMIDROW=function(h){var w={flash:!1};if(w.underline=h%2===1,w.italics=h>=46,w.italics)w.foreground="white";else{var g=Math.floor(h/2)-16,c=["white","green","blue","cyan","red","yellow","magenta"];w.foreground=c[g]}this.logger.log(s.INFO,"MIDROW: "+JSON.stringify(w)),this.writeScreen.setPen(w)},n.outputDataUpdate=function(h){h===void 0&&(h=!1);var w=this.logger.time;if(w===null)return;this.outputFilter&&(this.cueStartTime===null&&!this.displayedMemory.isEmpty()?this.cueStartTime=w:this.displayedMemory.equals(this.lastOutputScreen)||(this.outputFilter.newCue(this.cueStartTime,w,this.lastOutputScreen),h&&this.outputFilter.dispatchCue&&this.outputFilter.dispatchCue(),this.cueStartTime=this.displayedMemory.isEmpty()?null:w),this.lastOutputScreen.copy(this.displayedMemory))},n.cueSplitAtTime=function(h){this.outputFilter&&(this.displayedMemory.isEmpty()||(this.outputFilter.newCue&&this.outputFilter.newCue(this.cueStartTime,h,this.displayedMemory),this.cueStartTime=h))},d}(),y=function(){function d(l,h,w){this.channels=void 0,this.currentChannel=0,this.cmdHistory=void 0,this.logger=void 0;var g=new i;this.channels=[null,new _(l,h,g),new _(l+1,w,g)],this.cmdHistory=E(),this.logger=g}var n=d.prototype;return n.getHandler=function(h){return this.channels[h].getHandler()},n.setHandler=function(h,w){this.channels[h].setHandler(w)},n.addData=function(h,w){var g,c,L,F=!1;this.logger.time=h;for(var B=0;B<w.length;B+=2){if(c=w[B]&127,L=w[B+1]&127,c===0&&L===0)continue;if(this.logger.log(s.DATA,"["+A([w[B],w[B+1]])+"] -> ("+A([c,L])+")"),g=this.parseCmd(c,L),g||(g=this.parseMidrow(c,L)),g||(g=this.parsePAC(c,L)),g||(g=this.parseBackgroundAttributes(c,L)),!g&&(F=this.parseChars(c,L),F)){var P=this.currentChannel;if(P&&P>0){var W=this.channels[P];W.insertChars(F)}else this.logger.log(s.WARNING,"No channel found yet. TEXT-MODE?")}!g&&!F&&this.logger.log(s.WARNING,"Couldn't parse cleaned data "+A([c,L])+" orig: "+A([w[B],w[B+1]]))}},n.parseCmd=function(h,w){var g=this.cmdHistory,c=(h===20||h===28||h===21||h===29)&&w>=32&&w<=47,L=(h===23||h===31)&&w>=33&&w<=35;if(!(c||L))return!1;if(x(h,w,g))return b(null,null,g),this.logger.log(s.DEBUG,"Repeated command ("+A([h,w])+") is dropped"),!0;var F=h===20||h===21||h===23?1:2,B=this.channels[F];return h===20||h===21||h===28||h===29?w===32?B.ccRCL():w===33?B.ccBS():w===34?B.ccAOF():w===35?B.ccAON():w===36?B.ccDER():w===37?B.ccRU(2):w===38?B.ccRU(3):w===39?B.ccRU(4):w===40?B.ccFON():w===41?B.ccRDC():w===42?B.ccTR():w===43?B.ccRTD():w===44?B.ccEDM():w===45?B.ccCR():w===46?B.ccENM():w===47&&B.ccEOC():B.ccTO(w-32),b(h,w,g),this.currentChannel=F,!0},n.parseMidrow=function(h,w){var g=0;if((h===17||h===25)&&w>=32&&w<=47){if(h===17?g=1:g=2,g!==this.currentChannel)return this.logger.log(s.ERROR,"Mismatch channel in midrow parsing"),!1;var c=this.channels[g];return c?(c.ccMIDROW(w),this.logger.log(s.DEBUG,"MIDROW ("+A([h,w])+")"),!0):!1}return!1},n.parsePAC=function(h,w){var g,c=this.cmdHistory,L=(h>=17&&h<=23||h>=25&&h<=31)&&w>=64&&w<=127,F=(h===16||h===24)&&w>=64&&w<=95;if(!(L||F))return!1;if(x(h,w,c))return b(null,null,c),!0;var B=h<=23?1:2;w>=64&&w<=95?g=B===1?e[h]:f[h]:g=B===1?R[h]:v[h];var P=this.channels[B];return P?(P.setPAC(this.interpretPAC(g,w)),b(h,w,c),this.currentChannel=B,!0):!1},n.interpretPAC=function(h,w){var g,c={color:null,italics:!1,indent:null,underline:!1,row:h};return w>95?g=w-96:g=w-64,c.underline=(g&1)===1,g<=13?c.color=["white","green","blue","cyan","red","yellow","magenta","white"][Math.floor(g/2)]:g<=15?(c.italics=!0,c.color="white"):c.indent=Math.floor((g-16)/2)*4,c},n.parseChars=function(h,w){var g,c=null,L=null;if(h>=25?(g=2,L=h-8):(g=1,L=h),L>=17&&L<=19){var F;L===17?F=w+80:L===18?F=w+112:F=w+144,this.logger.log(s.INFO,"Special char '"+O(F)+"' in channel "+g),c=[F]}else h>=32&&h<=127&&(c=w===0?[h]:[h,w]);if(c){var B=A(c);this.logger.log(s.DEBUG,"Char codes = "+B.join(",")),b(h,w,this.cmdHistory)}return c},n.parseBackgroundAttributes=function(h,w){var g=(h===16||h===24)&&w>=32&&w<=47,c=(h===23||h===31)&&w>=45&&w<=47;if(!(g||c))return!1;var L,F={};h===16||h===24?(L=Math.floor((w-32)/2),F.background=u[L],w%2===1&&(F.background=F.background+"_semi")):w===45?F.background="transparent":(F.foreground="black",w===47&&(F.underline=!0));var B=h<=23?1:2,P=this.channels[B];return P.setBkgData(F),b(h,w,this.cmdHistory),!0},n.reset=function(){for(var h=0;h<Object.keys(this.channels).length;h++){var w=this.channels[h];w&&w.reset()}this.cmdHistory=E()},n.cueSplitAtTime=function(h){for(var w=0;w<this.channels.length;w++){var g=this.channels[w];g&&g.cueSplitAtTime(h)}},d}();function b(d,n,l){l.a=d,l.b=n}function x(d,n,l){return l.a===d&&l.b===n}function E(){return{a:null,b:null}}G.default=y},"./src/utils/codecs.ts":function(oe,G,D){"use strict";D.r(G),D.d(G,"isCodecType",function(){return N}),D.d(G,"isCodecSupportedInMp4",function(){return O});var j={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 N(X,M){var e=j[M];return!!e&&e[X.slice(0,4)]===!0}function O(X,M){return MediaSource.isTypeSupported((M||"video")+'/mp4;codecs="'+X+'"')}},"./src/utils/cues.ts":function(oe,G,D){"use strict";D.r(G);var j=D("./src/utils/vttparser.ts"),N=D("./src/utils/webvtt-parser.ts"),O=D("./src/utils/texttrack-utils.ts"),X=/\s/,M={newCue:function(R,f,v,u){for(var s=[],i,A,o,a,r,t=self.VTTCue||self.TextTrackCue,_=0;_<u.rows.length;_++)if(i=u.rows[_],o=!0,a=0,r="",!i.isEmpty()){for(var y=0;y<i.chars.length;y++)X.test(i.chars[y].uchar)&&o?a++:(r+=i.chars[y].uchar,o=!1);i.cueStartTime=f,f===v&&(v+=1e-4),a>=16?a--:a++;var b=Object(j.fixLineBreaks)(r.trim()),x=Object(N.generateCueId)(f,v,b);(!R||!R.cues||!R.cues.getCueById(x))&&(A=new t(f,v,b),A.id=x,A.line=_+1,A.align="left",A.position=10+Math.min(80,Math.floor(a*8/32)*10),s.push(A))}return R&&s.length&&(s.sort(function(E,d){return E.line==="auto"||d.line==="auto"?0:E.line>8&&d.line>8?d.line-E.line:E.line-d.line}),s.forEach(function(E){return Object(O.addCueToTrack)(R,E)})),s}};G.default=M},"./src/utils/discontinuities.ts":function(oe,G,D){"use strict";D.r(G),D.d(G,"findFirstFragWithCC",function(){return X}),D.d(G,"shouldAlignOnDiscontinuities",function(){return M}),D.d(G,"findDiscontinuousReferenceFrag",function(){return e}),D.d(G,"adjustSlidingStart",function(){return f}),D.d(G,"alignStream",function(){return v}),D.d(G,"alignPDT",function(){return s}),D.d(G,"alignFragmentByPDTDelta",function(){return i}),D.d(G,"alignMediaPlaylistByPDT",function(){return A});var j=D("./src/polyfills/number.ts"),N=D("./src/utils/logger.ts"),O=D("./src/controller/level-helper.ts");function X(o,a){for(var r=null,t=0,_=o.length;t<_;t++){var y=o[t];if(y&&y.cc===a){r=y;break}}return r}function M(o,a,r){return!!(a.details&&(r.endCC>r.startCC||o&&o.cc<r.startCC))}function e(o,a){var r=o.fragments,t=a.fragments;if(!t.length||!r.length){N.logger.log("No fragments to align");return}var _=X(r,t[0].cc);if(!_||_&&!_.startPTS){N.logger.log("No frag in previous level to align on");return}return _}function R(o,a){if(o){var r=o.start+a;o.start=o.startPTS=r,o.endPTS=r+o.duration}}function f(o,a){for(var r=a.fragments,t=0,_=r.length;t<_;t++)R(r[t],o);a.fragmentHint&&R(a.fragmentHint,o),a.alignedSliding=!0}function v(o,a,r){if(!a)return;u(o,r,a),!r.alignedSliding&&a.details&&s(r,a.details),!r.alignedSliding&&a.details&&!r.skippedSegments&&Object(O.adjustSliding)(a.details,r)}function u(o,a,r){if(M(o,r,a)){var t=e(r.details,a);t&&Object(j.isFiniteNumber)(t.start)&&(N.logger.log("Adjusting PTS using last level due to CC increase within current level "+a.url),f(t.start,a))}}function s(o,a){if(!a.fragments.length||!o.hasProgramDateTime||!a.hasProgramDateTime)return;var r=a.fragments[0].programDateTime,t=o.fragments[0].programDateTime,_=(t-r)/1e3+a.fragments[0].start;_&&Object(j.isFiniteNumber)(_)&&(N.logger.log("Adjusting PTS using programDateTime delta "+(t-r)+"ms, sliding:"+_.toFixed(3)+" "+o.url+" "),f(_,o))}function i(o,a){var r=o.programDateTime;if(!r)return;var t=(r-a)/1e3;o.start=o.startPTS=t,o.endPTS=t+o.duration}function A(o,a){if(!a.fragments.length||!o.hasProgramDateTime||!a.hasProgramDateTime)return;var r=a.fragments[0].programDateTime,t=a.fragments[0].start,_=r-t*1e3;o.fragments.forEach(function(y){i(y,_)}),o.fragmentHint&&i(o.fragmentHint,_),o.alignedSliding=!0}},"./src/utils/ewma-bandwidth-estimator.ts":function(oe,G,D){"use strict";D.r(G);var j=D("./src/utils/ewma.ts"),N=function(){function O(M,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 j.default(M),this.fast_=new j.default(e)}var X=O.prototype;return X.update=function(e,R){var f=this.slow_,v=this.fast_;this.slow_.halfLife!==e&&(this.slow_=new j.default(e,f.getEstimate(),f.getTotalWeight())),this.fast_.halfLife!==R&&(this.fast_=new j.default(R,v.getEstimate(),v.getTotalWeight()))},X.sample=function(e,R){e=Math.max(e,this.minDelayMs_);var f=8*R,v=e/1e3,u=f/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=N},"./src/utils/ewma.ts":function(oe,G,D){"use strict";D.r(G);var j=function(){function N(X,M,e){M===void 0&&(M=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_=M,this.totalWeight_=e}var O=N.prototype;return O.sample=function(M,e){var R=Math.pow(this.alpha_,M);this.estimate_=e*(1-R)+R*this.estimate_,this.totalWeight_+=M},O.getTotalWeight=function(){return this.totalWeight_},O.getEstimate=function(){if(this.alpha_){var M=1-Math.pow(this.alpha_,this.totalWeight_);if(M)return this.estimate_/M}return this.estimate_},N}();G.default=j},"./src/utils/fetch-loader.ts":function(oe,G,D){"use strict";D.r(G),D.d(G,"fetchSupported",function(){return i});var j=D("./src/polyfills/number.ts"),N=D("./src/loader/load-stats.ts"),O=D("./src/demux/chunk-cache.ts");function X(t,_){t.prototype=Object.create(_.prototype),t.prototype.constructor=t,v(t,_)}function M(t){var _=typeof Map=="function"?new Map:void 0;return M=function(b){if(b===null||!f(b))return b;if(typeof b!="function")throw new TypeError("Super expression must either be null or a function");if(typeof _!="undefined"){if(_.has(b))return _.get(b);_.set(b,x)}function x(){return e(b,arguments,u(this).constructor)}return x.prototype=Object.create(b.prototype,{constructor:{value:x,enumerable:!1,writable:!0,configurable:!0}}),v(x,b)},M(t)}function e(t,_,y){return R()?e=Reflect.construct:e=function(x,E,d){var n=[null];n.push.apply(n,E);var l=Function.bind.apply(x,n),h=new l;return d&&v(h,d.prototype),h},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 f(t){return Function.toString.call(t).indexOf("[native code]")!==-1}function v(t,_){return v=Object.setPrototypeOf||function(b,x){return b.__proto__=x,b},v(t,_)}function u(t){return u=Object.setPrototypeOf?Object.getPrototypeOf:function(y){return y.__proto__||Object.getPrototypeOf(y)},u(t)}function s(){return s=Object.assign||function(t){for(var _=1;_<arguments.length;_++){var y=arguments[_];for(var b in y)Object.prototype.hasOwnProperty.call(y,b)&&(t[b]=y[b])}return t},s.apply(this,arguments)}function i(){if(self.fetch&&self.AbortController&&self.ReadableStream&&self.Request)try{return new self.ReadableStream({}),!0}catch(t){}return!1}var A=function(){function t(y){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=y.fetchSetup||a,this.controller=new self.AbortController,this.stats=new N.LoadStats}var _=t.prototype;return _.destroy=function(){this.loader=this.callbacks=null,this.abortInternal()},_.abortInternal=function(){var b=this.response;(!b||!b.ok)&&(this.stats.aborted=!0,this.controller.abort())},_.abort=function(){var b;this.abortInternal(),(b=this.callbacks)!==null&&b!==void 0&&b.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.response)},_.load=function(b,x,E){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(b,this.controller.signal),h=E.onProgress,w=b.responseType==="arraybuffer",g=w?"byteLength":"length";this.context=b,this.config=x,this.callbacks=E,this.request=this.fetchSetup(b,l),self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(function(){d.abortInternal(),E.onTimeout(n,b,d.response)},x.timeout),self.fetch(this.request).then(function(c){if(d.response=d.loader=c,!c.ok){var L=c.status,F=c.statusText;throw new r(F||"fetch, bad network response",L,c)}return n.loading.first=Math.max(self.performance.now(),n.loading.start),n.total=parseInt(c.headers.get("Content-Length")||"0"),h&&Object(j.isFiniteNumber)(x.highWaterMark)?d.loadProgressively(c,n,b,x.highWaterMark,h):w?c.arrayBuffer():c.text()}).then(function(c){var L=d.response;self.clearTimeout(d.requestTimeout),n.loading.end=Math.max(self.performance.now(),n.loading.first),n.loaded=n.total=c[g];var F={url:L.url,data:c};h&&!Object(j.isFiniteNumber)(x.highWaterMark)&&h(n,b,c,L),E.onSuccess(F,n,b,L)}).catch(function(c){if(self.clearTimeout(d.requestTimeout),n.aborted)return;var L=c.code||0;E.onError({code:L,text:c.message},b,c.details)})},_.getCacheAge=function(){var b=null;if(this.response){var x=this.response.headers.get("age");b=x?parseFloat(x):null}return b},_.loadProgressively=function(b,x,E,d,n){d===void 0&&(d=0);var l=new O.default,h=b.body.getReader(),w=function g(){return h.read().then(function(c){if(c.done)return l.dataLength&&n(x,E,l.flush(),b),Promise.resolve(new ArrayBuffer(0));var L=c.value,F=L.length;return x.loaded+=F,F<d||l.dataLength?(l.push(L),l.dataLength>=d&&n(x,E,l.flush(),b)):n(x,E,L,b),g()}).catch(function(){return Promise.reject()})};return w()},t}();function o(t,_){var y={method:"GET",mode:"cors",credentials:"same-origin",signal:_,headers:new self.Headers(s({},t.headers))};return t.rangeEnd&&y.headers.set("Range","bytes="+t.rangeStart+"-"+String(t.rangeEnd-1)),y}function a(t,_){return new self.Request(t.url,_)}var r=function(t){X(_,t);function _(y,b,x){var E;return E=t.call(this,y)||this,E.code=void 0,E.details=void 0,E.code=b,E.details=x,E}return _}(M(Error));G.default=A},"./src/utils/imsc1-ttml-parser.ts":function(oe,G,D){"use strict";D.r(G),D.d(G,"IMSC1_CODEC",function(){return f}),D.d(G,"parseIMSC1",function(){return i});var j=D("./src/utils/mp4-tools.ts"),N=D("./src/utils/vttparser.ts"),O=D("./src/utils/vttcue.ts"),X=D("./src/demux/id3.ts"),M=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 h in l)Object.prototype.hasOwnProperty.call(l,h)&&(d[h]=l[h])}return d},R.apply(this,arguments)}var f="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 i(d,n,l,h,w){var g=Object(j.findBox)(new Uint8Array(d),["mdat"]);if(g.length===0){w(new Error("Could not parse IMSC1 mdat"));return}var c=g[0],L=Object(X.utf8ArrayToStr)(new Uint8Array(d,c.start,c.end-c.start)),F=Object(M.toTimescaleFromScale)(n,1,l);try{h(A(L,F))}catch(B){w(B)}}function A(d,n){var l=new DOMParser,h=l.parseFromString(d,"text/xml"),w=h.getElementsByTagName("tt")[0];if(!w)throw new Error("Invalid ttml");var g={frameRate:30,subFrameRate:1,frameRateMultiplier:0,tickRate:0},c=Object.keys(g).reduce(function(W,U){return W[U]=w.getAttribute("ttp:"+U)||g[U],W},{}),L=w.getAttribute("xml:space")!=="preserve",F=a(o(w,"styling","style")),B=a(o(w,"layout","region")),P=o(w,"body","[begin]");return[].map.call(P,function(W){var U=r(W,L);if(!U||!W.hasAttribute("begin"))return null;var $=b(W.getAttribute("begin"),c),ee=b(W.getAttribute("dur"),c),pe=b(W.getAttribute("end"),c);if($===null)throw y(W);if(pe===null){if(ee===null)throw y(W);pe=$+ee}var fe=new O.default($-n,pe-n,U);fe.id=Object(e.generateCueId)(fe.startTime,fe.endTime,fe.text);var Le=B[W.getAttribute("region")],Ie=F[W.getAttribute("style")];fe.position=10,fe.size=80;var xe=t(Le,Ie),Ue=xe.textAlign;if(Ue){var Fe=s[Ue];Fe&&(fe.lineAlign=Fe),fe.align=Ue}return R(fe,xe),fe}).filter(function(W){return W!==null})}function o(d,n,l){var h=d.getElementsByTagName(n)[0];return h?[].slice.call(h.querySelectorAll(l)):[]}function a(d){return d.reduce(function(n,l){var h=l.getAttribute("xml:id");return h&&(n[h]=l),n},{})}function r(d,n){return[].slice.call(d.childNodes).reduce(function(l,h,w){var g;return h.nodeName==="br"&&w?l+`
|
|
`:(g=h.childNodes)!==null&&g!==void 0&&g.length?r(h,n):n?l+h.textContent.trim().replace(/\s+/g," "):l+h.textContent},"")}function t(d,n){var l="http://www.w3.org/ns/ttml#styling",h=["displayAlign","textAlign","color","backgroundColor","fontSize","fontFamily"];return h.reduce(function(w,g){var c=_(n,l,g)||_(d,l,g);return c&&(w[g]=c),w},{})}function _(d,n,l){return d.hasAttributeNS(n,l)?d.getAttributeNS(n,l):null}function y(d){return new Error("Could not parse ttml timestamp "+d)}function b(d,n){if(!d)return null;var l=Object(N.parseTimeStamp)(d);return l===null&&(v.test(d)?l=x(d,n):u.test(d)&&(l=E(d,n))),l}function x(d,n){var l=v.exec(d),h=(l[4]|0)+(l[5]|0)/n.subFrameRate;return(l[1]|0)*3600+(l[2]|0)*60+(l[3]|0)+h/n.frameRate}function E(d,n){var l=u.exec(d),h=Number(l[1]),w=l[2];switch(w){case"h":return h*3600;case"m":return h*60;case"ms":return h*1e3;case"f":return h/n.frameRate;case"t":return h/n.tickRate}return h}},"./src/utils/logger.ts":function(oe,G,D){"use strict";D.r(G),D.d(G,"enableLogs",function(){return e}),D.d(G,"logger",function(){return R});var j=function(){},N={trace:j,debug:j,log:j,warn:j,info:j,error:j},O=N;function X(f){var v=self.console[f];return v?v.bind(self.console,"["+f+"] >"):j}function M(f){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(i){O[i]=f[i]?f[i].bind(f):X(i)})}function e(f){if(self.console&&f===!0||typeof f=="object"){M(f,"debug","log","info","warn","error");try{O.log()}catch(v){O=N}}else O=N}var R=O},"./src/utils/mediakeys-helper.ts":function(oe,G,D){"use strict";D.r(G),D.d(G,"KeySystems",function(){return j}),D.d(G,"requestMediaKeySystemAccess",function(){return N});var j;(function(O){O.WIDEVINE="com.widevine.alpha",O.PLAYREADY="com.microsoft.playready"})(j||(j={}));var N=function(){return typeof self!="undefined"&&self.navigator&&self.navigator.requestMediaKeySystemAccess?self.navigator.requestMediaKeySystemAccess.bind(self.navigator):null}()},"./src/utils/mediasource-helper.ts":function(oe,G,D){"use strict";D.r(G),D.d(G,"getMediaSource",function(){return j});function j(){return self.MediaSource||self.WebKitMediaSource}},"./src/utils/mp4-tools.ts":function(oe,G,D){"use strict";D.r(G),D.d(G,"bin2str",function(){return M}),D.d(G,"readUint16",function(){return e}),D.d(G,"readUint32",function(){return R}),D.d(G,"writeUint32",function(){return f}),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 i}),D.d(G,"getDuration",function(){return A}),D.d(G,"computeRawDurationFromSamples",function(){return o}),D.d(G,"offsetStartDTS",function(){return a}),D.d(G,"segmentValidRange",function(){return r}),D.d(G,"appendUint8Array",function(){return t});var j=D("./src/utils/typed-array.ts"),N=D("./src/loader/fragment.ts"),O=Math.pow(2,32)-1,X=[].push;function M(_){return String.fromCharCode.apply(null,_)}function e(_,y){"data"in _&&(y+=_.start,_=_.data);var b=_[y]<<8|_[y+1];return b<0?65536+b:b}function R(_,y){"data"in _&&(y+=_.start,_=_.data);var b=_[y]<<24|_[y+1]<<16|_[y+2]<<8|_[y+3];return b<0?4294967296+b:b}function f(_,y,b){"data"in _&&(y+=_.start,_=_.data),_[y]=b>>24,_[y+1]=b>>16&255,_[y+2]=b>>8&255,_[y+3]=b&255}function v(_,y){var b=[];if(!y.length)return b;var x,E,d;"data"in _?(x=_.data,E=_.start,d=_.end):(x=_,E=0,d=x.byteLength);for(var n=E;n<d;){var l=R(x,n),h=M(x.subarray(n+4,n+8)),w=l>1?n+l:d;if(h===y[0])if(y.length===1)b.push({data:x,start:n+8,end:w});else{var g=v({data:x,start:n+8,end:w},y.slice(1));g.length&&X.apply(b,g)}n=w}return b}function u(_){var y=v(_,["moov"]),b=y[0],x=b?b.end:null,E=v(_,["sidx"]);if(!E||!E[0])return null;var d=[],n=E[0],l=n.data[0],h=l===0?8:16,w=R(n,h);h+=4;var g=0,c=0;l===0?h+=8:h+=16,h+=2;var L=n.end+c,F=e(n,h);h+=2;for(var B=0;B<F;B++){var P=h,W=R(n,P);P+=4;var U=W&2147483647,$=(W&2147483648)>>>31;if($===1)return console.warn("SIDX has hierarchical references (not supported)"),null;var ee=R(n,P);P+=4,d.push({referenceSize:U,subsegmentDuration:ee,info:{duration:ee/w,start:L,end:L+U-1}}),L+=U,P+=4,h=P}return{earliestPresentationTime:g,timescale:w,version:l,referencesCount:F,references:d,moovEndOffset:x}}function s(_){for(var y=[],b=v(_,["moov","trak"]),x=0;x<b.length;x++){var E=b[x],d=v(E,["tkhd"])[0];if(d){var n=d.data[d.start],l=n===0?12:20,h=R(d,l),w=v(E,["mdia","mdhd"])[0];if(w){n=w.data[w.start],l=n===0?12:20;var g=R(w,l),c=v(E,["mdia","hdlr"])[0];if(c){var L=M(c.data.subarray(c.start+8,c.start+12)),F={soun:N.ElementaryStreamTypes.AUDIO,vide:N.ElementaryStreamTypes.VIDEO}[L];if(F){var B=v(E,["mdia","minf","stbl","stsd"])[0],P=void 0;B&&(P=M(B.data.subarray(B.start+12,B.start+16))),y[h]={timescale:g,type:F},y[F]={timescale:g,id:h,codec:P}}}}}}var W=v(_,["moov","mvex","trex"]);return W.forEach(function(U){var $=R(U,4),ee=y[$];ee&&(ee.default={duration:R(U,12),flags:R(U,20)})}),y}function i(_,y){return v(y,["moof","traf"]).reduce(function(b,x){var E=v(x,["tfdt"])[0],d=E.data[E.start],n=v(x,["tfhd"]).reduce(function(l,h){var w=R(h,4),g=_[w];if(g){var c=R(E,4);d===1&&(c*=Math.pow(2,32),c+=R(E,8));var L=g.timescale||9e4,F=c/L;if(isFinite(F)&&(l===null||F<l))return F}return l},null);return n!==null&&isFinite(n)&&(b===null||n<b)?n:b},null)||0}function A(_,y){for(var b=0,x=0,E=0,d=v(_,["moof","traf"]),n=0;n<d.length;n++){var l=d[n],h=v(l,["tfhd"])[0],w=R(h,4),g=y[w];if(!g)continue;var c=g.default,L=R(h,0)|(c==null?void 0:c.flags),F=c==null?void 0:c.duration;L&8&&(L&2?F=R(h,12):F=R(h,8));for(var B=g.timescale||9e4,P=v(l,["trun"]),W=0;W<P.length;W++){if(F){var U=R(P[W],4);b=F*U}else b=o(P[W]);g.type===N.ElementaryStreamTypes.VIDEO?x+=b/B:g.type===N.ElementaryStreamTypes.AUDIO&&(E+=b/B)}}if(x===0&&E===0){var $=u(_);if($!=null&&$.references)return $.references.reduce(function(ee,pe){return ee+pe.info.duration||0},0)}return x||E}function o(_){var y=R(_,0),b=8;y&1&&(b+=4),y&4&&(b+=4);for(var x=0,E=R(_,4),d=0;d<E;d++){if(y&256){var n=R(_,b);x+=n,b+=4}y&512&&(b+=4),y&1024&&(b+=4),y&2048&&(b+=4)}return x}function a(_,y,b){v(y,["moof","traf"]).forEach(function(x){v(x,["tfhd"]).forEach(function(E){var d=R(E,4),n=_[d];if(!n)return;var l=n.timescale||9e4;v(x,["tfdt"]).forEach(function(h){var w=h.data[h.start],g=R(h,4);if(w===0)f(h,4,g-b*l);else{g*=Math.pow(2,32),g+=R(h,8),g-=b*l,g=Math.max(g,0);var c=Math.floor(g/(O+1)),L=Math.floor(g%(O+1));f(h,4,c),f(h,8,L)}})})})}function r(_){var y={valid:null,remainder:null},b=v(_,["moof"]);if(b){if(b.length<2)return y.remainder=_,y}else return y;var x=b[b.length-1];return y.valid=Object(j.sliceUint8)(_,0,x.start-8),y.remainder=Object(j.sliceUint8)(_,x.start-8),y}function t(_,y){var b=new Uint8Array(_.length+y.length);return b.set(_),b.set(y,_.length),b}},"./src/utils/output-filter.ts":function(oe,G,D){"use strict";D.r(G),D.d(G,"default",function(){return j});var j=function(){function N(X,M){this.timelineController=void 0,this.cueRanges=[],this.trackName=void 0,this.startTime=null,this.endTime=null,this.screen=null,this.timelineController=X,this.trackName=M}var O=N.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(M,e,R){(this.startTime===null||this.startTime>M)&&(this.startTime=M),this.endTime=e,this.screen=R,this.timelineController.createCaptionsTrack(this.trackName)},O.reset=function(){this.cueRanges=[]},N}()},"./src/utils/texttrack-utils.ts":function(oe,G,D){"use strict";D.r(G),D.d(G,"sendAddTrackEvent",function(){return N}),D.d(G,"addCueToTrack",function(){return O}),D.d(G,"clearCurrentCues",function(){return X}),D.d(G,"removeCuesInRange",function(){return M}),D.d(G,"getCuesInRange",function(){return R});var j=D("./src/utils/logger.ts");function N(f,v){var u;try{u=new Event("addtrack")}catch(s){u=document.createEvent("Event"),u.initEvent("addtrack",!1,!1)}u.track=f,v.dispatchEvent(u)}function O(f,v){var u=f.mode;if(u==="disabled"&&(f.mode="hidden"),f.cues&&!f.cues.getCueById(v.id))try{if(f.addCue(v),!f.cues.getCueById(v.id))throw new Error("addCue is failed for: "+v)}catch(i){j.logger.debug("[texttrack-utils]: "+i);var s=new self.TextTrackCue(v.startTime,v.endTime,v.text);s.id=v.id,f.addCue(s)}u==="disabled"&&(f.mode=u)}function X(f){var v=f.mode;if(v==="disabled"&&(f.mode="hidden"),f.cues)for(var u=f.cues.length;u--;)f.removeCue(f.cues[u]);v==="disabled"&&(f.mode=v)}function M(f,v,u){var s=f.mode;if(s==="disabled"&&(f.mode="hidden"),f.cues&&f.cues.length>0)for(var i=R(f.cues,v,u),A=0;A<i.length;A++)f.removeCue(i[A]);s==="disabled"&&(f.mode=s)}function e(f,v){if(v<f[0].startTime)return 0;var u=f.length-1;if(v>f[u].endTime)return-1;for(var s=0,i=u;s<=i;){var A=Math.floor((i+s)/2);if(v<f[A].startTime)i=A-1;else if(v>f[A].startTime&&s<u)s=A+1;else return A}return f[s].startTime-v<v-f[i].startTime?s:i}function R(f,v,u){var s=[],i=e(f,v);if(i>-1)for(var A=i,o=f.length;A<o;A++){var a=f[A];if(a.startTime>=v&&a.endTime<=u)s.push(a);else if(a.startTime>u)return s}return s}},"./src/utils/time-ranges.ts":function(oe,G,D){"use strict";D.r(G);var j={toString:function(O){for(var X="",M=O.length,e=0;e<M;e++)X+="["+O.start(e).toFixed(3)+","+O.end(e).toFixed(3)+"]";return X}};G.default=j},"./src/utils/timescale-conversion.ts":function(oe,G,D){"use strict";D.r(G),D.d(G,"toTimescaleFromBase",function(){return N}),D.d(G,"toTimescaleFromScale",function(){return O}),D.d(G,"toMsFromMpegTsClock",function(){return X}),D.d(G,"toMpegTsClockFromTimescale",function(){return M});var j=9e4;function N(e,R,f,v){f===void 0&&(f=1),v===void 0&&(v=!1);var u=e*R*f;return v?Math.round(u):u}function O(e,R,f,v){return f===void 0&&(f=1),v===void 0&&(v=!1),N(e,R,1/f,v)}function X(e,R){return R===void 0&&(R=!1),N(e,1e3,1/j,R)}function M(e,R){return R===void 0&&(R=1),N(e,j,1/R)}},"./src/utils/typed-array.ts":function(oe,G,D){"use strict";D.r(G),D.d(G,"sliceUint8",function(){return j});function j(N,O,X){return Uint8Array.prototype.slice?N.slice(O,X):new Uint8Array(Array.prototype.slice.call(N,O,X))}},"./src/utils/vttcue.ts":function(oe,G,D){"use strict";D.r(G),G.default=function(){if(typeof self!="undefined"&&self.VTTCue)return self.VTTCue;var j=["","lr","rl"],N=["start","middle","end","left","right"];function O(f,v){if(typeof v!="string")return!1;if(!Array.isArray(f))return!1;var u=v.toLowerCase();return~f.indexOf(u)?u:!1}function X(f){return O(j,f)}function M(f){return O(N,f)}function e(f){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 i=1;i<arguments.length;i++){var A=arguments[i];for(var o in A)f[o]=A[o]}return f}function R(f,v,u){var s=this,i={enumerable:!0};s.hasBeenReset=!1;var A="",o=!1,a=f,r=v,t=u,_=null,y="",b=!0,x="auto",E="start",d=50,n="middle",l=50,h="middle";Object.defineProperty(s,"id",e({},i,{get:function(){return A},set:function(g){A=""+g}})),Object.defineProperty(s,"pauseOnExit",e({},i,{get:function(){return o},set:function(g){o=!!g}})),Object.defineProperty(s,"startTime",e({},i,{get:function(){return a},set:function(g){if(typeof g!="number")throw new TypeError("Start time must be set to a number.");a=g,this.hasBeenReset=!0}})),Object.defineProperty(s,"endTime",e({},i,{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({},i,{get:function(){return t},set:function(g){t=""+g,this.hasBeenReset=!0}})),Object.defineProperty(s,"region",e({},i,{get:function(){return _},set:function(g){_=g,this.hasBeenReset=!0}})),Object.defineProperty(s,"vertical",e({},i,{get:function(){return y},set:function(g){var c=X(g);if(c===!1)throw new SyntaxError("An invalid or illegal string was specified.");y=c,this.hasBeenReset=!0}})),Object.defineProperty(s,"snapToLines",e({},i,{get:function(){return b},set:function(g){b=!!g,this.hasBeenReset=!0}})),Object.defineProperty(s,"line",e({},i,{get:function(){return x},set:function(g){if(typeof g!="number"&&g!=="auto")throw new SyntaxError("An invalid number or illegal string was specified.");x=g,this.hasBeenReset=!0}})),Object.defineProperty(s,"lineAlign",e({},i,{get:function(){return E},set:function(g){var c=M(g);if(!c)throw new SyntaxError("An invalid or illegal string was specified.");E=c,this.hasBeenReset=!0}})),Object.defineProperty(s,"position",e({},i,{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({},i,{get:function(){return n},set:function(g){var c=M(g);if(!c)throw new SyntaxError("An invalid or illegal string was specified.");n=c,this.hasBeenReset=!0}})),Object.defineProperty(s,"size",e({},i,{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({},i,{get:function(){return h},set:function(g){var c=M(g);if(!c)throw new SyntaxError("An invalid or illegal string was specified.");h=c,this.hasBeenReset=!0}})),s.displayState=void 0}return R.prototype.getCueAsHTML=function(){var f=self.WebVTT;return f.convertCueToDOMTree(self,this.text)},R}()},"./src/utils/vttparser.ts":function(oe,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 j=D("./src/utils/vttcue.ts"),N=function(){function s(){}var i=s.prototype;return i.decode=function(o,a){if(!o)return"";if(typeof o!="string")throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(o))},s}();function O(s){function i(o,a,r,t){return(o|0)*3600+(a|0)*60+(r|0)+parseFloat(t||0)}var A=s.match(/^(?:(\d+):)?(\d{2}):(\d{2})(\.\d+)?/);return A?parseFloat(A[2])>59?i(A[2],A[3],0,A[4]):i(A[1],A[2],A[3],A[4]):null}var X=function(){function s(){this.values=Object.create(null)}var i=s.prototype;return i.set=function(o,a){!this.get(o)&&a!==""&&(this.values[o]=a)},i.get=function(o,a,r){return r?this.has(o)?this.values[o]:a[r]:this.has(o)?this.values[o]:a},i.has=function(o){return o in this.values},i.alt=function(o,a,r){for(var t=0;t<r.length;++t)if(a===r[t]){this.set(o,a);break}},i.integer=function(o,a){/^-?\d+$/.test(a)&&this.set(o,parseInt(a,10))},i.percent=function(o,a){if(/^([\d]{1,3})(\.[\d]*)?%$/.test(a)){var r=parseFloat(a);if(r>=0&&r<=100)return this.set(o,r),!0}return!1},s}();function M(s,i,A,o){var a=o?s.split(o):[s];for(var r in a){if(typeof a[r]!="string")continue;var t=a[r].split(A);if(t.length!==2)continue;var _=t[0],y=t[1];i(_,y)}}var e=new j.default(0,0,""),R=e.align==="middle"?"middle":"center";function f(s,i,A){var o=s;function a(){var _=O(s);if(_===null)throw new Error("Malformed timestamp: "+o);return s=s.replace(/^[^\sa-zA-Z-]+/,""),_}function r(_,y){var b=new X;M(_,function(d,n){var l;switch(d){case"region":for(var h=A.length-1;h>=0;h--)if(A[h].id===n){b.set(d,A[h].region);break}break;case"vertical":b.alt(d,n,["rl","lr"]);break;case"line":l=n.split(","),b.integer(d,l[0]),b.percent(d,l[0])&&b.set("snapToLines",!1),b.alt(d,l[0],["auto"]),l.length===2&&b.alt("lineAlign",l[1],["start",R,"end"]);break;case"position":l=n.split(","),b.percent(d,l[0]),l.length===2&&b.alt("positionAlign",l[1],["start",R,"end","line-left","line-right","auto"]);break;case"size":b.percent(d,n);break;case"align":b.alt(d,n,["start",R,"end","left","right"]);break}},/:/,/\s/),y.region=b.get("region",null),y.vertical=b.get("vertical","");var x=b.get("line","auto");x==="auto"&&e.line===-1&&(x=-1),y.line=x,y.lineAlign=b.get("lineAlign","start"),y.snapToLines=b.get("snapToLines",!0),y.size=b.get("size",100),y.align=b.get("align",R);var E=b.get("position","auto");E==="auto"&&e.position===50&&(E=y.align==="start"||y.align==="left"?0:y.align==="end"||y.align==="right"?100:50),y.position=E}function t(){s=s.replace(/^\s+/,"")}if(t(),i.startTime=a(),t(),s.substr(0,3)!=="-->")throw new Error("Malformed time stamp (time stamps must be separated by '-->'): "+o);s=s.substr(3),t(),i.endTime=a(),t(),r(s,i)}function v(s){return s.replace(/<br(?: \/)?>/gi,`
|
|
`)}var u=function(){function s(){this.state="INITIAL",this.buffer="",this.decoder=new N,this.regionList=[],this.cue=null,this.oncue=void 0,this.onparsingerror=void 0,this.onflush=void 0}var i=s.prototype;return i.parse=function(o){var a=this;o&&(a.buffer+=a.decoder.decode(o,{stream:!0}));function r(){var E=a.buffer,d=0;for(E=v(E);d<E.length&&E[d]!=="\r"&&E[d]!==`
|
|
`;)++d;var n=E.substr(0,d);return E[d]==="\r"&&++d,E[d]===`
|
|
`&&++d,a.buffer=E.substr(d),n}function t(E){M(E,function(d,n){},/:/)}try{var _="";if(a.state==="INITIAL"){if(!/\r\n|\n/.test(a.buffer))return this;_=r();var y=_.match(/^()?WEBVTT([ \t].*)?$/);if(!y||!y[0])throw new Error("Malformed WebVTT signature.");a.state="HEADER"}for(var b=!1;a.buffer;){if(!/\r\n|\n/.test(a.buffer))return this;b?b=!1:_=r();switch(a.state){case"HEADER":/:/.test(_)?t(_):_||(a.state="ID");continue;case"NOTE":_||(a.state="ID");continue;case"ID":if(/^NOTE($|[ \t])/.test(_)){a.state="NOTE";break}if(!_)continue;if(a.cue=new j.default(0,0,""),a.state="CUE",_.indexOf("-->")===-1){a.cue.id=_;continue}case"CUE":if(!a.cue){a.state="BADCUE";continue}try{f(_,a.cue,a.regionList)}catch(E){a.cue=null,a.state="BADCUE";continue}a.state="CUETEXT";continue;case"CUETEXT":{var x=_.indexOf("-->")!==-1;if(!_||x&&(b=!0)){a.oncue&&a.cue&&a.oncue(a.cue),a.cue=null,a.state="ID";continue}if(a.cue===null)continue;a.cue.text&&(a.cue.text+=`
|
|
`),a.cue.text+=_}continue;case"BADCUE":_||(a.state="ID")}}}catch(E){a.state==="CUETEXT"&&a.cue&&a.oncue&&a.oncue(a.cue),a.cue=null,a.state=a.state==="INITIAL"?"BADWEBVTT":"BADCUE"}return this},i.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(a){o.onparsingerror&&o.onparsingerror(a)}return o.onflush&&o.onflush(),this},s}()},"./src/utils/webvtt-parser.ts":function(oe,G,D){"use strict";D.r(G),D.d(G,"generateCueId",function(){return u}),D.d(G,"parseWebVTT",function(){return i});var j=D("./src/polyfills/number.ts"),N=D("./src/utils/vttparser.ts"),O=D("./src/demux/id3.ts"),X=D("./src/utils/timescale-conversion.ts"),M=D("./src/remux/mp4-remuxer.ts"),e=/\r\n|\n\r|\n|\r/g,R=function(o,a,r){return r===void 0&&(r=0),o.substr(r,a.length)===a},f=function(o){var a=parseInt(o.substr(-3)),r=parseInt(o.substr(-6,2)),t=parseInt(o.substr(-9,2)),_=o.length>9?parseInt(o.substr(0,o.indexOf(":"))):0;if(!Object(j.isFiniteNumber)(a)||!Object(j.isFiniteNumber)(r)||!Object(j.isFiniteNumber)(t)||!Object(j.isFiniteNumber)(_))throw Error("Malformed X-TIMESTAMP-MAP: Local:"+o);return a+=1e3*r,a+=60*1e3*t,a+=60*60*1e3*_,a},v=function(o){for(var a=5381,r=o.length;r;)a=a*33^o.charCodeAt(--r);return(a>>>0).toString()};function u(A,o,a){return v(A.toString())+v(o.toString())+v(a)}var s=function(o,a,r){var t=o[a],_=o[t.prevCC];if(!_||!_.new&&t.new){o.ccOffset=o.presentationOffset=t.start,t.new=!1;return}for(;(y=_)!==null&&y!==void 0&&y.new;){var y;o.ccOffset+=t.start-_.start,t.new=!1,t=_,_=o[t.prevCC]}o.presentationOffset=r};function i(A,o,a,r,t,_,y,b){var x=new N.VTTParser,E=Object(O.utf8ArrayToStr)(new Uint8Array(A)).trim().replace(e,`
|
|
`).split(`
|
|
`),d=[],n=Object(X.toMpegTsClockFromTimescale)(o,a),l="00:00.000",h=0,w=0,g,c=!0,L=!1;x.oncue=function(F){var B=r[t],P=r.ccOffset,W=(h-n)/9e4;if(B!=null&&B.new&&(w!==void 0?P=r.ccOffset=B.start:s(r,t,W)),W&&(P=W-r.presentationOffset),L){var U=F.endTime-F.startTime,$=Object(M.normalizePts)((F.startTime+P-w)*9e4,_*9e4)/9e4;F.startTime=$,F.endTime=$+U}var ee=F.text.trim();F.text=decodeURIComponent(encodeURIComponent(ee)),F.id||(F.id=u(F.startTime,F.endTime,ee)),F.endTime>0&&d.push(F)},x.onparsingerror=function(F){g=F},x.onflush=function(){if(g){b(g);return}y(d)},E.forEach(function(F){if(c)if(R(F,"X-TIMESTAMP-MAP=")){c=!1,L=!0,F.substr(16).split(",").forEach(function(B){R(B,"LOCAL:")?l=B.substr(6):R(B,"MPEGTS:")&&(h=parseInt(B.substr(7)))});try{w=f(l)/1e3}catch(B){L=!1,g=B}return}else F===""&&(c=!1);x.parse(F+`
|
|
`)}),x.flush()}},"./src/utils/xhr-loader.ts":function(oe,G,D){"use strict";D.r(G);var j=D("./src/utils/logger.ts"),N=D("./src/loader/load-stats.ts"),O=/^age:\s*[\d.]+\s*$/m,X=function(){function M(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 N.LoadStats,this.retryDelay=0}var e=M.prototype;return e.destroy=function(){this.callbacks=null,this.abortInternal(),this.loader=null,this.config=null},e.abortInternal=function(){var f=this.loader;self.clearTimeout(this.requestTimeout),self.clearTimeout(this.retryTimeout),f&&(f.onreadystatechange=null,f.onprogress=null,f.readyState!==4&&(this.stats.aborted=!0,f.abort()))},e.abort=function(){var f;this.abortInternal(),(f=this.callbacks)!==null&&f!==void 0&&f.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.loader)},e.load=function(f,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=f,this.config=v,this.callbacks=u,this.retryDelay=v.retryDelay,this.loadInternal()},e.loadInternal=function(){var f=this.config,v=this.context;if(!f)return;var u=this.loader=new self.XMLHttpRequest,s=this.stats;s.loading.first=0,s.loaded=0;var i=this.xhrSetup;try{if(i)try{i(u,v.url)}catch(a){u.open("GET",v.url,!0),i(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(a){this.callbacks.onError({code:u.status,text:a.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),f.timeout),u.send()},e.readystatechange=function(){var f=this.context,v=this.loader,u=this.stats;if(!f||!v)return;var s=v.readyState,i=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,a;if(f.responseType==="arraybuffer"?(o=v.response,a=o.byteLength):(o=v.responseText,a=o.length),u.loaded=u.total=a,!this.callbacks)return;var r=this.callbacks.onProgress;if(r&&r(u,f,o,v),!this.callbacks)return;var t={url:v.responseURL,data:o};this.callbacks.onSuccess(t,u,f,v)}else u.retry>=i.maxRetry||A>=400&&A<499?(j.logger.error(A+" while loading "+f.url),this.callbacks.onError({code:A,text:v.statusText},f,v)):(j.logger.warn(A+" while loading "+f.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,i.maxRetryDelay),u.retry++)}else self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),i.timeout)},e.loadtimeout=function(){j.logger.warn("timeout while loading "+this.context.url);var f=this.callbacks;f&&(this.abortInternal(),f.onTimeout(this.stats,this.context,this.loader))},e.loadprogress=function(f){var v=this.stats;v.loaded=f.loaded,f.lengthComputable&&(v.total=f.total)},e.getCacheAge=function(){var f=null;if(this.loader&&O.test(this.loader.getAllResponseHeaders())){var v=this.loader.getResponseHeader("age");f=v?parseFloat(v):null}return f},M}();G.default=X}}).default})},vHTk:function(ct,_e,K){ct.exports={wrp:"wrp___z2l1F",bgBlack:"bgBlack___3ezfX",monaco:"monaco___1ypjT",darkBlue:"darkBlue___2ViJc",close:"close___3q-z4",embed:"embed___3dQqc"}},wCXF:function(ct,_e,K){"use strict";K.d(_e,"a",function(){return je});var oe=K("rePB"),G=K("VTBJ"),D=K("KQm4"),j=K("U8pU"),N=K("ODXe"),O=K("q1tI"),X=K("TSYQ"),M=K.n(X),e=K("Gytx"),R=K.n(e),f=K("Kwbf"),v=K("t23M"),u=K("qx4F"),s=K("6eGT"),i=K("IBYe"),A=K("Ff2n"),o=K("c+Xe"),a=K("fyJ8"),r=K("biw7");function t(Te,De,Ve,$e,Ne){var Pe=Ve[Te]||{},Ce=Ve[De]||{},ce,ge;Pe.fixed==="left"?ce=$e.left[Te]:Ce.fixed==="right"&&(ge=$e.right[De]);var te=!1,ne=!1,le=!1,de=!1,Re=Ve[De+1],Me=Ve[Te-1];if(Ne==="rtl"){if(ce!==void 0){var qe=Me&&Me.fixed==="left";de=!qe}else if(ge!==void 0){var lt=Re&&Re.fixed==="right";le=!lt}}else if(ce!==void 0){var ft=Re&&Re.fixed==="left";te=!ft}else if(ge!==void 0){var At=Me&&Me.fixed==="right";ne=!At}return{fixLeft:ce,fixRight:ge,lastFixLeft:te,firstFixRight:ne,lastFixRight:le,firstFixLeft:de,isSticky:$e.isSticky}}var _=K("sR1s");function y(Te){var De=Te.cells,Ve=Te.stickyOffsets,$e=Te.flattenColumns,Ne=Te.rowComponent,Pe=Te.cellComponent,Ce=Te.onHeaderRow,ce=Te.index,ge=O.useContext(r.a),te=ge.prefixCls,ne=ge.direction,le;Ce&&(le=Ce(De.map(function(Re){return Re.column}),ce));var de=Object(_.a)(De.map(function(Re){return Re.column}));return O.createElement(Ne,Object.assign({},le),De.map(function(Re,Me){var qe=Re.column,lt=t(Re.colStart,Re.colEnd,$e,Ve,ne),ft;return qe&&qe.onHeaderCell&&(ft=Re.column.onHeaderCell(qe)),O.createElement(a.a,Object.assign({},Re,{ellipsis:qe.ellipsis,align:qe.align,component:Pe,prefixCls:te,key:de[Me]},lt,{additionalProps:ft,rowType:"header"}))}))}y.displayName="HeaderRow";var b=y;function x(Te){var De=[];function Ve(Ce,ce){var ge=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;De[ge]=De[ge]||[];var te=ce,ne=Ce.filter(Boolean).map(function(le){var de={key:le.key,className:le.className||"",children:le.title,column:le,colStart:te},Re=1,Me=le.children;return Me&&Me.length>0&&(Re=Ve(Me,te,ge+1).reduce(function(qe,lt){return qe+lt},0),de.hasSubColumns=!0),"colSpan"in le&&(Re=le.colSpan),"rowSpan"in le&&(de.rowSpan=le.rowSpan),de.colSpan=Re,de.colEnd=de.colStart+Re-1,De[ge].push(de),te+=Re,Re});return ne}Ve(Te,0);for(var $e=De.length,Ne=function(ce){De[ce].forEach(function(ge){!("rowSpan"in ge)&&!ge.hasSubColumns&&(ge.rowSpan=$e-ce)})},Pe=0;Pe<$e;Pe+=1)Ne(Pe);return De}function E(Te){var De=Te.stickyOffsets,Ve=Te.columns,$e=Te.flattenColumns,Ne=Te.onHeaderRow,Pe=O.useContext(r.a),Ce=Pe.prefixCls,ce=Pe.getComponent,ge=O.useMemo(function(){return x(Ve)},[Ve]),te=ce(["header","wrapper"],"thead"),ne=ce(["header","row"],"tr"),le=ce(["header","cell"],"th");return O.createElement(te,{className:"".concat(Ce,"-thead")},ge.map(function(de,Re){var Me=O.createElement(b,{key:Re,flattenColumns:$e,cells:de,stickyOffsets:De,rowComponent:ne,cellComponent:le,onHeaderRow:Ne,index:Re});return Me}))}var d=E,n=K("hW8S");function l(Te){for(var De=Te.colWidths,Ve=Te.columns,$e=Te.columCount,Ne=[],Pe=$e||Ve.length,Ce=!1,ce=Pe-1;ce>=0;ce-=1){var ge=De[ce],te=Ve&&Ve[ce],ne=te&&te[n.a];(ge||ne||Ce)&&(Ne.unshift(O.createElement("col",Object.assign({key:ce,style:{width:ge,minWidth:ge}},ne))),Ce=!0)}return O.createElement("colgroup",null,Ne)}var h=l;function w(Te,De){return Object(O.useMemo)(function(){for(var Ve=[],$e=0;$e<De;$e+=1){var Ne=Te[$e];if(Ne!==void 0)Ve[$e]=Ne;else return null}return Ve},[Te.join("_"),De])}var g=O.forwardRef(function(Te,De){var Ve=Te.noData,$e=Te.columns,Ne=Te.flattenColumns,Pe=Te.colWidths,Ce=Te.columCount,ce=Te.stickyOffsets,ge=Te.direction,te=Te.fixHeader,ne=Te.offsetHeader,le=Te.stickyClassName,de=Te.onScroll,Re=Object(A.a)(Te,["noData","columns","flattenColumns","colWidths","columCount","stickyOffsets","direction","fixHeader","offsetHeader","stickyClassName","onScroll"]),Me=O.useContext(r.a),qe=Me.prefixCls,lt=Me.scrollbarSize,ft=Me.isSticky,At=ft&&!te?0:lt,Bt=O.useRef(null),St=O.useCallback(function(rr){Object(o.b)(De,rr),Object(o.b)(Bt,rr)},[]);O.useEffect(function(){var rr;function kt(ut){var lr=ut.currentTarget,wt=ut.deltaX;wt&&(de({currentTarget:lr,scrollLeft:lr.scrollLeft+wt}),ut.preventDefault())}return(rr=Bt.current)===null||rr===void 0||rr.addEventListener("wheel",kt),function(){var ut;(ut=Bt.current)===null||ut===void 0||ut.removeEventListener("wheel",kt)}},[]);var it=Ne[Ne.length-1],Wt={fixed:it?it.fixed:null,onHeaderCell:function(){return{className:"".concat(qe,"-cell-scrollbar")}}},Qt=Object(O.useMemo)(function(){return At?[].concat(Object(D.a)($e),[Wt]):$e},[At,$e]),It=Object(O.useMemo)(function(){return At?[].concat(Object(D.a)(Ne),[Wt]):Ne},[At,Ne]),qt=Object(O.useMemo)(function(){var rr=ce.right,kt=ce.left;return Object(G.a)(Object(G.a)({},ce),{},{left:ge==="rtl"?[].concat(Object(D.a)(kt.map(function(ut){return ut+At})),[0]):kt,right:ge==="rtl"?rr:[].concat(Object(D.a)(rr.map(function(ut){return ut+At})),[0]),isSticky:ft})},[At,ce,ft]),Ft=w(Pe,Ce);return O.createElement("div",{style:Object(G.a)({overflow:"hidden"},ft?{top:ne}:{}),ref:St,className:M()("".concat(qe,"-header"),Object(oe.a)({},le,!!le))},O.createElement("table",{style:{tableLayout:"fixed",visibility:Ve||Ft?null:"hidden"}},O.createElement(h,{colWidths:Ft?[].concat(Object(D.a)(Ft),[At]):[],columCount:Ce+1,columns:It}),O.createElement(d,Object.assign({},Re,{stickyOffsets:qt,columns:Qt,flattenColumns:It}))))});g.displayName="FixedHeader";var c=g,L=O.createContext(null),F=L;function B(Te){var De=Te.prefixCls,Ve=Te.children,$e=Te.component,Ne=Te.cellComponent,Pe=Te.fixHeader,Ce=Te.fixColumn,ce=Te.horizonScroll,ge=Te.className,te=Te.expanded,ne=Te.componentWidth,le=Te.colSpan,de=O.useContext(r.a),Re=de.scrollbarSize;return O.useMemo(function(){var Me=Ve;return Ce&&(Me=O.createElement("div",{style:{width:ne-(Pe?Re:0),position:"sticky",left:0,overflow:"hidden"},className:"".concat(De,"-expanded-row-fixed")},Me)),O.createElement($e,{className:ge,style:{display:te?null:"none"}},O.createElement(a.a,{component:Ne,prefixCls:De,colSpan:le},Me))},[Ve,$e,Pe,ce,ge,te,ne,le,Re])}var P=B;function W(Te){var De=Te.className,Ve=Te.style,$e=Te.record,Ne=Te.index,Pe=Te.rowKey,Ce=Te.getRowKey,ce=Te.rowExpandable,ge=Te.expandedKeys,te=Te.onRow,ne=Te.indent,le=ne===void 0?0:ne,de=Te.rowComponent,Re=Te.cellComponent,Me=Te.childrenColumnName,qe=O.useContext(r.a),lt=qe.prefixCls,ft=qe.fixedInfoList,At=O.useContext(F),Bt=At.fixHeader,St=At.fixColumn,it=At.horizonScroll,Wt=At.componentWidth,Qt=At.flattenColumns,It=At.expandableType,qt=At.expandRowByClick,Ft=At.onTriggerExpand,rr=At.rowClassName,kt=At.expandedRowClassName,ut=At.indentSize,lr=At.expandIcon,wt=At.expandedRowRender,dt=At.expandIconColumnIndex,Dt=O.useState(!1),dr=Object(N.a)(Dt,2),xr=dr[0],Tr=dr[1],Pr=ge&&ge.has(Te.recordKey);O.useEffect(function(){Pr&&Tr(!0)},[Pr]);var kr=It==="row"&&(!ce||ce($e)),Gt=It==="nest",fr=Me&&$e&&$e[Me],Qr=kr||Gt,pr;te&&(pr=te($e,Ne));var Kr=function(m){if(qt&&Qr&&Ft($e,m),pr&&pr.onClick){for(var C,k=arguments.length,Z=new Array(k>1?k-1:0),Q=1;Q<k;Q++)Z[Q-1]=arguments[Q];(C=pr).onClick.apply(C,[m].concat(Z))}},Dr;typeof rr=="string"?Dr=rr:typeof rr=="function"&&(Dr=rr($e,Ne,le));var ae=Object(_.a)(Qt),se=O.createElement(de,Object.assign({},pr,{"data-row-key":Pe,className:M()(De,"".concat(lt,"-row"),"".concat(lt,"-row-level-").concat(le),Dr,pr&&pr.className),style:Object(G.a)(Object(G.a)({},Ve),pr?pr.style:null),onClick:Kr}),Qt.map(function(H,m){var C=H.render,k=H.dataIndex,Z=H.className,Q=ae[m],ye=ft[m],Qe;m===(dt||0)&&Gt&&(Qe=O.createElement(O.Fragment,null,O.createElement("span",{style:{paddingLeft:"".concat(ut*le,"px")},className:"".concat(lt,"-row-indent indent-level-").concat(le)}),lr({prefixCls:lt,expanded:Pr,expandable:fr,record:$e,onExpand:Ft})));var Be;return H.onCell&&(Be=H.onCell($e,Ne)),O.createElement(a.a,Object.assign({className:Z,ellipsis:H.ellipsis,align:H.align,component:Re,prefixCls:lt,key:Q,record:$e,index:Ne,dataIndex:k,render:C,shouldCellUpdate:H.shouldCellUpdate},ye,{appendNode:Qe,additionalProps:Be}))})),me;if(kr&&(xr||Pr)){var Se=wt($e,Ne,le+1,Pr),Ye=kt&&kt($e,Ne,le);me=O.createElement(P,{expanded:Pr,className:M()("".concat(lt,"-expanded-row"),"".concat(lt,"-expanded-row-level-").concat(le+1),Ye),prefixCls:lt,fixHeader:Bt,fixColumn:St,horizonScroll:it,component:de,componentWidth:Wt,cellComponent:Re,colSpan:Qt.length},Se)}var tt;return fr&&Pr&&(tt=($e[Me]||[]).map(function(H,m){var C=Ce(H,m);return O.createElement(W,Object.assign({},Te,{key:C,rowKey:C,record:H,recordKey:C,index:m,indent:le+1}))})),O.createElement(O.Fragment,null,se,me,tt)}W.displayName="BodyRow";var U=W,$=O.createContext(null),ee=$;function pe(Te){var De=Te.columnKey,Ve=Te.onColumnResize,$e=O.useRef();return O.useEffect(function(){$e.current&&Ve(De,$e.current.offsetWidth)},[]),O.createElement(v.a,{onResize:function(Pe){var Ce=Pe.offsetWidth;Ve(De,Ce)}},O.createElement("td",{ref:$e,style:{padding:0,border:0,height:0}},O.createElement("div",{style:{height:0,overflow:"hidden"}},"\xA0")))}function fe(Te){var De=Te.data,Ve=Te.getRowKey,$e=Te.measureColumnWidth,Ne=Te.expandedKeys,Pe=Te.onRow,Ce=Te.rowExpandable,ce=Te.emptyNode,ge=Te.childrenColumnName,te=O.useContext(ee),ne=te.onColumnResize,le=O.useContext(r.a),de=le.prefixCls,Re=le.getComponent,Me=O.useContext(F),qe=Me.fixHeader,lt=Me.horizonScroll,ft=Me.flattenColumns,At=Me.componentWidth;return O.useMemo(function(){var Bt=Re(["body","wrapper"],"tbody"),St=Re(["body","row"],"tr"),it=Re(["body","cell"],"td"),Wt;De.length?Wt=De.map(function(It,qt){var Ft=Ve(It,qt);return O.createElement(U,{key:Ft,rowKey:Ft,record:It,recordKey:Ft,index:qt,rowComponent:St,cellComponent:it,expandedKeys:Ne,onRow:Pe,getRowKey:Ve,rowExpandable:Ce,childrenColumnName:ge})}):Wt=O.createElement(P,{expanded:!0,className:"".concat(de,"-placeholder"),prefixCls:de,fixHeader:qe,fixColumn:lt,horizonScroll:lt,component:St,componentWidth:At,cellComponent:it,colSpan:ft.length},ce);var Qt=Object(_.a)(ft);return O.createElement(Bt,{className:"".concat(de,"-tbody")},$e&&O.createElement("tr",{"aria-hidden":"true",className:"".concat(de,"-measure-row"),style:{height:0}},Qt.map(function(It){return O.createElement(pe,{key:It,columnKey:It,onColumnResize:ne})})),Wt)},[De,de,Pe,$e,Ne,Ve,Re,At,ce,ft])}var Le=O.memo(fe);Le.displayName="Body";var Ie=Le,xe=K("wRmb"),Ue=K("xEkU"),Fe=K.n(Ue);function we(Te){var De=Object(O.useRef)(Te),Ve=Object(O.useState)({}),$e=Object(N.a)(Ve,2),Ne=$e[1],Pe=Object(O.useRef)(null),Ce=Object(O.useRef)([]);function ce(ge){Pe.current===null&&(Ce.current=[],Pe.current=Fe()(function(){Ce.current.forEach(function(te){De.current=te(De.current)}),Pe.current=null,Ne({})})),Ce.current.push(ge)}return Object(O.useEffect)(function(){return function(){Fe.a.cancel(Pe.current)}},[]),[De.current,ce]}function ve(Te){var De=Object(O.useRef)(Te),Ve=Object(O.useRef)(null);function $e(){window.clearTimeout(Ve.current)}function Ne(Ce){De.current=Ce,$e(),Ve.current=window.setTimeout(function(){De.current=null,Ve.current=null},100)}function Pe(){return De.current}return Object(O.useEffect)(function(){return $e},[]),[Ne,Pe]}function ze(Te,De,Ve){var $e=Object(O.useMemo)(function(){for(var Ne=[],Pe=[],Ce=0,ce=0,ge=0;ge<De;ge+=1)if(Ve==="rtl"){Pe[ge]=ce,ce+=Te[ge]||0;var te=De-ge-1;Ne[te]=Ce,Ce+=Te[te]||0}else{Ne[ge]=Ce,Ce+=Te[ge]||0;var ne=De-ge-1;Pe[ne]=ce,ce+=Te[ne]||0}return{left:Ne,right:Pe}},[Te,De,Ve]);return $e}var at=ze;function nt(Te){var De=Te.className,Ve=Te.children;return O.createElement("div",{className:De},Ve)}var et=nt,Ke=K("n6Qo");function re(Te){var De,Ve=Te.prefixCls,$e=Te.record,Ne=Te.onExpand,Pe=Te.expanded,Ce=Te.expandable,ce="".concat(Ve,"-row-expand-icon");if(!Ce)return O.createElement("span",{className:M()(ce,"".concat(Ve,"-row-spaced"))});var ge=function(ne){Ne($e,ne),ne.stopPropagation()};return O.createElement("span",{className:M()(ce,(De={},Object(oe.a)(De,"".concat(Ve,"-row-expanded"),Pe),Object(oe.a)(De,"".concat(Ve,"-row-collapsed"),!Pe),De)),onClick:ge})}function z(Te,De,Ve){var $e=[];function Ne(Pe){(Pe||[]).forEach(function(Ce,ce){$e.push(De(Ce,ce)),Ne(Ce[Ve])})}return Ne(Te),$e}var Y=K("zT1h"),J=K("y0+3"),ie=function(De,Ve){var $e,Ne,Pe=De.scrollBodyRef,Ce=De.onScroll,ce=De.offsetScroll,ge=O.useContext(r.a),te=ge.prefixCls,ne=(($e=Pe.current)===null||$e===void 0?void 0:$e.scrollWidth)||0,le=((Ne=Pe.current)===null||Ne===void 0?void 0:Ne.clientWidth)||0,de=ne&&le*(le/ne),Re=O.useRef(),Me=we({scrollLeft:0,isHiddenScrollBar:!1}),qe=Object(N.a)(Me,2),lt=qe[0],ft=qe[1],At=O.useRef({delta:0,x:0}),Bt=O.useState(!1),St=Object(N.a)(Bt,2),it=St[0],Wt=St[1],Qt=function(){Wt(!1)},It=function(ut){ut.persist(),At.current.delta=ut.pageX-lt.scrollLeft,At.current.x=0,Wt(!0),ut.preventDefault()},qt=function(ut){var lr,wt=ut||((lr=window)===null||lr===void 0?void 0:lr.event),dt=wt.buttons;if(!it||dt===0){it&&Wt(!1);return}var Dt=At.current.x+ut.pageX-At.current.x-At.current.delta;Dt<=0&&(Dt=0),Dt+de>=le&&(Dt=le-de),Ce({scrollLeft:Dt/le*(ne+2)}),At.current.x=ut.pageX},Ft=function(){var ut=Object(J.b)(Pe.current).top,lr=ut+Pe.current.offsetHeight,wt=document.documentElement.scrollTop+window.innerHeight;lr-Object(u.a)()<=wt||ut>=wt-ce?ft(function(dt){return Object(G.a)(Object(G.a)({},dt),{},{isHiddenScrollBar:!0})}):ft(function(dt){return Object(G.a)(Object(G.a)({},dt),{},{isHiddenScrollBar:!1})})},rr=function(ut){ft(function(lr){return Object(G.a)(Object(G.a)({},lr),{},{scrollLeft:ut/ne*le||0})})};return O.useImperativeHandle(Ve,function(){return{setScrollLeft:rr}}),O.useEffect(function(){var kt=Object(Y.a)(document.body,"mouseup",Qt,!1),ut=Object(Y.a)(document.body,"mousemove",qt,!1);return Ft(),function(){kt.remove(),ut.remove()}},[de,it]),O.useEffect(function(){var kt=Object(Y.a)(window,"scroll",Ft,!1),ut=Object(Y.a)(window,"resize",Ft,!1);return function(){kt.remove(),ut.remove()}},[]),O.useEffect(function(){lt.isHiddenScrollBar||ft(function(kt){var ut,lr;return Object(G.a)(Object(G.a)({},kt),{},{scrollLeft:Pe.current.scrollLeft/((ut=Pe.current)===null||ut===void 0?void 0:ut.scrollWidth)*((lr=Pe.current)===null||lr===void 0?void 0:lr.clientWidth)})})},[lt.isHiddenScrollBar]),ne<=le||!de||lt.isHiddenScrollBar?null:O.createElement("div",{style:{height:Object(u.a)(),width:le,bottom:ce},className:"".concat(te,"-sticky-scroll")},O.createElement("div",{onMouseDown:It,ref:Re,className:M()("".concat(te,"-sticky-scroll-bar"),Object(oe.a)({},"".concat(te,"-sticky-scroll-bar-active"),it)),style:{width:"".concat(de,"px"),transform:"translate3d(".concat(lt.scrollLeft,"px, 0, 0)")}}))},ue=O.forwardRef(ie);function he(Te,De){return O.useMemo(function(){var Ve=!!Te;return{isSticky:Ve,stickyClassName:Ve?"".concat(De,"-sticky-header"):"",offsetHeader:Object(j.a)(Te)==="object"&&Te.offsetHeader||0,offsetScroll:Object(j.a)(Te)==="object"&&Te.offsetScroll||0}},[Te,De])}var He=[],We={},je="rc-table-internal-hook",Ge=O.memo(function(Te){var De=Te.children;return De},function(Te,De){return R()(Te.props,De.props)?Te.pingLeft!==De.pingLeft||Te.pingRight!==De.pingRight:!1});function rt(Te){var De,Ve=Te.prefixCls,$e=Te.className,Ne=Te.rowClassName,Pe=Te.style,Ce=Te.data,ce=Te.rowKey,ge=Te.scroll,te=Te.tableLayout,ne=Te.direction,le=Te.title,de=Te.footer,Re=Te.summary,Me=Te.id,qe=Te.showHeader,lt=Te.components,ft=Te.emptyText,At=Te.onRow,Bt=Te.onHeaderRow,St=Te.internalHooks,it=Te.transformColumns,Wt=Te.internalRefs,Qt=Te.sticky,It=Ce||He,qt=!!It.length,Ft=O.useState(0),rr=Object(N.a)(Ft,2),kt=rr[0],ut=rr[1];O.useEffect(function(){ut(Object(u.a)())});var lr=O.useMemo(function(){return Object(_.c)(lt,{})},[lt]),wt=O.useCallback(function(jt,zt){return Object(_.b)(lr,jt)||zt},[lr]),dt=O.useMemo(function(){return typeof ce=="function"?ce:function(jt){var zt=jt&&jt[ce];return zt}},[ce]),Dt=Object(n.c)(Te),dr=Dt.expandIcon,xr=Dt.expandedRowKeys,Tr=Dt.defaultExpandedRowKeys,Pr=Dt.defaultExpandAllRows,kr=Dt.expandedRowRender,Gt=Dt.onExpand,fr=Dt.onExpandedRowsChange,Qr=Dt.expandRowByClick,pr=Dt.rowExpandable,Kr=Dt.expandIconColumnIndex,Dr=Dt.expandedRowClassName,ae=Dt.childrenColumnName,se=Dt.indentSize,me=dr||re,Se=ae||"children",Ye=O.useMemo(function(){return kr?"row":Te.expandable&&St===je&&Te.expandable.__PARENT_RENDER_ICON__||It.some(function(jt){return jt&&Object(j.a)(jt)==="object"&&jt[Se]})?"nest":!1},[!!kr,It]),tt=O.useState(function(){return Tr||(Pr?z(It,dt,Se):[])}),H=Object(N.a)(tt,2),m=H[0],C=H[1],k=O.useMemo(function(){return new Set(xr||m||[])},[xr,m]),Z=O.useCallback(function(jt){var zt=dt(jt,It.indexOf(jt)),Nr,en=k.has(zt);en?(k.delete(zt),Nr=Object(D.a)(k)):Nr=[].concat(Object(D.a)(k),[zt]),C(Nr),Gt&&Gt(!en,jt),fr&&fr(Nr)},[dt,k,It,Gt,fr]),Q=O.useState(0),ye=Object(N.a)(Q,2),Qe=ye[0],Be=ye[1],ot=Object(xe.b)(Object(G.a)(Object(G.a)(Object(G.a)({},Te),Dt),{},{expandable:!!kr,expandedKeys:k,getRowKey:dt,onTriggerExpand:Z,expandIcon:me,expandIconColumnIndex:Kr,direction:ne}),St===je?it:null),Xe=Object(N.a)(ot,2),mt=Xe[0],pt=Xe[1],Et=O.useMemo(function(){return{columns:mt,flattenColumns:pt}},[mt,pt]),Rt=O.useRef(),ir=O.useRef(),Nt=O.useRef(),er=O.useState(!1),Ot=Object(N.a)(er,2),mr=Ot[0],Kt=Ot[1],_r=O.useState(!1),gr=Object(N.a)(_r,2),Sr=gr[0],Ir=gr[1],vr=we(new Map),yr=Object(N.a)(vr,2),Er=yr[0],Rr=yr[1],Br=Object(_.a)(pt),Ur=Br.map(function(jt){return Er.get(jt)}),Fr=O.useMemo(function(){return Ur},[Ur.join("_")]),or=at(Fr,pt.length,ne),Xt=ge&&Object(_.d)(ge.y),Ut=ge&&Object(_.d)(ge.x),tr=Ut&&pt.some(function(jt){var zt=jt.fixed;return zt}),Yt=O.useRef(),wr=he(Qt,Ve),ar=wr.isSticky,gn=wr.offsetHeader,Mt=wr.offsetScroll,Ht=wr.stickyClassName,Lt,nr,xt;Xt&&(nr={overflowY:"scroll",maxHeight:ge.y}),Ut&&(Lt={overflowX:"auto"},Xt||(nr={overflowY:"hidden"}),xt={width:ge.x===!0?"auto":ge.x,minWidth:"100%"});var Jt=O.useCallback(function(jt,zt){Rr(function(Nr){var en=new Map(Nr);return en.set(jt,zt),en})},[]),Vt=ve(null),nn=Object(N.a)(Vt,2),an=nn[0],vn=nn[1];function zr(jt,zt){if(!zt)return;typeof zt=="function"?zt(jt):zt.scrollLeft!==jt&&(zt.scrollLeft=jt)}var $r=function(zt){var Nr=zt.currentTarget,en=zt.scrollLeft,Fn=typeof en=="number"?en:Nr.scrollLeft,Cn=Nr||We;if(!vn()||vn()===Cn){var li;an(Cn),zr(Fn,ir.current),zr(Fn,Nt.current),zr(Fn,(li=Yt.current)===null||li===void 0?void 0:li.setScrollLeft)}if(Nr){var Vi=Nr.scrollWidth,zi=Nr.clientWidth;Kt(Fn>0),Ir(Fn<Vi-zi)}},sn=function(){Nt.current&&$r({currentTarget:Nt.current})},Xr=function(zt){var Nr=zt.width;sn(),Be(Rt.current?Rt.current.offsetWidth:Nr)};O.useEffect(function(){return sn},[]),O.useEffect(function(){Ut&&sn()},[Ut]),O.useEffect(function(){St===je&&Wt&&(Wt.body.current=Nt.current)});var In=wt(["table"],"table"),Lr=O.useMemo(function(){return te||(tr?ge.x==="max-content"?"auto":"fixed":Xt||pt.some(function(jt){var zt=jt.ellipsis;return zt})?"fixed":"auto")},[Xt,tr,pt,te]),un,Zr={colWidths:Fr,columCount:pt.length,stickyOffsets:or,onHeaderRow:Bt,fixHeader:Xt},bn=O.useMemo(function(){return qt?null:typeof ft=="function"?ft():ft},[qt,ft]),_n=O.createElement(Ie,{data:It,measureColumnWidth:Xt||Ut||ar,expandedKeys:k,rowExpandable:pr,getRowKey:dt,onRow:At,emptyNode:bn,childrenColumnName:Se}),qr=O.createElement(h,{colWidths:pt.map(function(jt){var zt=jt.width;return zt}),columns:pt}),tn=Re&&O.createElement(Ke.b,null,Re(It)),on=wt(["body"]);if(Xt||ar){var hn;typeof on=="function"?(hn=on(It,{scrollbarSize:kt,ref:Nt,onScroll:$r}),Zr.colWidths=pt.map(function(jt,zt){var Nr=jt.width,en=zt===mt.length-1?Nr-kt:Nr;return typeof en=="number"&&!Number.isNaN(en)?en:(Object(f.a)(!1,"When use `components.body` with render props. Each column should have a fixed value."),0)})):hn=O.createElement("div",{style:Object(G.a)(Object(G.a)({},Lt),nr),onScroll:$r,ref:Nt,className:M()("".concat(Ve,"-body"))},O.createElement(In,{style:Object(G.a)(Object(G.a)({},xt),{},{tableLayout:Lr})},qr,_n,tn),ar&&O.createElement(ue,{ref:Yt,offsetScroll:Mt,scrollBodyRef:Nt,onScroll:$r})),un=O.createElement(O.Fragment,null,qe!==!1&&O.createElement(c,Object.assign({noData:!It.length},Zr,Et,{direction:ne,offsetHeader:gn,stickyClassName:Ht,ref:ir,onScroll:$r})),hn)}else un=O.createElement("div",{style:Object(G.a)(Object(G.a)({},Lt),nr),className:M()("".concat(Ve,"-content")),onScroll:$r,ref:Nt},O.createElement(In,{style:Object(G.a)(Object(G.a)({},xt),{},{tableLayout:Lr})},qr,qe!==!1&&O.createElement(d,Object.assign({},Zr,Et)),_n,tn));var yn=Object(n.b)(Te),jr=O.createElement("div",Object.assign({className:M()(Ve,$e,(De={},Object(oe.a)(De,"".concat(Ve,"-rtl"),ne==="rtl"),Object(oe.a)(De,"".concat(Ve,"-ping-left"),mr),Object(oe.a)(De,"".concat(Ve,"-ping-right"),Sr),Object(oe.a)(De,"".concat(Ve,"-layout-fixed"),te==="fixed"),Object(oe.a)(De,"".concat(Ve,"-fixed-header"),Xt),Object(oe.a)(De,"".concat(Ve,"-fixed-column"),tr),Object(oe.a)(De,"".concat(Ve,"-scroll-horizontal"),Ut),Object(oe.a)(De,"".concat(Ve,"-has-fix-left"),pt[0]&&pt[0].fixed),Object(oe.a)(De,"".concat(Ve,"-has-fix-right"),pt[pt.length-1]&&pt[pt.length-1].fixed==="right"),De)),style:Pe,id:Me,ref:Rt},yn),O.createElement(Ge,{pingLeft:mr,pingRight:Sr,props:Object(G.a)(Object(G.a)({},Te),{},{stickyOffsets:or,mergedExpandedKeys:k})},le&&O.createElement(et,{className:"".concat(Ve,"-title")},le(It)),O.createElement("div",{className:"".concat(Ve,"-container")},un),de&&O.createElement(et,{className:"".concat(Ve,"-footer")},de(It))));Ut&&(jr=O.createElement(v.a,{onResize:Xr},jr));var An=O.useMemo(function(){return{prefixCls:Ve,getComponent:wt,scrollbarSize:kt,direction:ne,fixedInfoList:pt.map(function(jt,zt){return t(zt,zt,pt,or,ne)}),isSticky:ar}},[Ve,wt,kt,ne,pt,or,ne,ar]),wn=O.useMemo(function(){return Object(G.a)(Object(G.a)({},Et),{},{tableLayout:Lr,rowClassName:Ne,expandedRowClassName:Dr,componentWidth:Qe,fixHeader:Xt,fixColumn:tr,horizonScroll:Ut,expandIcon:me,expandableType:Ye,expandRowByClick:Qr,expandedRowRender:kr,onTriggerExpand:Z,expandIconColumnIndex:Kr,indentSize:se})},[Et,Lr,Ne,Dr,Qe,Xt,tr,Ut,me,Ye,Qr,kr,Z,Kr,se]),Rn=O.useMemo(function(){return{onColumnResize:Jt}},[Jt]);return O.createElement(r.a.Provider,{value:An},O.createElement(F.Provider,{value:wn},O.createElement(ee.Provider,{value:Rn},jr)))}rt.Column=i.a,rt.ColumnGroup=s.a,rt.Summary=Ke.a,rt.defaultProps={rowKey:"key",prefixCls:"rc-table",emptyText:function(){return"No Data"}};var st=_e.b=rt},wOnQ:function(ct,_e,K){/*!
|
|
* html2canvas 1.4.1 <https://html2canvas.hertzen.com>
|
|
* Copyright (c) 2022 Niklas von Hertzen <https://hertzen.com>
|
|
* Released under MIT License
|
|
*/(function(oe,G){ct.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 oe=function(T,p){return oe=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(I,S){I.__proto__=S}||function(I,S){for(var V in S)Object.prototype.hasOwnProperty.call(S,V)&&(I[V]=S[V])},oe(T,p)};function G(T,p){if(typeof p!="function"&&p!==null)throw new TypeError("Class extends value "+String(p)+" is not a constructor or null");oe(T,p);function I(){this.constructor=T}T.prototype=p===null?Object.create(p):(I.prototype=p.prototype,new I)}var D=function(){return D=Object.assign||function(p){for(var I,S=1,V=arguments.length;S<V;S++){I=arguments[S];for(var q in I)Object.prototype.hasOwnProperty.call(I,q)&&(p[q]=I[q])}return p},D.apply(this,arguments)};function j(T,p,I,S){function V(q){return q instanceof I?q:new I(function(Ae){Ae(q)})}return new(I||(I=Promise))(function(q,Ae){function be(ke){try{Oe(S.next(ke))}catch(Je){Ae(Je)}}function Ee(ke){try{Oe(S.throw(ke))}catch(Je){Ae(Je)}}function Oe(ke){ke.done?q(ke.value):V(ke.value).then(be,Ee)}Oe((S=S.apply(T,p||[])).next())})}function N(T,p){var I={label:0,sent:function(){if(q[0]&1)throw q[1];return q[1]},trys:[],ops:[]},S,V,q,Ae;return Ae={next:be(0),throw:be(1),return:be(2)},typeof Symbol=="function"&&(Ae[Symbol.iterator]=function(){return this}),Ae;function be(Oe){return function(ke){return Ee([Oe,ke])}}function Ee(Oe){if(S)throw new TypeError("Generator is already executing.");for(;I;)try{if(S=1,V&&(q=Oe[0]&2?V.return:Oe[0]?V.throw||((q=V.return)&&q.call(V),0):V.next)&&!(q=q.call(V,Oe[1])).done)return q;(V=0,q)&&(Oe=[Oe[0]&2,q.value]);switch(Oe[0]){case 0:case 1:q=Oe;break;case 4:return I.label++,{value:Oe[1],done:!1};case 5:I.label++,V=Oe[1],Oe=[0];continue;case 7:Oe=I.ops.pop(),I.trys.pop();continue;default:if(!(q=I.trys,q=q.length>0&&q[q.length-1])&&(Oe[0]===6||Oe[0]===2)){I=0;continue}if(Oe[0]===3&&(!q||Oe[1]>q[0]&&Oe[1]<q[3])){I.label=Oe[1];break}if(Oe[0]===6&&I.label<q[1]){I.label=q[1],q=Oe;break}if(q&&I.label<q[2]){I.label=q[2],I.ops.push(Oe);break}q[2]&&I.ops.pop(),I.trys.pop();continue}Oe=p.call(T,I)}catch(ke){Oe=[6,ke],V=0}finally{S=q=0}if(Oe[0]&5)throw Oe[1];return{value:Oe[0]?Oe[1]:void 0,done:!0}}}function O(T,p,I){if(I||arguments.length===2)for(var S=0,V=p.length,q;S<V;S++)(q||!(S in p))&&(q||(q=Array.prototype.slice.call(p,0,S)),q[S]=p[S]);return T.concat(q||p)}for(var X=function(){function T(p,I,S,V){this.left=p,this.top=I,this.width=S,this.height=V}return T.prototype.add=function(p,I,S,V){return new T(this.left+p,this.top+I,this.width+S,this.height+V)},T.fromClientRect=function(p,I){return new T(I.left+p.windowBounds.left,I.top+p.windowBounds.top,I.width,I.height)},T.fromDOMRectList=function(p,I){var S=Array.from(I).find(function(V){return V.width!==0});return S?new T(S.left+p.windowBounds.left,S.top+p.windowBounds.top,S.width,S.height):T.EMPTY},T.EMPTY=new T(0,0,0,0),T}(),M=function(T,p){return X.fromClientRect(T,p.getBoundingClientRect())},e=function(T){var p=T.body,I=T.documentElement;if(!p||!I)throw new Error("Unable to get document size");var S=Math.max(Math.max(p.scrollWidth,I.scrollWidth),Math.max(p.offsetWidth,I.offsetWidth),Math.max(p.clientWidth,I.clientWidth)),V=Math.max(Math.max(p.scrollHeight,I.scrollHeight),Math.max(p.offsetHeight,I.offsetHeight),Math.max(p.clientHeight,I.clientHeight));return new X(0,0,S,V)},R=function(T){for(var p=[],I=0,S=T.length;I<S;){var V=T.charCodeAt(I++);if(V>=55296&&V<=56319&&I<S){var q=T.charCodeAt(I++);(q&64512)===56320?p.push(((V&1023)<<10)+(q&1023)+65536):(p.push(V),I--)}else p.push(V)}return p},f=function(){for(var T=[],p=0;p<arguments.length;p++)T[p]=arguments[p];if(String.fromCodePoint)return String.fromCodePoint.apply(String,T);var I=T.length;if(!I)return"";for(var S=[],V=-1,q="";++V<I;){var Ae=T[V];Ae<=65535?S.push(Ae):(Ae-=65536,S.push((Ae>>10)+55296,Ae%1024+56320)),(V+1===I||S.length>16384)&&(q+=String.fromCharCode.apply(String,S),S.length=0)}return q},v="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",u=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),s=0;s<v.length;s++)u[v.charCodeAt(s)]=s;for(var i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",A=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),o=0;o<i.length;o++)A[i.charCodeAt(o)]=o;for(var a=function(T){var p=T.length*.75,I=T.length,S,V=0,q,Ae,be,Ee;T[T.length-1]==="="&&(p--,T[T.length-2]==="="&&p--);var Oe=typeof ArrayBuffer!="undefined"&&typeof Uint8Array!="undefined"&&typeof Uint8Array.prototype.slice!="undefined"?new ArrayBuffer(p):new Array(p),ke=Array.isArray(Oe)?Oe:new Uint8Array(Oe);for(S=0;S<I;S+=4)q=A[T.charCodeAt(S)],Ae=A[T.charCodeAt(S+1)],be=A[T.charCodeAt(S+2)],Ee=A[T.charCodeAt(S+3)],ke[V++]=q<<2|Ae>>4,ke[V++]=(Ae&15)<<4|be>>2,ke[V++]=(be&3)<<6|Ee&63;return Oe},r=function(T){for(var p=T.length,I=[],S=0;S<p;S+=2)I.push(T[S+1]<<8|T[S]);return I},t=function(T){for(var p=T.length,I=[],S=0;S<p;S+=4)I.push(T[S+3]<<24|T[S+2]<<16|T[S+1]<<8|T[S]);return I},_=5,y=6+5,b=2,x=y-_,E=65536>>_,d=1<<_,n=d-1,l=1024>>_,h=E+l,w=h,g=2048>>6,c=w+g,L=65536>>y,F=1<<x,B=F-1,P=function(T,p,I){return T.slice?T.slice(p,I):new Uint16Array(Array.prototype.slice.call(T,p,I))},W=function(T,p,I){return T.slice?T.slice(p,I):new Uint32Array(Array.prototype.slice.call(T,p,I))},U=function(T,p){var I=a(T),S=Array.isArray(I)?t(I):new Uint32Array(I),V=Array.isArray(I)?r(I):new Uint16Array(I),q=24,Ae=P(V,q/2,S[4]/2),be=S[5]===2?P(V,(q+S[4])/2):W(S,Math.ceil((q+S[4])/4));return new $(S[0],S[1],S[2],S[3],Ae,be)},$=function(){function T(p,I,S,V,q,Ae){this.initialValue=p,this.errorValue=I,this.highStart=S,this.highValueIndex=V,this.index=q,this.data=Ae}return T.prototype.get=function(p){var I;if(p>=0){if(p<55296||p>56319&&p<=65535)return I=this.index[p>>_],I=(I<<b)+(p&n),this.data[I];if(p<=65535)return I=this.index[E+(p-55296>>_)],I=(I<<b)+(p&n),this.data[I];if(p<this.highStart)return I=c-L+(p>>y),I=this.index[I],I+=p>>_&B,I=this.index[I],I=(I<<b)+(p&n),this.data[I];if(p<=1114111)return this.data[this.highValueIndex]}return this.errorValue},T}(),ee="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",pe=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),fe=0;fe<ee.length;fe++)pe[ee.charCodeAt(fe)]=fe;var Le="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==",Ie=50,xe=1,Ue=2,Fe=3,we=4,ve=5,ze=7,at=8,nt=9,et=10,Ke=11,re=12,z=13,Y=14,J=15,ie=16,ue=17,he=18,He=19,We=20,je=21,Ge=22,rt=23,st=24,Te=25,De=26,Ve=27,$e=28,Ne=29,Pe=30,Ce=31,ce=32,ge=33,te=34,ne=35,le=36,de=37,Re=38,Me=39,qe=40,lt=41,ft=42,At=43,Bt=[9001,65288],St="!",it="\xD7",Wt="\xF7",Qt=U(Le),It=[Pe,le],qt=[xe,Ue,Fe,ve],Ft=[et,at],rr=[Ve,De],kt=qt.concat(Ft),ut=[Re,Me,qe,te,ne],lr=[J,z],wt=function(T,p){p===void 0&&(p="strict");var I=[],S=[],V=[];return T.forEach(function(q,Ae){var be=Qt.get(q);if(be>Ie?(V.push(!0),be-=Ie):V.push(!1),["normal","auto","loose"].indexOf(p)!==-1&&[8208,8211,12316,12448].indexOf(q)!==-1)return S.push(Ae),I.push(ie);if(be===we||be===Ke){if(Ae===0)return S.push(Ae),I.push(Pe);var Ee=I[Ae-1];return kt.indexOf(Ee)===-1?(S.push(S[Ae-1]),I.push(Ee)):(S.push(Ae),I.push(Pe))}if(S.push(Ae),be===Ce)return I.push(p==="strict"?je:de);if(be===ft)return I.push(Pe);if(be===Ne)return I.push(Pe);if(be===At)return q>=131072&&q<=196605||q>=196608&&q<=262141?I.push(de):I.push(Pe);I.push(be)}),[S,I,V]},dt=function(T,p,I,S){var V=S[I];if(Array.isArray(T)?T.indexOf(V)!==-1:T===V)for(var q=I;q<=S.length;){q++;var Ae=S[q];if(Ae===p)return!0;if(Ae!==et)break}if(V===et)for(var q=I;q>0;){q--;var be=S[q];if(Array.isArray(T)?T.indexOf(be)!==-1:T===be)for(var Ee=I;Ee<=S.length;){Ee++;var Ae=S[Ee];if(Ae===p)return!0;if(Ae!==et)break}if(be!==et)break}return!1},Dt=function(T,p){for(var I=T;I>=0;){var S=p[I];if(S===et)I--;else return S}return 0},dr=function(T,p,I,S,V){if(I[S]===0)return it;var q=S-1;if(Array.isArray(V)&&V[q]===!0)return it;var Ae=q-1,be=q+1,Ee=p[q],Oe=Ae>=0?p[Ae]:0,ke=p[be];if(Ee===Ue&&ke===Fe)return it;if(qt.indexOf(Ee)!==-1)return St;if(qt.indexOf(ke)!==-1)return it;if(Ft.indexOf(ke)!==-1)return it;if(Dt(q,p)===at)return Wt;if(Qt.get(T[q])===Ke)return it;if((Ee===ce||Ee===ge)&&Qt.get(T[be])===Ke)return it;if(Ee===ze||ke===ze)return it;if(Ee===nt)return it;if([et,z,J].indexOf(Ee)===-1&&ke===nt)return it;if([ue,he,He,st,$e].indexOf(ke)!==-1)return it;if(Dt(q,p)===Ge)return it;if(dt(rt,Ge,q,p))return it;if(dt([ue,he],je,q,p))return it;if(dt(re,re,q,p))return it;if(Ee===et)return Wt;if(Ee===rt||ke===rt)return it;if(ke===ie||Ee===ie)return Wt;if([z,J,je].indexOf(ke)!==-1||Ee===Y)return it;if(Oe===le&&lr.indexOf(Ee)!==-1)return it;if(Ee===$e&&ke===le)return it;if(ke===We)return it;if(It.indexOf(ke)!==-1&&Ee===Te||It.indexOf(Ee)!==-1&&ke===Te)return it;if(Ee===Ve&&[de,ce,ge].indexOf(ke)!==-1||[de,ce,ge].indexOf(Ee)!==-1&&ke===De)return it;if(It.indexOf(Ee)!==-1&&rr.indexOf(ke)!==-1||rr.indexOf(Ee)!==-1&&It.indexOf(ke)!==-1)return it;if([Ve,De].indexOf(Ee)!==-1&&(ke===Te||[Ge,J].indexOf(ke)!==-1&&p[be+1]===Te)||[Ge,J].indexOf(Ee)!==-1&&ke===Te||Ee===Te&&[Te,$e,st].indexOf(ke)!==-1)return it;if([Te,$e,st,ue,he].indexOf(ke)!==-1)for(var Je=q;Je>=0;){var Ze=p[Je];if(Ze===Te)return it;if([$e,st].indexOf(Ze)!==-1)Je--;else break}if([Ve,De].indexOf(ke)!==-1)for(var Je=[ue,he].indexOf(Ee)!==-1?Ae:q;Je>=0;){var Ze=p[Je];if(Ze===Te)return it;if([$e,st].indexOf(Ze)!==-1)Je--;else break}if(Re===Ee&&[Re,Me,te,ne].indexOf(ke)!==-1||[Me,te].indexOf(Ee)!==-1&&[Me,qe].indexOf(ke)!==-1||[qe,ne].indexOf(Ee)!==-1&&ke===qe)return it;if(ut.indexOf(Ee)!==-1&&[We,De].indexOf(ke)!==-1||ut.indexOf(ke)!==-1&&Ee===Ve)return it;if(It.indexOf(Ee)!==-1&&It.indexOf(ke)!==-1)return it;if(Ee===st&&It.indexOf(ke)!==-1)return it;if(It.concat(Te).indexOf(Ee)!==-1&&ke===Ge&&Bt.indexOf(T[be])===-1||It.concat(Te).indexOf(ke)!==-1&&Ee===he)return it;if(Ee===lt&&ke===lt){for(var bt=I[q],ht=1;bt>0&&(bt--,p[bt]===lt);)ht++;if(ht%2!==0)return it}return Ee===ce&&ke===ge?it:Wt},xr=function(T,p){p||(p={lineBreak:"normal",wordBreak:"normal"});var I=wt(T,p.lineBreak),S=I[0],V=I[1],q=I[2];(p.wordBreak==="break-all"||p.wordBreak==="break-word")&&(V=V.map(function(be){return[Te,Pe,ft].indexOf(be)!==-1?de:be}));var Ae=p.wordBreak==="keep-all"?q.map(function(be,Ee){return be&&T[Ee]>=19968&&T[Ee]<=40959}):void 0;return[S,V,Ae]},Tr=function(){function T(p,I,S,V){this.codePoints=p,this.required=I===St,this.start=S,this.end=V}return T.prototype.slice=function(){return f.apply(void 0,this.codePoints.slice(this.start,this.end))},T}(),Pr=function(T,p){var I=R(T),S=xr(I,p),V=S[0],q=S[1],Ae=S[2],be=I.length,Ee=0,Oe=0;return{next:function(){if(Oe>=be)return{done:!0,value:null};for(var ke=it;Oe<be&&(ke=dr(I,q,V,++Oe,Ae))===it;);if(ke!==it||Oe===be){var Je=new Tr(I,ke,Ee,Oe);return Ee=Oe,{value:Je,done:!1}}return{done:!0,value:null}}}},kr=1<<0,Gt=1<<1,fr=1<<2,Qr=1<<3,pr=10,Kr=47,Dr=92,ae=9,se=32,me=34,Se=61,Ye=35,tt=36,H=37,m=39,C=40,k=41,Z=95,Q=45,ye=33,Qe=60,Be=62,ot=64,Xe=91,mt=93,pt=61,Et=123,Rt=63,ir=125,Nt=124,er=126,Ot=128,mr=65533,Kt=42,_r=43,gr=44,Sr=58,Ir=59,vr=46,yr=0,Er=8,Rr=11,Br=14,Ur=31,Fr=127,or=-1,Xt=48,Ut=97,tr=101,Yt=102,wr=117,ar=122,gn=65,Mt=69,Ht=70,Lt=85,nr=90,xt=function(T){return T>=Xt&&T<=57},Jt=function(T){return T>=55296&&T<=57343},Vt=function(T){return xt(T)||T>=gn&&T<=Ht||T>=Ut&&T<=Yt},nn=function(T){return T>=Ut&&T<=ar},an=function(T){return T>=gn&&T<=nr},vn=function(T){return nn(T)||an(T)},zr=function(T){return T>=Ot},$r=function(T){return T===pr||T===ae||T===se},sn=function(T){return vn(T)||zr(T)||T===Z},Xr=function(T){return sn(T)||xt(T)||T===Q},In=function(T){return T>=yr&&T<=Er||T===Rr||T>=Br&&T<=Ur||T===Fr},Lr=function(T,p){return T!==Dr?!1:p!==pr},un=function(T,p,I){return T===Q?sn(p)||Lr(p,I):sn(T)?!0:!!(T===Dr&&Lr(T,p))},Zr=function(T,p,I){return T===_r||T===Q?xt(p)?!0:p===vr&&xt(I):T===vr?xt(p):xt(T)},bn=function(T){var p=0,I=1;(T[p]===_r||T[p]===Q)&&(T[p]===Q&&(I=-1),p++);for(var S=[];xt(T[p]);)S.push(T[p++]);var V=S.length?parseInt(f.apply(void 0,S),10):0;T[p]===vr&&p++;for(var q=[];xt(T[p]);)q.push(T[p++]);var Ae=q.length,be=Ae?parseInt(f.apply(void 0,q),10):0;(T[p]===Mt||T[p]===tr)&&p++;var Ee=1;(T[p]===_r||T[p]===Q)&&(T[p]===Q&&(Ee=-1),p++);for(var Oe=[];xt(T[p]);)Oe.push(T[p++]);var ke=Oe.length?parseInt(f.apply(void 0,Oe),10):0;return I*(V+be*Math.pow(10,-Ae))*Math.pow(10,Ee*ke)},_n={type:2},qr={type:3},tn={type:4},on={type:13},hn={type:8},yn={type:21},jr={type:9},An={type:10},wn={type:11},Rn={type:12},jt={type:14},zt={type:23},Nr={type:1},en={type:25},Fn={type:24},Cn={type:26},li={type:27},Vi={type:28},zi={type:29},$s={type:31},Xi={type:32},Ta=function(){function T(){this._value=[]}return T.prototype.write=function(p){this._value=this._value.concat(R(p))},T.prototype.read=function(){for(var p=[],I=this.consumeToken();I!==Xi;)p.push(I),I=this.consumeToken();return p},T.prototype.consumeToken=function(){var p=this.consumeCodePoint();switch(p){case me:return this.consumeStringToken(me);case Ye:var I=this.peekCodePoint(0),S=this.peekCodePoint(1),V=this.peekCodePoint(2);if(Xr(I)||Lr(S,V)){var q=un(I,S,V)?Gt:kr,Ae=this.consumeName();return{type:5,value:Ae,flags:q}}break;case tt:if(this.peekCodePoint(0)===Se)return this.consumeCodePoint(),on;break;case m:return this.consumeStringToken(m);case C:return _n;case k:return qr;case Kt:if(this.peekCodePoint(0)===Se)return this.consumeCodePoint(),jt;break;case _r:if(Zr(p,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(p),this.consumeNumericToken();break;case gr:return tn;case Q:var be=p,Ee=this.peekCodePoint(0),Oe=this.peekCodePoint(1);if(Zr(be,Ee,Oe))return this.reconsumeCodePoint(p),this.consumeNumericToken();if(un(be,Ee,Oe))return this.reconsumeCodePoint(p),this.consumeIdentLikeToken();if(Ee===Q&&Oe===Be)return this.consumeCodePoint(),this.consumeCodePoint(),Fn;break;case vr:if(Zr(p,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(p),this.consumeNumericToken();break;case Kr:if(this.peekCodePoint(0)===Kt)for(this.consumeCodePoint();;){var ke=this.consumeCodePoint();if(ke===Kt&&(ke=this.consumeCodePoint(),ke===Kr))return this.consumeToken();if(ke===or)return this.consumeToken()}break;case Sr:return Cn;case Ir:return li;case Qe:if(this.peekCodePoint(0)===ye&&this.peekCodePoint(1)===Q&&this.peekCodePoint(2)===Q)return this.consumeCodePoint(),this.consumeCodePoint(),en;break;case ot:var Je=this.peekCodePoint(0),Ze=this.peekCodePoint(1),bt=this.peekCodePoint(2);if(un(Je,Ze,bt)){var Ae=this.consumeName();return{type:7,value:Ae}}break;case Xe:return Vi;case Dr:if(Lr(p,this.peekCodePoint(0)))return this.reconsumeCodePoint(p),this.consumeIdentLikeToken();break;case mt:return zi;case pt:if(this.peekCodePoint(0)===Se)return this.consumeCodePoint(),hn;break;case Et:return wn;case ir:return Rn;case wr:case Lt:var ht=this.peekCodePoint(0),gt=this.peekCodePoint(1);return ht===_r&&(Vt(gt)||gt===Rt)&&(this.consumeCodePoint(),this.consumeUnicodeRangeToken()),this.reconsumeCodePoint(p),this.consumeIdentLikeToken();case Nt:if(this.peekCodePoint(0)===Se)return this.consumeCodePoint(),jr;if(this.peekCodePoint(0)===Nt)return this.consumeCodePoint(),yn;break;case er:if(this.peekCodePoint(0)===Se)return this.consumeCodePoint(),An;break;case or:return Xi}return $r(p)?(this.consumeWhiteSpace(),$s):xt(p)?(this.reconsumeCodePoint(p),this.consumeNumericToken()):sn(p)?(this.reconsumeCodePoint(p),this.consumeIdentLikeToken()):{type:6,value:f(p)}},T.prototype.consumeCodePoint=function(){var p=this._value.shift();return typeof p=="undefined"?-1:p},T.prototype.reconsumeCodePoint=function(p){this._value.unshift(p)},T.prototype.peekCodePoint=function(p){return p>=this._value.length?-1:this._value[p]},T.prototype.consumeUnicodeRangeToken=function(){for(var p=[],I=this.consumeCodePoint();Vt(I)&&p.length<6;)p.push(I),I=this.consumeCodePoint();for(var S=!1;I===Rt&&p.length<6;)p.push(I),I=this.consumeCodePoint(),S=!0;if(S){var V=parseInt(f.apply(void 0,p.map(function(Ee){return Ee===Rt?Xt:Ee})),16),q=parseInt(f.apply(void 0,p.map(function(Ee){return Ee===Rt?Ht:Ee})),16);return{type:30,start:V,end:q}}var Ae=parseInt(f.apply(void 0,p),16);if(this.peekCodePoint(0)===Q&&Vt(this.peekCodePoint(1))){this.consumeCodePoint(),I=this.consumeCodePoint();for(var be=[];Vt(I)&&be.length<6;)be.push(I),I=this.consumeCodePoint();var q=parseInt(f.apply(void 0,be),16);return{type:30,start:Ae,end:q}}else return{type:30,start:Ae,end:Ae}},T.prototype.consumeIdentLikeToken=function(){var p=this.consumeName();return p.toLowerCase()==="url"&&this.peekCodePoint(0)===C?(this.consumeCodePoint(),this.consumeUrlToken()):this.peekCodePoint(0)===C?(this.consumeCodePoint(),{type:19,value:p}):{type:20,value:p}},T.prototype.consumeUrlToken=function(){var p=[];if(this.consumeWhiteSpace(),this.peekCodePoint(0)===or)return{type:22,value:""};var I=this.peekCodePoint(0);if(I===m||I===me){var S=this.consumeStringToken(this.consumeCodePoint());return S.type===0&&(this.consumeWhiteSpace(),this.peekCodePoint(0)===or||this.peekCodePoint(0)===k)?(this.consumeCodePoint(),{type:22,value:S.value}):(this.consumeBadUrlRemnants(),zt)}for(;;){var V=this.consumeCodePoint();if(V===or||V===k)return{type:22,value:f.apply(void 0,p)};if($r(V))return this.consumeWhiteSpace(),this.peekCodePoint(0)===or||this.peekCodePoint(0)===k?(this.consumeCodePoint(),{type:22,value:f.apply(void 0,p)}):(this.consumeBadUrlRemnants(),zt);if(V===me||V===m||V===C||In(V))return this.consumeBadUrlRemnants(),zt;if(V===Dr)if(Lr(V,this.peekCodePoint(0)))p.push(this.consumeEscapedCodePoint());else return this.consumeBadUrlRemnants(),zt;else p.push(V)}},T.prototype.consumeWhiteSpace=function(){for(;$r(this.peekCodePoint(0));)this.consumeCodePoint()},T.prototype.consumeBadUrlRemnants=function(){for(;;){var p=this.consumeCodePoint();if(p===k||p===or)return;Lr(p,this.peekCodePoint(0))&&this.consumeEscapedCodePoint()}},T.prototype.consumeStringSlice=function(p){for(var I=5e4,S="";p>0;){var V=Math.min(I,p);S+=f.apply(void 0,this._value.splice(0,V)),p-=V}return this._value.shift(),S},T.prototype.consumeStringToken=function(p){var I="",S=0;do{var V=this._value[S];if(V===or||V===void 0||V===p)return I+=this.consumeStringSlice(S),{type:0,value:I};if(V===pr)return this._value.splice(0,S),Nr;if(V===Dr){var q=this._value[S+1];q!==or&&q!==void 0&&(q===pr?(I+=this.consumeStringSlice(S),S=-1,this._value.shift()):Lr(V,q)&&(I+=this.consumeStringSlice(S),I+=f(this.consumeEscapedCodePoint()),S=-1))}S++}while(!0)},T.prototype.consumeNumber=function(){var p=[],I=fr,S=this.peekCodePoint(0);for((S===_r||S===Q)&&p.push(this.consumeCodePoint());xt(this.peekCodePoint(0));)p.push(this.consumeCodePoint());S=this.peekCodePoint(0);var V=this.peekCodePoint(1);if(S===vr&&xt(V))for(p.push(this.consumeCodePoint(),this.consumeCodePoint()),I=Qr;xt(this.peekCodePoint(0));)p.push(this.consumeCodePoint());S=this.peekCodePoint(0),V=this.peekCodePoint(1);var q=this.peekCodePoint(2);if((S===Mt||S===tr)&&((V===_r||V===Q)&&xt(q)||xt(V)))for(p.push(this.consumeCodePoint(),this.consumeCodePoint()),I=Qr;xt(this.peekCodePoint(0));)p.push(this.consumeCodePoint());return[bn(p),I]},T.prototype.consumeNumericToken=function(){var p=this.consumeNumber(),I=p[0],S=p[1],V=this.peekCodePoint(0),q=this.peekCodePoint(1),Ae=this.peekCodePoint(2);if(un(V,q,Ae)){var be=this.consumeName();return{type:15,number:I,flags:S,unit:be}}return V===H?(this.consumeCodePoint(),{type:16,number:I,flags:S}):{type:17,number:I,flags:S}},T.prototype.consumeEscapedCodePoint=function(){var p=this.consumeCodePoint();if(Vt(p)){for(var I=f(p);Vt(this.peekCodePoint(0))&&I.length<6;)I+=f(this.consumeCodePoint());$r(this.peekCodePoint(0))&&this.consumeCodePoint();var S=parseInt(I,16);return S===0||Jt(S)||S>1114111?mr:S}return p===or?mr:p},T.prototype.consumeName=function(){for(var p="";;){var I=this.consumeCodePoint();if(Xr(I))p+=f(I);else if(Lr(I,this.peekCodePoint(0)))p+=f(this.consumeEscapedCodePoint());else return this.reconsumeCodePoint(I),p}},T}(),Ba=function(){function T(p){this._tokens=p}return T.create=function(p){var I=new Ta;return I.write(p),new T(I.read())},T.parseValue=function(p){return T.create(p).parseComponentValue()},T.parseValues=function(p){return T.create(p).parseComponentValues()},T.prototype.parseComponentValue=function(){for(var p=this.consumeToken();p.type===31;)p=this.consumeToken();if(p.type===32)throw new SyntaxError("Error parsing CSS component value, unexpected EOF");this.reconsumeToken(p);var I=this.consumeComponentValue();do p=this.consumeToken();while(p.type===31);if(p.type===32)return I;throw new SyntaxError("Error parsing CSS component value, multiple values found when expecting only one")},T.prototype.parseComponentValues=function(){for(var p=[];;){var I=this.consumeComponentValue();if(I.type===32)return p;p.push(I),p.push()}},T.prototype.consumeComponentValue=function(){var p=this.consumeToken();switch(p.type){case 11:case 28:case 2:return this.consumeSimpleBlock(p.type);case 19:return this.consumeFunction(p)}return p},T.prototype.consumeSimpleBlock=function(p){for(var I={type:p,values:[]},S=this.consumeToken();;){if(S.type===32||qs(S,p))return I;this.reconsumeToken(S),I.values.push(this.consumeComponentValue()),S=this.consumeToken()}},T.prototype.consumeFunction=function(p){for(var I={name:p.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())}},T.prototype.consumeToken=function(){var p=this._tokens.shift();return typeof p=="undefined"?Xi:p},T.prototype.reconsumeToken=function(p){this._tokens.unshift(p)},T}(),ui=function(T){return T.type===15},qn=function(T){return T.type===17},br=function(T){return T.type===20},Zs=function(T){return T.type===0},Yi=function(T,p){return br(T)&&T.value===p},xa=function(T){return T.type!==31},ei=function(T){return T.type!==31&&T.type!==4},Tn=function(T){var p=[],I=[];return T.forEach(function(S){if(S.type===4){if(I.length===0)throw new Error("Error parsing function args, zero tokens for arg");p.push(I),I=[];return}S.type!==31&&I.push(S)}),I.length&&p.push(I),p},qs=function(T,p){return p===11&&T.type===12||p===28&&T.type===29?!0:p===2&&T.type===3},Nn=function(T){return T.type===17||T.type===15},Hr=function(T){return T.type===16||Nn(T)},Sa=function(T){return T.length>1?[T[0],T[1]]:[T[0]]},Yr={type:17,number:0,flags:fr},Ji={type:16,number:50,flags:fr},Pn={type:16,number:100,flags:fr},hi=function(T,p,I){var S=T[0],V=T[1];return[Cr(S,p),Cr(typeof V!="undefined"?V:S,I)]},Cr=function(T,p){if(T.type===16)return T.number/100*p;if(ui(T))switch(T.unit){case"rem":case"em":return 16*T.number;case"px":default:return T.number}return T.number},Ia="deg",Ra="grad",Oa="rad",La="turn",Ei={name:"angle",parse:function(T,p){if(p.type===15)switch(p.unit){case Ia:return Math.PI*p.number/180;case Ra:return Math.PI/200*p.number;case Oa:return p.number;case La:return Math.PI*2*p.number}throw new Error("Unsupported angle type")}},Da=function(T){return T.type===15&&(T.unit===Ia||T.unit===Ra||T.unit===Oa||T.unit===La)},Ua=function(T){var p=T.filter(br).map(function(I){return I.value}).join(" ");switch(p){case"to bottom right":case"to right bottom":case"left top":case"top left":return[Yr,Yr];case"to top":case"bottom":return dn(0);case"to bottom left":case"to left bottom":case"right top":case"top right":return[Yr,Pn];case"to right":case"left":return dn(90);case"to top left":case"to left top":case"right bottom":case"bottom right":return[Pn,Pn];case"to bottom":case"top":return dn(180);case"to top right":case"to right top":case"left bottom":case"bottom left":return[Pn,Yr];case"to left":case"right":return dn(270)}return 0},dn=function(T){return Math.PI*T/180},Mn={name:"color",parse:function(T,p){if(p.type===18){var I=eo[p.name];if(typeof I=="undefined")throw new Error('Attempting to parse an unsupported color function "'+p.name+'"');return I(T,p.values)}if(p.type===5){if(p.value.length===3){var S=p.value.substring(0,1),V=p.value.substring(1,2),q=p.value.substring(2,3);return Hn(parseInt(S+S,16),parseInt(V+V,16),parseInt(q+q,16),1)}if(p.value.length===4){var S=p.value.substring(0,1),V=p.value.substring(1,2),q=p.value.substring(2,3),Ae=p.value.substring(3,4);return Hn(parseInt(S+S,16),parseInt(V+V,16),parseInt(q+q,16),parseInt(Ae+Ae,16)/255)}if(p.value.length===6){var S=p.value.substring(0,2),V=p.value.substring(2,4),q=p.value.substring(4,6);return Hn(parseInt(S,16),parseInt(V,16),parseInt(q,16),1)}if(p.value.length===8){var S=p.value.substring(0,2),V=p.value.substring(2,4),q=p.value.substring(4,6),Ae=p.value.substring(6,8);return Hn(parseInt(S,16),parseInt(V,16),parseInt(q,16),parseInt(Ae,16)/255)}}if(p.type===20){var be=On[p.value.toUpperCase()];if(typeof be!="undefined")return be}return On.TRANSPARENT}},kn=function(T){return(255&T)===0},Gr=function(T){var p=255&T,I=255&T>>8,S=255&T>>16,V=255&T>>24;return p<255?"rgba("+V+","+S+","+I+","+p/255+")":"rgb("+V+","+S+","+I+")"},Hn=function(T,p,I,S){return(T<<24|p<<16|I<<8|Math.round(S*255)<<0)>>>0},Fa=function(T,p){if(T.type===17)return T.number;if(T.type===16){var I=p===3?1:255;return p===3?T.number/100*I:Math.round(T.number/100*I)}return 0},Na=function(T,p){var I=p.filter(ei);if(I.length===3){var S=I.map(Fa),V=S[0],q=S[1],Ae=S[2];return Hn(V,q,Ae,1)}if(I.length===4){var be=I.map(Fa),V=be[0],q=be[1],Ae=be[2],Ee=be[3];return Hn(V,q,Ae,Ee)}return 0};function $i(T,p,I){return I<0&&(I+=1),I>=1&&(I-=1),I<1/6?(p-T)*I*6+T:I<1/2?p:I<2/3?(p-T)*6*(2/3-I)+T:T}var Pa=function(T,p){var I=p.filter(ei),S=I[0],V=I[1],q=I[2],Ae=I[3],be=(S.type===17?dn(S.number):Ei.parse(T,S))/(Math.PI*2),Ee=Hr(V)?V.number/100:0,Oe=Hr(q)?q.number/100:0,ke=typeof Ae!="undefined"&&Hr(Ae)?Cr(Ae,1):1;if(Ee===0)return Hn(Oe*255,Oe*255,Oe*255,1);var Je=Oe<=.5?Oe*(Ee+1):Oe+Ee-Oe*Ee,Ze=Oe*2-Je,bt=$i(Ze,Je,be+1/3),ht=$i(Ze,Je,be),gt=$i(Ze,Je,be-1/3);return Hn(bt*255,ht*255,gt*255,ke)},eo={hsl:Pa,hsla:Pa,rgb:Na,rgba:Na},ci=function(T,p){return Mn.parse(T,Ba.create(p).parseComponentValue())},On={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(T,p){return p.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"},bi=function(T,p){var I=Mn.parse(T,p[0]),S=p[1];return S&&Hr(S)?{color:I,stop:S}:{color:I,stop:null}},Ma=function(T,p){var I=T[0],S=T[T.length-1];I.stop===null&&(I.stop=Yr),S.stop===null&&(S.stop=Pn);for(var V=[],q=0,Ae=0;Ae<T.length;Ae++){var be=T[Ae].stop;if(be!==null){var Ee=Cr(be,p);Ee>q?V.push(Ee):V.push(q),q=Ee}else V.push(null)}for(var Oe=null,Ae=0;Ae<V.length;Ae++){var ke=V[Ae];if(ke===null)Oe===null&&(Oe=Ae);else if(Oe!==null){for(var Je=Ae-Oe,Ze=V[Oe-1],bt=(ke-Ze)/(Je+1),ht=1;ht<=Je;ht++)V[Oe+ht-1]=bt*ht;Oe=null}}return T.map(function(gt,Pt){var yt=gt.color;return{color:yt,stop:Math.max(Math.min(1,V[Pt]/p),0)}})},no=function(T,p,I){var S=p/2,V=I/2,q=Cr(T[0],p)-S,Ae=V-Cr(T[1],I);return(Math.atan2(Ae,q)+Math.PI*2)%(Math.PI*2)},io=function(T,p,I){var S=typeof T=="number"?T:no(T,p,I),V=Math.abs(p*Math.sin(S))+Math.abs(I*Math.cos(S)),q=p/2,Ae=I/2,be=V/2,Ee=Math.sin(S-Math.PI/2)*be,Oe=Math.cos(S-Math.PI/2)*be;return[V,q-Oe,q+Oe,Ae-Ee,Ae+Ee]},En=function(T,p){return Math.sqrt(T*T+p*p)},ka=function(T,p,I,S,V){var q=[[0,0],[0,p],[T,0],[T,p]];return q.reduce(function(Ae,be){var Ee=be[0],Oe=be[1],ke=En(I-Ee,S-Oe);return(V?ke<Ae.optimumDistance:ke>Ae.optimumDistance)?{optimumCorner:be,optimumDistance:ke}:Ae},{optimumDistance:V?Infinity:-Infinity,optimumCorner:null}).optimumCorner},ao=function(T,p,I,S,V){var q=0,Ae=0;switch(T.size){case 0:T.shape===0?q=Ae=Math.min(Math.abs(p),Math.abs(p-S),Math.abs(I),Math.abs(I-V)):T.shape===1&&(q=Math.min(Math.abs(p),Math.abs(p-S)),Ae=Math.min(Math.abs(I),Math.abs(I-V)));break;case 2:if(T.shape===0)q=Ae=Math.min(En(p,I),En(p,I-V),En(p-S,I),En(p-S,I-V));else if(T.shape===1){var be=Math.min(Math.abs(I),Math.abs(I-V))/Math.min(Math.abs(p),Math.abs(p-S)),Ee=ka(S,V,p,I,!0),Oe=Ee[0],ke=Ee[1];q=En(Oe-p,(ke-I)/be),Ae=be*q}break;case 1:T.shape===0?q=Ae=Math.max(Math.abs(p),Math.abs(p-S),Math.abs(I),Math.abs(I-V)):T.shape===1&&(q=Math.max(Math.abs(p),Math.abs(p-S)),Ae=Math.max(Math.abs(I),Math.abs(I-V)));break;case 3:if(T.shape===0)q=Ae=Math.max(En(p,I),En(p,I-V),En(p-S,I),En(p-S,I-V));else if(T.shape===1){var be=Math.max(Math.abs(I),Math.abs(I-V))/Math.max(Math.abs(p),Math.abs(p-S)),Je=ka(S,V,p,I,!1),Oe=Je[0],ke=Je[1];q=En(Oe-p,(ke-I)/be),Ae=be*q}break}return Array.isArray(T.size)&&(q=Cr(T.size[0],S),Ae=T.size.length===2?Cr(T.size[1],V):q),[q,Ae]},so=function(T,p){var I=dn(180),S=[];return Tn(p).forEach(function(V,q){if(q===0){var Ae=V[0];if(Ae.type===20&&Ae.value==="to"){I=Ua(V);return}else if(Da(Ae)){I=Ei.parse(T,Ae);return}}var be=bi(T,V);S.push(be)}),{angle:I,stops:S,type:1}},_i=function(T,p){var I=dn(180),S=[];return Tn(p).forEach(function(V,q){if(q===0){var Ae=V[0];if(Ae.type===20&&["top","left","right","bottom"].indexOf(Ae.value)!==-1){I=Ua(V);return}else if(Da(Ae)){I=(Ei.parse(T,Ae)+dn(270))%dn(360);return}}var be=bi(T,V);S.push(be)}),{angle:I,stops:S,type:1}},oo=function(T,p){var I=dn(180),S=[],V=1,q=0,Ae=3,be=[];return Tn(p).forEach(function(Ee,Oe){var ke=Ee[0];if(Oe===0){if(br(ke)&&ke.value==="linear"){V=1;return}else if(br(ke)&&ke.value==="radial"){V=2;return}}if(ke.type===18){if(ke.name==="from"){var Je=Mn.parse(T,ke.values[0]);S.push({stop:Yr,color:Je})}else if(ke.name==="to"){var Je=Mn.parse(T,ke.values[0]);S.push({stop:Pn,color:Je})}else if(ke.name==="color-stop"){var Ze=ke.values.filter(ei);if(Ze.length===2){var Je=Mn.parse(T,Ze[1]),bt=Ze[0];qn(bt)&&S.push({stop:{type:16,number:bt.number*100,flags:bt.flags},color:Je})}}}}),V===1?{angle:(I+dn(180))%dn(360),stops:S,type:V}:{size:Ae,shape:q,stops:S,position:be,type:V}},Ha="closest-side",Qa="farthest-side",Ka="closest-corner",ja="farthest-corner",Wa="circle",Ga="ellipse",Va="cover",za="contain",Ao=function(T,p){var I=0,S=3,V=[],q=[];return Tn(p).forEach(function(Ae,be){var Ee=!0;if(be===0){var Oe=!1;Ee=Ae.reduce(function(Je,Ze){if(Oe)if(br(Ze))switch(Ze.value){case"center":return q.push(Ji),Je;case"top":case"left":return q.push(Yr),Je;case"right":case"bottom":return q.push(Pn),Je}else(Hr(Ze)||Nn(Ze))&&q.push(Ze);else if(br(Ze))switch(Ze.value){case Wa:return I=0,!1;case Ga:return I=1,!1;case"at":return Oe=!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(Nn(Ze)||Hr(Ze))return Array.isArray(S)||(S=[]),S.push(Ze),!1;return Je},Ee)}if(Ee){var ke=bi(T,Ae);V.push(ke)}}),{size:S,shape:I,stops:V,position:q,type:2}},wi=function(T,p){var I=0,S=3,V=[],q=[];return Tn(p).forEach(function(Ae,be){var Ee=!0;if(be===0?Ee=Ae.reduce(function(ke,Je){if(br(Je))switch(Je.value){case"center":return q.push(Ji),!1;case"top":case"left":return q.push(Yr),!1;case"right":case"bottom":return q.push(Pn),!1}else if(Hr(Je)||Nn(Je))return q.push(Je),!1;return ke},Ee):be===1&&(Ee=Ae.reduce(function(ke,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(Nn(Je)||Hr(Je))return Array.isArray(S)||(S=[]),S.push(Je),!1;return ke},Ee)),Ee){var Oe=bi(T,Ae);V.push(Oe)}}),{size:S,shape:I,stops:V,position:q,type:2}},lo=function(T){return T.type===1},uo=function(T){return T.type===2},Zi={name:"image",parse:function(T,p){if(p.type===22){var I={url:p.value,type:0};return T.cache.addImage(p.value),I}if(p.type===18){var S=Xa[p.name];if(typeof S=="undefined")throw new Error('Attempting to parse an unsupported image function "'+p.name+'"');return S(T,p.values)}throw new Error("Unsupported image type "+p.type)}};function ho(T){return!(T.type===20&&T.value==="none")&&(T.type!==18||!!Xa[T.name])}var Xa={"linear-gradient":so,"-moz-linear-gradient":_i,"-ms-linear-gradient":_i,"-o-linear-gradient":_i,"-webkit-linear-gradient":_i,"radial-gradient":Ao,"-moz-radial-gradient":wi,"-ms-radial-gradient":wi,"-o-radial-gradient":wi,"-webkit-radial-gradient":wi,"-webkit-gradient":oo},co={name:"background-image",initialValue:"none",type:1,prefix:!1,parse:function(T,p){if(p.length===0)return[];var I=p[0];return I.type===20&&I.value==="none"?[]:p.filter(function(S){return ei(S)&&ho(S)}).map(function(S){return Zi.parse(T,S)})}},fo={name:"background-origin",initialValue:"border-box",prefix:!1,type:1,parse:function(T,p){return p.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(T,p){return Tn(p).map(function(I){return I.filter(Hr)}).map(Sa)}},mo={name:"background-repeat",initialValue:"repeat",prefix:!1,type:1,parse:function(T,p){return Tn(p).map(function(I){return I.filter(br).map(function(S){return S.value}).join(" ")}).map(go)}},go=function(T){switch(T){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}},ti;(function(T){T.AUTO="auto",T.CONTAIN="contain",T.COVER="cover"})(ti||(ti={}));var vo={name:"background-size",initialValue:"0",prefix:!1,type:1,parse:function(T,p){return Tn(p).map(function(I){return I.filter(yo)})}},yo=function(T){return br(T)||Hr(T)},Ci=function(T){return{name:"border-"+T+"-color",initialValue:"transparent",prefix:!1,type:3,format:"color"}},Eo=Ci("top"),bo=Ci("right"),_o=Ci("bottom"),wo=Ci("left"),Ti=function(T){return{name:"border-radius-"+T,initialValue:"0 0",prefix:!1,type:1,parse:function(p,I){return Sa(I.filter(Hr))}}},Co=Ti("top-left"),To=Ti("top-right"),Bo=Ti("bottom-right"),xo=Ti("bottom-left"),Bi=function(T){return{name:"border-"+T+"-style",initialValue:"solid",prefix:!1,type:2,parse:function(p,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"),xi=function(T){return{name:"border-"+T+"-width",initialValue:"0",type:0,prefix:!1,parse:function(p,I){return ui(I)?I.number:0}}},Lo=xi("top"),Do=xi("right"),Uo=xi("bottom"),Fo=xi("left"),No={name:"color",initialValue:"transparent",prefix:!1,type:3,format:"color"},Po={name:"direction",initialValue:"ltr",prefix:!1,type:2,parse:function(T,p){switch(p){case"rtl":return 1;case"ltr":default:return 0}}},Mo={name:"display",initialValue:"inline-block",prefix:!1,type:1,parse:function(T,p){return p.filter(br).reduce(function(I,S){return I|ko(S.value)},0)}},ko=function(T){switch(T){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(T,p){switch(p){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(T,p){return p.type===20&&p.value==="normal"?0:p.type===17||p.type===15?p.number:0}},Si;(function(T){T.NORMAL="normal",T.STRICT="strict"})(Si||(Si={}));var Ko={name:"line-break",initialValue:"normal",prefix:!1,type:2,parse:function(T,p){switch(p){case"strict":return Si.STRICT;case"normal":default:return Si.NORMAL}}},jo={name:"line-height",initialValue:"normal",prefix:!1,type:4},Ya=function(T,p){return br(T)&&T.value==="normal"?1.2*p:T.type===17?p*T.number:Hr(T)?Cr(T,p):p},Wo={name:"list-style-image",initialValue:"none",type:0,prefix:!1,parse:function(T,p){return p.type===20&&p.value==="none"?null:Zi.parse(T,p)}},Go={name:"list-style-position",initialValue:"outside",prefix:!1,type:2,parse:function(T,p){switch(p){case"inside":return 0;case"outside":default:return 1}}},qi={name:"list-style-type",initialValue:"none",prefix:!1,type:2,parse:function(T,p){switch(p){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}}},Ii=function(T){return{name:"margin-"+T,initialValue:"0",prefix:!1,type:4}},Vo=Ii("top"),zo=Ii("right"),Xo=Ii("bottom"),Yo=Ii("left"),Jo={name:"overflow",initialValue:"visible",prefix:!1,type:1,parse:function(T,p){return p.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(T,p){switch(p){case"break-word":return"break-word";case"normal":default:return"normal"}}},Ri=function(T){return{name:"padding-"+T,initialValue:"0",prefix:!1,type:3,format:"length-percentage"}},Zo=Ri("top"),qo=Ri("right"),eA=Ri("bottom"),tA=Ri("left"),rA={name:"text-align",initialValue:"left",prefix:!1,type:2,parse:function(T,p){switch(p){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(T,p){switch(p){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(T,p){return p.length===1&&Yi(p[0],"none")?[]:Tn(p).map(function(I){for(var S={color:On.TRANSPARENT,offsetX:Yr,offsetY:Yr,blur:Yr},V=0,q=0;q<I.length;q++){var Ae=I[q];Nn(Ae)?(V===0?S.offsetX=Ae:V===1?S.offsetY=Ae:S.blur=Ae,V++):S.color=Mn.parse(T,Ae)}return S})}},aA={name:"text-transform",initialValue:"none",prefix:!1,type:2,parse:function(T,p){switch(p){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(T,p){if(p.type===20&&p.value==="none")return null;if(p.type===18){var I=lA[p.name];if(typeof I=="undefined")throw new Error('Attempting to parse an unsupported transform function "'+p.name+'"');return I(p.values)}return null}},oA=function(T){var p=T.filter(function(I){return I.type===17}).map(function(I){return I.number});return p.length===6?p:null},AA=function(T){var p=T.filter(function(Ee){return Ee.type===17}).map(function(Ee){return Ee.number}),I=p[0],S=p[1];p[2],p[3];var V=p[4],q=p[5];p[6],p[7],p[8],p[9],p[10],p[11];var Ae=p[12],be=p[13];return p[14],p[15],p.length===16?[I,S,V,q,Ae,be]:null},lA={matrix:oA,matrix3d:AA},Ja={type:16,number:50,flags:fr},uA=[Ja,Ja],hA={name:"transform-origin",initialValue:"50% 50%",prefix:!0,type:1,parse:function(T,p){var I=p.filter(Hr);return I.length!==2?uA:[I[0],I[1]]}},cA={name:"visible",initialValue:"none",prefix:!1,type:2,parse:function(T,p){switch(p){case"hidden":return 1;case"collapse":return 2;case"visible":default:return 0}}},di;(function(T){T.NORMAL="normal",T.BREAK_ALL="break-all",T.KEEP_ALL="keep-all"})(di||(di={}));for(var dA={name:"word-break",initialValue:"normal",prefix:!1,type:2,parse:function(T,p){switch(p){case"break-all":return di.BREAK_ALL;case"keep-all":return di.KEEP_ALL;case"normal":default:return di.NORMAL}}},fA={name:"z-index",initialValue:"auto",prefix:!1,type:0,parse:function(T,p){if(p.type===20)return{auto:!0,order:0};if(qn(p))return{auto:!1,order:p.number};throw new Error("Invalid z-index number parsed")}},$a={name:"time",parse:function(T,p){if(p.type===15)switch(p.unit.toLowerCase()){case"s":return 1e3*p.number;case"ms":return p.number}throw new Error("Unsupported time type")}},pA={name:"opacity",initialValue:"1",type:0,prefix:!1,parse:function(T,p){return qn(p)?p.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(T,p){return p.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(T,p){var I=[],S=[];return p.forEach(function(V){switch(V.type){case 20:case 0:I.push(V.value);break;case 17:I.push(V.number.toString());break;case 4:S.push(I.join(" ")),I.length=0;break}}),I.length&&S.push(I.join(" ")),S.map(function(V){return V.indexOf(" ")===-1?V:"'"+V+"'"})}},yA={name:"font-size",initialValue:"0",prefix:!1,type:3,format:"length"},EA={name:"font-weight",initialValue:"normal",type:0,prefix:!1,parse:function(T,p){if(qn(p))return p.number;if(br(p))switch(p.value){case"bold":return 700;case"normal":default:return 400}return 400}},bA={name:"font-variant",initialValue:"none",type:1,prefix:!1,parse:function(T,p){return p.filter(br).map(function(I){return I.value})}},_A={name:"font-style",initialValue:"normal",prefix:!1,type:2,parse:function(T,p){switch(p){case"oblique":return"oblique";case"italic":return"italic";case"normal":default:return"normal"}}},Wr=function(T,p){return(T&p)!==0},wA={name:"content",initialValue:"none",type:1,prefix:!1,parse:function(T,p){if(p.length===0)return[];var I=p[0];return I.type===20&&I.value==="none"?[]:p}},CA={name:"counter-increment",initialValue:"none",prefix:!0,type:1,parse:function(T,p){if(p.length===0)return null;var I=p[0];if(I.type===20&&I.value==="none")return null;for(var S=[],V=p.filter(xa),q=0;q<V.length;q++){var Ae=V[q],be=V[q+1];if(Ae.type===20){var Ee=be&&qn(be)?be.number:1;S.push({counter:Ae.value,increment:Ee})}}return S}},TA={name:"counter-reset",initialValue:"none",prefix:!0,type:1,parse:function(T,p){if(p.length===0)return[];for(var I=[],S=p.filter(xa),V=0;V<S.length;V++){var q=S[V],Ae=S[V+1];if(br(q)&&q.value!=="none"){var be=Ae&&qn(Ae)?Ae.number:0;I.push({counter:q.value,reset:be})}}return I}},BA={name:"duration",initialValue:"0s",prefix:!1,type:1,parse:function(T,p){return p.filter(ui).map(function(I){return $a.parse(T,I)})}},xA={name:"quotes",initialValue:"none",prefix:!0,type:1,parse:function(T,p){if(p.length===0)return null;var I=p[0];if(I.type===20&&I.value==="none")return null;var S=[],V=p.filter(Zs);if(V.length%2!==0)return null;for(var q=0;q<V.length;q+=2){var Ae=V[q].value,be=V[q+1].value;S.push({open:Ae,close:be})}return S}},Za=function(T,p,I){if(!T)return"";var S=T[Math.min(p,T.length-1)];return S?I?S.open:S.close:""},SA={name:"box-shadow",initialValue:"none",type:1,prefix:!1,parse:function(T,p){return p.length===1&&Yi(p[0],"none")?[]:Tn(p).map(function(I){for(var S={color:255,offsetX:Yr,offsetY:Yr,blur:Yr,spread:Yr,inset:!1},V=0,q=0;q<I.length;q++){var Ae=I[q];Yi(Ae,"inset")?S.inset=!0:Nn(Ae)?(V===0?S.offsetX=Ae:V===1?S.offsetY=Ae:V===2?S.blur=Ae:S.spread=Ae,V++):S.color=Mn.parse(T,Ae)}return S})}},IA={name:"paint-order",initialValue:"normal",prefix:!1,type:1,parse:function(T,p){var I=[0,1,2],S=[];return p.filter(br).forEach(function(V){switch(V.value){case"stroke":S.push(1);break;case"fill":S.push(0);break;case"markers":S.push(2);break}}),I.forEach(function(V){S.indexOf(V)===-1&&S.push(V)}),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(T,p){return ui(p)?p.number:0}},LA=function(){function T(p,I){var S,V;this.animationDuration=Ct(p,BA,I.animationDuration),this.backgroundClip=Ct(p,to,I.backgroundClip),this.backgroundColor=Ct(p,ro,I.backgroundColor),this.backgroundImage=Ct(p,co,I.backgroundImage),this.backgroundOrigin=Ct(p,fo,I.backgroundOrigin),this.backgroundPosition=Ct(p,po,I.backgroundPosition),this.backgroundRepeat=Ct(p,mo,I.backgroundRepeat),this.backgroundSize=Ct(p,vo,I.backgroundSize),this.borderTopColor=Ct(p,Eo,I.borderTopColor),this.borderRightColor=Ct(p,bo,I.borderRightColor),this.borderBottomColor=Ct(p,_o,I.borderBottomColor),this.borderLeftColor=Ct(p,wo,I.borderLeftColor),this.borderTopLeftRadius=Ct(p,Co,I.borderTopLeftRadius),this.borderTopRightRadius=Ct(p,To,I.borderTopRightRadius),this.borderBottomRightRadius=Ct(p,Bo,I.borderBottomRightRadius),this.borderBottomLeftRadius=Ct(p,xo,I.borderBottomLeftRadius),this.borderTopStyle=Ct(p,So,I.borderTopStyle),this.borderRightStyle=Ct(p,Io,I.borderRightStyle),this.borderBottomStyle=Ct(p,Ro,I.borderBottomStyle),this.borderLeftStyle=Ct(p,Oo,I.borderLeftStyle),this.borderTopWidth=Ct(p,Lo,I.borderTopWidth),this.borderRightWidth=Ct(p,Do,I.borderRightWidth),this.borderBottomWidth=Ct(p,Uo,I.borderBottomWidth),this.borderLeftWidth=Ct(p,Fo,I.borderLeftWidth),this.boxShadow=Ct(p,SA,I.boxShadow),this.color=Ct(p,No,I.color),this.direction=Ct(p,Po,I.direction),this.display=Ct(p,Mo,I.display),this.float=Ct(p,Ho,I.cssFloat),this.fontFamily=Ct(p,vA,I.fontFamily),this.fontSize=Ct(p,yA,I.fontSize),this.fontStyle=Ct(p,_A,I.fontStyle),this.fontVariant=Ct(p,bA,I.fontVariant),this.fontWeight=Ct(p,EA,I.fontWeight),this.letterSpacing=Ct(p,Qo,I.letterSpacing),this.lineBreak=Ct(p,Ko,I.lineBreak),this.lineHeight=Ct(p,jo,I.lineHeight),this.listStyleImage=Ct(p,Wo,I.listStyleImage),this.listStylePosition=Ct(p,Go,I.listStylePosition),this.listStyleType=Ct(p,qi,I.listStyleType),this.marginTop=Ct(p,Vo,I.marginTop),this.marginRight=Ct(p,zo,I.marginRight),this.marginBottom=Ct(p,Xo,I.marginBottom),this.marginLeft=Ct(p,Yo,I.marginLeft),this.opacity=Ct(p,pA,I.opacity);var q=Ct(p,Jo,I.overflow);this.overflowX=q[0],this.overflowY=q[q.length>1?1:0],this.overflowWrap=Ct(p,$o,I.overflowWrap),this.paddingTop=Ct(p,Zo,I.paddingTop),this.paddingRight=Ct(p,qo,I.paddingRight),this.paddingBottom=Ct(p,eA,I.paddingBottom),this.paddingLeft=Ct(p,tA,I.paddingLeft),this.paintOrder=Ct(p,IA,I.paintOrder),this.position=Ct(p,nA,I.position),this.textAlign=Ct(p,rA,I.textAlign),this.textDecorationColor=Ct(p,mA,(S=I.textDecorationColor)!==null&&S!==void 0?S:I.color),this.textDecorationLine=Ct(p,gA,(V=I.textDecorationLine)!==null&&V!==void 0?V:I.textDecoration),this.textShadow=Ct(p,iA,I.textShadow),this.textTransform=Ct(p,aA,I.textTransform),this.transform=Ct(p,sA,I.transform),this.transformOrigin=Ct(p,hA,I.transformOrigin),this.visibility=Ct(p,cA,I.visibility),this.webkitTextStrokeColor=Ct(p,RA,I.webkitTextStrokeColor),this.webkitTextStrokeWidth=Ct(p,OA,I.webkitTextStrokeWidth),this.wordBreak=Ct(p,dA,I.wordBreak),this.zIndex=Ct(p,fA,I.zIndex)}return T.prototype.isVisible=function(){return this.display>0&&this.opacity>0&&this.visibility===0},T.prototype.isTransparent=function(){return kn(this.backgroundColor)},T.prototype.isTransformed=function(){return this.transform!==null},T.prototype.isPositioned=function(){return this.position!==0},T.prototype.isPositionedWithZIndex=function(){return this.isPositioned()&&!this.zIndex.auto},T.prototype.isFloating=function(){return this.float!==0},T.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)},T}(),DA=function(){function T(p,I){this.content=Ct(p,wA,I.content),this.quotes=Ct(p,xA,I.quotes)}return T}(),qa=function(){function T(p,I){this.counterIncrement=Ct(p,CA,I.counterIncrement),this.counterReset=Ct(p,TA,I.counterReset)}return T}(),Ct=function(T,p,I){var S=new Ta,V=I!==null&&typeof I!="undefined"?I.toString():p.initialValue;S.write(V);var q=new Ba(S.read());switch(p.type){case 2:var Ae=q.parseComponentValue();return p.parse(T,br(Ae)?Ae.value:p.initialValue);case 0:return p.parse(T,q.parseComponentValue());case 1:return p.parse(T,q.parseComponentValues());case 4:return q.parseComponentValue();case 3:switch(p.format){case"angle":return Ei.parse(T,q.parseComponentValue());case"color":return Mn.parse(T,q.parseComponentValue());case"image":return Zi.parse(T,q.parseComponentValue());case"length":var be=q.parseComponentValue();return Nn(be)?be:Yr;case"length-percentage":var Ee=q.parseComponentValue();return Hr(Ee)?Ee:Yr;case"time":return $a.parse(T,q.parseComponentValue())}break}},UA="data-html2canvas-debug",FA=function(T){var p=T.getAttribute(UA);switch(p){case"all":return 1;case"clone":return 2;case"parse":return 3;case"render":return 4;default:return 0}},ea=function(T,p){var I=FA(T);return I===1||p===I},Bn=function(){function T(p,I){if(this.context=p,this.textNodes=[],this.elements=[],this.flags=0,ea(I,3))debugger;this.styles=new LA(p,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=M(this.context,I),ea(I,4)&&(this.flags|=16)}return T}(),NA="AAAAAAAAAAAAEA4AGBkAAFAaAAACAAAAAAAIABAAGAAwADgACAAQAAgAEAAIABAACAAQAAgAEAAIABAACAAQAAgAEAAIABAAQABIAEQATAAIABAACAAQAAgAEAAIABAAVABcAAgAEAAIABAACAAQAGAAaABwAHgAgACIAI4AlgAIABAAmwCjAKgAsAC2AL4AvQDFAMoA0gBPAVYBWgEIAAgACACMANoAYgFkAWwBdAF8AX0BhQGNAZUBlgGeAaMBlQGWAasBswF8AbsBwwF0AcsBYwHTAQgA2wG/AOMBdAF8AekB8QF0AfkB+wHiAHQBfAEIAAMC5gQIAAsCEgIIAAgAFgIeAggAIgIpAggAMQI5AkACygEIAAgASAJQAlgCYAIIAAgACAAKBQoFCgUTBRMFGQUrBSsFCAAIAAgACAAIAAgACAAIAAgACABdAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABoAmgCrwGvAQgAbgJ2AggAHgEIAAgACADnAXsCCAAIAAgAgwIIAAgACAAIAAgACACKAggAkQKZAggAPADJAAgAoQKkAqwCsgK6AsICCADJAggA0AIIAAgACAAIANYC3gIIAAgACAAIAAgACABAAOYCCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAkASoB+QIEAAgACAA8AEMCCABCBQgACABJBVAFCAAIAAgACAAIAAgACAAIAAgACABTBVoFCAAIAFoFCABfBWUFCAAIAAgACAAIAAgAbQUIAAgACAAIAAgACABzBXsFfQWFBYoFigWKBZEFigWKBYoFmAWfBaYFrgWxBbkFCAAIAAgACAAIAAgACAAIAAgACAAIAMEFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAMgFCADQBQgACAAIAAgACAAIAAgACAAIAAgACAAIAO4CCAAIAAgAiQAIAAgACABAAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAD0AggACAD8AggACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIANYFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAMDvwAIAAgAJAIIAAgACAAIAAgACAAIAAgACwMTAwgACAB9BOsEGwMjAwgAKwMyAwsFYgE3A/MEPwMIAEUDTQNRAwgAWQOsAGEDCAAIAAgACAAIAAgACABpAzQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFIQUoBSwFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABtAwgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABMAEwACAAIAAgACAAIABgACAAIAAgACAC/AAgACAAyAQgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACACAAIAAwAAgACAAIAAgACAAIAAgACAAIAAAARABIAAgACAAIABQASAAIAAgAIABwAEAAjgCIABsAqAC2AL0AigDQAtwC+IJIQqVAZUBWQqVAZUBlQGVAZUBlQGrC5UBlQGVAZUBlQGVAZUBlQGVAXsKlQGVAbAK6wsrDGUMpQzlDJUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAfAKAAuZA64AtwCJALoC6ADwAAgAuACgA/oEpgO6AqsD+AAIAAgAswMIAAgACAAIAIkAuwP5AfsBwwPLAwgACAAIAAgACADRA9kDCAAIAOED6QMIAAgACAAIAAgACADuA/YDCAAIAP4DyQAIAAgABgQIAAgAXQAOBAgACAAIAAgACAAIABMECAAIAAgACAAIAAgACAD8AAQBCAAIAAgAGgQiBCoECAExBAgAEAEIAAgACAAIAAgACAAIAAgACAAIAAgACAA4BAgACABABEYECAAIAAgATAQYAQgAVAQIAAgACAAIAAgACAAIAAgACAAIAFoECAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAOQEIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAB+BAcACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAEABhgSMBAgACAAIAAgAlAQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAwAEAAQABAADAAMAAwADAAQABAAEAAQABAAEAAQABHATAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAdQMIAAgACAAIAAgACAAIAMkACAAIAAgAfQMIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACACFA4kDCAAIAAgACAAIAOcBCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAIcDCAAIAAgACAAIAAgACAAIAAgACAAIAJEDCAAIAAgACADFAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABgBAgAZgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAbAQCBXIECAAIAHkECAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABAAJwEQACjBKoEsgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAC6BMIECAAIAAgACAAIAAgACABmBAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAxwQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAGYECAAIAAgAzgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAigWKBYoFigWKBYoFigWKBd0FXwUIAOIF6gXxBYoF3gT5BQAGCAaKBYoFigWKBYoFigWKBYoFigWKBYoFigXWBIoFigWKBYoFigWKBYoFigWKBYsFEAaKBYoFigWKBYoFigWKBRQGCACKBYoFigWKBQgACAAIANEECAAIABgGigUgBggAJgYIAC4GMwaKBYoF0wQ3Bj4GigWKBYoFigWKBYoFigWKBYoFigWKBYoFigUIAAgACAAIAAgACAAIAAgAigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWLBf///////wQABAAEAAQABAAEAAQABAAEAAQAAwAEAAQAAgAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAQADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAUAAAAFAAUAAAAFAAUAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAEAAQABAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUAAQAAAAUABQAFAAUABQAFAAAAAAAFAAUAAAAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAFAAUAAQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABwAFAAUABQAFAAAABwAHAAcAAAAHAAcABwAFAAEAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAcABwAFAAUAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAAAAQABAAAAAAAAAAAAAAAFAAUABQAFAAAABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAcABwAHAAcAAAAHAAcAAAAAAAUABQAHAAUAAQAHAAEABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABwABAAUABQAFAAUAAAAAAAAAAAAAAAEAAQABAAEAAQABAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABwAFAAUAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUAAQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABQANAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABAAEAAQABAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAEAAQABAAEAAQABAAEAAQABAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAABQAHAAUABQAFAAAAAAAAAAcABQAFAAUABQAFAAQABAAEAAQABAAEAAQABAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUAAAAFAAUABQAFAAUAAAAFAAUABQAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAAAAAAAAAAAAUABQAFAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAUAAAAHAAcABwAFAAUABQAFAAUABQAFAAUABwAHAAcABwAFAAcABwAAAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAUABwAHAAUABQAFAAUAAAAAAAcABwAAAAAABwAHAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAABQAFAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAABwAHAAcABQAFAAAAAAAAAAAABQAFAAAAAAAFAAUABQAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAFAAUABQAFAAUAAAAFAAUABwAAAAcABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAFAAUABwAFAAUABQAFAAAAAAAHAAcAAAAAAAcABwAFAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAcABwAAAAAAAAAHAAcABwAAAAcABwAHAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAABQAHAAcABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAHAAcABwAAAAUABQAFAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAcABQAHAAcABQAHAAcAAAAFAAcABwAAAAcABwAFAAUAAAAAAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAUABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAFAAcABwAFAAUABQAAAAUAAAAHAAcABwAHAAcABwAHAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAHAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAABwAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAUAAAAFAAAAAAAAAAAABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABwAFAAUABQAFAAUAAAAFAAUAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABwAFAAUABQAFAAUABQAAAAUABQAHAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABQAFAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAcABQAFAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAHAAUABQAFAAUABQAFAAUABwAHAAcABwAHAAcABwAHAAUABwAHAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABwAHAAcABwAFAAUABwAHAAcAAAAAAAAAAAAHAAcABQAHAAcABwAHAAcABwAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAcABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAHAAUABQAFAAUABQAFAAUAAAAFAAAABQAAAAAABQAFAAUABQAFAAUABQAFAAcABwAHAAcABwAHAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAUABQAFAAUABQAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABwAFAAcABwAHAAcABwAFAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAUABQAFAAUABwAHAAUABQAHAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAcABQAFAAcABwAHAAUABwAFAAUABQAHAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABwAHAAcABwAHAAUABQAFAAUABQAFAAUABQAHAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAcABQAFAAUABQAFAAUABQAAAAAAAAAAAAUAAAAAAAAAAAAAAAAABQAAAAAABwAFAAUAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUAAAAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAABQAAAAAAAAAFAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAUABQAHAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAHAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAHAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAcABwAFAAUABQAFAAcABwAFAAUABwAHAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAcABwAFAAUABwAHAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAFAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAFAAUABQAAAAAABQAFAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAFAAcABwAAAAAAAAAAAAAABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAFAAcABwAFAAcABwAAAAcABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAFAAUABQAAAAUABQAAAAAAAAAAAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABwAFAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABQAFAAUABQAFAAUABQAFAAUABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAHAAcABQAHAAUABQAAAAAAAAAAAAAAAAAFAAAABwAHAAcABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAHAAcABwAAAAAABwAHAAAAAAAHAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAAAAAAFAAUABQAFAAUABQAFAAAAAAAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAUABQAFAAUABwAHAAUABQAFAAcABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAcABQAFAAUABQAFAAUABwAFAAcABwAFAAcABQAFAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAcABQAFAAUABQAAAAAABwAHAAcABwAFAAUABwAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAHAAUABQAFAAUABQAFAAUABQAHAAcABQAHAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAFAAcABwAFAAUABQAFAAUABQAHAAUAAAAAAAAAAAAAAAAAAAAAAAcABwAFAAUABQAFAAcABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAUABQAFAAUABQAHAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAAAAAAFAAUABwAHAAcABwAFAAAAAAAAAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABwAHAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAcABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAHAAUABQAFAAUABQAFAAUABwAFAAUABwAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUAAAAAAAAABQAAAAUABQAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAHAAcAAAAFAAUAAAAHAAcABQAHAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAAAAAAAAAAAAAAAAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAUABQAFAAAAAAAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAABQAFAAUABQAFAAUABQAAAAUABQAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAFAAUABQAFAAUADgAOAA4ADgAOAA4ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAAAAAAAAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAMAAwADAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkAAAAAAAAAAAAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAAAAAAAAAAAAsADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwACwAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAADgAOAA4AAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAAAA4ADgAOAA4ADgAOAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAA4AAAAOAAAAAAAAAAAAAAAAAA4AAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAADgAAAAAAAAAAAA4AAAAOAAAAAAAAAAAADgAOAA4AAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4AAAAAAA4ADgAOAA4ADgAOAA4ADgAOAAAADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4AAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAOAA4ADgAOAA4ADgAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAAAAAAA=",es="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",fi=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),Oi=0;Oi<es.length;Oi++)fi[es.charCodeAt(Oi)]=Oi;for(var PA=function(T){var p=T.length*.75,I=T.length,S,V=0,q,Ae,be,Ee;T[T.length-1]==="="&&(p--,T[T.length-2]==="="&&p--);var Oe=typeof ArrayBuffer!="undefined"&&typeof Uint8Array!="undefined"&&typeof Uint8Array.prototype.slice!="undefined"?new ArrayBuffer(p):new Array(p),ke=Array.isArray(Oe)?Oe:new Uint8Array(Oe);for(S=0;S<I;S+=4)q=fi[T.charCodeAt(S)],Ae=fi[T.charCodeAt(S+1)],be=fi[T.charCodeAt(S+2)],Ee=fi[T.charCodeAt(S+3)],ke[V++]=q<<2|Ae>>4,ke[V++]=(Ae&15)<<4|be>>2,ke[V++]=(be&3)<<6|Ee&63;return Oe},MA=function(T){for(var p=T.length,I=[],S=0;S<p;S+=2)I.push(T[S+1]<<8|T[S]);return I},kA=function(T){for(var p=T.length,I=[],S=0;S<p;S+=4)I.push(T[S+3]<<24|T[S+2]<<16|T[S+1]<<8|T[S]);return I},zn=5,ta=6+5,ra=2,HA=ta-zn,ts=65536>>zn,QA=1<<zn,na=QA-1,KA=1024>>zn,jA=ts+KA,WA=jA,GA=2048>>6,VA=WA+GA,zA=65536>>ta,XA=1<<HA,YA=XA-1,rs=function(T,p,I){return T.slice?T.slice(p,I):new Uint16Array(Array.prototype.slice.call(T,p,I))},JA=function(T,p,I){return T.slice?T.slice(p,I):new Uint32Array(Array.prototype.slice.call(T,p,I))},$A=function(T,p){var I=PA(T),S=Array.isArray(I)?kA(I):new Uint32Array(I),V=Array.isArray(I)?MA(I):new Uint16Array(I),q=24,Ae=rs(V,q/2,S[4]/2),be=S[5]===2?rs(V,(q+S[4])/2):JA(S,Math.ceil((q+S[4])/4));return new ZA(S[0],S[1],S[2],S[3],Ae,be)},ZA=function(){function T(p,I,S,V,q,Ae){this.initialValue=p,this.errorValue=I,this.highStart=S,this.highValueIndex=V,this.index=q,this.data=Ae}return T.prototype.get=function(p){var I;if(p>=0){if(p<55296||p>56319&&p<=65535)return I=this.index[p>>zn],I=(I<<ra)+(p&na),this.data[I];if(p<=65535)return I=this.index[ts+(p-55296>>zn)],I=(I<<ra)+(p&na),this.data[I];if(p<this.highStart)return I=VA-zA+(p>>ta),I=this.index[I],I+=p>>zn&YA,I=this.index[I],I=(I<<ra)+(p&na),this.data[I];if(p<=1114111)return this.data[this.highValueIndex]}return this.errorValue},T}(),ns="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",qA=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),Li=0;Li<ns.length;Li++)qA[ns.charCodeAt(Li)]=Li;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(T){for(var p=[],I=0,S=T.length;I<S;){var V=T.charCodeAt(I++);if(V>=55296&&V<=56319&&I<S){var q=T.charCodeAt(I++);(q&64512)===56320?p.push(((V&1023)<<10)+(q&1023)+65536):(p.push(V),I--)}else p.push(V)}return p},nl=function(){for(var T=[],p=0;p<arguments.length;p++)T[p]=arguments[p];if(String.fromCodePoint)return String.fromCodePoint.apply(String,T);var I=T.length;if(!I)return"";for(var S=[],V=-1,q="";++V<I;){var Ae=T[V];Ae<=65535?S.push(Ae):(Ae-=65536,S.push((Ae>>10)+55296,Ae%1024+56320)),(V+1===I||S.length>16384)&&(q+=String.fromCharCode.apply(String,S),S.length=0)}return q},il=$A(NA),fn="\xD7",la="\xF7",al=function(T){return il.get(T)},sl=function(T,p,I){var S=I-2,V=p[S],q=p[I-1],Ae=p[I];if(q===ia&&Ae===aa)return fn;if(q===ia||q===aa||q===is)return la;if(Ae===ia||Ae===aa||Ae===is)return la;if(q===ss&&[ss,sa,os,As].indexOf(Ae)!==-1)return fn;if((q===os||q===sa)&&(Ae===sa||Ae===oa))return fn;if((q===As||q===oa)&&Ae===oa)return fn;if(Ae===ls||Ae===as)return fn;if(Ae===tl)return fn;if(q===el)return fn;if(q===ls&&Ae===us){for(;V===as;)V=p[--S];if(V===us)return fn}if(q===Aa&&Ae===Aa){for(var be=0;V===Aa;)be++,V=p[--S];if(be%2===0)return fn}return la},ol=function(T){var p=rl(T),I=p.length,S=0,V=0,q=p.map(al);return{next:function(){if(S>=I)return{done:!0,value:null};for(var Ae=fn;S<I&&(Ae=sl(p,q,++S))===fn;);if(Ae!==fn||S===I){var be=nl.apply(null,p.slice(V,S));return V=S,{value:be,done:!1}}return{done:!0,value:null}}}},Al=function(T){for(var p=ol(T),I=[],S;!(S=p.next()).done;)S.value&&I.push(S.value.slice());return I},ll=function(T){var p=123;if(T.createRange){var I=T.createRange();if(I.getBoundingClientRect){var S=T.createElement("boundtest");S.style.height=p+"px",S.style.display="block",T.body.appendChild(S),I.selectNode(S);var V=I.getBoundingClientRect(),q=Math.round(V.height);if(T.body.removeChild(S),q===p)return!0}}return!1},ul=function(T){var p=T.createElement("boundtest");p.style.width="50px",p.style.display="block",p.style.fontSize="12px",p.style.letterSpacing="0px",p.style.wordSpacing="0px",T.body.appendChild(p);var I=T.createRange();p.innerHTML=typeof"".repeat=="function"?"👨".repeat(10):"";var S=p.firstChild,V=R(S.data).map(function(Ee){return f(Ee)}),q=0,Ae={},be=V.every(function(Ee,Oe){I.setStart(S,q),I.setEnd(S,q+Ee.length);var ke=I.getBoundingClientRect();q+=Ee.length;var Je=ke.x>Ae.x||ke.y>Ae.y;return Ae=ke,Oe===0?!0:Je});return T.body.removeChild(p),be},hl=function(){return typeof new Image().crossOrigin!="undefined"},cl=function(){return typeof new XMLHttpRequest().responseType=="string"},dl=function(T){var p=new Image,I=T.createElement("canvas"),S=I.getContext("2d");if(!S)return!1;p.src="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg'></svg>";try{S.drawImage(p,0,0),I.toDataURL()}catch(V){return!1}return!0},hs=function(T){return T[0]===0&&T[1]===255&&T[2]===0&&T[3]===255},fl=function(T){var p=T.createElement("canvas"),I=100;p.width=I,p.height=I;var S=p.getContext("2d");if(!S)return Promise.reject(!1);S.fillStyle="rgb(0, 255, 0)",S.fillRect(0,0,I,I);var V=new Image,q=p.toDataURL();V.src=q;var Ae=ua(I,I,0,0,V);return S.fillStyle="red",S.fillRect(0,0,I,I),cs(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 Oe=T.createElement("div");return Oe.style.backgroundImage="url("+q+")",Oe.style.height=I+"px",hs(Ee)?cs(ua(I,I,0,0,Oe)):Promise.reject(!1)}).then(function(be){return S.drawImage(be,0,0),hs(S.getImageData(0,0,I,I).data)}).catch(function(){return!1})},ua=function(T,p,I,S,V){var q="http://www.w3.org/2000/svg",Ae=document.createElementNS(q,"svg"),be=document.createElementNS(q,"foreignObject");return Ae.setAttributeNS(null,"width",T.toString()),Ae.setAttributeNS(null,"height",p.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(V),Ae},cs=function(T){return new Promise(function(p,I){var S=new Image;S.onload=function(){return p(S)},S.onerror=I,S.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(new XMLSerializer().serializeToString(T))})},Jr={get SUPPORT_RANGE_BOUNDS(){var T=ll(document);return Object.defineProperty(Jr,"SUPPORT_RANGE_BOUNDS",{value:T}),T},get SUPPORT_WORD_BREAKING(){var T=Jr.SUPPORT_RANGE_BOUNDS&&ul(document);return Object.defineProperty(Jr,"SUPPORT_WORD_BREAKING",{value:T}),T},get SUPPORT_SVG_DRAWING(){var T=dl(document);return Object.defineProperty(Jr,"SUPPORT_SVG_DRAWING",{value:T}),T},get SUPPORT_FOREIGNOBJECT_DRAWING(){var T=typeof Array.from=="function"&&typeof window.fetch=="function"?fl(document):Promise.resolve(!1);return Object.defineProperty(Jr,"SUPPORT_FOREIGNOBJECT_DRAWING",{value:T}),T},get SUPPORT_CORS_IMAGES(){var T=hl();return Object.defineProperty(Jr,"SUPPORT_CORS_IMAGES",{value:T}),T},get SUPPORT_RESPONSE_TYPE(){var T=cl();return Object.defineProperty(Jr,"SUPPORT_RESPONSE_TYPE",{value:T}),T},get SUPPORT_CORS_XHR(){var T="withCredentials"in new XMLHttpRequest;return Object.defineProperty(Jr,"SUPPORT_CORS_XHR",{value:T}),T},get SUPPORT_NATIVE_TEXT_SEGMENTATION(){var T=!!(typeof Intl!="undefined"&&Intl.Segmenter);return Object.defineProperty(Jr,"SUPPORT_NATIVE_TEXT_SEGMENTATION",{value:T}),T}},pi=function(){function T(p,I){this.text=p,this.bounds=I}return T}(),pl=function(T,p,I,S){var V=vl(p,I),q=[],Ae=0;return V.forEach(function(be){if(I.textDecorationLine.length||be.trim().length>0)if(Jr.SUPPORT_RANGE_BOUNDS){var Ee=ds(S,Ae,be.length).getClientRects();if(Ee.length>1){var Oe=ha(be),ke=0;Oe.forEach(function(Ze){q.push(new pi(Ze,X.fromDOMRectList(T,ds(S,ke+Ae,Ze.length).getClientRects()))),ke+=Ze.length})}else q.push(new pi(be,X.fromDOMRectList(T,Ee)))}else{var Je=S.splitText(be.length);q.push(new pi(be,ml(T,S))),S=Je}else Jr.SUPPORT_RANGE_BOUNDS||(S=S.splitText(be.length));Ae+=be.length}),q},ml=function(T,p){var I=p.ownerDocument;if(I){var S=I.createElement("html2canvaswrapper");S.appendChild(p.cloneNode(!0));var V=p.parentNode;if(V){V.replaceChild(S,p);var q=M(T,S);return S.firstChild&&V.replaceChild(S.firstChild,S),q}}return X.EMPTY},ds=function(T,p,I){var S=T.ownerDocument;if(!S)throw new Error("Node has no owner document");var V=S.createRange();return V.setStart(T,p),V.setEnd(T,p+I),V},ha=function(T){if(Jr.SUPPORT_NATIVE_TEXT_SEGMENTATION){var p=new Intl.Segmenter(void 0,{granularity:"grapheme"});return Array.from(p.segment(T)).map(function(I){return I.segment})}return Al(T)},gl=function(T,p){if(Jr.SUPPORT_NATIVE_TEXT_SEGMENTATION){var I=new Intl.Segmenter(void 0,{granularity:"word"});return Array.from(I.segment(T)).map(function(S){return S.segment})}return El(T,p)},vl=function(T,p){return p.letterSpacing!==0?ha(T):gl(T,p)},yl=[32,160,4961,65792,65793,4153,4241],El=function(T,p){for(var I=Pr(T,{lineBreak:p.lineBreak,wordBreak:p.overflowWrap==="break-word"?"break-word":p.wordBreak}),S=[],V,q=function(){if(V.value){var Ae=V.value.slice(),be=R(Ae),Ee="";be.forEach(function(Oe){yl.indexOf(Oe)===-1?Ee+=f(Oe):(Ee.length&&S.push(Ee),S.push(f(Oe)),Ee="")}),Ee.length&&S.push(Ee)}};!(V=I.next()).done;)q();return S},bl=function(){function T(p,I,S){this.text=_l(I.data,S.textTransform),this.textBounds=pl(p,this.text,S,I)}return T}(),_l=function(T,p){switch(p){case 1:return T.toLowerCase();case 3:return T.replace(wl,Cl);case 2:return T.toUpperCase();default:return T}},wl=/(^|\s|:|-|\(|\))([a-z])/g,Cl=function(T,p,I){return T.length>0?p+I.toUpperCase():T},fs=function(T){G(p,T);function p(I,S){var V=T.call(this,I,S)||this;return V.src=S.currentSrc||S.src,V.intrinsicWidth=S.naturalWidth,V.intrinsicHeight=S.naturalHeight,V.context.cache.addImage(V.src),V}return p}(Bn),ps=function(T){G(p,T);function p(I,S){var V=T.call(this,I,S)||this;return V.canvas=S,V.intrinsicWidth=S.width,V.intrinsicHeight=S.height,V}return p}(Bn),ms=function(T){G(p,T);function p(I,S){var V=T.call(this,I,S)||this,q=new XMLSerializer,Ae=M(I,S);return S.setAttribute("width",Ae.width+"px"),S.setAttribute("height",Ae.height+"px"),V.svg="data:image/svg+xml,"+encodeURIComponent(q.serializeToString(S)),V.intrinsicWidth=S.width.baseVal.value,V.intrinsicHeight=S.height.baseVal.value,V.context.cache.addImage(V.svg),V}return p}(Bn),gs=function(T){G(p,T);function p(I,S){var V=T.call(this,I,S)||this;return V.value=S.value,V}return p}(Bn),ca=function(T){G(p,T);function p(I,S){var V=T.call(this,I,S)||this;return V.start=S.start,V.reversed=typeof S.reversed=="boolean"&&S.reversed===!0,V}return p}(Bn),Tl=[{type:15,flags:0,unit:"px",number:3}],Bl=[{type:16,flags:0,number:50}],xl=function(T){return T.width>T.height?new X(T.left+(T.width-T.height)/2,T.top,T.height,T.height):T.width<T.height?new X(T.left,T.top+(T.height-T.width)/2,T.width,T.width):T},Sl=function(T){var p=T.type===Il?new Array(T.value.length+1).join("\u2022"):T.value;return p.length===0?T.placeholder||"":p},Di="checkbox",Ui="radio",Il="password",vs=707406591,da=function(T){G(p,T);function p(I,S){var V=T.call(this,I,S)||this;V.type=S.type.toLowerCase(),V.checked=S.checked,V.value=Sl(S),(V.type===Di||V.type===Ui)&&(V.styles.backgroundColor=3739148031,V.styles.borderTopColor=V.styles.borderRightColor=V.styles.borderBottomColor=V.styles.borderLeftColor=2779096575,V.styles.borderTopWidth=V.styles.borderRightWidth=V.styles.borderBottomWidth=V.styles.borderLeftWidth=1,V.styles.borderTopStyle=V.styles.borderRightStyle=V.styles.borderBottomStyle=V.styles.borderLeftStyle=1,V.styles.backgroundClip=[0],V.styles.backgroundOrigin=[0],V.bounds=xl(V.bounds));switch(V.type){case Di:V.styles.borderTopRightRadius=V.styles.borderTopLeftRadius=V.styles.borderBottomRightRadius=V.styles.borderBottomLeftRadius=Tl;break;case Ui:V.styles.borderTopRightRadius=V.styles.borderTopLeftRadius=V.styles.borderBottomRightRadius=V.styles.borderBottomLeftRadius=Bl;break}return V}return p}(Bn),ys=function(T){G(p,T);function p(I,S){var V=T.call(this,I,S)||this,q=S.options[S.selectedIndex||0];return V.value=q&&q.text||"",V}return p}(Bn),Es=function(T){G(p,T);function p(I,S){var V=T.call(this,I,S)||this;return V.value=S.value,V}return p}(Bn),bs=function(T){G(p,T);function p(I,S){var V=T.call(this,I,S)||this;V.src=S.src,V.width=parseInt(S.width,10)||0,V.height=parseInt(S.height,10)||0,V.backgroundColor=V.styles.backgroundColor;try{if(S.contentWindow&&S.contentWindow.document&&S.contentWindow.document.documentElement){V.tree=ws(I,S.contentWindow.document.documentElement);var q=S.contentWindow.document.documentElement?ci(I,getComputedStyle(S.contentWindow.document.documentElement).backgroundColor):On.TRANSPARENT,Ae=S.contentWindow.document.body?ci(I,getComputedStyle(S.contentWindow.document.body).backgroundColor):On.TRANSPARENT;V.backgroundColor=kn(q)?kn(Ae)?V.styles.backgroundColor:Ae:q}}catch(be){}return V}return p}(Bn),Rl=["OL","UL","MENU"],Fi=function(T,p,I,S){for(var V=p.firstChild,q=void 0;V;V=q)if(q=V.nextSibling,Cs(V)&&V.data.trim().length>0)I.textNodes.push(new bl(T,V,I.styles));else if(ri(V))if(Rs(V)&&V.assignedNodes)V.assignedNodes().forEach(function(be){return Fi(T,be,I,S)});else{var Ae=_s(T,V);Ae.styles.isVisible()&&(Ol(V,Ae,S)?Ae.flags|=4:Ll(Ae.styles)&&(Ae.flags|=2),Rl.indexOf(V.tagName)!==-1&&(Ae.flags|=8),I.elements.push(Ae),V.slot,V.shadowRoot?Fi(T,V.shadowRoot,Ae,S):!Pi(V)&&!Ts(V)&&!Mi(V)&&Fi(T,V,Ae,S))}},_s=function(T,p){return ma(p)?new fs(T,p):Bs(p)?new ps(T,p):Ts(p)?new ms(T,p):Dl(p)?new gs(T,p):Ul(p)?new ca(T,p):Fl(p)?new da(T,p):Mi(p)?new ys(T,p):Pi(p)?new Es(T,p):Ss(p)?new bs(T,p):new Bn(T,p)},ws=function(T,p){var I=_s(T,p);return I.flags|=4,Fi(T,p,I,I),I},Ol=function(T,p,I){return p.styles.isPositionedWithZIndex()||p.styles.opacity<1||p.styles.isTransformed()||pa(T)&&I.styles.isTransparent()},Ll=function(T){return T.isPositioned()||T.isFloating()},Cs=function(T){return T.nodeType===Node.TEXT_NODE},ri=function(T){return T.nodeType===Node.ELEMENT_NODE},fa=function(T){return ri(T)&&typeof T.style!="undefined"&&!Ni(T)},Ni=function(T){return typeof T.className=="object"},Dl=function(T){return T.tagName==="LI"},Ul=function(T){return T.tagName==="OL"},Fl=function(T){return T.tagName==="INPUT"},Nl=function(T){return T.tagName==="HTML"},Ts=function(T){return T.tagName==="svg"},pa=function(T){return T.tagName==="BODY"},Bs=function(T){return T.tagName==="CANVAS"},xs=function(T){return T.tagName==="VIDEO"},ma=function(T){return T.tagName==="IMG"},Ss=function(T){return T.tagName==="IFRAME"},Is=function(T){return T.tagName==="STYLE"},Pl=function(T){return T.tagName==="SCRIPT"},Pi=function(T){return T.tagName==="TEXTAREA"},Mi=function(T){return T.tagName==="SELECT"},Rs=function(T){return T.tagName==="SLOT"},Os=function(T){return T.tagName.indexOf("-")>0},Ml=function(){function T(){this.counters={}}return T.prototype.getCounterValue=function(p){var I=this.counters[p];return I&&I.length?I[I.length-1]:1},T.prototype.getCounterValues=function(p){var I=this.counters[p];return I||[]},T.prototype.pop=function(p){var I=this;p.forEach(function(S){return I.counters[S].pop()})},T.prototype.parse=function(p){var I=this,S=p.counterIncrement,V=p.counterReset,q=!0;S!==null&&S.forEach(function(be){var Ee=I.counters[be.counter];Ee&&be.increment!==0&&(q=!1,Ee.length||Ee.push(1),Ee[Math.max(0,Ee.length-1)]+=be.increment)});var Ae=[];return q&&V.forEach(function(be){var Ee=I.counters[be.counter];Ae.push(be.counter),Ee||(Ee=I.counters[be.counter]=[]),Ee.push(be.reset)}),Ae},T}(),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"]},ni=function(T,p,I,S,V,q){return T<p||T>I?gi(T,V,q.length>0):S.integers.reduce(function(Ae,be,Ee){for(;T>=be;)T-=be,Ae+=S.values[Ee];return Ae},"")+q},Us=function(T,p,I,S){var V="";do I||T--,V=S(T)+V,T/=p;while(T*p>=p);return V},Mr=function(T,p,I,S,V){var q=I-p+1;return(T<0?"-":"")+(Us(Math.abs(T),q,S,function(Ae){return f(Math.floor(Ae%q)+p)})+V)},Xn=function(T,p,I){I===void 0&&(I=". ");var S=p.length;return Us(Math.abs(T),S,!1,function(V){return p[Math.floor(V%S)]})+I},ii=1<<0,Qn=1<<1,Kn=1<<2,mi=1<<3,Ln=function(T,p,I,S,V,q){if(T<-9999||T>9999)return gi(T,4,V.length>0);var Ae=Math.abs(T),be=V;if(Ae===0)return p[0]+be;for(var Ee=0;Ae>0&&Ee<=4;Ee++){var Oe=Ae%10;Oe===0&&Wr(q,ii)&&be!==""?be=p[Oe]+be:Oe>1||Oe===1&&Ee===0||Oe===1&&Ee===1&&Wr(q,Qn)||Oe===1&&Ee===1&&Wr(q,Kn)&&T>100||Oe===1&&Ee>1&&Wr(q,mi)?be=p[Oe]+(Ee>0?I[Ee-1]:"")+be:Oe===1&&Ee>0&&(be=I[Ee-1]+be),Ae=Math.floor(Ae/10)}return(T<0?S:"")+be},Fs="\u5341\u767E\u5343\u842C",Ns="\u62FE\u4F70\u4EDF\u842C",Ps="\u30DE\u30A4\u30CA\u30B9",ga="\uB9C8\uC774\uB108\uC2A4",gi=function(T,p,I){var S=I?". ":"",V=I?"\u3001":"",q=I?", ":"",Ae=I?" ":"";switch(p){case 0:return"\u2022"+Ae;case 1:return"\u25E6"+Ae;case 2:return"\u25FE"+Ae;case 5:var be=Mr(T,48,57,!0,S);return be.length<4?"0"+be:be;case 4:return Xn(T,"\u3007\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D",V);case 6:return ni(T,1,3999,Ls,3,S).toLowerCase();case 7:return ni(T,1,3999,Ls,3,S);case 8:return Mr(T,945,969,!1,S);case 9:return Mr(T,97,122,!1,S);case 10:return Mr(T,65,90,!1,S);case 11:return Mr(T,1632,1641,!0,S);case 12:case 49:return ni(T,1,9999,Ds,3,S);case 35:return ni(T,1,9999,Ds,3,S).toLowerCase();case 13:return Mr(T,2534,2543,!0,S);case 14:case 30:return Mr(T,6112,6121,!0,S);case 15:return Xn(T,"\u5B50\u4E11\u5BC5\u536F\u8FB0\u5DF3\u5348\u672A\u7533\u9149\u620C\u4EA5",V);case 16:return Xn(T,"\u7532\u4E59\u4E19\u4E01\u620A\u5DF1\u5E9A\u8F9B\u58EC\u7678",V);case 17:case 48:return Ln(T,"\u96F6\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D",Fs,"\u8CA0",V,Qn|Kn|mi);case 47:return Ln(T,"\u96F6\u58F9\u8CB3\u53C3\u8086\u4F0D\u9678\u67D2\u634C\u7396",Ns,"\u8CA0",V,ii|Qn|Kn|mi);case 42:return Ln(T,"\u96F6\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D",Fs,"\u8D1F",V,Qn|Kn|mi);case 41:return Ln(T,"\u96F6\u58F9\u8D30\u53C1\u8086\u4F0D\u9646\u67D2\u634C\u7396",Ns,"\u8D1F",V,ii|Qn|Kn|mi);case 26:return Ln(T,"\u3007\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D","\u5341\u767E\u5343\u4E07",Ps,V,0);case 25:return Ln(T,"\u96F6\u58F1\u5F10\u53C2\u56DB\u4F0D\u516D\u4E03\u516B\u4E5D","\u62FE\u767E\u5343\u4E07",Ps,V,ii|Qn|Kn);case 31:return Ln(T,"\uC601\uC77C\uC774\uC0BC\uC0AC\uC624\uC721\uCE60\uD314\uAD6C","\uC2ED\uBC31\uCC9C\uB9CC",ga,q,ii|Qn|Kn);case 33:return Ln(T,"\u96F6\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D","\u5341\u767E\u5343\u842C",ga,q,0);case 32:return Ln(T,"\u96F6\u58F9\u8CB3\u53C3\u56DB\u4E94\u516D\u4E03\u516B\u4E5D","\u62FE\u767E\u5343",ga,q,ii|Qn|Kn);case 18:return Mr(T,2406,2415,!0,S);case 20:return ni(T,1,19999,Hl,3,S);case 21:return Mr(T,2790,2799,!0,S);case 22:return Mr(T,2662,2671,!0,S);case 22:return ni(T,1,10999,kl,3,S);case 23:return Xn(T,"\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 Xn(T,"\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(T,3302,3311,!0,S);case 28:return Xn(T,"\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",V);case 29:return Xn(T,"\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",V);case 34:return Mr(T,3792,3801,!0,S);case 37:return Mr(T,6160,6169,!0,S);case 38:return Mr(T,4160,4169,!0,S);case 39:return Mr(T,2918,2927,!0,S);case 40:return Mr(T,1776,1785,!0,S);case 43:return Mr(T,3046,3055,!0,S);case 44:return Mr(T,3174,3183,!0,S);case 45:return Mr(T,3664,3673,!0,S);case 46:return Mr(T,3872,3881,!0,S);case 3:default:return Mr(T,48,57,!0,S)}},Ms="data-html2canvas-ignore",ks=function(){function T(p,I,S){if(this.context=p,this.options=S,this.scrolledElements=[],this.referenceElement=I,this.counters=new Ml,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 T.prototype.toIFrame=function(p,I){var S=this,V=Ql(p,I);if(!V.contentWindow)return Promise.reject("Unable to find iframe window");var q=p.defaultView.pageXOffset,Ae=p.defaultView.pageYOffset,be=V.contentWindow,Ee=be.document,Oe=Wl(V).then(function(){return j(S,void 0,void 0,function(){var ke,Je;return N(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))),ke=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 ke=="function"?[2,Promise.resolve().then(function(){return ke(Ee,Je)}).then(function(){return V})]:[2,V]}})})});return Ee.open(),Ee.write(Vl(document.doctype)+"<html></html>"),zl(this.referenceElement.ownerDocument,q,Ae),Ee.replaceChild(Ee.adoptNode(this.documentElement),Ee.documentElement),Ee.close(),Oe},T.prototype.createElementClone=function(p){if(ea(p,2))debugger;if(Bs(p))return this.createCanvasClone(p);if(xs(p))return this.createVideoClone(p);if(Is(p))return this.createStyleClone(p);var I=p.cloneNode(!1);return ma(I)&&(ma(p)&&p.currentSrc&&p.currentSrc!==p.src&&(I.src=p.currentSrc,I.srcset=""),I.loading==="lazy"&&(I.loading="eager")),Os(I)?this.createCustomElementClone(I):I},T.prototype.createCustomElementClone=function(p){var I=document.createElement("html2canvascustomelement");return va(p.style,I),I},T.prototype.createStyleClone=function(p){try{var I=p.sheet;if(I&&I.cssRules){var S=[].slice.call(I.cssRules,0).reduce(function(q,Ae){return Ae&&typeof Ae.cssText=="string"?q+Ae.cssText:q},""),V=p.cloneNode(!1);return V.textContent=S,V}}catch(q){if(this.context.logger.error("Unable to access cssRules property",q),q.name!=="SecurityError")throw q}return p.cloneNode(!1)},T.prototype.createCanvasClone=function(p){var I;if(this.options.inlineImages&&p.ownerDocument){var S=p.ownerDocument.createElement("img");try{return S.src=p.toDataURL(),S}catch(Oe){this.context.logger.info("Unable to inline canvas contents, canvas is tainted",p)}}var V=p.cloneNode(!1);try{V.width=p.width,V.height=p.height;var q=p.getContext("2d"),Ae=V.getContext("2d");if(Ae)if(!this.options.allowTaint&&q)Ae.putImageData(q.getImageData(0,0,p.width,p.height),0,0);else{var be=(I=p.getContext("webgl2"))!==null&&I!==void 0?I:p.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",p)}Ae.drawImage(p,0,0)}return V}catch(Oe){this.context.logger.info("Unable to clone canvas as it is tainted",p)}return V},T.prototype.createVideoClone=function(p){var I=p.ownerDocument.createElement("canvas");I.width=p.offsetWidth,I.height=p.offsetHeight;var S=I.getContext("2d");try{return S&&(S.drawImage(p,0,0,I.width,I.height),this.options.allowTaint||S.getImageData(0,0,I.width,I.height)),I}catch(q){this.context.logger.info("Unable to clone video as it is tainted",p)}var V=p.ownerDocument.createElement("canvas");return V.width=p.offsetWidth,V.height=p.offsetHeight,V},T.prototype.appendChildNode=function(p,I,S){(!ri(I)||!Pl(I)&&!I.hasAttribute(Ms)&&(typeof this.options.ignoreElements!="function"||!this.options.ignoreElements(I)))&&((!this.options.copyStyles||!ri(I)||!Is(I))&&p.appendChild(this.cloneNode(I,S)))},T.prototype.cloneChildNodes=function(p,I,S){for(var V=this,q=p.shadowRoot?p.shadowRoot.firstChild:p.firstChild;q;q=q.nextSibling)if(ri(q)&&Rs(q)&&typeof q.assignedNodes=="function"){var Ae=q.assignedNodes();Ae.length&&Ae.forEach(function(be){return V.appendChildNode(I,be,S)})}else this.appendChildNode(I,q,S)},T.prototype.cloneNode=function(p,I){if(Cs(p))return document.createTextNode(p.data);if(!p.ownerDocument)return p.cloneNode(!1);var S=p.ownerDocument.defaultView;if(S&&ri(p)&&(fa(p)||Ni(p))){var V=this.createElementClone(p);V.style.transitionProperty="none";var q=S.getComputedStyle(p),Ae=S.getComputedStyle(p,":before"),be=S.getComputedStyle(p,":after");this.referenceElement===p&&fa(V)&&(this.clonedReferenceElement=V),pa(V)&&$l(V);var Ee=this.counters.parse(new qa(this.context,q)),Oe=this.resolvePseudoContent(p,V,Ae,vi.BEFORE);Os(p)&&(I=!0),xs(p)||this.cloneChildNodes(p,V,I),Oe&&V.insertBefore(Oe,V.firstChild);var ke=this.resolvePseudoContent(p,V,be,vi.AFTER);return ke&&V.appendChild(ke),this.counters.pop(Ee),(q&&(this.options.copyStyles||Ni(p))&&!Ss(p)||I)&&va(q,V),(p.scrollTop!==0||p.scrollLeft!==0)&&this.scrolledElements.push([V,p.scrollLeft,p.scrollTop]),(Pi(p)||Mi(p))&&(Pi(V)||Mi(V))&&(V.value=p.value),V}return p.cloneNode(!1)},T.prototype.resolvePseudoContent=function(p,I,S,V){var q=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),Oe=be.createElement("html2canvaspseudoelement");va(S,Oe),Ee.content.forEach(function(Je){if(Je.type===0)Oe.appendChild(be.createTextNode(Je.value));else if(Je.type===22){var Ze=be.createElement("img");Ze.src=Je.value,Ze.style.opacity="1",Oe.appendChild(Ze)}else if(Je.type===18){if(Je.name==="attr"){var bt=Je.values.filter(br);bt.length&&Oe.appendChild(be.createTextNode(p.getAttribute(bt[0].value)||""))}else if(Je.name==="counter"){var ht=Je.values.filter(ei),gt=ht[0],Pt=ht[1];if(gt&&br(gt)){var yt=q.counters.getCounterValue(gt.value),Tt=Pt&&br(Pt)?qi.parse(q.context,Pt.value):3;Oe.appendChild(be.createTextNode(gi(yt,Tt,!1)))}}else if(Je.name==="counters"){var sr=Je.values.filter(ei),gt=sr[0],Zt=sr[1],Pt=sr[2];if(gt&&br(gt)){var ur=q.counters.getCounterValues(gt.value),_t=Pt&&br(Pt)?qi.parse(q.context,Pt.value):3,Ar=Zt&&Zt.type===0?Zt.value:"",hr=ur.map(function(rn){return gi(rn,_t,!1)}).join(Ar);Oe.appendChild(be.createTextNode(hr))}}}else if(Je.type===20)switch(Je.value){case"open-quote":Oe.appendChild(be.createTextNode(Za(Ee.quotes,q.quoteDepth++,!0)));break;case"close-quote":Oe.appendChild(be.createTextNode(Za(Ee.quotes,--q.quoteDepth,!1)));break;default:Oe.appendChild(be.createTextNode(Je.value))}}),Oe.className=ya+" "+Ea;var ke=V===vi.BEFORE?" "+ya:" "+Ea;return Ni(I)?I.className.baseValue+=ke:I.className+=ke,Oe},T.destroy=function(p){return p.parentNode?(p.parentNode.removeChild(p),!0):!1},T}(),vi;(function(T){T[T.BEFORE=0]="BEFORE",T[T.AFTER=1]="AFTER"})(vi||(vi={}));var Ql=function(T,p){var I=T.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=p.width.toString(),I.height=p.height.toString(),I.scrolling="no",I.setAttribute(Ms,"true"),T.body.appendChild(I),I},Kl=function(T){return new Promise(function(p){if(T.complete){p();return}if(!T.src){p();return}T.onload=p,T.onerror=p})},jl=function(T){return Promise.all([].slice.call(T.images,0).map(Kl))},Wl=function(T){return new Promise(function(p,I){var S=T.contentWindow;if(!S)return I("No window assigned for iframe");var V=S.document;S.onload=T.onload=function(){S.onload=T.onload=null;var q=setInterval(function(){V.body.childNodes.length>0&&V.readyState==="complete"&&(clearInterval(q),p(T))},50)}})},Gl=["all","d","content"],va=function(T,p){for(var I=T.length-1;I>=0;I--){var S=T.item(I);Gl.indexOf(S)===-1&&p.style.setProperty(S,T.getPropertyValue(S))}return p},Vl=function(T){var p="";return T&&(p+="<!DOCTYPE ",T.name&&(p+=T.name),T.internalSubset&&(p+=T.internalSubset),T.publicId&&(p+='"'+T.publicId+'"'),T.systemId&&(p+='"'+T.systemId+'"'),p+=">"),p},zl=function(T,p,I){T&&T.defaultView&&(p!==T.defaultView.pageXOffset||I!==T.defaultView.pageYOffset)&&T.defaultView.scrollTo(p,I)},Xl=function(T){var p=T[0],I=T[1],S=T[2];p.scrollLeft=I,p.scrollTop=S},Yl=":before",Jl=":after",ya="___html2canvas___pseudoelement_before",Ea="___html2canvas___pseudoelement_after",Hs=`{
|
|
content: "" !important;
|
|
display: none !important;
|
|
}`,$l=function(T){Zl(T,"."+ya+Yl+Hs+`
|
|
.`+Ea+Jl+Hs)},Zl=function(T,p){var I=T.ownerDocument;if(I){var S=I.createElement("style");S.textContent=p,T.appendChild(S)}},Qs=function(){function T(){}return T.getOrigin=function(p){var I=T._link;return I?(I.href=p,I.href=I.href,I.protocol+I.hostname+I.port):"about:blank"},T.isSameOrigin=function(p){return T.getOrigin(p)===T._origin},T.setContext=function(p){T._link=p.document.createElement("a"),T._origin=T.getOrigin(p.location.href)},T._origin="about:blank",T}(),ql=function(){function T(p,I){this.context=p,this._options=I,this._cache={}}return T.prototype.addImage=function(p){var I=Promise.resolve();return this.has(p)||(_a(p)||nu(p))&&(this._cache[p]=this.loadImage(p)).catch(function(){}),I},T.prototype.match=function(p){return this._cache[p]},T.prototype.loadImage=function(p){return j(this,void 0,void 0,function(){var I,S,V,q,Ae=this;return N(this,function(be){switch(be.label){case 0:return I=Qs.isSameOrigin(p),S=!ba(p)&&this._options.useCORS===!0&&Jr.SUPPORT_CORS_IMAGES&&!I,V=!ba(p)&&!I&&!_a(p)&&typeof this._options.proxy=="string"&&Jr.SUPPORT_CORS_XHR&&!S,!I&&this._options.allowTaint===!1&&!ba(p)&&!_a(p)&&!V&&!S?[2]:(q=p,V?[4,this.proxy(q)]:[3,2]);case 1:q=be.sent(),be.label=2;case 2:return this.context.logger.debug("Added image "+p.substring(0,256)),[4,new Promise(function(Ee,Oe){var ke=new Image;ke.onload=function(){return Ee(ke)},ke.onerror=Oe,(iu(q)||S)&&(ke.crossOrigin="anonymous"),ke.src=q,ke.complete===!0&&setTimeout(function(){return Ee(ke)},500),Ae._options.imageTimeout>0&&setTimeout(function(){return Oe("Timed out ("+Ae._options.imageTimeout+"ms) loading image")},Ae._options.imageTimeout)})];case 3:return[2,be.sent()]}})})},T.prototype.has=function(p){return typeof this._cache[p]!="undefined"},T.prototype.keys=function(){return Promise.resolve(Object.keys(this._cache))},T.prototype.proxy=function(p){var I=this,S=this._options.proxy;if(!S)throw new Error("No proxy defined");var V=p.substring(0,256);return new Promise(function(q,Ae){var be=Jr.SUPPORT_RESPONSE_TYPE?"blob":"text",Ee=new XMLHttpRequest;Ee.onload=function(){if(Ee.status===200)if(be==="text")q(Ee.response);else{var Je=new FileReader;Je.addEventListener("load",function(){return q(Je.result)},!1),Je.addEventListener("error",function(Ze){return Ae(Ze)},!1),Je.readAsDataURL(Ee.response)}else Ae("Failed to proxy resource "+V+" with status code "+Ee.status)},Ee.onerror=Ae;var Oe=S.indexOf("?")>-1?"&":"?";if(Ee.open("GET",""+S+Oe+"url="+encodeURIComponent(p)+"&responseType="+be),be!=="text"&&Ee instanceof XMLHttpRequest&&(Ee.responseType=be),I._options.imageTimeout){var ke=I._options.imageTimeout;Ee.timeout=ke,Ee.ontimeout=function(){return Ae("Timed out ("+ke+"ms) proxying "+V)}}Ee.send()})},T}(),eu=/^data:image\/svg\+xml/i,tu=/^data:image\/.*;base64,/i,ru=/^data:image\/.*/i,nu=function(T){return Jr.SUPPORT_SVG_DRAWING||!au(T)},ba=function(T){return ru.test(T)},iu=function(T){return tu.test(T)},_a=function(T){return T.substr(0,4)==="blob"},au=function(T){return T.substr(-3).toLowerCase()==="svg"||eu.test(T)},vt=function(){function T(p,I){this.type=0,this.x=p,this.y=I}return T.prototype.add=function(p,I){return new T(this.x+p,this.y+I)},T}(),ai=function(T,p,I){return new vt(T.x+(p.x-T.x)*I,T.y+(p.y-T.y)*I)},ki=function(){function T(p,I,S,V){this.type=1,this.start=p,this.startControl=I,this.endControl=S,this.end=V}return T.prototype.subdivide=function(p,I){var S=ai(this.start,this.startControl,p),V=ai(this.startControl,this.endControl,p),q=ai(this.endControl,this.end,p),Ae=ai(S,V,p),be=ai(V,q,p),Ee=ai(Ae,be,p);return I?new T(this.start,S,Ae,Ee):new T(Ee,be,q,this.end)},T.prototype.add=function(p,I){return new T(this.start.add(p,I),this.startControl.add(p,I),this.endControl.add(p,I),this.end.add(p,I))},T.prototype.reverse=function(){return new T(this.end,this.endControl,this.startControl,this.start)},T}(),pn=function(T){return T.type===1},su=function(){function T(p){var I=p.styles,S=p.bounds,V=hi(I.borderTopLeftRadius,S.width,S.height),q=V[0],Ae=V[1],be=hi(I.borderTopRightRadius,S.width,S.height),Ee=be[0],Oe=be[1],ke=hi(I.borderBottomRightRadius,S.width,S.height),Je=ke[0],Ze=ke[1],bt=hi(I.borderBottomLeftRadius,S.width,S.height),ht=bt[0],gt=bt[1],Pt=[];Pt.push((q+Ee)/S.width),Pt.push((ht+Je)/S.width),Pt.push((Ae+gt)/S.height),Pt.push((Oe+Ze)/S.height);var yt=Math.max.apply(Math,Pt);yt>1&&(q/=yt,Ae/=yt,Ee/=yt,Oe/=yt,Je/=yt,Ze/=yt,ht/=yt,gt/=yt);var Tt=S.width-Ee,sr=S.height-Ze,Zt=S.width-Je,ur=S.height-gt,_t=I.borderTopWidth,Ar=I.borderRightWidth,hr=I.borderBottomWidth,$t=I.borderLeftWidth,ln=Cr(I.paddingTop,p.bounds.width),rn=Cr(I.paddingRight,p.bounds.width),cn=Cr(I.paddingBottom,p.bounds.width),Vr=Cr(I.paddingLeft,p.bounds.width);this.topLeftBorderDoubleOuterBox=q>0||Ae>0?Or(S.left+$t/3,S.top+_t/3,q-$t/3,Ae-_t/3,cr.TOP_LEFT):new vt(S.left+$t/3,S.top+_t/3),this.topRightBorderDoubleOuterBox=q>0||Ae>0?Or(S.left+Tt,S.top+_t/3,Ee-Ar/3,Oe-_t/3,cr.TOP_RIGHT):new vt(S.left+S.width-Ar/3,S.top+_t/3),this.bottomRightBorderDoubleOuterBox=Je>0||Ze>0?Or(S.left+Zt,S.top+sr,Je-Ar/3,Ze-hr/3,cr.BOTTOM_RIGHT):new vt(S.left+S.width-Ar/3,S.top+S.height-hr/3),this.bottomLeftBorderDoubleOuterBox=ht>0||gt>0?Or(S.left+$t/3,S.top+ur,ht-$t/3,gt-hr/3,cr.BOTTOM_LEFT):new vt(S.left+$t/3,S.top+S.height-hr/3),this.topLeftBorderDoubleInnerBox=q>0||Ae>0?Or(S.left+$t*2/3,S.top+_t*2/3,q-$t*2/3,Ae-_t*2/3,cr.TOP_LEFT):new vt(S.left+$t*2/3,S.top+_t*2/3),this.topRightBorderDoubleInnerBox=q>0||Ae>0?Or(S.left+Tt,S.top+_t*2/3,Ee-Ar*2/3,Oe-_t*2/3,cr.TOP_RIGHT):new vt(S.left+S.width-Ar*2/3,S.top+_t*2/3),this.bottomRightBorderDoubleInnerBox=Je>0||Ze>0?Or(S.left+Zt,S.top+sr,Je-Ar*2/3,Ze-hr*2/3,cr.BOTTOM_RIGHT):new vt(S.left+S.width-Ar*2/3,S.top+S.height-hr*2/3),this.bottomLeftBorderDoubleInnerBox=ht>0||gt>0?Or(S.left+$t*2/3,S.top+ur,ht-$t*2/3,gt-hr*2/3,cr.BOTTOM_LEFT):new vt(S.left+$t*2/3,S.top+S.height-hr*2/3),this.topLeftBorderStroke=q>0||Ae>0?Or(S.left+$t/2,S.top+_t/2,q-$t/2,Ae-_t/2,cr.TOP_LEFT):new vt(S.left+$t/2,S.top+_t/2),this.topRightBorderStroke=q>0||Ae>0?Or(S.left+Tt,S.top+_t/2,Ee-Ar/2,Oe-_t/2,cr.TOP_RIGHT):new vt(S.left+S.width-Ar/2,S.top+_t/2),this.bottomRightBorderStroke=Je>0||Ze>0?Or(S.left+Zt,S.top+sr,Je-Ar/2,Ze-hr/2,cr.BOTTOM_RIGHT):new vt(S.left+S.width-Ar/2,S.top+S.height-hr/2),this.bottomLeftBorderStroke=ht>0||gt>0?Or(S.left+$t/2,S.top+ur,ht-$t/2,gt-hr/2,cr.BOTTOM_LEFT):new vt(S.left+$t/2,S.top+S.height-hr/2),this.topLeftBorderBox=q>0||Ae>0?Or(S.left,S.top,q,Ae,cr.TOP_LEFT):new vt(S.left,S.top),this.topRightBorderBox=Ee>0||Oe>0?Or(S.left+Tt,S.top,Ee,Oe,cr.TOP_RIGHT):new vt(S.left+S.width,S.top),this.bottomRightBorderBox=Je>0||Ze>0?Or(S.left+Zt,S.top+sr,Je,Ze,cr.BOTTOM_RIGHT):new vt(S.left+S.width,S.top+S.height),this.bottomLeftBorderBox=ht>0||gt>0?Or(S.left,S.top+ur,ht,gt,cr.BOTTOM_LEFT):new vt(S.left,S.top+S.height),this.topLeftPaddingBox=q>0||Ae>0?Or(S.left+$t,S.top+_t,Math.max(0,q-$t),Math.max(0,Ae-_t),cr.TOP_LEFT):new vt(S.left+$t,S.top+_t),this.topRightPaddingBox=Ee>0||Oe>0?Or(S.left+Math.min(Tt,S.width-Ar),S.top+_t,Tt>S.width+Ar?0:Math.max(0,Ee-Ar),Math.max(0,Oe-_t),cr.TOP_RIGHT):new vt(S.left+S.width-Ar,S.top+_t),this.bottomRightPaddingBox=Je>0||Ze>0?Or(S.left+Math.min(Zt,S.width-$t),S.top+Math.min(sr,S.height-hr),Math.max(0,Je-Ar),Math.max(0,Ze-hr),cr.BOTTOM_RIGHT):new vt(S.left+S.width-Ar,S.top+S.height-hr),this.bottomLeftPaddingBox=ht>0||gt>0?Or(S.left+$t,S.top+Math.min(ur,S.height-hr),Math.max(0,ht-$t),Math.max(0,gt-hr),cr.BOTTOM_LEFT):new vt(S.left+$t,S.top+S.height-hr),this.topLeftContentBox=q>0||Ae>0?Or(S.left+$t+Vr,S.top+_t+ln,Math.max(0,q-($t+Vr)),Math.max(0,Ae-(_t+ln)),cr.TOP_LEFT):new vt(S.left+$t+Vr,S.top+_t+ln),this.topRightContentBox=Ee>0||Oe>0?Or(S.left+Math.min(Tt,S.width+$t+Vr),S.top+_t+ln,Tt>S.width+$t+Vr?0:Ee-$t+Vr,Oe-(_t+ln),cr.TOP_RIGHT):new vt(S.left+S.width-(Ar+rn),S.top+_t+ln),this.bottomRightContentBox=Je>0||Ze>0?Or(S.left+Math.min(Zt,S.width-($t+Vr)),S.top+Math.min(sr,S.height+_t+ln),Math.max(0,Je-(Ar+rn)),Ze-(hr+cn),cr.BOTTOM_RIGHT):new vt(S.left+S.width-(Ar+rn),S.top+S.height-(hr+cn)),this.bottomLeftContentBox=ht>0||gt>0?Or(S.left+$t+Vr,S.top+ur,Math.max(0,ht-($t+Vr)),gt-(hr+cn),cr.BOTTOM_LEFT):new vt(S.left+$t+Vr,S.top+S.height-(hr+cn))}return T}(),cr;(function(T){T[T.TOP_LEFT=0]="TOP_LEFT",T[T.TOP_RIGHT=1]="TOP_RIGHT",T[T.BOTTOM_RIGHT=2]="BOTTOM_RIGHT",T[T.BOTTOM_LEFT=3]="BOTTOM_LEFT"})(cr||(cr={}));var Or=function(T,p,I,S,V){var q=4*((Math.sqrt(2)-1)/3),Ae=I*q,be=S*q,Ee=T+I,Oe=p+S;switch(V){case cr.TOP_LEFT:return new ki(new vt(T,Oe),new vt(T,Oe-be),new vt(Ee-Ae,p),new vt(Ee,p));case cr.TOP_RIGHT:return new ki(new vt(T,p),new vt(T+Ae,p),new vt(Ee,Oe-be),new vt(Ee,Oe));case cr.BOTTOM_RIGHT:return new ki(new vt(Ee,p),new vt(Ee,p+be),new vt(T+Ae,Oe),new vt(T,Oe));case cr.BOTTOM_LEFT:default:return new ki(new vt(Ee,Oe),new vt(Ee-Ae,Oe),new vt(T,p+be),new vt(T,p))}},Hi=function(T){return[T.topLeftBorderBox,T.topRightBorderBox,T.bottomRightBorderBox,T.bottomLeftBorderBox]},ou=function(T){return[T.topLeftContentBox,T.topRightContentBox,T.bottomRightContentBox,T.bottomLeftContentBox]},Qi=function(T){return[T.topLeftPaddingBox,T.topRightPaddingBox,T.bottomRightPaddingBox,T.bottomLeftPaddingBox]},Au=function(){function T(p,I,S){this.offsetX=p,this.offsetY=I,this.matrix=S,this.type=0,this.target=2|4}return T}(),Ki=function(){function T(p,I){this.path=p,this.target=I,this.type=1}return T}(),lu=function(){function T(p){this.opacity=p,this.type=2,this.target=2|4}return T}(),uu=function(T){return T.type===0},Ks=function(T){return T.type===1},hu=function(T){return T.type===2},js=function(T,p){return T.length===p.length?T.some(function(I,S){return I===p[S]}):!1},cu=function(T,p,I,S,V){return T.map(function(q,Ae){switch(Ae){case 0:return q.add(p,I);case 1:return q.add(p+S,I);case 2:return q.add(p+S,I+V);case 3:return q.add(p,I+V)}return q})},Ws=function(){function T(p){this.element=p,this.inlineLevel=[],this.nonInlineLevel=[],this.negativeZIndex=[],this.zeroOrAutoZIndexOrTransformedOrOpacity=[],this.positiveZIndex=[],this.nonPositionedFloats=[],this.nonPositionedInlineLevel=[]}return T}(),Gs=function(){function T(p,I){if(this.container=p,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,V=this.container.bounds.top+this.container.styles.transformOrigin[1].number,q=this.container.styles.transform;this.effects.push(new Au(S,V,q))}if(this.container.styles.overflowX!==0){var Ae=Hi(this.curves),be=Qi(this.curves);js(Ae,be)?this.effects.push(new Ki(Ae,2|4)):(this.effects.push(new Ki(Ae,2)),this.effects.push(new Ki(be,4)))}}return T.prototype.getEffects=function(p){for(var I=[2,3].indexOf(this.container.styles.position)===-1,S=this.parent,V=this.effects.slice(0);S;){var q=S.effects.filter(function(Ee){return!Ks(Ee)});if(I||S.container.styles.position!==0||!S.parent){if(V.unshift.apply(V,q),I=[2,3].indexOf(S.container.styles.position)===-1,S.container.styles.overflowX!==0){var Ae=Hi(S.curves),be=Qi(S.curves);js(Ae,be)||V.unshift(new Ki(be,2|4))}}else V.unshift.apply(V,q);S=S.parent}return V.filter(function(Ee){return Wr(Ee.target,p)})},T}(),wa=function(T,p,I,S){T.container.elements.forEach(function(V){var q=Wr(V.flags,4),Ae=Wr(V.flags,2),be=new Gs(V,T);Wr(V.styles.display,2048)&&S.push(be);var Ee=Wr(V.flags,8)?[]:S;if(q||Ae){var Oe=q||V.styles.isPositioned()?I:p,ke=new Ws(be);if(V.styles.isPositioned()||V.styles.opacity<1||V.styles.isTransformed()){var Je=V.styles.zIndex.order;if(Je<0){var Ze=0;Oe.negativeZIndex.some(function(ht,gt){return Je>ht.element.container.styles.zIndex.order?(Ze=gt,!1):Ze>0}),Oe.negativeZIndex.splice(Ze,0,ke)}else if(Je>0){var bt=0;Oe.positiveZIndex.some(function(ht,gt){return Je>=ht.element.container.styles.zIndex.order?(bt=gt+1,!1):bt>0}),Oe.positiveZIndex.splice(bt,0,ke)}else Oe.zeroOrAutoZIndexOrTransformedOrOpacity.push(ke)}else V.styles.isFloating()?Oe.nonPositionedFloats.push(ke):Oe.nonPositionedInlineLevel.push(ke);wa(be,ke,q?ke:I,Ee)}else V.styles.isInlineLevel()?p.inlineLevel.push(be):p.nonInlineLevel.push(be),wa(be,p,I,Ee);Wr(V.flags,8)&&Vs(V,Ee)})},Vs=function(T,p){for(var I=T instanceof ca?T.start:1,S=T instanceof ca?T.reversed:!1,V=0;V<p.length;V++){var q=p[V];q.container instanceof gs&&typeof q.container.value=="number"&&q.container.value!==0&&(I=q.container.value),q.listValue=gi(I,q.container.styles.listStyleType,!0),I+=S?-1:1}},du=function(T){var p=new Gs(T,null),I=new Ws(p),S=[];return wa(p,I,I,S),Vs(p.container,S),I},zs=function(T,p){switch(p){case 0:return mn(T.topLeftBorderBox,T.topLeftPaddingBox,T.topRightBorderBox,T.topRightPaddingBox);case 1:return mn(T.topRightBorderBox,T.topRightPaddingBox,T.bottomRightBorderBox,T.bottomRightPaddingBox);case 2:return mn(T.bottomRightBorderBox,T.bottomRightPaddingBox,T.bottomLeftBorderBox,T.bottomLeftPaddingBox);case 3:default:return mn(T.bottomLeftBorderBox,T.bottomLeftPaddingBox,T.topLeftBorderBox,T.topLeftPaddingBox)}},fu=function(T,p){switch(p){case 0:return mn(T.topLeftBorderBox,T.topLeftBorderDoubleOuterBox,T.topRightBorderBox,T.topRightBorderDoubleOuterBox);case 1:return mn(T.topRightBorderBox,T.topRightBorderDoubleOuterBox,T.bottomRightBorderBox,T.bottomRightBorderDoubleOuterBox);case 2:return mn(T.bottomRightBorderBox,T.bottomRightBorderDoubleOuterBox,T.bottomLeftBorderBox,T.bottomLeftBorderDoubleOuterBox);case 3:default:return mn(T.bottomLeftBorderBox,T.bottomLeftBorderDoubleOuterBox,T.topLeftBorderBox,T.topLeftBorderDoubleOuterBox)}},pu=function(T,p){switch(p){case 0:return mn(T.topLeftBorderDoubleInnerBox,T.topLeftPaddingBox,T.topRightBorderDoubleInnerBox,T.topRightPaddingBox);case 1:return mn(T.topRightBorderDoubleInnerBox,T.topRightPaddingBox,T.bottomRightBorderDoubleInnerBox,T.bottomRightPaddingBox);case 2:return mn(T.bottomRightBorderDoubleInnerBox,T.bottomRightPaddingBox,T.bottomLeftBorderDoubleInnerBox,T.bottomLeftPaddingBox);case 3:default:return mn(T.bottomLeftBorderDoubleInnerBox,T.bottomLeftPaddingBox,T.topLeftBorderDoubleInnerBox,T.topLeftPaddingBox)}},mu=function(T,p){switch(p){case 0:return ji(T.topLeftBorderStroke,T.topRightBorderStroke);case 1:return ji(T.topRightBorderStroke,T.bottomRightBorderStroke);case 2:return ji(T.bottomRightBorderStroke,T.bottomLeftBorderStroke);case 3:default:return ji(T.bottomLeftBorderStroke,T.topLeftBorderStroke)}},ji=function(T,p){var I=[];return pn(T)?I.push(T.subdivide(.5,!1)):I.push(T),pn(p)?I.push(p.subdivide(.5,!0)):I.push(p),I},mn=function(T,p,I,S){var V=[];return pn(T)?V.push(T.subdivide(.5,!1)):V.push(T),pn(I)?V.push(I.subdivide(.5,!0)):V.push(I),pn(S)?V.push(S.subdivide(.5,!0).reverse()):V.push(S),pn(p)?V.push(p.subdivide(.5,!1).reverse()):V.push(p),V},Xs=function(T){var p=T.bounds,I=T.styles;return p.add(I.borderLeftWidth,I.borderTopWidth,-(I.borderRightWidth+I.borderLeftWidth),-(I.borderTopWidth+I.borderBottomWidth))},Wi=function(T){var p=T.styles,I=T.bounds,S=Cr(p.paddingLeft,I.width),V=Cr(p.paddingRight,I.width),q=Cr(p.paddingTop,I.width),Ae=Cr(p.paddingBottom,I.width);return I.add(S+p.borderLeftWidth,q+p.borderTopWidth,-(p.borderRightWidth+p.borderLeftWidth+S+V),-(p.borderTopWidth+p.borderBottomWidth+q+Ae))},gu=function(T,p){return T===0?p.bounds:T===2?Wi(p):Xs(p)},vu=function(T,p){return T===0?p.bounds:T===2?Wi(p):Xs(p)},Ca=function(T,p,I){var S=gu(oi(T.styles.backgroundOrigin,p),T),V=vu(oi(T.styles.backgroundClip,p),T),q=yu(oi(T.styles.backgroundSize,p),I,S),Ae=q[0],be=q[1],Ee=hi(oi(T.styles.backgroundPosition,p),S.width-Ae,S.height-be),Oe=Eu(oi(T.styles.backgroundRepeat,p),Ee,q,S,V),ke=Math.round(S.left+Ee[0]),Je=Math.round(S.top+Ee[1]);return[Oe,ke,Je,Ae,be]},si=function(T){return br(T)&&T.value===ti.AUTO},Gi=function(T){return typeof T=="number"},yu=function(T,p,I){var S=p[0],V=p[1],q=p[2],Ae=T[0],be=T[1];if(!Ae)return[0,0];if(Hr(Ae)&&be&&Hr(be))return[Cr(Ae,I.width),Cr(be,I.height)];var Ee=Gi(q);if(br(Ae)&&(Ae.value===ti.CONTAIN||Ae.value===ti.COVER)){if(Gi(q)){var Oe=I.width/I.height;return Oe<q!==(Ae.value===ti.COVER)?[I.width,I.width/q]:[I.height*q,I.height]}return[I.width,I.height]}var ke=Gi(S),Je=Gi(V),Ze=ke||Je;if(si(Ae)&&(!be||si(be))){if(ke&&Je)return[S,V];if(!Ee&&!Ze)return[I.width,I.height];if(Ze&&Ee){var bt=ke?S:V*q,ht=Je?V:S/q;return[bt,ht]}var gt=ke?S:I.width,Pt=Je?V:I.height;return[gt,Pt]}if(Ee){var yt=0,Tt=0;return Hr(Ae)?yt=Cr(Ae,I.width):Hr(be)&&(Tt=Cr(be,I.height)),si(Ae)?yt=Tt*q:(!be||si(be))&&(Tt=yt/q),[yt,Tt]}var sr=null,Zt=null;if(Hr(Ae)?sr=Cr(Ae,I.width):be&&Hr(be)&&(Zt=Cr(be,I.height)),sr!==null&&(!be||si(be))&&(Zt=ke&&Je?sr/S*V:I.height),Zt!==null&&si(Ae)&&(sr=ke&&Je?Zt/V*S:I.width),sr!==null&&Zt!==null)return[sr,Zt];throw new Error("Unable to calculate background-size for element")},oi=function(T,p){var I=T[p];return typeof I=="undefined"?T[0]:I},Eu=function(T,p,I,S,V){var q=p[0],Ae=p[1],be=I[0],Ee=I[1];switch(T){case 2:return[new vt(Math.round(S.left),Math.round(S.top+Ae)),new vt(Math.round(S.left+S.width),Math.round(S.top+Ae)),new vt(Math.round(S.left+S.width),Math.round(Ee+S.top+Ae)),new vt(Math.round(S.left),Math.round(Ee+S.top+Ae))];case 3:return[new vt(Math.round(S.left+q),Math.round(S.top)),new vt(Math.round(S.left+q+be),Math.round(S.top)),new vt(Math.round(S.left+q+be),Math.round(S.height+S.top)),new vt(Math.round(S.left+q),Math.round(S.height+S.top))];case 1:return[new vt(Math.round(S.left+q),Math.round(S.top+Ae)),new vt(Math.round(S.left+q+be),Math.round(S.top+Ae)),new vt(Math.round(S.left+q+be),Math.round(S.top+Ae+Ee)),new vt(Math.round(S.left+q),Math.round(S.top+Ae+Ee))];default:return[new vt(Math.round(V.left),Math.round(V.top)),new vt(Math.round(V.left+V.width),Math.round(V.top)),new vt(Math.round(V.left+V.width),Math.round(V.height+V.top)),new vt(Math.round(V.left),Math.round(V.height+V.top))]}},bu="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",Ys="Hidden Text",_u=function(){function T(p){this._data={},this._document=p}return T.prototype.parseMetrics=function(p,I){var S=this._document.createElement("div"),V=this._document.createElement("img"),q=this._document.createElement("span"),Ae=this._document.body;S.style.visibility="hidden",S.style.fontFamily=p,S.style.fontSize=I,S.style.margin="0",S.style.padding="0",S.style.whiteSpace="nowrap",Ae.appendChild(S),V.src=bu,V.width=1,V.height=1,V.style.margin="0",V.style.padding="0",V.style.verticalAlign="baseline",q.style.fontFamily=p,q.style.fontSize=I,q.style.margin="0",q.style.padding="0",q.appendChild(this._document.createTextNode(Ys)),S.appendChild(q),S.appendChild(V);var be=V.offsetTop-q.offsetTop+2;S.removeChild(q),S.appendChild(this._document.createTextNode(Ys)),S.style.lineHeight="normal",V.style.verticalAlign="super";var Ee=V.offsetTop-S.offsetTop+2;return Ae.removeChild(S),{baseline:be,middle:Ee}},T.prototype.getMetrics=function(p,I){var S=p+" "+I;return typeof this._data[S]=="undefined"&&(this._data[S]=this.parseMetrics(p,I)),this._data[S]},T}(),Js=function(){function T(p,I){this.context=p,this.options=I}return T}(),wu=1e4,Cu=function(T){G(p,T);function p(I,S){var V=T.call(this,I,S)||this;return V._activeEffects=[],V.canvas=S.canvas?S.canvas:document.createElement("canvas"),V.ctx=V.canvas.getContext("2d"),S.canvas||(V.canvas.width=Math.floor(S.width*S.scale),V.canvas.height=Math.floor(S.height*S.scale),V.canvas.style.width=S.width+"px",V.canvas.style.height=S.height+"px"),V.fontMetrics=new _u(document),V.ctx.scale(V.options.scale,V.options.scale),V.ctx.translate(-S.x,-S.y),V.ctx.textBaseline="bottom",V._activeEffects=[],V.context.logger.debug("Canvas renderer initialized ("+S.width+"x"+S.height+") with scale "+S.scale),V}return p.prototype.applyEffects=function(I){for(var S=this;this._activeEffects.length;)this.popEffect();I.forEach(function(V){return S.applyEffect(V)})},p.prototype.applyEffect=function(I){this.ctx.save(),hu(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)},p.prototype.popEffect=function(){this._activeEffects.pop(),this.ctx.restore()},p.prototype.renderStack=function(I){return j(this,void 0,void 0,function(){var S;return N(this,function(V){switch(V.label){case 0:return S=I.element.container.styles,S.isVisible()?[4,this.renderStackContent(I)]:[3,2];case 1:V.sent(),V.label=2;case 2:return[2]}})})},p.prototype.renderNode=function(I){return j(this,void 0,void 0,function(){return N(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]}})})},p.prototype.renderTextWithLetterSpacing=function(I,S,V){var q=this;if(S===0)this.ctx.fillText(I.text,I.bounds.left,I.bounds.top+V);else{var Ae=ha(I.text);Ae.reduce(function(be,Ee){return q.ctx.fillText(Ee,be,I.bounds.top+V),be+q.ctx.measureText(Ee).width},I.bounds.left)}},p.prototype.createFontStyle=function(I){var S=I.fontVariant.filter(function(Ae){return Ae==="normal"||Ae==="small-caps"}).join(""),V=Iu(I.fontFamily).join(", "),q=ui(I.fontSize)?""+I.fontSize.number+I.fontSize.unit:I.fontSize.number+"px";return[[I.fontStyle,S,I.fontWeight,q,V].join(" "),V,q]},p.prototype.renderTextNode=function(I,S){return j(this,void 0,void 0,function(){var V,q,Ae,be,Ee,Oe,ke,Je,Ze=this;return N(this,function(bt){return V=this.createFontStyle(S),q=V[0],Ae=V[1],be=V[2],this.ctx.font=q,this.ctx.direction=S.direction===1?"rtl":"ltr",this.ctx.textAlign="left",this.ctx.textBaseline="alphabetic",Ee=this.fontMetrics.getMetrics(Ae,be),Oe=Ee.baseline,ke=Ee.middle,Je=S.paintOrder,I.textBounds.forEach(function(ht){Je.forEach(function(gt){switch(gt){case 0:Ze.ctx.fillStyle=Gr(S.color),Ze.renderTextWithLetterSpacing(ht,S.letterSpacing,Oe);var Pt=S.textShadow;Pt.length&&ht.text.trim().length&&(Pt.slice(0).reverse().forEach(function(yt){Ze.ctx.shadowColor=Gr(yt.color),Ze.ctx.shadowOffsetX=yt.offsetX.number*Ze.options.scale,Ze.ctx.shadowOffsetY=yt.offsetY.number*Ze.options.scale,Ze.ctx.shadowBlur=yt.blur.number,Ze.renderTextWithLetterSpacing(ht,S.letterSpacing,Oe)}),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(yt){switch(yt){case 1:Ze.ctx.fillRect(ht.bounds.left,Math.round(ht.bounds.top+Oe),ht.bounds.width,1);break;case 2:Ze.ctx.fillRect(ht.bounds.left,Math.round(ht.bounds.top),ht.bounds.width,1);break;case 3:Ze.ctx.fillRect(ht.bounds.left,Math.ceil(ht.bounds.top+ke),ht.bounds.width,1);break}}));break;case 1:S.webkitTextStrokeWidth&&ht.text.trim().length&&(Ze.ctx.strokeStyle=Gr(S.webkitTextStrokeColor),Ze.ctx.lineWidth=S.webkitTextStrokeWidth,Ze.ctx.lineJoin=window.chrome?"miter":"round",Ze.ctx.strokeText(ht.text,ht.bounds.left,ht.bounds.top+Oe)),Ze.ctx.strokeStyle="",Ze.ctx.lineWidth=0,Ze.ctx.lineJoin="miter";break}})}),[2]})})},p.prototype.renderReplacedElement=function(I,S,V){if(V&&I.intrinsicWidth>0&&I.intrinsicHeight>0){var q=Wi(I),Ae=Qi(S);this.path(Ae),this.ctx.save(),this.ctx.clip(),this.ctx.drawImage(V,0,0,I.intrinsicWidth,I.intrinsicHeight,q.left,q.top,q.width,q.height),this.ctx.restore()}},p.prototype.renderNodeContent=function(I){return j(this,void 0,void 0,function(){var S,V,q,Ae,be,Ee,Oe,Oe,ke,Je,Ze,bt,ht,gt,Pt,yt,Tt,sr,Zt,Oe,ur,ht,yt;return N(this,function(_t){switch(_t.label){case 0:this.applyEffects(I.getEffects(4)),S=I.container,V=I.curves,q=S.styles,Ae=0,be=S.textNodes,_t.label=1;case 1:return Ae<be.length?(Ee=be[Ae],[4,this.renderTextNode(Ee,q)]):[3,4];case 2:_t.sent(),_t.label=3;case 3:return Ae++,[3,1];case 4:if(!(S instanceof fs))return[3,8];_t.label=5;case 5:return _t.trys.push([5,7,,8]),[4,this.context.cache.match(S.src)];case 6:return Oe=_t.sent(),this.renderReplacedElement(S,V,Oe),[3,8];case 7:return _t.sent(),this.context.logger.error("Error loading image "+S.src),[3,8];case 8:if(S instanceof ps&&this.renderReplacedElement(S,V,S.canvas),!(S instanceof ms))return[3,12];_t.label=9;case 9:return _t.trys.push([9,11,,12]),[4,this.context.cache.match(S.svg)];case 10:return Oe=_t.sent(),this.renderReplacedElement(S,V,Oe),[3,12];case 11:return _t.sent(),this.context.logger.error("Error loading svg "+S.svg.substring(0,255)),[3,12];case 12:return S instanceof bs&&S.tree?(ke=new p(this.context,{scale:this.options.scale,backgroundColor:S.backgroundColor,x:0,y:0,width:S.width,height:S.height}),[4,ke.render(S.tree)]):[3,14];case 13:Je=_t.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),_t.label=14;case 14:if(S instanceof da&&(Ze=Math.min(S.bounds.width,S.bounds.height),S.type===Di?S.checked&&(this.ctx.save(),this.path([new vt(S.bounds.left+Ze*.39363,S.bounds.top+Ze*.79),new vt(S.bounds.left+Ze*.16,S.bounds.top+Ze*.5549),new vt(S.bounds.left+Ze*.27347,S.bounds.top+Ze*.44071),new vt(S.bounds.left+Ze*.39694,S.bounds.top+Ze*.5649),new vt(S.bounds.left+Ze*.72983,S.bounds.top+Ze*.23),new vt(S.bounds.left+Ze*.84,S.bounds.top+Ze*.34085),new vt(S.bounds.left+Ze*.39363,S.bounds.top+Ze*.79)]),this.ctx.fillStyle=Gr(vs),this.ctx.fill(),this.ctx.restore()):S.type===Ui&&(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()))),Tu(S)&&S.value.length){bt=this.createFontStyle(q),ht=bt[0],gt=bt[1],Pt=this.fontMetrics.getMetrics(ht,gt).baseline,this.ctx.font=ht,this.ctx.fillStyle=Gr(q.color),this.ctx.textBaseline="alphabetic",this.ctx.textAlign=xu(S.styles.textAlign),yt=Wi(S),Tt=0;switch(S.styles.textAlign){case 1:Tt+=yt.width/2;break;case 2:Tt+=yt.width;break}sr=yt.add(Tt,0,0,-yt.height/2+1),this.ctx.save(),this.path([new vt(yt.left,yt.top),new vt(yt.left+yt.width,yt.top),new vt(yt.left+yt.width,yt.top+yt.height),new vt(yt.left,yt.top+yt.height)]),this.ctx.clip(),this.renderTextWithLetterSpacing(new pi(S.value,sr),q.letterSpacing,Pt),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(Zt=S.styles.listStyleImage,!(Zt.type===0))return[3,18];Oe=void 0,ur=Zt.url,_t.label=15;case 15:return _t.trys.push([15,17,,18]),[4,this.context.cache.match(ur)];case 16:return Oe=_t.sent(),this.ctx.drawImage(Oe,S.bounds.left-(Oe.width+10),S.bounds.top),[3,18];case 17:return _t.sent(),this.context.logger.error("Error loading list-style-image "+ur),[3,18];case 18:return[3,20];case 19:I.listValue&&S.styles.listStyleType!==-1&&(ht=this.createFontStyle(q)[0],this.ctx.font=ht,this.ctx.fillStyle=Gr(q.color),this.ctx.textBaseline="middle",this.ctx.textAlign="right",yt=new X(S.bounds.left,S.bounds.top+Cr(S.styles.paddingTop,S.bounds.width),S.bounds.width,Ya(q.lineHeight,q.fontSize.number)/2+1),this.renderTextWithLetterSpacing(new pi(I.listValue,yt),q.letterSpacing,Ya(q.lineHeight,q.fontSize.number)/2+2),this.ctx.textBaseline="bottom",this.ctx.textAlign="left"),_t.label=20;case 20:return[2]}})})},p.prototype.renderStackContent=function(I){return j(this,void 0,void 0,function(){var S,V,q,Ae,be,q,Ee,Oe,q,ke,Je,q,Ze,bt,q,ht,gt,q,Pt,yt,q;return N(this,function(Tt){switch(Tt.label){case 0:if(Wr(I.element.container.flags,16))debugger;return[4,this.renderNodeBackgroundAndBorders(I.element)];case 1:Tt.sent(),S=0,V=I.negativeZIndex,Tt.label=2;case 2:return S<V.length?(q=V[S],[4,this.renderStack(q)]):[3,5];case 3:Tt.sent(),Tt.label=4;case 4:return S++,[3,2];case 5:return[4,this.renderNodeContent(I.element)];case 6:Tt.sent(),Ae=0,be=I.nonInlineLevel,Tt.label=7;case 7:return Ae<be.length?(q=be[Ae],[4,this.renderNode(q)]):[3,10];case 8:Tt.sent(),Tt.label=9;case 9:return Ae++,[3,7];case 10:Ee=0,Oe=I.nonPositionedFloats,Tt.label=11;case 11:return Ee<Oe.length?(q=Oe[Ee],[4,this.renderStack(q)]):[3,14];case 12:Tt.sent(),Tt.label=13;case 13:return Ee++,[3,11];case 14:ke=0,Je=I.nonPositionedInlineLevel,Tt.label=15;case 15:return ke<Je.length?(q=Je[ke],[4,this.renderStack(q)]):[3,18];case 16:Tt.sent(),Tt.label=17;case 17:return ke++,[3,15];case 18:Ze=0,bt=I.inlineLevel,Tt.label=19;case 19:return Ze<bt.length?(q=bt[Ze],[4,this.renderNode(q)]):[3,22];case 20:Tt.sent(),Tt.label=21;case 21:return Ze++,[3,19];case 22:ht=0,gt=I.zeroOrAutoZIndexOrTransformedOrOpacity,Tt.label=23;case 23:return ht<gt.length?(q=gt[ht],[4,this.renderStack(q)]):[3,26];case 24:Tt.sent(),Tt.label=25;case 25:return ht++,[3,23];case 26:Pt=0,yt=I.positiveZIndex,Tt.label=27;case 27:return Pt<yt.length?(q=yt[Pt],[4,this.renderStack(q)]):[3,30];case 28:Tt.sent(),Tt.label=29;case 29:return Pt++,[3,27];case 30:return[2]}})})},p.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()},p.prototype.path=function(I){this.ctx.beginPath(),this.formatPath(I),this.ctx.closePath()},p.prototype.formatPath=function(I){var S=this;I.forEach(function(V,q){var Ae=pn(V)?V.start:V;q===0?S.ctx.moveTo(Ae.x,Ae.y):S.ctx.lineTo(Ae.x,Ae.y),pn(V)&&S.ctx.bezierCurveTo(V.startControl.x,V.startControl.y,V.endControl.x,V.endControl.y,V.end.x,V.end.y)})},p.prototype.renderRepeat=function(I,S,V,q){this.path(I),this.ctx.fillStyle=S,this.ctx.translate(V,q),this.ctx.fill(),this.ctx.translate(-V,-q)},p.prototype.resizeImage=function(I,S,V){var q;if(I.width===S&&I.height===V)return I;var Ae=(q=this.canvas.ownerDocument)!==null&&q!==void 0?q:document,be=Ae.createElement("canvas");be.width=Math.max(1,S),be.height=Math.max(1,V);var Ee=be.getContext("2d");return Ee.drawImage(I,0,0,I.width,I.height,0,0,S,V),be},p.prototype.renderBackgroundImage=function(I){return j(this,void 0,void 0,function(){var S,V,q,Ae,be,Ee;return N(this,function(Oe){switch(Oe.label){case 0:S=I.styles.backgroundImage.length-1,V=function(ke){var Je,Ze,bt,ht,gt,Pt,yt,Tt,sr,Zt,ht,gt,Pt,yt,Tt,ur,_t,Ar,hr,$t,ln,rn,cn,Vr,sr,xn,ht,jn,Wn,yt,Tt,Gn,gt,Pt,Yn,Sn,Vn,Jn,$n,Dn,Zn,Un;return N(this,function(Ai){switch(Ai.label){case 0:if(!(ke.type===0))return[3,5];Je=void 0,Ze=ke.url,Ai.label=1;case 1:return Ai.trys.push([1,3,,4]),[4,q.context.cache.match(Ze)];case 2:return Je=Ai.sent(),[3,4];case 3:return Ai.sent(),q.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]),ht=bt[0],gt=bt[1],Pt=bt[2],yt=bt[3],Tt=bt[4],sr=q.ctx.createPattern(q.resizeImage(Je,yt,Tt),"repeat"),q.renderRepeat(ht,sr,gt,Pt)),[3,6];case 5:lo(ke)?(Zt=Ca(I,S,[null,null,null]),ht=Zt[0],gt=Zt[1],Pt=Zt[2],yt=Zt[3],Tt=Zt[4],ur=io(ke.angle,yt,Tt),_t=ur[0],Ar=ur[1],hr=ur[2],$t=ur[3],ln=ur[4],rn=document.createElement("canvas"),rn.width=yt,rn.height=Tt,cn=rn.getContext("2d"),Vr=cn.createLinearGradient(Ar,$t,hr,ln),Ma(ke.stops,_t).forEach(function(yi){return Vr.addColorStop(yi.stop,Gr(yi.color))}),cn.fillStyle=Vr,cn.fillRect(0,0,yt,Tt),yt>0&&Tt>0&&(sr=q.ctx.createPattern(rn,"repeat"),q.renderRepeat(ht,sr,gt,Pt))):uo(ke)&&(xn=Ca(I,S,[null,null,null]),ht=xn[0],jn=xn[1],Wn=xn[2],yt=xn[3],Tt=xn[4],Gn=ke.position.length===0?[Ji]:ke.position,gt=Cr(Gn[0],yt),Pt=Cr(Gn[Gn.length-1],Tt),Yn=ao(ke,gt,Pt,yt,Tt),Sn=Yn[0],Vn=Yn[1],Sn>0&&Vn>0&&(Jn=q.ctx.createRadialGradient(jn+gt,Wn+Pt,0,jn+gt,Wn+Pt,Sn),Ma(ke.stops,Sn*2).forEach(function(yi){return Jn.addColorStop(yi.stop,Gr(yi.color))}),q.path(ht),q.ctx.fillStyle=Jn,Sn!==Vn?($n=I.bounds.left+.5*I.bounds.width,Dn=I.bounds.top+.5*I.bounds.height,Zn=Vn/Sn,Un=1/Zn,q.ctx.save(),q.ctx.translate($n,Dn),q.ctx.transform(1,0,0,Zn,0,0),q.ctx.translate(-$n,-Dn),q.ctx.fillRect(jn,Un*(Wn-Dn)+Dn,yt,Tt*Un),q.ctx.restore()):q.ctx.fill())),Ai.label=6;case 6:return S--,[2]}})},q=this,Ae=0,be=I.styles.backgroundImage.slice(0).reverse(),Oe.label=1;case 1:return Ae<be.length?(Ee=be[Ae],[5,V(Ee)]):[3,4];case 2:Oe.sent(),Oe.label=3;case 3:return Ae++,[3,1];case 4:return[2]}})})},p.prototype.renderSolidBorder=function(I,S,V){return j(this,void 0,void 0,function(){return N(this,function(q){return this.path(zs(V,S)),this.ctx.fillStyle=Gr(I),this.ctx.fill(),[2]})})},p.prototype.renderDoubleBorder=function(I,S,V,q){return j(this,void 0,void 0,function(){var Ae,be;return N(this,function(Ee){switch(Ee.label){case 0:return S<3?[4,this.renderSolidBorder(I,V,q)]:[3,2];case 1:return Ee.sent(),[2];case 2:return Ae=fu(q,V),this.path(Ae),this.ctx.fillStyle=Gr(I),this.ctx.fill(),be=pu(q,V),this.path(be),this.ctx.fill(),[2]}})})},p.prototype.renderNodeBackgroundAndBorders=function(I){return j(this,void 0,void 0,function(){var S,V,q,Ae,be,Ee,Oe,ke,Je=this;return N(this,function(Ze){switch(Ze.label){case 0:return this.applyEffects(I.getEffects(2)),S=I.container.styles,V=!kn(S.backgroundColor)||S.backgroundImage.length,q=[{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=Bu(oi(S.backgroundClip,0),I.curves),V||S.boxShadow.length?(this.ctx.save(),this.path(Ae),this.ctx.clip(),kn(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 ht=Hi(I.curves),gt=bt.inset?0:wu,Pt=cu(ht,-gt+(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(ht),Je.ctx.clip(),Je.mask(Pt)):(Je.mask(ht),Je.ctx.clip(),Je.path(Pt)),Je.ctx.shadowOffsetX=bt.offsetX.number+gt,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,Oe=q,Ze.label=3;case 3:return Ee<Oe.length?(ke=Oe[Ee],ke.style!==0&&!kn(ke.color)&&ke.width>0?ke.style===2?[4,this.renderDashedDottedBorder(ke.color,ke.width,be,I.curves,2)]:[3,5]:[3,11]):[3,13];case 4:return Ze.sent(),[3,11];case 5:return ke.style===3?[4,this.renderDashedDottedBorder(ke.color,ke.width,be,I.curves,3)]:[3,7];case 6:return Ze.sent(),[3,11];case 7:return ke.style===4?[4,this.renderDoubleBorder(ke.color,ke.width,be,I.curves)]:[3,9];case 8:return Ze.sent(),[3,11];case 9:return[4,this.renderSolidBorder(ke.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]}})})},p.prototype.renderDashedDottedBorder=function(I,S,V,q,Ae){return j(this,void 0,void 0,function(){var be,Ee,Oe,ke,Je,Ze,bt,ht,gt,Pt,yt,Tt,sr,Zt,ur,_t,ur,_t;return N(this,function(Ar){return this.ctx.save(),be=mu(q,V),Ee=zs(q,V),Ae===2&&(this.path(Ee),this.ctx.clip()),pn(Ee[0])?(Oe=Ee[0].start.x,ke=Ee[0].start.y):(Oe=Ee[0].x,ke=Ee[0].y),pn(Ee[1])?(Je=Ee[1].end.x,Ze=Ee[1].end.y):(Je=Ee[1].x,Ze=Ee[1].y),V===0||V===2?bt=Math.abs(Oe-Je):bt=Math.abs(ke-Ze),this.ctx.beginPath(),Ae===3?this.formatPath(be):this.formatPath(Ee.slice(0,2)),ht=S<3?S*3:S*2,gt=S<3?S*2:S,Ae===3&&(ht=S,gt=S),Pt=!0,bt<=ht*2?Pt=!1:bt<=ht*2+gt?(yt=bt/(2*ht+gt),ht*=yt,gt*=yt):(Tt=Math.floor((bt+gt)/(ht+gt)),sr=(bt-Tt*ht)/(Tt-1),Zt=(bt-(Tt+1)*ht)/Tt,gt=Zt<=0||Math.abs(gt-sr)<Math.abs(gt-Zt)?sr:Zt),Pt&&(Ae===3?this.ctx.setLineDash([0,ht+gt]):this.ctx.setLineDash([ht,gt])),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&&(pn(Ee[0])&&(ur=Ee[3],_t=Ee[0],this.ctx.beginPath(),this.formatPath([new vt(ur.end.x,ur.end.y),new vt(_t.start.x,_t.start.y)]),this.ctx.stroke()),pn(Ee[1])&&(ur=Ee[1],_t=Ee[2],this.ctx.beginPath(),this.formatPath([new vt(ur.end.x,ur.end.y),new vt(_t.start.x,_t.start.y)]),this.ctx.stroke())),this.ctx.restore(),[2]})})},p.prototype.render=function(I){return j(this,void 0,void 0,function(){var S;return N(this,function(V){switch(V.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 V.sent(),this.applyEffects([]),[2,this.canvas]}})})},p}(Js),Tu=function(T){return T instanceof Es||T instanceof ys?!0:T instanceof da&&T.type!==Ui&&T.type!==Di},Bu=function(T,p){switch(T){case 0:return Hi(p);case 2:return ou(p);case 1:default:return Qi(p)}},xu=function(T){switch(T){case 1:return"center";case 2:return"right";case 0:default:return"left"}},Su=["-apple-system","system-ui"],Iu=function(T){return/iPhone OS 15_(0|1)/.test(window.navigator.userAgent)?T.filter(function(p){return Su.indexOf(p)===-1}):T},Ru=function(T){G(p,T);function p(I,S){var V=T.call(this,I,S)||this;return V.canvas=S.canvas?S.canvas:document.createElement("canvas"),V.ctx=V.canvas.getContext("2d"),V.options=S,V.canvas.width=Math.floor(S.width*S.scale),V.canvas.height=Math.floor(S.height*S.scale),V.canvas.style.width=S.width+"px",V.canvas.style.height=S.height+"px",V.ctx.scale(V.options.scale,V.options.scale),V.ctx.translate(-S.x,-S.y),V.context.logger.debug("EXPERIMENTAL ForeignObject renderer initialized ("+S.width+"x"+S.height+" at "+S.x+","+S.y+") with scale "+S.scale),V}return p.prototype.render=function(I){return j(this,void 0,void 0,function(){var S,V;return N(this,function(q){switch(q.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 V=q.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(V,-this.options.x*this.options.scale,-this.options.y*this.options.scale),[2,this.canvas]}})})},p}(Js),Ou=function(T){return new Promise(function(p,I){var S=new Image;S.onload=function(){p(S)},S.onerror=I,S.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(new XMLSerializer().serializeToString(T))})},Lu=function(){function T(p){var I=p.id,S=p.enabled;this.id=I,this.enabled=S,this.start=Date.now()}return T.prototype.debug=function(){for(var p=[],I=0;I<arguments.length;I++)p[I]=arguments[I];this.enabled&&(typeof window!="undefined"&&window.console&&typeof console.debug=="function"?console.debug.apply(console,O([this.id,this.getTime()+"ms"],p)):this.info.apply(this,p))},T.prototype.getTime=function(){return Date.now()-this.start},T.prototype.info=function(){for(var p=[],I=0;I<arguments.length;I++)p[I]=arguments[I];this.enabled&&(typeof window!="undefined"&&window.console&&typeof console.info=="function"&&console.info.apply(console,O([this.id,this.getTime()+"ms"],p)))},T.prototype.warn=function(){for(var p=[],I=0;I<arguments.length;I++)p[I]=arguments[I];this.enabled&&(typeof window!="undefined"&&window.console&&typeof console.warn=="function"?console.warn.apply(console,O([this.id,this.getTime()+"ms"],p)):this.info.apply(this,p))},T.prototype.error=function(){for(var p=[],I=0;I<arguments.length;I++)p[I]=arguments[I];this.enabled&&(typeof window!="undefined"&&window.console&&typeof console.error=="function"?console.error.apply(console,O([this.id,this.getTime()+"ms"],p)):this.info.apply(this,p))},T.instances={},T}(),Du=function(){function T(p,I){var S;this.windowBounds=I,this.instanceName="#"+T.instanceCount++,this.logger=new Lu({id:this.instanceName,enabled:p.logging}),this.cache=(S=p.cache)!==null&&S!==void 0?S:new ql(this,p)}return T.instanceCount=1,T}(),Uu=function(T,p){return p===void 0&&(p={}),Fu(T,p)};typeof window!="undefined"&&Qs.setContext(window);var Fu=function(T,p){return j(void 0,void 0,void 0,function(){var I,S,V,q,Ae,be,Ee,Oe,ke,Je,Ze,bt,ht,gt,Pt,yt,Tt,sr,Zt,ur,_t,Ar,_t,hr,$t,ln,rn,cn,Vr,xn,jn,Wn,Gn,Yn,Sn,Vn,Jn,$n,Dn,Zn;return N(this,function(Un){switch(Un.label){case 0:if(!T||typeof T!="object")return[2,Promise.reject("Invalid element provided as first argument")];if(I=T.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 V={allowTaint:(hr=p.allowTaint)!==null&&hr!==void 0?hr:!1,imageTimeout:($t=p.imageTimeout)!==null&&$t!==void 0?$t:15e3,proxy:p.proxy,useCORS:(ln=p.useCORS)!==null&&ln!==void 0?ln:!1},q=D({logging:(rn=p.logging)!==null&&rn!==void 0?rn:!0,cache:p.cache},V),Ae={windowWidth:(cn=p.windowWidth)!==null&&cn!==void 0?cn:S.innerWidth,windowHeight:(Vr=p.windowHeight)!==null&&Vr!==void 0?Vr:S.innerHeight,scrollX:(xn=p.scrollX)!==null&&xn!==void 0?xn:S.pageXOffset,scrollY:(jn=p.scrollY)!==null&&jn!==void 0?jn:S.pageYOffset},be=new X(Ae.scrollX,Ae.scrollY,Ae.windowWidth,Ae.windowHeight),Ee=new Du(q,be),Oe=(Wn=p.foreignObjectRendering)!==null&&Wn!==void 0?Wn:!1,ke={allowTaint:(Gn=p.allowTaint)!==null&&Gn!==void 0?Gn:!1,onclone:p.onclone,ignoreElements:p.ignoreElements,inlineImages:Oe,copyStyles:Oe},Ee.logger.debug("Starting document clone with size "+be.width+"x"+be.height+" scrolled to "+-be.left+","+-be.top),Je=new ks(Ee,T,ke),Ze=Je.clonedReferenceElement,Ze?[4,Je.toIFrame(I,be)]:[2,Promise.reject("Unable to find element in cloned iframe")];case 1:return bt=Un.sent(),ht=pa(Ze)||Nl(Ze)?e(Ze.ownerDocument):M(Ee,Ze),gt=ht.width,Pt=ht.height,yt=ht.left,Tt=ht.top,sr=Nu(Ee,Ze,p.backgroundColor),Zt={canvas:p.canvas,backgroundColor:sr,scale:(Sn=(Yn=p.scale)!==null&&Yn!==void 0?Yn:S.devicePixelRatio)!==null&&Sn!==void 0?Sn:1,x:((Vn=p.x)!==null&&Vn!==void 0?Vn:0)+yt,y:((Jn=p.y)!==null&&Jn!==void 0?Jn:0)+Tt,width:($n=p.width)!==null&&$n!==void 0?$n:Math.ceil(gt),height:(Dn=p.height)!==null&&Dn!==void 0?Dn:Math.ceil(Pt)},Oe?(Ee.logger.debug("Document cloned, using foreign object rendering"),_t=new Ru(Ee,Zt),[4,_t.render(Ze)]):[3,3];case 2:return ur=Un.sent(),[3,5];case 3:return Ee.logger.debug("Document cloned, element located at "+yt+","+Tt+" with size "+gt+"x"+Pt+" using computed rendering"),Ee.logger.debug("Starting DOM parsing"),Ar=ws(Ee,Ze),sr===Ar.styles.backgroundColor&&(Ar.styles.backgroundColor=On.TRANSPARENT),Ee.logger.debug("Starting renderer for element at "+Zt.x+","+Zt.y+" with size "+Zt.width+"x"+Zt.height),_t=new Cu(Ee,Zt),[4,_t.render(Ar)];case 4:ur=Un.sent(),Un.label=5;case 5:return((Zn=p.removeContainer)!==null&&Zn!==void 0?Zn:!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,ur]}})})},Nu=function(T,p,I){var S=p.ownerDocument,V=S.documentElement?ci(T,getComputedStyle(S.documentElement).backgroundColor):On.TRANSPARENT,q=S.body?ci(T,getComputedStyle(S.body).backgroundColor):On.TRANSPARENT,Ae=typeof I=="string"?ci(T,I):I===null?On.TRANSPARENT:4294967295;return p===S.documentElement?kn(V)?kn(q)?Ae:q:V:Ae};return Uu})},wRmb:function(ct,_e,K){"use strict";K.d(_e,"a",function(){return R});var oe=K("rePB"),G=K("KQm4"),D=K("VTBJ"),j=K("Ff2n"),N=K("q1tI"),O=K.n(N),X=K("Kwbf"),M=K("Zm9Q"),e=K("hW8S");function R(i){return Object(M.a)(i).filter(function(A){return N.isValidElement(A)}).map(function(A){var o=A.key,a=A.props,r=a.children,t=Object(j.a)(a,["children"]),_=Object(D.a)({key:o},t);return r&&(_.children=R(r)),_})}function f(i){return i.reduce(function(A,o){var a=o.fixed,r=a===!0?"left":a,t=o.children;return t&&t.length>0?[].concat(Object(G.a)(A),Object(G.a)(f(t).map(function(_){return Object(D.a)({fixed:r},_)}))):[].concat(Object(G.a)(A),[Object(D.a)(Object(D.a)({},o),{},{fixed:r})])},[])}function v(i){for(var A=!0,o=0;o<i.length;o+=1){var a=i[o];if(A&&a.fixed!=="left")A=!1;else if(!A&&a.fixed==="left"){Object(X.a)(!1,"Index ".concat(o-1," of `columns` missing `fixed='left'` prop."));break}}for(var r=!0,t=i.length-1;t>=0;t-=1){var _=i[t];if(r&&_.fixed!=="right")r=!1;else if(!r&&_.fixed==="right"){Object(X.a)(!1,"Index ".concat(t+1," of `columns` missing `fixed='right'` prop."));break}}}function u(i){return i.map(function(A){var o=A.fixed,a=Object(j.a)(A,["fixed"]),r=o;return o==="left"?r="right":o==="right"&&(r="left"),Object(D.a)({fixed:r},a)})}function s(i,A){var o=i.prefixCls,a=i.columns,r=i.children,t=i.expandable,_=i.expandedKeys,y=i.getRowKey,b=i.onTriggerExpand,x=i.expandIcon,E=i.rowExpandable,d=i.expandIconColumnIndex,n=i.direction,l=i.expandRowByClick,h=N.useMemo(function(){return a||R(r)},[a,r]),w=N.useMemo(function(){if(t){var L,F=d||0,B=h[F],P=(L={},Object(oe.a)(L,e.a,{className:"".concat(o,"-expand-icon-col")}),Object(oe.a)(L,"title",""),Object(oe.a)(L,"fixed",B?B.fixed:null),Object(oe.a)(L,"className","".concat(o,"-row-expand-icon-cell")),Object(oe.a)(L,"render",function($,ee,pe){var fe=y(ee,pe),Le=_.has(fe),Ie=E?E(ee):!0,xe=x({prefixCls:o,expanded:Le,expandable:Ie,record:ee,onExpand:b});return l?N.createElement("span",{onClick:function(Fe){return Fe.stopPropagation()}},xe):xe}),L),W=h.slice();return F>=0&&W.splice(F,0,P),W}return h},[t,h,y,_,x,n]),g=N.useMemo(function(){var L=w;return A&&(L=A(L)),L.length||(L=[{render:function(){return null}}]),L},[A,w,n]),c=N.useMemo(function(){return n==="rtl"?u(f(g)):f(g)},[g,n]);return[g,c]}_e.b=s},"y0+3":function(ct,_e,K){"use strict";K.d(_e,"a",function(){return f}),K.d(_e,"b",function(){return u});var oe=/margin|padding|width|height|max|min|offset/,G={left:!0,top:!0},D={cssFloat:1,styleFloat:1,float:1};function j(s){return s.nodeType===1?s.ownerDocument.defaultView.getComputedStyle(s,null):{}}function N(s,i,A){if(i=i.toLowerCase(),A==="auto"){if(i==="height")return s.offsetHeight;if(i==="width")return s.offsetWidth}return i in G||(G[i]=oe.test(i)),G[i]?parseFloat(A)||0:A}function O(s,i){var A=arguments.length,o=j(s);return i=D[i]?"cssFloat"in s.style?"cssFloat":"styleFloat":i,A===1?o:N(s,i,o[i]||s.style[i])}function X(s,i,A){var o=arguments.length;if(i=D[i]?"cssFloat"in s.style?"cssFloat":"styleFloat":i,o===3)return typeof A=="number"&&oe.test(i)&&(A="".concat(A,"px")),s.style[i]=A,A;for(var a in i)i.hasOwnProperty(a)&&X(s,a,i[a]);return j(s)}function M(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),i=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight);return{width:s,height:i}}function f(){var s=document.documentElement.clientWidth,i=window.innerHeight||document.documentElement.clientHeight;return{width:s,height:i}}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 i=s.getBoundingClientRect(),A=document.documentElement;return{left:i.left+(window.pageXOffset||A.scrollLeft)-(A.clientLeft||document.body.clientLeft||0),top:i.top+(window.pageYOffset||A.scrollTop)-(A.clientTop||document.body.clientTop||0)}}}}]);
|