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.
NewEduCoderBuild/p__Classrooms__Lists__Progr...

420 lines
1.1 MiB

(window.webpackJsonp=window.webpackJsonp||[]).push([[98,5,7,8,17],{"+ua5":function(mt,Ze,Z){},"49sm":function(mt,Ze){var Z={}.toString;mt.exports=Array.isArray||function(ve){return Z.call(ve)=="[object Array]"}},"55Ip":function(mt,Ze,Z){"use strict";Z.d(Ze,"a",function(){return r});var ve=Z("Ty5D"),X=Z("dI71"),O=Z("q1tI"),G=Z.n(O),D=Z("YS25"),S=Z("17x9"),z=Z.n(S),F=Z("wx14"),U=Z("zLVn"),I=Z("9R94"),v=function(e){Object(X.a)(o,e);function o(){for(var y,p=arguments.length,f=new Array(p),R=0;R<p;R++)f[R]=arguments[R];return y=e.call.apply(e,[this].concat(f))||this,y.history=Object(D.a)(y.props),y}var l=o.prototype;return l.render=function(){return G.a.createElement(ve.c,{history:this.history,children:this.props.children})},o}(G.a.Component),b=function(e){Object(X.a)(o,e);function o(){for(var y,p=arguments.length,f=new Array(p),R=0;R<p;R++)f[R]=arguments[R];return y=e.call.apply(e,[this].concat(f))||this,y.history=Object(D.b)(y.props),y}var l=o.prototype;return l.render=function(){return G.a.createElement(ve.c,{history:this.history,children:this.props.children})},o}(G.a.Component),u=function(o,l){return typeof o=="function"?o(l):o},a=function(o,l){return typeof o=="string"?Object(D.c)(o,null,null,l):o},n=function(o){return o},s=G.a.forwardRef;typeof s=="undefined"&&(s=n);function i(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}var t=s(function(e,o){var l=e.innerRef,y=e.navigate,p=e.onClick,f=Object(U.a)(e,["innerRef","navigate","onClick"]),R=f.target,L=Object(F.a)({},f,{onClick:function(j){try{p&&p(j)}catch(J){throw j.preventDefault(),J}!j.defaultPrevented&&j.button===0&&(!R||R==="_self")&&!i(j)&&(j.preventDefault(),y())}});return n!==s?L.ref=o||l:L.ref=l,G.a.createElement("a",L)}),r=s(function(e,o){var l=e.component,y=l===void 0?t:l,p=e.replace,f=e.to,R=e.innerRef,L=Object(U.a)(e,["component","replace","to","innerRef"]);return G.a.createElement(ve.e.Consumer,null,function(H){H||Object(I.a)(!1);var j=H.history,J=a(u(f,H.location),H.location),M=J?j.createHref(J):"",Y=Object(F.a)({},L,{href:M,navigate:function(){var de=u(f,H.location),fe=p?j.replace:j.push;fe(de)}});return n!==s?Y.ref=o||R:Y.innerRef=R,G.a.createElement(y,Y)})});if(!1)var A,B;var w=function(o){return o},_=G.a.forwardRef;typeof _=="undefined"&&(_=w);function x(){for(var e=arguments.length,o=new Array(e),l=0;l<e;l++)o[l]=arguments[l];return o.filter(function(y){return y}).join(" ")}var m=_(function(e,o){var l=e["aria-current"],y=l===void 0?"page":l,p=e.activeClassName,f=p===void 0?"active":p,R=e.activeStyle,L=e.className,H=e.exact,j=e.isActive,J=e.location,M=e.sensitive,Y=e.strict,te=e.style,de=e.to,fe=e.innerRef,Le=Object(U.a)(e,["aria-current","activeClassName","activeStyle","className","exact","isActive","location","sensitive","strict","style","to","innerRef"]);return G.a.createElement(ve.e.Consumer,null,function(xe){xe||Object(I.a)(!1);var Ie=J||xe.location,Fe=a(u(de,Ie),Ie),Ue=Fe.pathname,be=Ue&&Ue.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1"),ue=be?Object(ve.f)(Ie.pathname,{path:be,exact:H,sensitive:M,strict:Y}):null,je=!!(j?j(ue,Ie):ue),st=je?x(L,f):L,nt=je?Object(F.a)({},te,{},R):te,rt=Object(F.a)({"aria-current":je&&y||null,className:st,style:nt,to:Fe},Le);return w!==_?rt.ref=o||fe:rt.innerRef=fe,G.a.createElement(r,rt)})});if(!1)var c},"5VLF":function(mt,Ze,Z){"use strict";var ve,X;function O(G,D,S){var z=function(F,U){return G.js_beautify(F,U)};return z.js=G.js_beautify,z.css=D.css_beautify,z.html=S.html_beautify,z.js_beautify=G.js_beautify,z.css_beautify=D.css_beautify,z.html_beautify=S.html_beautify,z}!(ve=[Z("6UM0"),Z("TXwP"),Z("psGv")],X=function(G,D,S){return O(G,D,S)}.apply(Ze,ve),X!==void 0&&(mt.exports=X))},"6+eU":function(mt,Ze,Z){"use strict";Z.d(Ze,"a",function(){return _});var ve=Z("wx14"),X=Z("rePB"),O=Z("VTBJ"),G=Z("1OyB"),D=Z("vuIU"),S=Z("Ji7U"),z=Z("LK+K"),F=Z("q1tI"),U=Z.n(F),I=Z("TSYQ"),v=Z.n(I),b=function(m){var c,e="".concat(m.rootPrefixCls,"-item"),o=v()(e,"".concat(e,"-").concat(m.page),(c={},Object(X.a)(c,"".concat(e,"-active"),m.active),Object(X.a)(c,m.className,!!m.className),Object(X.a)(c,"".concat(e,"-disabled"),!m.page),c)),l=function(){m.onClick(m.page)},y=function(f){m.onKeyPress(f,m.onClick,m.page)};return U.a.createElement("li",{title:m.showTitle?m.page:null,className:o,onClick:l,onKeyPress:y,tabIndex:"0"},m.itemRender(m.page,"page",U.a.createElement("a",{rel:"nofollow"},m.page)))},u=b,a={ZERO:48,NINE:57,NUMPAD_ZERO:96,NUMPAD_NINE:105,BACKSPACE:8,DELETE:46,ENTER:13,ARROW_UP:38,ARROW_DOWN:40},n=function(x){Object(S.a)(c,x);var m=Object(z.a)(c);function c(){var e;Object(G.a)(this,c);for(var o=arguments.length,l=new Array(o),y=0;y<o;y++)l[y]=arguments[y];return e=m.call.apply(m,[this].concat(l)),e.state={goInputText:""},e.buildOptionText=function(p){return"".concat(p," ").concat(e.props.locale.items_per_page)},e.changeSize=function(p){e.props.changeSize(Number(p))},e.handleChange=function(p){e.setState({goInputText:p.target.value})},e.handleBlur=function(p){var f=e.props,R=f.goButton,L=f.quickGo,H=f.rootPrefixCls,j=e.state.goInputText;if(R||j==="")return;if(p.relatedTarget&&(p.relatedTarget.className.indexOf("".concat(H,"-prev"))>=0||p.relatedTarget.className.indexOf("".concat(H,"-next"))>=0))return;e.setState({goInputText:""}),L(e.getValidValue())},e.go=function(p){var f=e.state.goInputText;if(f==="")return;(p.keyCode===a.ENTER||p.type==="click")&&(e.setState({goInputText:""}),e.props.quickGo(e.getValidValue()))},e}return Object(D.a)(c,[{key:"getValidValue",value:function(){var o=this.state,l=o.goInputText,y=o.current;return!l||isNaN(l)?y:Number(l)}},{key:"getPageSizeOptions",value:function(){var o=this.props,l=o.pageSize,y=o.pageSizeOptions;return y.some(function(p){return p.toString()===l.toString()})?y:y.concat([l.toString()]).sort(function(p,f){var R=isNaN(Number(p))?0:Number(p),L=isNaN(Number(f))?0:Number(f);return R-L})}},{key:"render",value:function(){var o=this,l=this.props,y=l.pageSize,p=l.locale,f=l.rootPrefixCls,R=l.changeSize,L=l.quickGo,H=l.goButton,j=l.selectComponentClass,J=l.buildOptionText,M=l.selectPrefixCls,Y=l.disabled,te=this.state.goInputText,de="".concat(f,"-options"),fe=j,Le=null,xe=null,Ie=null;if(!R&&!L)return null;var Fe=this.getPageSizeOptions();if(R&&fe){var Ue=Fe.map(function(be,ue){return U.a.createElement(fe.Option,{key:ue,value:be.toString()},(J||o.buildOptionText)(be))});Le=U.a.createElement(fe,{disabled:Y,prefixCls:M,showSearch:!1,className:"".concat(de,"-size-changer"),optionLabelProp:"children",dropdownMatchSelectWidth:!1,value:(y||Fe[0]).toString(),onChange:this.changeSize,getPopupContainer:function(ue){return ue.parentNode}},Ue)}return L&&(H&&(Ie=typeof H=="boolean"?U.a.createElement("button",{type:"button",onClick:this.go,onKeyUp:this.go,disabled:Y,className:"".concat(de,"-quick-jumper-button")},p.jump_to_confirm):U.a.createElement("span",{onClick:this.go,onKeyUp:this.go},H)),xe=U.a.createElement("div",{className:"".concat(de,"-quick-jumper")},p.jump_to,U.a.createElement("input",{disabled:Y,type:"text",value:te,onChange:this.handleChange,onKeyUp:this.go,onBlur:this.handleBlur}),p.page,Ie)),U.a.createElement("li",{className:"".concat(de)},Le,xe)}}]),c}(U.a.Component);n.defaultProps={pageSizeOptions:["10","20","50","100"]};var s=n,i=Z("N2Kk");function t(){}function r(x){return typeof x=="number"&&isFinite(x)&&Math.floor(x)===x}function A(x,m,c){return c}function B(x,m,c){var e=typeof x=="undefined"?m.pageSize:x;return Math.floor((c.total-1)/e)+1}var w=function(x){Object(S.a)(c,x);var m=Object(z.a)(c);function c(e){var o;Object(G.a)(this,c),o=m.call(this,e),o.getJumpPrevPage=function(){return Math.max(1,o.state.current-(o.props.showLessItems?3:5))},o.getJumpNextPage=function(){return Math.min(B(void 0,o.state,o.props),o.state.current+(o.props.showLessItems?3:5))},o.getItemIcon=function(R,L){var H=o.props.prefixCls,j=R||U.a.createElement("button",{type:"button","aria-label":L,className:"".concat(H,"-item-link")});return typeof R=="function"&&(j=U.a.createElement(R,Object(O.a)({},o.props))),j},o.savePaginationNode=function(R){o.paginationNode=R},o.isValid=function(R){return r(R)&&R!==o.state.current},o.shouldDisplayQuickJumper=function(){var R=o.props,L=R.showQuickJumper,H=R.pageSize,j=R.total;return j<=H?!1:L},o.handleKeyDown=function(R){(R.keyCode===a.ARROW_UP||R.keyCode===a.ARROW_DOWN)&&R.preventDefault()},o.handleKeyUp=function(R){var L=o.getValidValue(R),H=o.state.currentInputValue;L!==H&&o.setState({currentInputValue:L}),R.keyCode===a.ENTER?o.handleChange(L):R.keyCode===a.ARROW_UP?o.handleChange(L-1):R.keyCode===a.ARROW_DOWN&&o.handleChange(L+1)},o.changePageSize=function(R){var L=o.state.current,H=B(R,o.state,o.props);L=L>H?H:L,H===0&&(L=o.state.current),typeof R=="number"&&("pageSize"in o.props||o.setState({pageSize:R}),"current"in o.props||o.setState({current:L,currentInputValue:L})),o.props.onShowSizeChange(L,R),"onChange"in o.props&&o.props.onChange&&o.props.onChange(L,R)},o.handleChange=function(R){var L=o.props.disabled,H=R;if(o.isValid(H)&&!L){var j=B(void 0,o.state,o.props);H>j?H=j:H<1&&(H=1),"current"in o.props||o.setState({current:H,currentInputValue:H});var J=o.state.pageSize;return o.props.onChange(H,J),H}return o.state.current},o.prev=function(){o.hasPrev()&&o.handleChange(o.state.current-1)},o.next=function(){o.hasNext()&&o.handleChange(o.state.current+1)},o.jumpPrev=function(){o.handleChange(o.getJumpPrevPage())},o.jumpNext=function(){o.handleChange(o.getJumpNextPage())},o.hasPrev=function(){return o.state.current>1},o.hasNext=function(){return o.state.current<B(void 0,o.state,o.props)},o.runIfEnter=function(R,L){if(R.key==="Enter"||R.charCode===13){for(var H=arguments.length,j=new Array(H>2?H-2:0),J=2;J<H;J++)j[J-2]=arguments[J];L.apply(void 0,j)}},o.runIfEnterPrev=function(R){o.runIfEnter(R,o.prev)},o.runIfEnterNext=function(R){o.runIfEnter(R,o.next)},o.runIfEnterJumpPrev=function(R){o.runIfEnter(R,o.jumpPrev)},o.runIfEnterJumpNext=function(R){o.runIfEnter(R,o.jumpNext)},o.handleGoTO=function(R){(R.keyCode===a.ENTER||R.type==="click")&&o.handleChange(o.state.currentInputValue)};var l=e.onChange!==t,y="current"in e;y&&!l&&console.warn("Warning: You provided a `current` prop to a Pagination component without an `onChange` handler. This will render a read-only component.");var p=e.defaultCurrent;"current"in e&&(p=e.current);var f=e.defaultPageSize;return"pageSize"in e&&(f=e.pageSize),p=Math.min(p,B(f,void 0,e)),o.state={current:p,currentInputValue:p,pageSize:f},o}return Object(D.a)(c,[{key:"componentDidUpdate",value:function(o,l){var y=this.props.prefixCls;if(l.current!==this.state.current&&this.paginationNode){var p=this.paginationNode.querySelector(".".concat(y,"-item-").concat(l.current));p&&document.activeElement===p&&p.blur()}}},{key:"getValidValue",value:function(o){var l=o.target.value,y=B(void 0,this.state,this.props),p=this.state.currentInputValue,f;return l===""?f=l:isNaN(Number(l))?f=p:l>=y?f=y:f=Number(l),f}},{key:"getShowSizeChanger",value:function(){var o=this.props,l=o.showSizeChanger,y=o.total,p=o.totalBoundaryShowSizeChanger;return typeof l!="undefined"?l:y>p}},{key:"renderPrev",value:function(o){var l=this.props,y=l.prevIcon,p=l.itemRender,f=p(o,"prev",this.getItemIcon(y,"prev page")),R=!this.hasPrev();return Object(F.isValidElement)(f)?Object(F.cloneElement)(f,{disabled:R}):f}},{key:"renderNext",value:function(o){var l=this.props,y=l.nextIcon,p=l.itemRender,f=p(o,"next",this.getItemIcon(y,"next page")),R=!this.hasNext();return Object(F.isValidElement)(f)?Object(F.cloneElement)(f,{disabled:R}):f}},{key:"render",value:function(){var o=this,l=this.props,y=l.prefixCls,p=l.className,f=l.style,R=l.disabled,L=l.hideOnSinglePage,H=l.total,j=l.locale,J=l.showQuickJumper,M=l.showLessItems,Y=l.showTitle,te=l.showTotal,de=l.simple,fe=l.itemRender,Le=l.showPrevNextJumpers,xe=l.jumpPrevIcon,Ie=l.jumpNextIcon,Fe=l.selectComponentClass,Ue=l.selectPrefixCls,be=l.pageSizeOptions,ue=this.state,je=ue.current,st=ue.pageSize,nt=ue.currentInputValue;if(L===!0&&H<=st)return null;var rt=B(void 0,this.state,this.props),He=[],re=null,K=null,W=null,se=null,ye=null,we=J&&J.goButton,_e=M?1:2,$e=je-1>0?je-1:0,qe=je+1<rt?je+1:rt,Ve=Object.keys(this.props).reduce(function(q,ee){return(ee.substr(0,5)==="data-"||ee.substr(0,5)==="aria-"||ee==="role")&&(q[ee]=o.props[ee]),q},{});if(de)return we&&(typeof we=="boolean"?ye=U.a.createElement("button",{type:"button",onClick:this.handleGoTO,onKeyUp:this.handleGoTO},j.jump_to_confirm):ye=U.a.createElement("span",{onClick:this.handleGoTO,onKeyUp:this.handleGoTO},we),ye=U.a.createElement("li",{title:Y?"".concat(j.jump_to).concat(je,"/").concat(rt):null,className:"".concat(y,"-simple-pager")},ye)),U.a.createElement("ul",Object(ve.a)({className:v()(y,"".concat(y,"-simple"),Object(X.a)({},"".concat(y,"-disabled"),R),p),style:f,ref:this.savePaginationNode},Ve),U.a.createElement("li",{title:Y?j.prev_page:null,onClick:this.prev,tabIndex:this.hasPrev()?0:null,onKeyPress:this.runIfEnterPrev,className:v()("".concat(y,"-prev"),Object(X.a)({},"".concat(y,"-disabled"),!this.hasPrev())),"aria-disabled":!this.hasPrev()},this.renderPrev($e)),U.a.createElement("li",{title:Y?"".concat(je,"/").concat(rt):null,className:"".concat(y,"-simple-pager")},U.a.createElement("input",{type:"text",value:nt,disabled:R,onKeyDown:this.handleKeyDown,onKeyUp:this.handleKeyUp,onChange:this.handleKeyUp,size:"3"}),U.a.createElement("span",{className:"".concat(y,"-slash")},"/"),rt),U.a.createElement("li",{title:Y?j.next_page:null,onClick:this.next,tabIndex:this.hasPrev()?0:null,onKeyPress:this.runIfEnterNext,className:v()("".concat(y,"-next"),Object(X.a)({},"".concat(y,"-disabled"),!this.hasNext())),"aria-disabled":!this.hasNext()},this.renderNext(qe)),ye);if(rt<=3+_e*2){var Xe={locale:j,rootPrefixCls:y,onClick:this.handleChange,onKeyPress:this.runIfEnter,showTitle:Y,itemRender:fe};rt||He.push(U.a.createElement(u,Object(ve.a)({},Xe,{key:"noPager",page:rt,className:"".concat(y,"-disabled")})));for(var at=1;at<=rt;at+=1){var ct=je===at;He.push(U.a.createElement(u,Object(ve.a)({},Xe,{key:at,page:at,active:ct})))}}else{var Ce=M?j.prev_3:j.prev_5,De=M?j.next_3:j.next_5;Le&&(re=U.a.createElement("li",{title:Y?Ce:null,key:"prev",onClick:this.jumpPrev,tabIndex:"0",onKeyPress:this.runIfEnterJumpPrev,className:v()("".concat(y,"-jump-prev"),Object(X.a)({},"".concat(y,"-jump-prev-custom-icon"),!!xe))},fe(this.getJumpPrevPage(),"jump-prev",this.getItemIcon(xe,"prev page"))),K=U.a.createElement("li",{title:Y?De:null,key:"next",tabIndex:"0",onClick:this.jumpNext,onKeyPress:this.runIfEnterJumpNext,className:v()("".concat(y,"-jump-next"),Object(X.a)({},"".concat(y,"-jump-next-custom-icon"),!!Ie))},fe(this.getJumpNextPage(),"jump-next",this.getItemIcon(Ie,"next page")))),se=U.a.createElement(u,{locale:j,last:!0,rootPrefixCls:y,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:rt,page:rt,active:!1,showTitle:Y,itemRender:fe}),W=U.a.createElement(u,{locale:j,rootPrefixCls:y,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:1,page:1,active:!1,showTitle:Y,itemRender:fe});var Qe=Math.max(1,je-_e),We=Math.min(je+_e,rt);je-1<=_e&&(We=1+_e*2),rt-je<=_e&&(Qe=rt-_e*2);for(var Re=Qe;Re<=We;Re+=1){var Me=je===Re;He.push(U.a.createElement(u,{locale:j,rootPrefixCls:y,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:Re,page:Re,active:Me,showTitle:Y,itemRender:fe}))}je-1>=_e*2&&je!==1+2&&(He[0]=Object(F.cloneElement)(He[0],{className:"".concat(y,"-item-after-jump-prev")}),He.unshift(re)),rt-je>=_e*2&&je!==rt-2&&(He[He.length-1]=Object(F.cloneElement)(He[He.length-1],{className:"".concat(y,"-item-before-jump-next")}),He.push(K)),Qe!==1&&He.unshift(W),We!==rt&&He.push(se)}var Ee=null;te&&(Ee=U.a.createElement("li",{className:"".concat(y,"-total-text")},te(H,[H===0?0:(je-1)*st+1,je*st>H?H:je*st])));var Ae=!this.hasPrev()||!rt,he=!this.hasNext()||!rt;return U.a.createElement("ul",Object(ve.a)({className:v()(y,p,Object(X.a)({},"".concat(y,"-disabled"),R)),style:f,unselectable:"unselectable",ref:this.savePaginationNode},Ve),Ee,U.a.createElement("li",{title:Y?j.prev_page:null,onClick:this.prev,tabIndex:Ae?null:0,onKeyPress:this.runIfEnterPrev,className:v()("".concat(y,"-prev"),Object(X.a)({},"".concat(y,"-disabled"),Ae)),"aria-disabled":Ae},this.renderPrev($e)),He,U.a.createElement("li",{title:Y?j.next_page:null,onClick:this.next,tabIndex:he?null:0,onKeyPress:this.runIfEnterNext,className:v()("".concat(y,"-next"),Object(X.a)({},"".concat(y,"-disabled"),he)),"aria-disabled":he},this.renderNext(qe)),U.a.createElement(s,{disabled:R,locale:j,rootPrefixCls:y,selectComponentClass:Fe,selectPrefixCls:Ue,changeSize:this.getShowSizeChanger()?this.changePageSize:null,current:je,pageSize:st,pageSizeOptions:be,quickGo:this.shouldDisplayQuickJumper()?this.handleChange:null,goButton:we}))}}],[{key:"getDerivedStateFromProps",value:function(o,l){var y={};if("current"in o&&(y.current=o.current,o.current!==l.current&&(y.currentInputValue=y.current)),"pageSize"in o&&o.pageSize!==l.pageSize){var p=l.current,f=B(o.pageSize,l,o);p=p>f?f:p,"current"in o||(y.current=p,y.currentInputValue=p),y.pageSize=o.pageSize}return y}}]),c}(U.a.Component);w.defaultProps={defaultCurrent:1,total:0,defaultPageSize:10,onChange:t,className:"",selectPrefixCls:"rc-select",prefixCls:"rc-pagination",selectComponentClass:null,hideOnSinglePage:!1,showPrevNextJumpers:!0,showQuickJumper:!1,showLessItems:!1,showTitle:!0,onShowSizeChange:t,locale:i.a,style:{},itemRender:A,totalBoundaryShowSizeChanger:50};var _=w},"6RRn":function(mt,Ze,Z){"use strict";var ve=Z("wCXF"),X=Z("n6Qo");Z.d(Ze,"b",function(){return X.a});var O=Z("IBYe"),G=Z("6eGT"),D=Z("hW8S");Z.d(Ze,"a",function(){return D.a}),Ze.c=ve.b},"6UM0":function(mt,Ze,Z){var ve,X;(function(){var O;(function(){"use strict";var D=[function(U,I,v){var b=v(1).Beautifier,u=v(5).Options;function a(n,s){var i=new b(n,s);return i.beautify()}U.exports=a,U.exports.defaultOptions=function(){return new u}},function(U,I,v){var b=v(2).Output,u=v(3).Token,a=v(4),n=v(5).Options,s=v(7).Tokenizer,i=v(7).line_starters,t=v(7).positionable_operators,r=v(7).TOKEN;function A(M,Y){return Y.indexOf(M)!==-1}function B(M){return M.replace(/^\s+/g,"")}function w(M){for(var Y={},te=0;te<M.length;te++)Y[M[te].replace(/-/g,"_")]=M[te];return Y}function _(M,Y){return M&&M.type===r.RESERVED&&M.text===Y}function x(M,Y){return M&&M.type===r.RESERVED&&A(M.text,Y)}var m=["case","return","do","if","throw","else","await","break","continue","async"],c=["before-newline","after-newline","preserve-newline"],e=w(c),o=[e.before_newline,e.preserve_newline],l={BlockStatement:"BlockStatement",Statement:"Statement",ObjectLiteral:"ObjectLiteral",ArrayLiteral:"ArrayLiteral",ForInitializer:"ForInitializer",Conditional:"Conditional",Expression:"Expression"};function y(M,Y){if(Y.multiline_frame||Y.mode===l.ForInitializer||Y.mode===l.Conditional)return;M.remove_indent(Y.start_line_index)}function p(M){M=M.replace(a.allLineBreaks,`
`);for(var Y=[],te=M.indexOf(`
`);te!==-1;)Y.push(M.substring(0,te)),M=M.substring(te+1),te=M.indexOf(`
`);return M.length&&Y.push(M),Y}function f(M){return M===l.ArrayLiteral}function R(M){return A(M,[l.Expression,l.ForInitializer,l.Conditional])}function L(M,Y){for(var te=0;te<M.length;te++){var de=M[te].trim();if(de.charAt(0)!==Y)return!1}return!0}function H(M,Y){for(var te=0,de=M.length,fe;te<de;te++)if(fe=M[te],fe&&fe.indexOf(Y)!==0)return!1;return!0}function j(M,Y){Y=Y||{},this._source_text=M||"",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 n(Y)}j.prototype.create_flags=function(M,Y){var te=0;M&&(te=M.indentation_level,!this._output.just_added_newline()&&M.line_indent_level>te&&(te=M.line_indent_level));var de={mode:Y,parent:M,last_token:M?M.last_token:new u(r.START_BLOCK,""),last_word:M?M.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:te,alignment:0,line_indent_level:M?M.line_indent_level:te,start_line_index:this._output.get_line_number(),ternary_depth:0};return de},j.prototype._reset=function(M){var Y=M.match(/^[\t ]*/)[0];this._last_last_text="",this._output=new b(this._options,Y),this._output.raw=this._options.test_output_raw,this._flag_store=[],this.set_mode(l.BlockStatement);var te=new s(M,this._options);return this._tokens=te.tokenize(),M},j.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var M,Y=this._reset(this._source_text),te=this._options.eol;this._options.eol==="auto"&&(te=`
`,Y&&a.lineBreak.test(Y||"")&&(te=Y.match(a.lineBreak)[0]));for(var de=this._tokens.next();de;)this.handle_token(de),this._last_last_text=this._flags.last_token.text,this._flags.last_token=de,de=this._tokens.next();return M=this._output.get_code(te),M},j.prototype.handle_token=function(M,Y){M.type===r.START_EXPR?this.handle_start_expr(M):M.type===r.END_EXPR?this.handle_end_expr(M):M.type===r.START_BLOCK?this.handle_start_block(M):M.type===r.END_BLOCK?this.handle_end_block(M):M.type===r.WORD?this.handle_word(M):M.type===r.RESERVED?this.handle_word(M):M.type===r.SEMICOLON?this.handle_semicolon(M):M.type===r.STRING?this.handle_string(M):M.type===r.EQUALS?this.handle_equals(M):M.type===r.OPERATOR?this.handle_operator(M):M.type===r.COMMA?this.handle_comma(M):M.type===r.BLOCK_COMMENT?this.handle_block_comment(M,Y):M.type===r.COMMENT?this.handle_comment(M,Y):M.type===r.DOT?this.handle_dot(M):M.type===r.EOF?this.handle_eof(M):M.type===r.UNKNOWN?this.handle_unknown(M,Y):this.handle_unknown(M,Y)},j.prototype.handle_whitespace_and_comments=function(M,Y){var te=M.newlines,de=this._options.keep_array_indentation&&f(this._flags.mode);if(M.comments_before)for(var fe=M.comments_before.next();fe;)this.handle_whitespace_and_comments(fe,Y),this.handle_token(fe,Y),fe=M.comments_before.next();if(de)for(var Le=0;Le<te;Le+=1)this.print_newline(Le>0,Y);else if(this._options.max_preserve_newlines&&te>this._options.max_preserve_newlines&&(te=this._options.max_preserve_newlines),this._options.preserve_newlines&&te>1){this.print_newline(!1,Y);for(var xe=1;xe<te;xe+=1)this.print_newline(!0,Y)}};var J=["async","break","continue","return","throw","yield"];j.prototype.allow_wrap_or_preserved_newline=function(M,Y){if(Y=Y===void 0?!1:Y,this._output.just_added_newline())return;var te=this._options.preserve_newlines&&M.newlines||Y,de=A(this._flags.last_token.text,t)||A(M.text,t);if(de){var fe=A(this._flags.last_token.text,t)&&A(this._options.operator_position,o)||A(M.text,t);te=te&&fe}if(te)this.print_newline(!1,!0);else if(this._options.wrap_line_length){if(x(this._flags.last_token,J))return;this._output.set_wrap_point()}},j.prototype.print_newline=function(M,Y){if(!Y&&(this._flags.last_token.text!==";"&&this._flags.last_token.text!==","&&this._flags.last_token.text!=="="&&(this._flags.last_token.type!==r.OPERATOR||this._flags.last_token.text==="--"||this._flags.last_token.text==="++")))for(var te=this._tokens.peek();this._flags.mode===l.Statement&&!(this._flags.if_block&&_(te,"else"))&&!this._flags.do_block;)this.restore_mode();this._output.add_new_line(M)&&(this._flags.multiline_frame=!0)},j.prototype.print_token_line_indentation=function(M){this._output.just_added_newline()&&(this._options.keep_array_indentation&&M.newlines&&(M.text==="["||f(this._flags.mode))?(this._output.current_line.set_indent(-1),this._output.current_line.push(M.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))},j.prototype.print_token=function(M){if(this._output.raw){this._output.add_raw_token(M);return}if(this._options.comma_first&&M.previous&&M.previous.type===r.COMMA&&this._output.just_added_newline()&&this._output.previous_line.last()===","){var Y=this._output.previous_line.pop();this._output.previous_line.is_empty()&&(this._output.previous_line.push(Y),this._output.trim(!0),this._output.current_line.pop(),this._output.trim()),this.print_token_line_indentation(M),this._output.add_token(","),this._output.space_before_token=!0}this.print_token_line_indentation(M),this._output.non_breaking_space=!0,this._output.add_token(M.text),this._output.previous_token_wrapped&&(this._flags.multiline_frame=!0)},j.prototype.indent=function(){this._flags.indentation_level+=1,this._output.set_indent(this._flags.indentation_level,this._flags.alignment)},j.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))},j.prototype.set_mode=function(M){this._flags?(this._flag_store.push(this._flags),this._previous_flags=this._flags):this._previous_flags=this.create_flags(null,M),this._flags=this.create_flags(this._previous_flags,M),this._output.set_indent(this._flags.indentation_level,this._flags.alignment)},j.prototype.restore_mode=function(){this._flag_store.length>0&&(this._previous_flags=this._flags,this._flags=this._flag_store.pop(),this._previous_flags.mode===l.Statement&&y(this._output,this._previous_flags),this._output.set_indent(this._flags.indentation_level,this._flags.alignment))},j.prototype.start_of_object_property=function(){return this._flags.parent.mode===l.ObjectLiteral&&this._flags.mode===l.Statement&&(this._flags.last_token.text===":"&&this._flags.ternary_depth===0||x(this._flags.last_token,["get","set"]))},j.prototype.start_of_statement=function(M){var Y=!1;return Y=Y||x(this._flags.last_token,["var","let","const"])&&M.type===r.WORD,Y=Y||_(this._flags.last_token,"do"),Y=Y||!(this._flags.parent.mode===l.ObjectLiteral&&this._flags.mode===l.Statement)&&x(this._flags.last_token,J)&&!M.newlines,Y=Y||_(this._flags.last_token,"else")&&!(_(M,"if")&&!M.comments_before),Y=Y||this._flags.last_token.type===r.END_EXPR&&(this._previous_flags.mode===l.ForInitializer||this._previous_flags.mode===l.Conditional),Y=Y||this._flags.last_token.type===r.WORD&&this._flags.mode===l.BlockStatement&&!this._flags.in_case&&!(M.text==="--"||M.text==="++")&&this._last_last_text!=="function"&&M.type!==r.WORD&&M.type!==r.RESERVED,Y=Y||this._flags.mode===l.ObjectLiteral&&(this._flags.last_token.text===":"&&this._flags.ternary_depth===0||x(this._flags.last_token,["get","set"])),Y?(this.set_mode(l.Statement),this.indent(),this.handle_whitespace_and_comments(M,!0),this.start_of_object_property()||this.allow_wrap_or_preserved_newline(M,x(M,["do","for","if","while"])),!0):!1},j.prototype.handle_start_expr=function(M){this.start_of_statement(M)||this.handle_whitespace_and_comments(M);var Y=l.Expression;if(M.text==="["){if(this._flags.last_token.type===r.WORD||this._flags.last_token.text===")"){x(this._flags.last_token,i)&&(this._output.space_before_token=!0),this.print_token(M),this.set_mode(Y),this.indent(),this._options.space_in_paren&&(this._output.space_before_token=!0);return}Y=l.ArrayLiteral,f(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())),A(this._flags.last_token.type,[r.START_EXPR,r.END_EXPR,r.WORD,r.OPERATOR,r.DOT])||(this._output.space_before_token=!0)}else{if(this._flags.last_token.type===r.RESERVED)this._flags.last_token.text==="for"?(this._output.space_before_token=this._options.space_before_conditional,Y=l.ForInitializer):A(this._flags.last_token.text,["if","while","switch"])?(this._output.space_before_token=this._options.space_before_conditional,Y=l.Conditional):A(this._flags.last_word,["await","async"])?this._output.space_before_token=!0:this._flags.last_token.text==="import"&&M.whitespace_before===""?this._output.space_before_token=!1:(A(this._flags.last_token.text,i)||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(M);else if(this._flags.last_token.type===r.WORD){this._output.space_before_token=!1;var te=this._tokens.peek(-3);if(this._options.space_after_named_function&&te){var de=this._tokens.peek(-4);x(te,["async","function"])||te.text==="*"&&x(de,["async","function"])?this._output.space_before_token=!0:this._flags.mode===l.ObjectLiteral?(te.text==="{"||te.text===","||te.text==="*"&&(de.text==="{"||de.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(M);(this._flags.last_token.type===r.RESERVED&&(this._flags.last_word==="function"||this._flags.last_word==="typeof")||this._flags.last_token.text==="*"&&(A(this._last_last_text,["function","yield"])||this._flags.mode===l.ObjectLiteral&&A(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(M,M.newlines),this.print_token(M),this.set_mode(Y),this._options.space_in_paren&&(this._output.space_before_token=!0),this.indent()},j.prototype.handle_end_expr=function(M){for(;this._flags.mode===l.Statement;)this.restore_mode();this.handle_whitespace_and_comments(M),this._flags.multiline_frame&&this.allow_wrap_or_preserved_newline(M,M.text==="]"&&f(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(M),this.restore_mode(),y(this._output,this._previous_flags),this._flags.do_while&&this._previous_flags.mode===l.Conditional&&(this._previous_flags.mode=l.Expression,this._flags.do_block=!1,this._flags.do_while=!1)},j.prototype.handle_start_block=function(M){this.handle_whitespace_and_comments(M);var Y=this._tokens.peek(),te=this._tokens.peek(1);this._flags.last_word==="switch"&&this._flags.last_token.type===r.END_EXPR?(this.set_mode(l.BlockStatement),this._flags.in_case_statement=!0):this._flags.case_body?this.set_mode(l.BlockStatement):te&&(A(te.text,[":",","])&&A(Y.type,[r.STRING,r.WORD,r.RESERVED])||A(Y.text,["get","set","..."])&&A(te.type,[r.WORD,r.RESERVED]))?A(this._last_last_text,["class","interface"])&&!A(te.text,[":",","])?this.set_mode(l.BlockStatement):this.set_mode(l.ObjectLiteral):this._flags.last_token.type===r.OPERATOR&&this._flags.last_token.text==="=>"?this.set_mode(l.BlockStatement):A(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(l.ObjectLiteral):this.set_mode(l.BlockStatement),this._flags.last_token&&(x(this._flags.last_token.previous,["class","extends"])&&(this._flags.class_start_block=!0));var de=!Y.comments_before&&Y.text==="}",fe=de&&this._flags.last_word==="function"&&this._flags.last_token.type===r.END_EXPR;if(this._options.brace_preserve_inline){var Le=0,xe=null;this._flags.inline_frame=!0;do if(Le+=1,xe=this._tokens.peek(Le-1),xe.newlines){this._flags.inline_frame=!1;break}while(xe.type!==r.EOF&&!(xe.type===r.END_BLOCK&&xe.opened===M))}(this._options.brace_style==="expand"||this._options.brace_style==="none"&&M.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,m)&&this._flags.last_token.text!=="else")?this._output.space_before_token=!0:this.print_newline(!1,!0):(f(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(M),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(M),this.indent(),!de&&!(this._options.brace_preserve_inline&&this._flags.inline_frame)&&this.print_newline()},j.prototype.handle_end_block=function(M){for(this.handle_whitespace_and_comments(M);this._flags.mode===l.Statement;)this.restore_mode();var Y=this._flags.last_token.type===r.START_BLOCK;this._flags.inline_frame&&!Y?this._output.space_before_token=!0:this._options.brace_style==="expand"?Y||this.print_newline():Y||(f(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(M)},j.prototype.handle_word=function(M){if(M.type===r.RESERVED){if(A(M.text,["set","get"])&&this._flags.mode!==l.ObjectLiteral)M.type=r.WORD;else if(M.text==="import"&&A(this._tokens.peek().text,["(","."]))M.type=r.WORD;else if(A(M.text,["as","from"])&&!this._flags.import_block)M.type=r.WORD;else if(this._flags.mode===l.ObjectLiteral){var Y=this._tokens.peek();Y.text===":"&&(M.type=r.WORD)}}if(this.start_of_statement(M)?x(this._flags.last_token,["var","let","const"])&&M.type===r.WORD&&(this._flags.declaration_statement=!0):M.newlines&&!R(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(M),this.print_newline()):this.handle_whitespace_and_comments(M),this._flags.do_block&&!this._flags.do_while)if(_(M,"while")){this._output.space_before_token=!0,this.print_token(M),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&&_(M,"else"))this._flags.else_block=!0;else{for(;this._flags.mode===l.Statement;)this.restore_mode();this._flags.if_block=!1,this._flags.else_block=!1}if(this._flags.in_case_statement&&x(M,["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(M),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(M)),_(M,"function")){(A(this._flags.last_token.text,["}",";"])||this._output.just_added_newline()&&!(A(this._flags.last_token.text,["(","[","{",":","=",","])||this._flags.last_token.type===r.OPERATOR))&&(!this._output.just_added_blankline()&&!M.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,J)?this._output.space_before_token=!0:_(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&&(R(this._flags.mode)||f(this._flags.mode))||this.print_newline(),this.print_token(M),this._flags.last_word=M.text;return}var te="NONE";if(this._flags.last_token.type===r.END_BLOCK?this._previous_flags.inline_frame?te="SPACE":x(M,["else","catch","finally","from"])?this._options.brace_style==="expand"||this._options.brace_style==="end-expand"||this._options.brace_style==="none"&&M.newlines?te="NEWLINE":(te="SPACE",this._output.space_before_token=!0):te="NEWLINE":this._flags.last_token.type===r.SEMICOLON&&this._flags.mode===l.BlockStatement?te="NEWLINE":this._flags.last_token.type===r.SEMICOLON&&R(this._flags.mode)?te="SPACE":this._flags.last_token.type===r.STRING?te="NEWLINE":this._flags.last_token.type===r.RESERVED||this._flags.last_token.type===r.WORD||this._flags.last_token.text==="*"&&(A(this._last_last_text,["function","yield"])||this._flags.mode===l.ObjectLiteral&&A(this._last_last_text,["{",","]))?te="SPACE":this._flags.last_token.type===r.START_BLOCK?this._flags.inline_frame?te="SPACE":te="NEWLINE":this._flags.last_token.type===r.END_EXPR&&(this._output.space_before_token=!0,te="NEWLINE"),x(M,i)&&this._flags.last_token.text!==")"&&(this._flags.inline_frame||this._flags.last_token.text==="else"||this._flags.last_token.text==="export"?te="SPACE":te="NEWLINE"),x(M,["else","catch","finally"]))if((!(this._flags.last_token.type===r.END_BLOCK&&this._previous_flags.mode===l.BlockStatement)||this._options.brace_style==="expand"||this._options.brace_style==="end-expand"||this._options.brace_style==="none"&&M.newlines)&&!this._flags.inline_frame)this.print_newline();else{this._output.trim(!0);var de=this._output.current_line;de.last()!=="}"&&this.print_newline(),this._output.space_before_token=!0}else te==="NEWLINE"?x(this._flags.last_token,m)?this._output.space_before_token=!0:this._flags.last_token.text==="declare"&&x(M,["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(M,["var","let","const"]))&&this._flags.last_token.text!==":"&&(_(M,"if")&&_(M.previous,"else")?this._output.space_before_token=!0:this.print_newline()):x(M,i)&&this._flags.last_token.text!==")"&&this.print_newline():this._flags.multiline_frame&&f(this._flags.mode)&&this._flags.last_token.text===","&&this._last_last_text==="}"?this.print_newline():te==="SPACE"&&(this._output.space_before_token=!0);M.previous&&(M.previous.type===r.WORD||M.previous.type===r.RESERVED)&&(this._output.space_before_token=!0),this.print_token(M),this._flags.last_word=M.text,M.type===r.RESERVED&&(M.text==="do"?this._flags.do_block=!0:M.text==="if"?this._flags.if_block=!0:M.text==="import"?this._flags.import_block=!0:this._flags.import_block&&_(M,"from")&&(this._flags.import_block=!1))},j.prototype.handle_semicolon=function(M){this.start_of_statement(M)?this._output.space_before_token=!1:this.handle_whitespace_and_comments(M);for(var Y=this._tokens.peek();this._flags.mode===l.Statement&&!(this._flags.if_block&&_(Y,"else"))&&!this._flags.do_block;)this.restore_mode();this._flags.import_block&&(this._flags.import_block=!1),this.print_token(M)},j.prototype.handle_string=function(M){M.text.startsWith("`")&&M.newlines===0&&M.whitespace_before===""&&(M.previous.text===")"||this._flags.last_token.type===r.WORD)||(this.start_of_statement(M)?this._output.space_before_token=!0:(this.handle_whitespace_and_comments(M),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(M):M.text.startsWith("`")&&this._flags.last_token.type===r.END_EXPR&&(M.previous.text==="]"||M.previous.text===")")&&M.newlines===0?this._output.space_before_token=!0:this.print_newline())),this.print_token(M)},j.prototype.handle_equals=function(M){this.start_of_statement(M)||this.handle_whitespace_and_comments(M),this._flags.declaration_statement&&(this._flags.declaration_assignment=!0),this._output.space_before_token=!0,this.print_token(M),this._output.space_before_token=!0},j.prototype.handle_comma=function(M){this.handle_whitespace_and_comments(M,!0),this.print_token(M),this._output.space_before_token=!0,this._flags.declaration_statement?(R(this._flags.parent.mode)&&(this._flags.declaration_assignment=!1),this._flags.declaration_assignment?(this._flags.declaration_assignment=!1,this.print_newline(!1,!0)):this._options.comma_first&&this.allow_wrap_or_preserved_newline(M)):this._flags.mode===l.ObjectLiteral||this._flags.mode===l.Statement&&this._flags.parent.mode===l.ObjectLiteral?(this._flags.mode===l.Statement&&this.restore_mode(),this._flags.inline_frame||this.print_newline()):this._options.comma_first&&this.allow_wrap_or_preserved_newline(M)},j.prototype.handle_operator=function(M){var Y=M.text==="*"&&(x(this._flags.last_token,["function","yield"])||A(this._flags.last_token.type,[r.START_BLOCK,r.COMMA,r.END_BLOCK,r.SEMICOLON])),te=A(M.text,["-","+"])&&(A(this._flags.last_token.type,[r.START_BLOCK,r.START_EXPR,r.EQUALS,r.OPERATOR])||A(this._flags.last_token.text,i)||this._flags.last_token.text===",");if(!this.start_of_statement(M)){var de=!Y;this.handle_whitespace_and_comments(M,de)}if(M.text==="*"&&this._flags.last_token.type===r.DOT){this.print_token(M);return}if(M.text==="::"){this.print_token(M);return}if(this._flags.last_token.type===r.OPERATOR&&A(this._options.operator_position,o)&&this.allow_wrap_or_preserved_newline(M),M.text===":"&&this._flags.in_case){this.print_token(M),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,xe=!1;if(M.text===":"?this._flags.ternary_depth===0?fe=!1:(this._flags.ternary_depth-=1,xe=!0):M.text==="?"&&(this._flags.ternary_depth+=1),!te&&!Y&&this._options.preserve_newlines&&A(M.text,t)){var Ie=M.text===":",Fe=Ie&&xe,Ue=Ie&&!xe;switch(this._options.operator_position){case e.before_newline:this._output.space_before_token=!Ue,this.print_token(M),(!Ie||Fe)&&this.allow_wrap_or_preserved_newline(M),this._output.space_before_token=!0;return;case e.after_newline:this._output.space_before_token=!0,!Ie||Fe?this._tokens.peek().newlines?this.print_newline(!1,!0):this.allow_wrap_or_preserved_newline(M):this._output.space_before_token=!1,this.print_token(M),this._output.space_before_token=!0;return;case e.preserve_newline:Ue||this.allow_wrap_or_preserved_newline(M),fe=!(this._output.just_added_newline()||Ue),this._output.space_before_token=fe,this.print_token(M),this._output.space_before_token=!0;return}}if(Y){this.allow_wrap_or_preserved_newline(M),fe=!1;var be=this._tokens.peek();Le=be&&A(be.type,[r.WORD,r.RESERVED])}else if(M.text==="...")this.allow_wrap_or_preserved_newline(M),fe=this._flags.last_token.type===r.START_BLOCK,Le=!1;else if(A(M.text,["--","++","!","~"])||te){if((this._flags.last_token.type===r.COMMA||this._flags.last_token.type===r.START_EXPR)&&this.allow_wrap_or_preserved_newline(M),fe=!1,Le=!1,M.newlines&&(M.text==="--"||M.text==="++"||M.text==="~")){var ue=x(this._flags.last_token,m)&&M.newlines;ue&&(this._previous_flags.if_block||this._previous_flags.else_block)&&this.restore_mode(),this.print_newline(ue,!0)}this._flags.last_token.text===";"&&R(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==="]"&&(M.text==="--"||M.text==="++")):this._flags.last_token.type===r.OPERATOR&&(fe=A(M.text,["--","-","++","+"])&&A(this._flags.last_token.text,["--","-","++","+"]),A(M.text,["+","-"])&&A(this._flags.last_token.text,["--","++"])&&(Le=!0)),(this._flags.mode===l.BlockStatement&&!this._flags.inline_frame||this._flags.mode===l.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(M),this._output.space_before_token=Le},j.prototype.handle_block_comment=function(M,Y){if(this._output.raw){this._output.add_raw_token(M),M.directives&&M.directives.preserve==="end"&&(this._output.raw=this._options.test_output_raw);return}if(M.directives){this.print_newline(!1,Y),this.print_token(M),M.directives.preserve==="start"&&(this._output.raw=!0),this.print_newline(!1,!0);return}if(!a.newline.test(M.text)&&!M.newlines){this._output.space_before_token=!0,this.print_token(M),this._output.space_before_token=!0;return}else this.print_block_commment(M,Y)},j.prototype.print_block_commment=function(M,Y){var te=p(M.text),de,fe=!1,Le=!1,xe=M.whitespace_before,Ie=xe.length;if(this.print_newline(!1,Y),this.print_token_line_indentation(M),this._output.add_token(te[0]),this.print_newline(!1,Y),te.length>1){for(te=te.slice(1),fe=L(te,"*"),Le=H(te,xe),fe&&(this._flags.alignment=1),de=0;de<te.length;de++)fe?(this.print_token_line_indentation(M),this._output.add_token(B(te[de]))):Le&&te[de]?(this.print_token_line_indentation(M),this._output.add_token(te[de].substring(Ie))):(this._output.current_line.set_indent(-1),this._output.add_token(te[de])),this.print_newline(!1,Y);this._flags.alignment=0}},j.prototype.handle_comment=function(M,Y){M.newlines?this.print_newline(!1,Y):this._output.trim(!0),this._output.space_before_token=!0,this.print_token(M),this.print_newline(!1,Y)},j.prototype.handle_dot=function(M){this.start_of_statement(M)||this.handle_whitespace_and_comments(M,!0),this._flags.last_token.text.match("^[0-9]+$")&&(this._output.space_before_token=!0),x(this._flags.last_token,m)?this._output.space_before_token=!1:this.allow_wrap_or_preserved_newline(M,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(M)},j.prototype.handle_unknown=function(M,Y){this.print_token(M),M.text[M.text.length-1]===`
`&&this.print_newline(!1,Y)},j.prototype.handle_eof=function(M){for(;this._flags.mode===l.Statement;)this.restore_mode();this.handle_whitespace_and_comments(M)},U.exports.Beautifier=j},function(U){function I(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=[]}I.prototype.clone_empty=function(){var u=new I(this.__parent);return u.set_indent(this.__indent_count,this.__alignment_count),u},I.prototype.item=function(u){return u<0?this.__items[this.__items.length+u]:this.__items[u]},I.prototype.has_match=function(u){for(var a=this.__items.length-1;a>=0;a--)if(this.__items[a].match(u))return!0;return!1},I.prototype.set_indent=function(u,a){this.is_empty()&&(this.__indent_count=u||0,this.__alignment_count=a||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},I.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)},I.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},I.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},I.prototype.is_empty=function(){return this.__items.length===0},I.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},I.prototype.push=function(u){this.__items.push(u);var a=u.lastIndexOf(`
`);a!==-1?this.__character_count=u.length-a:this.__character_count+=u.length},I.prototype.pop=function(){var u=null;return this.is_empty()||(u=this.__items.pop(),this.__character_count-=u.length),u},I.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},I.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},I.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},I.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 v(u,a){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)),a=a||"",u.indent_level>0&&(a=new Array(u.indent_level+1).join(this.__indent_string)),this.__base_string=a,this.__base_string_length=a.length}v.prototype.get_indent_size=function(u,a){var n=this.__base_string_length;return a=a||0,u<0&&(n=0),n+=u*this.__indent_size,n+=a,n},v.prototype.get_indent_string=function(u,a){var n=this.__base_string;return a=a||0,u<0&&(u=0,n=""),a+=u*this.__indent_size,this.__ensure_cache(a),n+=this.__cache[a],n},v.prototype.__ensure_cache=function(u){for(;u>=this.__cache.length;)this.__add_column()},v.prototype.__add_column=function(){var u=this.__cache.length,a=0,n="";this.__indent_size&&u>=this.__indent_size&&(a=Math.floor(u/this.__indent_size),u-=a*this.__indent_size,n=new Array(a+1).join(this.__indent_string)),u&&(n+=new Array(u+1).join(" ")),this.__cache.push(n)};function b(u,a){this.__indent_cache=new v(u,a),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 I(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}b.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},b.prototype.get_line_number=function(){return this.__lines.length},b.prototype.get_indent_string=function(u,a){return this.__indent_cache.get_indent_string(u,a)},b.prototype.get_indent_size=function(u,a){return this.__indent_cache.get_indent_size(u,a)},b.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},b.prototype.add_new_line=function(u){return this.is_empty()||!u&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},b.prototype.get_code=function(u){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 n=this.__lines.join(`
`);return u!==`
`&&(n=n.replace(/[\n]/g,u)),n},b.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},b.prototype.set_indent=function(u,a){return u=u||0,a=a||0,this.next_line.set_indent(u,a),this.__lines.length>1?(this.current_line.set_indent(u,a),!0):(this.current_line.set_indent(),!1)},b.prototype.add_raw_token=function(u){for(var a=0;a<u.newlines;a++)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},b.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()},b.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(" "))},b.prototype.remove_indent=function(u){for(var a=this.__lines.length;u<a;)this.__lines[u]._remove_indent(),u++;this.current_line._remove_wrap_indent()},b.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},b.prototype.just_added_newline=function(){return this.current_line.is_empty()},b.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},b.prototype.ensure_empty_line_above=function(u,a){for(var n=this.__lines.length-2;n>=0;){var s=this.__lines[n];if(s.is_empty())break;if(s.item(0).indexOf(u)!==0&&s.item(-1)!==a){this.__lines.splice(n+1,0,new I(this)),this.previous_line=this.__lines[this.__lines.length-2];break}n--}},U.exports.Output=b},function(U){function I(v,b,u,a){this.type=v,this.text=b,this.comments_before=null,this.newlines=u||0,this.whitespace_before=a||"",this.parent=null,this.next=null,this.previous=null,this.opened=null,this.closed=null,this.directives=null}U.exports.Token=I},function(U,I){var v="\\x23\\x24\\x40\\x41-\\x5a\\x5f\\x61-\\x7a",b="\\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",a="\\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",n="(?:\\\\u[0-9a-fA-F]{4}|["+v+u+"])",s="(?:\\\\u[0-9a-fA-F]{4}|["+b+u+a+"])*";I.identifier=new RegExp(n+s,"g"),I.identifierStart=new RegExp(n),I.identifierMatch=new RegExp("(?:\\\\u[0-9a-fA-F]{4}|["+b+u+a+"])+");var i=/[\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff]/;I.newline=/[\n\r\u2028\u2029]/,I.lineBreak=new RegExp(`\r
|`+I.newline.source),I.allLineBreaks=new RegExp(I.lineBreak.source,"g")},function(U,I,v){var b=v(6).Options,u=["before-newline","after-newline","preserve-newline"];function a(n){b.call(this,n,"js");var s=this.raw_options.brace_style||null;s==="expand-strict"?this.raw_options.brace_style="expand":s==="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 i=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_preserve_inline=!1,this.brace_style="collapse";for(var t=0;t<i.length;t++)i[t]==="preserve-inline"?this.brace_preserve_inline=!0:this.brace_style=i[t];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)}a.prototype=new b,U.exports.Options=a},function(U){function I(u,a){this.raw_options=v(u,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"])}I.prototype._get_array=function(u,a){var n=this.raw_options[u],s=a||[];return typeof n=="object"?n!==null&&typeof n.concat=="function"&&(s=n.concat()):typeof n=="string"&&(s=n.split(/[^a-zA-Z0-9_\/\-]+/)),s},I.prototype._get_boolean=function(u,a){var n=this.raw_options[u],s=n===void 0?!!a:!!n;return s},I.prototype._get_characters=function(u,a){var n=this.raw_options[u],s=a||"";return typeof n=="string"&&(s=n.replace(/\\r/,"\r").replace(/\\n/,`
`).replace(/\\t/," ")),s},I.prototype._get_number=function(u,a){var n=this.raw_options[u];a=parseInt(a,10),isNaN(a)&&(a=0);var s=parseInt(n,10);return isNaN(s)&&(s=a),s},I.prototype._get_selection=function(u,a,n){var s=this._get_selection_list(u,a,n);if(s.length!==1)throw new Error("Invalid Option Value: The option '"+u+`' can only be one of the following values:
`+a+`
You passed in: '`+this.raw_options[u]+"'");return s[0]},I.prototype._get_selection_list=function(u,a,n){if(!a||a.length===0)throw new Error("Selection list cannot be empty.");if(n=n||[a[0]],!this._is_valid_selection(n,a))throw new Error("Invalid Default Value!");var s=this._get_array(u,n);if(!this._is_valid_selection(s,a))throw new Error("Invalid Option Value: The option '"+u+`' can contain only the following values:
`+a+`
You passed in: '`+this.raw_options[u]+"'");return s},I.prototype._is_valid_selection=function(u,a){return u.length&&a.length&&!u.some(function(n){return a.indexOf(n)===-1})};function v(u,a){var n={};u=b(u);var s;for(s in u)s!==a&&(n[s]=u[s]);if(a&&u[a])for(s in u[a])n[s]=u[a][s];return n}function b(u){var a={},n;for(n in u){var s=n.replace(/-/g,"_");a[s]=u[n]}return a}U.exports.Options=I,U.exports.normalizeOpts=b,U.exports.mergeOpts=v},function(U,I,v){var b=v(8).InputScanner,u=v(9).Tokenizer,a=v(9).TOKEN,n=v(13).Directives,s=v(4),i=v(12).Pattern,t=v(14).TemplatablePattern;function r(L,H){return H.indexOf(L)!==-1}var A={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:a.START,RAW:a.RAW,EOF:a.EOF},B=new n(/\/\*/,/\*\//),w=/0[xX][0123456789abcdefABCDEF_]*n?|0[oO][01234567_]*n?|0[bB][01_]*n?|\d[\d_]*n|(?:\.\d[\d_]*|\d[\d_]*\.?[\d_]*)(?:[eE][+-]?[\d_]+)?/,_=/[0-9]/,x=/[^\d\.]/,m=">>> === !== &&= ??= ||= << && >= ** != == <= >> || ?? |> < / - + > : & % ? ^ | *".split(" "),c=">>>= ... >>= <<= === >>> !== **= &&= ??= ||= => ^= :: /= << <= == && -= >= >> != -- += ** || ?? ++ %= &= *= |= |> = ! ? > < : / ^ - + * & % ~ |";c=c.replace(/[-[\]{}()*+?.,\\^$|#]/g,"\\$&"),c="\\?\\.(?!\\d) "+c,c=c.replace(/ /g,"|");var e=new RegExp(c),o="continue,try,throw,return,var,let,const,if,switch,case,default,for,while,break,function,import,export".split(","),l=o.concat(["do","in","of","else","get","set","new","catch","finally","typeof","yield","async","await","from","as","class","extends"]),y=new RegExp("^(?:"+l.join("|")+")$"),p,f=function(L,H){u.call(this,L,H),this._patterns.whitespace=this._patterns.whitespace.matching(/\u00A0\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff/.source,/\u2028\u2029/.source);var j=new i(this._input),J=new t(this._input).read_options(this._options);this.__patterns={template:J,identifier:J.starting_with(s.identifier).matching(s.identifierMatch),number:j.matching(w),punct:j.matching(e),comment:j.starting_with(/\/\//).until(/[\n\r\u2028\u2029]/),block_comment:j.starting_with(/\/\*/).until_after(/\*\//),html_comment_start:j.matching(/<!--/),html_comment_end:j.matching(/-->/),include:j.starting_with(/#include/).until_after(s.lineBreak),shebang:j.starting_with(/#!/).until_after(s.lineBreak),xml:j.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:J.until(/['\\\n\r\u2028\u2029]/),double_quote:J.until(/["\\\n\r\u2028\u2029]/),template_text:J.until(/[`\\$]/),template_expression:J.until(/[`}\\]/)}};f.prototype=new u,f.prototype._is_comment=function(L){return L.type===A.COMMENT||L.type===A.BLOCK_COMMENT||L.type===A.UNKNOWN},f.prototype._is_opening=function(L){return L.type===A.START_BLOCK||L.type===A.START_EXPR},f.prototype._is_closing=function(L,H){return(L.type===A.END_BLOCK||L.type===A.END_EXPR)&&H&&(L.text==="]"&&H.text==="["||L.text===")"&&H.text==="("||L.text==="}"&&H.text==="{")},f.prototype._reset=function(){p=!1},f.prototype._get_next_token=function(L,H){var j=null;this._readWhitespace();var J=this._input.peek();return J===null?this._create_token(A.EOF,""):(j=j||this._read_non_javascript(J),j=j||this._read_string(J),j=j||this._read_word(L),j=j||this._read_singles(J),j=j||this._read_comment(J),j=j||this._read_regexp(J,L),j=j||this._read_xml(J,L),j=j||this._read_punctuation(),j=j||this._create_token(A.UNKNOWN,this._input.next()),j)},f.prototype._read_word=function(L){var H;if(H=this.__patterns.identifier.read(),H!=="")return H=H.replace(s.allLineBreaks,`
`),!(L.type===A.DOT||L.type===A.RESERVED&&(L.text==="set"||L.text==="get"))&&y.test(H)?(H==="in"||H==="of")&&(L.type===A.WORD||L.type===A.STRING)?this._create_token(A.OPERATOR,H):this._create_token(A.RESERVED,H):this._create_token(A.WORD,H);if(H=this.__patterns.number.read(),H!=="")return this._create_token(A.WORD,H)},f.prototype._read_singles=function(L){var H=null;return L==="("||L==="["?H=this._create_token(A.START_EXPR,L):L===")"||L==="]"?H=this._create_token(A.END_EXPR,L):L==="{"?H=this._create_token(A.START_BLOCK,L):L==="}"?H=this._create_token(A.END_BLOCK,L):L===";"?H=this._create_token(A.SEMICOLON,L):L==="."&&x.test(this._input.peek(1))?H=this._create_token(A.DOT,L):L===","&&(H=this._create_token(A.COMMA,L)),H&&this._input.next(),H},f.prototype._read_punctuation=function(){var L=this.__patterns.punct.read();if(L!=="")return L==="="?this._create_token(A.EQUALS,L):L==="?."?this._create_token(A.DOT,L):this._create_token(A.OPERATOR,L)},f.prototype._read_non_javascript=function(L){var H="";if(L==="#"){if(this._is_first_token()&&(H=this.__patterns.shebang.read(),H))return this._create_token(A.UNKNOWN,H.trim()+`
`);if(H=this.__patterns.include.read(),H)return this._create_token(A.UNKNOWN,H.trim()+`
`);L=this._input.next();var j="#";if(this._input.hasNext()&&this._input.testChar(_)){do L=this._input.next(),j+=L;while(this._input.hasNext()&&L!=="#"&&L!=="=");return L==="#"||(this._input.peek()==="["&&this._input.peek(1)==="]"?(j+="[]",this._input.next(),this._input.next()):this._input.peek()==="{"&&this._input.peek(1)==="}"&&(j+="{}",this._input.next(),this._input.next())),this._create_token(A.WORD,j)}this._input.back()}else if(L==="<"&&this._is_first_token()){if(H=this.__patterns.html_comment_start.read(),H){for(;this._input.hasNext()&&!this._input.testChar(s.newline);)H+=this._input.next();return p=!0,this._create_token(A.COMMENT,H)}}else if(p&&L==="-"&&(H=this.__patterns.html_comment_end.read(),H))return p=!1,this._create_token(A.COMMENT,H);return null},f.prototype._read_comment=function(L){var H=null;if(L==="/"){var j="";if(this._input.peek(1)==="*"){j=this.__patterns.block_comment.read();var J=B.get_directives(j);J&&J.ignore==="start"&&(j+=B.readIgnored(this._input)),j=j.replace(s.allLineBreaks,`
`),H=this._create_token(A.BLOCK_COMMENT,j),H.directives=J}else this._input.peek(1)==="/"&&(j=this.__patterns.comment.read(),H=this._create_token(A.COMMENT,j))}return H},f.prototype._read_string=function(L){if(L==="`"||L==="'"||L==='"'){var H=this._input.next();return this.has_char_escapes=!1,L==="`"?H+=this._read_string_recursive("`",!0,"${"):H+=this._read_string_recursive(L),this.has_char_escapes&&this._options.unescape_strings&&(H=R(H)),this._input.peek()===L&&(H+=this._input.next()),H=H.replace(s.allLineBreaks,`
`),this._create_token(A.STRING,H)}return null},f.prototype._allow_regexp_or_xml=function(L){return L.type===A.RESERVED&&r(L.text,["return","case","throw","else","do","typeof","yield"])||L.type===A.END_EXPR&&L.text===")"&&L.opened.previous.type===A.RESERVED&&r(L.opened.previous.text,["if","while","for"])||r(L.type,[A.COMMENT,A.START_EXPR,A.START_BLOCK,A.START,A.END_BLOCK,A.OPERATOR,A.EQUALS,A.EOF,A.SEMICOLON,A.COMMA])},f.prototype._read_regexp=function(L,H){if(L==="/"&&this._allow_regexp_or_xml(H)){for(var j=this._input.next(),J=!1,M=!1;this._input.hasNext()&&(J||M||this._input.peek()!==L)&&!this._input.testChar(s.newline);)j+=this._input.peek(),J?J=!1:(J=this._input.peek()==="\\",this._input.peek()==="["?M=!0:this._input.peek()==="]"&&(M=!1)),this._input.next();return this._input.peek()===L&&(j+=this._input.next(),j+=this._input.read(s.identifier)),this._create_token(A.STRING,j)}return null},f.prototype._read_xml=function(L,H){if(this._options.e4x&&L==="<"&&this._allow_regexp_or_xml(H)){var j="",J=this.__patterns.xml.read_match();if(J){for(var M=J[2].replace(/^{\s+/,"{").replace(/\s+}$/,"}"),Y=M.indexOf("{")===0,te=0;J;){var de=!!J[1],fe=J[2],Le=!!J[J.length-1]||fe.slice(0,8)==="![CDATA[";if(!Le&&(fe===M||Y&&fe.replace(/^{\s+/,"{").replace(/\s+}$/,"}"))&&(de?--te:++te),j+=J[0],te<=0)break;J=this.__patterns.xml.read_match()}return J||(j+=this._input.match(/[\s\S]*/g)[0]),j=j.replace(s.allLineBreaks,`
`),this._create_token(A.STRING,j)}}return null};function R(L){for(var H="",j=0,J=new b(L),M=null;J.hasNext();)if(M=J.match(/([\s]|[^\\]|\\\\)+/g),M&&(H+=M[0]),J.peek()==="\\"){if(J.next(),J.peek()==="x")M=J.match(/x([0-9A-Fa-f]{2})/g);else if(J.peek()==="u")M=J.match(/u([0-9A-Fa-f]{4})/g);else{H+="\\",J.hasNext()&&(H+=J.next());continue}if(!M)return L;if(j=parseInt(M[1],16),j>126&&j<=255&&M[0].indexOf("x")===0)return L;if(j>=0&&j<32){H+="\\"+M[0];continue}else j===34||j===39||j===92?H+="\\"+String.fromCharCode(j):H+=String.fromCharCode(j)}return H}f.prototype._read_string_recursive=function(L,H,j){var J,M;L==="'"?M=this.__patterns.single_quote:L==='"'?M=this.__patterns.double_quote:L==="`"?M=this.__patterns.template_text:L==="}"&&(M=this.__patterns.template_expression);for(var Y=M.read(),te="";this._input.hasNext();){if(te=this._input.next(),te===L||!H&&s.newline.test(te)){this._input.back();break}else te==="\\"&&this._input.hasNext()?(J=this._input.peek(),J==="x"||J==="u"?this.has_char_escapes=!0:J==="\r"&&this._input.peek(1)===`
`&&this._input.next(),te+=this._input.next()):j&&(j==="${"&&te==="$"&&this._input.peek()==="{"&&(te+=this._input.next()),j===te&&(L==="`"?te+=this._read_string_recursive("}",H,"`"):te+=this._read_string_recursive("`",H,"${"),this._input.hasNext()&&(te+=this._input.next())));te+=M.read(),Y+=te}return Y},U.exports.Tokenizer=f,U.exports.TOKEN=A,U.exports.positionable_operators=m.slice(),U.exports.line_starters=o.slice()},function(U){var I=RegExp.prototype.hasOwnProperty("sticky");function v(b){this.__input=b||"",this.__input_length=this.__input.length,this.__position=0}v.prototype.restart=function(){this.__position=0},v.prototype.back=function(){this.__position>0&&(this.__position-=1)},v.prototype.hasNext=function(){return this.__position<this.__input_length},v.prototype.next=function(){var b=null;return this.hasNext()&&(b=this.__input.charAt(this.__position),this.__position+=1),b},v.prototype.peek=function(b){var u=null;return b=b||0,b+=this.__position,b>=0&&b<this.__input_length&&(u=this.__input.charAt(b)),u},v.prototype.__match=function(b,u){b.lastIndex=u;var a=b.exec(this.__input);return a&&!(I&&b.sticky)&&(a.index!==u&&(a=null)),a},v.prototype.test=function(b,u){return u=u||0,u+=this.__position,u>=0&&u<this.__input_length?!!this.__match(b,u):!1},v.prototype.testChar=function(b,u){var a=this.peek(u);return b.lastIndex=0,a!==null&&b.test(a)},v.prototype.match=function(b){var u=this.__match(b,this.__position);return u?this.__position+=u[0].length:u=null,u},v.prototype.read=function(b,u,a){var n="",s;return b&&(s=this.match(b),s&&(n+=s[0])),u&&(s||!b)&&(n+=this.readUntil(u,a)),n},v.prototype.readUntil=function(b,u){var a="",n=this.__position;b.lastIndex=this.__position;var s=b.exec(this.__input);return s?(n=s.index,u&&(n+=s[0].length)):n=this.__input_length,a=this.__input.substring(this.__position,n),this.__position=n,a},v.prototype.readUntilAfter=function(b){return this.readUntil(b,!0)},v.prototype.get_regexp=function(b,u){var a=null,n="g";return u&&I&&(n="y"),typeof b=="string"&&b!==""?a=new RegExp(b,n):b&&(a=new RegExp(b.source,n)),a},v.prototype.get_literal_regexp=function(b){return RegExp(b.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},v.prototype.peekUntilAfter=function(b){var u=this.__position,a=this.readUntilAfter(b);return this.__position=u,a},v.prototype.lookBack=function(b){var u=this.__position-1;return u>=b.length&&this.__input.substring(u-b.length,u).toLowerCase()===b},U.exports.InputScanner=v},function(U,I,v){var b=v(8).InputScanner,u=v(3).Token,a=v(10).TokenStream,n=v(11).WhitespacePattern,s={START:"TK_START",RAW:"TK_RAW",EOF:"TK_EOF"},i=function(t,r){this._input=new b(t),this._options=r||{},this.__tokens=null,this._patterns={},this._patterns.whitespace=new n(this._input)};i.prototype.tokenize=function(){this._input.restart(),this.__tokens=new a,this._reset();for(var t,r=new u(s.START,""),A=null,B=[],w=new a;r.type!==s.EOF;){for(t=this._get_next_token(r,A);this._is_comment(t);)w.add(t),t=this._get_next_token(r,A);w.isEmpty()||(t.comments_before=w,w=new a),t.parent=A,this._is_opening(t)?(B.push(A),A=t):A&&this._is_closing(t,A)&&(t.opened=A,A.closed=t,A=B.pop(),t.parent=A),t.previous=r,r.next=t,this.__tokens.add(t),r=t}return this.__tokens},i.prototype._is_first_token=function(){return this.__tokens.isEmpty()},i.prototype._reset=function(){},i.prototype._get_next_token=function(t,r){this._readWhitespace();var A=this._input.read(/.+/g);return A?this._create_token(s.RAW,A):this._create_token(s.EOF,"")},i.prototype._is_comment=function(t){return!1},i.prototype._is_opening=function(t){return!1},i.prototype._is_closing=function(t,r){return!1},i.prototype._create_token=function(t,r){var A=new u(t,r,this._patterns.whitespace.newline_count,this._patterns.whitespace.whitespace_before_token);return A},i.prototype._readWhitespace=function(){return this._patterns.whitespace.read()},U.exports.Tokenizer=i,U.exports.TOKEN=s},function(U){function I(v){this.__tokens=[],this.__tokens_length=this.__tokens.length,this.__position=0,this.__parent_token=v}I.prototype.restart=function(){this.__position=0},I.prototype.isEmpty=function(){return this.__tokens_length===0},I.prototype.hasNext=function(){return this.__position<this.__tokens_length},I.prototype.next=function(){var v=null;return this.hasNext()&&(v=this.__tokens[this.__position],this.__position+=1),v},I.prototype.peek=function(v){var b=null;return v=v||0,v+=this.__position,v>=0&&v<this.__tokens_length&&(b=this.__tokens[v]),b},I.prototype.add=function(v){this.__parent_token&&(v.parent=this.__parent_token),this.__tokens.push(v),this.__tokens_length+=1},U.exports.TokenStream=I},function(U,I,v){var b=v(12).Pattern;function u(a,n){b.call(this,a,n),n?this._line_regexp=this._input.get_regexp(n._line_regexp):this.__set_whitespace_patterns("",""),this.newline_count=0,this.whitespace_before_token=""}u.prototype=new b,u.prototype.__set_whitespace_patterns=function(a,n){a+="\\t ",n+="\\n\\r",this._match_pattern=this._input.get_regexp("["+a+n+"]+",!0),this._newline_regexp=this._input.get_regexp("\\r\\n|["+n+"]")},u.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 n=this.__split(this._newline_regexp,a);this.newline_count=n.length-1,this.whitespace_before_token=n[this.newline_count]}return a},u.prototype.matching=function(a,n){var s=this._create();return s.__set_whitespace_patterns(a,n),s._update(),s},u.prototype._create=function(){return new u(this._input,this)},u.prototype.__split=function(a,n){a.lastIndex=0;for(var s=0,i=[],t=a.exec(n);t;)i.push(n.substring(s,t.index)),s=t.index+t[0].length,t=a.exec(n);return s<n.length?i.push(n.substring(s,n.length)):i.push(""),i},U.exports.WhitespacePattern=u},function(U){function I(v,b){this._input=v,this._starting_pattern=null,this._match_pattern=null,this._until_pattern=null,this._until_after=!1,b&&(this._starting_pattern=this._input.get_regexp(b._starting_pattern,!0),this._match_pattern=this._input.get_regexp(b._match_pattern,!0),this._until_pattern=this._input.get_regexp(b._until_pattern),this._until_after=b._until_after)}I.prototype.read=function(){var v=this._input.read(this._starting_pattern);return(!this._starting_pattern||v)&&(v+=this._input.read(this._match_pattern,this._until_pattern,this._until_after)),v},I.prototype.read_match=function(){return this._input.match(this._match_pattern)},I.prototype.until_after=function(v){var b=this._create();return b._until_after=!0,b._until_pattern=this._input.get_regexp(v),b._update(),b},I.prototype.until=function(v){var b=this._create();return b._until_after=!1,b._until_pattern=this._input.get_regexp(v),b._update(),b},I.prototype.starting_with=function(v){var b=this._create();return b._starting_pattern=this._input.get_regexp(v,!0),b._update(),b},I.prototype.matching=function(v){var b=this._create();return b._match_pattern=this._input.get_regexp(v,!0),b._update(),b},I.prototype._create=function(){return new I(this._input,this)},I.prototype._update=function(){},U.exports.Pattern=I},function(U){function I(v,b){v=typeof v=="string"?v:v.source,b=typeof b=="string"?b:b.source,this.__directives_block_pattern=new RegExp(v+/ beautify( \w+[:]\w+)+ /.source+b,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(v+/\sbeautify\signore:end\s/.source+b,"g")}I.prototype.get_directives=function(v){if(!v.match(this.__directives_block_pattern))return null;var b={};this.__directive_pattern.lastIndex=0;for(var u=this.__directive_pattern.exec(v);u;)b[u[1]]=u[2],u=this.__directive_pattern.exec(v);return b},I.prototype.readIgnored=function(v){return v.readUntilAfter(this.__directives_end_ignore_pattern)},U.exports.Directives=I},function(U,I,v){var b=v(12).Pattern,u={django:!1,erb:!1,handlebars:!1,php:!1,smarty:!1};function a(n,s){b.call(this,n,s),this.__template_pattern=null,this._disabled=Object.assign({},u),this._excluded=Object.assign({},u),s&&(this.__template_pattern=this._input.get_regexp(s.__template_pattern),this._excluded=Object.assign(this._excluded,s._excluded),this._disabled=Object.assign(this._disabled,s._disabled));var i=new b(n);this.__patterns={handlebars_comment:i.starting_with(/{{!--/).until_after(/--}}/),handlebars_unescaped:i.starting_with(/{{{/).until_after(/}}}/),handlebars:i.starting_with(/{{/).until_after(/}}/),php:i.starting_with(/<\?(?:[= ]|php)/).until_after(/\?>/),erb:i.starting_with(/<%[^%]/).until_after(/[^%]%>/),django:i.starting_with(/{%/).until_after(/%}/),django_value:i.starting_with(/{{/).until_after(/}}/),django_comment:i.starting_with(/{#/).until_after(/#}/),smarty:i.starting_with(/{(?=[^}{\s\n])/).until_after(/[^\s\n]}/),smarty_comment:i.starting_with(/{\*/).until_after(/\*}/),smarty_literal:i.starting_with(/{literal}/).until_after(/{\/literal}/)}}a.prototype=new b,a.prototype._create=function(){return new a(this._input,this)},a.prototype._update=function(){this.__set_templated_pattern()},a.prototype.disable=function(n){var s=this._create();return s._disabled[n]=!0,s._update(),s},a.prototype.read_options=function(n){var s=this._create();for(var i in u)s._disabled[i]=n.templating.indexOf(i)===-1;return s._update(),s},a.prototype.exclude=function(n){var s=this._create();return s._excluded[n]=!0,s._update(),s},a.prototype.read=function(){var n="";this._match_pattern?n=this._input.read(this._starting_pattern):n=this._input.read(this._starting_pattern,this.__template_pattern);for(var s=this._read_template();s;)this._match_pattern?s+=this._input.read(this._match_pattern):s+=this._input.readUntil(this.__template_pattern),n+=s,s=this._read_template();return this._until_after&&(n+=this._input.readUntilAfter(this._until_pattern)),n},a.prototype.__set_templated_pattern=function(){var n=[];this._disabled.php||n.push(this.__patterns.php._starting_pattern.source),this._disabled.handlebars||n.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.erb||n.push(this.__patterns.erb._starting_pattern.source),this._disabled.django||(n.push(this.__patterns.django._starting_pattern.source),n.push(this.__patterns.django_value._starting_pattern.source),n.push(this.__patterns.django_comment._starting_pattern.source)),this._disabled.smarty||n.push(this.__patterns.smarty._starting_pattern.source),this._until_pattern&&n.push(this._until_pattern.source),this.__template_pattern=this._input.get_regexp("(?:"+n.join("|")+")")},a.prototype._read_template=function(){var n="",s=this._input.peek();if(s==="<"){var i=this._input.peek(1);!this._disabled.php&&!this._excluded.php&&i==="?"&&(n=n||this.__patterns.php.read()),!this._disabled.erb&&!this._excluded.erb&&i==="%"&&(n=n||this.__patterns.erb.read())}else s==="{"&&(!this._disabled.handlebars&&!this._excluded.handlebars&&(n=n||this.__patterns.handlebars_comment.read(),n=n||this.__patterns.handlebars_unescaped.read(),n=n||this.__patterns.handlebars.read()),this._disabled.django||(!this._excluded.django&&!this._excluded.handlebars&&(n=n||this.__patterns.django_value.read()),this._excluded.django||(n=n||this.__patterns.django_comment.read(),n=n||this.__patterns.django.read())),this._disabled.smarty||this._disabled.django&&this._disabled.handlebars&&(n=n||this.__patterns.smarty_comment.read(),n=n||this.__patterns.smarty_literal.read(),n=n||this.__patterns.smarty.read()));return n},U.exports.TemplatablePattern=a}],S={};function z(U){var I=S[U];if(I!==void 0)return I.exports;var v=S[U]={exports:{}};return D[U](v,v.exports,z),v.exports}var F=z(0);O=F})();var G=O;!(ve=[],X=function(){return{js_beautify:G}}.apply(Ze,ve),X!==void 0&&(mt.exports=X))})()},"6eGT":function(mt,Ze,Z){"use strict";function ve(X){return null}Ze.a=ve},"815F":function(mt,Ze,Z){"use strict";Z.d(Ze,"e",function(){return z}),Z.d(Ze,"c",function(){return U}),Z.d(Ze,"d",function(){return I}),Z.d(Ze,"a",function(){return b}),Z.d(Ze,"f",function(){return u}),Z.d(Ze,"b",function(){return a});var ve=Z("KQm4"),X=Z("VTBJ"),O=Z("Ff2n"),G=Z("Zm9Q"),D=Z("Kwbf"),S=Z("OZM5");function z(n,s){return n!=null?n:s}function F(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],s=new Map;function i(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";(t||[]).forEach(function(A){var B=A.key,w=A.children;Object(D.a)(B!=null,"Tree node must have a certain key: [".concat(r).concat(B,"]"));var _=String(B);Object(D.a)(!s.has(_)||B===null||B===void 0,"Same 'key' exist in the Tree: ".concat(_)),s.set(_,!0),i(w,"".concat(r).concat(_," > "))})}i(n)}function U(n){function s(i){var t=Object(G.a)(i);return t.map(function(r){if(!Object(S.i)(r))return Object(D.a)(!r,"Tree/TreeNode can only accept TreeNode as children."),null;var A=r.key,B=r.props,w=B.children,_=Object(O.a)(B,["children"]),x=Object(X.a)({key:A},_),m=s(w);return m.length&&(x.children=m),x}).filter(function(r){return r})}return s(n)}function I(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],i=new Set(s===!0?[]:s),t=[];function r(A){var B=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return A.map(function(w,_){var x=Object(S.h)(B?B.pos:"0",_),m=z(w.key,x),c=Object(X.a)(Object(X.a)({},w),{},{parent:B,pos:x,children:null,data:w,isStart:[].concat(Object(ve.a)(B?B.isStart:[]),[_===0]),isEnd:[].concat(Object(ve.a)(B?B.isEnd:[]),[_===A.length-1])});return t.push(c),s===!0||i.has(m)?c.children=r(w.children||[],c):c.children=[],c})}return r(n),t}function v(n,s,i){var t;i?typeof i=="string"?t=function(B){return B[i]}:typeof i=="function"&&(t=function(B){return i(B)}):t=function(B,w){return z(B.key,w)};function r(A,B,w){var _=A?A.children:n,x=A?Object(S.h)(w.pos,B):"0";if(A){var m=t(A,x),c={node:A,index:B,pos:x,key:m,parentPos:w.node?w.pos:null,level:w.level+1};s(c)}_&&_.forEach(function(e,o){r(e,o,{node:A,pos:x,level:w?w.level+1:-1})})}r(null)}function b(n){var s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=s.initWrapper,t=s.processEntity,r=s.onProcessFinished,A=arguments.length>2?arguments[2]:void 0,B={},w={},_={posEntities:B,keyEntities:w};return i&&(_=i(_)||_),v(n,function(x){var m=x.node,c=x.index,e=x.pos,o=x.key,l=x.parentPos,y=x.level,p={node:m,index:c,key:o,pos:e,level:y},f=z(o,e);B[e]=p,w[f]=p,p.parent=B[l],p.parent&&(p.parent.children=p.parent.children||[],p.parent.children.push(p)),t&&t(p,_)},A),r&&r(_),_}function u(n,s){var i=s.expandedKeys,t=s.selectedKeys,r=s.loadedKeys,A=s.loadingKeys,B=s.checkedKeys,w=s.halfCheckedKeys,_=s.dragOverNodeKey,x=s.dropPosition,m=s.keyEntities,c=m[n],e={eventKey:n,expanded:i.indexOf(n)!==-1,selected:t.indexOf(n)!==-1,loaded:r.indexOf(n)!==-1,loading:A.indexOf(n)!==-1,checked:B.indexOf(n)!==-1,halfChecked:w.indexOf(n)!==-1,pos:String(c?c.pos:""),dragOver:_===n&&x===0,dragOverGapTop:_===n&&x===-1,dragOverGapBottom:_===n&&x===1};return e}function a(n){var s=n.data,i=n.expanded,t=n.selected,r=n.checked,A=n.loaded,B=n.loading,w=n.halfChecked,_=n.dragOver,x=n.dragOverGapTop,m=n.dragOverGapBottom,c=n.pos,e=n.active,o=Object(X.a)(Object(X.a)({},s),{},{expanded:i,selected:t,checked:r,loaded:A,loading:B,halfChecked:w,dragOver:_,dragOverGapTop:x,dragOverGapBottom:m,pos:c,active:e});return"props"in o||Object.defineProperty(o,"props",{get:function(){return Object(D.a)(!1,"Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`."),n}}),o}},"8hTe":function(mt,Ze,Z){mt.exports={button:"button___1wy9m"}},"9Bee":function(mt,Ze,Z){"use strict";var ve=Z("DYRE"),X=Z("zeV3"),O=Z("+L6B"),G=Z("2/Rp"),D=Z("k1fw"),S=Z("9og8"),z=Z("tJVT"),F=Z("WmNS"),U=Z.n(F),I=Z("q1tI"),v=Z.n(I),b=Z("vg9a"),u=Z("DlQD"),a=Z.n(u),n=Z("rUJ1");function s(N,d){var g=N.match(/^(\s+)(?:```)/);if(g===null)return d;var P=g[1];return d.split(`
`).map(function(V){var k=V.match(/^\s+/);if(k===null)return V;var pe=Object(z.a)(k,1),ke=pe[0];return ke.length>=P.length?V.slice(P.length):V}).join(`
`)}var i=[],t=["<ul>"],r=new a.a.Renderer,A=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function B(){i.length=0,t=["<ul>"]}var w={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function _(N,d,g,P){if(d>=N.length||N[d].level<=g)return d;var V=N[d];P.push("<li><a href='#"+V.anchor+"'>"+V.text+"</a>"),d++;var k=[];return d=_(N,d,V.level,k),k.length>0&&(P.push("<ul>"),k.forEach(function(pe){P.push(pe)}),P.push("</ul>")),P.push("</li>"),d=_(N,d,g,P),d}function x(){return _(i,0,0,t),t.push("</ul>"),t.join("")}var m={heading:function(d){var g=A.exec(d);if(g)return{type:"heading",raw:g[0],depth:g[1].length,text:g[2]}},fences:function(d){var g=this.rules.block.fences.exec(d);if(g){var P=g[0],V=s(P,g[3]||""),k=g[2]?g[2].trim():g[2];if(["latex","katex","math"].indexOf(k)>=0){var pe=o(),ke=V;V=pe,l[pe]={type:"block",expression:ke}}return{type:"code",raw:P,lang:k,text:V}}}},c=/(?:\${2})([^\n`]+?)(?:\${2})/gi,e=0,o=function(){return"__special_katext_id_".concat(e++,"__")},l={};function y(){return l}function p(){e=0,l={}}function f(N){return N=N.replace(c,function(d,g){var P=o();return l[P]={type:"inline",expression:g},P}),N}var R=r.listitem;r.listitem=function(N){return R(f(N))};var L=r.paragraph;r.paragraph=function(N){return L(f(N))};var H=r.tablecell;r.tablecell=function(N,d){return H(f(N),d)},r.code=function(N,d,g){var P=(d||"").match(/\S*/)[0];return P?["latex","katex","math"].indexOf(P)>=0?"<p class='editormd-tex'>".concat(N,"</p>"):'<pre class="prettyprint linenums"><code class="language-'.concat(d,'">').concat(g?N:Object(n.escape)(N,!0),`</code></pre>
`):'<pre class="prettyprint linenums"><code>'+(g?N:Object(n.escape)(N,!0))+"</code></pre>"},r.heading=function(N,d,g){var P=this.options.headerPrefix+g.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return i.push({anchor:P,level:d,text:N}),"<h"+d+' id="'+P+'">'+N+"</h"+d+">"},a.a.setOptions({silent:!0,gfm:!0,pedantic:!1}),a.a.use({tokenizer:m,renderer:r});var j=a.a,J=Z("SJMd"),M=Z("ulZh"),Y=Z.n(M),te=Z("m3rI"),de=Z("Oy/b"),fe=Z("p5ED"),Le=Z("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 xe=function(N,d){return(xe=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(g,P){g.__proto__=P}||function(g,P){for(var V in P)Object.prototype.hasOwnProperty.call(P,V)&&(g[V]=P[V])})(N,d)};function Ie(N,d){function g(){this.constructor=N}xe(N,d),N.prototype=d===null?Object.create(d):(g.prototype=d.prototype,new g)}function Fe(N,d,g,P){return new(g||(g=Promise))(function(V,k){function pe(ot){try{Te(P.next(ot))}catch(Ke){k(Ke)}}function ke(ot){try{Te(P.throw(ot))}catch(Ke){k(Ke)}}function Te(ot){var Ke;ot.done?V(ot.value):(Ke=ot.value,Ke instanceof g?Ke:new g(function(ft){ft(Ke)})).then(pe,ke)}Te((P=P.apply(N,d||[])).next())})}function Ue(N,d){var g,P,V,k,pe={label:0,sent:function(){if(1&V[0])throw V[1];return V[1]},trys:[],ops:[]};return k={next:ke(0),throw:ke(1),return:ke(2)},typeof Symbol=="function"&&(k[Symbol.iterator]=function(){return this}),k;function ke(Te){return function(ot){return function(Ke){if(g)throw new TypeError("Generator is already executing.");for(;pe;)try{if(g=1,P&&(V=2&Ke[0]?P.return:Ke[0]?P.throw||((V=P.return)&&V.call(P),0):P.next)&&!(V=V.call(P,Ke[1])).done)return V;switch(P=0,V&&(Ke=[2&Ke[0],V.value]),Ke[0]){case 0:case 1:V=Ke;break;case 4:return pe.label++,{value:Ke[1],done:!1};case 5:pe.label++,P=Ke[1],Ke=[0];continue;case 7:Ke=pe.ops.pop(),pe.trys.pop();continue;default:if(!(V=pe.trys,(V=V.length>0&&V[V.length-1])||Ke[0]!==6&&Ke[0]!==2)){pe=0;continue}if(Ke[0]===3&&(!V||Ke[1]>V[0]&&Ke[1]<V[3])){pe.label=Ke[1];break}if(Ke[0]===6&&pe.label<V[1]){pe.label=V[1],V=Ke;break}if(V&&pe.label<V[2]){pe.label=V[2],pe.ops.push(Ke);break}V[2]&&pe.ops.pop(),pe.trys.pop();continue}Ke=d.call(N,pe)}catch(ft){Ke=[6,ft],P=0}finally{g=V=0}if(5&Ke[0])throw Ke[1];return{value:Ke[0]?Ke[1]:void 0,done:!0}}([Te,ot])}}}function be(){for(var N=0,d=0,g=arguments.length;d<g;d++)N+=arguments[d].length;var P=Array(N),V=0;for(d=0;d<g;d++)for(var k=arguments[d],pe=0,ke=k.length;pe<ke;pe++,V++)P[V]=k[pe];return P}var ue=function(){function N(){}return N.createDefs=function(){return document.createElementNS("http://www.w3.org/2000/svg","defs")},N.setAttributes=function(d,g){for(var P=0,V=g;P<V.length;P++){var k=V[P],pe=k[0],ke=k[1];d.setAttribute(pe,ke)}},N.createRect=function(d,g,P){var V=document.createElementNS("http://www.w3.org/2000/svg","rect");return V.setAttribute("width",d.toString()),V.setAttribute("height",g.toString()),P&&N.setAttributes(V,P),V},N.createLine=function(d,g,P,V,k){var pe=document.createElementNS("http://www.w3.org/2000/svg","line");return pe.setAttribute("x1",d.toString()),pe.setAttribute("y1",g.toString()),pe.setAttribute("x2",P.toString()),pe.setAttribute("y2",V.toString()),k&&N.setAttributes(pe,k),pe},N.createPolygon=function(d,g){var P=document.createElementNS("http://www.w3.org/2000/svg","polygon");return P.setAttribute("points",d),g&&N.setAttributes(P,g),P},N.createCircle=function(d,g){var P=document.createElementNS("http://www.w3.org/2000/svg","circle");return P.setAttribute("cx",(d/2).toString()),P.setAttribute("cy",(d/2).toString()),P.setAttribute("r",d.toString()),g&&N.setAttributes(P,g),P},N.createEllipse=function(d,g,P){var V=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return V.setAttribute("cx",(d/2).toString()),V.setAttribute("cy",(g/2).toString()),V.setAttribute("rx",(d/2).toString()),V.setAttribute("ry",(g/2).toString()),P&&N.setAttributes(V,P),V},N.createGroup=function(d){var g=document.createElementNS("http://www.w3.org/2000/svg","g");return d&&N.setAttributes(g,d),g},N.createTransform=function(){return document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGTransform()},N.createMarker=function(d,g,P,V,k,pe,ke){var Te=document.createElementNS("http://www.w3.org/2000/svg","marker");return N.setAttributes(Te,[["id",d],["orient",g],["markerWidth",P.toString()],["markerHeight",V.toString()],["refX",k.toString()],["refY",pe.toString()]]),Te.appendChild(ke),Te},N.createText=function(d){var g=document.createElementNS("http://www.w3.org/2000/svg","text");return g.setAttribute("x","0"),g.setAttribute("y","0"),d&&N.setAttributes(g,d),g},N.createTSpan=function(d,g){var P=document.createElementNS("http://www.w3.org/2000/svg","tspan");return P.textContent=d,g&&N.setAttributes(P,g),P},N.createImage=function(d){var g=document.createElementNS("http://www.w3.org/2000/svg","image");return d&&N.setAttributes(g,d),g},N.createPoint=function(d,g){var P=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return P.x=d,P.y=g,P},N.createPath=function(d,g){var P=document.createElementNS("http://www.w3.org/2000/svg","path");return P.setAttribute("d",d),g&&N.setAttributes(P,g),P},N}(),je=function(){function N(){}return N.addKey=function(d){N.key=d},Object.defineProperty(N,"isLicensed",{get:function(){return!!N.key&&new RegExp(/^MJS2-[A-Z][0-9]{3}-[A-Z][0-9]{3}-[0-9]{4}$/,"i").test(N.key)},enumerable:!1,configurable:!0}),N}(),st=function(){function N(){this.naturalSize=!1,this.imageType="image/png",this.markersOnly=!1}return N.prototype.rasterize=function(d,g,P){var V=this;return new Promise(function(k){var pe=P!==void 0?P:document.createElement("canvas");d===null&&(V.markersOnly=!0,V.naturalSize=!1);var ke=document.createElementNS("http://www.w3.org/2000/svg","svg");ke.setAttribute("xmlns","http://www.w3.org/2000/svg"),ke.setAttribute("width",g.width.baseVal.valueAsString),ke.setAttribute("height",g.height.baseVal.valueAsString),ke.setAttribute("viewBox","0 0 "+g.viewBox.baseVal.width.toString()+" "+g.viewBox.baseVal.height.toString()),ke.innerHTML=g.innerHTML,V.naturalSize===!0?(ke.width.baseVal.value=d.naturalWidth,ke.height.baseVal.value=d.naturalHeight):V.width!==void 0&&V.height!==void 0&&(ke.width.baseVal.value=V.width,ke.height.baseVal.value=V.height),pe.width=ke.width.baseVal.value,pe.height=ke.height.baseVal.value;var Te=ke.outerHTML,ot=pe.getContext("2d");V.markersOnly!==!0&&ot.drawImage(d,0,0,pe.width,pe.height);var Ke=window.URL,ft=new Image(pe.width,pe.height);ft.setAttribute("crossOrigin","anonymous");var dt=new Blob([Te],{type:"image/svg+xml"}),Et=Ke.createObjectURL(dt);ft.onload=function(){ot.drawImage(ft,0,0),Ke.revokeObjectURL(Et);var Rt=pe.toDataURL(V.imageType,V.imageQuality);k(Rt)},ft.src=Et})},N}(),nt=function(){},rt=function(){function N(d){this._classNamePrefixBase="__markerjs2_",this.classes=[],this.rules=[],this.settings=this.defaultSettings,this._classNamePrefix=this._classNamePrefixBase+"_"+d+"_"}return Object.defineProperty(N.prototype,"classNamePrefixBase",{get:function(){return this._classNamePrefixBase},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"classNamePrefix",{get:function(){return this._classNamePrefix},enumerable:!1,configurable:!0}),Object.defineProperty(N.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(N.prototype,"fadeInAnimationClassName",{get:function(){return this.classNamePrefix+"fade_in"},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"fadeOutAnimationClassName",{get:function(){return this.classNamePrefix+"fade_out"},enumerable:!1,configurable:!0}),N.prototype.addClass=function(d){return this.styleSheet===void 0&&this.addStyleSheet(),d.name=""+this.classNamePrefix+d.localName,this.classes.push(d),this.styleSheet.sheet.insertRule("."+d.name+" {"+d.style+"}",this.styleSheet.sheet.cssRules.length),d},N.prototype.addRule=function(d){this.styleSheet===void 0&&this.addStyleSheet(),this.rules.push(d),this.styleSheet.sheet.insertRule(d.selector+" {"+d.style+"}",this.styleSheet.sheet.cssRules.length)},N.prototype.addStyleSheet=function(){var d;this.styleSheet=document.createElement("style"),((d=this.styleSheetRoot)!==null&&d!==void 0?d:document.head).appendChild(this.styleSheet),this.addRule(new He("."+this.classNamePrefix+" h3","font-family: sans-serif")),this.addRule(new He("@keyframes "+this.classNamePrefix+"_fade_in_animation_frames",`
from {
opacity: 0;
}
to {
opacity: 1;
}
`)),this.addRule(new He("@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;
`))},N.prototype.removeStyleSheet=function(){var d;this.styleSheet&&(((d=this.styleSheetRoot)!==null&&d!==void 0?d:document.head).removeChild(this.styleSheet),this.styleSheet=void 0)},N}(),He=function(N,d){this.selector=N,this.style=d},re=function(N,d){this.localName=N,this.style=d},K=function(){function N(d,g,P,V,k){this.buttons=[],this.markerButtons=[],this.buttonClickListeners=[],this.markerjsContainer=d,this.displayMode=g,this.markerItems=P,this.uiStyleSettings=V,this.styles=k,this.addStyles(),this.adjustLayout=this.adjustLayout.bind(this),this.overflowButtonClicked=this.overflowButtonClicked.bind(this),this.setCurrentMarker=this.setCurrentMarker.bind(this)}return N.prototype.show=function(d){var g=this;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=d,this.uiContainer.className=this.toolbarStyleClass.name+" "+this.styles.fadeInAnimationClassName+" "+(this.uiStyleSettings.toolbarStyleColorsClassName?this.uiStyleSettings.toolbarStyleColorsClassName:this.toolbarStyleColorsClass.name);var P=document.createElement("div");P.className=this.toolbarBlockStyleClass.name,P.style.whiteSpace="nowrap",this.uiContainer.appendChild(P),this.addActionButton(P,'<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(P,'<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(P,'<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(P,'<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(P,'<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(P,'<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(P,'<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(P,'<svg viewBox="0 0 24 24"><path d="M18.13 12l1.26-1.26c.44-.44 1-.68 1.61-.74V9l-6-6H5c-1.11 0-2 .89-2 2v14a2 2 0 002 2h6v-1.87l.13-.13H5V5h7v7h6.13M14 4.5l5.5 5.5H14V4.5m5.13 9.33l2.04 2.04L15.04 22H13v-2.04l6.13-6.13m3.72.36l-.98.98-2.04-2.04.98-.98c.19-.2.52-.2.72 0l1.32 1.32c.2.2.2.53 0 .72z"/></svg>',"notes"),this.markerButtonBlock=document.createElement("div"),this.markerButtonBlock.className=this.toolbarBlockStyleClass.name,this.markerButtonBlock.style.flexGrow="2",this.markerButtonBlock.style.textAlign="center",this.uiContainer.appendChild(this.markerButtonBlock),this.markerButtonOverflowBlock=document.createElement("div"),this.markerButtonOverflowBlock.className=this.toolbarOverflowBlockStyleClass.name+" "+(this.uiStyleSettings.toolbarOverflowBlockStyleColorsClassName?this.uiStyleSettings.toolbarOverflowBlockStyleColorsClassName:this.toolbarOverflowBlockStyleColorsClass.name),this.markerButtonOverflowBlock.style.display="none",this.uiContainer.appendChild(this.markerButtonOverflowBlock),this.markerItems&&(this.markerItems.forEach(function(k){var pe=document.createElement("div");pe.className=""+g.toolbarButtonStyleClass.name,pe.setAttribute("data-type-name",k.typeName),pe.innerHTML=k.icon,pe.addEventListener("click",function(){g.markerToolbarButtonClicked(pe,k)}),g.buttons.push(pe),g.markerButtons.push(pe)}),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 V=document.createElement("div");V.className=this.toolbarBlockStyleClass.name,V.style.whiteSpace="nowrap",V.style.display=this.uiStyleSettings.resultButtonBlockVisible!==!1?"":"none",this.uiContainer.appendChild(V),this.addActionButton(V,'<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(V,'<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()},N.prototype.addButtonClickListener=function(d){this.buttonClickListeners.push(d)},N.prototype.removeButtonClickListener=function(d){this.buttonClickListeners.indexOf(d)>-1&&this.buttonClickListeners.splice(this.buttonClickListeners.indexOf(d),1)},N.prototype.setSelectMode=function(){this.resetButtonStyles(),this.setActiveButton(this.buttons[0])},N.prototype.adjustLayout=function(){if(this.markerButtons&&this.markerButtons.length>0){var d=Math.floor(this.markerButtonBlock.clientWidth/this.uiStyleSettings.toolbarHeight)-1;this.markerButtonBlock.innerHTML="",this.markerButtonOverflowBlock.innerHTML="";for(var g=0;g<this.markerButtons.length;g++)g<d||g===d&&this.markerButtons.length-1===d?this.markerButtonBlock.appendChild(this.markerButtons[g]):(g===d&&this.markerButtonBlock.appendChild(this.overflowButton),this.markerButtonOverflowBlock.appendChild(this.markerButtons[g]))}},N.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")},N.prototype.resetButtonStyles=function(){var d=this;this.buttons.forEach(function(g){g.className=g.className.replace(d.uiStyleSettings.toolbarButtonStyleColorsClassName?d.uiStyleSettings.toolbarButtonStyleColorsClassName:d.toolbarButtonStyleColorsClass.name,"").trim(),g.className=g.className.replace(d.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?d.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:d.toolbarActiveButtonStyleColorsClass.name,"").trim(),g.className+=" "+(d.uiStyleSettings.toolbarButtonStyleColorsClassName?d.uiStyleSettings.toolbarButtonStyleColorsClassName:d.toolbarButtonStyleColorsClass.name)})},N.prototype.addActionButton=function(d,g,P){var V=this,k=document.createElement("div");switch(k.className=""+this.toolbarButtonStyleClass.name,k.innerHTML=g,k.setAttribute("data-action",P),k.addEventListener("click",function(){V.actionToolbarButtonClicked(k,P)}),P){case"select":k.style.fill=this.uiStyleSettings.selectButtonColor;break;case"delete":case"clear":k.style.fill=this.uiStyleSettings.deleteButtonColor;break;case"undo":case"redo":k.style.fill=this.uiStyleSettings.selectButtonColor;break;case"render":k.style.fill=this.uiStyleSettings.okButtonColor;break;case"close":k.style.fill=this.uiStyleSettings.closeButtonColor}d.appendChild(k),this.buttons.push(k)},N.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 d=this.uiStyleSettings.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new re("toolbar_button",`
display: inline-block;
width: `+(this.uiStyleSettings.toolbarHeight-2*d)+`px;
height: `+(this.uiStyleSettings.toolbarHeight-2*d)+`px;
padding: `+d+`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 He("."+this.toolbarButtonStyleClass.name+" svg",`
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
`)),this.styles.addRule(new He("."+this.toolbarButtonStyleColorsClass.name+":hover",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
`))},N.prototype.markerToolbarButtonClicked=function(d,g){this.setActiveButton(d),this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(P){return P("marker",g)}),this.markerButtonOverflowBlock.style.display="none"},N.prototype.actionToolbarButtonClicked=function(d,g){this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(P){return P("action",g)}),this.markerButtonOverflowBlock.style.display="none",this.setActiveButton(this.buttons[0])},N.prototype.setActiveButton=function(d){this.resetButtonStyles(),d.className=d.className.replace(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,"").trim(),d.className+=" "+(this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name)},N.prototype.setActiveMarkerButton=function(d){var g=this.markerButtons.find(function(P){return P.getAttribute("data-type-name")===d});g&&this.setActiveButton(g)},N.prototype.setCurrentMarker=function(d){var g=this;this.currentMarker=d,this.buttons.filter(function(P){return/delete|notes/.test(P.getAttribute("data-action"))}).forEach(function(P){g.currentMarker===void 0?(P.style.fillOpacity="0.4",P.style.pointerEvents="none"):(P.style.fillOpacity="1",P.style.pointerEvents="all")})},N}(),W=function(){function N(d,g,P,V){this.panels=[],this.panelButtons=[],this.markerjsContainer=d,this.displayMode=g,this.uiStyleSettings=P,this.styles=V,this.panelButtonClick=this.panelButtonClick.bind(this),this.addStyles()}return N.prototype.addStyles=function(){var d;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 g=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: `+((d=this.uiStyleSettings.toolboxBackgroundColor)!==null&&d!==void 0?d:this.uiStyleSettings.toolbarBackgroundHoverColor)+`;
`)),this.toolboxButtonStyleClass=this.styles.addClass(new re("toolbox_button",`
display: inline-block;
width: `+(this.uiStyleSettings.toolbarHeight-2*g)+`px;
height: `+(this.uiStyleSettings.toolbarHeight-2*g)+`px;
padding: `+g+`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 He("."+this.toolboxButtonStyleColorsClass.name+":hover",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
`)),this.styles.addRule(new He("."+this.toolboxButtonStyleClass.name+" svg",`
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
`))},N.prototype.show=function(d){var g;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=d,this.uiContainer.className=this.toolboxStyleClass.name+" "+((g=this.uiStyleSettings.toolboxStyleColorsClassName)!==null&&g!==void 0?g:this.toolboxStyleColorsClass.name),this.markerjsContainer.appendChild(this.uiContainer)},N.prototype.setPanelButtons=function(d){var g,P,V=this;this.panels=d,this.uiContainer!==void 0&&(this.uiContainer.innerHTML="",this.panelRow=document.createElement("div"),this.panelRow.className=this.toolboxPanelRowStyleClass.name+" "+((g=this.uiStyleSettings.toolboxPanelRowStyleColorsClassName)!==null&&g!==void 0?g:this.toolboxPanelRowStyleColorsClass.name),this.uiContainer.appendChild(this.panelRow),this.buttonRow=document.createElement("div"),this.buttonRow.className=this.toolboxButtonRowStyleClass.name+" "+((P=this.uiStyleSettings.toolboxButtonRowStyleColorsClassName)!==null&&P!==void 0?P:this.toolboxButtonRowStyleColorsClass.name)+" ",this.uiContainer.appendChild(this.buttonRow),this.panelButtons.splice(0),this.panels.forEach(function(k){var pe;k.uiStyleSettings=V.uiStyleSettings;var ke=document.createElement("div");ke.className=V.toolboxButtonStyleClass.name+" "+((pe=V.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&pe!==void 0?pe:V.toolboxButtonStyleColorsClass.name),ke.innerHTML=k.icon,ke.title=k.title,ke.addEventListener("click",function(){V.panelButtonClick(k)}),V.panelButtons.push(ke),V.buttonRow.appendChild(ke)}),this.displayMode==="inline"?this.panelRow.style.display="none":this.panelRow.style.visibility="hidden")},N.prototype.panelButtonClick=function(d){var g=this,P=-1;if(d!==this.activePanel){P=this.panels.indexOf(d),this.panelRow.innerHTML="";var V=d.getUi();V.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.panelRow.appendChild(V),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=d}else this.activePanel=void 0,this.panelRow.className=this.panelRow.className.replace(this.styles.fadeInAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeOutAnimationClassName,setTimeout(function(){g.displayMode==="inline"?g.panelRow.style.display="none":g.panelRow.style.visibility="hidden"},200);this.panelButtons.forEach(function(k,pe){var ke,Te;k.className=g.toolboxButtonStyleClass.name+" "+(pe===P?""+((ke=g.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)!==null&&ke!==void 0?ke:g.toolboxActiveButtonStyleColorsClass.name):""+((Te=g.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&Te!==void 0?Te:g.toolboxButtonStyleColorsClass.name))})},N}(),se=function(N,d){this.title=N,this.icon=d},ye=function(N){function d(g,P,V,k){var pe=N.call(this,g,k||'<svg viewBox="0 0 24 24"><path d="M17.5 12a1.5 1.5 0 01-1.5-1.5A1.5 1.5 0 0117.5 9a1.5 1.5 0 011.5 1.5 1.5 1.5 0 01-1.5 1.5m-3-4A1.5 1.5 0 0113 6.5 1.5 1.5 0 0114.5 5 1.5 1.5 0 0116 6.5 1.5 1.5 0 0114.5 8m-5 0A1.5 1.5 0 018 6.5 1.5 1.5 0 019.5 5 1.5 1.5 0 0111 6.5 1.5 1.5 0 019.5 8m-3 4A1.5 1.5 0 015 10.5 1.5 1.5 0 016.5 9 1.5 1.5 0 018 10.5 1.5 1.5 0 016.5 12M12 3a9 9 0 00-9 9 9 9 0 009 9 1.5 1.5 0 001.5-1.5c0-.39-.15-.74-.39-1-.23-.27-.38-.62-.38-1a1.5 1.5 0 011.5-1.5H16a5 5 0 005-5c0-4.42-4.03-8-9-8z"/></svg>')||this;return pe.colors=[],pe.addTransparent=!1,pe.colorBoxes=[],pe.colors=P,pe.currentColor=V,pe.setCurrentColor=pe.setCurrentColor.bind(pe),pe.getColorBox=pe.getColorBox.bind(pe),pe}return Ie(d,N),d.prototype.getUi=function(){var g=this,P=document.createElement("div");return P.style.overflow="hidden",P.style.whiteSpace="nowrap",this.colors.forEach(function(V){var k=g.getColorBox(V);P.appendChild(k),g.colorBoxes.push(k)}),P},d.prototype.getColorBox=function(g){var P=this,V=this.uiStyleSettings.toolbarHeight/4,k=this.uiStyleSettings.toolbarHeight-V,pe=document.createElement("div");pe.style.display="inline-block",pe.style.boxSizing="content-box",pe.style.width=k-2+"px",pe.style.height=k-2+"px",pe.style.padding="1px",pe.style.marginRight="2px",pe.style.marginBottom="2px",pe.style.borderWidth="2px",pe.style.borderStyle="solid",pe.style.borderRadius=(k+2)/2+"px",pe.style.borderColor=g===this.currentColor?this.uiStyleSettings.toolboxAccentColor:"transparent",pe.addEventListener("click",function(){P.setCurrentColor(g,pe)});var ke=document.createElement("div");return ke.style.display="inline-block",ke.style.width=k-2+"px",ke.style.height=k-2+"px",ke.style.backgroundColor=g,ke.style.borderRadius=k/2+"px",g==="transparent"&&(ke.style.fill=this.uiStyleSettings.toolboxAccentColor,ke.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>`),pe.appendChild(ke),pe},d.prototype.setCurrentColor=function(g,P){var V=this;this.currentColor=g,this.colorBoxes.forEach(function(k){k.style.borderColor=k===P?V.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onColorChanged&&this.onColorChanged(g)},d}(se),we=function(){function N(d,g,P){this._state="new",this._isSelected=!1,this._container=d,this._overlayContainer=g,this.globalSettings=P,this.stateChanged=this.stateChanged.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this)}return Object.defineProperty(N.prototype,"typeName",{get:function(){return Object.getPrototypeOf(this).constructor.typeName},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"container",{get:function(){return this._container},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"overlayContainer",{get:function(){return this._overlayContainer},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"toolboxPanels",{get:function(){return[]},enumerable:!1,configurable:!0}),N.prototype.ownsTarget=function(d){return!1},Object.defineProperty(N.prototype,"isSelected",{get:function(){return this._isSelected},enumerable:!1,configurable:!0}),N.prototype.select=function(){this.container.style.cursor="move",this._isSelected=!0,this.manipulationStartState=this.getState()},N.prototype.deselect=function(){this.container.style.cursor="default",this._isSelected=!1,this.stateChanged()},N.prototype.pointerDown=function(d,g){},N.prototype.dblClick=function(d,g){},N.prototype.manipulate=function(d){},N.prototype.pointerUp=function(d){this.stateChanged()},N.prototype.dispose=function(){},N.prototype.addMarkerVisualToContainer=function(d){this.container.childNodes.length>0?this.container.insertBefore(d,this.container.childNodes[0]):this.container.appendChild(d)},N.prototype.getState=function(){return{typeName:N.typeName,state:this.state,notes:this.notes}},N.prototype.restoreState=function(d){this._state=d.state,this.notes=d.notes},N.prototype.scale=function(d,g){},N.prototype.colorChanged=function(d){this.onColorChanged&&this.onColorChanged(d),this.stateChanged()},N.prototype.fillColorChanged=function(d){this.onFillColorChanged&&this.onFillColorChanged(d),this.stateChanged()},N.prototype.stateChanged=function(){if(this.onStateChanged&&this.state!=="creating"&&this.state!=="new"){var d=this.getState();this.manipulationStartState!==void 0&&(this.manipulationStartState.state="select"),d.state="select",JSON.stringify(this.manipulationStartState)!=JSON.stringify(d)&&this.onStateChanged(this)}},N.typeName="MarkerBase",N}(),_e=function(){function N(){this.findGripByVisual=this.findGripByVisual.bind(this)}return N.prototype.findGripByVisual=function(d){return this.topLeft.ownsTarget(d)?this.topLeft:this.topCenter.ownsTarget(d)?this.topCenter:this.topRight.ownsTarget(d)?this.topRight:this.centerLeft.ownsTarget(d)?this.centerLeft:this.centerRight.ownsTarget(d)?this.centerRight:this.bottomLeft.ownsTarget(d)?this.bottomLeft:this.bottomCenter.ownsTarget(d)?this.bottomCenter:this.bottomRight.ownsTarget(d)?this.bottomRight:void 0},N}(),$e=function(){function N(){this.GRIP_SIZE=10,this.visual=ue.createGroup(),this.visual.appendChild(ue.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(ue.createCircle(this.GRIP_SIZE,[["fill","#cccccc"],["fill-opacity","0.7"],["stroke","#333333"],["stroke-width","2"],["stroke-opacity","0.7"]]))}return N.prototype.ownsTarget=function(d){return d===this.visual||d===this.visual.childNodes[0]||d===this.visual.childNodes[1]},N}(),qe=function(){function N(){}return N.toITransformMatrix=function(d){return{a:d.a,b:d.b,c:d.c,d:d.d,e:d.e,f:d.f}},N.toSVGMatrix=function(d,g){return d.a=g.a,d.b=g.b,d.c=g.c,d.d=g.d,d.e=g.e,d.f=g.f,d},N}(),Ve=function(N){function d(g,P,V){var k=N.call(this,g,P,V)||this;return k.left=0,k.top=0,k.width=0,k.height=0,k.defaultSize={x:50,y:20},k.offsetX=0,k.offsetY=0,k.rotationAngle=0,k.CB_DISTANCE=10,k._suppressMarkerCreateEvent=!1,k.container.transform.baseVal.appendItem(ue.createTransform()),k.setupControlBox(),k}return Ie(d,N),Object.defineProperty(d.prototype,"centerX",{get:function(){return this.left+this.width/2},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"centerY",{get:function(){return this.top+this.height/2},enumerable:!1,configurable:!0}),Object.defineProperty(d.prototype,"visual",{get:function(){return this._visual},set:function(g){this._visual=g;var P=ue.createTransform();this._visual.transform.baseVal.appendItem(P)},enumerable:!1,configurable:!0}),d.prototype.ownsTarget=function(g){return!!N.prototype.ownsTarget.call(this,g)||!!(this.controlGrips.findGripByVisual(g)!==void 0||this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(g))},d.prototype.pointerDown=function(g,P){N.prototype.pointerDown.call(this,g,P),this.state==="new"&&(this.left=g.x,this.top=g.y),this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.manipulationStartWidth=this.width,this.manipulationStartHeight=this.height;var V=this.unrotatePoint(g);if(this.manipulationStartX=V.x,this.manipulationStartY=V.y,this.offsetX=V.x-this.left,this.offsetY=V.y-this.top,this.state!=="new")if(this.select(),this.activeGrip=this.controlGrips.findGripByVisual(P),this.activeGrip!==void 0)this._state="resize";else if(this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(P)){this.activeGrip=this.rotatorGrip;var k=this.rotatePoint({x:this.centerX,y:this.centerY});this.left=k.x-this.width/2,this.top=k.y-this.height/2,this.moveVisual({x:this.left,y:this.top});var pe=this.container.transform.baseVal.getItem(0);pe.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(pe,0),this.adjustControlBox(),this._state="rotate"}else this._state="move"},d.prototype.pointerUp=function(g){var P=this.state;N.prototype.pointerUp.call(this,g),this.state==="creating"&&this.width<10&&this.height<10?(this.width=this.defaultSize.x,this.height=this.defaultSize.y):this.manipulate(g),this._state="select",P==="creating"&&this.onMarkerCreated&&this._suppressMarkerCreateEvent===!1&&this.onMarkerCreated(this)},d.prototype.moveVisual=function(g){this.visual.style.transform="translate("+g.x+"px, "+g.y+"px)"},d.prototype.manipulate=function(g){var P=this.unrotatePoint(g);this.state==="creating"?this.resize(g):this.state==="move"?(this.left=this.manipulationStartLeft+(P.x-this.manipulationStartLeft)-this.offsetX,this.top=this.manipulationStartTop+(P.y-this.manipulationStartTop)-this.offsetY,this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()):this.state==="resize"?this.resize(P):this.state==="rotate"&&this.rotate(g)},d.prototype.resize=function(g){var P=this.manipulationStartLeft,V=this.manipulationStartWidth,k=this.manipulationStartTop,pe=this.manipulationStartHeight;switch(this.activeGrip){case this.controlGrips.bottomLeft:case this.controlGrips.centerLeft:case this.controlGrips.topLeft:P=this.manipulationStartLeft+g.x-this.manipulationStartX,V=this.manipulationStartWidth+this.manipulationStartLeft-P;break;case this.controlGrips.bottomRight:case this.controlGrips.centerRight:case this.controlGrips.topRight:case void 0:V=this.manipulationStartWidth+g.x-this.manipulationStartX}switch(this.activeGrip){case this.controlGrips.topCenter:case this.controlGrips.topLeft:case this.controlGrips.topRight:k=this.manipulationStartTop+g.y-this.manipulationStartY,pe=this.manipulationStartHeight+this.manipulationStartTop-k;break;case this.controlGrips.bottomCenter:case this.controlGrips.bottomLeft:case this.controlGrips.bottomRight:case void 0:pe=this.manipulationStartHeight+g.y-this.manipulationStartY}V>=0?(this.left=P,this.width=V):(this.left=P+V,this.width=-V),pe>=0?(this.top=k,this.height=pe):(this.top=k+pe,this.height=-pe),this.setSize()},d.prototype.setSize=function(){this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()},d.prototype.rotate=function(g){if(Math.abs(g.x-this.centerX)>.1){var P=Math.sign(g.x-this.centerX);this.rotationAngle=180*Math.atan((g.y-this.centerY)/(g.x-this.centerX))/Math.PI+90*P,this.applyRotation()}},d.prototype.applyRotation=function(){var g=this.container.transform.baseVal.getItem(0);g.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(g,0)},d.prototype.rotatePoint=function(g){if(this.rotationAngle===0)return g;var P=this.container.getCTM(),V=ue.createPoint(g.x,g.y);return{x:(V=V.matrixTransform(P)).x,y:V.y}},d.prototype.unrotatePoint=function(g){if(this.rotationAngle===0)return g;var P=this.container.getCTM();P=P.inverse();var V=ue.createPoint(g.x,g.y);return{x:(V=V.matrixTransform(P)).x,y:V.y}},d.prototype.select=function(){N.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},d.prototype.deselect=function(){N.prototype.deselect.call(this),this.controlBox.style.display="none"},d.prototype.setupControlBox=function(){this.controlBox=ue.createGroup();var g=ue.createTransform();g.setTranslate(-this.CB_DISTANCE/2,-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.appendItem(g),this.container.appendChild(this.controlBox),this.controlRect=ue.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=ue.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 _e,this.addControlGrips(),this.controlBox.style.display="none"},d.prototype.adjustControlBox=function(){var g=this.controlBox.transform.baseVal.getItem(0);g.setTranslate(this.left-this.CB_DISTANCE/2,this.top-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.replaceItem(g,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()},d.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()},d.prototype.createGrip=function(){var g=new $e;return g.visual.transform.baseVal.appendItem(ue.createTransform()),this.controlBox.appendChild(g.visual),g},d.prototype.positionGrips=function(){var g=this.controlGrips.topLeft.GRIP_SIZE,P=-g/2,V=P,k=(this.width+this.CB_DISTANCE)/2-g/2,pe=(this.height+this.CB_DISTANCE)/2-g/2,ke=this.height+this.CB_DISTANCE-g/2,Te=this.width+this.CB_DISTANCE-g/2;this.positionGrip(this.controlGrips.topLeft.visual,P,V),this.positionGrip(this.controlGrips.topCenter.visual,k,V),this.positionGrip(this.controlGrips.topRight.visual,Te,V),this.positionGrip(this.controlGrips.centerLeft.visual,P,pe),this.positionGrip(this.controlGrips.centerRight.visual,Te,pe),this.positionGrip(this.controlGrips.bottomLeft.visual,P,ke),this.positionGrip(this.controlGrips.bottomCenter.visual,k,ke),this.positionGrip(this.controlGrips.bottomRight.visual,Te,ke),this.rotatorGrip!==void 0&&this.positionGrip(this.rotatorGrip.visual,k,V-3*this.CB_DISTANCE)},d.prototype.positionGrip=function(g,P,V){var k=g.transform.baseVal.getItem(0);k.setTranslate(P,V),g.transform.baseVal.replaceItem(k,0)},d.prototype.hideControlBox=function(){this.controlBox.style.display="none"},d.prototype.showControlBox=function(){this.controlBox.style.display=""},d.prototype.getState=function(){return Object.assign({left:this.left,top:this.top,width:this.width,height:this.height,rotationAngle:this.rotationAngle,visualTransformMatrix:qe.toITransformMatrix(this.visual.transform.baseVal.getItem(0).matrix),containerTransformMatrix:qe.toITransformMatrix(this.container.transform.baseVal.getItem(0).matrix)},N.prototype.getState.call(this))},d.prototype.restoreState=function(g){N.prototype.restoreState.call(this,g);var P=g;this.left=P.left,this.top=P.top,this.width=P.width,this.height=P.height,this.rotationAngle=P.rotationAngle,this.visual.transform.baseVal.getItem(0).setMatrix(qe.toSVGMatrix(this.visual.transform.baseVal.getItem(0).matrix,P.visualTransformMatrix)),this.container.transform.baseVal.getItem(0).setMatrix(qe.toSVGMatrix(this.container.transform.baseVal.getItem(0).matrix,P.containerTransformMatrix))},d.prototype.scale=function(g,P){N.prototype.scale.call(this,g,P);var V=this.rotatePoint({x:this.left,y:this.top}),k=this.unrotatePoint({x:V.x*g,y:V.y*P});this.left=k.x,this.top=k.y,this.width=this.width*g,this.height=this.height*P,this.adjustControlBox()},d}(we),Xe=function(N){function d(g,P,V){var k=N.call(this,g,P,V)||this;return k.fillColor="transparent",k.strokeColor="transparent",k.strokeWidth=0,k.strokeDasharray="",k.opacity=1,k.setStrokeColor=k.setStrokeColor.bind(k),k.setFillColor=k.setFillColor.bind(k),k.setStrokeWidth=k.setStrokeWidth.bind(k),k.setStrokeDasharray=k.setStrokeDasharray.bind(k),k.createVisual=k.createVisual.bind(k),k}return Ie(d,N),d.prototype.ownsTarget=function(g){return!(!N.prototype.ownsTarget.call(this,g)&&g!==this.visual)},d.prototype.createVisual=function(){this.visual=ue.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)},d.prototype.pointerDown=function(g,P){N.prototype.pointerDown.call(this,g,P),this.state==="new"&&(this.createVisual(),this.moveVisual(g),this._state="creating")},d.prototype.manipulate=function(g){N.prototype.manipulate.call(this,g)},d.prototype.resize=function(g){N.prototype.resize.call(this,g),this.setSize()},d.prototype.setSize=function(){N.prototype.setSize.call(this),ue.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]])},d.prototype.pointerUp=function(g){N.prototype.pointerUp.call(this,g),this.setSize()},d.prototype.setStrokeColor=function(g){this.strokeColor=g,this.visual&&ue.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(g),this.stateChanged()},d.prototype.setFillColor=function(g){this.fillColor=g,this.visual&&ue.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},d.prototype.setStrokeWidth=function(g){this.strokeWidth=g,this.visual&&ue.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},d.prototype.setStrokeDasharray=function(g){this.strokeDasharray=g,this.visual&&ue.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},d.prototype.getState=function(){return Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},N.prototype.getState.call(this))},d.prototype.restoreState=function(g){var P=g;this.fillColor=P.fillColor,this.strokeColor=P.strokeColor,this.strokeWidth=P.strokeWidth,this.strokeDasharray=P.strokeDasharray,this.opacity=P.opacity,this.createVisual(),N.prototype.restoreState.call(this,g),this.setSize()},d.prototype.scale=function(g,P){N.prototype.scale.call(this,g,P),this.setSize()},d.title="Rectangle marker",d}(Ve),at=function(N){function d(g,P,V,k){var pe=N.call(this,g,k||'<svg viewBox="0 0 24 24"><path d="M3 17h18v-2H3v2m0 3h18v-1H3v1m0-7h18v-3H3v3m0-9v4h18V4H3z"/></svg>')||this;return pe.widths=[],pe.widthBoxes=[],pe.widths=P,pe.currentWidth=V,pe.setCurrentWidth=pe.setCurrentWidth.bind(pe),pe}return Ie(d,N),d.prototype.getUi=function(){var g=this,P=document.createElement("div");return P.style.display="flex",P.style.overflow="hidden",P.style.flexGrow="2",this.widths.forEach(function(V){var k=document.createElement("div");k.style.display="flex",k.style.flexGrow="2",k.style.alignItems="center",k.style.justifyContent="space-between",k.style.padding="5px",k.style.borderWidth="2px",k.style.borderStyle="solid",k.style.borderColor=V===g.currentWidth?g.uiStyleSettings.toolboxAccentColor:"transparent",k.addEventListener("click",function(){g.setCurrentWidth(V,k)}),P.appendChild(k);var pe=document.createElement("div");pe.innerText=V.toString(),pe.style.marginRight="5px",k.appendChild(pe);var ke=document.createElement("div");ke.style.minHeight="20px",ke.style.flexGrow="2",ke.style.display="flex",ke.style.alignItems="center";var Te=document.createElement("hr");Te.style.minWidth="20px",Te.style.border="0px",Te.style.borderTop=V+"px solid "+g.uiStyleSettings.toolboxColor,Te.style.flexGrow="2",ke.appendChild(Te),k.appendChild(ke),g.widthBoxes.push(k)}),P},d.prototype.setCurrentWidth=function(g,P){var V=this;this.currentWidth=g,this.widthBoxes.forEach(function(k){k.style.borderColor=k===P?V.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},d}(se),ct=function(N){function d(g,P,V,k){var pe=N.call(this,g,k||'<svg viewBox="0 0 24 24"><path d="M3 16h5v-2H3v2m6.5 0h5v-2h-5v2m6.5 0h5v-2h-5v2M3 20h2v-2H3v2m4 0h2v-2H7v2m4 0h2v-2h-2v2m4 0h2v-2h-2v2m4 0h2v-2h-2v2M3 12h8v-2H3v2m10 0h8v-2h-8v2M3 4v4h18V4H3z"/></svg>')||this;return pe.styles=[],pe.styleBoxes=[],pe.styles=P,pe.currentStyle=V,pe.setCurrentStyle=pe.setCurrentStyle.bind(pe),pe}return Ie(d,N),d.prototype.getUi=function(){var g=this,P=document.createElement("div");return P.style.display="flex",P.style.overflow="hidden",P.style.flexGrow="2",this.styles.forEach(function(V){var k=document.createElement("div");k.style.display="flex",k.style.alignItems="center",k.style.justifyContent="space-between",k.style.padding="5px",k.style.borderWidth="2px",k.style.borderStyle="solid",k.style.overflow="hidden",k.style.maxWidth=100/g.styles.length-5+"%",k.style.borderColor=V===g.currentStyle?g.uiStyleSettings.toolboxAccentColor:"transparent",k.addEventListener("click",function(){g.setCurrentStyle(V,k)}),P.appendChild(k);var pe=document.createElement("div");pe.style.minHeight="20px",pe.style.flexGrow="2",pe.style.overflow="hidden";var ke=`<svg width="100" height="20">
<line x1="0" y1="10" x2="100" y2="10" stroke="`+g.uiStyleSettings.toolboxColor+'" stroke-width="3" '+(V!==""?'stroke-dasharray="'+V+'"':"")+` />
</svg>`;pe.innerHTML=ke,k.appendChild(pe),g.styleBoxes.push(k)}),P},d.prototype.setCurrentStyle=function(g,P){var V=this;this.currentStyle=g,this.styleBoxes.forEach(function(k){k.style.borderColor=k===P?V.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},d}(se),Ce=function(N){function d(g,P,V){var k=N.call(this,g,P,V)||this;return k.strokeColor=V.defaultColor,k.strokeWidth=V.defaultStrokeWidth,k.strokeDasharray=V.defaultStrokeDasharray,k.strokePanel=new ye("Line color",V.defaultColorSet,V.defaultColor),k.strokePanel.onColorChanged=k.setStrokeColor,k.strokeWidthPanel=new at("Line width",V.defaultStrokeWidths,V.defaultStrokeWidth),k.strokeWidthPanel.onWidthChanged=k.setStrokeWidth,k.strokeStylePanel=new ct("Line style",V.defaultStrokeDasharrays,V.defaultStrokeDasharray),k.strokeStylePanel.onStyleChanged=k.setStrokeDasharray,k}return Ie(d,N),Object.defineProperty(d.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),d.prototype.getState=function(){var g=N.prototype.getState.call(this);return g.typeName=d.typeName,g},d.typeName="FrameMarker",d.title="Frame marker",d.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4m14 11H6V8h12v9z"/></svg>',d}(Xe),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},Qe=function(N){function d(g,P,V){var k=N.call(this,g,P,V)||this;return k.x1=0,k.y1=0,k.x2=0,k.y2=0,k.defaultLength=50,k.manipulationStartX=0,k.manipulationStartY=0,k.manipulationStartX1=0,k.manipulationStartY1=0,k.manipulationStartX2=0,k.manipulationStartY2=0,k.setupControlBox(),k}return Ie(d,N),d.prototype.ownsTarget=function(g){return!!N.prototype.ownsTarget.call(this,g)||!(!this.grip1.ownsTarget(g)&&!this.grip2.ownsTarget(g))},d.prototype.pointerDown=function(g,P){N.prototype.pointerDown.call(this,g,P),this.manipulationStartX=g.x,this.manipulationStartY=g.y,this.state==="new"&&(this.x1=g.x,this.y1=g.y,this.x2=g.x,this.y2=g.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(P)?this.activeGrip=this.grip1:this.grip2.ownsTarget(P)?this.activeGrip=this.grip2:this.activeGrip=void 0,this.activeGrip?this._state="resize":this._state="move")},d.prototype.pointerUp=function(g){var P=this.state;N.prototype.pointerUp.call(this,g),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(g),this._state="select",P==="creating"&&this.onMarkerCreated&&this.onMarkerCreated(this)},d.prototype.adjustVisual=function(){},d.prototype.manipulate=function(g){this.state==="creating"?this.resize(g):this.state==="move"?(this.x1=this.manipulationStartX1+g.x-this.manipulationStartX,this.y1=this.manipulationStartY1+g.y-this.manipulationStartY,this.x2=this.manipulationStartX2+g.x-this.manipulationStartX,this.y2=this.manipulationStartY2+g.y-this.manipulationStartY,this.adjustVisual(),this.adjustControlBox()):this.state==="resize"&&this.resize(g)},d.prototype.resize=function(g){switch(this.activeGrip){case this.grip1:this.x1=g.x,this.y1=g.y;break;case this.grip2:case void 0:this.x2=g.x,this.y2=g.y}this.adjustVisual(),this.adjustControlBox()},d.prototype.select=function(){N.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},d.prototype.deselect=function(){N.prototype.deselect.call(this),this.controlBox.style.display="none"},d.prototype.setupControlBox=function(){this.controlBox=ue.createGroup(),this.container.appendChild(this.controlBox),this.addControlGrips(),this.controlBox.style.display="none"},d.prototype.adjustControlBox=function(){this.positionGrips()},d.prototype.addControlGrips=function(){this.grip1=this.createGrip(),this.grip2=this.createGrip(),this.positionGrips()},d.prototype.createGrip=function(){var g=new $e;return g.visual.transform.baseVal.appendItem(ue.createTransform()),this.controlBox.appendChild(g.visual),g},d.prototype.positionGrips=function(){var g=this.grip1.GRIP_SIZE;this.positionGrip(this.grip1.visual,this.x1-g/2,this.y1-g/2),this.positionGrip(this.grip2.visual,this.x2-g/2,this.y2-g/2)},d.prototype.positionGrip=function(g,P,V){var k=g.transform.baseVal.getItem(0);k.setTranslate(P,V),g.transform.baseVal.replaceItem(k,0)},d.prototype.getState=function(){return Object.assign({x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2},N.prototype.getState.call(this))},d.prototype.restoreState=function(g){N.prototype.restoreState.call(this,g);var P=g;this.x1=P.x1,this.y1=P.y1,this.x2=P.x2,this.y2=P.y2},d.prototype.scale=function(g,P){N.prototype.scale.call(this,g,P),this.x1=this.x1*g,this.y1=this.y1*P,this.x2=this.x2*g,this.y2=this.y2*P,this.adjustVisual(),this.adjustControlBox()},d}(we),We=function(N){function d(g,P,V){var k=N.call(this,g,P,V)||this;return k.strokeColor="transparent",k.strokeWidth=0,k.strokeDasharray="",k.setStrokeColor=k.setStrokeColor.bind(k),k.setStrokeWidth=k.setStrokeWidth.bind(k),k.setStrokeDasharray=k.setStrokeDasharray.bind(k),k.strokeColor=V.defaultColor,k.strokeWidth=V.defaultStrokeWidth,k.strokeDasharray=V.defaultStrokeDasharray,k.strokePanel=new ye("Line color",V.defaultColorSet,V.defaultColor),k.strokePanel.onColorChanged=k.setStrokeColor,k.strokeWidthPanel=new at("Line width",V.defaultStrokeWidths,V.defaultStrokeWidth),k.strokeWidthPanel.onWidthChanged=k.setStrokeWidth,k.strokeStylePanel=new ct("Line style",V.defaultStrokeDasharrays,V.defaultStrokeDasharray),k.strokeStylePanel.onStyleChanged=k.setStrokeDasharray,k}return Ie(d,N),d.prototype.ownsTarget=function(g){return!(!N.prototype.ownsTarget.call(this,g)&&g!==this.visual&&g!==this.selectorLine&&g!==this.visibleLine)},d.prototype.createVisual=function(){this.visual=ue.createGroup(),this.selectorLine=ue.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()]]),this.visibleLine=ue.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)},d.prototype.pointerDown=function(g,P){N.prototype.pointerDown.call(this,g,P),this.state==="new"&&(this.createVisual(),this.adjustVisual(),this._state="creating")},d.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()),ue.setAttributes(this.visibleLine,[["stroke",this.strokeColor]]),ue.setAttributes(this.visibleLine,[["stroke-width",this.strokeWidth.toString()]]),ue.setAttributes(this.visibleLine,[["stroke-dasharray",this.strokeDasharray.toString()]]))},d.prototype.setStrokeColor=function(g){this.strokeColor=g,this.adjustVisual(),this.colorChanged(g)},d.prototype.setStrokeWidth=function(g){this.strokeWidth=g,this.adjustVisual()},d.prototype.setStrokeDasharray=function(g){this.strokeDasharray=g,this.adjustVisual(),this.stateChanged()},Object.defineProperty(d.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),d.prototype.getState=function(){var g=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray},N.prototype.getState.call(this));return g.typeName=d.typeName,g},d.prototype.restoreState=function(g){N.prototype.restoreState.call(this,g);var P=g;this.strokeColor=P.strokeColor,this.strokeWidth=P.strokeWidth,this.strokeDasharray=P.strokeDasharray,this.createVisual(),this.adjustVisual()},d.typeName="LineMarker",d.title="Line marker",d.icon='<svg viewBox="0 0 24 24"><path d="M19 13H5v-2h14v2z"/></svg>',d}(Qe),Re=function(N){function d(g,P,V,k){var pe=N.call(this,g,k||'<svg viewBox="0 0 24 24"><path d="M17 8h3v12h1v1h-4v-1h1v-3h-4l-1.5 3H14v1h-4v-1h1l6-12m1 1l-3.5 7H18V9M5 3h5c1.11 0 2 .89 2 2v11H9v-5H6v5H3V5c0-1.11.89-2 2-2m1 2v4h3V5H6z"/></svg>')||this;return pe.fonts=[],pe.fontBoxes=[],pe.fonts=P,pe.currentFont=V,pe.setCurrentFont=pe.setCurrentFont.bind(pe),pe}return Ie(d,N),d.prototype.getUi=function(){var g=this,P=document.createElement("div");return P.style.overflow="hidden",P.style.flexGrow="2",this.fonts.forEach(function(V){var k=document.createElement("div");k.style.display="inline-block",k.style.alignItems="center",k.style.justifyContent="space-between",k.style.padding="5px",k.style.borderWidth="2px",k.style.borderStyle="solid",k.style.overflow="hidden",k.style.maxWidth=100/g.fonts.length-5+"%",k.style.borderColor=V===g.currentFont?g.uiStyleSettings.toolboxAccentColor:"transparent",k.addEventListener("click",function(){g.setCurrentFont(V,k)}),P.appendChild(k);var pe=document.createElement("div");pe.style.display="flex",pe.style.minHeight="20px",pe.style.flexGrow="2",pe.style.fontFamily=V,pe.style.overflow="hidden";var ke=document.createElement("div");ke.style.whiteSpace="nowrap",ke.style.overflow="hidden",ke.style.textOverflow="ellipsis",ke.innerHTML="The quick brown fox jumps over the lazy dog",pe.appendChild(ke),k.appendChild(pe),g.fontBoxes.push(k)}),P},d.prototype.setCurrentFont=function(g,P){var V=this;this.currentFont=g,this.fontBoxes.forEach(function(k){k.style.borderColor=k===P?V.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onFontChanged&&this.onFontChanged(this.currentFont)},d}(se),Me=function(N){function d(g,P,V){var k=N.call(this,g,P,V)||this;return k.color="transparent",k.padding=5,k.DEFAULT_TEXT="your text here",k.text=k.DEFAULT_TEXT,k.isMoved=!1,k.color=V.defaultColor,k.fontFamily=V.defaultFontFamily,k.defaultSize={x:100,y:30},k.setColor=k.setColor.bind(k),k.setFont=k.setFont.bind(k),k.renderText=k.renderText.bind(k),k.sizeText=k.sizeText.bind(k),k.textEditDivClicked=k.textEditDivClicked.bind(k),k.showTextEditor=k.showTextEditor.bind(k),k.setSize=k.setSize.bind(k),k.positionTextEditor=k.positionTextEditor.bind(k),k.colorPanel=new ye("Color",V.defaultColorSet,V.defaultColor),k.colorPanel.onColorChanged=k.setColor,k.fontFamilyPanel=new Re("Font",V.defaultFontFamilies,V.defaultFontFamily),k.fontFamilyPanel.onFontChanged=k.setFont,k}return Ie(d,N),d.prototype.ownsTarget=function(g){if(N.prototype.ownsTarget.call(this,g)||g===this.visual||g===this.textElement||g===this.bgRectangle)return!0;var P=!1;return this.textElement.childNodes.forEach(function(V){V===g&&(P=!0)}),P},d.prototype.createVisual=function(){this.visual=ue.createGroup(),this.bgRectangle=ue.createRect(1,1,[["fill","transparent"]]),this.visual.appendChild(this.bgRectangle),this.textElement=ue.createText([["fill",this.color],["font-family",this.fontFamily],["font-size","16px"],["x","0"],["y","0"]]),this.textElement.transform.baseVal.appendItem(ue.createTransform()),this.textElement.transform.baseVal.appendItem(ue.createTransform()),this.visual.appendChild(this.textElement),this.addMarkerVisualToContainer(this.visual),this.renderText()},d.prototype.pointerDown=function(g,P){N.prototype.pointerDown.call(this,g,P),this.isMoved=!1,this.pointerDownPoint=g,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(g),this._state="creating")},d.prototype.renderText=function(){var g=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(P){g.textElement.appendChild(ue.createTSpan(P.trim()===""?" ":P.trim(),[["x","0"],["dy","1.2em"]]))}),setTimeout(this.sizeText,10)}},d.prototype.getTextScale=function(){var g=this.textElement.getBBox(),P=1;if(g.width>0&&g.height>0){var V=(1*this.width-this.width*this.padding*2/100)/g.width,k=(1*this.height-this.height*this.padding*2/100)/g.height;P=Math.min(V,k)}return P},d.prototype.getTextPosition=function(g){var P=this.textElement.getBBox(),V=0,k=0;return P.width>0&&P.height>0&&(V=(this.width-P.width*g)/2,k=this.height/2-P.height*g/2),{x:V,y:k}},d.prototype.sizeText=function(){var g=this.textElement.getBBox(),P=this.getTextScale(),V=this.getTextPosition(P);V.y-=g.y*P,navigator.userAgent.indexOf("Edge/")>-1?this.textElement.style.transform="translate("+V.x+"px, "+V.y+"px) scale("+P+", "+P+")":(this.textElement.transform.baseVal.getItem(0).setTranslate(V.x,V.y),this.textElement.transform.baseVal.getItem(1).setScale(P,P))},d.prototype.manipulate=function(g){N.prototype.manipulate.call(this,g),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(g.x-this.pointerDownPoint.x)>5||Math.abs(g.y-this.pointerDownPoint.y)>5)},d.prototype.resize=function(g){N.prototype.resize.call(this,g),this.isMoved=!0,this.setSize(),this.sizeText()},d.prototype.setSize=function(){N.prototype.setSize.call(this),this.visual&&this.bgRectangle&&(ue.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),ue.setAttributes(this.bgRectangle,[["width",this.width.toString()],["height",this.height.toString()]]))},d.prototype.pointerUp=function(g){var P=this.state;P==="creating"&&(this._suppressMarkerCreateEvent=!0),N.prototype.pointerUp.call(this,g),this.setSize(),(P==="creating"||!this.isMoved&&Date.now()-this.pointerDownTimestamp>500)&&this.showTextEditor(),this.pointerDownPoint=void 0},d.prototype.showTextEditor=function(){var g=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(P){P.stopPropagation()}),this.textEditor.addEventListener("input",function(){for(var P=Number.parseFloat(g.textEditor.style.fontSize);g.textEditor.clientWidth>=Number.parseInt(g.textEditor.style.maxWidth)&&P>.9;)P-=.1,g.textEditor.style.fontSize=Math.max(P,.9)+"em"}),this.textEditor.addEventListener("keyup",function(P){P.cancelBubble=!0}),this.textEditor.addEventListener("paste",function(P){if(P.clipboardData){var V=P.clipboardData.getData("text"),k=window.getSelection();if(!k.rangeCount)return!1;k.deleteFromDocument(),k.getRangeAt(0).insertNode(document.createTextNode(V)),P.preventDefault()}}),this.textEditDiv.addEventListener("pointerup",function(){g.textEditDivClicked(g.textEditor.innerText)}),this.textEditDiv.appendChild(this.textEditor),this.overlayContainer.appendChild(this.textEditDiv),this.hideVisual(),this.textEditor.focus(),document.execCommand("selectAll")},d.prototype.positionTextEditor=function(){if(this.state==="edit")if(this.textEditor===void 0)this.showTextEditor();else{this.textElement.style.display="";var g=this.getTextScale(),P=this.rotatePoint({x:this.left+this.width/2,y:this.top+this.height/2}),V=this.textElement.getBBox(),k={x:V.width*g,y:V.height*g};P.x-=k.x/2,P.y-=k.y/2,this.textEditor.style.top=P.y+"px",this.textEditor.style.left=P.x+"px",this.textEditor.style.maxWidth=this.overlayContainer.offsetWidth-P.x+"px",this.textEditor.style.fontSize=Math.max(16*g,12)+"px",this.textElement.style.display="none"}},d.prototype.textEditDivClicked=function(g){this.text=g.trim(),this.overlayContainer.innerHTML="",this.renderText(),this.showVisual(),this._suppressMarkerCreateEvent&&(this._suppressMarkerCreateEvent=!1,this.onMarkerCreated&&this.onMarkerCreated(this)),this.stateChanged()},d.prototype.select=function(){N.prototype.select.call(this),this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText)},d.prototype.deselect=function(){this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText),N.prototype.deselect.call(this)},d.prototype.dblClick=function(g,P){N.prototype.dblClick.call(this,g,P),this.showTextEditor()},d.prototype.setColor=function(g){this.textElement&&ue.setAttributes(this.textElement,[["fill",g]]),this.color=g,this.textEditor&&(this.textEditor.style.color=this.color),this.colorChanged(g)},d.prototype.setFont=function(g){this.textElement&&ue.setAttributes(this.textElement,[["font-family",g]]),this.fontFamily=g,this.textEditor&&(this.textEditor.style.fontFamily=this.fontFamily),this.renderText(),this.stateChanged()},d.prototype.hideVisual=function(){this.textElement.style.display="none",this.hideControlBox()},d.prototype.showVisual=function(){this.state==="edit"&&(this._state="select"),this.textElement.style.display="",this.showControlBox()},Object.defineProperty(d.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),d.prototype.getState=function(){var g=Object.assign({color:this.color,fontFamily:this.fontFamily,padding:this.padding,text:this.text},N.prototype.getState.call(this));return g.typeName=d.typeName,g},d.prototype.restoreState=function(g){var P=g;this.color=P.color,this.fontFamily=P.fontFamily,this.padding=P.padding,this.text=P.text,this.createVisual(),N.prototype.restoreState.call(this,g),this.setSize()},d.prototype.scale=function(g,P){N.prototype.scale.call(this,g,P),this.setSize(),this.sizeText(),this.positionTextEditor()},d.typeName="TextMarker",d.title="Text marker",d.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>',d}(Ve),Ee=function(N){function d(g,P,V){var k=N.call(this,g,P,V)||this;return k.color="transparent",k.lineWidth=3,k.drawing=!1,k.pixelRatio=1,k.color=V.defaultColor,k.lineWidth=V.defaultStrokeWidth,k.pixelRatio=V.freehandPixelRatio,k.setColor=k.setColor.bind(k),k.addCanvas=k.addCanvas.bind(k),k.finishCreation=k.finishCreation.bind(k),k.setLineWidth=k.setLineWidth.bind(k),k.colorPanel=new ye("Color",V.defaultColorSet,V.defaultColor),k.colorPanel.onColorChanged=k.setColor,k.lineWidthPanel=new at("Line width",V.defaultStrokeWidths,V.defaultStrokeWidth),k.lineWidthPanel.onWidthChanged=k.setLineWidth,k}return Ie(d,N),d.prototype.ownsTarget=function(g){return!(!N.prototype.ownsTarget.call(this,g)&&g!==this.visual&&g!==this.drawingImage)},d.prototype.createVisual=function(){this.visual=ue.createGroup(),this.drawingImage=ue.createImage(),this.visual.appendChild(this.drawingImage);var g=ue.createTransform();this.visual.transform.baseVal.appendItem(g),this.addMarkerVisualToContainer(this.visual)},d.prototype.pointerDown=function(g,P){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(g.x,g.y),this.drawing=!0):N.prototype.pointerDown.call(this,g,P)},d.prototype.manipulate=function(g){this.state==="creating"?this.drawing&&(this.canvasContext.lineTo(g.x,g.y),this.canvasContext.stroke()):N.prototype.manipulate.call(this,g)},d.prototype.resize=function(g){N.prototype.resize.call(this,g),ue.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),ue.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]])},d.prototype.pointerUp=function(g){this._state==="creating"?this.drawing&&(this.canvasContext.closePath(),this.drawing=!1,this.globalSettings.newFreehandMarkerOnPointerUp&&this.finishCreation()):N.prototype.pointerUp.call(this,g)},d.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)},d.prototype.select=function(){this.state==="creating"&&this.finishCreation(),N.prototype.select.call(this)},d.prototype.deselect=function(){this.state==="creating"&&this.finishCreation(),N.prototype.deselect.call(this)},d.prototype.finishCreation=function(){for(var g=this.canvasContext.getImageData(0,0,this.canvasElement.width,this.canvasElement.height),P=[this.canvasElement.width+1,this.canvasElement.height+1,-1,-1],V=P[0],k=P[1],pe=P[2],ke=P[3],Te=!1,ot=0;ot<this.canvasElement.height;ot++)for(var Ke=0;Ke<this.canvasElement.width;Ke++)g.data[ot*this.canvasElement.width*4+4*Ke+3]>0&&(Te=!0,ot<k&&(k=ot),Ke<V&&(V=Ke),ot>ke&&(ke=ot),Ke>pe&&(pe=Ke));if(Te){this.left=V/this.pixelRatio,this.top=k/this.pixelRatio,this.width=(pe-V)/this.pixelRatio,this.height=(ke-k)/this.pixelRatio;var ft=document.createElement("canvas");ft.width=pe-V,ft.height=ke-k,ft.getContext("2d").putImageData(this.canvasContext.getImageData(V,k,pe-V,ke-k),0,0),this.drawingImgUrl=ft.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},d.prototype.setDrawingImage=function(){ue.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]]),ue.setAttributes(this.drawingImage,[["href",this.drawingImgUrl]]),this.moveVisual({x:this.left,y:this.top})},d.prototype.setColor=function(g){this.color=g,this.colorChanged(g)},d.prototype.setLineWidth=function(g){this.lineWidth=g},Object.defineProperty(d.prototype,"toolboxPanels",{get:function(){return this.state==="new"||this.state==="creating"?[this.colorPanel,this.lineWidthPanel]:[]},enumerable:!1,configurable:!0}),d.prototype.getState=function(){var g=Object.assign({drawingImgUrl:this.drawingImgUrl},N.prototype.getState.call(this));return g.typeName=d.typeName,g},d.prototype.restoreState=function(g){this.createVisual(),N.prototype.restoreState.call(this,g),this.drawingImgUrl=g.drawingImgUrl,this.setDrawingImage()},d.prototype.scale=function(g,P){N.prototype.scale.call(this,g,P),this.setDrawingImage()},d.typeName="FreehandMarker",d.title="Freehand marker",d.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>',d}(Ve),Ae=function(N){function d(g,P,V){var k=N.call(this,g,V||'<svg viewBox="0 0 24 24"><path d="M8 14v4l-6-6 6-6v4h8V6l6 6-6 6v-4H8z"/></svg>')||this;return k.typeBoxes=[],k.currentType=P,k.setCurrentType=k.setCurrentType.bind(k),k}return Ie(d,N),d.prototype.getUi=function(){var g=this,P=document.createElement("div");P.style.display="flex",P.style.overflow="hidden",P.style.flexGrow="2";for(var V=function(ke){var Te="both";switch(ke){case 0:Te="both";break;case 1:Te="start";break;case 2:Te="end";break;case 3:Te="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=Te===k.currentType?k.uiStyleSettings.toolboxAccentColor:"transparent",ot.addEventListener("click",function(){g.setCurrentType(Te,ot)}),P.appendChild(ot),Te==="both"||Te==="start"){var Ke=document.createElement("div");Ke.style.display="flex",Ke.style.alignItems="center",Ke.style.minHeight="20px",Ke.innerHTML=`<svg viewBox="0 0 10 10" width="10" height="10" xmlns="http://www.w3.org/2000/svg">
<polygon points="0,5 10,0 10,10" fill="`+(k.uiStyleSettings!==void 0?k.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
</svg>`,Ke.style.marginLeft="5px",ot.appendChild(Ke)}var ft=document.createElement("div");ft.style.display="flex",ft.style.alignItems="center",ft.style.minHeight="20px",ft.style.flexGrow="2";var dt=document.createElement("hr");if(dt.style.minWidth="20px",dt.style.border="0px",dt.style.borderTop="3px solid "+(k.uiStyleSettings!==void 0?k.uiStyleSettings.toolboxColor:"#eeeeee"),dt.style.flexGrow="2",ft.appendChild(dt),ot.appendChild(ft),Te==="both"||Te==="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="`+(k.uiStyleSettings!==void 0?k.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
</svg>`,Et.style.marginRight="5px",ot.appendChild(Et)}k.typeBoxes.push(ot)},k=this,pe=0;pe<4;pe++)V(pe);return P},d.prototype.setCurrentType=function(g,P){var V=this;this.currentType=g,this.typeBoxes.forEach(function(k){k.style.borderColor=k===P?V.uiStyleSettings!==void 0?V.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"}),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},d}(se),he=function(N){function d(g,P,V){var k=N.call(this,g,P,V)||this;return k.arrowType="end",k.arrowBaseHeight=10,k.arrowBaseWidth=10,k.getArrowPoints=k.getArrowPoints.bind(k),k.setArrowType=k.setArrowType.bind(k),k.arrowTypePanel=new Ae("Arrow type","end"),k.arrowTypePanel.onArrowTypeChanged=k.setArrowType,k}return Ie(d,N),d.prototype.ownsTarget=function(g){return!(!N.prototype.ownsTarget.call(this,g)&&g!==this.arrow1&&g!==this.arrow2)},d.prototype.getArrowPoints=function(g,P){var V=this.arrowBaseWidth+2*this.strokeWidth,k=this.arrowBaseHeight+2*this.strokeWidth;return g-V/2+","+(P+k/2)+" "+g+","+(P-k/2)+" "+(g+V/2)+","+(P+k/2)},d.prototype.createTips=function(){this.arrow1=ue.createPolygon(this.getArrowPoints(this.x1,this.y1),[["fill",this.strokeColor]]),this.arrow1.transform.baseVal.appendItem(ue.createTransform()),this.visual.appendChild(this.arrow1),this.arrow2=ue.createPolygon(this.getArrowPoints(this.x2,this.y2),[["fill",this.strokeColor]]),this.arrow2.transform.baseVal.appendItem(ue.createTransform()),this.visual.appendChild(this.arrow2)},d.prototype.pointerDown=function(g,P){N.prototype.pointerDown.call(this,g,P),this.state==="creating"&&this.createTips()},d.prototype.adjustVisual=function(){if(N.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",ue.setAttributes(this.arrow1,[["points",this.getArrowPoints(this.x1,this.y1)],["fill",this.strokeColor]]),ue.setAttributes(this.arrow2,[["points",this.getArrowPoints(this.x2,this.y2)],["fill",this.strokeColor]]),Math.abs(this.x1-this.x2)>.1)){var g=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),P=this.arrow1.transform.baseVal.getItem(0);P.setRotate(g,this.x1,this.y1),this.arrow1.transform.baseVal.replaceItem(P,0);var V=this.arrow2.transform.baseVal.getItem(0);V.setRotate(g+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(V,0)}},d.prototype.setArrowType=function(g){this.arrowType=g,this.adjustVisual(),this.stateChanged()},Object.defineProperty(d.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel,this.arrowTypePanel]},enumerable:!1,configurable:!0}),d.prototype.getState=function(){var g=Object.assign({arrowType:this.arrowType},N.prototype.getState.call(this));return g.typeName=d.typeName,g},d.prototype.restoreState=function(g){N.prototype.restoreState.call(this,g);var P=g;this.arrowType=P.arrowType,this.createTips(),this.adjustVisual()},d.typeName="ArrowMarker",d.title="Arrow marker",d.icon='<svg viewBox="0 0 24 24"><path d="M19 6.41L17.59 5 7 15.59V9H5v10h10v-2H8.41L19 6.41z"/></svg>',d}(We),q=function(N){function d(g,P,V){var k=N.call(this,g,P,V)||this;return k.fillColor=V.defaultFillColor,k.strokeWidth=0,k.fillPanel=new ye("Color",V.defaultColorSet,V.defaultFillColor),k.fillPanel.onColorChanged=k.setFillColor,k}return Ie(d,N),Object.defineProperty(d.prototype,"toolboxPanels",{get:function(){return[this.fillPanel]},enumerable:!1,configurable:!0}),d.prototype.getState=function(){var g=N.prototype.getState.call(this);return g.typeName=d.typeName,g},d.typeName="CoverMarker",d.title="Cover marker",d.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4z"/></svg>',d}(Xe),ee=function(N){function d(g,P,V,k){var pe=N.call(this,g,k||'<svg viewBox="0 0 24 24"><path d="M17.66 8L12 2.35 6.34 8A8.02 8.02 0 004 13.64c0 2 .78 4.11 2.34 5.67a7.99 7.99 0 0011.32 0c1.56-1.56 2.34-3.67 2.34-5.67S19.22 9.56 17.66 8M6 14c0-2 .62-3.27 1.76-4.4L12 5.27l4.24 4.38C17.38 10.77 18 12 18 14H6z"/></svg>')||this;return pe.opacities=[],pe.opacityBoxes=[],pe.opacities=P,pe.currentOpacity=V,pe.setCurrentOpacity=pe.setCurrentOpacity.bind(pe),pe}return Ie(d,N),d.prototype.getUi=function(){var g=this,P=document.createElement("div");return P.style.display="flex",P.style.overflow="hidden",P.style.flexGrow="2",P.style.justifyContent="space-between",this.opacities.forEach(function(V){var k=document.createElement("div");k.style.display="flex",k.style.alignItems="center",k.style.justifyContent="center",k.style.padding="5px",k.style.borderWidth="2px",k.style.borderStyle="solid",k.style.borderColor=V===g.currentOpacity?g.uiStyleSettings.toolboxAccentColor:"transparent",k.addEventListener("click",function(){g.setCurrentOpacity(V,k)}),P.appendChild(k);var pe=document.createElement("div");pe.innerText=100*V+"%",k.appendChild(pe),g.opacityBoxes.push(k)}),P},d.prototype.setCurrentOpacity=function(g,P){var V=this;this.currentOpacity=g,this.opacityBoxes.forEach(function(k){k.style.borderColor=k===P?V.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},d}(se),oe=function(N){function d(g,P,V){var k=N.call(this,g,P,V)||this;return k.setOpacity=k.setOpacity.bind(k),k.fillColor=V.defaultHighlightColor,k.strokeWidth=0,k.opacity=V.defaultHighlightOpacity,k.fillPanel=new ye("Color",V.defaultColorSet,k.fillColor),k.fillPanel.onColorChanged=k.setFillColor,k.opacityPanel=new ee("Opacity",V.defaultOpacitySteps,k.opacity),k.opacityPanel.onOpacityChanged=k.setOpacity,k}return Ie(d,N),d.prototype.setOpacity=function(g){this.opacity=g,this.visual&&ue.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(d.prototype,"toolboxPanels",{get:function(){return[this.fillPanel,this.opacityPanel]},enumerable:!1,configurable:!0}),d.prototype.getState=function(){var g=N.prototype.getState.call(this);return g.typeName=d.typeName,g},d.typeName="HighlightMarker",d.title="Highlight marker",d.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>',d}(q),ce='<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>',Se=function(N){function d(g,P,V){var k=N.call(this,g,P,V)||this;return k.bgColor="transparent",k.tipPosition={x:0,y:0},k.tipBase1Position={x:0,y:0},k.tipBase2Position={x:0,y:0},k.tipMoving=!1,k.color=V.defaultStrokeColor,k.bgColor=V.defaultFillColor,k.fontFamily=V.defaultFontFamily,k.defaultSize={x:100,y:30},k.setBgColor=k.setBgColor.bind(k),k.getTipPoints=k.getTipPoints.bind(k),k.positionTip=k.positionTip.bind(k),k.setTipPoints=k.setTipPoints.bind(k),k.colorPanel=new ye("Text color",V.defaultColorSet,k.color,'<svg viewBox="0 0 24 24"><path d="M9.62 12L12 5.67 14.37 12M11 3L5.5 17h2.25l1.12-3h6.25l1.13 3h2.25L13 3h-2z"/></svg>'),k.colorPanel.onColorChanged=k.setColor,k.bgColorPanel=new ye("Fill color",V.defaultColorSet,k.bgColor,ce),k.bgColorPanel.onColorChanged=k.setBgColor,k.fontFamilyPanel=new Re("Font",V.defaultFontFamilies,V.defaultFontFamily),k.fontFamilyPanel.onFontChanged=k.setFont,k.tipGrip=new $e,k.tipGrip.visual.transform.baseVal.appendItem(ue.createTransform()),k.controlBox.appendChild(k.tipGrip.visual),k}return Ie(d,N),d.prototype.ownsTarget=function(g){return N.prototype.ownsTarget.call(this,g)||this.tipGrip.ownsTarget(g)||this.tip===g},d.prototype.createTip=function(){ue.setAttributes(this.bgRectangle,[["fill",this.bgColor],["rx","10px"]]),this.tip=ue.createPolygon(this.getTipPoints(),[["fill",this.bgColor]]),this.visual.appendChild(this.tip)},d.prototype.pointerDown=function(g,P){this.state==="new"&&N.prototype.pointerDown.call(this,g,P),this.state==="creating"?this.createTip():this.tipGrip.ownsTarget(P)?(this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.tipMoving=!0):N.prototype.pointerDown.call(this,g,P)},d.prototype.pointerUp=function(g){if(this.tipMoving)this.tipMoving=!1,this.isMoved=!0,N.prototype.pointerUp.call(this,g);else{var P=this.state==="creating";N.prototype.pointerUp.call(this,g),this.setTipPoints(P),this.positionTip()}},d.prototype.manipulate=function(g){if(this.tipMoving){var P=this.unrotatePoint(g);this.tipPosition={x:P.x-this.manipulationStartLeft,y:P.y-this.manipulationStartTop},this.positionTip()}else N.prototype.manipulate.call(this,g)},d.prototype.setBgColor=function(g){this.bgRectangle&&this.tip&&(ue.setAttributes(this.bgRectangle,[["fill",g]]),ue.setAttributes(this.tip,[["fill",g]])),this.bgColor=g,this.fillColorChanged(g)},d.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},d.prototype.setTipPoints=function(g){g===void 0&&(g=!1);var P=Math.min(this.height/2,15),V=this.height/5;g&&(this.tipPosition={x:P+V/2,y:this.height+20});var k=Math.atan(this.height/2/(this.width/2));this.tipPosition.x<this.width/2&&this.tipPosition.y<this.height/2?k<Math.atan((this.height/2-this.tipPosition.y)/(this.width/2-this.tipPosition.x))?(V=this.width/5,P=Math.min(this.width/2,15),this.tipBase1Position={x:P,y:0},this.tipBase2Position={x:P+V,y:0}):(this.tipBase1Position={x:0,y:P},this.tipBase2Position={x:0,y:P+V}):this.tipPosition.x>=this.width/2&&this.tipPosition.y<this.height/2?k<Math.atan((this.height/2-this.tipPosition.y)/(this.tipPosition.x-this.width/2))?(V=this.width/5,P=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-P-V,y:0},this.tipBase2Position={x:this.width-P,y:0}):(this.tipBase1Position={x:this.width,y:P},this.tipBase2Position={x:this.width,y:P+V}):this.tipPosition.x>=this.width/2&&this.tipPosition.y>=this.height/2?k<Math.atan((this.tipPosition.y-this.height/2)/(this.tipPosition.x-this.width/2))?(V=this.width/5,P=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-P-V,y:this.height},this.tipBase2Position={x:this.width-P,y:this.height}):(this.tipBase1Position={x:this.width,y:this.height-P-V},this.tipBase2Position={x:this.width,y:this.height-P}):k<Math.atan((this.tipPosition.y-this.height/2)/(this.width/2-this.tipPosition.x))?(V=this.width/5,P=Math.min(this.width/2,15),this.tipBase1Position={x:P,y:this.height},this.tipBase2Position={x:P+V,y:this.height}):(this.tipBase1Position={x:0,y:this.height-P},this.tipBase2Position={x:0,y:this.height-P-V})},d.prototype.resize=function(g){N.prototype.resize.call(this,g),this.positionTip()},d.prototype.positionTip=function(){ue.setAttributes(this.tip,[["points",this.getTipPoints()]]);var g=this.tipGrip.visual.transform.baseVal.getItem(0);g.setTranslate(this.tipPosition.x,this.tipPosition.y),this.tipGrip.visual.transform.baseVal.replaceItem(g,0)},Object.defineProperty(d.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.bgColorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),d.prototype.select=function(){this.positionTip(),N.prototype.select.call(this)},d.prototype.getState=function(){var g=Object.assign({bgColor:this.bgColor,tipPosition:this.tipPosition},N.prototype.getState.call(this));return g.typeName=d.typeName,g},d.prototype.restoreState=function(g){var P=g;this.bgColor=P.bgColor,this.tipPosition=P.tipPosition,N.prototype.restoreState.call(this,g),this.createTip(),this.setTipPoints()},d.prototype.scale=function(g,P){N.prototype.scale.call(this,g,P),this.tipPosition={x:this.tipPosition.x*g,y:this.tipPosition.y*P},this.positionTip()},d.typeName="CalloutMarker",d.title="Callout marker",d.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>',d}(Me),Pe=function(N){function d(g,P,V){var k=N.call(this,g,P,V)||this;return k.fillColor="transparent",k.strokeColor="transparent",k.strokeWidth=0,k.strokeDasharray="",k.opacity=1,k.strokeColor=V.defaultColor,k.strokeWidth=V.defaultStrokeWidth,k.strokeDasharray=V.defaultStrokeDasharray,k.fillColor=V.defaultFillColor,k.setStrokeColor=k.setStrokeColor.bind(k),k.setFillColor=k.setFillColor.bind(k),k.setStrokeWidth=k.setStrokeWidth.bind(k),k.setStrokeDasharray=k.setStrokeDasharray.bind(k),k.setOpacity=k.setOpacity.bind(k),k.createVisual=k.createVisual.bind(k),k.strokePanel=new ye("Line color",be(V.defaultColorSet,["transparent"]),V.defaultColor),k.strokePanel.onColorChanged=k.setStrokeColor,k.fillPanel=new ye("Fill color",be(V.defaultColorSet,["transparent"]),k.fillColor,ce),k.fillPanel.onColorChanged=k.setFillColor,k.strokeWidthPanel=new at("Line width",V.defaultStrokeWidths,V.defaultStrokeWidth),k.strokeWidthPanel.onWidthChanged=k.setStrokeWidth,k.strokeStylePanel=new ct("Line style",V.defaultStrokeDasharrays,V.defaultStrokeDasharray),k.strokeStylePanel.onStyleChanged=k.setStrokeDasharray,k.opacityPanel=new ee("Opacity",V.defaultOpacitySteps,k.opacity),k.opacityPanel.onOpacityChanged=k.setOpacity,k}return Ie(d,N),d.prototype.ownsTarget=function(g){return!(!N.prototype.ownsTarget.call(this,g)&&g!==this.visual)},d.prototype.createVisual=function(){this.visual=ue.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)},d.prototype.pointerDown=function(g,P){N.prototype.pointerDown.call(this,g,P),this.state==="new"&&(this.createVisual(),this.moveVisual(g),this._state="creating")},d.prototype.manipulate=function(g){N.prototype.manipulate.call(this,g)},d.prototype.resize=function(g){N.prototype.resize.call(this,g),this.setSize()},d.prototype.setSize=function(){N.prototype.setSize.call(this),ue.setAttributes(this.visual,[["cx",(this.width/2).toString()],["cy",(this.height/2).toString()],["rx",(this.width/2).toString()],["ry",(this.height/2).toString()]])},d.prototype.pointerUp=function(g){N.prototype.pointerUp.call(this,g),this.setSize()},d.prototype.setStrokeColor=function(g){this.strokeColor=g,this.visual&&ue.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(g),this.stateChanged()},d.prototype.setFillColor=function(g){this.fillColor=g,this.visual&&ue.setAttributes(this.visual,[["fill",this.fillColor]]),this.fillColorChanged(g),this.stateChanged()},d.prototype.setStrokeWidth=function(g){this.strokeWidth=g,this.visual&&ue.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},d.prototype.setStrokeDasharray=function(g){this.strokeDasharray=g,this.visual&&ue.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},d.prototype.setOpacity=function(g){this.opacity=g,this.visual&&ue.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(d.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.opacityPanel]},enumerable:!1,configurable:!0}),d.prototype.getState=function(){var g=Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},N.prototype.getState.call(this));return g.typeName=d.typeName,g},d.prototype.restoreState=function(g){var P=g;this.fillColor=P.fillColor,this.strokeColor=P.strokeColor,this.strokeWidth=P.strokeWidth,this.strokeDasharray=P.strokeDasharray,this.opacity=P.opacity,this.createVisual(),N.prototype.restoreState.call(this,g),this.setSize()},d.prototype.scale=function(g,P){N.prototype.scale.call(this,g,P),this.setSize()},d.typeName="EllipseMarker",d.title="Ellipse marker",d.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>',d}(Ve),Je=function(N){function d(g,P,V){return N.call(this,g,P,V)||this}return Ie(d,N),Object.defineProperty(d.prototype,"tipLength",{get:function(){return 10+3*this.strokeWidth},enumerable:!1,configurable:!0}),d.prototype.ownsTarget=function(g){return!(!N.prototype.ownsTarget.call(this,g)&&g!==this.tip1&&g!==this.tip2)},d.prototype.createTips=function(){this.tip1=ue.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(ue.createTransform()),this.visual.appendChild(this.tip1),this.tip2=ue.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(ue.createTransform()),this.visual.appendChild(this.tip2)},d.prototype.pointerDown=function(g,P){N.prototype.pointerDown.call(this,g,P),this.state==="creating"&&this.createTips()},d.prototype.adjustVisual=function(){if(N.prototype.adjustVisual.call(this),this.tip1&&this.tip2&&(ue.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()]]),ue.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 g=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),P=this.tip1.transform.baseVal.getItem(0);P.setRotate(g,this.x1,this.y1),this.tip1.transform.baseVal.replaceItem(P,0);var V=this.tip2.transform.baseVal.getItem(0);V.setRotate(g+180,this.x2,this.y2),this.tip2.transform.baseVal.replaceItem(V,0)}},Object.defineProperty(d.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),d.prototype.getState=function(){var g=N.prototype.getState.call(this);return g.typeName=d.typeName,g},d.prototype.restoreState=function(g){N.prototype.restoreState.call(this,g),this.createTips(),this.adjustVisual()},d.typeName="MeasurementMarker",d.title="Measurement marker",d.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>',d}(We),lt=function(N){function d(g,P,V){var k=N.call(this,g,P,V)||this;return k.strokePanel.colors=V.defaultColorSet,k.fillColor="transparent",k}return Ie(d,N),Object.defineProperty(d.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),d.prototype.getState=function(){var g=N.prototype.getState.call(this);return g.typeName=d.typeName,g},d.typeName="EllipseFrameMarker",d.title="Ellipse frame marker",d.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>',d}(Pe),ht=function(){function N(){this.undoStack=[],this.redoStack=[]}return Object.defineProperty(N.prototype,"isUndoPossible",{get:function(){return this.undoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"isRedoPossible",{get:function(){return this.redoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"undoStepCount",{get:function(){return this.undoStack.length},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"redoStepCount",{get:function(){return this.redoStack.length},enumerable:!1,configurable:!0}),N.prototype.addUndoStep=function(d){this.undoStack.length!==0&&JSON.stringify(this.undoStack[this.undoStack.length-1])===JSON.stringify(d)||(this.undoStack.push(d),JSON.stringify(this.lastRedoStep)!==JSON.stringify(d)&&this.redoStack.splice(0,this.redoStack.length))},N.prototype.replaceLastUndoStep=function(d){this.undoStack.length>0&&(this.undoStack[this.undoStack.length-1]=d)},N.prototype.getLastUndoStep=function(){return this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0},N.prototype.undo=function(){if(this.undoStack.length>1){var d=this.undoStack.pop();return d!==void 0&&this.redoStack.push(d),this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0}},N.prototype.redo=function(){return this.lastRedoStep=this.redoStack.pop(),this.lastRedoStep},N}(),At=function(N){function d(g,P,V){var k=N.call(this,g,P,V)||this;return k.strokeColor="transparent",k.strokeWidth=0,k.strokeDasharray="",k.curveX=0,k.curveY=0,k.manipulationStartCurveX=0,k.manipulationStartCurveY=0,k.setStrokeColor=k.setStrokeColor.bind(k),k.setStrokeWidth=k.setStrokeWidth.bind(k),k.setStrokeDasharray=k.setStrokeDasharray.bind(k),k.positionGrips=k.positionGrips.bind(k),k.addControlGrips=k.addControlGrips.bind(k),k.adjustVisual=k.adjustVisual.bind(k),k.setupControlBox=k.setupControlBox.bind(k),k.resize=k.resize.bind(k),k.strokeColor=V.defaultColor,k.strokeWidth=V.defaultStrokeWidth,k.strokeDasharray=V.defaultStrokeDasharray,k.strokePanel=new ye("Line color",V.defaultColorSet,V.defaultColor),k.strokePanel.onColorChanged=k.setStrokeColor,k.strokeWidthPanel=new at("Line width",V.defaultStrokeWidths,V.defaultStrokeWidth),k.strokeWidthPanel.onWidthChanged=k.setStrokeWidth,k.strokeStylePanel=new ct("Line style",V.defaultStrokeDasharrays,V.defaultStrokeDasharray),k.strokeStylePanel.onStyleChanged=k.setStrokeDasharray,k}return Ie(d,N),d.prototype.ownsTarget=function(g){return!(!N.prototype.ownsTarget.call(this,g)&&g!==this.visual&&g!==this.selectorCurve&&g!==this.visibleCurve&&!this.curveGrip.ownsTarget(g))},d.prototype.getPathD=function(){return"M "+this.x1+" "+this.y1+" Q "+this.curveX+" "+this.curveY+", "+this.x2+" "+this.y2},d.prototype.createVisual=function(){this.visual=ue.createGroup(),this.selectorCurve=ue.createPath(this.getPathD(),[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()],["fill","transparent"]]),this.visibleCurve=ue.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)},d.prototype.pointerDown=function(g,P){N.prototype.pointerDown.call(this,g,P),this.manipulationStartCurveX=this.curveX,this.manipulationStartCurveY=this.curveY,this.state==="new"&&(this.curveX=g.x,this.curveY=g.y),this.state==="new"?(this.createVisual(),this.adjustVisual(),this._state="creating"):this.curveGrip.ownsTarget(P)&&(this.activeGrip=this.curveGrip,this._state="resize")},d.prototype.adjustVisual=function(){this.selectorCurve&&this.visibleCurve&&(this.selectorCurve.setAttribute("d",this.getPathD()),this.visibleCurve.setAttribute("d",this.getPathD()),ue.setAttributes(this.visibleCurve,[["stroke",this.strokeColor]]),ue.setAttributes(this.visibleCurve,[["stroke-width",this.strokeWidth.toString()]]),ue.setAttributes(this.visibleCurve,[["stroke-dasharray",this.strokeDasharray.toString()]]))},d.prototype.setupControlBox=function(){N.prototype.setupControlBox.call(this),this.curveControlLine1=ue.createLine(this.x1,this.y1,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.curveControlLine2=ue.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)},d.prototype.addControlGrips=function(){this.curveGrip=this.createGrip(),this.curveX=0,this.curveY=0,N.prototype.addControlGrips.call(this)},d.prototype.positionGrips=function(){N.prototype.positionGrips.call(this);var g=this.curveGrip.GRIP_SIZE;this.positionGrip(this.curveGrip.visual,this.curveX-g/2,this.curveY-g/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()))},d.prototype.manipulate=function(g){this.state==="move"&&(this.curveX=this.manipulationStartCurveX+g.x-this.manipulationStartX,this.curveY=this.manipulationStartCurveY+g.y-this.manipulationStartY),N.prototype.manipulate.call(this,g)},d.prototype.resize=function(g){this.activeGrip===this.curveGrip&&(this.curveX=g.x,this.curveY=g.y),N.prototype.resize.call(this,g),this.state==="creating"&&(this.curveX=this.x1+(this.x2-this.x1)/2,this.curveY=this.y1+(this.y2-this.y1)/2)},d.prototype.setStrokeColor=function(g){this.strokeColor=g,this.adjustVisual(),this.colorChanged(g)},d.prototype.setStrokeWidth=function(g){this.strokeWidth=g,this.adjustVisual()},d.prototype.setStrokeDasharray=function(g){this.strokeDasharray=g,this.adjustVisual()},d.prototype.scale=function(g,P){this.curveX=this.curveX*g,this.curveY=this.curveY*P,N.prototype.scale.call(this,g,P)},Object.defineProperty(d.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),d.prototype.getState=function(){var g=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,curveX:this.curveX,curveY:this.curveY},N.prototype.getState.call(this));return g.typeName=d.typeName,g},d.prototype.restoreState=function(g){N.prototype.restoreState.call(this,g);var P=g;this.strokeColor=P.strokeColor,this.strokeWidth=P.strokeWidth,this.strokeDasharray=P.strokeDasharray,this.curveX=P.curveX,this.curveY=P.curveY,this.createVisual(),this.adjustVisual()},d.typeName="CurveMarker",d.title="Curve marker",d.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>',d}(Qe),xt=function(){function N(d,g){g===void 0&&(g=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=d,this.cancelable=g}return Object.defineProperty(N.prototype,"defaultPrevented",{get:function(){return this._defaultPrevented},enumerable:!1,configurable:!0}),N.prototype.preventDefault=function(){this._defaultPrevented=!0},N}(),St=function(N){function d(g,P,V){var k=N.call(this,g,!1)||this;return k.dataUrl=P,k.state=V,k}return Ie(d,N),d}(xt),it=function(N){function d(g,P,V){V===void 0&&(V=!1);var k=N.call(this,g,V)||this;return k.marker=P,k}return Ie(d,N),d}(xt),jt=function(){function N(){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 N.prototype.addEventListener=function(d,g){this[d].push(g)},N.prototype.removeEventListener=function(d,g){var P=this[d].indexOf(g);P>-1&&this[d].splice(P,1)},N}(),Wt=function(){function N(d){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 ht,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 jt,this._silentRenderMode=!1,this._isFocused=!1,this._instanceNo=N.instanceCounter++,this.styles=new rt(this.instanceNo),this.uiStyleSettings=this.styles.settings,this.target=d,this.targetRoot=document.body,this.width=d.clientWidth,this.height=d.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(N.prototype,"ALL_MARKER_TYPES",{get:function(){return[Ce,Ee,he,Me,lt,Pe,oe,Se,Je,q,We,At]},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[Ce,Ee,he,Me,Pe,oe,Se]},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"BASIC_MARKER_TYPES",{get:function(){return[Ce,Ee,he,Me,oe]},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"availableMarkerTypes",{get:function(){return this._availableMarkerTypes},set:function(d){var g=this;this._availableMarkerTypes.splice(0),d.forEach(function(P){if(typeof P=="string"){var V=g.ALL_MARKER_TYPES.find(function(k){return k.typeName===P});V!==void 0&&g._availableMarkerTypes.push(V)}else g._availableMarkerTypes.push(P)})},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"currentMarker",{get:function(){return this._currentMarker},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"isUndoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isUndoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"isRedoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isRedoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"zoomLevel",{get:function(){return this._zoomLevel},set:function(d){this._zoomLevel=d,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(N.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),N.prototype.open=function(){this.setupResizeObserver(),this.setEditingTarget(),this.setTopLeft(),this.initMarkerCanvas(),this.initOverlay(),this.attachEvents(),this.settings.displayMode==="popup"&&this.onPopupTargetResize(),je.isLicensed||this.addLogo(),this._isOpen=!0,this._isFocused=!0},N.prototype.show=function(){var d=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(g){return g(new xt(d))})},N.prototype.render=function(){return Fe(this,void 0,void 0,function(){var d;return Ue(this,function(g){switch(g.label){case 0:return this.setCurrentMarker(),(d=new st).naturalSize=this.renderAtNaturalSize,d.imageType=this.renderImageType,d.imageQuality=this.renderImageQuality,d.markersOnly=this.renderMarkersOnly,d.width=this.renderWidth,d.height=this.renderHeight,[4,d.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 1:return g.sent(),[4,d.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 2:return[2,g.sent()]}})})},N.prototype.close=function(d){var g=this;if(d===void 0&&(d=!1),this.isOpen){var P=!1;d||this.eventListeners.beforeclose.forEach(function(V){var k=new xt(g,!0);V(k),k.defaultPrevented&&(P=!0)}),P||(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(V){return V(new xt(g))}),this.detachEvents(),this._isOpen=!1)}},N.prototype.addMarkersToToolbar=function(){for(var d,g=[],P=0;P<arguments.length;P++)g[P]=arguments[P];(d=this._availableMarkerTypes).push.apply(d,g)},N.prototype.addRenderEventListener=function(d){this.addEventListener("render",function(g){d(g.dataUrl,g.state)})},N.prototype.removeRenderEventListener=function(d){},N.prototype.addCloseEventListener=function(d){this.addEventListener("close",function(){d()})},N.prototype.removeCloseEventListener=function(d){},N.prototype.setupResizeObserver=function(){var d=this;this.settings.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){d.resize(d.target.clientWidth,d.target.clientHeight)}),this.targetObserver.observe(this.target)):this.settings.displayMode==="popup"&&(window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){return d.onPopupTargetResize()}),this.targetObserver.observe(this.editorCanvas)),window.addEventListener("resize",this.setWindowHeight))},N.prototype.onPopupTargetResize=function(){var d=1*this.target.clientWidth/this.target.clientHeight,g=this.editorCanvas.clientWidth/d>this.editorCanvas.clientHeight?this.editorCanvas.clientHeight*d:this.editorCanvas.clientWidth,P=g<this.editorCanvas.clientWidth?this.editorCanvas.clientHeight:this.editorCanvas.clientWidth/d;this.resize(g,P)},N.prototype.setWindowHeight=function(){this.windowHeight=window.innerHeight},N.prototype.resize=function(d,g){this._isResizing=!0;var P=d/this.imageWidth,V=g/this.imageHeight;this.imageWidth=Math.round(d),this.imageHeight=Math.round(g),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(P,V),this._isResizing=!1},N.prototype.scaleMarkers=function(d,g){var P,V=this;this._currentMarker&&this._currentMarker instanceof Me?this._currentMarker.scale(d,g):(P=this._currentMarker,this.setCurrentMarker()),this.markers.forEach(function(k){k!==V._currentMarker&&k.scale(d,g)}),P!==void 0&&this.setCurrentMarker(P)},N.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"},N.prototype.setTopLeft=function(){var d=this.editingTarget.getBoundingClientRect(),g=this.editorCanvas.getBoundingClientRect();this.left=d.left-g.left,this.top=d.top-g.top},N.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)},N.prototype.addDefs=function(){for(var d,g=[],P=0;P<arguments.length;P++)g[P]=arguments[P];this.defs=ue.createDefs(),this.addDefsToImage(),(d=this.defs).append.apply(d,g)},N.prototype.addDefsToImage=function(){this.defs&&this.markerImage.insertBefore(this.defs,this.markerImage.firstChild)},N.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)},N.prototype.positionMarkerImage=function(){this.markerImageHolder.style.top=this.top/this.zoomLevel+"px",this.markerImageHolder.style.left=this.left/this.zoomLevel+"px"},N.prototype.attachEvents=function(){this.markerImage.addEventListener("pointerdown",this.onPointerDown),this.markerImage.addEventListener("dblclick",this.onDblClick),this.attachWindowEvents()},N.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)},N.prototype.detachEvents=function(){this.markerImage.removeEventListener("pointerdown",this.onPointerDown),this.markerImage.removeEventListener("dblclick",this.onDblClick),this.detachWindowEvents()},N.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)},N.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 d=document.createElement("a");d.href="https://markerjs.com/",d.target="_blank",d.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>',d.title="Powered by marker.js",d.style.display="grid",d.style.alignItems="center",d.style.justifyItems="center",d.style.padding="3px",d.style.width="20px",d.style.height="20px",this.logoUI.appendChild(d),this.editorCanvas.appendChild(this.logoUI),this.logoUI.style.position="absolute",this.logoUI.style.pointerEvents="all",this.positionLogo()},N.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")},N.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"},N.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},N.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 d=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=d+"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 K(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 W(this.uiDiv,this.settings.displayMode,this.uiStyleSettings,this.styles),this.toolbox.show(this._silentRenderMode||this.uiStyleSettings.hideToolbox?"hidden":"visible")},N.prototype.closeUI=function(){this.settings.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},N.prototype.removeMarker=function(d){this.markerImage.removeChild(d.container),this.markers.indexOf(d)>-1&&this.markers.splice(this.markers.indexOf(d),1),d.dispose()},N.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())},N.prototype.toolbarButtonClicked=function(d,g){if(d==="marker"&&g!==void 0)this.createNewMarker(g);else if(d==="action")switch(g){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()}},N.prototype.deleteSelectedMarker=function(){var d=this;if(this._currentMarker!==void 0){var g=!1;if(this.eventListeners.markerbeforedelete.forEach(function(V){var k=new it(d,d._currentMarker,!0);V(k),k.defaultPrevented&&(g=!0)}),!g){var P=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(V){return V(new it(d,P))})}}},N.prototype.clear=function(){var d=this,g=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach(function(pe){var ke=new it(d,void 0,!0);pe(ke),ke.defaultPrevented&&(g=!0)}),!g)){this.setCurrentMarker();for(var P=function(pe){var ke=V.markers[pe];V.setCurrentMarker(V.markers[pe]),V._currentMarker.dispose(),V.markerImage.removeChild(V._currentMarker.container),V.markers.splice(V.markers.indexOf(V._currentMarker),1),V.eventListeners.markerdelete.forEach(function(Te){return Te(new it(d,ke))})},V=this,k=this.markers.length-1;k>=0;k--)P(k);this.addUndoStep()}},Object.defineProperty(N.prototype,"isNotesAreaOpen",{get:function(){return this.notesArea!==void 0},enumerable:!1,configurable:!0}),N.prototype.showNotesEditor=function(){var d;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=(d=this._currentMarker.notes)!==null&&d!==void 0?d:"",this.overlayContainer.appendChild(this.notesArea))},N.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)},N.prototype.selectLastMarker=function(){this.markers.length>0?this.setCurrentMarker(this.markers[this.markers.length-1]):this.setCurrentMarker()},N.prototype.addUndoStep=function(){var d=this;if(this._currentMarker===void 0||this._currentMarker.state!=="edit"){var g=this.getState(),P=this.undoRedoManager.getLastUndoStep();if(!P||P.width===g.width&&P.height===g.height){var V=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep(g),V<this.undoRedoManager.undoStepCount&&this.eventListeners.statechange.forEach(function(k){return k(new xt(d))})}else this.undoRedoManager.replaceLastUndoStep(g),this.eventListeners.statechange.forEach(function(k){return k(new xt(d))})}},N.prototype.undo=function(){this.switchToSelectMode(),this.addUndoStep(),this.undoStep()},N.prototype.undoStep=function(){var d=this,g=this.undoRedoManager.undo();g!==void 0&&(this.restoreState(g),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(P){return P(new xt(d))}))},N.prototype.redo=function(){this.switchToSelectMode(),this.redoStep()},N.prototype.redoStep=function(){var d=this,g=this.undoRedoManager.redo();g!==void 0&&(this.restoreState(g),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(P){return P(new xt(d))}))},N.prototype.stepZoom=function(){var d=this.zoomSteps.indexOf(this.zoomLevel);this.zoomLevel=d<this.zoomSteps.length-1?this.zoomSteps[d+1]:this.zoomSteps[0]},N.prototype.panTo=function(d){this.contentDiv.scrollBy({left:this.prevPanPoint.x-d.x,top:this.prevPanPoint.y-d.y}),this.prevPanPoint=d},N.prototype.startRenderAndClose=function(){return Fe(this,void 0,void 0,function(){var d,g,P=this;return Ue(this,function(V){switch(V.label){case 0:return[4,this.render()];case 1:return d=V.sent(),g=this.getState(),this.eventListeners.render.forEach(function(k){return k(new St(P,d,g))}),this.close(!0),[2]}})})},N.prototype.getState=function(d){d===!0&&this.setCurrentMarker();var g={width:this.imageWidth,height:this.imageHeight,markers:[]};return this.markers.forEach(function(P){return g.markers.push(P.getState())}),g},N.prototype.restoreState=function(d){var g=this;for(this.markers.splice(0);this.markerImage.lastChild;)this.markerImage.removeChild(this.markerImage.lastChild);d.markers.forEach(function(P){var V=g._availableMarkerTypes.find(function(pe){return pe.typeName===P.typeName});if(V!==void 0){var k=g.addNewMarker(V);k.restoreState(P),g.markers.push(k)}}),d.width&&d.height&&(d.width!==this.imageWidth||d.height!==this.imageHeight)&&this.scaleMarkers(this.imageWidth/d.width,this.imageHeight/d.height),this.eventListeners.restorestate.forEach(function(P){return P(new xt(g))})},N.prototype.addNewMarker=function(d){var g=ue.createGroup();return this.markerImage.appendChild(g),new d(g,this.overlayContainer,this.settings)},N.prototype.createNewMarker=function(d){var g,P=this;(g=typeof d=="string"?this._availableMarkerTypes.find(function(V){return V.typeName===d}):d)&&(this.setCurrentMarker(),this.addUndoStep(),this._currentMarker=this.addNewMarker(g),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(g.typeName),this.toolbox.setPanelButtons(this._currentMarker.toolboxPanels),this.eventListeners.markercreating.forEach(function(V){return V(new it(P,P._currentMarker))}))},N.prototype.markerCreated=function(d){var g=this;this.mode="select",this.markerImage.style.cursor="default",this.markers.push(d),this.setCurrentMarker(d),d instanceof Ee&&this.settings.newFreehandMarkerOnPointerUp?this.createNewMarker(Ee):this.toolbar.setSelectMode(),this.addUndoStep(),this.eventListeners.markercreate.forEach(function(P){return P(new it(g,g._currentMarker))})},N.prototype.colorChanged=function(d){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultColor=d,this.settings.defaultStrokeColor=d)},N.prototype.fillColorChanged=function(d){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultFillColor=d)},N.prototype.markerStateChanged=function(d){var g=this;this.eventListeners.markerchange.forEach(function(P){return P(new it(g,d))})},N.prototype.setCurrentMarker=function(d){var g=this;this._currentMarker!==d&&this._currentMarker!==void 0&&(this._currentMarker.deselect(),this.toolbar.setCurrentMarker(),this.toolbox.setPanelButtons([]),this._isResizing||this.eventListeners.markerdeselect.forEach(function(P){return P(new it(g,g._currentMarker))})),this._currentMarker=d,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(P){return P(new it(g,g._currentMarker))}))},N.prototype.onPointerDown=function(d){if(this._isFocused||this.focus(),this.touchPoints++,this.touchPoints===1||d.pointerType!=="touch")if(this._currentMarker===void 0||this._currentMarker.state!=="new"&&this._currentMarker.state!=="creating"){if(this.mode==="select"){var g=this.markers.find(function(P){return P.ownsTarget(d.target)});g!==void 0?(this.setCurrentMarker(g),this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(d.clientX,d.clientY),d.target)):(this.setCurrentMarker(),this.isDragging=!0,this.prevPanPoint={x:d.clientX,y:d.clientY})}}else this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(d.clientX,d.clientY))},N.prototype.onDblClick=function(d){if(this._isFocused||this.focus(),this.mode==="select"){var g=this.markers.find(function(P){return P.ownsTarget(d.target)});g!==void 0&&g!==this._currentMarker&&this.setCurrentMarker(g),this._currentMarker!==void 0?this._currentMarker.dblClick(this.clientToLocalCoordinates(d.clientX,d.clientY),d.target):this.setCurrentMarker()}},N.prototype.onPointerMove=function(d){this.touchPoints!==1&&d.pointerType==="touch"||(this._currentMarker!==void 0||this.isDragging)&&(this._currentMarker!==void 0&&this._currentMarker.state==="edit"||d.preventDefault(),this._currentMarker!==void 0?this._currentMarker.manipulate(this.clientToLocalCoordinates(d.clientX,d.clientY)):this.zoomLevel>1&&this.panTo({x:d.clientX,y:d.clientY}))},N.prototype.onPointerUp=function(d){this.touchPoints>0&&this.touchPoints--,this.touchPoints===0&&this.isDragging&&this._currentMarker!==void 0&&this._currentMarker.pointerUp(this.clientToLocalCoordinates(d.clientX,d.clientY)),this.isDragging=!1,this.addUndoStep()},N.prototype.onPointerOut=function(){this.touchPoints>0&&this.touchPoints--},N.prototype.onKeyUp=function(d){this._currentMarker===void 0||this.notesArea!==void 0||d.key!=="Delete"&&d.key!=="Backspace"||this.deleteSelectedMarker()},N.prototype.clientToLocalCoordinates=function(d,g){var P=this.markerImage.getBoundingClientRect();return{x:(d-P.left)/this.zoomLevel,y:(g-P.top)/this.zoomLevel}},N.prototype.onWindowResize=function(){this.positionUI()},N.prototype.positionUI=function(){switch(this.setTopLeft(),this.settings.displayMode){case"inline":var d=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=d+"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()},N.prototype.addLicenseKey=function(d){je.addKey(d)},N.prototype.addEventListener=function(d,g){this.eventListeners.addEventListener(d,g)},N.prototype.removeEventListener=function(d,g){this.eventListeners.removeEventListener(d,g)},N.prototype.renderState=function(d){this._silentRenderMode=!0,this.settings.displayMode="inline",this.isOpen||this.show(),this.restoreState(d),this.startRenderAndClose(),this._silentRenderMode=!1},Object.defineProperty(N.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),N.prototype.focus=function(){var d=this;this._isFocused||(this.attachWindowEvents(),this._isFocused=!0,this._previousCurrentMarker!==void 0&&this.setCurrentMarker(this._previousCurrentMarker),this.eventListeners.focus.forEach(function(g){return g(new xt(d))}))},N.prototype.blur=function(){var d=this;this._isFocused&&(this.detachWindowEvents(),this._isFocused=!1,this._previousCurrentMarker=this._currentMarker,this.setCurrentMarker(),this.eventListeners.blur.forEach(function(g){return g(new xt(d))}))},N.instanceCounter=0,N}();/* **********************************
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(N,d){return(It=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(g,P){g.__proto__=P}||function(g,P){for(var V in P)Object.prototype.hasOwnProperty.call(P,V)&&(g[V]=P[V])})(N,d)};function Xt(N,d){if(typeof d!="function"&&d!==null)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function g(){this.constructor=N}It(N,d),N.prototype=d===null?Object.create(d):(g.prototype=d.prototype,new g)}function Dt(N,d,g,P){return new(g||(g=Promise))(function(V,k){function pe(ot){try{Te(P.next(ot))}catch(Ke){k(Ke)}}function ke(ot){try{Te(P.throw(ot))}catch(Ke){k(Ke)}}function Te(ot){var Ke;ot.done?V(ot.value):(Ke=ot.value,Ke instanceof g?Ke:new g(function(ft){ft(Ke)})).then(pe,ke)}Te((P=P.apply(N,d||[])).next())})}function rr(N,d){var g,P,V,k,pe={label:0,sent:function(){if(1&V[0])throw V[1];return V[1]},trys:[],ops:[]};return k={next:ke(0),throw:ke(1),return:ke(2)},typeof Symbol=="function"&&(k[Symbol.iterator]=function(){return this}),k;function ke(Te){return function(ot){return function(Ke){if(g)throw new TypeError("Generator is already executing.");for(;pe;)try{if(g=1,P&&(V=2&Ke[0]?P.return:Ke[0]?P.throw||((V=P.return)&&V.call(P),0):P.next)&&!(V=V.call(P,Ke[1])).done)return V;switch(P=0,V&&(Ke=[2&Ke[0],V.value]),Ke[0]){case 0:case 1:V=Ke;break;case 4:return pe.label++,{value:Ke[1],done:!1};case 5:pe.label++,P=Ke[1],Ke=[0];continue;case 7:Ke=pe.ops.pop(),pe.trys.pop();continue;default:if(!(V=pe.trys,(V=V.length>0&&V[V.length-1])||Ke[0]!==6&&Ke[0]!==2)){pe=0;continue}if(Ke[0]===3&&(!V||Ke[1]>V[0]&&Ke[1]<V[3])){pe.label=Ke[1];break}if(Ke[0]===6&&pe.label<V[1]){pe.label=V[1],V=Ke;break}if(V&&pe.label<V[2]){pe.label=V[2],pe.ops.push(Ke);break}V[2]&&pe.ops.pop(),pe.trys.pop();continue}Ke=d.call(N,pe)}catch(ft){Ke=[6,ft],P=0}finally{g=V=0}if(5&Ke[0])throw Ke[1];return{value:Ke[0]?Ke[1]:void 0,done:!0}}([Te,ot])}}}var kt=function(){function N(){}return N.addKey=function(d){N.key=d},Object.defineProperty(N,"isLicensed",{get:function(){return!!N.key&&new RegExp(/^CRPR-[A-Z][0-9]{3}-[A-Z][0-9]{3}-[0-9]{4}$/,"i").test(N.key)},enumerable:!1,configurable:!0}),N}(),et=function(){function N(){}return N.createDefs=function(){return document.createElementNS("http://www.w3.org/2000/svg","defs")},N.setAttributes=function(d,g){for(var P=0,V=g;P<V.length;P++){var k=V[P],pe=k[0],ke=k[1];d.setAttribute(pe,ke)}},N.createRect=function(d,g,P){var V=document.createElementNS("http://www.w3.org/2000/svg","rect");return V.setAttribute("width",d.toString()),V.setAttribute("height",g.toString()),P&&N.setAttributes(V,P),V},N.createLine=function(d,g,P,V,k){var pe=document.createElementNS("http://www.w3.org/2000/svg","line");return pe.setAttribute("x1",d.toString()),pe.setAttribute("y1",g.toString()),pe.setAttribute("x2",P.toString()),pe.setAttribute("y2",V.toString()),k&&N.setAttributes(pe,k),pe},N.createPolygon=function(d,g){var P=document.createElementNS("http://www.w3.org/2000/svg","polygon");return P.setAttribute("points",d),g&&N.setAttributes(P,g),P},N.createCircle=function(d,g){var P=document.createElementNS("http://www.w3.org/2000/svg","circle");return P.setAttribute("cx",(d/2).toString()),P.setAttribute("cy",(d/2).toString()),P.setAttribute("r",d.toString()),g&&N.setAttributes(P,g),P},N.createEllipse=function(d,g,P){var V=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return V.setAttribute("cx",(d/2).toString()),V.setAttribute("cy",(g/2).toString()),V.setAttribute("rx",(d/2).toString()),V.setAttribute("ry",(g/2).toString()),P&&N.setAttributes(V,P),V},N.createGroup=function(d){var g=document.createElementNS("http://www.w3.org/2000/svg","g");return d&&N.setAttributes(g,d),g},N.createTransform=function(){return document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGTransform()},N.createMarker=function(d,g,P,V,k,pe,ke){var Te=document.createElementNS("http://www.w3.org/2000/svg","marker");return N.setAttributes(Te,[["id",d],["orient",g],["markerWidth",P.toString()],["markerHeight",V.toString()],["refX",k.toString()],["refY",pe.toString()]]),Te.appendChild(ke),Te},N.createText=function(d){var g=document.createElementNS("http://www.w3.org/2000/svg","text");return g.setAttribute("x","0"),g.setAttribute("y","0"),d&&N.setAttributes(g,d),g},N.createTSpan=function(d,g){var P=document.createElementNS("http://www.w3.org/2000/svg","tspan");return P.textContent=d,g&&N.setAttributes(P,g),P},N.createImage=function(d){var g=document.createElementNS("http://www.w3.org/2000/svg","image");return d&&N.setAttributes(g,d),g},N.createPoint=function(d,g){var P=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return P.x=d,P.y=g,P},N.createPath=function(d,g){var P=document.createElementNS("http://www.w3.org/2000/svg","path");return P.setAttribute("d",d),g&&N.setAttributes(P,g),P},N.createElement=function(d,g){var P=document.createElementNS("http://www.w3.org/2000/svg",d);return g&&N.setAttributes(P,g),P},N.getHollowRectanglePath=function(d,g,P,V,k,pe,ke,Te){return"M"+d+","+g+"V"+(g+V)+"H"+(d+P)+"V"+g+"H"+k+"V"+pe+"H"+(k+ke)+"V"+(pe+Te)+"H"+k+"V"+g+"Z"},N}(),Tt=function(){function N(d){this._classNamePrefixBase="__cropro_",this.classes=[],this.rules=[],this.settings=this.defaultSettings,this._classNamePrefix=this._classNamePrefixBase+"_"+d+"_"}return Object.defineProperty(N.prototype,"classNamePrefixBase",{get:function(){return this._classNamePrefixBase},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"classNamePrefix",{get:function(){return this._classNamePrefix},enumerable:!1,configurable:!0}),Object.defineProperty(N.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(N.prototype,"fadeInAnimationClassName",{get:function(){return this.classNamePrefix+"_fade_in"},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"fadeOutAnimationClassName",{get:function(){return this.classNamePrefix+"_fade_out"},enumerable:!1,configurable:!0}),N.prototype.addClass=function(d){return this.styleSheet===void 0&&this.addStyleSheet(),d.name=""+this.classNamePrefix+d.localName,this.classes.push(d),this.styleSheet.sheet.insertRule("."+d.name+" {"+d.style+"}",this.styleSheet.sheet.cssRules.length),d},N.prototype.addRule=function(d){this.styleSheet===void 0&&this.addStyleSheet(),this.rules.push(d),this.styleSheet.sheet.insertRule(d.selector+" {"+d.style+"}",this.styleSheet.sheet.cssRules.length)},N.prototype.addStyleSheet=function(){var d;this.styleSheet=document.createElement("style"),((d=this.styleSheetRoot)!==null&&d!==void 0?d:document.head).appendChild(this.styleSheet),this.addRule(new Ft("."+this.classNamePrefix+" h3","font-family: sans-serif")),this.addRule(new Ft("@keyframes "+this.classNamePrefix+"_fade_in_animation_frames",`
from {
opacity: 0;
}
to {
opacity: 1;
}
`)),this.addRule(new Ft("@keyframes "+this.classNamePrefix+"_fade_out_animation_frames",`
from {
opacity: 1;
}
to {
opacity: 0;
}
`)),this.addClass(new gt("_fade_in",`
animation-duration: 0.3s;
animation-name: `+this.classNamePrefix+`_fade_in_animation_frames;
`)),this.addClass(new gt("_fade_out",`
animation-duration: 0.3s;
animation-name: `+this.classNamePrefix+`_fade_out_animation_frames;
`))},N.prototype.removeStyleSheet=function(){var d;this.styleSheet&&(((d=this.styleSheetRoot)!==null&&d!==void 0?d:document.head).removeChild(this.styleSheet),this.styleSheet=void 0)},N}(),Ft=function(N,d){this.selector=N,this.style=d},gt=function(N,d){this.localName=N,this.style=d},Gt=function(){function N(){this.blocks=[],this.display=""}return N.prototype.addButtonBlock=function(d){d.className=this.blockClassName,d.buttonClassName=this.buttonClassName,d.buttonColorsClassName=this.buttonColorsClassName,d.buttonActiveColorsClassName=this.buttonActiveColorsClassName,this.blocks.push(d)},N.prototype.addElementBlock=function(d){d.className===void 0&&(d.className=this.blockClassName),this.blocks.push(d)},N.prototype.getUI=function(){var d=document.createElement("div");return d.className=this.className+" "+this.colorsClassName+" "+this.fadeInClassName,d.style.display=this.display,this.blocks.forEach(function(g){return d.appendChild(g.getUI())}),d},N}(),zr=function(){function N(){}return N.prototype.getUI=function(){var d=document.createElement("div");if(d.className=this.className,this.minWidth!==void 0&&(d.style.minWidth=this.minWidth),this.contentAlign!==void 0)switch(this.contentAlign){case"start":d.style.justifyContent="flex-start";break;case"center":d.style.justifyContent="center";break;case"end":d.style.justifyContent="flex-end"}return d.style.whiteSpace="nowrap",d},N}(),Zr=function(N){function d(){var g=N!==null&&N.apply(this,arguments)||this;return g.buttons=[],g}return Xt(d,N),d.prototype.addButton=function(g){g.className=this.buttonClassName,g.colorsClassName=this.buttonColorsClassName,g.activeColorsClassName=this.buttonActiveColorsClassName,this.buttons.push(g)},d.prototype.getUI=function(){var g=N.prototype.getUI.call(this);return this.buttons.forEach(function(P){return g.appendChild(P.getUI())}),g},d}(zr),Lr=function(){function N(d,g){this._isActive=!1,this._isHidden=!1,this._icon=d,this.title=g,this.uiContainer=document.createElement("div"),this.adjustClassName=this.adjustClassName.bind(this)}return Object.defineProperty(N.prototype,"icon",{get:function(){return this._icon},set:function(d){this._icon=d,this.buttonContainer.innerHTML=this._icon},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"isActive",{get:function(){return this._isActive},set:function(d){this._isActive=d,this.adjustClassName()},enumerable:!1,configurable:!0}),N.prototype.getUI=function(){var d=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 d.onClick()}),this.uiContainer.appendChild(this.buttonContainer),this.uiContainer.style.display=this._isHidden?"none":"inline-block",this.uiContainer},N.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,"")))},N.prototype.hide=function(){this._isHidden=!0},N}(),Pr=function(N){function d(){var g=N!==null&&N.apply(this,arguments)||this;return g.elements=[],g}return Xt(d,N),d.prototype.addElement=function(g){this.elements.push(g)},d.prototype.getUI=function(){var g=N.prototype.getUI.call(this);return this.elements.forEach(function(P){return g.appendChild(P)}),g},d}(zr),kr=function(){function N(d,g){this.horizontal=d,this.vertical=g}return Object.defineProperty(N.prototype,"ratio",{get:function(){return 1*this.horizontal/this.vertical},enumerable:!1,configurable:!0}),N.prototype.getVerticalLength=function(d){return d/this.ratio},N.prototype.getHorizontalLength=function(d){return d*this.ratio},N}(),vr=function(){function N(){}return N.getIcon=function(d,g){if(d>0&&g>0){var P=new kr(d,g),V=P.ratio>=1?20:P.getHorizontalLength(20),k=P.ratio<1?20:P.getVerticalLength(20),pe=document.createElementNS("http://www.w3.org/2000/svg","svg");pe.setAttribute("xmlns","http://www.w3.org/2000/svg"),pe.setAttribute("viewBox","0 0 24 24"),document.body.appendChild(pe);var ke=et.createDefs();pe.appendChild(ke);var Te=et.createElement("clipPath",[["id","text-bg-clip"]]);ke.appendChild(Te);var ot=et.createPath(et.getHollowRectanglePath((24-V)/2,(24-k)/2,V,k,(24-V)/2+2,(24-k)/2+2,V-4,k-4));pe.appendChild(ot);var Ke=et.createText([["x","0"],["y","0"],["font-size","7px"],["font-family","monospace"]]);Ke.appendChild(et.createTSpan(d+":"+g)),pe.appendChild(Ke);var ft=Ke.getBBox();et.setAttributes(Ke,[["x",((24-ft.width)/2).toString()],["y",((24-ft.height)/2-ft.y).toString()]]);var dt=et.createPath(et.getHollowRectanglePath(0,0,24,24,(24-Math.ceil(ft.width))/2,(24-Math.ceil(ft.height))/2,Math.ceil(ft.width),Math.ceil(ft.height)));return Te.appendChild(dt),et.setAttributes(ot,[["clip-path","url(#text-bg-clip)"]]),document.body.removeChild(pe),pe.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>'},N}(),Dr=function(N){function d(g,P,V){var k=N.call(this,g,P)||this;return k.isDropdownOpen=!1,k.onClick=k.dropdownButtonClicked,k.dropdownButtons=V,k}return Xt(d,N),d.prototype.setupDropdown=function(){var g=this;this.dropdownBlock=document.createElement("div"),this.dropdownBlock.className=this.dropdownClassName+" "+this.dropdownColorsClassName,this.dropdownBlock.style.display="none",this.dropdownButtons.forEach(function(P){P.className=g.className,P.colorsClassName=g.colorsClassName,g.dropdownBlock.appendChild(P.getUI())}),this.uiContainer.appendChild(this.dropdownBlock)},d.prototype.positionDropdown=function(){this.dropdownBlock.style.left=this.uiContainer.clientLeft+"px",this.dropdownBlock.style.top=this.uiContainer.clientTop+this.uiContainer.clientHeight+"px"},d.prototype.dropdownButtonClicked=function(){this.dropdownBlock===void 0&&this.setupDropdown(),this.isDropdownOpen=!this.isDropdownOpen,this.toggleDropdown()},d.prototype.toggleDropdown=function(){this.positionDropdown(),this.dropdownBlock.style.display=this.isDropdownOpen?"inline-block":"none"},d.prototype.showDropdown=function(){this.isDropdownOpen=!0,this.toggleDropdown()},d.prototype.hideDropdown=function(){this.isDropdownOpen=!1,this.toggleDropdown()},d}(Lr),qr=function(){function N(d,g){this.GRIP_SIZE=10,this.color=d,this.fillColor=g,this.visual=et.createGroup(),this.visual.appendChild(et.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(et.createCircle(this.GRIP_SIZE,[["fill",this.fillColor],["fill-opacity","0.9"],["stroke",this.color],["stroke-width","2"],["stroke-opacity","0.7"]]))}return N.prototype.ownsTarget=function(d){return d===this.visual||d===this.visual.childNodes[0]||d===this.visual.childNodes[1]},N.prototype.setCenter=function(d,g){this.visual.childNodes.forEach(function(P){return et.setAttributes(P,[["cx",d.toString()],["cy",g.toString()]])})},N}(),Sr=function(){function N(d,g,P,V){this.isMoving=!1,this._isGridVisible=!0,this.numberOfGridLines=2,this.horizontalGridLines=[],this.verticalGridLines=[],this._zoomFactor=1,this.cropRectChanged=!1,this.canvasWidth=d,this.canvasHeight=g,this.margin=P,this.container=V,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(N.prototype,"aspectRatio",{get:function(){return this._aspectRatio},set:function(d){this._aspectRatio=d,this.adjustCropRect(),this.setCropRectangle(this.cropRect)},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"isGridVisible",{get:function(){return this._isGridVisible},set:function(d){this._isGridVisible=d,this.gridContainer&&et.setAttributes(this.gridContainer,[["display",this._isGridVisible?"":"none"]])},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"zoomFactor",{get:function(){return this._zoomFactor},set:function(d){this._zoomFactor=d,this.setCropRectangle(this.cropRect)},enumerable:!1,configurable:!0}),N.prototype.open=function(){var d=this;this.cropShadeElement=et.createPath("M0,0Z",[["fill",this.cropShadeColor],["fill-opacity","0.8"]]),this.container.appendChild(this.cropShadeElement),this.gridContainer=et.createGroup([["display",this.isGridVisible?"":"none"]]),this.container.appendChild(this.gridContainer);for(var g=0;g<this.numberOfGridLines;g++)this.horizontalGridLines.push(et.createLine(0,0,0,0,[["stroke",this.cropFrameColor],["stroke-width","1"],["stroke-dasharray","3 1"],["opacity","0.7"]])),this.verticalGridLines.push(et.createLine(0,0,0,0,[["stroke",this.cropFrameColor],["stroke-width","1"],["stroke-dasharray","3 1"],["opacity","0.7"]]));this.horizontalGridLines.forEach(function(P){return d.gridContainer.appendChild(P)}),this.verticalGridLines.forEach(function(P){return d.gridContainer.appendChild(P)}),this.cropRectElement=et.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()},N.prototype.setCropRectangle=function(d){this.cropRect=d;var g=Object.assign({},this.cropRect);this.zoomFactor!==1&&(g.width=this.cropRect.width*this.zoomFactor,g.height=this.cropRect.height*this.zoomFactor,g.x=this.cropRect.height/this.cropRect.width<this.canvasHeight/this.canvasWidth?this.margin:this.margin+this.canvasWidth/2-g.width/2,g.y=this.cropRect.height/this.cropRect.width>this.canvasHeight/this.canvasWidth?this.margin:this.margin+this.canvasHeight/2-g.height/2),et.setAttributes(this.cropRectElement,[["x",g.x.toString()],["y",g.y.toString()],["width",g.width.toString()],["height",g.height.toString()]]);var P=g.height/(this.numberOfGridLines+1);this.horizontalGridLines.forEach(function(k,pe){var ke=g.y+P*(pe+1);et.setAttributes(k,[["x1",""+g.x],["y1",""+ke],["x2",""+(g.x+g.width)],["y2",""+ke]])});var V=g.width/(this.numberOfGridLines+1);this.verticalGridLines.forEach(function(k,pe){var ke=g.x+V*(pe+1);et.setAttributes(k,[["x1",""+ke],["y1",""+g.y],["x2",""+ke],["y2",""+(g.y+g.height)]])}),et.setAttributes(this.cropShadeElement,[["d",et.getHollowRectanglePath(0,0,this.canvasWidth+2*this.margin,this.canvasHeight+2*this.margin,g.x,g.y,g.width,g.height)]]),this.topLeftGrip.setCenter(g.x,g.y),this.topRightGrip.setCenter(g.x+g.width,g.y),this.bottomLeftGrip.setCenter(g.x,g.y+g.height),this.bottomRightGrip.setCenter(g.x+g.width,g.y+g.height),this.cropRectChanged&&this.onCropChange&&(this.cropRectChanged=!1,this.onCropChange(this.cropRect)),this.cropRectChanged=!1},N.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)},N.prototype.clientToLocalCoordinates=function(d,g){var P=this.container.getBoundingClientRect();return{x:d-P.left+this.margin,y:g-P.top+this.margin}},N.prototype.onPointerDown=function(d){this.container.setPointerCapture(d.pointerId),this.previousPoint=this.clientToLocalCoordinates(d.clientX,d.clientY),this.cropRectElement===d.target?this.isMoving=!0:this.topLeftGrip.ownsTarget(d.target)?this.activeGrip=this.topLeftGrip:this.bottomLeftGrip.ownsTarget(d.target)?this.activeGrip=this.bottomLeftGrip:this.topRightGrip.ownsTarget(d.target)?this.activeGrip=this.topRightGrip:this.bottomRightGrip.ownsTarget(d.target)&&(this.activeGrip=this.bottomRightGrip)},N.prototype.onPointerMove=function(d){if(this.isMoving)this.move(this.clientToLocalCoordinates(d.clientX,d.clientY));else if(this.activeGrip){var g=this.clientToLocalCoordinates(d.clientX,d.clientY);this.resize(g)}d.preventDefault()},N.prototype.onPointerUp=function(d){this.activeGrip=void 0,this.isMoving=!1,this.container.releasePointerCapture(d.pointerId)},N.prototype.move=function(d){var g=d.x-this.previousPoint.x,P=d.y-this.previousPoint.y;this.zoomFactor!==1&&(g=-g/this.zoomFactor,P=-P/this.zoomFactor),this.cropRect.x=Math.min(Math.max(this.margin,this.cropRect.x+g),this.canvasWidth-this.cropRect.width+this.margin),this.cropRect.y=Math.min(Math.max(this.margin,this.cropRect.y+P),this.canvasHeight-this.cropRect.height+this.margin),this.onCropChange?(this.cropRectChanged=!0,this.onCropChange(this.cropRect)):this.setCropRectangle(this.cropRect),this.previousPoint=d},N.prototype.resize=function(d){var g=Object.assign({},this.cropRect),P=d.x-this.previousPoint.x,V=d.y-this.previousPoint.y;switch(this.activeGrip){case this.bottomLeftGrip:case this.topLeftGrip:g.x+P<this.margin&&(P=this.margin-g.x),g.x+=P,g.width=this.cropRect.x+this.cropRect.width-g.x;break;case this.bottomRightGrip:case this.topRightGrip:g.width+P>this.canvasWidth*this.zoomFactor&&(P=this.canvasWidth*this.zoomFactor-g.width),g.width+=P}switch(this.activeGrip){case this.topLeftGrip:case this.topRightGrip:this.aspectRatio?(g.y=this.cropRect.y-(this.activeGrip===this.topLeftGrip?-1:1)*this.aspectRatio.getVerticalLength(P),g.height=this.aspectRatio.getVerticalLength(g.width)):(g.y+=V,g.height=this.cropRect.y+this.cropRect.height-g.y);break;case this.bottomLeftGrip:case this.bottomRightGrip:this.aspectRatio?g.height=this.aspectRatio.getVerticalLength(g.width):g.height+=V}g.width<10&&(g.x=this.cropRect.x,g.width=10),g.height<10&&(g.y=this.cropRect.y,g.height=10),this.previousPoint=d,g.x>=this.margin&&g.y>=this.margin&&g.x-this.margin+g.width<=this.canvasWidth&&g.y-this.margin+g.height<=this.canvasHeight&&(this.cropRect=g,this.onCropChange?(this.cropRectChanged=!0,this.onCropChange(this.cropRect)):this.setCropRectangle(this.cropRect))},N.prototype.adjustCropRect=function(){if(this.aspectRatio&&Math.round(this.cropRect.height)!==Math.round(this.aspectRatio.getVerticalLength(this.cropRect.width))){var d=this.cropRect.x+this.cropRect.width/2,g=this.cropRect.y+this.cropRect.height/2,P=this.aspectRatio.getHorizontalLength(this.cropRect.height),V=this.aspectRatio.getVerticalLength(this.cropRect.width);P/this.canvasWidth<V/this.canvasHeight?this.cropRect.width=P:this.cropRect.height=V,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=d-this.cropRect.width/2,this.cropRect.y=g-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)}},N.prototype.getRescaledRect=function(d,g,P,V,k,pe){var ke=P/d,Te=V/g;return{x:(k.x-pe)*ke+pe,y:(k.y-pe)*Te+pe,width:k.width*ke,height:k.height*Te}},N.prototype.scaleCanvas=function(d,g){var P=this.getRescaledRect(this.canvasWidth,this.canvasHeight,d,g,this.cropRect,this.margin);this.canvasWidth=d,this.canvasHeight=g,this.onCropChange&&this.onCropChange(P),this.setCropRectangle(P)},N}(),en=function(){function N(d){this._angle=0,this.isDragging=!1,this.width=401,this.height=24,this.title=d,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(N.prototype,"angle",{get:function(){return this._angle},set:function(d){this._angle=d,this.setAngleLabel(),this.positionScaleShape()},enumerable:!1,configurable:!0}),N.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},N.prototype.onPointerDown=function(d){this.controlContainer.setPointerCapture(d.pointerId),this.isDragging=!0,this.previousPoint={x:d.clientX,y:d.clientY}},N.prototype.onPointerMove=function(d){this.isDragging&&(this.onAngleChange&&this.onAngleChange((d.clientX-this.previousPoint.x)/5),this.previousPoint.x=d.clientX)},N.prototype.onPointerUp=function(d){this.isDragging&&this.onAngleChange&&this.onAngleChange((d.clientX-this.previousPoint.x)/5),this.isDragging=!1,this.controlContainer.releasePointerCapture(d.pointerId)},N.prototype.setAngleLabel=function(){if(this.angleLabelText){this.angleLabelText.innerHTML=""+Math.round(this._angle);var d=this.angleLabelText.getBBox();et.setAttributes(this.angleLabelElement,[["x",((this.width-d.width)/2).toString()],["y",(this.height/2).toString()]])}},N.prototype.positionScaleShape=function(){if(this.scaleShape){var d=this.scaleShape.transform.baseVal.getItem(0);d.setTranslate(this._angle%5*5-25,0),this.scaleShape.transform.baseVal.replaceItem(d,0)}},N.prototype.getVisual=function(){var d=document.createElementNS("http://www.w3.org/2000/svg","svg");d.setAttribute("xmlns","http://www.w3.org/2000/svg"),d.setAttribute("width",this.width+"px"),d.setAttribute("height",this.height+"px"),d.setAttribute("viewBox","0 0 "+this.width+" "+this.height),d.style.flexShrink="0",document.body.appendChild(d);for(var g="M0,"+(this.height-1)+" v"+-this.height/3+"h1v"+this.height/3,P=1;P<=this.width/5+10;P++){var V=P%5==0?this.height/3:this.height/6;g+="h4v"+-V+"h1v"+V}g+="v1H0Z",this.scaleShape=et.createPath(g);var k=et.createTransform();this.scaleShape.transform.baseVal.appendItem(k),d.appendChild(this.scaleShape),this.angleLabelElement=et.createText([["x","0"],["y","0"],["font-size","10px"],["font-family","monospace"]]),this.angleLabelText=et.createTSpan(""),this.angleLabelElement.appendChild(this.angleLabelText);var pe=et.createTSpan("");return pe.innerHTML="&deg;",this.angleLabelElement.appendChild(pe),d.appendChild(this.angleLabelElement),document.body.removeChild(d),d},N}(),Hr=function(){function N(){this.naturalSize=!1,this.imageType="image/png"}return N.prototype.rasterize=function(d,g,P,V,k,pe,ke){var Te=this;return new Promise(function(ot){var Ke=document.createElement("canvas");Ke.width=d.width.baseVal.value-2*V,Ke.height=d.height.baseVal.value-2*V;var ft=1,dt=1;Te.naturalSize===!0?(ft=g.naturalWidth/(d.width.baseVal.value-2*V)/pe,dt=g.naturalHeight/(d.height.baseVal.value-2*V)/ke,Ke.width=g.naturalWidth/pe,Ke.height=g.naturalHeight/ke):Te.width!==void 0&&Te.height!==void 0&&(ft=Te.width/P.width,dt=Te.height/P.height,Ke.width*=ft,Ke.height*=dt);var Et=Ke.getContext("2d");Et.translate(Ke.width/2,Ke.height/2),Et.rotate(k*Math.PI/180),Et.scale(pe,ke),Et.translate(-Ke.width/2,-Ke.height/2),Et.drawImage(g,0,0,Ke.width,Ke.height);var Rt=document.createElement("canvas");Rt.width=P.width*ft,Rt.height=P.height*dt,Rt.getContext("2d").putImageData(Et.getImageData((P.x-V)*ft,(P.y-V)*dt,P.width*ft,P.height*dt),0,0),ot(Rt.toDataURL(Te.imageType,Te.imageQuality))})},N}(),ne=function(){function N(d){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=N.instanceCounter++,this.styles=new Tt(this.instanceNo),this.target=d,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(N.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"zoomToCropEnabled",{get:function(){return this._zoomToCropEnabled},set:function(d){this._zoomToCropEnabled=d,d?this.zoomToCrop():this.unzoomFromCrop()},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"isGridVisible",{get:function(){return this._isGridVisible},set:function(d){this._isGridVisible=d,this.cropLayer&&(this.cropLayer.isGridVisible=this._isGridVisible)},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"gridLines",{get:function(){return this._gridLines},set:function(d){this._gridLines=d,this.cropLayer&&(this.cropLayer.numberOfGridLines=this._gridLines)},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"rotationAngle",{get:function(){return this._rotationAngle},set:function(d){this._rotationAngle=d,this.straightener&&(this.straightener.angle=this._rotationAngle)},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"paddedImageWidth",{get:function(){return this.imageWidth+2*this.CANVAS_MARGIN},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"paddedImageHeight",{get:function(){return this.imageHeight+2*this.CANVAS_MARGIN},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"aspectRatio",{get:function(){var d;return(d=this._aspectRatio)!==null&&d!==void 0?d:this.aspectRatios[0]},set:function(d){this._aspectRatio=d},enumerable:!1,configurable:!0}),N.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},N.prototype.show=function(){this.showUI(),this.open()},N.prototype.close=function(d){d===void 0&&(d=!1),this.isOpen&&(this.coverDiv&&this.closeUI(),this.targetObserver&&this.targetObserver.unobserve(this.target),this.displayMode==="popup"&&window.removeEventListener("resize",this.setWindowHeight),d||this.closeEventListeners.forEach(function(g){return g()}),this._isOpen=!1)},N.prototype.addRenderEventListener=function(d){this.renderEventListeners.push(d)},N.prototype.removeRenderEventListener=function(d){this.renderEventListeners.indexOf(d)>-1&&this.renderEventListeners.splice(this.renderEventListeners.indexOf(d),1)},N.prototype.addCloseEventListener=function(d){this.closeEventListeners.push(d)},N.prototype.removeCloseEventListener=function(d){this.closeEventListeners.indexOf(d)>-1&&this.closeEventListeners.splice(this.closeEventListeners.indexOf(d),1)},N.prototype.setupResizeObserver=function(){var d=this;this.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){d.resize(d.target.clientWidth,d.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))},N.prototype.onPopupResize=function(){if(this.contentDiv.clientWidth>0&&this.contentDiv.clientHeight>0){var d=1*this.target.clientWidth/this.target.clientHeight,g=this.contentDiv.clientWidth/d>this.contentDiv.clientHeight?(this.contentDiv.clientHeight-2*this.CANVAS_MARGIN)*d:this.contentDiv.clientWidth-2*this.CANVAS_MARGIN,P=g+2*this.CANVAS_MARGIN<this.contentDiv.clientWidth?this.contentDiv.clientHeight-2*this.CANVAS_MARGIN:(this.contentDiv.clientWidth-2*this.CANVAS_MARGIN)/d;this.resize(g,P)}},N.prototype.setWindowHeight=function(){this.windowHeight=window.innerHeight},N.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",et.setAttributes(this.editingTarget,[["width",""+this.imageWidth],["height",""+this.imageHeight]]),this.editingTarget.style.transformOrigin=this.imageWidth/2+"px "+this.imageHeight/2+"px"},N.prototype.resize=function(d,g){this.imageWidth=Math.round(d),this.imageHeight=Math.round(g),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()},N.prototype.setEditingTarget=function(){var d=document.createElement("canvas");d.width=this.target.naturalWidth,d.height=this.target.naturalHeight,d.getContext("2d").drawImage(this.target,0,0,this.target.naturalWidth,this.target.naturalHeight);var g=d.toDataURL();et.setAttributes(this.editingTarget,[["href",g]]),this.setEditingTargetSize()},N.prototype.setTopLeft=function(){var d=this.target.getBoundingClientRect(),g=this.editorCanvas.getBoundingClientRect();this.left=d.left-g.left-this.CANVAS_MARGIN,this.top=d.top-g.top-this.CANVAS_MARGIN},N.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=et.createDefs(),this.cropImage.appendChild(this.defs),this.editingTarget=et.createImage([["href",""]]),this.editingTarget.style.transformOrigin=this.imageWidth/2+"px "+this.imageHeight/2+"px",this.editingTargetRotationContainer=et.createGroup(),this.editingTargetRotationScaleContainer=et.createGroup(),this.editingTargetRotationScaleContainer.appendChild(this.editingTarget),this.editingTargetRotationContainer.appendChild(this.editingTargetRotationScaleContainer);var d=et.createTransform();this.editingTargetRotationContainer.transform.baseVal.appendItem(d);var g=et.createTransform();this.editingTargetRotationScaleContainer.transform.baseVal.appendItem(g),this.editingTargetContainer=et.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)},N.prototype.positionCropImage=function(){this.cropImageHolder.style.top=this.top+"px",this.cropImageHolder.style.left=this.left+"px"},N.prototype.initCropLayer=function(){this.cropRect={x:this.CANVAS_MARGIN,y:this.CANVAS_MARGIN,width:this.imageWidth,height:this.imageHeight},this.cropLayerContainer=et.createGroup(),this.cropImage.appendChild(this.cropLayerContainer),this.cropLayer=new Sr(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()},N.prototype.zoomToCrop=function(){if(this.cropRect){var d=this.cropRect.x-this.CANVAS_MARGIN+this.cropRect.width/2,g=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=d+"px "+g+"px",this.editingTargetContainer.style.transform="translate("+(this.imageWidth/2-d+this.CANVAS_MARGIN)+"px,"+(this.imageHeight/2-g+this.CANVAS_MARGIN)+"px) scale("+this.zoomFactor+")",this.cropLayer.zoomFactor=this.zoomFactor)}},N.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)},N.prototype.cropRectChanged=function(d){this.cropRect=d,this.zoomToCropEnabled?this.zoomToCrop():this.cropLayer.zoomFactor=1},N.prototype.attachEvents=function(){window.addEventListener("resize",this.onWindowResize)},N.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"},N.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},N.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 d=this.styles.settings.hideTopToolbar?0:this.toolbarHeight,g=this.target.offsetTop>d+this.CANVAS_MARGIN?this.target.offsetTop-(d+this.CANVAS_MARGIN):0;this.coverDiv.style.top=g+"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},N.prototype.addToolbars=function(){this.addTopToolbar(),this.addBottomToolbar()},N.prototype.addTopToolbar=function(){var d=this;this.topToolbar=new Gt,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 g=new Zr;g.minWidth=3*this.toolbarHeight+"px",this.topToolbar.addButtonBlock(g);var P=[];this.aspectRatios.forEach(function(dt){var Et=new Lr(vr.getIcon(dt.horizontal,dt.vertical),dt.horizontal===0&&dt.vertical===0?"FREE":dt.horizontal+":"+dt.vertical);Et.onClick=function(){return d.ratioButtonClicked(dt)},P.push(Et)}),this.aspectRatioButton=new Dr(vr.getIcon(0,0),"Aspect ratio",P),this.aspectRatioButton.dropdownClassName=this.toolbarDropdownStyleClass.name,this.aspectRatioButton.dropdownColorsClassName=this.styles.settings.toolbarDropdownStyleColorsClassName?this.styles.settings.toolbarDropdownStyleColorsClassName:this.toolbarDropdownStyleColorsClass.name,g.addButton(this.aspectRatioButton),this.aspectRatios.length<2&&this.aspectRatioButton.hide();var V=new Lr('<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");V.isActive=this.isGridVisible,V.onClick=function(){d.isGridVisible=!d.isGridVisible,V.isActive=d.isGridVisible},g.addButton(V);var k=new Lr('<svg viewBox="0 0 24 24"><path d="M15.5 14l5 5-1.5 1.5-5-5v-.79l-.27-.28A6.471 6.471 0 019.5 16 6.5 6.5 0 013 9.5 6.5 6.5 0 019.5 3 6.5 6.5 0 0116 9.5c0 1.61-.59 3.09-1.57 4.23l.28.27h.79m-6 0C12 14 14 12 14 9.5S12 5 9.5 5 5 7 5 9.5 7 14 9.5 14m2.5-4h-2v2H9v-2H7V9h2V7h1v2h2v1z"/></svg>',"Zoom to selection");if(k.isActive=this.zoomToCropEnabled,k.onClick=function(){d.zoomToCropEnabled=!d.zoomToCropEnabled,k.isActive=d.zoomToCropEnabled},g.addButton(k),!kt.isLicensed){var pe=new Pr;this.topToolbar.addElementBlock(pe);var ke=document.createElement("div");ke.className=this.topToolbar.buttonClassName+" "+this.topToolbar.buttonColorsClassName;var Te=document.createElement("a");Te.style.color="currentColor",Te.href="https://markerjs.com/products/cropro",Te.target="_blank",Te.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>',ke.appendChild(Te),pe.addElement(ke)}var ot=new Zr;ot.minWidth=3*this.toolbarHeight+"px",ot.contentAlign="end",this.topToolbar.addButtonBlock(ot);var Ke=new Lr('<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");Ke.onClick=this.startRenderAndClose,ot.addButton(Ke),this.styles.settings.toolbarOkButtonStyleColorsClassName&&(Ke.colorsClassName=this.styles.settings.toolbarOkButtonStyleColorsClassName);var ft=new Lr('<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");ft.onClick=this.close,ot.addButton(ft),this.styles.settings.toolbarCloseButtonStyleColorsClassName&&(ft.colorsClassName=this.styles.settings.toolbarCloseButtonStyleColorsClassName)},N.prototype.addBottomToolbar=function(){var d=this;this.bottomToolbar=new Gt,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 g=new Zr;g.minWidth=2*this.toolbarHeight+"px",this.bottomToolbar.addButtonBlock(g);var P=new Lr('<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");P.onClick=this.rotateLeftButtonClicked,g.addButton(P);var V=new Lr('<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");V.onClick=this.rotateRightButtonClicked,g.addButton(V);var k=new Pr;k.className=this.toolbarStraightenerBlockStyleClass.name,this.bottomToolbar.addElementBlock(k),this.straightener=new en("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){d.rotateBy(ot),d.straightener.angle=d.rotationAngle},k.addElement(this.straightener.getUI());var pe=new Zr;pe.minWidth=2*this.toolbarHeight+"px",pe.contentAlign="end",this.bottomToolbar.addButtonBlock(pe);var ke=new Lr('<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");ke.onClick=this.flipHorizontallyButtonClicked,pe.addButton(ke);var Te=new Lr('<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");Te.onClick=this.flipVerticallyButtonClicked,pe.addButton(Te)},N.prototype.ratioButtonClicked=function(d){this.aspectRatio=d,this.applyAspectRatio(),this.aspectRatioButton.hideDropdown()},N.prototype.applyAspectRatio=function(){this.setCropLayerAspectRatio(),this.aspectRatioButton.icon=vr.getIcon(this.aspectRatio.horizontal,this.aspectRatio.vertical)},N.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)},N.prototype.closeUI=function(){this.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},N.prototype.getState=function(){return{width:this.imageWidth,height:this.imageHeight,rotationAngle:this.rotationAngle,flippedHorizontally:this.flippedHorizontally,flippedVertically:this.flippedVertically,cropRect:Object.assign({},this.cropRect)}},N.prototype.restoreState=function(d){if(d){var g=this.cropLayer.getRescaledRect(d.width,d.height,this.imageWidth,this.imageHeight,d.cropRect,this.CANVAS_MARGIN);this.cropLayer.setCropRectangle(g),this.cropRectChanged(g),this.flippedHorizontally=d.flippedHorizontally,this.flippedVertically=d.flippedVertically,this.applyFlip(),this.rotationAngle=d.rotationAngle,this.applyRotation()}},N.prototype.clientToLocalCoordinates=function(d,g){var P=this.cropImage.getBoundingClientRect();return{x:d-P.left,y:g-P.top}},N.prototype.onWindowResize=function(){this.positionUI()},N.prototype.positionUI=function(){switch(this.setTopLeft(),this.displayMode){case"inline":var d=this.target.offsetTop>this.toolbarHeight?this.target.offsetTop-this.toolbarHeight:0;this.coverDiv.style.top=d+"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()},N.prototype.rotateLeftButtonClicked=function(){var d=this.rotationAngle-90;this.rotationAngle%90!=0&&(d+=this.rotationAngle>=0?90-this.rotationAngle%90:-this.rotationAngle%90),this.rotateTo(d)},N.prototype.rotateRightButtonClicked=function(){var d=this.rotationAngle+90;this.rotationAngle%90!=0&&(d-=this.rotationAngle>=0?this.rotationAngle%90:90+this.rotationAngle%90),this.rotateTo(d)},N.prototype.rotateTo=function(d){d=(d=d>180?d-360:d)<=-180?d+360:d,this.rotationAngle=d,this.applyRotation()},N.prototype.rotateBy=function(d){this.rotateTo((this.rotationAngle+d)%360)},N.prototype.applyRotation=function(){var d=this.zoomToCropEnabled;this.zoomToCropEnabled=!1,this.editingTargetRotationScaleContainer.style.transformOrigin=this.imageWidth/2+"px "+this.imageHeight/2+"px",this.editingTargetRotationScaleContainer.style.transform="scale(1)";var g=this.editingTargetRotationContainer.transform.baseVal.getItem(0);g.setRotate(this.rotationAngle,this.imageWidth/2,this.imageHeight/2),this.editingTargetRotationContainer.transform.baseVal.replaceItem(g,0);var P=this.editingTarget.getBoundingClientRect();this.scaleFactor=Math.min(this.imageWidth/P.width,this.imageHeight/P.height),this.editingTargetRotationScaleContainer.style.transform="scale("+this.scaleFactor+")",this.zoomToCropEnabled=d},N.prototype.flipHorizontallyButtonClicked=function(){this.flippedHorizontally=!this.flippedHorizontally,this.applyFlip()},N.prototype.flipVerticallyButtonClicked=function(){this.flippedVertically=!this.flippedVertically,this.applyFlip()},N.prototype.applyFlip=function(){this.editingTarget.style.transform="scale("+(this.flippedHorizontally?-1:1)+","+(this.flippedVertically?-1:1)+")"},N.prototype.startRenderAndClose=function(){return Dt(this,void 0,void 0,function(){var d,g;return rr(this,function(P){switch(P.label){case 0:return[4,this.render()];case 1:return d=P.sent(),g=this.getState(),this.renderEventListeners.forEach(function(V){return V(d,g)}),this.close(!0),[2]}})})},N.prototype.render=function(){return Dt(this,void 0,void 0,function(){var d;return rr(this,function(g){switch(g.label){case 0:return(d=new Hr).naturalSize=this.renderAtNaturalSize,d.imageType=this.renderImageType,d.imageQuality=this.renderImageQuality,d.width=this.renderWidth,d.height=this.renderHeight,this.unzoomFromCrop(),et.setAttributes(this.cropLayerContainer,[["display","none"]]),[4,d.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 g.sent(),[4,d.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,g.sent()]}})})},N.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new gt("toolbar",`
width: `+(this.displayMode==="inline"?"100%":"calc(100vw - "+2*this.popupMargin+"px)")+`;
flex-shrink: 0;
display: flex;
flex-direction: row;
justify-content: space-between;
height: `+this.toolbarHeight+`px;
box-sizing: content-box;
overflow: hidden;
line-height: 0px;
`)),this.toolbarStyleColorsClass=this.styles.addClass(new gt("toolbar_colors",`
background-color: `+this.styles.settings.toolbarBackgroundColor+`;
`)),this.toolbarBlockStyleClass=this.styles.addClass(new gt("toolbar-block",`
display: flex;
align-items: center;
box-sizing: content-box;
`));var d=this.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new gt("toolbar_button",`
display: inline-block;
width: `+(this.toolbarHeight-2*d)+`px;
height: `+(this.toolbarHeight-2*d)+`px;
padding: `+d+`px;
cursor: default;
user-select: none;
box-sizing: content-box;
`)),this.toolbarButtonStyleColorsClass=this.styles.addClass(new gt("toolbar_button_colors",`
color: `+this.styles.settings.toolbarColor+`;
fill: currentColor;
`)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new gt("toolbar_active_button",`
color: `+this.styles.settings.toolbarColor+`;
fill: currentColor;
background-color: `+this.styles.settings.toolbarBackgroundActiveColor+`
`)),this.styles.addRule(new Ft("."+this.toolbarButtonStyleClass.name+" svg",`
height: `+this.toolbarHeight/2+`px;
`)),this.styles.addRule(new Ft("."+this.toolbarButtonStyleColorsClass.name+":hover",`
background-color: `+this.styles.settings.toolbarBackgroundHoverColor+`
`)),this.toolbarDropdownStyleClass=this.styles.addClass(new gt("toolbar_dropdown",`
position: absolute;
max-width: `+4*this.toolbarHeight+`px;
z-index: 20;
white-space: normal;
box-sizing: content-box;
box-shadow: 3px 3px rgba(33, 33, 33, 0.1);
margin: `+(this.displayMode==="inline"?"0":this.popupMargin)+`px;
line-height: 0px;
`)),this.toolbarDropdownStyleColorsClass=this.styles.addClass(new gt("toolbar_dropdown_colors",`
background-color: `+this.styles.settings.toolbarBackgroundColor+`;
`)),this.toolbarStraightenerBlockStyleClass=this.styles.addClass(new gt("toolbar_straightener_block",`
display: flex;
overflow: hidden;
justify-content: center;
-webkit-mask-image: linear-gradient(90deg, rgba(0,0,0,0) 0%, rgba(0,0,0,1) 30%, rgba(0,0,0,1) 70%, rgba(0,0,0,0) 100%);
`)),this.toolbarStraightenerStyleClass=this.styles.addClass(new gt("toolbar_straightener",`
display: flex;
overflow: hidden;
justify-content: center;
height: `+(this.toolbarHeight-2*d)+`px;
padding: `+d+`px;
cursor: default;
user-select: none;
box-sizing: content-box;
`)),this.toolbarStraightenerStyleColorsClass=this.styles.addClass(new gt("toolbar_straightener_colors",`
color: `+this.styles.settings.toolbarColor+`;
fill: currentColor;
`))},N.instanceCounter=0,N}(),ie=Z("8hTe"),le=Z.n(ie),Be=/<pre[^>]*>/g;function Ge(N){var d=document.createElement("div");return d.innerHTML=N,d.childNodes.length===0?"":d.childNodes[0].nodeValue}var tt=Ze.a=function(N){var d=N.value,g=d===void 0?"":d,P=N.edit,V=P===void 0?!1:P,k=N.className,pe=N.showTextOnly,ke=N.showLines,Te=N.replaces,ot=N.zoomImg,Ke=N.hasMask,ft=N.style,dt=ft===void 0?{}:ft,Et=N.stylesPrev,Rt=Et===void 0?{}:Et,ir=String(g),Pt=Object(I.useRef)(),er=Object(I.useRef)(),Ot=Object(I.useState)(""),hr=Object(z.a)(Ot,2),Qt=hr[0],yr=hr[1],dr=Object(I.useState)("office"),wr=Object(z.a)(dr,2),Cr=wr[0],fr=wr[1],pr=function(){var Ut=new ne(er.current);Ut.displayMode="popup",Ut.addRenderEventListener(function(){var tr=Object(S.a)(U.a.mark(function Jt(Er){var ar;return U.a.wrap(function(Mt){for(;;)switch(Mt.prev=Mt.next){case 0:return Pt.current.style.display="none",Mt.next=3,Object(Le.a)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:"educoder.png",file:Er}});case 3:ar=Mt.sent,ar!=null&&ar.id&&Te(er.current.getAttribute("src").replace(te.a.API_SERVER,""),"/api/attachments/".concat(ar==null?void 0:ar.id,"?type=").concat(ar.content_type));case 5:case"end":return Mt.stop()}},Jt)}));return function(Jt){return tr.apply(this,arguments)}}()),Ut.show()},gr=function(){var Ut=new Wt(er.current);Ut.settings.displayMode="popup",Ut.addEventListener("render",function(){var tr=Object(S.a)(U.a.mark(function Jt(Er){var ar;return U.a.wrap(function(Mt){for(;;)switch(Mt.prev=Mt.next){case 0:if(Pt.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:Er.dataUrl}});case 4:ar=Mt.sent,ar!=null&&ar.id&&Te(er.current.getAttribute("src").replace(te.a.API_SERVER,""),"/api/attachments/".concat(ar==null?void 0:ar.id,"?type=").concat(ar.content_type));case 6:case"end":return Mt.stop()}},Jt)}));return function(Jt){return tr.apply(this,arguments)}}()),Ut.show(),window.markerArea=Ut},Tr=Object(I.useMemo)(function(){Pt.current&&(Pt.current.style.zIndex=-1);try{var Yt=/\(\s+\/api\/attachments\/|\(\/api\/attachments\/|\(\/attachments\/download\//g,Ut=/\"\/api\/attachments\/|\"\/attachments\/download\//g,tr=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g;ir=ir.replace(Yt,"("+te.a.API_SERVER+"/api/attachments/").replace(Ut,'"'+te.a.API_SERVER+"/api/attachments/").replace(tr,'"'+te.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(mn){}var Jt=j(ir),Er=y();if(ir.match(/\[TOC\]/)&&(Jt=Jt.replace("<p>[TOC]</p>",x()),B()),Jt=Jt.replace(/(__special_katext_id_\d+__)/g,function(mn,Mt){var Ht=Er[Mt],Lt=Ht.type,nr=Ht.expression;return Object(de.renderToString)(Ge(nr)||"",{displayMode:Lt==="block",throwOnError:!1,output:"html"})}),Jt=Jt.replace(/▁/g,"\u2581\u2581\u2581"),p(),pe){var ar=document.createElement("div");return ar.innerHTML=Jt,ar.innerText}return setTimeout(function(){return Rr()},500),Jt},[ir]),br=Object(I.useRef)();w.WebkitLineClamp=ke,ke&&(dt=Object(D.a)(Object(D.a)({},dt),w));function Ir(Yt){var Ut=Yt.target;if(Ut.tagName.toUpperCase()==="IMG"){if(ot){var tr=Ut.getAttribute("src");yr(tr),fr("image")}}else if(Ut.tagName.toUpperCase()==="A"){var Jt=Ut.getAttribute("href");if(Jt.indexOf("office")>-1)Yt.preventDefault(),yr(Jt),fr("office");else if(Jt.indexOf("application/pdf")>-1)Yt.preventDefault(),yr(Jt),fr("pdf");else if(Jt.indexOf("text/html")>-1)Yt.preventDefault(),yr(Jt),fr("html");else if(Jt.startsWith("#")){Yt.preventDefault();var Er=document.getElementById(Jt.replace("#",""));Er&&Er.scrollIntoView(!0)}}}var Rr=function(){var Ut,tr=(Ut=br.current)===null||Ut===void 0?void 0:Ut.querySelectorAll("video");tr==null||tr.forEach(function(Jt){if(Jt.oncontextmenu=function(){return!1},Jt.src.indexOf(".m3u8")>-1&&!Jt.canPlayType("application/vnd.apple.mpegurl")){if(Y.a.isSupported()){var Er=new Y.a;Er.loadSource(Jt.src),Er.attachMedia(Jt)}}})};Object(I.useEffect)(function(){if(br.current&&Tr&&(Tr.match(Be)&&window.PR.prettyPrint()),br.current)return br.current.addEventListener("click",Ir),function(){br.current.removeEventListener("click",Ir),p(),B()}},[Tr,br.current,Ir]);var or=function(Ut){if(!V)return;Ut.target.nodeName==="IMG"?(Pt.current.style.zIndex=1,Pt.current.style.display="flex",Pt.current.style.width=Ut.target.clientWidth+"px",Pt.current.style.height=Ut.target.clientHeight+"px",Pt.current.style.top=Ut.target.offsetTop+"px",Pt.current.style.left=Ut.target.offsetLeft+"px",er.current.src=Ut.target.getAttribute("src")):Pt.current.style.display="none"};return v.a.createElement("div",{style:{position:"relative"}},v.a.createElement("div",{ref:br,style:Object(D.a)({},dt),className:"".concat(k||""," markdown-body ").concat(le.a.mdBody),onMouseOver:or,dangerouslySetInnerHTML:{__html:Tr}}),v.a.createElement("div",{ref:Pt,className:le.a.button},v.a.createElement(X.a,null,v.a.createElement(G.a,{onClick:function(){return pr()}},"\u88C1\u526A"),v.a.createElement(G.a,{onClick:function(){return gr()}},"\u7F16\u8F91"))),v.a.createElement("img",{ref:er,src:"",alt:"sample",crossOrigin:"anonymous",style:{maxWidth:"90%",opacity:0,position:"absolute",zIndex:-1}}),v.a.createElement(fe.a,{close:!0,data:Qt,type:Qt!=null&&Qt.length?Cr:"",style:Object(D.a)({},Rt),onClose:function(){return yr("")}}))}},BU3w:function(mt,Ze,Z){"use strict";Z.d(Ze,"a",function(){return S});var ve=Z("MNnm"),X="rc-util-key";function O(z){if(z.attachTo)return z.attachTo;var F=document.querySelector("head");return F||document.body}function G(z){var F,U=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!Object(ve.a)())return null;var I=document.createElement("style");if((F=U.csp)===null||F===void 0?void 0:F.nonce){var v;I.nonce=(v=U.csp)===null||v===void 0?void 0:v.nonce}I.innerHTML=z;var b=O(U),u=b.firstChild;return U.prepend&&b.prepend?b.prepend(I):U.prepend&&u?b.insertBefore(I,u):b.appendChild(I),I}var D=new Map;function S(z,F){var U=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},I=O(U);if(!D.has(I)){var v=G("",U),b=v.parentNode;D.set(I,b),b.removeChild(v)}var u=Array.from(D.get(I).children).find(function(t){return t.tagName==="STYLE"&&t[X]===F});if(u){var a,n;if(((a=U.csp)===null||a===void 0?void 0:a.nonce)&&u.nonce!==((n=U.csp)===null||n===void 0?void 0:n.nonce)){var s;u.nonce=(s=U.csp)===null||s===void 0?void 0:s.nonce}return u.innerHTML!==z&&(u.innerHTML=z),u}var i=G(z,U);return i[X]=F,i}},DlQD:function(mt,Ze,Z){(function(ve,X){mt.exports=X()})(this,function(){"use strict";function ve(Ee,Ae){for(var he=0;he<Ae.length;he++){var q=Ae[he];q.enumerable=q.enumerable||!1,q.configurable=!0,"value"in q&&(q.writable=!0),Object.defineProperty(Ee,q.key,q)}}function X(Ee,Ae,he){return Ae&&ve(Ee.prototype,Ae),he&&ve(Ee,he),Ee}function O(Ee,Ae){if(!Ee)return;if(typeof Ee=="string")return G(Ee,Ae);var he=Object.prototype.toString.call(Ee).slice(8,-1);if(he==="Object"&&Ee.constructor&&(he=Ee.constructor.name),he==="Map"||he==="Set")return Array.from(Ee);if(he==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(he))return G(Ee,Ae)}function G(Ee,Ae){(Ae==null||Ae>Ee.length)&&(Ae=Ee.length);for(var he=0,q=new Array(Ae);he<Ae;he++)q[he]=Ee[he];return q}function D(Ee,Ae){var he;if(typeof Symbol=="undefined"||Ee[Symbol.iterator]==null){if(Array.isArray(Ee)||(he=O(Ee))||Ae&&Ee&&typeof Ee.length=="number"){he&&(Ee=he);var q=0;return function(){return q>=Ee.length?{done:!0}:{done:!1,value:Ee[q++]}}}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 he=Ee[Symbol.iterator](),he.next.bind(he)}function S(Ee,Ae){return Ae={exports:{}},Ee(Ae,Ae.exports),Ae.exports}var z=S(function(Ee){function Ae(){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 he(q){Ee.exports.defaults=q}Ee.exports={defaults:Ae(),getDefaults:Ae,changeDefaults:he}}),F=z.defaults,U=z.getDefaults,I=z.changeDefaults,v=/[&<>"']/,b=/[&<>"']/g,u=/[<>"']|&(?!#?\w+;)/,a=/[<>"']|&(?!#?\w+;)/g,n={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},s=function(Ae){return n[Ae]};function i(Ee,Ae){if(Ae){if(v.test(Ee))return Ee.replace(b,s)}else if(u.test(Ee))return Ee.replace(a,s);return Ee}var t=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function r(Ee){return Ee.replace(t,function(Ae,he){return he=he.toLowerCase(),he==="colon"?":":he.charAt(0)==="#"?he.charAt(1)==="x"?String.fromCharCode(parseInt(he.substring(2),16)):String.fromCharCode(+he.substring(1)):""})}var A=/(^|[^\[])\^/g;function B(Ee,Ae){Ee=Ee.source||Ee,Ae=Ae||"";var he={replace:function(ee,oe){return oe=oe.source||oe,oe=oe.replace(A,"$1"),Ee=Ee.replace(ee,oe),he},getRegex:function(){return new RegExp(Ee,Ae)}};return he}var w=/[^\w:]/g,_=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function x(Ee,Ae,he){if(Ee){var q;try{q=decodeURIComponent(r(he)).replace(w,"").toLowerCase()}catch(ee){return null}if(q.indexOf("javascript:")===0||q.indexOf("vbscript:")===0||q.indexOf("data:")===0)return null}Ae&&!_.test(he)&&(he=l(Ae,he));try{he=encodeURI(he).replace(/%25/g,"%")}catch(ee){return null}return he}var m={},c=/^[^:]+:\/*[^/]*$/,e=/^([^:]+:)[\s\S]*$/,o=/^([^:]+:\/*[^/]*)[\s\S]*$/;function l(Ee,Ae){m[" "+Ee]||(c.test(Ee)?m[" "+Ee]=Ee+"/":m[" "+Ee]=R(Ee,"/",!0)),Ee=m[" "+Ee];var he=Ee.indexOf(":")===-1;return Ae.substring(0,2)==="//"?he?Ae:Ee.replace(e,"$1")+Ae:Ae.charAt(0)==="/"?he?Ae:Ee.replace(o,"$1")+Ae:Ee+Ae}var y={exec:function(){}};function p(Ee){for(var Ae=1,he,q;Ae<arguments.length;Ae++){he=arguments[Ae];for(q in he)Object.prototype.hasOwnProperty.call(he,q)&&(Ee[q]=he[q])}return Ee}function f(Ee,Ae){var he=Ee.replace(/\|/g,function(oe,ce,Se){for(var Pe=!1,Je=ce;--Je>=0&&Se[Je]==="\\";)Pe=!Pe;return Pe?"|":" |"}),q=he.split(/ \|/),ee=0;if(q.length>Ae)q.splice(Ae);else for(;q.length<Ae;)q.push("");for(;ee<q.length;ee++)q[ee]=q[ee].trim().replace(/\\\|/g,"|");return q}function R(Ee,Ae,he){var q=Ee.length;if(q===0)return"";for(var ee=0;ee<q;){var oe=Ee.charAt(q-ee-1);if(oe===Ae&&!he)ee++;else if(oe!==Ae&&he)ee++;else break}return Ee.substr(0,q-ee)}function L(Ee,Ae){if(Ee.indexOf(Ae[1])===-1)return-1;for(var he=Ee.length,q=0,ee=0;ee<he;ee++)if(Ee[ee]==="\\")ee++;else if(Ee[ee]===Ae[0])q++;else if(Ee[ee]===Ae[1]&&(q--,q<0))return ee;return-1}function H(Ee){Ee&&Ee.sanitize&&!Ee.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 j={escape:i,unescape:r,edit:B,cleanUrl:x,resolveUrl:l,noopTest:y,merge:p,splitCells:f,rtrim:R,findClosingBracket:L,checkSanitizeDeprecation:H},J=z.defaults,M=j.rtrim,Y=j.splitCells,te=j.escape,de=j.findClosingBracket;function fe(Ee,Ae,he){var q=Ae.href,ee=Ae.title?te(Ae.title):null,oe=Ee[1].replace(/\\([\[\]])/g,"$1");return Ee[0].charAt(0)!=="!"?{type:"link",raw:he,href:q,title:ee,text:oe}:{type:"image",raw:he,href:q,title:ee,text:te(oe)}}function Le(Ee,Ae){var he=Ee.match(/^(\s+)(?:```)/);if(he===null)return Ae;var q=he[1];return Ae.split(`
`).map(function(ee){var oe=ee.match(/^\s+/);if(oe===null)return ee;var ce=oe[0];return ce.length>=q.length?ee.slice(q.length):ee}).join(`
`)}var xe=function(){function Ee(he){this.options=he||J}var Ae=Ee.prototype;return Ae.space=function(q){var ee=this.rules.block.newline.exec(q);if(ee)return ee[0].length>1?{type:"space",raw:ee[0]}:{raw:`
`}},Ae.code=function(q,ee){var oe=this.rules.block.code.exec(q);if(oe){var ce=ee[ee.length-1];if(ce&&ce.type==="paragraph")return{raw:oe[0],text:oe[0].trimRight()};var Se=oe[0].replace(/^ {4}/gm,"");return{type:"code",raw:oe[0],codeBlockStyle:"indented",text:this.options.pedantic?Se:M(Se,`
`)}}},Ae.fences=function(q){var ee=this.rules.block.fences.exec(q);if(ee){var oe=ee[0],ce=Le(oe,ee[3]||"");return{type:"code",raw:oe,lang:ee[2]?ee[2].trim():ee[2],text:ce}}},Ae.heading=function(q){var ee=this.rules.block.heading.exec(q);if(ee)return{type:"heading",raw:ee[0],depth:ee[1].length,text:ee[2]}},Ae.nptable=function(q){var ee=this.rules.block.nptable.exec(q);if(ee){var oe={type:"table",header:Y(ee[1].replace(/^ *| *\| *$/g,"")),align:ee[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:ee[3]?ee[3].replace(/\n$/,"").split(`
`):[],raw:ee[0]};if(oe.header.length===oe.align.length){var ce=oe.align.length,Se;for(Se=0;Se<ce;Se++)/^ *-+: *$/.test(oe.align[Se])?oe.align[Se]="right":/^ *:-+: *$/.test(oe.align[Se])?oe.align[Se]="center":/^ *:-+ *$/.test(oe.align[Se])?oe.align[Se]="left":oe.align[Se]=null;for(ce=oe.cells.length,Se=0;Se<ce;Se++)oe.cells[Se]=Y(oe.cells[Se],oe.header.length);return oe}}},Ae.hr=function(q){var ee=this.rules.block.hr.exec(q);if(ee)return{type:"hr",raw:ee[0]}},Ae.blockquote=function(q){var ee=this.rules.block.blockquote.exec(q);if(ee){var oe=ee[0].replace(/^ *> ?/gm,"");return{type:"blockquote",raw:ee[0],text:oe}}},Ae.list=function(q){var ee=this.rules.block.list.exec(q);if(ee){for(var oe=ee[0],ce=ee[2],Se=ce.length>1,Pe=ce[ce.length-1]===")",Je={type:"list",raw:oe,ordered:Se,start:Se?+ce.slice(0,-1):"",loose:!1,items:[]},lt=ee[0].match(this.rules.block.item),ht=!1,At,xt,St,it,jt,Wt,It,Xt=lt.length,Dt=0;Dt<Xt;Dt++)At=lt[Dt],oe=At,xt=At.length,At=At.replace(/^ *([*+-]|\d+[.)]) */,""),~At.indexOf(`
`)&&(xt-=At.length,At=this.options.pedantic?At.replace(/^ {1,4}/gm,""):At.replace(new RegExp("^ {1,"+xt+"}","gm"),"")),Dt!==Xt-1&&(St=this.rules.block.bullet.exec(lt[Dt+1])[0],(Se?St.length===1||!Pe&&St[St.length-1]===")":St.length>1||this.options.smartLists&&St!==ce)&&(it=lt.slice(Dt+1).join(`
`),Je.raw=Je.raw.substring(0,Je.raw.length-it.length),Dt=Xt-1)),jt=ht||/\n\n(?!\s*$)/.test(At),Dt!==Xt-1&&(ht=At.charAt(At.length-1)===`
`,jt||(jt=ht)),jt&&(Je.loose=!0),Wt=/^\[[ xX]\] /.test(At),It=void 0,Wt&&(It=At[1]!==" ",At=At.replace(/^\[[ xX]\] +/,"")),Je.items.push({type:"list_item",raw:oe,task:Wt,checked:It,loose:jt,text:At});return Je}},Ae.html=function(q){var ee=this.rules.block.html.exec(q);if(ee)return{type:this.options.sanitize?"paragraph":"html",raw:ee[0],pre:!this.options.sanitizer&&(ee[1]==="pre"||ee[1]==="script"||ee[1]==="style"),text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(ee[0]):te(ee[0]):ee[0]}},Ae.def=function(q){var ee=this.rules.block.def.exec(q);if(ee){ee[3]&&(ee[3]=ee[3].substring(1,ee[3].length-1));var oe=ee[1].toLowerCase().replace(/\s+/g," ");return{tag:oe,raw:ee[0],href:ee[2],title:ee[3]}}},Ae.table=function(q){var ee=this.rules.block.table.exec(q);if(ee){var oe={type:"table",header:Y(ee[1].replace(/^ *| *\| *$/g,"")),align:ee[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:ee[3]?ee[3].replace(/\n$/,"").split(`
`):[]};if(oe.header.length===oe.align.length){oe.raw=ee[0];var ce=oe.align.length,Se;for(Se=0;Se<ce;Se++)/^ *-+: *$/.test(oe.align[Se])?oe.align[Se]="right":/^ *:-+: *$/.test(oe.align[Se])?oe.align[Se]="center":/^ *:-+ *$/.test(oe.align[Se])?oe.align[Se]="left":oe.align[Se]=null;for(ce=oe.cells.length,Se=0;Se<ce;Se++)oe.cells[Se]=Y(oe.cells[Se].replace(/^ *\| *| *\| *$/g,""),oe.header.length);return oe}}},Ae.lheading=function(q){var ee=this.rules.block.lheading.exec(q);if(ee)return{type:"heading",raw:ee[0],depth:ee[2].charAt(0)==="="?1:2,text:ee[1]}},Ae.paragraph=function(q){var ee=this.rules.block.paragraph.exec(q);if(ee)return{type:"paragraph",raw:ee[0],text:ee[1].charAt(ee[1].length-1)===`
`?ee[1].slice(0,-1):ee[1]}},Ae.text=function(q,ee){var oe=this.rules.block.text.exec(q);if(oe){var ce=ee[ee.length-1];return ce&&ce.type==="text"?{raw:oe[0],text:oe[0]}:{type:"text",raw:oe[0],text:oe[0]}}},Ae.escape=function(q){var ee=this.rules.inline.escape.exec(q);if(ee)return{type:"escape",raw:ee[0],text:te(ee[1])}},Ae.tag=function(q,ee,oe){var ce=this.rules.inline.tag.exec(q);if(ce)return!ee&&/^<a /i.test(ce[0])?ee=!0:ee&&/^<\/a>/i.test(ce[0])&&(ee=!1),!oe&&/^<(pre|code|kbd|script)(\s|>)/i.test(ce[0])?oe=!0:oe&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(ce[0])&&(oe=!1),{type:this.options.sanitize?"text":"html",raw:ce[0],inLink:ee,inRawBlock:oe,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(ce[0]):te(ce[0]):ce[0]}},Ae.link=function(q){var ee=this.rules.inline.link.exec(q);if(ee){var oe=de(ee[2],"()");if(oe>-1){var ce=ee[0].indexOf("!")===0?5:4,Se=ce+ee[1].length+oe;ee[2]=ee[2].substring(0,oe),ee[0]=ee[0].substring(0,Se).trim(),ee[3]=""}var Pe=ee[2],Je="";if(this.options.pedantic){var lt=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(Pe);lt?(Pe=lt[1],Je=lt[3]):Je=""}else Je=ee[3]?ee[3].slice(1,-1):"";Pe=Pe.trim().replace(/^<([\s\S]*)>$/,"$1");var ht=fe(ee,{href:Pe&&Pe.replace(this.rules.inline._escapes,"$1"),title:Je&&Je.replace(this.rules.inline._escapes,"$1")},ee[0]);return ht}},Ae.reflink=function(q,ee){var oe;if((oe=this.rules.inline.reflink.exec(q))||(oe=this.rules.inline.nolink.exec(q))){var ce=(oe[2]||oe[1]).replace(/\s+/g," ");if(ce=ee[ce.toLowerCase()],!ce||!ce.href){var Se=oe[0].charAt(0);return{type:"text",raw:Se,text:Se}}var Pe=fe(oe,ce,oe[0]);return Pe}},Ae.strong=function(q,ee,oe){oe===void 0&&(oe="");var ce=this.rules.inline.strong.start.exec(q);if(ce&&(!ce[1]||ce[1]&&(oe===""||this.rules.inline.punctuation.exec(oe)))){ee=ee.slice(-1*q.length);var Se=ce[0]==="**"?this.rules.inline.strong.endAst:this.rules.inline.strong.endUnd;Se.lastIndex=0;for(var Pe;(ce=Se.exec(ee))!=null;)if(Pe=this.rules.inline.strong.middle.exec(ee.slice(0,ce.index+3)),Pe)return{type:"strong",raw:q.slice(0,Pe[0].length),text:q.slice(2,Pe[0].length-2)}}},Ae.em=function(q,ee,oe){oe===void 0&&(oe="");var ce=this.rules.inline.em.start.exec(q);if(ce&&(!ce[1]||ce[1]&&(oe===""||this.rules.inline.punctuation.exec(oe)))){ee=ee.slice(-1*q.length);var Se=ce[0]==="*"?this.rules.inline.em.endAst:this.rules.inline.em.endUnd;Se.lastIndex=0;for(var Pe;(ce=Se.exec(ee))!=null;)if(Pe=this.rules.inline.em.middle.exec(ee.slice(0,ce.index+2)),Pe)return{type:"em",raw:q.slice(0,Pe[0].length),text:q.slice(1,Pe[0].length-1)}}},Ae.codespan=function(q){var ee=this.rules.inline.code.exec(q);if(ee){var oe=ee[2].replace(/\n/g," "),ce=/[^ ]/.test(oe),Se=oe.startsWith(" ")&&oe.endsWith(" ");return ce&&Se&&(oe=oe.substring(1,oe.length-1)),oe=te(oe,!0),{type:"codespan",raw:ee[0],text:oe}}},Ae.br=function(q){var ee=this.rules.inline.br.exec(q);if(ee)return{type:"br",raw:ee[0]}},Ae.del=function(q){var ee=this.rules.inline.del.exec(q);if(ee)return{type:"del",raw:ee[0],text:ee[1]}},Ae.autolink=function(q,ee){var oe=this.rules.inline.autolink.exec(q);if(oe){var ce,Se;return oe[2]==="@"?(ce=te(this.options.mangle?ee(oe[1]):oe[1]),Se="mailto:"+ce):(ce=te(oe[1]),Se=ce),{type:"link",raw:oe[0],text:ce,href:Se,tokens:[{type:"text",raw:ce,text:ce}]}}},Ae.url=function(q,ee){var oe;if(oe=this.rules.inline.url.exec(q)){var ce,Se;if(oe[2]==="@")ce=te(this.options.mangle?ee(oe[0]):oe[0]),Se="mailto:"+ce;else{var Pe;do Pe=oe[0],oe[0]=this.rules.inline._backpedal.exec(oe[0])[0];while(Pe!==oe[0]);ce=te(oe[0]),oe[1]==="www."?Se="http://"+ce:Se=ce}return{type:"link",raw:oe[0],text:ce,href:Se,tokens:[{type:"text",raw:ce,text:ce}]}}},Ae.inlineText=function(q,ee,oe){var ce=this.rules.inline.text.exec(q);if(ce){var Se;return ee?Se=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(ce[0]):te(ce[0]):ce[0]:Se=te(this.options.smartypants?oe(ce[0]):ce[0]),{type:"text",raw:ce[0],text:Se}}},Ee}(),Ie=j.noopTest,Fe=j.edit,Ue=j.merge,be={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:Ie,table:Ie,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html)[^\n]+)*)/,text:/^[^\n]+/};be._label=/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,be._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,be.def=Fe(be.def).replace("label",be._label).replace("title",be._title).getRegex(),be.bullet=/(?:[*+-]|\d{1,9}[.)])/,be.item=/^( *)(bull) ?[^\n]*(?:\n(?!\1bull ?)[^\n]*)*/,be.item=Fe(be.item,"gm").replace(/bull/g,be.bullet).getRegex(),be.list=Fe(be.list).replace(/bull/g,be.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+be.def.source+")").getRegex(),be._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",be._comment=/<!--(?!-?>)[\s\S]*?-->/,be.html=Fe(be.html,"i").replace("comment",be._comment).replace("tag",be._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),be.paragraph=Fe(be._paragraph).replace("hr",be.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",be._tag).getRegex(),be.blockquote=Fe(be.blockquote).replace("paragraph",be.paragraph).getRegex(),be.normal=Ue({},be),be.gfm=Ue({},be.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*|$)"}),be.gfm.nptable=Fe(be.gfm.nptable).replace("hr",be.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",be._tag).getRegex(),be.gfm.table=Fe(be.gfm.table).replace("hr",be.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",be._tag).getRegex(),be.pedantic=Ue({},be.normal,{html:Fe(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",be._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:Ie,paragraph:Fe(be.normal._paragraph).replace("hr",be.hr).replace("heading",` *#{1,6} *[^
]`).replace("lheading",be.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var ue={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:Ie,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:Ie,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\<!\[`*]|\b_|$)|[^ ](?= {2,}\n))|(?= {2,}\n))/,punctuation:/^([\s*punctuation])/};ue._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~",ue.punctuation=Fe(ue.punctuation).replace(/punctuation/g,ue._punctuation).getRegex(),ue._blockSkip="\\[[^\\]]*?\\]\\([^\\)]*?\\)|`[^`]*?`|<[^>]*?>",ue._overlapSkip="__[^_]*?__|\\*\\*\\[^\\*\\]*?\\*\\*",ue.em.start=Fe(ue.em.start).replace(/punctuation/g,ue._punctuation).getRegex(),ue.em.middle=Fe(ue.em.middle).replace(/punctuation/g,ue._punctuation).replace(/overlapSkip/g,ue._overlapSkip).getRegex(),ue.em.endAst=Fe(ue.em.endAst,"g").replace(/punctuation/g,ue._punctuation).getRegex(),ue.em.endUnd=Fe(ue.em.endUnd,"g").replace(/punctuation/g,ue._punctuation).getRegex(),ue.strong.start=Fe(ue.strong.start).replace(/punctuation/g,ue._punctuation).getRegex(),ue.strong.middle=Fe(ue.strong.middle).replace(/punctuation/g,ue._punctuation).replace(/blockSkip/g,ue._blockSkip).getRegex(),ue.strong.endAst=Fe(ue.strong.endAst,"g").replace(/punctuation/g,ue._punctuation).getRegex(),ue.strong.endUnd=Fe(ue.strong.endUnd,"g").replace(/punctuation/g,ue._punctuation).getRegex(),ue.blockSkip=Fe(ue._blockSkip,"g").getRegex(),ue.overlapSkip=Fe(ue._overlapSkip,"g").getRegex(),ue._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,ue._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,ue._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])?)+(?![-_])/,ue.autolink=Fe(ue.autolink).replace("scheme",ue._scheme).replace("email",ue._email).getRegex(),ue._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,ue.tag=Fe(ue.tag).replace("comment",be._comment).replace("attribute",ue._attribute).getRegex(),ue._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,ue._href=/<(?:\\[<>]?|[^\s<>\\])*>|[^\s\x00-\x1f]*/,ue._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,ue.link=Fe(ue.link).replace("label",ue._label).replace("href",ue._href).replace("title",ue._title).getRegex(),ue.reflink=Fe(ue.reflink).replace("label",ue._label).getRegex(),ue.reflinkSearch=Fe(ue.reflinkSearch,"g").replace("reflink",ue.reflink).replace("nolink",ue.nolink).getRegex(),ue.normal=Ue({},ue),ue.pedantic=Ue({},ue.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:Fe(/^!?\[(label)\]\((.*?)\)/).replace("label",ue._label).getRegex(),reflink:Fe(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",ue._label).getRegex()}),ue.gfm=Ue({},ue.normal,{escape:Fe(ue.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.!#$%&'*+\/=?_`{\|}~-]+@))/}),ue.gfm.url=Fe(ue.gfm.url,"i").replace("email",ue.gfm._extended_email).getRegex(),ue.breaks=Ue({},ue.gfm,{br:Fe(ue.br).replace("{2,}","*").getRegex(),text:Fe(ue.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()});var je={block:be,inline:ue},st=z.defaults,nt=je.block,rt=je.inline;function He(Ee){return Ee.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(Ee){var Ae="",he,q,ee=Ee.length;for(he=0;he<ee;he++)q=Ee.charCodeAt(he),Math.random()>.5&&(q="x"+q.toString(16)),Ae+="&#"+q+";";return Ae}var K=function(){function Ee(he){this.tokens=[],this.tokens.links=Object.create(null),this.options=he||st,this.options.tokenizer=this.options.tokenizer||new xe,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;var q={block:nt.normal,inline:rt.normal};this.options.pedantic?(q.block=nt.pedantic,q.inline=rt.pedantic):this.options.gfm&&(q.block=nt.gfm,this.options.breaks?q.inline=rt.breaks:q.inline=rt.gfm),this.tokenizer.rules=q}Ee.lex=function(q,ee){var oe=new Ee(ee);return oe.lex(q)};var Ae=Ee.prototype;return Ae.lex=function(q){return q=q.replace(/\r\n|\r/g,`
`).replace(/\t/g," "),this.blockTokens(q,this.tokens,!0),this.inline(this.tokens),this.tokens},Ae.blockTokens=function(q,ee,oe){ee===void 0&&(ee=[]),oe===void 0&&(oe=!0),q=q.replace(/^ +$/gm,"");for(var ce,Se,Pe,Je;q;){if(ce=this.tokenizer.space(q)){q=q.substring(ce.raw.length),ce.type&&ee.push(ce);continue}if(ce=this.tokenizer.code(q,ee)){q=q.substring(ce.raw.length),ce.type?ee.push(ce):(Je=ee[ee.length-1],Je.raw+=`
`+ce.raw,Je.text+=`
`+ce.text);continue}if(ce=this.tokenizer.fences(q)){q=q.substring(ce.raw.length),ee.push(ce);continue}if(ce=this.tokenizer.heading(q)){q=q.substring(ce.raw.length),ee.push(ce);continue}if(ce=this.tokenizer.nptable(q)){q=q.substring(ce.raw.length),ee.push(ce);continue}if(ce=this.tokenizer.hr(q)){q=q.substring(ce.raw.length),ee.push(ce);continue}if(ce=this.tokenizer.blockquote(q)){q=q.substring(ce.raw.length),ce.tokens=this.blockTokens(ce.text,[],oe),ee.push(ce);continue}if(ce=this.tokenizer.list(q)){for(q=q.substring(ce.raw.length),Pe=ce.items.length,Se=0;Se<Pe;Se++)ce.items[Se].tokens=this.blockTokens(ce.items[Se].text,[],!1);ee.push(ce);continue}if(ce=this.tokenizer.html(q)){q=q.substring(ce.raw.length),ee.push(ce);continue}if(oe&&(ce=this.tokenizer.def(q))){q=q.substring(ce.raw.length),this.tokens.links[ce.tag]||(this.tokens.links[ce.tag]={href:ce.href,title:ce.title});continue}if(ce=this.tokenizer.table(q)){q=q.substring(ce.raw.length),ee.push(ce);continue}if(ce=this.tokenizer.lheading(q)){q=q.substring(ce.raw.length),ee.push(ce);continue}if(oe&&(ce=this.tokenizer.paragraph(q))){q=q.substring(ce.raw.length),ee.push(ce);continue}if(ce=this.tokenizer.text(q,ee)){q=q.substring(ce.raw.length),ce.type?ee.push(ce):(Je=ee[ee.length-1],Je.raw+=`
`+ce.raw,Je.text+=`
`+ce.text);continue}if(q){var lt="Infinite loop on byte: "+q.charCodeAt(0);if(this.options.silent){console.error(lt);break}else throw new Error(lt)}}return ee},Ae.inline=function(q){var ee,oe,ce,Se,Pe,Je,lt=q.length;for(ee=0;ee<lt;ee++){Je=q[ee];switch(Je.type){case"paragraph":case"text":case"heading":{Je.tokens=[],this.inlineTokens(Je.text,Je.tokens);break}case"table":{for(Je.tokens={header:[],cells:[]},Se=Je.header.length,oe=0;oe<Se;oe++)Je.tokens.header[oe]=[],this.inlineTokens(Je.header[oe],Je.tokens.header[oe]);for(Se=Je.cells.length,oe=0;oe<Se;oe++)for(Pe=Je.cells[oe],Je.tokens.cells[oe]=[],ce=0;ce<Pe.length;ce++)Je.tokens.cells[oe][ce]=[],this.inlineTokens(Pe[ce],Je.tokens.cells[oe][ce]);break}case"blockquote":{this.inline(Je.tokens);break}case"list":{for(Se=Je.items.length,oe=0;oe<Se;oe++)this.inline(Je.items[oe].tokens);break}}}return q},Ae.inlineTokens=function(q,ee,oe,ce,Se){ee===void 0&&(ee=[]),oe===void 0&&(oe=!1),ce===void 0&&(ce=!1),Se===void 0&&(Se="");var Pe,Je=q,lt;if(this.tokens.links){var ht=Object.keys(this.tokens.links);if(ht.length>0)for(;(lt=this.tokenizer.rules.inline.reflinkSearch.exec(Je))!=null;)ht.includes(lt[0].slice(lt[0].lastIndexOf("[")+1,-1))&&(Je=Je.slice(0,lt.index)+"["+"a".repeat(lt[0].length-2)+"]"+Je.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(lt=this.tokenizer.rules.inline.blockSkip.exec(Je))!=null;)Je=Je.slice(0,lt.index)+"["+"a".repeat(lt[0].length-2)+"]"+Je.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;q;){if(Pe=this.tokenizer.escape(q)){q=q.substring(Pe.raw.length),ee.push(Pe);continue}if(Pe=this.tokenizer.tag(q,oe,ce)){q=q.substring(Pe.raw.length),oe=Pe.inLink,ce=Pe.inRawBlock,ee.push(Pe);continue}if(Pe=this.tokenizer.link(q)){q=q.substring(Pe.raw.length),Pe.type==="link"&&(Pe.tokens=this.inlineTokens(Pe.text,[],!0,ce)),ee.push(Pe);continue}if(Pe=this.tokenizer.reflink(q,this.tokens.links)){q=q.substring(Pe.raw.length),Pe.type==="link"&&(Pe.tokens=this.inlineTokens(Pe.text,[],!0,ce)),ee.push(Pe);continue}if(Pe=this.tokenizer.strong(q,Je,Se)){q=q.substring(Pe.raw.length),Pe.tokens=this.inlineTokens(Pe.text,[],oe,ce),ee.push(Pe);continue}if(Pe=this.tokenizer.em(q,Je,Se)){q=q.substring(Pe.raw.length),Pe.tokens=this.inlineTokens(Pe.text,[],oe,ce),ee.push(Pe);continue}if(Pe=this.tokenizer.codespan(q)){q=q.substring(Pe.raw.length),ee.push(Pe);continue}if(Pe=this.tokenizer.br(q)){q=q.substring(Pe.raw.length),ee.push(Pe);continue}if(Pe=this.tokenizer.del(q)){q=q.substring(Pe.raw.length),Pe.tokens=this.inlineTokens(Pe.text,[],oe,ce),ee.push(Pe);continue}if(Pe=this.tokenizer.autolink(q,re)){q=q.substring(Pe.raw.length),ee.push(Pe);continue}if(!oe&&(Pe=this.tokenizer.url(q,re))){q=q.substring(Pe.raw.length),ee.push(Pe);continue}if(Pe=this.tokenizer.inlineText(q,ce,He)){q=q.substring(Pe.raw.length),Se=Pe.raw.slice(-1),ee.push(Pe);continue}if(q){var At="Infinite loop on byte: "+q.charCodeAt(0);if(this.options.silent){console.error(At);break}else throw new Error(At)}}return ee},X(Ee,null,[{key:"rules",get:function(){return{block:nt,inline:rt}}}]),Ee}(),W=z.defaults,se=j.cleanUrl,ye=j.escape,we=function(){function Ee(he){this.options=he||W}var Ae=Ee.prototype;return Ae.code=function(q,ee,oe){var ce=(ee||"").match(/\S*/)[0];if(this.options.highlight){var Se=this.options.highlight(q,ce);Se!=null&&Se!==q&&(oe=!0,q=Se)}return ce?'<pre><code class="'+this.options.langPrefix+ye(ce,!0)+'">'+(oe?q:ye(q,!0))+`</code></pre>
`:"<pre><code>"+(oe?q:ye(q,!0))+`</code></pre>
`},Ae.blockquote=function(q){return`<blockquote>
`+q+`</blockquote>
`},Ae.html=function(q){return q},Ae.heading=function(q,ee,oe,ce){return this.options.headerIds?"<h"+ee+' id="'+this.options.headerPrefix+ce.slug(oe)+'">'+q+"</h"+ee+`>
`:"<h"+ee+">"+q+"</h"+ee+`>
`},Ae.hr=function(){return this.options.xhtml?`<hr/>
`:`<hr>
`},Ae.list=function(q,ee,oe){var ce=ee?"ol":"ul",Se=ee&&oe!==1?' start="'+oe+'"':"";return"<"+ce+Se+`>
`+q+"</"+ce+`>
`},Ae.listitem=function(q){return"<li>"+q+`</li>
`},Ae.checkbox=function(q){return"<input "+(q?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "},Ae.paragraph=function(q){return"<p>"+q+`</p>
`},Ae.table=function(q,ee){return ee&&(ee="<tbody>"+ee+"</tbody>"),`<table>
<thead>
`+q+`</thead>
`+ee+`</table>
`},Ae.tablerow=function(q){return`<tr>
`+q+`</tr>
`},Ae.tablecell=function(q,ee){var oe=ee.header?"th":"td",ce=ee.align?"<"+oe+' align="'+ee.align+'">':"<"+oe+">";return ce+q+"</"+oe+`>
`},Ae.strong=function(q){return"<strong>"+q+"</strong>"},Ae.em=function(q){return"<em>"+q+"</em>"},Ae.codespan=function(q){return"<code>"+q+"</code>"},Ae.br=function(){return this.options.xhtml?"<br/>":"<br>"},Ae.del=function(q){return"<del>"+q+"</del>"},Ae.link=function(q,ee,oe){if(q=se(this.options.sanitize,this.options.baseUrl,q),q===null)return oe;var ce='<a href="'+ye(q)+'"';return ee&&(ce+=' title="'+ee+'"'),ce+=">"+oe+"</a>",ce},Ae.image=function(q,ee,oe){if(q=se(this.options.sanitize,this.options.baseUrl,q),q===null)return oe;var ce='<img src="'+q+'" alt="'+oe+'"';return ee&&(ce+=' title="'+ee+'"'),ce+=this.options.xhtml?"/>":">",ce},Ae.text=function(q){return q},Ee}(),_e=function(){function Ee(){}var Ae=Ee.prototype;return Ae.strong=function(q){return q},Ae.em=function(q){return q},Ae.codespan=function(q){return q},Ae.del=function(q){return q},Ae.html=function(q){return q},Ae.text=function(q){return q},Ae.link=function(q,ee,oe){return""+oe},Ae.image=function(q,ee,oe){return""+oe},Ae.br=function(){return""},Ee}(),$e=function(){function Ee(){this.seen={}}var Ae=Ee.prototype;return Ae.slug=function(q){var ee=q.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-");if(this.seen.hasOwnProperty(ee)){var oe=ee;do this.seen[oe]++,ee=oe+"-"+this.seen[oe];while(this.seen.hasOwnProperty(ee))}return this.seen[ee]=0,ee},Ee}(),qe=z.defaults,Ve=j.unescape,Xe=function(){function Ee(he){this.options=he||qe,this.options.renderer=this.options.renderer||new we,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new _e,this.slugger=new $e}Ee.parse=function(q,ee){var oe=new Ee(ee);return oe.parse(q)};var Ae=Ee.prototype;return Ae.parse=function(q,ee){ee===void 0&&(ee=!0);var oe="",ce,Se,Pe,Je,lt,ht,At,xt,St,it,jt,Wt,It,Xt,Dt,rr,kt,et,Tt=q.length;for(ce=0;ce<Tt;ce++){it=q[ce];switch(it.type){case"space":continue;case"hr":{oe+=this.renderer.hr();continue}case"heading":{oe+=this.renderer.heading(this.parseInline(it.tokens),it.depth,Ve(this.parseInline(it.tokens,this.textRenderer)),this.slugger);continue}case"code":{oe+=this.renderer.code(it.text,it.lang,it.escaped);continue}case"table":{for(xt="",At="",Je=it.header.length,Se=0;Se<Je;Se++)At+=this.renderer.tablecell(this.parseInline(it.tokens.header[Se]),{header:!0,align:it.align[Se]});for(xt+=this.renderer.tablerow(At),St="",Je=it.cells.length,Se=0;Se<Je;Se++){for(ht=it.tokens.cells[Se],At="",lt=ht.length,Pe=0;Pe<lt;Pe++)At+=this.renderer.tablecell(this.parseInline(ht[Pe]),{header:!1,align:it.align[Pe]});St+=this.renderer.tablerow(At)}oe+=this.renderer.table(xt,St);continue}case"blockquote":{St=this.parse(it.tokens),oe+=this.renderer.blockquote(St);continue}case"list":{for(jt=it.ordered,Wt=it.start,It=it.loose,Je=it.items.length,St="",Se=0;Se<Je;Se++)Dt=it.items[Se],rr=Dt.checked,kt=Dt.task,Xt="",Dt.task&&(et=this.renderer.checkbox(rr),It?Dt.tokens.length>0&&Dt.tokens[0].type==="text"?(Dt.tokens[0].text=et+" "+Dt.tokens[0].text,Dt.tokens[0].tokens&&Dt.tokens[0].tokens.length>0&&Dt.tokens[0].tokens[0].type==="text"&&(Dt.tokens[0].tokens[0].text=et+" "+Dt.tokens[0].tokens[0].text)):Dt.tokens.unshift({type:"text",text:et}):Xt+=et),Xt+=this.parse(Dt.tokens,It),St+=this.renderer.listitem(Xt,kt,rr);oe+=this.renderer.list(St,jt,Wt);continue}case"html":{oe+=this.renderer.html(it.text);continue}case"paragraph":{oe+=this.renderer.paragraph(this.parseInline(it.tokens));continue}case"text":{for(St=it.tokens?this.parseInline(it.tokens):it.text;ce+1<Tt&&q[ce+1].type==="text";)it=q[++ce],St+=`
`+(it.tokens?this.parseInline(it.tokens):it.text);oe+=ee?this.renderer.paragraph(St):St;continue}default:{var Ft='Token with "'+it.type+'" type was not found.';if(this.options.silent){console.error(Ft);return}else throw new Error(Ft)}}}return oe},Ae.parseInline=function(q,ee){ee=ee||this.renderer;var oe="",ce,Se,Pe=q.length;for(ce=0;ce<Pe;ce++){Se=q[ce];switch(Se.type){case"escape":{oe+=ee.text(Se.text);break}case"html":{oe+=ee.html(Se.text);break}case"link":{oe+=ee.link(Se.href,Se.title,this.parseInline(Se.tokens,ee));break}case"image":{oe+=ee.image(Se.href,Se.title,Se.text);break}case"strong":{oe+=ee.strong(this.parseInline(Se.tokens,ee));break}case"em":{oe+=ee.em(this.parseInline(Se.tokens,ee));break}case"codespan":{oe+=ee.codespan(Se.text);break}case"br":{oe+=ee.br();break}case"del":{oe+=ee.del(this.parseInline(Se.tokens,ee));break}case"text":{oe+=ee.text(Se.text);break}default:{var Je='Token with "'+Se.type+'" type was not found.';if(this.options.silent){console.error(Je);return}else throw new Error(Je)}}}return oe},Ee}(),at=j.merge,ct=j.checkSanitizeDeprecation,Ce=j.escape,De=z.getDefaults,Qe=z.changeDefaults,We=z.defaults;function Re(Ee,Ae,he){if(typeof Ee=="undefined"||Ee===null)throw new Error("marked(): input parameter is undefined or null");if(typeof Ee!="string")throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(Ee)+", string expected");if(typeof Ae=="function"&&(he=Ae,Ae=null),Ae=at({},Re.defaults,Ae||{}),ct(Ae),he){var q=Ae.highlight,ee;try{ee=K.lex(Ee,Ae)}catch(Pe){return he(Pe)}var oe=function(Je){var lt;if(!Je)try{lt=Xe.parse(ee,Ae)}catch(ht){Je=ht}return Ae.highlight=q,Je?he(Je):he(null,lt)};if(!q||q.length<3)return oe();if(delete Ae.highlight,!ee.length)return oe();var ce=0;Re.walkTokens(ee,function(Pe){Pe.type==="code"&&(ce++,setTimeout(function(){q(Pe.text,Pe.lang,function(Je,lt){if(Je)return oe(Je);lt!=null&&lt!==Pe.text&&(Pe.text=lt,Pe.escaped=!0),ce--,ce===0&&oe()})},0))}),ce===0&&oe();return}try{var Se=K.lex(Ee,Ae);return Ae.walkTokens&&Re.walkTokens(Se,Ae.walkTokens),Xe.parse(Se,Ae)}catch(Pe){if(Pe.message+=`
Please report this to https://github.com/markedjs/marked.`,Ae.silent)return"<p>An error occurred:</p><pre>"+Ce(Pe.message+"",!0)+"</pre>";throw Pe}}Re.options=Re.setOptions=function(Ee){return at(Re.defaults,Ee),Qe(Re.defaults),Re},Re.getDefaults=De,Re.defaults=We,Re.use=function(Ee){var Ae=at({},Ee);if(Ee.renderer&&function(){var q=Re.defaults.renderer||new we,ee=function(Se){var Pe=q[Se];q[Se]=function(){for(var Je=arguments.length,lt=new Array(Je),ht=0;ht<Je;ht++)lt[ht]=arguments[ht];var At=Ee.renderer[Se].apply(q,lt);return At===!1&&(At=Pe.apply(q,lt)),At}};for(var oe in Ee.renderer)ee(oe);Ae.renderer=q}(),Ee.tokenizer&&function(){var q=Re.defaults.tokenizer||new xe,ee=function(Se){var Pe=q[Se];q[Se]=function(){for(var Je=arguments.length,lt=new Array(Je),ht=0;ht<Je;ht++)lt[ht]=arguments[ht];var At=Ee.tokenizer[Se].apply(q,lt);return At===!1&&(At=Pe.apply(q,lt)),At}};for(var oe in Ee.tokenizer)ee(oe);Ae.tokenizer=q}(),Ee.walkTokens){var he=Re.defaults.walkTokens;Ae.walkTokens=function(q){Ee.walkTokens(q),he&&he(q)}}Re.setOptions(Ae)},Re.walkTokens=function(Ee,Ae){for(var he=D(Ee),q;!(q=he()).done;){var ee=q.value;Ae(ee);switch(ee.type){case"table":{for(var oe=D(ee.tokens.header),ce;!(ce=oe()).done;){var Se=ce.value;Re.walkTokens(Se,Ae)}for(var Pe=D(ee.tokens.cells),Je;!(Je=Pe()).done;)for(var lt=Je.value,ht=D(lt),At;!(At=ht()).done;){var xt=At.value;Re.walkTokens(xt,Ae)}break}case"list":{Re.walkTokens(ee.items,Ae);break}default:ee.tokens&&Re.walkTokens(ee.tokens,Ae)}}},Re.Parser=Xe,Re.parser=Xe.parse,Re.Renderer=we,Re.TextRenderer=_e,Re.Lexer=K,Re.lexer=K.lex,Re.Tokenizer=xe,Re.Slugger=$e,Re.parse=Re;var Me=Re;return Me})},F0VM:function(mt,Ze,Z){mt.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(mt,Ze,Z){"use strict";Z.r(Ze);var ve=Z("cWXX"),X=Z("/ezw"),O=Z("g9YV"),G=Z("wCAj"),D=Z("miYZ"),S=Z("tsqr"),z=Z("/zsF"),F=Z("PArb"),U=Z("+L6B"),I=Z("2/Rp"),v=Z("14J3"),b=Z("BMrR"),u=Z("jCWc"),a=Z("kPKH"),n=Z("sPJy"),s=Z("bE4q"),i=Z("2qtc"),t=Z("kLXV"),r=Z("9og8"),A=Z("Pv/L"),B=Z("k1fw"),w=Z("tJVT"),_=Z("PpiC"),x=Z("WmNS"),m=Z.n(x),c=Z("q1tI"),e=Z.n(c),o=Z("xOOu"),l=Z.n(o),y=Z("Ty5D"),p=Z("9kvl"),f=Z("55Ip"),R=Z("jhfD"),L=Z("CTES"),H=Z("RCxd"),j=Z("/MfK"),J=Z("m3rI"),M=Z("xKgJ"),Y=Z("1vsH"),te=Z("GeSD"),de=Z.n(te),fe=Z("deN7"),Le=Z("ErOA"),xe=Z("J66h"),Ie=function(_e){var $e=_e.shixunHomeworks,qe=_e.autoHeight,Ve=_e.dispatch,Xe=$e.shixunWorkReport,at=Xe.stage_list,ct=Xe.work_id,Ce=Object(y.i)(),De=Object(M.c)(),Qe=[{title:"\u8BC4\u6D4B\u6B21\u6570",dataIndex:"query_index",width:120},{title:"\u8BE6\u7EC6\u7ED3\u679C",dataIndex:"result",render:function(Ee,Ae,he){return xe.Base64.decode(Ee)||"- -"}}];function We(Me,Ee){return Object(Le.c)("student_works/".concat(ct,"/rep_passed_content.json"),{path:Ee,game_id:Me})}var Re=Object(Y.p)(5,Xe.hack);return e.a.createElement(e.a.Fragment,null,Re==null?void 0:Re.map(function(Me,Ee){return e.a.createElement("div",{key:Ee},Me.map(function(Ae,he){var q;return e.a.createElement("aside",{className:"pl30 pr30",key:he},e.a.createElement("div",{className:"".concat(de.a.shixunTitle," mt10")},e.a.createElement("div",{style:{display:"flex",width:"100%"}},e.a.createElement("span",{className:"fa fa-code "}),e.a.createElement("strong",{style:{flex:1},className:"c-black"},"\u7B2C",Ee*5+he+1,"\u9898 ",Ae.name),Ae.is_finish&&e.a.createElement(f.a,{style:{marginLeft:20},onClick:function(oe){oe.preventDefault(),window.open(Ae==null?void 0:Ae.url),localStorage.setItem("program_homework",[Ce.coursesId,Ce.categoryId])},to:"".concat(Ae==null?void 0:Ae.url)},"\u67E5\u770B\u7B54\u9898\u8BE6\u60C5>>"))),e.a.createElement("div",{className:"font16 mt10"},Ae.is_finish===!1&&"\u672C\u5173\u6682\u672A\u901A\u8FC7\uFF0C\u65E0\u901A\u5173\u4EE3\u7801",Ae.is_finish&&e.a.createElement("aside",{className:de.a.shixunWrp},e.a.createElement(fe.a,{v:Ae,shixunWorkReport:Xe,dispatch:Ve,autoHeight:qe,languages:Ae.languages,language:Ae.language,game_id:Ae.id,data:xe.Base64.decode(Ae.code),diff_code_count:Ae.diff_code_count,onPathChange:We}))),e.a.createElement("aside",{className:"mt10 font16"},(q=Ae.history)!==null&&q!==void 0&&q.length?e.a.createElement(G.a,{columns:Qe,pagination:{hideOnSinglePage:!0},dataSource:Ae.history}):"\u672C\u5173\u65E0\u8BC4\u6D4B\u8BB0\u5F55"))}))}))},Fe=Object(p.a)(function(we){var _e=we.shixunHomeworks,$e=we.loading,qe=we.globalSetting;return{shixunHomeworks:_e,globalSetting:qe,loading:$e.effects}})(Ie),Ue=Z("5NDa"),be=Z("5rEg"),ue=Z("y8nQ"),je=Z("Vl3Y"),st=function(_e){var $e,qe,Ve,Xe=_e.shixunHomeworks,at=_e.dispatch,ct=Object(_.a)(_e,["shixunHomeworks","dispatch"]),Ce=Object(y.i)(),De=Object(c.useState)(!1),Qe=Object(w.a)(De,2),We=Qe[0],Re=Qe[1],Me=je.a.useForm(),Ee=Object(w.a)(Me,1),Ae=Ee[0];Object(c.useEffect)(function(){if(Xe.actionTabs.key==="\u66F4\u6539\u70B9\u8BC4")if(Xe.actionTabs.selectArrs.type==="1")Ae.setFieldsValue({comment:Xe.actionTabs.selectArrs.v.comment,hidden_comment:Xe.actionTabs.selectArrs.v.hidden_comment});else{var q,ee,oe,ce,Se,Pe;Ae.setFieldsValue({comment:(q=Xe.actionTabs.selectArrs)===null||q===void 0||((ee=q.data)===null||ee===void 0||((oe=ee.data)===null||oe===void 0))?void 0:oe.work_comment,hidden_comment:(ce=Xe.actionTabs.selectArrs)===null||ce===void 0||((Se=ce.data)===null||Se===void 0||((Pe=Se.data)===null||Pe===void 0))?void 0:Pe.work_comment_hidden})}},[Xe.actionTabs.key]);var he=function(){var q=Object(r.a)(m.a.mark(function ee(){var oe,ce,Se,Pe,Je,lt,ht;return m.a.wrap(function(xt){for(;;)switch(xt.prev=xt.next){case 0:return Je=Ae.getFieldValue(),lt=Xe.actionTabs.selectArrs.type==="1"?"/api/problems/".concat(Xe.actionTabs.selectArrs.v.identifier,"/hack_comment.json"):"/api/student_works/".concat(Ce.homeworkId,"/shixun_work_comment.json"),xt.next=4,Object(Le.a)(lt,{method:"post",body:{hidden_comment:Je.hidden_comment,comment:Je.comment,language:(oe=Xe.actionTabs.selectArrs)===null||oe===void 0?void 0:oe.language,user_id:(ce=Xe.actionTabs.selectArrs)===null||ce===void 0||((Se=ce.data)===null||Se===void 0||((Pe=Se.data)===null||Pe===void 0))?void 0:Pe.user_id}});case 4:ht=xt.sent,ht.status===0&&(S.b.success("\u8BC4\u9605\u6210\u529F"),Ae.resetFields(),at({type:"shixunHomeworks/setActionTabs",payload:{}}),at({type:"shixunHomeworks/getShixunWorkReports",payload:Object(B.a)({},Ce)}));case 6:case"end":return xt.stop()}},ee)}));return function(){return q.apply(this,arguments)}}();return e.a.createElement(e.a.Fragment,null,e.a.createElement(t.a,{centered:!0,title:e.a.createElement("span",null,(($e=Xe.actionTabs.selectArrs)===null||$e===void 0?void 0:$e.type)==="1"?"\u70B9\u8BC4\u4EE3\u7801":"\u66F4\u6539\u70B9\u8BC4",((qe=Xe.actionTabs.selectArrs)===null||qe===void 0?void 0:qe.language)&&e.a.createElement("span",{style:{marginLeft:10,fontSize:14}},"\u4F7F\u7528\u8BED\u8A00\uFF1A",(Ve=Xe.actionTabs.selectArrs)===null||Ve===void 0?void 0:Ve.language)),visible:Xe.actionTabs.key==="\u66F4\u6539\u70B9\u8BC4",okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",onOk:Object(r.a)(m.a.mark(function q(){var ee;return m.a.wrap(function(ce){for(;;)switch(ce.prev=ce.next){case 0:ee=Ae.getFieldValue(),JSON.stringify(ee)==="{}"||ee.hidden_comment===""&&ee.comment===""?Re(!0):he();case 2:case"end":return ce.stop()}},q)})),onCancel:function(){at({type:"shixunHomeworks/setActionTabs",payload:{}})}},e.a.createElement(je.a,{form:Ae,onChange:function(){We&&Re(!1)}},e.a.createElement("p",null,"\u5B66\u751F\u548C\u8BFE\u5802\u8001\u5E08\u53EF\u89C1"),e.a.createElement(je.a.Item,{name:"comment"},e.a.createElement(be.a.TextArea,{placeholder:"\u8BF7\u8F93\u5165\u8BC4\u9605\u5185\u5BB9",rows:8})),e.a.createElement("p",null,"\u4EC5\u8BFE\u5802\u8001\u5E08\u53EF\u89C1"),e.a.createElement(je.a.Item,{name:"hidden_comment"},e.a.createElement(be.a.TextArea,{placeholder:"\u8BF7\u8F93\u5165\u8BC4\u9605\u5185\u5BB9",rows:8}))),We&&e.a.createElement("p",{className:"c-red"},"\u8BC4\u9605\u5185\u5BB9\u81F3\u5C11\u6709\u4E00\u4E2A\u4E0D\u4E3A\u7A7A")))},nt=Object(p.a)(function(we){var _e=we.shixunHomeworks;return{shixunHomeworks:_e}})(st),rt=Z("T7RX"),He=Z("9Bee"),re=Z("XYT7"),K=Z("1n7x"),W=Z.n(K),se=function(_e){var $e,qe,Ve,Xe,at,ct,Ce,De,Qe,We,Re,Me,Ee,Ae,he,q,ee,oe,ce,Se,Pe,Je,lt,ht,At,xt,St,it,jt,Wt,It,Xt=_e.shixunHomeworks,Dt=_e.globalSetting,rr=_e.loading,kt=_e.dispatch,et=Object(_.a)(_e,["shixunHomeworks","globalSetting","loading","dispatch"]),Tt=Object(c.useState)(Object(B.a)({},Object(y.i)())),Ft=Object(w.a)(Tt,2),gt=Ft[0],Gt=Ft[1],zr=Object(y.i)(),Zr=Object(c.useState)([]),Lr=Object(A.a)(Zr),Pr=Object(c.useState)({last:!1}),kr=Object(w.a)(Pr,2),vr=kr[0],Dr=kr[1],qr=Object(c.useState)({last:!1}),Sr=Object(w.a)(qr,2),en=Sr[0],Hr=Sr[1],ne=Object(c.useRef)(),ie=Object(c.useRef)(),le=Object(c.useState)(!1),Be=Object(w.a)(le,2),Ge=Be[0],tt=Be[1],N=Object(c.useState)(!1),d=Object(w.a)(N,2),g=d[0],P=d[1],V=Object(c.useState)(!1),k=Object(w.a)(V,2),pe=k[0],ke=k[1],Te=Xt.shixunWorkReport,ot=Object(M.c)(),Ke=Object(c.useState)(new l.a),ft=Object(w.a)(Ke,2),dt=ft[0],Et=ft[1],Rt=Object(c.useState)(0),ir=Object(w.a)(Rt,2),Pt=ir[0],er=ir[1],Ot=Object(c.useState)([]),hr=Object(w.a)(Ot,2),Qt=hr[0],yr=hr[1],dr=Object(c.useState)(!1),wr=Object(w.a)(dr,2),Cr=wr[0],fr=wr[1],pr=Object(c.useState)(!1),gr=Object(w.a)(pr,2),Tr=gr[0],br=gr[1];Object(c.useEffect)(function(){return kt({type:"globalSetting/footerToggle",payload:!1}),function(){kt({type:"globalSetting/footerToggle",payload:!0})}},[]),Object(c.useEffect)(function(){Xt.actionTabs.key==="\u5BFC\u51FA\u5B9E\u8BAD\u62A5\u544A"&&Qt.length>0&&tr("all")},[Qt]),Object(c.useEffect)(function(){Gt(Object(B.a)({},zr))},[et.location.pathname]);var Ir=function(){document.body.scrollIntoView()};function Rr(){return or.apply(this,arguments)}function or(){return or=Object(r.a)(m.a.mark(function Mt(){var Ht,Lt,nr,Bt,$t,Vt,nn;return m.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(B.a)(Object(B.a)({},gt),nr)});case 3:Bt=vn.sent,yr(Bt.all_student_works),$t=(Ht=Bt.all_student_works)===null||Ht===void 0?void 0:Ht.map(function(jr){return String(jr.user_id)}).indexOf(gt.homeworkId),$t===((Lt=Bt.all_student_works)===null||Lt===void 0?void 0:Lt.length)-1?Dr({last:!0}):Dr((Vt=Bt.all_student_works)===null||Vt===void 0?void 0:Vt[$t+1]),$t===0?Hr({last:!0}):Hr((nn=Bt.all_student_works)===null||nn===void 0?void 0:nn[$t-1]);case 8:case"end":return vn.stop()}},Mt)})),or.apply(this,arguments)}var Yt=function(){document.querySelectorAll("canvas").forEach(function(Ht){(!Ht.clientWidth||!Ht.clientHeight)&&Ht.remove()})},Ut=function(){ne.current.offsetHeight>62e3?ke(!1):ke(!0)},tr=function(){var Mt=Object(r.a)(m.a.mark(function Ht(Lt){var nr,Bt,$t,Vt,nn,an;return m.a.wrap(function(jr){for(;;)switch(jr.prev=jr.next){case 0:if(nn=function(){return nn=Object(r.a)(m.a.mark(function sn(){var Wr;return m.a.wrap(function(xr){for(;;)switch(xr.prev=xr.next){case 0:return xr.next=2,kt({type:"shixunHomeworks/getShixunWorkReports",payload:{homeworkId:Qt[nr].user_id}});case 2:Wr=xr.sent,Ir(),nr++,setTimeout(Object(r.a)(m.a.mark(function un(){var Yr,_n,bn,Jr,tn,on,cn;return m.a.wrap(function(Nr){for(;;)switch(Nr.prev=Nr.next){case 0:Yt(),_n=dt.folder("".concat(Wr==null?void 0:Wr.username)),bn=document.querySelector("#export-all").children,Jr=W()(),tn=m.a.mark(function An(wn){return m.a.wrap(function(Kt){for(;;)switch(Kt.prev=Kt.next){case 0:return Kt.next=2,Jr.set($t).from(bn[wn]).toContainer().toCanvas().toPdf().get("pdf").then(function(){var zt=Object(r.a)(m.a.mark(function Or($r){return m.a.wrap(function(Cn){for(;;)switch(Cn.prev=Cn.next){case 0:if(!(wn<bn.length-1)){Cn.next=3;break}return Cn.next=3,$r.addPage();case 3:case"end":return Cn.stop()}},Or)}));return function(Or){return zt.apply(this,arguments)}}());case 2:case"end":return Kt.stop()}},An)}),on=0;case 6:if(!(on<bn.length)){Nr.next=11;break}return Nr.delegateYield(tn(on),"t0",8);case 8:on++,Nr.next=6;break;case 11:_n.file("".concat(Qt[nr-1].student_work_user_name).concat(nr,".pdf"),Jr.output("blob")),cn=_n.folder("\u4EE3\u7801\u6587\u4EF6"),Wr==null||((Yr=Wr.shixun_detail)===null||Yr===void 0)||Yr.map(function(An,wn){var Rn,Kt=cn.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){Kt.file("".concat(zt.filename,".txt"),zt==null?void 0:zt.content)})}),Bt.update({content:e.a.createElement("div",null,"\u5F53\u524D\u8FDB\u5EA6: ",e.a.createElement("span",{className:"c-blue"},nr),"/",Qt==null?void 0:Qt.length,e.a.createElement("br",null),"\u8BF7\u52FF\u5173\u95ED\u6D4F\u89C8\u5668\u7A97\u53E3")}),nr==(Qt==null?void 0:Qt.length)?(Bt.destroy(),Jt()):Vt();case 16:case"end":return Nr.stop()}},un)})),2200);case 6:case"end":return xr.stop()}},sn)})),nn.apply(this,arguments)},Vt=function(){return nn.apply(this,arguments)},nr=0,Bt=t.a.info({width:460,title:e.a.createElement("div",null,"\u6B63\u5728\u5BFC\u51FA\u5B9E\u8BAD\u62A5\u544A,",e.a.createElement("span",{className:"c-red"},"\u8BF7\u52FF\u5173\u95ED\u6216\u64CD\u4F5C\u5F53\u524D\u6D4F\u89C8\u5668\u7A97\u53E3")),content:e.a.createElement("div",null,"\u5F53\u524D\u8FDB\u5EA6: ",e.a.createElement("span",{className:"c-blue"},nr+1),"/",Lt!=="all"?1:Qt==null?void 0:Qt.length,e.a.createElement("br",null),"\u8BF7\u52FF\u5173\u95ED\u6D4F\u89C8\u5668\u7A97\u53E3"),maskClosable:!1,className:de.a.modal,onOk:function(){}}),$t={margin:[0,0],filename:"".concat(Te.username,".pdf"),html2canvas:{useCORS:!0,letterRendering:!0},jsPDF:{unit:"mm",format:"a4",orientation:"landscape"}},!(Lt!=="all"||(Qt==null?void 0:Qt.length)<2)){jr.next=12;break}return jr.delegateYield(m.a.mark(function Xr(){var sn,Wr,In,xr,un,Yr,_n;return m.a.wrap(function(Jr){for(;;)switch(Jr.prev=Jr.next){case 0:Yt(),Ir(),Wr=ie.current.children,In=W()(),xr=dt.folder("".concat(Te==null?void 0:Te.username)),un=m.a.mark(function tn(on){return m.a.wrap(function(yn){for(;;)switch(yn.prev=yn.next){case 0:return yn.next=2,In.set($t).from(Wr[on]).toContainer().toCanvas().toPdf().get("pdf").then(function(){var Nr=Object(r.a)(m.a.mark(function An(wn){return m.a.wrap(function(Kt){for(;;)switch(Kt.prev=Kt.next){case 0:if(!(on<Wr.length-1)){Kt.next=3;break}return Kt.next=3,wn.addPage();case 3:case"end":return Kt.stop()}},An)}));return function(An){return Nr.apply(this,arguments)}}());case 2:case"end":return yn.stop()}},tn)}),Yr=0;case 7:if(!(Yr<Wr.length)){Jr.next=12;break}return Jr.delegateYield(un(Yr),"t0",9);case 9:Yr++,Jr.next=7;break;case 12:return tt(!1),xr.file("".concat(Te.username,".pdf"),In.output("blob"),{base64:!1}),_n=xr.folder("\u4EE3\u7801\u6587\u4EF6"),Te==null||((sn=Te.shixun_detail)===null||sn===void 0)||sn.map(function(tn,on){var cn,yn=_n.folder("\u7B2C".concat(on+1,"\u5173-").concat(tn.subject,"-").concat(tn.id));tn==null||((cn=tn.game_codes)===null||cn===void 0)||cn.map(function(Nr){yn.file("".concat(Nr.filename,".txt"),Nr==null?void 0:Nr.content)})}),Bt.destroy(),Jt(),Jr.abrupt("return",{v:void 0});case 19:case"end":return Jr.stop()}},Xr)})(),"t0",7);case 7:if(an=jr.t0,!(typeof an=="object")){jr.next=10;break}return jr.abrupt("return",an.v);case 10:jr.next=13;break;case 12:Vt();case 13:case"end":return jr.stop()}},Ht)}));return function(Lt){return Mt.apply(this,arguments)}}(),Jt=function(){dt.generateAsync({type:"blob"}).then(function(Ht){var Lt=document.createElement("a");Lt.href=window.URL.createObjectURL(Ht),Lt.download=Te.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 l.a)}),ke(!1)};Object(c.useEffect)(function(){Er()},[gt.homeworkId]);var Er=function(){var Mt=Object(r.a)(m.a.mark(function Ht(){return m.a.wrap(function(nr){for(;;)switch(nr.prev=nr.next){case 0:return P(!0),nr.next=3,kt({type:"shixunHomeworks/getShixunWorkReports",payload:Object(B.a)({},gt)});case 3:P(!1),Object(M.c)()&&Rr();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 Bt,$t;return e.a.createElement("div",null,e.a.createElement("p",null,Ht||"- -"),Lt==null||((Bt=Lt.subitem)===null||Bt===void 0||(($t=Bt.map(function(Vt){return Vt.finish_time}))===null||$t===void 0))?void 0:$t.map(function(Vt){return e.a.createElement("p",null,Vt||"- -")}))}},{title:"\u8BC4\u6D4B\u6B21\u6570",dataIndex:"submit_count",render:function(Ht,Lt,nr){var Bt,$t;return e.a.createElement("div",null,e.a.createElement("p",null,Ht||"- -"),Lt==null||((Bt=Lt.subitem)===null||Bt===void 0||(($t=Bt.map(function(Vt){return Vt.submit_count}))===null||$t===void 0))?void 0:$t.map(function(Vt){return e.a.createElement("p",null,Vt||"- -")}))}},{title:"\u8FD0\u884C\u65F6\u95F4\uFF08ms\uFF09",dataIndex:"run_time",render:function(Ht,Lt,nr){var Bt,$t;return e.a.createElement("div",null,e.a.createElement("p",null,Ht||"- -"),Lt==null||((Bt=Lt.subitem)===null||Bt===void 0||(($t=Bt.map(function(Vt){return Vt.run_time}))===null||$t===void 0))?void 0:$t.map(function(Vt){return e.a.createElement("p",null,Vt||"- -")}))}},{title:"\u5185\u5B58\uFF08kb\uFF09",dataIndex:"memory",render:function(Ht,Lt,nr){var Bt,$t;return e.a.createElement("div",null,e.a.createElement("p",null,Ht||"- -"),Lt==null||((Bt=Lt.subitem)===null||Bt===void 0||(($t=Bt.map(function(Vt){return Vt.memory}))===null||$t===void 0))?void 0:$t.map(function(Vt){return e.a.createElement("p",null,Vt||"- -")}))}},{title:"\u4F7F\u7528\u8BED\u8A00",dataIndex:"language",render:function(Ht,Lt,nr){var Bt,$t;return e.a.createElement("div",null,e.a.createElement("p",null,Ht||"- -"),Lt==null||((Bt=Lt.subitem)===null||Bt===void 0||(($t=Bt.map(function(Vt){return Vt.language}))===null||$t===void 0))?void 0:$t.map(function(Vt){return e.a.createElement("p",null,Vt||"- -")}))}},{title:"\u5F97\u5206",dataIndex:"score",render:function(Ht,Lt,nr){return e.a.createElement("div",null,e.a.createElement("p",null,Ht||"- -"))}},{title:"\u6392\u540D",dataIndex:"rank",render:function(Ht,Lt,nr){var Bt,$t;return e.a.createElement("div",null,e.a.createElement("p",null,Ht||"- -"),Lt==null||((Bt=Lt.subitem)===null||Bt===void 0||(($t=Bt.map(function(Vt){return Vt.rank}))===null||$t===void 0))?void 0:$t.map(function(Vt){return e.a.createElement("p",null,Vt||"- -")}))}}],mn=function(Ht){kt({type:"shixunHomeworks/setActionTabs",payload:{key:"",type:2}}),setTimeout(function(){Ht==="next"?p.d.push("/classrooms/".concat(gt.coursesId,"/program_homework/").concat(gt.categoryId,"/").concat(vr==null?void 0:vr.student_work_id,"/").concat(vr==null?void 0:vr.user_id,"/comment")):p.d.push("/classrooms/".concat(gt.coursesId,"/program_homework/").concat(gt.categoryId,"/").concat(vr==null?void 0:vr.student_work_id,"/").concat(en==null?void 0:en.user_id,"/comment"))},200)};return e.a.createElement("section",{className:"bg-fafafa",style:{position:"sticky",top:0}},e.a.createElement("div",{className:"edu-container mt10",style:{paddingBottom:100}},e.a.createElement(X.a,{loading:g,active:!0,avatar:{size:40},paragraph:{rows:5}},e.a.createElement("div",{className:"edu-container"},(Te==null||(($e=Te.category)===null||$e===void 0)?void 0:$e.course_id)&&e.a.createElement("section",{className:"animated fadeIn"},e.a.createElement("aside",{className:""},(Te==null?void 0:Te.category)&&e.a.createElement(s.a,{separator:">"},e.a.createElement(s.a.Item,null,e.a.createElement(f.a,{to:"/classrooms/".concat(Te==null||((qe=Te.category)===null||qe===void 0)?void 0:qe.course_id,"/program_homework")},Te==null||((Ve=Te.category)===null||Ve===void 0)?void 0:Ve.course_name)),e.a.createElement(s.a.Item,null,e.a.createElement(f.a,{to:"/classrooms/".concat(Te==null||((Xe=Te.category)===null||Xe===void 0)?void 0:Xe.course_id,"/program_homework")},Te.category.category_name)),e.a.createElement(s.a.Item,null,e.a.createElement(f.a,{to:"/classrooms/".concat(Te==null||((at=Te.category)===null||at===void 0)?void 0:at.course_id,"/program_homework/").concat(gt==null?void 0:gt.categoryId,"/detail")},"\u4F5C\u4E1A\u8BE6\u60C5")),e.a.createElement(s.a.Item,null,Te==null||((ct=Te.data)===null||ct===void 0)?void 0:ct.user_name))),e.a.createElement("aside",{className:[de.a.title1,"mt20"].join(" ")},e.a.createElement(b.a,{align:"middle"},e.a.createElement(a.a,{flex:1},e.a.createElement(f.a,{to:"/classrooms/".concat(gt.coursesId,"/program_homework/").concat(gt==null?void 0:gt.categoryId,"/detail")},e.a.createElement(R.a,{className:"font16 c-black"})),e.a.createElement("strong",{className:"font20 ml5"},Te==null||((Ce=Te.category)===null||Ce===void 0)?void 0:Ce.homework_name),e.a.createElement(Y.m,{temporary:!0,status:Te.homework_status}))))),e.a.createElement("aside",{className:"mt30 relative"})),e.a.createElement("aside",{className:"edu-container bg-white",ref:ne},e.a.createElement("div",{id:"export-all",ref:ie},e.a.createElement("div",{id:"export-all-1"},e.a.createElement("div",{className:de.a.title},e.a.createElement("h1",null,"\u603B\u4F53\u8BC4\u4EF7"),e.a.createElement("div",null,Object(M.c)()&&e.a.createElement(I.a,{className:"mr20",type:"primary",onClick:function(){kt({type:"shixunHomeworks/setActionTabs",payload:{key:"\u66F4\u6539\u70B9\u8BC4",selectArrs:{myshixun_identifier:Te.user_id,data:Object(B.a)({},Te)}}})}},e.a.createElement(L.a,null),Te!=null&&(De=Te.data)!==null&&De!==void 0&&De.has_comment?"\u66F4\u6539\u70B9\u8BC4":"\u70B9\u8BC4\u4F5C\u4E1A"))),e.a.createElement(F.a,{style:{marginTop:0}}),e.a.createElement(b.a,{className:"pl30 pr30"},e.a.createElement(a.a,null,e.a.createElement("img",{className:de.a.userPic,src:"".concat(J.a.IMG_SERVER,"/images/").concat(Te==null||((Qe=Te.data)===null||Qe===void 0)?void 0:Qe.image_url),alt:Te==null||((We=Te.data)===null||We===void 0)?void 0:We.username})),e.a.createElement(a.a,null,e.a.createElement("span",{className:"font16 ml40"},Te==null||((Re=Te.data)===null||Re===void 0)?void 0:Re.user_name),e.a.createElement(Y.e,{status:Te==null||((Me=Te.data)===null||Me===void 0)?void 0:Me.compelete_status}),e.a.createElement("ul",{className:de.a.userInfo},e.a.createElement("li",null,"\u5B66\u53F7\uFF1A",(Te==null||((Ee=Te.data)===null||Ee===void 0)?void 0:Ee.student_id)||"--"),e.a.createElement("li",null,"\u5206\u73ED\uFF1A",(Te==null||((Ae=Te.data)===null||Ae===void 0)?void 0:Ae.course_group)||"--"),e.a.createElement("br",null),e.a.createElement("li",null,"\u622A\u6B62\u524D\u5B8C\u6210\u5237\u9898\uFF1A",e.a.createElement("span",{className:"c-red"},Te==null||((he=Te.data)===null||he===void 0)?void 0:he.finish_do)),e.a.createElement("li",null,"\u6700\u65B0\u5B8C\u6210\u5237\u9898\uFF1A",e.a.createElement("span",{className:"c-red"},(Te==null||((q=Te.data)===null||q===void 0)?void 0:q.latest_do)||"-")))),e.a.createElement("ul",{className:[de.a.listItem,"mt10"].join(" ")},e.a.createElement("li",null,e.a.createElement("strong",null,"\u5B8C\u6210\u65F6\u95F4"),e.a.createElement("div",{className:"c-light-black mt20"},(Te==null?void 0:Te.data)&&(Te==null||((ee=Te.data)===null||ee===void 0)?void 0:ee.finish_time))),e.a.createElement("li",null,e.a.createElement("strong",null,"\u5B8C\u6210\u65F6\u957F",e.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"})),e.a.createElement("div",{className:"c-light-black mt20"},Te==null||((oe=Te.data)===null||oe===void 0)?void 0:oe.finish_time_long)),e.a.createElement("li",null,e.a.createElement("strong",null,"\u8BC4\u6D4B\u6B21\u6570"),e.a.createElement("div",{className:"mt20"},Te==null||((ce=Te.data)===null||ce===void 0)?void 0:ce.submit_count)),e.a.createElement("li",null,e.a.createElement("strong",null,"\u901A\u8FC7\u7387"),e.a.createElement("div",{className:"mt20"},e.a.createElement("span",null,(Te==null||((Se=Te.data)===null||Se===void 0)?void 0:Se.pass_rate)||"- -"))),e.a.createElement("li",null,e.a.createElement("strong",null,"\u5F97\u5206"),e.a.createElement("div",{className:"mt20"},e.a.createElement("span",{className:"c-orange"},Te==null||((Pe=Te.data)===null||Pe===void 0)?void 0:Pe.score))),e.a.createElement("li",null,e.a.createElement("strong",null,"\u7EC3\u4E60\u603B\u6392\u540D"),e.a.createElement("div",{className:"mt20"},e.a.createElement("span",{className:"c-orange"},Te==null||((Je=Te.data)===null||Je===void 0)?void 0:Je.total_rank))),e.a.createElement("li",null,e.a.createElement("strong",null,"\u5206\u73ED\u6392\u540D"),e.a.createElement("div",{className:"mt20"},e.a.createElement("span",{className:"c-orange"},Te==null||((lt=Te.data)===null||lt===void 0)?void 0:lt.class_rank))))),e.a.createElement(F.a,{style:{margin:0}}),((Te==null||((ht=Te.data)===null||ht===void 0)?void 0:ht.work_comment_hidden)||(Te==null||((At=Te.data)===null||At===void 0)?void 0:At.work_comment))&&e.a.createElement("div",null,e.a.createElement(b.a,{align:"middle"},e.a.createElement(a.a,{flex:1},e.a.createElement("h1",{className:de.a.title},"\u70B9\u8BC4\u5185\u5BB9")),e.a.createElement(a.a,{className:"pr30"},Object(M.c)()&&e.a.createElement(I.a,{onClick:Object(r.a)(m.a.mark(function Mt(){return m.a.wrap(function(Lt){for(;;)switch(Lt.prev=Lt.next){case 0:t.a.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",icon:e.a.createElement(H.a,null),content:"\u662F\u5426\u786E\u8BA4\u5220\u9664\uFF1F",onOk:function(){return Object(r.a)(m.a.mark(function Bt(){var $t,Vt;return m.a.wrap(function(an){for(;;)switch(an.prev=an.next){case 0:return an.next=2,Object(re.m)({comment_id:Te==null||(($t=Te.data)===null||$t===void 0)?void 0:$t.comment_id,homeworkId:gt.homeworkId});case 2:Vt=an.sent,Vt.status===0&&(S.b.success("\u5220\u9664\u6210\u529F"),kt({type:"shixunHomeworks/getShixunWorkReports",payload:Object(B.a)({},gt)}));case 4:case"end":return an.stop()}},Bt)}))()}});case 1:case"end":return Lt.stop()}},Mt)}))},e.a.createElement(j.a,null),"\u5220\u9664"))),e.a.createElement(F.a,{style:{margin:0}}),(Te==null||((xt=Te.data)===null||xt===void 0)?void 0:xt.work_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(He.a,{value:Te==null||((St=Te.data)===null||St===void 0)?void 0:St.work_comment})),(Te==null||((it=Te.data)===null||it===void 0)?void 0:it.work_comment_hidden)&&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(He.a,{value:Te==null||((jt=Te.data)===null||jt===void 0)?void 0:jt.work_comment_hidden}))),e.a.createElement("h1",{className:de.a.title},"\u9636\u6BB5\u6210\u7EE9"),e.a.createElement("aside",{className:"pl30 pr30"},e.a.createElement(G.a,{dataSource:Te==null?void 0:Te.hack,pagination:!1,columns:ar})),(Te==null||((Wt=Te.data)===null||Wt===void 0)?void 0:Wt.work_description)&&e.a.createElement(e.a.Fragment,null,e.a.createElement("h1",{className:de.a.title},"\u4E2A\u4EBA\u603B\u7ED3"),e.a.createElement("aside",{className:"pl30 pr30"},e.a.createElement(He.a,{value:Te==null||((It=Te.data)===null||It===void 0)?void 0:It.work_description}))),e.a.createElement("h1",{className:de.a.title},"\u5237\u9898\u8BE6\u60C5")),e.a.createElement(Fe,{autoHeight:pe}))),Object(M.c)()&&e.a.createElement("aside",{className:"".concat(de.a.footerBar," ").concat(Ge?de.a.footerBarStatic:"")},e.a.createElement("aside",{className:"edu-container"},e.a.createElement(b.a,{align:"middle"},e.a.createElement(a.a,{flex:"1"},e.a.createElement(f.a,{className:de.a.exitComment,to:"/classrooms/".concat(gt.coursesId,"/program_homework/").concat(gt.categoryId,"/detail")},"\u8FD4\u56DE\u5217\u8868")),e.a.createElement(a.a,{flex:"1",className:"tr"},Object(M.c)()&&e.a.createElement(I.a,{type:"primary",onClick:Object(r.a)(m.a.mark(function Mt(){return m.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:Te.user_id,data:Object(B.a)({},Te)}}});case 1:case"end":return Lt.stop()}},Mt)}))},"\u70B9\u8BC4\u4F5C\u4E1A"))))))),e.a.createElement(nt,null),e.a.createElement(rt.a,null),e.a.createElement(t.a,{visible:Cr,width:860,centered:!0,onCancel:function(){fr(!1)},title:"\u8BA1\u65F6\u89C4\u5219\u8BF4\u660E",footer:null},e.a.createElement("div",{style:{color:"#333333",fontWeight:400}},e.a.createElement("span",{style:{fontWeight:500}},"1\u3001\u9875\u9762\u505C\u7559\u65F6\u957F"),e.a.createElement("br",null),e.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"),e.a.createElement("br",null),e.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"),e.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 "),e.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")),e.a.createElement("div",{style:{color:"#333333",marginTop:20,fontWeight:400}},e.a.createElement("span",{style:{fontWeight:500}},"2\u3001\u5173\u5361\u603B\u8017\u65F6"),e.a.createElement("br",null),e.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 "),e.a.createElement("br",null),e.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"),e.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 "),e.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"),e.a.createElement("br",null),e.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")),e.a.createElement("div",{style:{color:"#333333",marginTop:20,fontWeight:400}},e.a.createElement("span",{style:{fontWeight:500}},"3\u3001\u4F5C\u4E1A\u901A\u5173\u65F6\u957F"),e.a.createElement("br",null),e.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")),e.a.createElement("div",{style:{color:"#333333",marginTop:20,fontWeight:400}},e.a.createElement("span",{style:{fontWeight:500}},"\u89C4\u5219\u76EE\u7684"),e.a.createElement("br",null),e.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"))),e.a.createElement(t.a,{visible:Tr,title:"\u5B9E\u8BAD\u603B\u8017\u65F6\u8BF4\u660E",centered:!0,footer:null,onCancel:function(){br(!1)},width:600},e.a.createElement("div",{style:{fontWeight:400,color:"#333333"}},e.a.createElement("div",null,"1\u3001\u5F53\u8BA1\u65F6\u89C4\u5219\u4E3A\u201C",e.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"),e.a.createElement("div",{style:{margin:"20px 0px"}},"2\u3001\u5F53\u8BA1\u65F6\u89C4\u5219\u4E3A\u201C",e.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"),e.a.createElement("div",null,"3\u3001\u5F53\u8BA1\u65F6\u89C4\u5219\u4E3A\u201C",e.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"))))},ye=Ze.default=Object(p.a)(function(we){var _e=we.shixunHomeworks,$e=we.loading,qe=we.globalSetting;return{shixunHomeworks:_e,globalSetting:qe,loading:$e.effects}})(se)},GeSD:function(mt,Ze,Z){mt.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(mt,Ze,Z){"use strict";Ze.byteLength=F,Ze.toByteArray=I,Ze.fromByteArray=u;for(var ve=[],X=[],O=typeof Uint8Array!="undefined"?Uint8Array:Array,G="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",D=0,S=G.length;D<S;++D)ve[D]=G[D],X[G.charCodeAt(D)]=D;X["-".charCodeAt(0)]=62,X["_".charCodeAt(0)]=63;function z(a){var n=a.length;if(n%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var s=a.indexOf("=");s===-1&&(s=n);var i=s===n?0:4-s%4;return[s,i]}function F(a){var n=z(a),s=n[0],i=n[1];return(s+i)*3/4-i}function U(a,n,s){return(n+s)*3/4-s}function I(a){var n,s=z(a),i=s[0],t=s[1],r=new O(U(a,i,t)),A=0,B=t>0?i-4:i,w;for(w=0;w<B;w+=4)n=X[a.charCodeAt(w)]<<18|X[a.charCodeAt(w+1)]<<12|X[a.charCodeAt(w+2)]<<6|X[a.charCodeAt(w+3)],r[A++]=n>>16&255,r[A++]=n>>8&255,r[A++]=n&255;return t===2&&(n=X[a.charCodeAt(w)]<<2|X[a.charCodeAt(w+1)]>>4,r[A++]=n&255),t===1&&(n=X[a.charCodeAt(w)]<<10|X[a.charCodeAt(w+1)]<<4|X[a.charCodeAt(w+2)]>>2,r[A++]=n>>8&255,r[A++]=n&255),r}function v(a){return ve[a>>18&63]+ve[a>>12&63]+ve[a>>6&63]+ve[a&63]}function b(a,n,s){for(var i,t=[],r=n;r<s;r+=3)i=(a[r]<<16&16711680)+(a[r+1]<<8&65280)+(a[r+2]&255),t.push(v(i));return t.join("")}function u(a){for(var n,s=a.length,i=s%3,t=[],r=16383,A=0,B=s-i;A<B;A+=r)t.push(b(a,A,A+r>B?B:A+r));return i===1?(n=a[s-1],t.push(ve[n>>2]+ve[n<<4&63]+"==")):i===2&&(n=(a[s-2]<<8)+a[s-1],t.push(ve[n>>10]+ve[n>>4&63]+ve[n<<2&63]+"=")),t.join("")}},HDXh:function(mt,Ze,Z){"use strict";(function(ve){/*!
* The buffer module from node.js, for the browser.
*
* @author Feross Aboukhadijeh <http://feross.org>
* @license MIT
*/var X=Z("H7XF"),O=Z("kVK+"),G=Z("49sm");Ze.Buffer=F,Ze.SlowBuffer=t,Ze.INSPECT_MAX_BYTES=50,F.TYPED_ARRAY_SUPPORT=ve.TYPED_ARRAY_SUPPORT!==void 0?ve.TYPED_ARRAY_SUPPORT:D(),Ze.kMaxLength=S();function D(){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(K){return!1}}function S(){return F.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function z(re,K){if(S()<K)throw new RangeError("Invalid typed array length");return F.TYPED_ARRAY_SUPPORT?(re=new Uint8Array(K),re.__proto__=F.prototype):(re===null&&(re=new F(K)),re.length=K),re}function F(re,K,W){if(!F.TYPED_ARRAY_SUPPORT&&!(this instanceof F))return new F(re,K,W);if(typeof re=="number"){if(typeof K=="string")throw new Error("If encoding is specified then the first argument must be a string");return b(this,re)}return U(this,re,K,W)}F.poolSize=8192,F._augment=function(re){return re.__proto__=F.prototype,re};function U(re,K,W,se){if(typeof K=="number")throw new TypeError('"value" argument must not be a number');return typeof ArrayBuffer!="undefined"&&K instanceof ArrayBuffer?n(re,K,W,se):typeof K=="string"?u(re,K,W):s(re,K)}F.from=function(re,K,W){return U(null,re,K,W)},F.TYPED_ARRAY_SUPPORT&&(F.prototype.__proto__=Uint8Array.prototype,F.__proto__=Uint8Array,typeof Symbol!="undefined"&&Symbol.species&&F[Symbol.species]===F&&Object.defineProperty(F,Symbol.species,{value:null,configurable:!0}));function I(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 v(re,K,W,se){return I(K),K<=0?z(re,K):W!==void 0?typeof se=="string"?z(re,K).fill(W,se):z(re,K).fill(W):z(re,K)}F.alloc=function(re,K,W){return v(null,re,K,W)};function b(re,K){if(I(K),re=z(re,K<0?0:i(K)|0),!F.TYPED_ARRAY_SUPPORT)for(var W=0;W<K;++W)re[W]=0;return re}F.allocUnsafe=function(re){return b(null,re)},F.allocUnsafeSlow=function(re){return b(null,re)};function u(re,K,W){if((typeof W!="string"||W==="")&&(W="utf8"),!F.isEncoding(W))throw new TypeError('"encoding" must be a valid string encoding');var se=r(K,W)|0;re=z(re,se);var ye=re.write(K,W);return ye!==se&&(re=re.slice(0,ye)),re}function a(re,K){var W=K.length<0?0:i(K.length)|0;re=z(re,W);for(var se=0;se<W;se+=1)re[se]=K[se]&255;return re}function n(re,K,W,se){if(K.byteLength,W<0||K.byteLength<W)throw new RangeError("'offset' is out of bounds");if(K.byteLength<W+(se||0))throw new RangeError("'length' is out of bounds");return W===void 0&&se===void 0?K=new Uint8Array(K):se===void 0?K=new Uint8Array(K,W):K=new Uint8Array(K,W,se),F.TYPED_ARRAY_SUPPORT?(re=K,re.__proto__=F.prototype):re=a(re,K),re}function s(re,K){if(F.isBuffer(K)){var W=i(K.length)|0;return re=z(re,W),re.length===0||K.copy(re,0,0,W),re}if(K){if(typeof ArrayBuffer!="undefined"&&K.buffer instanceof ArrayBuffer||"length"in K)return typeof K.length!="number"||He(K.length)?z(re,0):a(re,K);if(K.type==="Buffer"&&G(K.data))return a(re,K.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function i(re){if(re>=S())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+S().toString(16)+" bytes");return re|0}function t(re){return+re!=re&&(re=0),F.alloc(+re)}F.isBuffer=function(K){return!!(K!=null&&K._isBuffer)},F.compare=function(K,W){if(!F.isBuffer(K)||!F.isBuffer(W))throw new TypeError("Arguments must be Buffers");if(K===W)return 0;for(var se=K.length,ye=W.length,we=0,_e=Math.min(se,ye);we<_e;++we)if(K[we]!==W[we]){se=K[we],ye=W[we];break}return se<ye?-1:ye<se?1:0},F.isEncoding=function(K){switch(String(K).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}},F.concat=function(K,W){if(!G(K))throw new TypeError('"list" argument must be an Array of Buffers');if(K.length===0)return F.alloc(0);var se;if(W===void 0)for(W=0,se=0;se<K.length;++se)W+=K[se].length;var ye=F.allocUnsafe(W),we=0;for(se=0;se<K.length;++se){var _e=K[se];if(!F.isBuffer(_e))throw new TypeError('"list" argument must be an Array of Buffers');_e.copy(ye,we),we+=_e.length}return ye};function r(re,K){if(F.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 W=re.length;if(W===0)return 0;for(var se=!1;;)switch(K){case"ascii":case"latin1":case"binary":return W;case"utf8":case"utf-8":case void 0:return ue(re).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return W*2;case"hex":return W>>>1;case"base64":return nt(re).length;default:if(se)return ue(re).length;K=(""+K).toLowerCase(),se=!0}}F.byteLength=r;function A(re,K,W){var se=!1;if((K===void 0||K<0)&&(K=0),K>this.length)return"";if((W===void 0||W>this.length)&&(W=this.length),W<=0)return"";if(W>>>=0,K>>>=0,W<=K)return"";for(re||(re="utf8");;)switch(re){case"hex":return j(this,K,W);case"utf8":case"utf-8":return p(this,K,W);case"ascii":return L(this,K,W);case"latin1":case"binary":return H(this,K,W);case"base64":return y(this,K,W);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return J(this,K,W);default:if(se)throw new TypeError("Unknown encoding: "+re);re=(re+"").toLowerCase(),se=!0}}F.prototype._isBuffer=!0;function B(re,K,W){var se=re[K];re[K]=re[W],re[W]=se}F.prototype.swap16=function(){var K=this.length;if(K%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var W=0;W<K;W+=2)B(this,W,W+1);return this},F.prototype.swap32=function(){var K=this.length;if(K%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var W=0;W<K;W+=4)B(this,W,W+3),B(this,W+1,W+2);return this},F.prototype.swap64=function(){var K=this.length;if(K%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var W=0;W<K;W+=8)B(this,W,W+7),B(this,W+1,W+6),B(this,W+2,W+5),B(this,W+3,W+4);return this},F.prototype.toString=function(){var K=this.length|0;return K===0?"":arguments.length===0?p(this,0,K):A.apply(this,arguments)},F.prototype.equals=function(K){if(!F.isBuffer(K))throw new TypeError("Argument must be a Buffer");return this===K?!0:F.compare(this,K)===0},F.prototype.inspect=function(){var K="",W=Ze.INSPECT_MAX_BYTES;return this.length>0&&(K=this.toString("hex",0,W).match(/.{2}/g).join(" "),this.length>W&&(K+=" ... ")),"<Buffer "+K+">"},F.prototype.compare=function(K,W,se,ye,we){if(!F.isBuffer(K))throw new TypeError("Argument must be a Buffer");if(W===void 0&&(W=0),se===void 0&&(se=K?K.length:0),ye===void 0&&(ye=0),we===void 0&&(we=this.length),W<0||se>K.length||ye<0||we>this.length)throw new RangeError("out of range index");if(ye>=we&&W>=se)return 0;if(ye>=we)return-1;if(W>=se)return 1;if(W>>>=0,se>>>=0,ye>>>=0,we>>>=0,this===K)return 0;for(var _e=we-ye,$e=se-W,qe=Math.min(_e,$e),Ve=this.slice(ye,we),Xe=K.slice(W,se),at=0;at<qe;++at)if(Ve[at]!==Xe[at]){_e=Ve[at],$e=Xe[at];break}return _e<$e?-1:$e<_e?1:0};function w(re,K,W,se,ye){if(re.length===0)return-1;if(typeof W=="string"?(se=W,W=0):W>2147483647?W=2147483647:W<-2147483648&&(W=-2147483648),W=+W,isNaN(W)&&(W=ye?0:re.length-1),W<0&&(W=re.length+W),W>=re.length){if(ye)return-1;W=re.length-1}else if(W<0)if(ye)W=0;else return-1;if(typeof K=="string"&&(K=F.from(K,se)),F.isBuffer(K))return K.length===0?-1:_(re,K,W,se,ye);if(typeof K=="number")return K=K&255,F.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?ye?Uint8Array.prototype.indexOf.call(re,K,W):Uint8Array.prototype.lastIndexOf.call(re,K,W):_(re,[K],W,se,ye);throw new TypeError("val must be string, number or Buffer")}function _(re,K,W,se,ye){var we=1,_e=re.length,$e=K.length;if(se!==void 0&&(se=String(se).toLowerCase(),se==="ucs2"||se==="ucs-2"||se==="utf16le"||se==="utf-16le")){if(re.length<2||K.length<2)return-1;we=2,_e/=2,$e/=2,W/=2}function qe(Ce,De){return we===1?Ce[De]:Ce.readUInt16BE(De*we)}var Ve;if(ye){var Xe=-1;for(Ve=W;Ve<_e;Ve++)if(qe(re,Ve)===qe(K,Xe===-1?0:Ve-Xe)){if(Xe===-1&&(Xe=Ve),Ve-Xe+1===$e)return Xe*we}else Xe!==-1&&(Ve-=Ve-Xe),Xe=-1}else for(W+$e>_e&&(W=_e-$e),Ve=W;Ve>=0;Ve--){for(var at=!0,ct=0;ct<$e;ct++)if(qe(re,Ve+ct)!==qe(K,ct)){at=!1;break}if(at)return Ve}return-1}F.prototype.includes=function(K,W,se){return this.indexOf(K,W,se)!==-1},F.prototype.indexOf=function(K,W,se){return w(this,K,W,se,!0)},F.prototype.lastIndexOf=function(K,W,se){return w(this,K,W,se,!1)};function x(re,K,W,se){W=Number(W)||0;var ye=re.length-W;se?(se=Number(se),se>ye&&(se=ye)):se=ye;var we=K.length;if(we%2!==0)throw new TypeError("Invalid hex string");se>we/2&&(se=we/2);for(var _e=0;_e<se;++_e){var $e=parseInt(K.substr(_e*2,2),16);if(isNaN($e))return _e;re[W+_e]=$e}return _e}function m(re,K,W,se){return rt(ue(K,re.length-W),re,W,se)}function c(re,K,W,se){return rt(je(K),re,W,se)}function e(re,K,W,se){return c(re,K,W,se)}function o(re,K,W,se){return rt(nt(K),re,W,se)}function l(re,K,W,se){return rt(st(K,re.length-W),re,W,se)}F.prototype.write=function(K,W,se,ye){if(W===void 0)ye="utf8",se=this.length,W=0;else if(se===void 0&&typeof W=="string")ye=W,se=this.length,W=0;else if(isFinite(W))W=W|0,isFinite(se)?(se=se|0,ye===void 0&&(ye="utf8")):(ye=se,se=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var we=this.length-W;if((se===void 0||se>we)&&(se=we),K.length>0&&(se<0||W<0)||W>this.length)throw new RangeError("Attempt to write outside buffer bounds");ye||(ye="utf8");for(var _e=!1;;)switch(ye){case"hex":return x(this,K,W,se);case"utf8":case"utf-8":return m(this,K,W,se);case"ascii":return c(this,K,W,se);case"latin1":case"binary":return e(this,K,W,se);case"base64":return o(this,K,W,se);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return l(this,K,W,se);default:if(_e)throw new TypeError("Unknown encoding: "+ye);ye=(""+ye).toLowerCase(),_e=!0}},F.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function y(re,K,W){return K===0&&W===re.length?X.fromByteArray(re):X.fromByteArray(re.slice(K,W))}function p(re,K,W){W=Math.min(re.length,W);for(var se=[],ye=K;ye<W;){var we=re[ye],_e=null,$e=we>239?4:we>223?3:we>191?2:1;if(ye+$e<=W){var qe,Ve,Xe,at;switch($e){case 1:we<128&&(_e=we);break;case 2:qe=re[ye+1],(qe&192)===128&&(at=(we&31)<<6|qe&63,at>127&&(_e=at));break;case 3:qe=re[ye+1],Ve=re[ye+2],(qe&192)===128&&(Ve&192)===128&&(at=(we&15)<<12|(qe&63)<<6|Ve&63,at>2047&&(at<55296||at>57343)&&(_e=at));break;case 4:qe=re[ye+1],Ve=re[ye+2],Xe=re[ye+3],(qe&192)===128&&(Ve&192)===128&&(Xe&192)===128&&(at=(we&15)<<18|(qe&63)<<12|(Ve&63)<<6|Xe&63,at>65535&&at<1114112&&(_e=at))}}_e===null?(_e=65533,$e=1):_e>65535&&(_e-=65536,se.push(_e>>>10&1023|55296),_e=56320|_e&1023),se.push(_e),ye+=$e}return R(se)}var f=4096;function R(re){var K=re.length;if(K<=f)return String.fromCharCode.apply(String,re);for(var W="",se=0;se<K;)W+=String.fromCharCode.apply(String,re.slice(se,se+=f));return W}function L(re,K,W){var se="";W=Math.min(re.length,W);for(var ye=K;ye<W;++ye)se+=String.fromCharCode(re[ye]&127);return se}function H(re,K,W){var se="";W=Math.min(re.length,W);for(var ye=K;ye<W;++ye)se+=String.fromCharCode(re[ye]);return se}function j(re,K,W){var se=re.length;(!K||K<0)&&(K=0),(!W||W<0||W>se)&&(W=se);for(var ye="",we=K;we<W;++we)ye+=be(re[we]);return ye}function J(re,K,W){for(var se=re.slice(K,W),ye="",we=0;we<se.length;we+=2)ye+=String.fromCharCode(se[we]+se[we+1]*256);return ye}F.prototype.slice=function(K,W){var se=this.length;K=~~K,W=W===void 0?se:~~W,K<0?(K+=se,K<0&&(K=0)):K>se&&(K=se),W<0?(W+=se,W<0&&(W=0)):W>se&&(W=se),W<K&&(W=K);var ye;if(F.TYPED_ARRAY_SUPPORT)ye=this.subarray(K,W),ye.__proto__=F.prototype;else{var we=W-K;ye=new F(we,void 0);for(var _e=0;_e<we;++_e)ye[_e]=this[_e+K]}return ye};function M(re,K,W){if(re%1!==0||re<0)throw new RangeError("offset is not uint");if(re+K>W)throw new RangeError("Trying to access beyond buffer length")}F.prototype.readUIntLE=function(K,W,se){K=K|0,W=W|0,se||M(K,W,this.length);for(var ye=this[K],we=1,_e=0;++_e<W&&(we*=256);)ye+=this[K+_e]*we;return ye},F.prototype.readUIntBE=function(K,W,se){K=K|0,W=W|0,se||M(K,W,this.length);for(var ye=this[K+--W],we=1;W>0&&(we*=256);)ye+=this[K+--W]*we;return ye},F.prototype.readUInt8=function(K,W){return W||M(K,1,this.length),this[K]},F.prototype.readUInt16LE=function(K,W){return W||M(K,2,this.length),this[K]|this[K+1]<<8},F.prototype.readUInt16BE=function(K,W){return W||M(K,2,this.length),this[K]<<8|this[K+1]},F.prototype.readUInt32LE=function(K,W){return W||M(K,4,this.length),(this[K]|this[K+1]<<8|this[K+2]<<16)+this[K+3]*16777216},F.prototype.readUInt32BE=function(K,W){return W||M(K,4,this.length),this[K]*16777216+(this[K+1]<<16|this[K+2]<<8|this[K+3])},F.prototype.readIntLE=function(K,W,se){K=K|0,W=W|0,se||M(K,W,this.length);for(var ye=this[K],we=1,_e=0;++_e<W&&(we*=256);)ye+=this[K+_e]*we;return we*=128,ye>=we&&(ye-=Math.pow(2,8*W)),ye},F.prototype.readIntBE=function(K,W,se){K=K|0,W=W|0,se||M(K,W,this.length);for(var ye=W,we=1,_e=this[K+--ye];ye>0&&(we*=256);)_e+=this[K+--ye]*we;return we*=128,_e>=we&&(_e-=Math.pow(2,8*W)),_e},F.prototype.readInt8=function(K,W){return W||M(K,1,this.length),this[K]&128?(255-this[K]+1)*-1:this[K]},F.prototype.readInt16LE=function(K,W){W||M(K,2,this.length);var se=this[K]|this[K+1]<<8;return se&32768?se|4294901760:se},F.prototype.readInt16BE=function(K,W){W||M(K,2,this.length);var se=this[K+1]|this[K]<<8;return se&32768?se|4294901760:se},F.prototype.readInt32LE=function(K,W){return W||M(K,4,this.length),this[K]|this[K+1]<<8|this[K+2]<<16|this[K+3]<<24},F.prototype.readInt32BE=function(K,W){return W||M(K,4,this.length),this[K]<<24|this[K+1]<<16|this[K+2]<<8|this[K+3]},F.prototype.readFloatLE=function(K,W){return W||M(K,4,this.length),O.read(this,K,!0,23,4)},F.prototype.readFloatBE=function(K,W){return W||M(K,4,this.length),O.read(this,K,!1,23,4)},F.prototype.readDoubleLE=function(K,W){return W||M(K,8,this.length),O.read(this,K,!0,52,8)},F.prototype.readDoubleBE=function(K,W){return W||M(K,8,this.length),O.read(this,K,!1,52,8)};function Y(re,K,W,se,ye,we){if(!F.isBuffer(re))throw new TypeError('"buffer" argument must be a Buffer instance');if(K>ye||K<we)throw new RangeError('"value" argument is out of bounds');if(W+se>re.length)throw new RangeError("Index out of range")}F.prototype.writeUIntLE=function(K,W,se,ye){if(K=+K,W=W|0,se=se|0,!ye){var we=Math.pow(2,8*se)-1;Y(this,K,W,se,we,0)}var _e=1,$e=0;for(this[W]=K&255;++$e<se&&(_e*=256);)this[W+$e]=K/_e&255;return W+se},F.prototype.writeUIntBE=function(K,W,se,ye){if(K=+K,W=W|0,se=se|0,!ye){var we=Math.pow(2,8*se)-1;Y(this,K,W,se,we,0)}var _e=se-1,$e=1;for(this[W+_e]=K&255;--_e>=0&&($e*=256);)this[W+_e]=K/$e&255;return W+se},F.prototype.writeUInt8=function(K,W,se){return K=+K,W=W|0,se||Y(this,K,W,1,255,0),F.TYPED_ARRAY_SUPPORT||(K=Math.floor(K)),this[W]=K&255,W+1};function te(re,K,W,se){K<0&&(K=65535+K+1);for(var ye=0,we=Math.min(re.length-W,2);ye<we;++ye)re[W+ye]=(K&255<<8*(se?ye:1-ye))>>>(se?ye:1-ye)*8}F.prototype.writeUInt16LE=function(K,W,se){return K=+K,W=W|0,se||Y(this,K,W,2,65535,0),F.TYPED_ARRAY_SUPPORT?(this[W]=K&255,this[W+1]=K>>>8):te(this,K,W,!0),W+2},F.prototype.writeUInt16BE=function(K,W,se){return K=+K,W=W|0,se||Y(this,K,W,2,65535,0),F.TYPED_ARRAY_SUPPORT?(this[W]=K>>>8,this[W+1]=K&255):te(this,K,W,!1),W+2};function de(re,K,W,se){K<0&&(K=4294967295+K+1);for(var ye=0,we=Math.min(re.length-W,4);ye<we;++ye)re[W+ye]=K>>>(se?ye:3-ye)*8&255}F.prototype.writeUInt32LE=function(K,W,se){return K=+K,W=W|0,se||Y(this,K,W,4,4294967295,0),F.TYPED_ARRAY_SUPPORT?(this[W+3]=K>>>24,this[W+2]=K>>>16,this[W+1]=K>>>8,this[W]=K&255):de(this,K,W,!0),W+4},F.prototype.writeUInt32BE=function(K,W,se){return K=+K,W=W|0,se||Y(this,K,W,4,4294967295,0),F.TYPED_ARRAY_SUPPORT?(this[W]=K>>>24,this[W+1]=K>>>16,this[W+2]=K>>>8,this[W+3]=K&255):de(this,K,W,!1),W+4},F.prototype.writeIntLE=function(K,W,se,ye){if(K=+K,W=W|0,!ye){var we=Math.pow(2,8*se-1);Y(this,K,W,se,we-1,-we)}var _e=0,$e=1,qe=0;for(this[W]=K&255;++_e<se&&($e*=256);)K<0&&qe===0&&this[W+_e-1]!==0&&(qe=1),this[W+_e]=(K/$e>>0)-qe&255;return W+se},F.prototype.writeIntBE=function(K,W,se,ye){if(K=+K,W=W|0,!ye){var we=Math.pow(2,8*se-1);Y(this,K,W,se,we-1,-we)}var _e=se-1,$e=1,qe=0;for(this[W+_e]=K&255;--_e>=0&&($e*=256);)K<0&&qe===0&&this[W+_e+1]!==0&&(qe=1),this[W+_e]=(K/$e>>0)-qe&255;return W+se},F.prototype.writeInt8=function(K,W,se){return K=+K,W=W|0,se||Y(this,K,W,1,127,-128),F.TYPED_ARRAY_SUPPORT||(K=Math.floor(K)),K<0&&(K=255+K+1),this[W]=K&255,W+1},F.prototype.writeInt16LE=function(K,W,se){return K=+K,W=W|0,se||Y(this,K,W,2,32767,-32768),F.TYPED_ARRAY_SUPPORT?(this[W]=K&255,this[W+1]=K>>>8):te(this,K,W,!0),W+2},F.prototype.writeInt16BE=function(K,W,se){return K=+K,W=W|0,se||Y(this,K,W,2,32767,-32768),F.TYPED_ARRAY_SUPPORT?(this[W]=K>>>8,this[W+1]=K&255):te(this,K,W,!1),W+2},F.prototype.writeInt32LE=function(K,W,se){return K=+K,W=W|0,se||Y(this,K,W,4,2147483647,-2147483648),F.TYPED_ARRAY_SUPPORT?(this[W]=K&255,this[W+1]=K>>>8,this[W+2]=K>>>16,this[W+3]=K>>>24):de(this,K,W,!0),W+4},F.prototype.writeInt32BE=function(K,W,se){return K=+K,W=W|0,se||Y(this,K,W,4,2147483647,-2147483648),K<0&&(K=4294967295+K+1),F.TYPED_ARRAY_SUPPORT?(this[W]=K>>>24,this[W+1]=K>>>16,this[W+2]=K>>>8,this[W+3]=K&255):de(this,K,W,!1),W+4};function fe(re,K,W,se,ye,we){if(W+se>re.length)throw new RangeError("Index out of range");if(W<0)throw new RangeError("Index out of range")}function Le(re,K,W,se,ye){return ye||fe(re,K,W,4,34028234663852886e22,-34028234663852886e22),O.write(re,K,W,se,23,4),W+4}F.prototype.writeFloatLE=function(K,W,se){return Le(this,K,W,!0,se)},F.prototype.writeFloatBE=function(K,W,se){return Le(this,K,W,!1,se)};function xe(re,K,W,se,ye){return ye||fe(re,K,W,8,17976931348623157e292,-17976931348623157e292),O.write(re,K,W,se,52,8),W+8}F.prototype.writeDoubleLE=function(K,W,se){return xe(this,K,W,!0,se)},F.prototype.writeDoubleBE=function(K,W,se){return xe(this,K,W,!1,se)},F.prototype.copy=function(K,W,se,ye){if(se||(se=0),!ye&&ye!==0&&(ye=this.length),W>=K.length&&(W=K.length),W||(W=0),ye>0&&ye<se&&(ye=se),ye===se)return 0;if(K.length===0||this.length===0)return 0;if(W<0)throw new RangeError("targetStart out of bounds");if(se<0||se>=this.length)throw new RangeError("sourceStart out of bounds");if(ye<0)throw new RangeError("sourceEnd out of bounds");ye>this.length&&(ye=this.length),K.length-W<ye-se&&(ye=K.length-W+se);var we=ye-se,_e;if(this===K&&se<W&&W<ye)for(_e=we-1;_e>=0;--_e)K[_e+W]=this[_e+se];else if(we<1e3||!F.TYPED_ARRAY_SUPPORT)for(_e=0;_e<we;++_e)K[_e+W]=this[_e+se];else Uint8Array.prototype.set.call(K,this.subarray(se,se+we),W);return we},F.prototype.fill=function(K,W,se,ye){if(typeof K=="string"){if(typeof W=="string"?(ye=W,W=0,se=this.length):typeof se=="string"&&(ye=se,se=this.length),K.length===1){var we=K.charCodeAt(0);we<256&&(K=we)}if(ye!==void 0&&typeof ye!="string")throw new TypeError("encoding must be a string");if(typeof ye=="string"&&!F.isEncoding(ye))throw new TypeError("Unknown encoding: "+ye)}else typeof K=="number"&&(K=K&255);if(W<0||this.length<W||this.length<se)throw new RangeError("Out of range index");if(se<=W)return this;W=W>>>0,se=se===void 0?this.length:se>>>0,K||(K=0);var _e;if(typeof K=="number")for(_e=W;_e<se;++_e)this[_e]=K;else{var $e=F.isBuffer(K)?K:ue(new F(K,ye).toString()),qe=$e.length;for(_e=0;_e<se-W;++_e)this[_e+W]=$e[_e%qe]}return this};var Ie=/[^+\/0-9A-Za-z-_]/g;function Fe(re){if(re=Ue(re).replace(Ie,""),re.length<2)return"";for(;re.length%4!==0;)re=re+"=";return re}function Ue(re){return re.trim?re.trim():re.replace(/^\s+|\s+$/g,"")}function be(re){return re<16?"0"+re.toString(16):re.toString(16)}function ue(re,K){K=K||Infinity;for(var W,se=re.length,ye=null,we=[],_e=0;_e<se;++_e){if(W=re.charCodeAt(_e),W>55295&&W<57344){if(!ye){if(W>56319){(K-=3)>-1&&we.push(239,191,189);continue}else if(_e+1===se){(K-=3)>-1&&we.push(239,191,189);continue}ye=W;continue}if(W<56320){(K-=3)>-1&&we.push(239,191,189),ye=W;continue}W=(ye-55296<<10|W-56320)+65536}else ye&&((K-=3)>-1&&we.push(239,191,189));if(ye=null,W<128){if((K-=1)<0)break;we.push(W)}else if(W<2048){if((K-=2)<0)break;we.push(W>>6|192,W&63|128)}else if(W<65536){if((K-=3)<0)break;we.push(W>>12|224,W>>6&63|128,W&63|128)}else if(W<1114112){if((K-=4)<0)break;we.push(W>>18|240,W>>12&63|128,W>>6&63|128,W&63|128)}else throw new Error("Invalid code point")}return we}function je(re){for(var K=[],W=0;W<re.length;++W)K.push(re.charCodeAt(W)&255);return K}function st(re,K){for(var W,se,ye,we=[],_e=0;_e<re.length&&!((K-=2)<0);++_e)W=re.charCodeAt(_e),se=W>>8,ye=W%256,we.push(ye),we.push(se);return we}function nt(re){return X.toByteArray(Fe(re))}function rt(re,K,W,se){for(var ye=0;ye<se&&!(ye+W>=K.length||ye>=re.length);++ye)K[ye+W]=re[ye];return ye}function He(re){return re!==re}}).call(this,Z("IyRk"))},IBYe:function(mt,Ze,Z){"use strict";function ve(X){return null}Ze.a=ve},J66h:function(mt,Ze,Z){(function(ve){var X,O;(function(G,D){mt.exports=D(G)})(typeof self!="undefined"?self:typeof window!="undefined"?window:typeof ve!="undefined"?ve:this,function(G){"use strict";G=G||{};var D=G.Base64,S="2.6.4",z="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",F=function(f){for(var R={},L=0,H=f.length;L<H;L++)R[f.charAt(L)]=L;return R}(z),U=String.fromCharCode,I=function(f){if(f.length<2){var R=f.charCodeAt(0);return R<128?f:R<2048?U(192|R>>>6)+U(128|R&63):U(224|R>>>12&15)+U(128|R>>>6&63)+U(128|R&63)}else{var R=65536+(f.charCodeAt(0)-55296)*1024+(f.charCodeAt(1)-56320);return U(240|R>>>18&7)+U(128|R>>>12&63)+U(128|R>>>6&63)+U(128|R&63)}},v=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,b=function(f){return f.replace(v,I)},u=function(f){var R=[0,2,1][f.length%3],L=f.charCodeAt(0)<<16|(f.length>1?f.charCodeAt(1):0)<<8|(f.length>2?f.charCodeAt(2):0),H=[z.charAt(L>>>18),z.charAt(L>>>12&63),R>=2?"=":z.charAt(L>>>6&63),R>=1?"=":z.charAt(L&63)];return H.join("")},a=G.btoa&&typeof G.btoa=="function"?function(f){return G.btoa(f)}:function(f){if(f.match(/[^\x00-\xFF]/))throw new RangeError("The string contains invalid characters.");return f.replace(/[\s\S]{1,3}/g,u)},n=function(f){return a(b(String(f)))},s=function(f){return f.replace(/[+\/]/g,function(R){return R=="+"?"-":"_"}).replace(/=/g,"")},i=function(f,R){return R?s(n(f)):n(f)},t=function(f){return i(f,!0)},r;G.Uint8Array&&(r=function(f,R){for(var L="",H=0,j=f.length;H<j;H+=3){var J=f[H],M=f[H+1],Y=f[H+2],te=J<<16|M<<8|Y;L+=z.charAt(te>>>18)+z.charAt(te>>>12&63)+(typeof M!="undefined"?z.charAt(te>>>6&63):"=")+(typeof Y!="undefined"?z.charAt(te&63):"=")}return R?s(L):L});var A=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,B=function(f){switch(f.length){case 4:var R=(7&f.charCodeAt(0))<<18|(63&f.charCodeAt(1))<<12|(63&f.charCodeAt(2))<<6|63&f.charCodeAt(3),L=R-65536;return U((L>>>10)+55296)+U((L&1023)+56320);case 3:return U((15&f.charCodeAt(0))<<12|(63&f.charCodeAt(1))<<6|63&f.charCodeAt(2));default:return U((31&f.charCodeAt(0))<<6|63&f.charCodeAt(1))}},w=function(f){return f.replace(A,B)},_=function(f){var R=f.length,L=R%4,H=(R>0?F[f.charAt(0)]<<18:0)|(R>1?F[f.charAt(1)]<<12:0)|(R>2?F[f.charAt(2)]<<6:0)|(R>3?F[f.charAt(3)]:0),j=[U(H>>>16),U(H>>>8&255),U(H&255)];return j.length-=[0,0,2,1][L],j.join("")},x=G.atob&&typeof G.atob=="function"?function(f){return G.atob(f)}:function(f){return f.replace(/\S{1,4}/g,_)},m=function(f){return x(String(f).replace(/[^A-Za-z0-9\+\/]/g,""))},c=function(f){return w(x(f))},e=function(f){return String(f).replace(/[-_]/g,function(R){return R=="-"?"+":"/"}).replace(/[^A-Za-z0-9\+\/]/g,"")},o=function(f){return c(e(f))},l;G.Uint8Array&&(l=function(f){return Uint8Array.from(m(e(f)),function(R){return R.charCodeAt(0)})});var y=function(){var f=G.Base64;return G.Base64=D,f};if(G.Base64={VERSION:S,atob:m,btoa:a,fromBase64:o,toBase64:i,utob:b,encode:i,encodeURI:t,btou:w,decode:o,noConflict:y,fromUint8Array:r,toUint8Array:l},typeof Object.defineProperty=="function"){var p=function(f){return{value:f,enumerable:!1,writable:!0,configurable:!0}};G.Base64.extendString=function(){Object.defineProperty(String.prototype,"fromBase64",p(function(){return o(this)})),Object.defineProperty(String.prototype,"toBase64",p(function(f){return i(this,f)})),Object.defineProperty(String.prototype,"toBase64URI",p(function(){return i(this,!0)}))}}return G.Meteor&&(Base64=G.Base64),mt.exports?mt.exports.Base64=G.Base64:!(X=[],O=function(){return G.Base64}.apply(Ze,X),O!==void 0&&(mt.exports=O)),{Base64:G.Base64}})}).call(this,Z("IyRk"))},LdHM:function(mt,Ze,Z){"use strict";Z.d(Ze,"b",function(){return A}),Z.d(Ze,"a",function(){return w});var ve=Z("1OyB"),X=Z("vuIU"),O=Z("Ji7U"),G=Z("LK+K"),D=Z("q1tI"),S=Z("rePB"),z=Z("Ff2n"),F=Z("ODXe"),U=Z("4IlW"),I=Z("bX4T"),v=Z("YrtM"),b=Z("TSYQ"),u=Z.n(b),a=Z("+nKL"),n=Z("8OUc"),s=function(Y,te){var de=Y.prefixCls,fe=Y.id,Le=Y.flattenOptions,xe=Y.childrenAsData,Ie=Y.values,Fe=Y.searchValue,Ue=Y.multiple,be=Y.defaultActiveFirstOption,ue=Y.height,je=Y.itemHeight,st=Y.notFoundContent,nt=Y.open,rt=Y.menuItemSelectedIcon,He=Y.virtual,re=Y.onSelect,K=Y.onToggleOpen,W=Y.onActiveValue,se=Y.onScroll,ye=Y.onMouseEnter,we="".concat(de,"-item"),_e=Object(v.a)(function(){return Le},[nt,Le],function(Me,Ee){return Ee[0]&&Me[1]!==Ee[1]}),$e=D.useRef(null),qe=function(Ee){Ee.preventDefault()},Ve=function(Ee){$e.current&&$e.current.scrollTo({index:Ee})},Xe=function(Ee){for(var Ae=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,he=_e.length,q=0;q<he;q+=1){var ee=(Ee+q*Ae+he)%he,oe=_e[ee],ce=oe.group,Se=oe.data;if(!ce&&!Se.disabled)return ee}return-1},at=D.useState(function(){return Xe(0)}),ct=Object(F.a)(at,2),Ce=ct[0],De=ct[1],Qe=function(Ee){De(Ee);var Ae=_e[Ee];if(!Ae){W(null,-1);return}W(Ae.data.value,Ee)};D.useEffect(function(){Qe(be!==!1?Xe(0):-1)},[_e.length,Fe]),D.useEffect(function(){var Me=setTimeout(function(){if(!Ue&&nt&&Ie.size===1){var Ee=Array.from(Ie)[0],Ae=_e.findIndex(function(he){var q=he.data;return q.value===Ee});Qe(Ae),Ve(Ae)}});return function(){return clearTimeout(Me)}},[nt]);var We=function(Ee){Ee!==void 0&&re(Ee,{selected:!Ie.has(Ee)}),Ue||K(!1)};if(D.useImperativeHandle(te,function(){return{onKeyDown:function(Ee){var Ae=Ee.which;switch(Ae){case U.a.UP:case U.a.DOWN:{var he=0;if(Ae===U.a.UP?he=-1:Ae===U.a.DOWN&&(he=1),he!==0){var q=Xe(Ce+he,he);Ve(q),Qe(q)}break}case U.a.ENTER:{var ee=_e[Ce];ee&&!ee.data.disabled?We(ee.data.value):We(void 0),nt&&Ee.preventDefault();break}case U.a.ESC:K(!1)}},onKeyUp:function(){},scrollTo:function(Ee){Ve(Ee)}}}),_e.length===0)return D.createElement("div",{role:"listbox",id:"".concat(fe,"_list"),className:"".concat(we,"-empty"),onMouseDown:qe},st);function Re(Me){var Ee=_e[Me];if(!Ee)return null;var Ae=Ee.data||{},he=Ae.value,q=Ae.label,ee=Ae.children,oe=Object(I.a)(Ae,!0),ce=xe?ee:q;return Ee?D.createElement("div",Object.assign({"aria-label":typeof ce=="string"?ce:null},oe,{key:Me,role:"option",id:"".concat(fe,"_list_").concat(Me),"aria-selected":Ie.has(he)}),he):null}return D.createElement(D.Fragment,null,D.createElement("div",{role:"listbox",id:"".concat(fe,"_list"),style:{height:0,width:0,overflow:"hidden"}},Re(Ce-1),Re(Ce),Re(Ce+1)),D.createElement(a.a,{itemKey:"key",ref:$e,data:_e,height:ue,itemHeight:je,fullHeight:!1,onMouseDown:qe,onScroll:se,virtual:He,onMouseEnter:ye},function(Me,Ee){var Ae,he=Me.group,q=Me.groupOption,ee=Me.data,oe=ee.label,ce=ee.key;if(he)return D.createElement("div",{className:u()(we,"".concat(we,"-group"))},oe!==void 0?oe:ce);var Se=ee.disabled,Pe=ee.value,Je=ee.title,lt=ee.children,ht=ee.style,At=ee.className,xt=Object(z.a)(ee,["disabled","value","title","children","style","className"]),St=Ie.has(Pe),it="".concat(we,"-option"),jt=u()(we,it,At,(Ae={},Object(S.a)(Ae,"".concat(it,"-grouped"),q),Object(S.a)(Ae,"".concat(it,"-active"),Ce===Ee&&!Se),Object(S.a)(Ae,"".concat(it,"-disabled"),Se),Object(S.a)(Ae,"".concat(it,"-selected"),St),Ae)),Wt=xe?lt:oe,It=!rt||typeof rt=="function"||St;return D.createElement("div",Object.assign({},xt,{"aria-selected":St,className:jt,title:Je,onMouseMove:function(){if(Ce===Ee||Se)return;Qe(Ee)},onClick:function(){Se||We(Pe)},style:ht}),D.createElement("div",{className:"".concat(it,"-content")},Wt||Pe),D.isValidElement(rt)||St,It&&D.createElement(n.a,{className:"".concat(we,"-option-state"),customizeIcon:rt,customizeIconProps:{isSelected:St}},St?"\u2713":null))}))},i=D.forwardRef(s);i.displayName="OptionList";var t=i,r=function(){return null};r.isSelectOption=!0;var A=r,B=function(){return null};B.isSelectOptGroup=!0;var w=B,_=Z("VTBJ"),x=Z("Zm9Q");function m(M){var Y=M.key,te=M.props,de=te.children,fe=te.value,Le=Object(z.a)(te,["children","value"]);return Object(_.a)({key:Y,value:fe!==void 0?fe:Y,children:de},Le)}function c(M){var Y=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return Object(x.a)(M).map(function(te,de){if(!D.isValidElement(te)||!te.type)return null;var fe=te.type.isSelectOptGroup,Le=te.key,xe=te.props,Ie=xe.children,Fe=Object(z.a)(xe,["children"]);return Y||!fe?m(te):Object(_.a)(Object(_.a)({key:"__RC_SELECT_GRP__".concat(Le===null?de:Le,"__"),label:Le},Fe),{},{options:c(Ie)})}).filter(function(te){return te})}var e=Z("2Qr1"),o=Z("qNPg"),l=Z("U8pU"),y=Z("Kwbf"),p=Z("WKfj");function f(M){var Y=M.mode,te=M.options,de=M.children,fe=M.backfill,Le=M.allowClear,xe=M.placeholder,Ie=M.getInputElement,Fe=M.showSearch,Ue=M.onSearch,be=M.defaultOpen,ue=M.autoFocus,je=M.labelInValue,st=M.value,nt=M.inputValue,rt=M.optionLabelProp,He=Y==="multiple"||Y==="tags",re=Fe!==void 0?Fe:He||Y==="combobox",K=te||c(de);if(Object(y.a)(Y!=="tags"||K.every(function(we){return!we.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),Y==="tags"||Y==="combobox"){var W=K.some(function(we){return we.options?we.options.some(function(_e){return typeof("value"in _e?_e.value:_e.key)=="number"}):typeof("value"in we?we.value:we.key)=="number"});Object(y.a)(!W,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(Object(y.a)(Y!=="combobox"||!rt,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),Object(y.a)(Y==="combobox"||!fe,"`backfill` only works with `combobox` mode."),Object(y.a)(Y==="combobox"||!Ie,"`getInputElement` only work with `combobox` mode."),Object(y.b)(Y!=="combobox"||!Ie||!Le||!xe,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),Ue&&!re&&Y!=="combobox"&&Y!=="tags"&&Object(y.a)(!1,"`onSearch` should work with `showSearch` instead of use alone."),Object(y.b)(!be||ue,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),st!=null){var se=Object(p.d)(st);Object(y.a)(!je||se.every(function(we){return Object(l.a)(we)==="object"&&("key"in we||"value"in we)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),Object(y.a)(!He||Array.isArray(st),"`value` should be array when `mode` is `multiple` or `tags`")}if(de){var ye=null;Object(x.a)(de).some(function(we){if(!D.isValidElement(we)||!we.type)return!1;var _e=we.type;if(_e.isSelectOption)return!1;if(_e.isSelectOptGroup){var $e=Object(x.a)(we.props.children).every(function(qe){return!D.isValidElement(qe)||!we.type||qe.type.isSelectOption?!0:(ye=qe.type,!1)});return!$e}return ye=_e,!0}),ye&&Object(y.a)(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(ye.displayName||ye.name||ye,"`.")),Object(y.a)(nt===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}var R=f,L=Object(o.a)({prefixCls:"rc-select",components:{optionList:t},convertChildrenToData:c,flattenOptions:e.d,getLabeledValue:e.e,filterOptions:e.b,isValueDisabled:e.g,findValueOption:e.c,warningProps:R,fillOptionsWithMissingValue:e.a}),H=function(M){Object(O.a)(te,M);var Y=Object(G.a)(te);function te(){var de;return Object(ve.a)(this,te),de=Y.apply(this,arguments),de.selectRef=D.createRef(),de.focus=function(){de.selectRef.current.focus()},de.blur=function(){de.selectRef.current.blur()},de}return Object(X.a)(te,[{key:"render",value:function(){return D.createElement(L,Object.assign({ref:this.selectRef},this.props))}}]),te}(D.Component);H.Option=A,H.OptGroup=w;var j=H,J=Ze.c=j},NvD2:function(mt,Ze,Z){"use strict";Z.d(Ze,"a",function(){return S});var ve=Z("Kwbf");function X(z,F){var U=new Set;return z.forEach(function(I){F.has(I)||U.add(I)}),U}function O(z){var F=z||{},U=F.disabled,I=F.disableCheckbox,v=F.checkable;return!!(U||I)||v===!1}function G(z,F,U,I){for(var v=new Set(z),b=new Set,u=0;u<=U;u+=1){var a=F.get(u)||new Set;a.forEach(function(t){var r=t.key,A=t.node,B=t.children,w=B===void 0?[]:B;v.has(r)&&!I(A)&&w.filter(function(_){return!I(_.node)}).forEach(function(_){v.add(_.key)})})}for(var n=new Set,s=U;s>=0;s-=1){var i=F.get(s)||new Set;i.forEach(function(t){var r=t.parent,A=t.node;if(I(A)||!t.parent||n.has(t.parent.key))return;if(I(t.parent.node)){n.add(r.key);return}var B=!0,w=!1;(r.children||[]).filter(function(_){return!I(_.node)}).forEach(function(_){var x=_.key,m=v.has(x);B&&!m&&(B=!1),!w&&(m||b.has(x))&&(w=!0)}),B&&v.add(r.key),w&&b.add(r.key),n.add(r.key)})}return{checkedKeys:Array.from(v),halfCheckedKeys:Array.from(X(b,v))}}function D(z,F,U,I,v){for(var b=new Set(z),u=new Set(F),a=0;a<=I;a+=1){var n=U.get(a)||new Set;n.forEach(function(r){var A=r.key,B=r.node,w=r.children,_=w===void 0?[]:w;!b.has(A)&&!u.has(A)&&!v(B)&&_.filter(function(x){return!v(x.node)}).forEach(function(x){b.delete(x.key)})})}u=new Set;for(var s=new Set,i=I;i>=0;i-=1){var t=U.get(i)||new Set;t.forEach(function(r){var A=r.parent,B=r.node;if(v(B)||!r.parent||s.has(r.parent.key))return;if(v(r.parent.node)){s.add(A.key);return}var w=!0,_=!1;(A.children||[]).filter(function(x){return!v(x.node)}).forEach(function(x){var m=x.key,c=b.has(m);w&&!c&&(w=!1),!_&&(c||u.has(m))&&(_=!0)}),w||b.delete(A.key),_&&u.add(A.key),s.add(A.key)})}return{checkedKeys:Array.from(b),halfCheckedKeys:Array.from(X(u,b))}}function S(z,F,U,I){var v=[],b;I?b=I:b=O;var u=new Set(z.filter(function(i){var t=!!U[i];return t||v.push(i),t})),a=new Map,n=0;Object.keys(U).forEach(function(i){var t=U[i],r=t.level,A=a.get(r);A||(A=new Set,a.set(r,A)),A.add(t),n=Math.max(n,r)}),Object(ve.a)(!v.length,"Tree missing follow keys: ".concat(v.slice(0,100).map(function(i){return"'".concat(i,"'")}).join(", ")));var s;return F===!0?s=G(u,a,n,b):s=D(u,F.halfCheckedKeys,a,n,b),s}},OZM5:function(mt,Ze,Z){"use strict";Z.d(Ze,"b",function(){return I}),Z.d(Ze,"a",function(){return v}),Z.d(Ze,"k",function(){return b}),Z.d(Ze,"h",function(){return u}),Z.d(Ze,"i",function(){return a}),Z.d(Ze,"g",function(){return n}),Z.d(Ze,"c",function(){return s}),Z.d(Ze,"d",function(){return i}),Z.d(Ze,"j",function(){return A}),Z.d(Ze,"e",function(){return B}),Z.d(Ze,"f",function(){return w});var ve=Z("KQm4"),X=Z("U8pU"),O=Z("Ff2n"),G=Z("q1tI"),D=Z.n(G),S=Z("Kwbf"),z=Z("WaYH"),F=.25,U=2;function I(_,x){var m=_.slice(),c=m.indexOf(x);return c>=0&&m.splice(c,1),m}function v(_,x){var m=_.slice();return m.indexOf(x)===-1&&m.push(x),m}function b(_){return _.split("-")}function u(_,x){return"".concat(_,"-").concat(x)}function a(_){return _&&_.type&&_.type.isTreeNode}function n(_,x){var m=[_],c=x[_];function e(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];o.forEach(function(l){var y=l.key,p=l.children;m.push(y),e(p)})}return e(c.children),m}function s(_,x){var m=_.clientY,c=x.selectHandle.getBoundingClientRect(),e=c.top,o=c.bottom,l=c.height,y=Math.max(l*F,U);return m<=e+y?-1:m>=o-y?1:0}function i(_,x){if(!_)return;var m=x.multiple;return m?_.slice():_.length?[_[0]]:_}var t=function(x){return x};function r(_,x){if(!_)return[];var m=x||{},c=m.processProps,e=c===void 0?t:c,o=Array.isArray(_)?_:[_];return o.map(function(l){var y=l.children,p=Object(O.a)(l,["children"]),f=r(y,x);return D.a.createElement(z.a,Object.assign({},e(p)),f)})}function A(_){if(!_)return null;var x;if(Array.isArray(_))x={checkedKeys:_,halfCheckedKeys:void 0};else if(Object(X.a)(_)==="object")x={checkedKeys:_.checked||void 0,halfCheckedKeys:_.halfChecked||void 0};else return Object(S.a)(!1,"`checkedKeys` is not an array or an object"),null;return x}function B(_,x){var m=new Set;function c(e){if(m.has(e))return;var o=x[e];if(!o)return;m.add(e);var l=o.parent,y=o.node;if(y.disabled)return;l&&c(l.key)}return(_||[]).forEach(function(e){c(e)}),Object(ve.a)(m)}function w(_){var x={};return Object.keys(_).forEach(function(m){(m.startsWith("data-")||m.startsWith("aria-"))&&(x[m]=_[m])}),x}},"SA+Z":function(mt,Ze,Z){var ve=Z("wTVA"),X=Z("EbDI"),O=Z("ZhPi"),G=Z("wkBT");function D(S){return ve(S)||X(S)||O(S)||G()}mt.exports=D,mt.exports.__esModule=!0,mt.exports.default=mt.exports},SJMd:function(mt,Ze){/**
* @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 Z,ve,X,O=!1,G,D;window.PR_SHOULD_USE_CONTINUATION=!0;var S,z;(function(){var F=window,U=["break,continue,do,else,for,if,return,while"],I=[U,"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"],v=[I,"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],b=[v,"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=[v,"abstract,assert,boolean,byte,extends,finally,final,implements,import,instanceof,interface,null,native,package,strictfp,super,synchronized,throws,transient"],a=[v,"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"],n="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",s=[v,"abstract,async,await,constructor,debugger,enum,eval,export,function,get,implements,instanceof,interface,let,null,set,undefined,var,with,yield,Infinity,NaN"],i="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",t=[U,"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=[U,"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"],A=[U,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],B=[b,a,u,s,i,t,r,A],w=/^(DIR|FILE|array|vector|(de|priority_)?queue|(forward_)?list|stack|(const_)?(reverse_)?iterator|(unordered_)?(multi)?(set|map)|bitset|u?(int|float)\d*)\b/,_="str",x="kwd",m="com",c="typ",e="lit",o="pun",l="pln",y="tag",p="dec",f="src",R="atn",L="atv",H="nocode",j="(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<<?=?|>>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";function J(re){for(var K=0,W=!1,se=!1,ye=0,we=re.length;ye<we;++ye){var _e=re[ye];if(_e.ignoreCase)se=!0;else if(/[a-z]/i.test(_e.source.replace(/\\u[0-9a-f]{4}|\\x[0-9a-f]{2}|\\[^ux]/gi,""))){W=!0,se=!1;break}}var $e={b:8,t:9,n:10,v:11,f:12,r:13};function qe(Ce){var De=Ce.charCodeAt(0);if(De!==92)return De;var Qe=Ce.charAt(1);return De=$e[Qe],De||("0"<=Qe&&Qe<="7"?parseInt(Ce.substring(1),8):Qe==="u"||Qe==="x"?parseInt(Ce.substring(2),16):Ce.charCodeAt(1))}function Ve(Ce){if(Ce<32)return(Ce<16?"\\x0":"\\x")+Ce.toString(16);var De=String.fromCharCode(Ce);return De==="\\"||De==="-"||De==="]"||De==="^"?"\\"+De:De}function Xe(Ce){var De=Ce.substring(1,Ce.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")),Qe=[],We=De[0]==="^",Re=["["];We&&Re.push("^");for(var Me=We?1:0,Ee=De.length;Me<Ee;++Me){var Ae=De[Me];if(/\\[bdsw]/i.test(Ae))Re.push(Ae);else{var he=qe(Ae),q;Me+2<Ee&&De[Me+1]==="-"?(q=qe(De[Me+2]),Me+=2):q=he,Qe.push([he,q]),q<65||he>122||(q<65||he>90||Qe.push([Math.max(65,he)|32,Math.min(q,90)|32]),q<97||he>122||Qe.push([Math.max(97,he)&~32,Math.min(q,122)&~32]))}}Qe.sort(function(Se,Pe){return Se[0]-Pe[0]||Pe[1]-Se[1]});for(var ee=[],oe=[],Me=0;Me<Qe.length;++Me){var ce=Qe[Me];ce[0]<=oe[1]+1?oe[1]=Math.max(oe[1],ce[1]):ee.push(oe=ce)}for(var Me=0;Me<ee.length;++Me){var ce=ee[Me];Re.push(Ve(ce[0])),ce[1]>ce[0]&&(ce[1]+1>ce[0]&&Re.push("-"),Re.push(Ve(ce[1])))}return Re.push("]"),Re.join("")}function at(Ce){for(var De=Ce.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")),Qe=De.length,We=[],Re=0,Me=0;Re<Qe;++Re){var Ee=De[Re];if(Ee==="(")++Me;else if(Ee.charAt(0)==="\\"){var Ae=+Ee.substring(1);Ae&&(Ae<=Me?We[Ae]=-1:De[Re]=Ve(Ae))}}for(var Re=1;Re<We.length;++Re)We[Re]===-1&&(We[Re]=++K);for(var Re=0,Me=0;Re<Qe;++Re){var Ee=De[Re];if(Ee==="(")++Me,We[Me]||(De[Re]="(?:");else if(Ee.charAt(0)==="\\"){var Ae=+Ee.substring(1);Ae&&Ae<=Me&&(De[Re]="\\"+We[Ae])}}for(var Re=0;Re<Qe;++Re)De[Re]==="^"&&De[Re+1]!=="^"&&(De[Re]="");if(Ce.ignoreCase&&W)for(var Re=0;Re<Qe;++Re){var Ee=De[Re],he=Ee.charAt(0);Ee.length>=2&&he==="["?De[Re]=Xe(Ee):he!=="\\"&&(De[Re]=Ee.replace(/[a-zA-Z]/g,function(oe){var ce=oe.charCodeAt(0);return"["+String.fromCharCode(ce&~32,ce|32)+"]"}))}return De.join("")}for(var ct=[],ye=0,we=re.length;ye<we;++ye){var _e=re[ye];if(_e.global||_e.multiline)throw new Error(""+_e);ct.push("(?:"+at(_e)+")")}return new RegExp(ct.join("|"),se?"gi":"g")}function M(re,K){var W=/(?:^|\s)nocode(?:\s|$)/,se=[],ye=0,we=[],_e=0;function $e(qe){var Ve=qe.nodeType;if(Ve==1){if(W.test(qe.className))return;for(var Xe=qe.firstChild;Xe;Xe=Xe.nextSibling)$e(Xe);var at=qe.nodeName.toLowerCase();(at==="br"||at==="li")&&(se[_e]=`
`,we[_e<<1]=ye++,we[_e++<<1|1]=qe)}else if(Ve==3||Ve==4){var ct=qe.nodeValue;ct.length&&(K?ct=ct.replace(/\r\n?/g,`
`):ct=ct.replace(/[ \t\r\n]+/g," "),se[_e]=ct,we[_e<<1]=ye,ye+=ct.length,we[_e++<<1|1]=qe)}}return $e(re),{sourceCode:se.join("").replace(/\n$/,""),spans:we}}function Y(re,K,W,se,ye){if(!W)return;var we={sourceNode:re,pre:1,langExtension:null,numberLines:null,sourceCode:W,spans:null,basePos:K,decorations:null};se(we),ye.push.apply(ye,we.decorations)}var te=/\S/;function de(re){for(var K=void 0,W=re.firstChild;W;W=W.nextSibling){var se=W.nodeType;K=se===1?K?re:W:se===3&&te.test(W.nodeValue)?re:K}return K===re?void 0:K}function fe(re,K){var W={},se;(function(){for(var _e=re.concat(K),$e=[],qe={},Ve=0,Xe=_e.length;Ve<Xe;++Ve){var at=_e[Ve],ct=at[3];if(ct)for(var Ce=ct.length;--Ce>=0;)W[ct.charAt(Ce)]=at;var De=at[1],Qe=""+De;qe.hasOwnProperty(Qe)||($e.push(De),qe[Qe]=null)}$e.push(/[\0-\uffff]/),se=J($e)})();var ye=K.length,we=function(_e){for(var $e=_e.sourceCode,qe=_e.basePos,Ve=_e.sourceNode,Xe=[qe,l],at=0,ct=$e.match(se)||[],Ce={},De=0,Qe=ct.length;De<Qe;++De){var We=ct[De],Re=Ce[We],Me=void 0,Ee;if(typeof Re=="string")Ee=!1;else{var Ae=W[We.charAt(0)];if(Ae)Me=We.match(Ae[1]),Re=Ae[0];else{for(var he=0;he<ye;++he)if(Ae=K[he],Me=We.match(Ae[1]),Me){Re=Ae[0];break}Me||(Re=l)}Ee=Re.length>=5&&Re.substring(0,5)==="lang-",Ee&&!(Me&&typeof Me[1]=="string")&&(Ee=!1,Re=f),Ee||(Ce[We]=Re)}var q=at;if(at+=We.length,!Ee)Xe.push(qe+q,Re);else{var ee=Me[1],oe=We.indexOf(ee),ce=oe+ee.length;Me[2]&&(ce=We.length-Me[2].length,oe=ce-ee.length);var Se=Re.substring(5);Y(Ve,qe+q,We.substring(0,oe),we,Xe),Y(Ve,qe+q+oe,ee,ue(Se,ee),Xe),Y(Ve,qe+q+ce,We.substring(ce),we,Xe)}}_e.decorations=Xe};return we}function Le(re){var K=[],W=[];re.tripleQuotedStrings?K.push([_,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,`'"`]):re.multiLineStrings?K.push([_,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"]):K.push([_,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,`"'`]),re.verbatimStrings&&W.push([_,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null]);var se=re.hashComments;se&&(re.cStyleComments?(se>1?K.push([m,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"]):K.push([m,/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"]),W.push([_,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,null])):K.push([m,/^#[^\r\n]*/,null,"#"])),re.cStyleComments&&(W.push([m,/^\/\/[^\r\n]*/,null]),W.push([m,/^\/\*[\s\S]*?(?:\*\/|$)/,null]));var ye=re.regexLiterals;if(ye){var we=ye>1?"":`
\r`,_e=we?".":"[\\S\\s]",$e="/(?=[^/*"+we+"])(?:[^/\\x5B\\x5C"+we+"]|\\x5C"+_e+"|\\x5B(?:[^\\x5C\\x5D"+we+"]|\\x5C"+_e+")*(?:\\x5D|$))+/";W.push(["lang-regex",RegExp("^"+j+"("+$e+")")])}var qe=re.types;qe&&W.push([c,qe]);var Ve=(""+re.keywords).replace(/^ | $/g,"");Ve.length&&W.push([x,new RegExp("^(?:"+Ve.replace(/[\s,]+/g,"|")+")\\b"),null]),K.push([l,/^\s+/,null,` \r
\xA0`]);var Xe="^.[^\\s\\w.$@'\"`/\\\\]*";return re.regexLiterals&&(Xe+="(?!s*/)"),W.push([e,/^@[a-z_$][a-z_$@0-9]*/i,null],[c,/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],[l,/^[a-z_$][a-z_$@0-9]*/i,null],[e,new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*","i"),null,"0123456789"],[l,/^\\[\s\S]?/,null],[o,new RegExp(Xe),null]),fe(K,W)}var xe=Le({keywords:B,hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0});function Ie(re,K,W){for(var se=/(?:^|\s)nocode(?:\s|$)/,ye=/\r\n?|\n/,we=re.ownerDocument,_e=we.createElement("li");re.firstChild;)_e.appendChild(re.firstChild);var $e=[_e];function qe(De){var Qe=De.nodeType;if(Qe==1&&!se.test(De.className))if(De.nodeName==="br")Ve(De),De.parentNode&&De.parentNode.removeChild(De);else for(var We=De.firstChild;We;We=We.nextSibling)qe(We);else if((Qe==3||Qe==4)&&W){var Re=De.nodeValue,Me=Re.match(ye);if(Me){var Ee=Re.substring(0,Me.index);De.nodeValue=Ee;var Ae=Re.substring(Me.index+Me[0].length);if(Ae){var he=De.parentNode;he.insertBefore(we.createTextNode(Ae),De.nextSibling)}Ve(De),Ee||De.parentNode.removeChild(De)}}}function Ve(De){for(;!De.nextSibling;)if(De=De.parentNode,!De)return;function Qe(Me,Ee){var Ae=Ee?Me.cloneNode(!1):Me,he=Me.parentNode;if(he){var q=Qe(he,1),ee=Me.nextSibling;q.appendChild(Ae);for(var oe=ee;oe;oe=ee)ee=oe.nextSibling,q.appendChild(oe)}return Ae}for(var We=Qe(De.nextSibling,0),Re;(Re=We.parentNode)&&Re.nodeType===1;)We=Re;$e.push(We)}for(var Xe=0;Xe<$e.length;++Xe)qe($e[Xe]);K===(K|0)&&$e[0].setAttribute("value",K);var at=we.createElement("ol");at.className="linenums";for(var ct=Math.max(0,K-1|0)||0,Xe=0,Ce=$e.length;Xe<Ce;++Xe)_e=$e[Xe],_e.className="L"+(Xe+ct)%10,_e.firstChild||_e.appendChild(we.createTextNode("\xA0")),at.appendChild(_e);re.appendChild(at)}function Fe(re){var K=/\bMSIE\s(\d+)/.exec(navigator.userAgent);K=K&&+K[1]<=8;var W=/\n/g,se=re.sourceCode,ye=se.length,we=0,_e=re.spans,$e=_e.length,qe=0,Ve=re.decorations,Xe=Ve.length,at=0;Ve[Xe]=ye;var ct,Ce;for(Ce=ct=0;Ce<Xe;)Ve[Ce]!==Ve[Ce+2]?(Ve[ct++]=Ve[Ce++],Ve[ct++]=Ve[Ce++]):Ce+=2;for(Xe=ct,Ce=ct=0;Ce<Xe;){for(var De=Ve[Ce],Qe=Ve[Ce+1],We=Ce+2;We+2<=Xe&&Ve[We+1]===Qe;)We+=2;Ve[ct++]=De,Ve[ct++]=Qe,Ce=We}Xe=Ve.length=ct;var Re=re.sourceNode,Me="";Re&&(Me=Re.style.display,Re.style.display="none");try{for(var Ee=null;qe<$e;){var Ae=_e[qe],he=_e[qe+2]||ye,q=Ve[at+2]||ye,We=Math.min(he,q),ee=_e[qe+1],oe;if(ee.nodeType!==1&&(oe=se.substring(we,We))){K&&(oe=oe.replace(W,"\r")),ee.nodeValue=oe;var ce=ee.ownerDocument,Se=ce.createElement("span");Se.className=Ve[at+1];var Pe=ee.parentNode;Pe.replaceChild(Se,ee),Se.appendChild(ee),we<he&&(_e[qe+1]=ee=ce.createTextNode(se.substring(We,he)),Pe.insertBefore(ee,Se.nextSibling))}we=We,we>=he&&(qe+=2),we>=q&&(at+=2)}}finally{Re&&(Re.style.display=Me)}}var Ue={};function be(re,K){for(var W=K.length;--W>=0;){var se=K[W];Ue.hasOwnProperty(se)?F.console&&console.warn("cannot override language handler %s",se):Ue[se]=re}}function ue(re,K){return re&&Ue.hasOwnProperty(re)||(re=/^\s*</.test(K)?"default-markup":"default-code"),Ue[re]}be(xe,["default-code"]),be(fe([],[[l,/^[^<?]+/],[p,/^<!\w[^>]*(?:>|$)/],[m,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[o,/^(?:<[%?]|[%?]>)/],["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"]),be(fe([[l,/^[\s]+/,null,` \r
`],[L,/^(?:\"[^\"]*\"?|\'[^\']*\'?)/,null,`"'`]],[[y,/^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],[R,/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],[o,/^[=<>\/]+/],["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"]),be(fe([],[[L,/^[\s\S]+/]]),["uq.val"]),be(Le({keywords:b,hashComments:!0,cStyleComments:!0,types:w}),["c","cc","cpp","cxx","cyc","m"]),be(Le({keywords:"null,true,false"}),["json"]),be(Le({keywords:a,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:w}),["cs"]),be(Le({keywords:u,cStyleComments:!0}),["java"]),be(Le({keywords:A,hashComments:!0,multiLineStrings:!0}),["bash","bsh","csh","sh"]),be(Le({keywords:t,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),["cv","py","python"]),be(Le({keywords:i,hashComments:!0,multiLineStrings:!0,regexLiterals:2}),["perl","pl","pm"]),be(Le({keywords:r,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb","ruby"]),be(Le({keywords:s,cStyleComments:!0,regexLiterals:!0}),["javascript","js","ts","typescript"]),be(Le({keywords:n,hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]),be(fe([],[[_,/^[\s\S]+/]]),["regex"]);function je(re){var K=re.langExtension;try{var W=M(re.sourceNode,re.pre),se=W.sourceCode;re.sourceCode=se,re.spans=W.spans,re.basePos=0,ue(K,se)(re),Fe(re)}catch(ye){F.console&&console.log(ye&&ye.stack||ye)}}function st(re,K,W){var se=W||!1,ye=K||null,we=document.createElement("div");we.innerHTML="<pre>"+re+"</pre>",we=we.firstChild,se&&Ie(we,se,!0);var _e={langExtension:ye,numberLines:se,sourceNode:we,pre:1,sourceCode:null,basePos:null,spans:null,decorations:null};return je(_e),we.innerHTML}function nt(re,K){var W=K||document.body,se=W.ownerDocument||document;function ye(Ae){return W.getElementsByTagName(Ae)}for(var we=[ye("pre"),ye("code"),ye("xmp")],_e=[],$e=0;$e<we.length;++$e)for(var qe=0,Ve=we[$e].length;qe<Ve;++qe)_e.push(we[$e][qe]);we=null;var Xe=Date;Xe.now||(Xe={now:function(){return+new Date}});var at=0,ct=/\blang(?:uage)?-([\w.]+)(?!\S)/,Ce=/\bprettyprint\b/,De=/\bprettyprinted\b/,Qe=/pre|xmp/i,We=/^code$/i,Re=/^(?:pre|code|xmp)$/i,Me={};function Ee(){for(var Ae=F.PR_SHOULD_USE_CONTINUATION?Xe.now()+250:Infinity;at<_e.length&&Xe.now()<Ae;at++){for(var he=_e[at],q=Me,ee=he;ee=ee.previousSibling;){var oe=ee.nodeType,ce=(oe===7||oe===8)&&ee.nodeValue;if(ce?!/^\??prettify\b/.test(ce):oe!==3||/\S/.test(ee.nodeValue))break;if(ce){q={},ce.replace(/\b(\w+)=([\w:.%+-]+)/g,function(Xt,Dt,rr){q[Dt]=rr});break}}var Se=he.className;if((q!==Me||Ce.test(Se))&&!De.test(Se)){for(var Pe=!1,Je=he.parentNode;Je;Je=Je.parentNode){var lt=Je.tagName;if(Re.test(lt)&&Je.className&&Ce.test(Je.className)){Pe=!0;break}}if(!Pe){he.className+=" prettyprinted";var ht=q.lang;if(!ht){ht=Se.match(ct);var At;!ht&&(At=de(he))&&We.test(At.tagName)&&(ht=At.className.match(ct)),ht&&(ht=ht[1])}var xt;if(Qe.test(he.tagName))xt=1;else{var St=he.currentStyle,it=se.defaultView,jt=St?St.whiteSpace:it&&it.getComputedStyle?it.getComputedStyle(he,null).getPropertyValue("white-space"):0;xt=jt&&jt.substring(0,3)==="pre"}var Wt=q.linenums;(Wt=Wt==="true"||+Wt)||(Wt=Se.match(/\blinenums\b(?::(\d+))?/),Wt=Wt?Wt[1]&&Wt[1].length?+Wt[1]:!0:!1),Wt&&Ie(he,Wt,xt);var It={langExtension:ht,sourceNode:he,numberLines:Wt,pre:xt,sourceCode:null,basePos:null,spans:null,decorations:null};je(It)}}}at<_e.length?F.setTimeout(Ee,250):typeof re=="function"&&re()}Ee()}var rt=F.PR={createSimpleLexer:fe,registerLangHandler:be,sourceDecorator:Le,PR_ATTRIB_NAME:R,PR_ATTRIB_VALUE:L,PR_COMMENT:m,PR_DECLARATION:p,PR_KEYWORD:x,PR_LITERAL:e,PR_NOCODE:H,PR_PLAIN:l,PR_PUNCTUATION:o,PR_SOURCE:f,PR_STRING:_,PR_TAG:y,PR_TYPE:c,prettyPrintOne:O?F.prettyPrintOne=st:S=st,prettyPrint:z=O?F.prettyPrint=nt:z=nt},He=F.define;typeof He=="function"&&He.amd&&He("google-code-prettify",[],function(){return rt})})()},T7RX:function(mt,Ze,Z){"use strict";var ve=Z("2qtc"),X=Z("kLXV"),O=Z("k1fw"),G=Z("miYZ"),D=Z("tsqr"),S=Z("9og8"),z=Z("PpiC"),F=Z("WmNS"),U=Z.n(F),I=Z("q1tI"),v=Z.n(I),b=Z("ErOA"),u=Z("Ty5D"),a=Z("9kvl"),n=function(i){var t=i.shixunHomeworks,r=i.dispatch,A=Object(z.a)(i,["shixunHomeworks","dispatch"]),B=Object(u.i)();return v.a.createElement(X.a,{centered:!0,title:"\u63D0\u793A",visible:t.actionTabs.key==="\u6253\u56DE\u91CD\u505A",okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",onOk:Object(S.a)(U.a.mark(function w(){var _;return U.a.wrap(function(m){for(;;)switch(m.prev=m.next){case 0:return m.next=2,Object(b.a)("/api/myshixuns/".concat(t.actionTabs.selectArrs.myshixun_identifier,"/reset_my_game.json"),{method:"GET",params:{course_id:B.coursesId}});case 2:_=m.sent,_.shixun_identifier&&(D.b.success("\u64CD\u4F5C\u6210\u529F"),r({type:"shixunHomeworks/setActionTabs",payload:{}}),r({type:"shixunHomeworks/getWorkList",payload:Object(O.a)({},t.actionTabs.params)}));case 4:case"end":return m.stop()}},w)})),onCancel:function(){r({type:"shixunHomeworks/setActionTabs",payload:{}})}},v.a.createElement("p",null,"\u8BE5\u4F5C\u4E1A\u5C06\u88AB\u6253\u56DE\u91CD\u505A\uFF0C\u5B66\u751F\u5B9E\u8BAD\u8BB0\u5F55\u5C06\u88AB\u6E05\u7A7A!"),v.a.createElement("p",null,"\u786E\u5B9A\u6253\u56DE?"))};Ze.a=Object(a.a)(function(s){var i=s.shixunHomeworks;return{shixunHomeworks:i}})(n)},TXwP:function(mt,Ze,Z){var ve,X;(function(){var O;(function(){"use strict";var D=[,,function(U){function I(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=[]}I.prototype.clone_empty=function(){var u=new I(this.__parent);return u.set_indent(this.__indent_count,this.__alignment_count),u},I.prototype.item=function(u){return u<0?this.__items[this.__items.length+u]:this.__items[u]},I.prototype.has_match=function(u){for(var a=this.__items.length-1;a>=0;a--)if(this.__items[a].match(u))return!0;return!1},I.prototype.set_indent=function(u,a){this.is_empty()&&(this.__indent_count=u||0,this.__alignment_count=a||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},I.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)},I.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},I.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},I.prototype.is_empty=function(){return this.__items.length===0},I.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},I.prototype.push=function(u){this.__items.push(u);var a=u.lastIndexOf(`
`);a!==-1?this.__character_count=u.length-a:this.__character_count+=u.length},I.prototype.pop=function(){var u=null;return this.is_empty()||(u=this.__items.pop(),this.__character_count-=u.length),u},I.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},I.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},I.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},I.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 v(u,a){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)),a=a||"",u.indent_level>0&&(a=new Array(u.indent_level+1).join(this.__indent_string)),this.__base_string=a,this.__base_string_length=a.length}v.prototype.get_indent_size=function(u,a){var n=this.__base_string_length;return a=a||0,u<0&&(n=0),n+=u*this.__indent_size,n+=a,n},v.prototype.get_indent_string=function(u,a){var n=this.__base_string;return a=a||0,u<0&&(u=0,n=""),a+=u*this.__indent_size,this.__ensure_cache(a),n+=this.__cache[a],n},v.prototype.__ensure_cache=function(u){for(;u>=this.__cache.length;)this.__add_column()},v.prototype.__add_column=function(){var u=this.__cache.length,a=0,n="";this.__indent_size&&u>=this.__indent_size&&(a=Math.floor(u/this.__indent_size),u-=a*this.__indent_size,n=new Array(a+1).join(this.__indent_string)),u&&(n+=new Array(u+1).join(" ")),this.__cache.push(n)};function b(u,a){this.__indent_cache=new v(u,a),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 I(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}b.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},b.prototype.get_line_number=function(){return this.__lines.length},b.prototype.get_indent_string=function(u,a){return this.__indent_cache.get_indent_string(u,a)},b.prototype.get_indent_size=function(u,a){return this.__indent_cache.get_indent_size(u,a)},b.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},b.prototype.add_new_line=function(u){return this.is_empty()||!u&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},b.prototype.get_code=function(u){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 n=this.__lines.join(`
`);return u!==`
`&&(n=n.replace(/[\n]/g,u)),n},b.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},b.prototype.set_indent=function(u,a){return u=u||0,a=a||0,this.next_line.set_indent(u,a),this.__lines.length>1?(this.current_line.set_indent(u,a),!0):(this.current_line.set_indent(),!1)},b.prototype.add_raw_token=function(u){for(var a=0;a<u.newlines;a++)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},b.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()},b.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(" "))},b.prototype.remove_indent=function(u){for(var a=this.__lines.length;u<a;)this.__lines[u]._remove_indent(),u++;this.current_line._remove_wrap_indent()},b.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},b.prototype.just_added_newline=function(){return this.current_line.is_empty()},b.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},b.prototype.ensure_empty_line_above=function(u,a){for(var n=this.__lines.length-2;n>=0;){var s=this.__lines[n];if(s.is_empty())break;if(s.item(0).indexOf(u)!==0&&s.item(-1)!==a){this.__lines.splice(n+1,0,new I(this)),this.previous_line=this.__lines[this.__lines.length-2];break}n--}},U.exports.Output=b},,,,function(U){function I(u,a){this.raw_options=v(u,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"])}I.prototype._get_array=function(u,a){var n=this.raw_options[u],s=a||[];return typeof n=="object"?n!==null&&typeof n.concat=="function"&&(s=n.concat()):typeof n=="string"&&(s=n.split(/[^a-zA-Z0-9_\/\-]+/)),s},I.prototype._get_boolean=function(u,a){var n=this.raw_options[u],s=n===void 0?!!a:!!n;return s},I.prototype._get_characters=function(u,a){var n=this.raw_options[u],s=a||"";return typeof n=="string"&&(s=n.replace(/\\r/,"\r").replace(/\\n/,`
`).replace(/\\t/," ")),s},I.prototype._get_number=function(u,a){var n=this.raw_options[u];a=parseInt(a,10),isNaN(a)&&(a=0);var s=parseInt(n,10);return isNaN(s)&&(s=a),s},I.prototype._get_selection=function(u,a,n){var s=this._get_selection_list(u,a,n);if(s.length!==1)throw new Error("Invalid Option Value: The option '"+u+`' can only be one of the following values:
`+a+`
You passed in: '`+this.raw_options[u]+"'");return s[0]},I.prototype._get_selection_list=function(u,a,n){if(!a||a.length===0)throw new Error("Selection list cannot be empty.");if(n=n||[a[0]],!this._is_valid_selection(n,a))throw new Error("Invalid Default Value!");var s=this._get_array(u,n);if(!this._is_valid_selection(s,a))throw new Error("Invalid Option Value: The option '"+u+`' can contain only the following values:
`+a+`
You passed in: '`+this.raw_options[u]+"'");return s},I.prototype._is_valid_selection=function(u,a){return u.length&&a.length&&!u.some(function(n){return a.indexOf(n)===-1})};function v(u,a){var n={};u=b(u);var s;for(s in u)s!==a&&(n[s]=u[s]);if(a&&u[a])for(s in u[a])n[s]=u[a][s];return n}function b(u){var a={},n;for(n in u){var s=n.replace(/-/g,"_");a[s]=u[n]}return a}U.exports.Options=I,U.exports.normalizeOpts=b,U.exports.mergeOpts=v},,function(U){var I=RegExp.prototype.hasOwnProperty("sticky");function v(b){this.__input=b||"",this.__input_length=this.__input.length,this.__position=0}v.prototype.restart=function(){this.__position=0},v.prototype.back=function(){this.__position>0&&(this.__position-=1)},v.prototype.hasNext=function(){return this.__position<this.__input_length},v.prototype.next=function(){var b=null;return this.hasNext()&&(b=this.__input.charAt(this.__position),this.__position+=1),b},v.prototype.peek=function(b){var u=null;return b=b||0,b+=this.__position,b>=0&&b<this.__input_length&&(u=this.__input.charAt(b)),u},v.prototype.__match=function(b,u){b.lastIndex=u;var a=b.exec(this.__input);return a&&!(I&&b.sticky)&&(a.index!==u&&(a=null)),a},v.prototype.test=function(b,u){return u=u||0,u+=this.__position,u>=0&&u<this.__input_length?!!this.__match(b,u):!1},v.prototype.testChar=function(b,u){var a=this.peek(u);return b.lastIndex=0,a!==null&&b.test(a)},v.prototype.match=function(b){var u=this.__match(b,this.__position);return u?this.__position+=u[0].length:u=null,u},v.prototype.read=function(b,u,a){var n="",s;return b&&(s=this.match(b),s&&(n+=s[0])),u&&(s||!b)&&(n+=this.readUntil(u,a)),n},v.prototype.readUntil=function(b,u){var a="",n=this.__position;b.lastIndex=this.__position;var s=b.exec(this.__input);return s?(n=s.index,u&&(n+=s[0].length)):n=this.__input_length,a=this.__input.substring(this.__position,n),this.__position=n,a},v.prototype.readUntilAfter=function(b){return this.readUntil(b,!0)},v.prototype.get_regexp=function(b,u){var a=null,n="g";return u&&I&&(n="y"),typeof b=="string"&&b!==""?a=new RegExp(b,n):b&&(a=new RegExp(b.source,n)),a},v.prototype.get_literal_regexp=function(b){return RegExp(b.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},v.prototype.peekUntilAfter=function(b){var u=this.__position,a=this.readUntilAfter(b);return this.__position=u,a},v.prototype.lookBack=function(b){var u=this.__position-1;return u>=b.length&&this.__input.substring(u-b.length,u).toLowerCase()===b},U.exports.InputScanner=v},,,,,function(U){function I(v,b){v=typeof v=="string"?v:v.source,b=typeof b=="string"?b:b.source,this.__directives_block_pattern=new RegExp(v+/ beautify( \w+[:]\w+)+ /.source+b,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(v+/\sbeautify\signore:end\s/.source+b,"g")}I.prototype.get_directives=function(v){if(!v.match(this.__directives_block_pattern))return null;var b={};this.__directive_pattern.lastIndex=0;for(var u=this.__directive_pattern.exec(v);u;)b[u[1]]=u[2],u=this.__directive_pattern.exec(v);return b},I.prototype.readIgnored=function(v){return v.readUntilAfter(this.__directives_end_ignore_pattern)},U.exports.Directives=I},,function(U,I,v){var b=v(16).Beautifier,u=v(17).Options;function a(n,s){var i=new b(n,s);return i.beautify()}U.exports=a,U.exports.defaultOptions=function(){return new u}},function(U,I,v){var b=v(17).Options,u=v(2).Output,a=v(8).InputScanner,n=v(13).Directives,s=new n(/\/\*/,/\*\//),i=/\r\n|[\r\n]/,t=/\r\n|[\r\n]/g,r=/\s/,A=/(?:\s|\n)+/g,B=/\/\*(?:[\s\S]*?)((?:\*\/)|$)/g,w=/\/\/(?:[^\n\r\u2028\u2029]*)/g;function _(x,m){this._source_text=x||"",this._options=new b(m),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"]}_.prototype.eatString=function(x){var m="";for(this._ch=this._input.next();this._ch;){if(m+=this._ch,this._ch==="\\")m+=this._input.next();else if(x.indexOf(this._ch)!==-1||this._ch===`
`)break;this._ch=this._input.next()}return m},_.prototype.eatWhitespace=function(x){for(var m=r.test(this._input.peek()),c=0;r.test(this._input.peek());)this._ch=this._input.next(),x&&this._ch===`
`&&((c===0||c<this._options.max_preserve_newlines)&&(c++,this._output.add_new_line(!0)));return m},_.prototype.foundNestedPseudoClass=function(){for(var x=0,m=1,c=this._input.peek(m);c;){if(c==="{")return!0;if(c==="(")x+=1;else if(c===")"){if(x===0)return!1;x-=1}else if(c===";"||c==="}")return!1;m++,c=this._input.peek(m)}return!1},_.prototype.print_string=function(x){this._output.set_indent(this._indentLevel),this._output.non_breaking_space=!0,this._output.add_token(x)},_.prototype.preserveSingleSpace=function(x){x&&(this._output.space_before_token=!0)},_.prototype.indent=function(){this._indentLevel++},_.prototype.outdent=function(){this._indentLevel>0&&this._indentLevel--},_.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var x=this._source_text,m=this._options.eol;m==="auto"&&(m=`
`,x&&i.test(x||"")&&(m=x.match(i)[0])),x=x.replace(t,`
`);var c=x.match(/^[\t ]*/)[0];this._output=new u(this._options,c),this._input=new a(x),this._indentLevel=0,this._nestedLevel=0,this._ch=null;for(var e=0,o=!1,l=!1,y=!1,p=!1,f=!1,R=!1,L=this._ch,H=!1,j,J,M;j=this._input.read(A),J=j!=="",M=L,this._ch=this._input.next(),this._ch==="\\"&&this._input.hasNext()&&(this._ch+=this._input.next()),L=this._ch,this._ch;)if(this._ch==="/"&&this._input.peek()==="*"){this._output.add_new_line(),this._input.back();var Y=this._input.read(B),te=s.get_directives(Y);te&&te.ignore==="start"&&(Y+=s.readIgnored(this._input)),this.print_string(Y),this.eatWhitespace(!0),this._output.add_new_line()}else if(this._ch==="/"&&this._input.peek()==="/")this._output.space_before_token=!0,this._input.back(),this.print_string(this._input.read(w)),this.eatWhitespace(!0);else if(this._ch==="@"||this._ch==="$")if(this.preserveSingleSpace(J),this._input.peek()==="{")this.print_string(this._ch+this.eatString("}"));else{this.print_string(this._ch);var de=this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);de.match(/[ :]$/)&&(de=this.eatString(": ").replace(/\s$/,""),this.print_string(de),this._output.space_before_token=!0),de=de.replace(/\s$/,""),de==="extend"?p=!0:de==="import"&&(f=!0),de in this.NESTED_AT_RULE?(this._nestedLevel+=1,de in this.CONDITIONAL_GROUP_RULE&&(y=!0)):!o&&e===0&&de.indexOf(":")!==-1&&(l=!0,this.indent())}else if(this._ch==="#"&&this._input.peek()==="{")this.preserveSingleSpace(J),this.print_string(this._ch+this.eatString("}"));else if(this._ch==="{")l&&(l=!1,this.outdent()),y?(y=!1,o=this._indentLevel>=this._nestedLevel):o=this._indentLevel>=this._nestedLevel-1,this._options.newline_between_rules&&o&&(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)):(M==="("?this._output.space_before_token=!1:M!==","&&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(),M==="{"&&this._output.trim(!0),f=!1,p=!1,l&&(this.outdent(),l=!1),this.print_string(this._ch),o=!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])){H=!0;break}(o||y)&&!(this._input.lookBack("&")||this.foundNestedPseudoClass())&&!this._input.lookBack("(")&&!p&&e===0?(this.print_string(":"),l||(l=!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=M==='"'||M==="'";this.preserveSingleSpace(Le||J),this.print_string(this._ch+this.eatString(this._ch)),this.eatWhitespace(!0)}else if(this._ch===";")H=!1,e===0?(l&&(this.outdent(),l=!1),p=!1,f=!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(),e++,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(")")),e&&(e--,this.outdent()));else{var xe=!1;this._input.lookBack("with")&&(xe=!0),this.preserveSingleSpace(J||xe),this.print_string(this._ch),l&&M==="$"&&this._options.selector_separator_newline?(this._output.add_new_line(),R=!0):(this.eatWhitespace(),e++,this.indent())}else if(this._ch===")")e&&(e--,this.outdent()),R&&this._input.peek()===";"&&this._options.selector_separator_newline&&(R=!1,this.outdent(),this._output.add_new_line()),this.print_string(this._ch);else if(this._ch===",")this.print_string(this._ch),this.eatWhitespace(!0),this._options.selector_separator_newline&&(!l||R)&&e===0&&!f&&!p?this._output.add_new_line():this._output.space_before_token=!0;else if((this._ch===">"||this._ch==="+"||this._ch==="~")&&!l&&e===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(J),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 Ie=M==='"'||M==="'";this.preserveSingleSpace(Ie||J),this.print_string(this._ch),!this._output.just_added_newline()&&this._input.peek()===`
`&&H&&this._output.add_new_line()}var Fe=this._output.get_code(m);return Fe},U.exports.Beautifier=_},function(U,I,v){var b=v(6).Options;function u(a){b.call(this,a,"css"),this.selector_separator_newline=this._get_boolean("selector_separator_newline",!0),this.newline_between_rules=this._get_boolean("newline_between_rules",!0);var n=this._get_boolean("space_around_selector_separator");this.space_around_combinator=this._get_boolean("space_around_combinator")||n;var s=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_style="collapse";for(var i=0;i<s.length;i++)s[i]!=="expand"?this.brace_style="collapse":this.brace_style=s[i]}u.prototype=new b,U.exports.Options=u}],S={};function z(U){var I=S[U];if(I!==void 0)return I.exports;var v=S[U]={exports:{}};return D[U](v,v.exports,z),v.exports}var F=z(15);O=F})();var G=O;!(ve=[],X=function(){return{css_beautify:G}}.apply(Ze,ve),X!==void 0&&(mt.exports=X))})()},WaYH:function(mt,Ze,Z){"use strict";var ve=Z("rePB"),X=Z("Ff2n"),O=Z("VTBJ"),G=Z("1OyB"),D=Z("vuIU"),S=Z("JX7q"),z=Z("Ji7U"),F=Z("LK+K"),U=Z("q1tI"),I=Z("TSYQ"),v=Z.n(I),b=Z("sboe"),u=Z("OZM5"),a=function(x){var m=x.prefixCls,c=x.level,e=x.isStart,o=x.isEnd;if(!c)return null;for(var l="".concat(m,"-indent-unit"),y=[],p=0;p<c;p+=1){var f;y.push(U.createElement("span",{key:p,className:v()(l,(f={},Object(ve.a)(f,"".concat(l,"-start"),e[p+1]),Object(ve.a)(f,"".concat(l,"-end"),o[p+1]),Object(ve.a)(f,"".concat(l,"-end-first-level"),!p&&o[0]),f))}))}return U.createElement("span",{"aria-hidden":"true",className:"".concat(m,"-indent")},y)},n=a,s=Z("815F"),i="open",t="close",r="---",A=function(_){Object(z.a)(m,_);var x=Object(F.a)(m);function m(){var c;return Object(G.a)(this,m),c=x.apply(this,arguments),c.state={dragNodeHighlight:!1},c.onSelectorClick=function(e){var o=c.props.context.onNodeClick;o(e,Object(s.b)(c.props)),c.isSelectable()?c.onSelect(e):c.onCheck(e)},c.onSelectorDoubleClick=function(e){var o=c.props.context.onNodeDoubleClick;o(e,Object(s.b)(c.props))},c.onSelect=function(e){if(c.isDisabled())return;var o=c.props.context.onNodeSelect;e.preventDefault(),o(e,Object(s.b)(c.props))},c.onCheck=function(e){if(c.isDisabled())return;var o=c.props,l=o.disableCheckbox,y=o.checked,p=c.props.context.onNodeCheck;if(!c.isCheckable()||l)return;e.preventDefault();var f=!y;p(e,Object(s.b)(c.props),f)},c.onMouseEnter=function(e){var o=c.props.context.onNodeMouseEnter;o(e,Object(s.b)(c.props))},c.onMouseLeave=function(e){var o=c.props.context.onNodeMouseLeave;o(e,Object(s.b)(c.props))},c.onContextMenu=function(e){var o=c.props.context.onNodeContextMenu;o(e,Object(s.b)(c.props))},c.onDragStart=function(e){var o=c.props.context.onNodeDragStart;e.stopPropagation(),c.setState({dragNodeHighlight:!0}),o(e,Object(S.a)(c));try{e.dataTransfer.setData("text/plain","")}catch(l){}},c.onDragEnter=function(e){var o=c.props.context.onNodeDragEnter;e.preventDefault(),e.stopPropagation(),o(e,Object(S.a)(c))},c.onDragOver=function(e){var o=c.props.context.onNodeDragOver;e.preventDefault(),e.stopPropagation(),o(e,Object(S.a)(c))},c.onDragLeave=function(e){var o=c.props.context.onNodeDragLeave;e.stopPropagation(),o(e,Object(S.a)(c))},c.onDragEnd=function(e){var o=c.props.context.onNodeDragEnd;e.stopPropagation(),c.setState({dragNodeHighlight:!1}),o(e,Object(S.a)(c))},c.onDrop=function(e){var o=c.props.context.onNodeDrop;e.preventDefault(),e.stopPropagation(),c.setState({dragNodeHighlight:!1}),o(e,Object(S.a)(c))},c.onExpand=function(e){var o=c.props.context.onNodeExpand;o(e,Object(s.b)(c.props))},c.setSelectHandle=function(e){c.selectHandle=e},c.getNodeState=function(){var e=c.props.expanded;return c.isLeaf()?null:e?i:t},c.hasChildren=function(){var e=c.props.eventKey,o=c.props.context.keyEntities,l=o[e]||{},y=l.children;return!!(y||[]).length},c.isLeaf=function(){var e=c.props,o=e.isLeaf,l=e.loaded,y=c.props.context.loadData,p=c.hasChildren();return o===!1?!1:o||!y&&!p||y&&l&&!p},c.isDisabled=function(){var e=c.props.disabled,o=c.props.context.disabled;return!!(o||e)},c.isCheckable=function(){var e=c.props.checkable,o=c.props.context.checkable;return!o||e===!1?!1:o},c.syncLoadData=function(e){var o=e.expanded,l=e.loading,y=e.loaded,p=c.props.context,f=p.loadData,R=p.onNodeLoad;if(l)return;f&&o&&!c.isLeaf()&&(!c.hasChildren()&&!y&&R(Object(s.b)(c.props)))},c.renderSwitcher=function(){var e=c.props,o=e.expanded,l=e.switcherIcon,y=c.props.context,p=y.prefixCls,f=y.switcherIcon,R=l||f;if(c.isLeaf())return U.createElement("span",{className:v()("".concat(p,"-switcher"),"".concat(p,"-switcher-noop"))},typeof R=="function"?R(Object(O.a)(Object(O.a)({},c.props),{},{isLeaf:!0})):R);var L=v()("".concat(p,"-switcher"),"".concat(p,"-switcher_").concat(o?i:t));return U.createElement("span",{onClick:c.onExpand,className:L},typeof R=="function"?R(Object(O.a)(Object(O.a)({},c.props),{},{isLeaf:!1})):R)},c.renderCheckbox=function(){var e=c.props,o=e.checked,l=e.halfChecked,y=e.disableCheckbox,p=c.props.context.prefixCls,f=c.isDisabled(),R=c.isCheckable();if(!R)return null;var L=typeof R!="boolean"?R:null;return U.createElement("span",{className:v()("".concat(p,"-checkbox"),o&&"".concat(p,"-checkbox-checked"),!o&&l&&"".concat(p,"-checkbox-indeterminate"),(f||y)&&"".concat(p,"-checkbox-disabled")),onClick:c.onCheck},L)},c.renderIcon=function(){var e=c.props.loading,o=c.props.context.prefixCls;return U.createElement("span",{className:v()("".concat(o,"-iconEle"),"".concat(o,"-icon__").concat(c.getNodeState()||"docu"),e&&"".concat(o,"-icon_loading"))})},c.renderSelector=function(){var e=c.state.dragNodeHighlight,o=c.props,l=o.title,y=o.selected,p=o.icon,f=o.loading,R=o.data,L=c.props.context,H=L.prefixCls,j=L.showIcon,J=L.icon,M=L.draggable,Y=L.loadData,te=L.titleRender,de=c.isDisabled(),fe="".concat(H,"-node-content-wrapper"),Le;if(j){var xe=p||J;Le=xe?U.createElement("span",{className:v()("".concat(H,"-iconEle"),"".concat(H,"-icon__customize"))},typeof xe=="function"?xe(c.props):xe):c.renderIcon()}else Y&&f&&(Le=c.renderIcon());var Ie;typeof l=="function"?Ie=l(R):te?Ie=te(R):Ie=l;var Fe=U.createElement("span",{className:"".concat(H,"-title")},Ie);return U.createElement("span",{ref:c.setSelectHandle,title:typeof l=="string"?l:"",className:v()("".concat(fe),"".concat(fe,"-").concat(c.getNodeState()||"normal"),!de&&(y||e)&&"".concat(H,"-node-selected"),!de&&M&&"draggable"),draggable:!de&&M||void 0,"aria-grabbed":!de&&M||void 0,onMouseEnter:c.onMouseEnter,onMouseLeave:c.onMouseLeave,onContextMenu:c.onContextMenu,onClick:c.onSelectorClick,onDoubleClick:c.onSelectorDoubleClick,onDragStart:M?c.onDragStart:void 0},Le,Fe)},c}return Object(D.a)(m,[{key:"componentDidMount",value:function(){this.syncLoadData(this.props)}},{key:"componentDidUpdate",value:function(){this.syncLoadData(this.props)}},{key:"isSelectable",value:function(){var e=this.props.selectable,o=this.props.context.selectable;return typeof e=="boolean"?e:o}},{key:"render",value:function(){var e,o=this.props,l=o.eventKey,y=o.className,p=o.style,f=o.dragOver,R=o.dragOverGapTop,L=o.dragOverGapBottom,H=o.isLeaf,j=o.isStart,J=o.isEnd,M=o.expanded,Y=o.selected,te=o.checked,de=o.halfChecked,fe=o.loading,Le=o.domRef,xe=o.active,Ie=o.onMouseMove,Fe=Object(X.a)(o,["eventKey","className","style","dragOver","dragOverGapTop","dragOverGapBottom","isLeaf","isStart","isEnd","expanded","selected","checked","halfChecked","loading","domRef","active","onMouseMove"]),Ue=this.props.context,be=Ue.prefixCls,ue=Ue.filterTreeNode,je=Ue.draggable,st=Ue.keyEntities,nt=this.isDisabled(),rt=Object(u.f)(Fe),He=st[l]||{},re=He.level,K=J[J.length-1];return U.createElement("div",Object.assign({ref:Le,className:v()(y,"".concat(be,"-treenode"),(e={},Object(ve.a)(e,"".concat(be,"-treenode-disabled"),nt),Object(ve.a)(e,"".concat(be,"-treenode-switcher-").concat(M?"open":"close"),!H),Object(ve.a)(e,"".concat(be,"-treenode-checkbox-checked"),te),Object(ve.a)(e,"".concat(be,"-treenode-checkbox-indeterminate"),de),Object(ve.a)(e,"".concat(be,"-treenode-selected"),Y),Object(ve.a)(e,"".concat(be,"-treenode-loading"),fe),Object(ve.a)(e,"".concat(be,"-treenode-active"),xe),Object(ve.a)(e,"".concat(be,"-treenode-leaf-last"),K),Object(ve.a)(e,"drag-over",!nt&&f),Object(ve.a)(e,"drag-over-gap-top",!nt&&R),Object(ve.a)(e,"drag-over-gap-bottom",!nt&&L),Object(ve.a)(e,"filter-node",ue&&ue(Object(s.b)(this.props))),e)),style:p,onDragEnter:je?this.onDragEnter:void 0,onDragOver:je?this.onDragOver:void 0,onDragLeave:je?this.onDragLeave:void 0,onDrop:je?this.onDrop:void 0,onDragEnd:je?this.onDragEnd:void 0,onMouseMove:Ie},rt),U.createElement(n,{prefixCls:be,level:re,isStart:j,isEnd:J}),this.renderSwitcher(),this.renderCheckbox(),this.renderSelector())}}]),m}(U.Component),B=function(x){return U.createElement(b.a.Consumer,null,function(m){return U.createElement(A,Object.assign({},x,{context:m}))})};B.displayName="TreeNode",B.defaultProps={title:r},B.isTreeNode=1;var w=Ze.a=B},Y1PL:function(mt,Ze,Z){"use strict";Z.r(Ze),Z.d(Ze,"ResizableTextArea",function(){return de});var ve=Z("wx14"),X=Z("1OyB"),O=Z("vuIU"),G=Z("Ji7U"),D=Z("LK+K"),S=Z("q1tI"),z=Z("VTBJ"),F=Z("rePB"),U=Z("Zm9Q"),I=Z("Kwbf"),v=Z("c+Xe"),b=Z("m+aA"),u=Z("bdgK"),a=new Map;function n(xe){xe.forEach(function(Ie){var Fe,Ue=Ie.target;(Fe=a.get(Ue))===null||Fe===void 0||Fe.forEach(function(be){return be(Ue)})})}var s=new u.default(n),i=null,t=null;function r(xe,Ie){a.has(xe)||(a.set(xe,new Set),s.observe(xe)),a.get(xe).add(Ie)}function A(xe,Ie){a.has(xe)&&(a.get(xe).delete(Ie),a.get(xe).size||(s.unobserve(xe),a.delete(xe)))}var B=function(xe){Object(G.a)(Fe,xe);var Ie=Object(D.a)(Fe);function Fe(){return Object(X.a)(this,Fe),Ie.apply(this,arguments)}return Object(O.a)(Fe,[{key:"render",value:function(){return this.props.children}}]),Fe}(S.Component),w=S.createContext(null);function _(xe){var Ie=xe.children,Fe=xe.onBatchResize,Ue=S.useRef(0),be=S.useRef([]),ue=S.useContext(w),je=S.useCallback(function(st,nt,rt){Ue.current+=1;var He=Ue.current;be.current.push({size:st,element:nt,data:rt}),Promise.resolve().then(function(){He===Ue.current&&(Fe==null||Fe(be.current),be.current=[])}),ue==null||ue(st,nt,rt)},[Fe,ue]);return S.createElement(w.Provider,{value:je},Ie)}function x(xe){var Ie=xe.children,Fe=xe.disabled,Ue=S.useRef(null),be=S.useRef(null),ue=S.useContext(w),je=S.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),st=S.isValidElement(Ie)&&Object(v.c)(Ie),nt=st?Ie.ref:null,rt=S.useMemo(function(){return Object(v.a)(nt,Ue)},[nt,Ue]),He=S.useRef(xe);He.current=xe;var re=S.useCallback(function(K){var W=He.current,se=W.onResize,ye=W.data,we=K.getBoundingClientRect(),_e=we.width,$e=we.height,qe=K.offsetWidth,Ve=K.offsetHeight,Xe=Math.floor(_e),at=Math.floor($e);if(je.current.width!==Xe||je.current.height!==at||je.current.offsetWidth!==qe||je.current.offsetHeight!==Ve){var ct={width:Xe,height:at,offsetWidth:qe,offsetHeight:Ve};je.current=ct;var Ce=qe===Math.round(_e)?_e:qe,De=Ve===Math.round($e)?$e:Ve,Qe=Object(z.a)(Object(z.a)({},ct),{},{offsetWidth:Ce,offsetHeight:De});ue==null||ue(Qe,K,ye),se&&Promise.resolve().then(function(){se(Qe,K)})}},[]);return S.useEffect(function(){var K=Object(b.a)(Ue.current)||Object(b.a)(be.current);return K&&!Fe&&r(K,re),function(){return A(K,re)}},[Ue.current,Fe]),S.createElement(B,{ref:be},st?S.cloneElement(Ie,{ref:rt}):Ie)}var m="rc-observer-key";function c(xe){var Ie=xe.children,Fe=Object(U.a)(Ie);return Fe.map(function(Ue,be){var ue=(Ue==null?void 0:Ue.key)||"".concat(m,"-").concat(be);return S.createElement(x,Object(ve.a)({},xe,{key:ue}),Ue)})}c.Collection=_;var e=c,o=Z("bT9E"),l=Z("TSYQ"),y=Z.n(l),p=`
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
`,f=["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"],R={},L;function H(xe){var Ie=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Fe=xe.getAttribute("id")||xe.getAttribute("data-reactid")||xe.getAttribute("name");if(Ie&&R[Fe])return R[Fe];var Ue=window.getComputedStyle(xe),be=Ue.getPropertyValue("box-sizing")||Ue.getPropertyValue("-moz-box-sizing")||Ue.getPropertyValue("-webkit-box-sizing"),ue=parseFloat(Ue.getPropertyValue("padding-bottom"))+parseFloat(Ue.getPropertyValue("padding-top")),je=parseFloat(Ue.getPropertyValue("border-bottom-width"))+parseFloat(Ue.getPropertyValue("border-top-width")),st=f.map(function(rt){return"".concat(rt,":").concat(Ue.getPropertyValue(rt))}).join(";"),nt={sizingStyle:st,paddingSize:ue,borderSize:je,boxSizing:be};return Ie&&Fe&&(R[Fe]=nt),nt}function j(xe){var Ie=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Fe=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,Ue=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;L||(L=document.createElement("textarea"),L.setAttribute("tab-index","-1"),L.setAttribute("aria-hidden","true"),document.body.appendChild(L)),xe.getAttribute("wrap")?L.setAttribute("wrap",xe.getAttribute("wrap")):L.removeAttribute("wrap");var be=H(xe,Ie),ue=be.paddingSize,je=be.borderSize,st=be.boxSizing,nt=be.sizingStyle;L.setAttribute("style","".concat(nt,";").concat(p)),L.value=xe.value||xe.placeholder||"";var rt=Number.MIN_SAFE_INTEGER,He=Number.MAX_SAFE_INTEGER,re=L.scrollHeight,K;if(st==="border-box"?re+=je:st==="content-box"&&(re-=ue),Fe!==null||Ue!==null){L.value=" ";var W=L.scrollHeight-ue;Fe!==null&&(rt=W*Fe,st==="border-box"&&(rt=rt+ue+je),re=Math.max(rt,re)),Ue!==null&&(He=W*Ue,st==="border-box"&&(He=He+ue+je),K=re>He?"":"hidden",re=Math.min(He,re))}return{height:re,minHeight:rt,maxHeight:He,overflowY:K,resize:"none"}}var J=Z("Gytx"),M=Z.n(J),Y;(function(xe){xe[xe.NONE=0]="NONE",xe[xe.RESIZING=1]="RESIZING",xe[xe.RESIZED=2]="RESIZED"})(Y||(Y={}));var te=function(xe){Object(G.a)(Fe,xe);var Ie=Object(D.a)(Fe);function Fe(Ue){var be;return Object(X.a)(this,Fe),be=Ie.call(this,Ue),be.nextFrameActionId=void 0,be.resizeFrameId=void 0,be.textArea=void 0,be.saveTextArea=function(ue){be.textArea=ue},be.handleResize=function(ue){var je=be.state.resizeStatus,st=be.props,nt=st.autoSize,rt=st.onResize;if(je!==Y.NONE)return;typeof rt=="function"&&rt(ue),nt&&be.resizeOnNextFrame()},be.resizeOnNextFrame=function(){cancelAnimationFrame(be.nextFrameActionId),be.nextFrameActionId=requestAnimationFrame(be.resizeTextarea)},be.resizeTextarea=function(){var ue=be.props.autoSize;if(!ue||!be.textArea)return;var je=ue.minRows,st=ue.maxRows,nt=j(be.textArea,!1,je,st);be.setState({textareaStyles:nt,resizeStatus:Y.RESIZING},function(){cancelAnimationFrame(be.resizeFrameId),be.resizeFrameId=requestAnimationFrame(function(){be.setState({resizeStatus:Y.RESIZED},function(){be.resizeFrameId=requestAnimationFrame(function(){be.setState({resizeStatus:Y.NONE}),be.fixFirefoxAutoScroll()})})})})},be.renderTextArea=function(){var ue=be.props,je=ue.prefixCls,st=je===void 0?"rc-textarea":je,nt=ue.autoSize,rt=ue.onResize,He=ue.className,re=ue.disabled,K=be.state,W=K.textareaStyles,se=K.resizeStatus,ye=Object(o.a)(be.props,["prefixCls","onPressEnter","autoSize","defaultValue","onResize"]),we=y()(st,He,Object(F.a)({},"".concat(st,"-disabled"),re));"value"in ye&&(ye.value=ye.value||"");var _e=Object(z.a)(Object(z.a)(Object(z.a)({},be.props.style),W),se===Y.RESIZING?{overflowX:"hidden",overflowY:"hidden"}:null);return S.createElement(e,{onResize:be.handleResize,disabled:!(nt||rt)},S.createElement("textarea",Object(ve.a)({},ye,{className:we,style:_e,ref:be.saveTextArea})))},be.state={textareaStyles:{},resizeStatus:Y.NONE},be}return Object(O.a)(Fe,[{key:"componentDidUpdate",value:function(be){(be.value!==this.props.value||!M()(be.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 be=this.textArea.selectionStart,ue=this.textArea.selectionEnd;this.textArea.setSelectionRange(be,ue)}}catch(je){}}},{key:"render",value:function(){return this.renderTextArea()}}]),Fe}(S.Component),de=te,fe=function(xe){Object(G.a)(Fe,xe);var Ie=Object(D.a)(Fe);function Fe(Ue){var be;Object(X.a)(this,Fe),be=Ie.call(this,Ue),be.resizableTextArea=void 0,be.focus=function(){be.resizableTextArea.textArea.focus()},be.saveTextArea=function(je){be.resizableTextArea=je},be.handleChange=function(je){var st=be.props.onChange;be.setValue(je.target.value,function(){be.resizableTextArea.resizeTextarea()}),st&&st(je)},be.handleKeyDown=function(je){var st=be.props,nt=st.onPressEnter,rt=st.onKeyDown;je.keyCode===13&&nt&&nt(je),rt&&rt(je)};var ue=typeof Ue.value=="undefined"||Ue.value===null?Ue.defaultValue:Ue.value;return be.state={value:ue},be}return Object(O.a)(Fe,[{key:"setValue",value:function(be,ue){"value"in this.props||this.setState({value:be},ue)}},{key:"blur",value:function(){this.resizableTextArea.textArea.blur()}},{key:"render",value:function(){return S.createElement(de,Object(ve.a)({},this.props,{value:this.state.value,onKeyDown:this.handleKeyDown,onChange:this.handleChange,ref:this.saveTextArea}))}}],[{key:"getDerivedStateFromProps",value:function(be){return"value"in be?{value:be.value}:null}}]),Fe}(S.Component),Le=Ze.default=fe},ZW9T:function(mt,Ze,Z){"use strict";Z.d(Ze,"a",function(){return j});var ve=Z("k1fw"),X=Z("miYZ"),O=Z("tsqr"),G=Z("rAM+"),D=Z("tJVT"),S=Z("PpiC"),z=Z("q1tI"),F=Z.n(z),U=Z("bdgK"),I=Z("oBTY"),v=Z("9og8"),b=Z("WmNS"),u=Z.n(b),a={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"]},n={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"]},s={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","for","friend","gcnew","generic","goto","if","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:"main",content:["int main () {"," $0","}"].join(`
`)},{label:"for",content:["for( ; ; ){"," $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 <sstream>",content:["#include <sstream>"].join(`
`)},{label:"#include <string>",content:["#include <string>"].join(`
`)},{label:"#include <cmath>",content:["#include <cmath>"].join(`
`)}]},i={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(`
`)}]},t=Z("5VLF"),r=Z.n(t),A={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"]}},B=function(M,Y){return Y.map(function(te){return{label:te,kind:M.languages.CompletionItemKind.Keyword,insertText:te}})},w=function(M){return Object.keys(A.tables).map(function(Y){return{label:Y,kind:M.languages.CompletionItemKind.Variable,insertText:Y}})},_=function(M,Y){var te=A.tables[M];return te?te.map(function(de){return{label:de,kind:Y.languages.CompletionItemKind.Field,insertText:de}}):[]};function x(J,M,Y,te,de){var fe=M.getWordUntilPosition(Y),Le={startLineNumber:Y.lineNumber,endLineNumber:Y.lineNumber,startColumn:fe.startColumn,endColumn:fe.endColumn},xe=te.map(function(Ie){return{label:Ie,kind:J.languages.CompletionItemKind.Keyword,insertText:Ie,insertTextRules:J.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Le}});return de.map(function(Ie){xe.push(Object(ve.a)(Object(ve.a)({},Ie),{},{range:Le}))}),xe}var m=function(J){A.languages.map(function(de){return J.languages.registerDocumentFormattingEditProvider(de,{provideDocumentFormattingEdits:function(Le,xe,Ie){return Object(v.a)(u.a.mark(function Fe(){var Ue;return u.a.wrap(function(ue){for(;;)switch(ue.prev=ue.next){case 0:return Ue=r()(Le.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}),ue.abrupt("return",[{range:Le.getFullModelRange(),text:Ue}]);case 2:case"end":return ue.stop()}},Fe)}))()}}),de});var M=s.quickKey.map(function(de){return{label:de.label,kind:J.languages.CompletionItemKind.Method,insertText:de.content,insertTextRules:J.languages.CompletionItemInsertTextRule.InsertAsSnippet}}),Y=i.quickKey.map(function(de){return{label:de.label,kind:J.languages.CompletionItemKind.Method,insertText:de.content,insertTextRules:J.languages.CompletionItemInsertTextRule.InsertAsSnippet}}),te=n.quickKey.map(function(de){return{label:de.label,kind:J.languages.CompletionItemKind.Method,insertText:de.content,insertTextRules:J.languages.CompletionItemInsertTextRule.InsertAsSnippet}});J.languages.registerCompletionItemProvider("cpp",{triggerCharacters:["."," ","#"].concat(Object(I.a)(s.keywords),Object(I.a)(s.quickKey.map(function(de){return de.label}))),provideCompletionItems:function(fe,Le){var xe=fe.getValueInRange({startLineNumber:Le.lineNumber,startColumn:1,endLineNumber:Le.lineNumber,endColumn:Le.column}),Ie=xe.match(/cu/gim);console.log("match:",Ie,Le,xe,fe);var Fe=[],Ue=Le.lineNumber,be=Le.column,ue=fe.getValueInRange({startLineNumber:Ue,startColumn:0,endLineNumber:Ue,endColumn:be}),je=ue.trim().split(/\s+/),st=je[je.length-1];if(st.endsWith(".")){var nt=st.slice(0,st.length-1);Object.keys(A.tables).includes(nt)&&(Fe=Object(I.a)(_(nt,J)))}else st==="."?Fe=[]:Fe=[].concat(Object(I.a)(w(J)),Object(I.a)(B(J,s.keywords)),Object(I.a)(M));return{suggestions:Fe}}}),J.languages.registerCompletionItemProvider("c",{triggerCharacters:["."," ","#"].concat(Object(I.a)(a.keywords)),provideCompletionItems:function(fe,Le){var xe=fe.getValueInRange({startLineNumber:Le.lineNumber,startColumn:1,endLineNumber:Le.lineNumber,endColumn:Le.column}),Ie=xe.match(/cu/gim);console.log("match:",Ie,Le,xe,fe);var Fe=[],Ue=Le.lineNumber,be=Le.column,ue=fe.getValueInRange({startLineNumber:Ue,startColumn:0,endLineNumber:Ue,endColumn:be}),je=ue.trim().split(/\s+/),st=je[je.length-1];if(st.endsWith(".")){var nt=st.slice(0,st.length-1);Object.keys(A.tables).includes(nt)&&(Fe=Object(I.a)(_(nt,J)))}else st==="."?Fe=[]:Fe=[].concat(Object(I.a)(w(J)),Object(I.a)(B(J,a.keywords)));return{suggestions:Fe}}}),J.languages.registerCompletionItemProvider("java",{triggerCharacters:["."," "].concat(Object(I.a)(n.keywords)),provideCompletionItems:function(fe,Le){var xe=[],Ie=Le.lineNumber,Fe=Le.column,Ue=fe.getValueInRange({startLineNumber:Ie,startColumn:0,endLineNumber:Ie,endColumn:Fe}),be=Ue.trim().split(/\s+/),ue=be[be.length-1];if(ue.endsWith(".")){var je=ue.slice(0,ue.length-1);Object.keys(A.tables).includes(je)&&(xe=Object(I.a)(_(je,J)))}else ue==="."?xe=[]:xe=[].concat(Object(I.a)(w(J)),Object(I.a)(B(J,n.keywords)),Object(I.a)(te));return{suggestions:xe}}}),J.languages.registerCompletionItemProvider("python",{triggerCharacters:["."," "].concat(Object(I.a)(i.keywords)),provideCompletionItems:function(fe,Le){var xe=[],Ie=Le.lineNumber,Fe=Le.column,Ue=fe.getValueInRange({startLineNumber:Ie,startColumn:0,endLineNumber:Ie,endColumn:Fe}),be=Ue.trim().split(/\s+/),ue=be[be.length-1];if(ue.endsWith(".")){var je=ue.slice(0,ue.length-1);Object.keys(A.tables).includes(je)&&(xe=Object(I.a)(_(je,J)))}else ue==="."?xe=[]:xe=[].concat(Object(I.a)(w(J)),Object(I.a)(B(J,i.keywords)),Object(I.a)(Y));return{suggestions:xe}}})},c="\u8BE5\u4EFB\u52A1\u5173\u5361\u8BBE\u7F6E\u4E86\u7981\u6B62\u590D\u5236\u7C98\u8D34\uFF0C\u8BF7\u624B\u52A8\u8F93\u5165\u4EE3\u7801\u3002",e=Z("LvDl"),o=Z("+ua5");function l(J){return/^\d+$/.test(J)?"".concat(J,"px"):J}function y(){}var p=!1,f={"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 R(){var J=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],M=J;if(Array.isArray(J)){for(var Y=0;Y<J.length;Y++){var te=f[J[Y]];if(te)return te}return M[0]}return f[M]||M}var L=null,H=Ze.b=function(J){var M=J.width,Y=M===void 0?"100%":M,te=J.height,de=te===void 0?"100%":te,fe=J.value,Le=J.language,xe=Le===void 0?"javascript":Le,Ie=J.style,Fe=Ie===void 0?{}:Ie,Ue=J.options,be=Ue===void 0?{}:Ue,ue=J.overrideServices,je=ue===void 0?{}:ue,st=J.theme,nt=st===void 0?"vs-dark":st,rt=J.onEditBlur,He=J.onSave,re=J.autoHeight,K=re===void 0?!1:re,W=J.forbidCopy,se=W===void 0?!1:W,ye=J.onChange,we=ye===void 0?y:ye,_e=J.editorDidMount,$e=_e===void 0?y:_e,qe=J.onFocus,Ve=qe===void 0?y:qe,Xe=J.filename,at=Xe===void 0?"educoder.txt":Xe,ct=J.errorLine,Ce=J.errorContent,De=Ce===void 0?"":Ce,Qe=Object(S.a)(J,["width","height","value","language","style","options","overrideServices","theme","onEditBlur","onSave","autoHeight","forbidCopy","onChange","editorDidMount","onFocus","filename","errorLine","errorContent"]),We=Object(z.useRef)(),Re=Object(z.useRef)({}),Me=Object(z.useRef)(),Ee=Object(z.useRef)(!1),Ae=Object(z.useRef)(),he=Object(z.useState)(!1),q=Object(D.a)(he,2),ee=q[0],oe=q[1];function ce(){var et;return We.current&&(et=new U.default(function(Tt){var Ft=Object(G.a)(Tt),gt;try{for(Ft.s();!(gt=Ft.n()).done;){var Gt=gt.value;(Gt.target.offsetHeight>0||Gt.target.offsetWidth>0)&&Re.current.instance.layout()}}catch(zr){Ft.e(zr)}finally{Ft.f()}}),et.observe(We.current)),et}function Se(){O.b.warn(decodeURIComponent(c))}var Pe=function(){var Tt=Re.current.instance;if(fe!=null&&Tt&&ee){var Ft=Tt.getModel();Ft&&fe!==Ft.getValue()&&(p=!0,Ft.setValue(fe),Tt.layout(),p=!1)}};Object(z.useEffect)(function(){Me.current&&clearTimeout(Me.current),Me.current=setTimeout(function(){Pe()},500)},[fe,ee,Re.current]),Object(z.useEffect)(function(){if(ct&&Re.current&&Re.current.instance){var et=Re.current.instance;et.changeViewZones(function(Ft){var gt=document.createElement("div");gt.style.padding="10px 20px",gt.style.width="calc(100% - 20px)",gt.className="my-error-line-wrp",gt.innerHTML=De,Ft.addZone({afterLineNumber:ct||11,heightInLines:3,domNode:gt})});var Tt={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}};et.addOverlayWidget(Tt),et.revealPositionInCenter({lineNumber:20,column:1})}},[ct,Re.current,ee]);function Je(){var et=Re.current.instance;if(et){var Tt=et.getSelection(),Ft=Re.current.pastePos||{},gt=new L.Range(Ft.startLineNumber||Tt.endLineNumber,Ft.startColumn||Tt.endColumn,Ft.endLineNumber||Tt.endLineNumber,Ft.endColumn||Tt.endColumn);setTimeout(function(){et.executeEdits("",[{range:gt,text:""}])},300)}}function lt(et){(window.navigator.platform.match("Mac")?et.metaKey:et.ctrlKey)&&et.keyCode==83&&(et.preventDefault(),He())}var ht=function(){if(K&&Re.current.instance){var Tt=Re.current.instance.getContentHeight();rr(Tt<de?de:Tt)}else rr(de)};function At(et){var Tt=document.createEvent("MouseEvents");Tt.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),et.dispatchEvent(Tt)}function xt(et,Tt){var Ft=window.URL||window.webkitURL||window,gt=new Blob([Tt]),Gt=document.createElementNS("http://www.w3.org/1999/xhtml","a");Gt.href=Ft.createObjectURL(gt),Gt.download=et,At(Gt)}Object(z.useEffect)(function(){ht()},[ht]),Object(z.useEffect)(function(){We.current&&!ee&&Z.e(27).then(Z.t.bind(null,"M/lh",7)).then(function(et){try{L=et,Re.current.instance=L.editor.create(We.current,{value:fe,language:R(xe),theme:nt,requireConfig:{"vs/nls":{availableLanguages:{"*":"zh-cn"}}},wordWrap:!0},je);var Tt=Re.current.instance;if($e(Tt,L),setTimeout(function(){ht(),Re.current.instance.addAction({id:"d123123",label:"Download File",contextMenuGroupId:"9_cutcopypaste",run:function(){xt(at||"educoder.txt",Tt.getValue())}})},500),Re.current.subscription=Tt.onDidChangeModelContent(function(gt){Ee.current?clearTimeout(Ae.current):(ht(),we(Tt.getValue(),gt)),Ae.current=setTimeout(function(){Ee.current=!1},500)}),window.Monaco||m(L),se&&(Tt.addCommand(L.KeyMod.CtrlCmd|L.KeyMod.Shift|L.KeyCode.KEY_V,function(){return Se(),null}),Tt.addCommand(L.KeyMod.CtrlCmd|L.KeyCode.KEY_C,function(){return Se(),null})),window.Monaco=L,rt&&Tt.onDidBlurEditorWidget(function(){rt(Tt.getValue())}),Ve&&Tt.onDidFocusEditorText(function(){Ve(Tt.getValue())}),se){Tt.addCommand(L.KeyMod.CtrlCmd|L.KeyCode.KEY_V,function(){return Se(),null}),Tt.onDidPaste(function(gt){Re.current.pastePos=gt});try{window.addEventListener("paste",Je)}catch(gt){}}var Ft=ce();return oe(!0),function(){var gt=Re.current.instance;gt.dispose();var Gt=gt.getModel();Gt&&Gt.dispose(),Re.current.subscription&&Re.current.subscription.dispose(),se&&window.removeEventListener("paste",Je),Ft.unobserve(We.current)}}catch(gt){}})},[]),Object(z.useEffect)(function(){var et=Re.current.instance;if(et&&ee)return document.addEventListener("keydown",lt,!1),function(){document.removeEventListener("keydown",lt)}},[He,ee]),Object(z.useEffect)(function(){var et=Re.current.instance;if(et&&ee){var Tt=R(xe);L.editor.setModelLanguage(et.getModel(),Tt),console.log("language:",xe,et.getModel(),Tt)}},[xe,ee]),Object(z.useEffect)(function(){var et=Re.current.instance;et&&ee&&L.editor.setTheme(nt)},[nt,ee]),Object(z.useEffect)(function(){var et=Re.current.instance;et&&ee&&(et.updateOptions(Object(ve.a)({},be)),setTimeout(function(){et.getModel().updateOptions(Object(ve.a)({},be))},200))},[JSON.stringify(be),ee]),Object(z.useEffect)(function(){var et=Re.current.instance;et&&ee&&et.layout()},[Y,de,ee]);var St=Object(z.useState)(l(Y)),it=Object(D.a)(St,2),jt=it[0],Wt=it[1],It=Object(z.useState)(l(de)),Xt=Object(D.a)(It,2),Dt=Xt[0],rr=Xt[1],kt=Object(ve.a)(Object(ve.a)({},Fe),{},{width:jt,height:Dt});return F.a.createElement("div",{className:"my-monaco-editor",ref:We,style:kt})};function j(J){var M=J.width,Y=M===void 0?"100%":M,te=J.height,de=te===void 0?"100%":te,fe=J.original,Le=J.modified,xe=J.language,Ie=J.options,Fe=Ie===void 0?{}:Ie,Ue=Object(z.useRef)(),be=Object(z.useState)(null),ue=Object(D.a)(be,2),je=ue[0],st=ue[1];function nt(K){var W;return Ue.current&&(W=new U.default(function(se){var ye=Object(G.a)(se),we;try{for(ye.s();!(we=ye.n()).done;){var _e=we.value;(_e.target.offsetHeight>0||_e.target.offsetWidth>0)&&K.layout()}}catch($e){ye.e($e)}finally{ye.f()}}),W.observe(Ue.current)),W}Object(z.useEffect)(function(){Ue.current&&Z.e(27).then(Z.t.bind(null,"M/lh",7)).then(function(K){L=K;var W=L.editor.createDiffEditor(Ue.current,Object(ve.a)(Object(ve.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}));st(W);var se=nt(W);return function(){W.dispose();var ye=W.getModel();ye&&ye.dispose(),se.unobserve(Ue.current)}})},[]),Object(z.useEffect)(function(){je&&je.setModel({original:L.editor.createModel(fe,xe),modified:L.editor.createModel(Le,xe)})},[fe,Le,xe,je]);var rt=l(Y),He=l(de),re={width:rt,height:He};return F.a.createElement("div",{className:"my-diff-editor",ref:Ue,style:re})}},ZpRC:function(mt,Ze,Z){"use strict";function ve(v){return typeof v=="object"&&v!=null&&v.nodeType===1}function X(v,b){return(!b||v!=="hidden")&&v!=="visible"&&v!=="clip"}function O(v,b){if(v.clientHeight<v.scrollHeight||v.clientWidth<v.scrollWidth){var u=getComputedStyle(v,null);return X(u.overflowY,b)||X(u.overflowX,b)||function(a){var n=function(s){if(!s.ownerDocument||!s.ownerDocument.defaultView)return null;try{return s.ownerDocument.defaultView.frameElement}catch(i){return null}}(a);return!!n&&(n.clientHeight<a.scrollHeight||n.clientWidth<a.scrollWidth)}(v)}return!1}function G(v,b,u,a,n,s,i,t){return s<v&&i>b||s>v&&i<b?0:s<=v&&t<=u||i>=b&&t>=u?s-v-a:i>b&&t<u||s<v&&t>u?i-b+n:0}var D=function(v,b){var u=window,a=b.scrollMode,n=b.block,s=b.inline,i=b.boundary,t=b.skipOverflowHiddenElements,r=typeof i=="function"?i:function(W){return W!==i};if(!ve(v))throw new TypeError("Invalid target");for(var A=document.scrollingElement||document.documentElement,B=[],w=v;ve(w)&&r(w);){if((w=w.parentElement)===A){B.push(w);break}w!=null&&w===document.body&&O(w)&&!O(document.documentElement)||w!=null&&O(w,t)&&B.push(w)}for(var _=u.visualViewport?u.visualViewport.width:innerWidth,x=u.visualViewport?u.visualViewport.height:innerHeight,m=window.scrollX||pageXOffset,c=window.scrollY||pageYOffset,e=v.getBoundingClientRect(),o=e.height,l=e.width,y=e.top,p=e.right,f=e.bottom,R=e.left,L=n==="start"||n==="nearest"?y:n==="end"?f:y+o/2,H=s==="center"?R+l/2:s==="end"?p:R,j=[],J=0;J<B.length;J++){var M=B[J],Y=M.getBoundingClientRect(),te=Y.height,de=Y.width,fe=Y.top,Le=Y.right,xe=Y.bottom,Ie=Y.left;if(a==="if-needed"&&y>=0&&R>=0&&f<=x&&p<=_&&y>=fe&&f<=xe&&R>=Ie&&p<=Le)return j;var Fe=getComputedStyle(M),Ue=parseInt(Fe.borderLeftWidth,10),be=parseInt(Fe.borderTopWidth,10),ue=parseInt(Fe.borderRightWidth,10),je=parseInt(Fe.borderBottomWidth,10),st=0,nt=0,rt="offsetWidth"in M?M.offsetWidth-M.clientWidth-Ue-ue:0,He="offsetHeight"in M?M.offsetHeight-M.clientHeight-be-je:0;if(A===M)st=n==="start"?L:n==="end"?L-x:n==="nearest"?G(c,c+x,x,be,je,c+L,c+L+o,o):L-x/2,nt=s==="start"?H:s==="center"?H-_/2:s==="end"?H-_:G(m,m+_,_,Ue,ue,m+H,m+H+l,l),st=Math.max(0,st+c),nt=Math.max(0,nt+m);else{st=n==="start"?L-fe-be:n==="end"?L-xe+je+He:n==="nearest"?G(fe,xe,te,be,je+He,L,L+o,o):L-(fe+te/2)+He/2,nt=s==="start"?H-Ie-Ue:s==="center"?H-(Ie+de/2)+rt/2:s==="end"?H-Le+ue+rt:G(Ie,Le,de,Ue,ue+rt,H,H+l,l);var re=M.scrollLeft,K=M.scrollTop;L+=K-(st=Math.max(0,Math.min(K+st,M.scrollHeight-te+He))),H+=re-(nt=Math.max(0,Math.min(re+nt,M.scrollWidth-de+rt)))}j.push({el:M,top:st,left:nt})}return j};function S(v){return v===Object(v)&&Object.keys(v).length!==0}function z(v,b){b===void 0&&(b="auto");var u="scrollBehavior"in document.body.style;v.forEach(function(a){var n=a.el,s=a.top,i=a.left;n.scroll&&u?n.scroll({top:s,left:i,behavior:b}):(n.scrollTop=s,n.scrollLeft=i)})}function F(v){return v===!1?{block:"end",inline:"nearest"}:S(v)?v:{block:"start",inline:"nearest"}}function U(v,b){var u=!v.ownerDocument.documentElement.contains(v);if(S(b)&&typeof b.behavior=="function")return b.behavior(u?[]:D(v,b));if(u)return;var a=F(b);return z(D(v,a),a.behavior)}var I=Ze.a=U},bT9E:function(mt,Ze,Z){"use strict";Z.d(Ze,"a",function(){return X});var ve=Z("VTBJ");function X(O,G){var D=Object(ve.a)({},O);return Array.isArray(G)&&G.forEach(function(S){delete D[S]}),D}},biw7:function(mt,Ze,Z){"use strict";var ve=Z("q1tI"),X=Z.n(ve),O=ve.createContext(null);Ze.a=O},crp1:function(mt,Ze,Z){"use strict";Z.d(Ze,"b",function(){return It}),Z.d(Ze,"a",function(){return kt});var ve={},X=function(ne,ie,le,Be,Ge){var tt=ve[ie]||(ve[ie]=URL.createObjectURL(new Blob([ne],{type:"text/javascript"}))),N=new Worker(tt);return N.onerror=function(d){return Ge(d.error,null)},N.onmessage=function(d){return Ge(null,d.data)},N.postMessage(le,Be),N},O=Uint8Array,G=Uint16Array,D=Uint32Array,S=new O([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]),z=new O([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]),F=new O([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),U=function(ne,ie){for(var le=new G(31),Be=0;Be<31;++Be)le[Be]=ie+=1<<ne[Be-1];for(var Ge=new D(le[30]),Be=1;Be<30;++Be)for(var tt=le[Be];tt<le[Be+1];++tt)Ge[tt]=tt-le[Be]<<5|Be;return[le,Ge]},I=U(S,2),v=I[0],b=I[1];v[28]=258,b[258]=28;for(var u=U(z,0),a=u[0],n=u[1],s=new G(32768),i=0;i<32768;++i){var t=(i&43690)>>>1|(i&21845)<<1;t=(t&52428)>>>2|(t&13107)<<2,t=(t&61680)>>>4|(t&3855)<<4,s[i]=((t&65280)>>>8|(t&255)<<8)>>>1}for(var r=function(ne,ie,le){for(var Be=ne.length,Ge=0,tt=new G(ie);Ge<Be;++Ge)++tt[ne[Ge]-1];var N=new G(ie);for(Ge=0;Ge<ie;++Ge)N[Ge]=N[Ge-1]+tt[Ge-1]<<1;var d;if(le){d=new G(1<<ie);var g=15-ie;for(Ge=0;Ge<Be;++Ge)if(ne[Ge])for(var P=Ge<<4|ne[Ge],V=ie-ne[Ge],k=N[ne[Ge]-1]++<<V,pe=k|(1<<V)-1;k<=pe;++k)d[s[k]>>>g]=P}else for(d=new G(Be),Ge=0;Ge<Be;++Ge)d[Ge]=s[N[ne[Ge]-1]++]>>>15-ne[Ge];return d},A=new O(288),i=0;i<144;++i)A[i]=8;for(var i=144;i<256;++i)A[i]=9;for(var i=256;i<280;++i)A[i]=7;for(var i=280;i<288;++i)A[i]=8;for(var B=new O(32),i=0;i<32;++i)B[i]=5;var w=r(A,9,0),_=r(A,9,1),x=r(B,5,0),m=r(B,5,1),c=function(ne){for(var ie=ne[0],le=1;le<ne.length;++le)ne[le]>ie&&(ie=ne[le]);return ie},e=function(ne,ie,le){var Be=ie/8>>0;return(ne[Be]|ne[Be+1]<<8)>>>(ie&7)&le},o=function(ne,ie){var le=ie/8>>0;return(ne[le]|ne[le+1]<<8|ne[le+2]<<16)>>>(ie&7)},l=function(ne){return(ne/8>>0)+(ne&7&&1)},y=function(ne,ie,le){(ie==null||ie<0)&&(ie=0),(le==null||le>ne.length)&&(le=ne.length);var Be=new(ne instanceof G?G:ne instanceof D?D:O)(le-ie);return Be.set(ne.subarray(ie,le)),Be},p=function(ne,ie,le){var Be=ne.length,Ge=!ie||le,tt=!le||le.i;le||(le={}),ie||(ie=new O(Be*3));var N=function(Jt){var Er=ie.length;if(Jt>Er){var ar=new O(Math.max(Er*2,Jt));ar.set(ie),ie=ar}},d=le.f||0,g=le.p||0,P=le.b||0,V=le.l,k=le.d,pe=le.m,ke=le.n,Te=Be*8;do{if(!V){le.f=d=e(ne,g,1);var ot=e(ne,g+1,3);if(g+=3,ot)if(ot==1)V=_,k=m,pe=9,ke=5;else if(ot==2){var Et=e(ne,g,31)+257,Rt=e(ne,g+10,15)+4,ir=Et+e(ne,g+5,31)+1;g+=14;for(var Pt=new O(ir),er=new O(19),Ot=0;Ot<Rt;++Ot)er[F[Ot]]=e(ne,g+Ot*3,7);g+=Rt*3;var hr=c(er),Qt=(1<<hr)-1;if(!tt&&g+ir*(hr+7)>Te)break;for(var yr=r(er,hr,1),Ot=0;Ot<ir;){var dr=yr[e(ne,g,Qt)];g+=dr&15;var Ke=dr>>>4;if(Ke<16)Pt[Ot++]=Ke;else{var wr=0,Cr=0;for(Ke==16?(Cr=3+e(ne,g,3),g+=2,wr=Pt[Ot-1]):Ke==17?(Cr=3+e(ne,g,7),g+=3):Ke==18&&(Cr=11+e(ne,g,127),g+=7);Cr--;)Pt[Ot++]=wr}}var fr=Pt.subarray(0,Et),pr=Pt.subarray(Et);pe=c(fr),ke=c(pr),V=r(fr,pe,1),k=r(pr,ke,1)}else throw"invalid block type";else{var Ke=l(g)+4,ft=ne[Ke-4]|ne[Ke-3]<<8,dt=Ke+ft;if(dt>Be){if(tt)throw"unexpected EOF";break}Ge&&N(P+ft),ie.set(ne.subarray(Ke,dt),P),le.b=P+=ft,le.p=g=dt*8;continue}if(g>Te)throw"unexpected EOF"}Ge&&N(P+131072);for(var gr=(1<<pe)-1,Tr=(1<<ke)-1,br=pe+ke+18;tt||g+br<Te;){var wr=V[o(ne,g)&gr],Ir=wr>>>4;if(g+=wr&15,g>Te)throw"unexpected EOF";if(!wr)throw"invalid length/literal";if(Ir<256)ie[P++]=Ir;else if(Ir==256){V=null;break}else{var Rr=Ir-254;if(Ir>264){var Ot=Ir-257,or=S[Ot];Rr=e(ne,g,(1<<or)-1)+v[Ot],g+=or}var Yt=k[o(ne,g)&Tr],Ut=Yt>>>4;if(!Yt)throw"invalid distance";g+=Yt&15;var pr=a[Ut];if(Ut>3){var or=z[Ut];pr+=o(ne,g)&(1<<or)-1,g+=or}if(g>Te)throw"unexpected EOF";Ge&&N(P+131072);for(var tr=P+Rr;P<tr;P+=4)ie[P]=ie[P-pr],ie[P+1]=ie[P+1-pr],ie[P+2]=ie[P+2-pr],ie[P+3]=ie[P+3-pr];P=tr}}le.l=V,le.p=g,le.b=P,V&&(d=1,le.m=pe,le.d=k,le.n=ke)}while(!d);return P==ie.length?ie:y(ie,0,P)},f=function(ne,ie,le){le<<=ie&7;var Be=ie/8>>0;ne[Be]|=le,ne[Be+1]|=le>>>8},R=function(ne,ie,le){le<<=ie&7;var Be=ie/8>>0;ne[Be]|=le,ne[Be+1]|=le>>>8,ne[Be+2]|=le>>>16},L=function(ne,ie){for(var le=[],Be=0;Be<ne.length;++Be)ne[Be]&&le.push({s:Be,f:ne[Be]});var Ge=le.length,tt=le.slice();if(!Ge)return[new O(0),0];if(Ge==1){var N=new O(le[0].s+1);return N[le[0].s]=1,[N,1]}le.sort(function(ir,Pt){return ir.f-Pt.f}),le.push({s:-1,f:25001});var d=le[0],g=le[1],P=0,V=1,k=2;for(le[0]={s:-1,f:d.f+g.f,l:d,r:g};V!=Ge-1;)d=le[le[P].f<le[k].f?P++:k++],g=le[P!=V&&le[P].f<le[k].f?P++:k++],le[V++]={s:-1,f:d.f+g.f,l:d,r:g};for(var pe=tt[0].s,Be=1;Be<Ge;++Be)tt[Be].s>pe&&(pe=tt[Be].s);var ke=new G(pe+1),Te=H(le[V-1],ke,0);if(Te>ie){var Be=0,ot=0,Ke=Te-ie,ft=1<<Ke;for(tt.sort(function(Pt,er){return ke[er.s]-ke[Pt.s]||Pt.f-er.f});Be<Ge;++Be){var dt=tt[Be].s;if(ke[dt]>ie)ot+=ft-(1<<Te-ke[dt]),ke[dt]=ie;else break}for(ot>>>=Ke;ot>0;){var Et=tt[Be].s;ke[Et]<ie?ot-=1<<ie-ke[Et]++-1:++Be}for(;Be>=0&&ot;--Be){var Rt=tt[Be].s;ke[Rt]==ie&&(--ke[Rt],++ot)}Te=ie}return[new O(ke),Te]},H=function(ne,ie,le){return ne.s==-1?Math.max(H(ne.l,ie,le+1),H(ne.r,ie,le+1)):ie[ne.s]=le},j=function(ne){for(var ie=ne.length;ie&&!ne[--ie];);for(var le=new G(++ie),Be=0,Ge=ne[0],tt=1,N=function(g){le[Be++]=g},d=1;d<=ie;++d)if(ne[d]==Ge&&d!=ie)++tt;else{if(!Ge&&tt>2){for(;tt>138;tt-=138)N(32754);tt>2&&(N(tt>10?tt-11<<5|28690:tt-3<<5|12305),tt=0)}else if(tt>3){for(N(Ge),--tt;tt>6;tt-=6)N(8304);tt>2&&(N(tt-3<<5|8208),tt=0)}for(;tt--;)N(Ge);tt=1,Ge=ne[d]}return[le.subarray(0,Be),ie]},J=function(ne,ie){for(var le=0,Be=0;Be<ie.length;++Be)le+=ne[Be]*ie[Be];return le},M=function(ne,ie,le){var Be=le.length,Ge=l(ie+2);ne[Ge]=Be&255,ne[Ge+1]=Be>>>8,ne[Ge+2]=ne[Ge]^255,ne[Ge+3]=ne[Ge+1]^255;for(var tt=0;tt<Be;++tt)ne[Ge+tt+4]=le[tt];return(Ge+4+Be)*8},Y=function(ne,ie,le,Be,Ge,tt,N,d,g,P,V){f(ie,V++,le),++Ge[256];for(var k=L(Ge,15),pe=k[0],ke=k[1],Te=L(tt,15),ot=Te[0],Ke=Te[1],ft=j(pe),dt=ft[0],Et=ft[1],Rt=j(ot),ir=Rt[0],Pt=Rt[1],er=new G(19),Ot=0;Ot<dt.length;++Ot)er[dt[Ot]&31]++;for(var Ot=0;Ot<ir.length;++Ot)er[ir[Ot]&31]++;for(var hr=L(er,7),Qt=hr[0],yr=hr[1],dr=19;dr>4&&!Qt[F[dr-1]];--dr);var wr=P+5<<3,Cr=J(Ge,A)+J(tt,B)+N,fr=J(Ge,pe)+J(tt,ot)+N+14+3*dr+J(er,Qt)+(2*er[16]+3*er[17]+7*er[18]);if(wr<=Cr&&wr<=fr)return M(ie,V,ne.subarray(g,g+P));var pr,gr,Tr,br;if(f(ie,V,1+(fr<Cr)),V+=2,fr<Cr){pr=r(pe,ke,0),gr=pe,Tr=r(ot,Ke,0),br=ot;var Ir=r(Qt,yr,0);f(ie,V,Et-257),f(ie,V+5,Pt-1),f(ie,V+10,dr-4),V+=14;for(var Ot=0;Ot<dr;++Ot)f(ie,V+3*Ot,Qt[F[Ot]]);V+=3*dr;for(var Rr=[dt,ir],or=0;or<2;++or)for(var Yt=Rr[or],Ot=0;Ot<Yt.length;++Ot){var Ut=Yt[Ot]&31;f(ie,V,Ir[Ut]),V+=Qt[Ut],Ut>15&&(f(ie,V,Yt[Ot]>>>5&127),V+=Yt[Ot]>>>12)}}else pr=w,gr=A,Tr=x,br=B;for(var Ot=0;Ot<d;++Ot)if(Be[Ot]>255){var Ut=Be[Ot]>>>18&31;R(ie,V,pr[Ut+257]),V+=gr[Ut+257],Ut>7&&(f(ie,V,Be[Ot]>>>23&31),V+=S[Ut]);var tr=Be[Ot]&31;R(ie,V,Tr[tr]),V+=br[tr],tr>3&&(R(ie,V,Be[Ot]>>>5&8191),V+=z[tr])}else R(ie,V,pr[Be[Ot]]),V+=gr[Be[Ot]];return R(ie,V,pr[256]),V+gr[256]},te=new D([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),de=new O(0),fe=function(ne,ie,le,Be,Ge,tt){var N=ne.length,d=new O(Be+N+5*(1+Math.floor(N/7e3))+Ge),g=d.subarray(Be,d.length-Ge),P=0;if(!ie||N<8)for(var V=0;V<=N;V+=65535){var k=V+65535;k<N?P=M(g,P,ne.subarray(V,k)):(g[V]=tt,P=M(g,P,ne.subarray(V,N)))}else{for(var pe=te[ie-1],ke=pe>>>13,Te=pe&8191,ot=(1<<le)-1,Ke=new G(32768),ft=new G(ot+1),dt=Math.ceil(le/3),Et=2*dt,Rt=function(Bt){return(ne[Bt]^ne[Bt+1]<<dt^ne[Bt+2]<<Et)&ot},ir=new D(25e3),Pt=new G(288),er=new G(32),Ot=0,hr=0,V=0,Qt=0,yr=0,dr=0;V<N;++V){var wr=Rt(V),Cr=V&32767,fr=ft[wr];if(Ke[Cr]=fr,ft[wr]=Cr,yr<=V){var pr=N-V;if((Ot>7e3||Qt>24576)&&pr>423){P=Y(ne,g,0,ir,Pt,er,hr,Qt,dr,V-dr,P),Qt=Ot=hr=0,dr=V;for(var gr=0;gr<286;++gr)Pt[gr]=0;for(var gr=0;gr<30;++gr)er[gr]=0}var Tr=2,br=0,Ir=Te,Rr=Cr-fr&32767;if(pr>2&&wr==Rt(V-Rr))for(var or=Math.min(ke,pr)-1,Yt=Math.min(32767,V),Ut=Math.min(258,pr);Rr<=Yt&&--Ir&&Cr!=fr;){if(ne[V+Tr]==ne[V+Tr-Rr]){for(var tr=0;tr<Ut&&ne[V+tr]==ne[V+tr-Rr];++tr);if(tr>Tr){if(Tr=tr,br=Rr,tr>or)break;for(var Jt=Math.min(Rr,tr-2),Er=0,gr=0;gr<Jt;++gr){var ar=V-Rr+gr+32768&32767,mn=Ke[ar],Mt=ar-mn+32768&32767;Mt>Er&&(Er=Mt,fr=ar)}}}Cr=fr,fr=Ke[Cr],Rr+=Cr-fr+32768&32767}if(br){ir[Qt++]=268435456|b[Tr]<<18|n[br];var Ht=b[Tr]&31,Lt=n[br]&31;hr+=S[Ht]+z[Lt],++Pt[257+Ht],++er[Lt],yr=V+Tr,++Ot}else ir[Qt++]=ne[V],++Pt[ne[V]]}}P=Y(ne,g,tt,ir,Pt,er,hr,Qt,dr,V-dr,P),tt||(P=M(g,P,de))}return y(d,0,Be+l(P)+Ge)},Le=function(){for(var ne=new D(256),ie=0;ie<256;++ie){for(var le=ie,Be=9;--Be;)le=(le&1&&3988292384)^le>>>1;ne[ie]=le}return ne}(),xe=function(){var ne=4294967295;return{p:function(ie){for(var le=ne,Be=0;Be<ie.length;++Be)le=Le[le&255^ie[Be]]^le>>>8;ne=le},d:function(){return ne^4294967295}}},Ie=function(){var ne=1,ie=0;return{p:function(le){for(var Be=ne,Ge=ie,tt=le.length,N=0;N!=tt;){for(var d=Math.min(N+5552,tt);N<d;++N)Be+=le[N],Ge+=Be;Be%=65521,Ge%=65521}ne=Be,ie=Ge},d:function(){return(ne>>>8<<16|(ie&255)<<8|ie>>>8)+((ne&255)<<23)*2}}},Fe=function(ne,ie,le,Be,Ge){return fe(ne,ie.level==null?6:ie.level,ie.mem==null?Math.ceil(Math.max(8,Math.min(13,Math.log(ne.length)))*1.5):12+ie.mem,le,Be,!Ge)},Ue=function(ne,ie){var le={};for(var Be in ne)le[Be]=ne[Be];for(var Be in ie)le[Be]=ie[Be];return le},be=function(ne,ie,le){for(var Be=ne(),Ge=ne.toString(),tt=Ge.slice(Ge.indexOf("[")+1,Ge.lastIndexOf("]")).replace(/ /g,"").split(","),N=0;N<Be.length;++N){var d=Be[N],g=tt[N];if(typeof d=="function"){ie+=";"+g+"=";var P=d.toString();if(d.prototype)if(P.indexOf("[native code]")!=-1){var V=P.indexOf(" ",8)+1;ie+=P.slice(V,P.indexOf("(",V))}else{ie+=P;for(var k in d.prototype)ie+=";"+g+".prototype."+k+"="+d.prototype[k].toString()}else ie+=P}else le[g]=d}return[ie,le]},ue=[],je=function(ne){var ie=[];for(var le in ne)(ne[le]instanceof O||ne[le]instanceof G||ne[le]instanceof D)&&ie.push((ne[le]=new ne[le].constructor(ne[le])).buffer);return ie},st=function(ne,ie,le,Be){var Ge;if(!ue[le]){for(var tt="",N={},d=ne.length-1,g=0;g<d;++g)Ge=be(ne[g],tt,N),tt=Ge[0],N=Ge[1];ue[le]=be(ne[d],tt,N)}var P=Ue({},ue[le][1]);return X(ue[le][0]+";onmessage=function(e){for(var k in e.data)self[k]=e.data[k];onmessage="+ie.toString()+"}",le,P,je(P),Be)},nt=function(){return[O,G,D,S,z,F,v,a,_,m,s,r,c,e,o,l,y,p,ce,se,ye]},rt=function(){return[O,G,D,S,z,F,b,n,w,A,x,B,s,te,de,r,f,R,L,H,j,J,M,Y,l,y,fe,Fe,he,se]},He=function(){return[at,De,Xe,xe,Le]},re=function(){return[ct,Ce]},K=function(){return[Qe,Xe,Ie]},W=function(){return[We]},se=function(ne){return postMessage(ne,[ne.buffer])},ye=function(ne){return ne&&ne.size&&new O(ne.size)},we=function(ne,ie,le,Be,Ge,tt){var N=st(le,Be,Ge,function(d,g){N.terminate(),tt(d,g)});return ie.consume||(ne=new O(ne)),N.postMessage([ne,ie],[ne.buffer]),function(){N.terminate()}},_e=function(ne){return ne.ondata=function(ie,le){return postMessage([ie,le],[ie.buffer])},function(ie){return ne.push(ie.data[0],ie.data[1])}},$e=function(ne,ie,le,Be,Ge){var tt,N=st(ne,Be,Ge,function(d,g){d?(N.terminate(),ie.ondata.call(ie,d)):(g[1]&&N.terminate(),ie.ondata.call(ie,d,g[0],g[1]))});N.postMessage(le),ie.push=function(d,g){if(tt)throw"stream finished";if(!ie.ondata)throw"no stream handler";N.postMessage([d,tt=g],[d.buffer])},ie.terminate=function(){N.terminate()}},qe=function(ne,ie){return ne[ie]|ne[ie+1]<<8},Ve=function(ne,ie){return(ne[ie]|ne[ie+1]<<8|ne[ie+2]<<16)+(ne[ie+3]<<23)*2},Xe=function(ne,ie,le){for(;le;++ie)ne[ie]=le,le>>>=8},at=function(ne,ie){var le=ie.filename;if(ne[0]=31,ne[1]=139,ne[2]=8,ne[8]=ie.level<2?4:ie.level==9?2:0,ne[9]=3,ie.mtime!=0&&Xe(ne,4,Math.floor(new Date(ie.mtime||Date.now())/1e3)),le){ne[3]=8;for(var Be=0;Be<=le.length;++Be)ne[Be+10]=le.charCodeAt(Be)}},ct=function(ne){if(ne[0]!=31||ne[1]!=139||ne[2]!=8)throw"invalid gzip data";var ie=ne[3],le=10;ie&4&&(le+=ne[10]|(ne[11]<<8)+2);for(var Be=(ie>>3&1)+(ie>>4&1);Be>0;Be-=!ne[le++]);return le+(ie&2)},Ce=function(ne){var ie=ne.length;return(ne[ie-4]|ne[ie-3]<<8|ne[ie-2]<<16)+2*(ne[ie-1]<<23)},De=function(ne){return 10+(ne.filename&&ne.filename.length+1||0)},Qe=function(ne,ie){var le=ie.level,Be=le==0?0:le<6?1:le==9?3:2;ne[0]=120,ne[1]=Be<<6|(Be?32-2*Be:1)},We=function(ne){if((ne[0]&15)!=8||ne[0]>>>4>7||(ne[0]<<8|ne[1])%31)throw"invalid zlib data";if(ne[1]&32)throw"invalid zlib data: preset dictionaries not supported"};function Re(ne,ie){return!ie&&typeof ne=="function"&&(ie=ne,ne={}),this.ondata=ie,ne}var Me=function(){function ne(ie,le){!le&&typeof ie=="function"&&(le=ie,ie={}),this.ondata=le,this.o=ie||{}}return ne.prototype.p=function(ie,le){this.ondata(Fe(ie,this.o,0,0,!le),le)},ne.prototype.push=function(ie,le){if(this.d)throw"stream finished";if(!this.ondata)throw"no stream handler";this.d=le,this.p(ie,le||!1)},ne}(),Ee=function(){function ne(ie,le){$e([rt,function(){return[_e,Me]}],this,Re.call(this,ie,le),function(Be){var Ge=new Me(Be.data);onmessage=_e(Ge)},6)}return ne}();function Ae(ne,ie,le){if(le||(le=ie,ie={}),typeof le!="function")throw"no callback";return we(ne,ie,[rt],function(Be){return se(he(Be.data[0],Be.data[1]))},0,le)}function he(ne,ie){return ie===void 0&&(ie={}),Fe(ne,ie,0,0)}var q=function(){function ne(ie){this.s={},this.p=new O(0),this.ondata=ie}return ne.prototype.e=function(ie){if(this.d)throw"stream finished";if(!this.ondata)throw"no stream handler";var le=this.p.length,Be=new O(le+ie.length);Be.set(this.p),Be.set(ie,le),this.p=Be},ne.prototype.c=function(ie){this.d=this.s.i=ie||!1;var le=this.s.b,Be=p(this.p,this.o,this.s);this.ondata(y(Be,le,this.s.b),this.d),this.o=y(Be,this.s.b-32768),this.s.b=this.o.length,this.p=y(this.p,this.s.p/8>>0),this.s.p&=7},ne.prototype.push=function(ie,le){this.e(ie),this.c(le)},ne}(),ee=function(){function ne(ie){this.ondata=ie,$e([nt,function(){return[_e,q]}],this,0,function(){var le=new q;onmessage=_e(le)},7)}return ne}();function oe(ne,ie,le){if(le||(le=ie,ie={}),typeof le!="function")throw"no callback";return we(ne,ie,[nt],function(Be){return se(ce(Be.data[0],ye(Be.data[1])))},1,le)}function ce(ne,ie){return p(ne,ie)}var Se=function(){function ne(ie,le){this.c=xe(),this.l=0,this.v=1,Me.call(this,ie,le)}return ne.prototype.push=function(ie,le){Me.prototype.push.call(this,ie,le)},ne.prototype.p=function(ie,le){this.c.p(ie),this.l+=ie.length;var Be=Fe(ie,this.o,this.v&&De(this.o),le&&8,!le);this.v&&(at(Be,this.o),this.v=0),le&&(Xe(Be,Be.length-8,this.c.d()),Xe(Be,Be.length-4,this.l)),this.ondata(Be,le)},ne}(),Pe=function(){function ne(ie,le){$e([rt,He,function(){return[_e,Me,Se]}],this,Re.call(this,ie,le),function(Be){var Ge=new Se(Be.data);onmessage=_e(Ge)},8)}return ne}();function Je(ne,ie,le){if(le||(le=ie,ie={}),typeof le!="function")throw"no callback";return we(ne,ie,[rt,He,function(){return[lt]}],function(Be){return se(lt(Be.data[0],Be.data[1]))},2,le)}function lt(ne,ie){ie===void 0&&(ie={});var le=xe(),Be=ne.length;le.p(ne);var Ge=Fe(ne,ie,De(ie),8),tt=Ge.length;return at(Ge,ie),Xe(Ge,tt-8,le.d()),Xe(Ge,tt-4,Be),Ge}var ht=function(){function ne(ie){this.v=1,q.call(this,ie)}return ne.prototype.push=function(ie,le){if(q.prototype.e.call(this,ie),this.v){var Be=ct(this.p);if(Be>=this.p.length&&!le)return;this.p=this.p.subarray(Be),this.v=0}if(le){if(this.p.length<8)throw"invalid gzip stream";this.p=this.p.subarray(0,-8)}q.prototype.c.call(this,le)},ne}(),At=function(){function ne(ie){this.ondata=ie,$e([nt,re,function(){return[_e,q,ht]}],this,0,function(){var le=new ht;onmessage=_e(le)},9)}return ne}();function xt(ne,ie,le){if(le||(le=ie,ie={}),typeof le!="function")throw"no callback";return we(ne,ie,[nt,re,function(){return[St]}],function(Be){return se(St(Be.data[0]))},3,le)}function St(ne,ie){return p(ne.subarray(ct(ne),-8),ie||new O(Ce(ne)))}var it=function(){function ne(ie,le){this.c=Ie(),this.v=1,Me.call(this,ie,le)}return ne.prototype.push=function(ie,le){Me.prototype.push.call(this,ie,le)},ne.prototype.p=function(ie,le){this.c.p(ie);var Be=Fe(ie,this.o,this.v&&2,le&&4,!le);this.v&&(Qe(Be,this.o),this.v=0),le&&Xe(Be,Be.length-4,this.c.d()),this.ondata(Be,le)},ne}(),jt=function(){function ne(ie,le){$e([rt,K,function(){return[_e,Me,it]}],this,Re.call(this,ie,le),function(Be){var Ge=new it(Be.data);onmessage=_e(Ge)},10)}return ne}();function Wt(ne,ie,le){if(le||(le=ie,ie={}),typeof le!="function")throw"no callback";return we(ne,ie,[rt,K,function(){return[It]}],function(Be){return se(It(Be.data[0],Be.data[1]))},4,le)}function It(ne,ie){ie===void 0&&(ie={});var le=Ie();le.p(ne);var Be=Fe(ne,ie,2,4);return Qe(Be,ie),Xe(Be,Be.length-4,le.d()),Be}var Xt=function(){function ne(ie){this.v=1,q.call(this,ie)}return ne.prototype.push=function(ie,le){if(q.prototype.e.call(this,ie),this.v){if(this.p.length<2&&!le)return;this.p=this.p.subarray(2),this.v=0}if(le){if(this.p.length<4)throw"invalid zlib stream";this.p=this.p.subarray(0,-4)}q.prototype.c.call(this,le)},ne}(),Dt=function(){function ne(ie){this.ondata=ie,$e([nt,W,function(){return[_e,q,Xt]}],this,0,function(){var le=new Xt;onmessage=_e(le)},11)}return ne}();function rr(ne,ie,le){if(le||(le=ie,ie={}),typeof le!="function")throw"no callback";return we(ne,ie,[nt,W,function(){return[kt]}],function(Be){return se(kt(Be.data[0],ye(Be.data[1])))},5,le)}function kt(ne,ie){return p((We(ne),ne.subarray(2,-4)),ie)}var et=function(){function ne(ie){this.G=ht,this.I=q,this.Z=Xt,this.ondata=ie}return ne.prototype.push=function(ie,le){if(!this.ondata)throw"no stream handler";if(this.s)this.s.push(ie,le);else{if(this.p&&this.p.length){var Be=new O(this.p.length+ie.length);Be.set(this.p),Be.set(ie,this.p.length)}else this.p=ie;if(this.p.length>2){var Ge=this,tt=function(){Ge.ondata.apply(Ge,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,le),this.p=null}}},ne}(),Tt=function(){function ne(ie){this.G=At,this.I=ee,this.Z=Dt,this.ondata=ie}return ne.prototype.push=function(ie,le){et.prototype.push.call(this,ie,le)},ne}();function Ft(ne,ie,le){if(le||(le=ie,ie={}),typeof le!="function")throw"no callback";return ne[0]==31&&ne[1]==139&&ne[2]==8?xt(ne,ie,le):(ne[0]&15)!=8||ne[0]>>4>7||(ne[0]<<8|ne[1])%31?oe(ne,ie,le):rr(ne,ie,le)}function gt(ne,ie){return ne[0]==31&&ne[1]==139&&ne[2]==8?St(ne,ie):(ne[0]&15)!=8||ne[0]>>4>7||(ne[0]<<8|ne[1])%31?ce(ne,ie):kt(ne,ie)}var Gt=function(ne,ie,le,Be){for(var Ge in ne){var tt=ne[Ge],N=ie+Ge;tt instanceof O?le[N]=[tt,Be]:Array.isArray(tt)?le[N]=[tt[0],Ue(Be,tt[1])]:Gt(tt,N+"/",le,Be)}};function zr(ne,ie){var le=ne.length;if(!ie&&typeof TextEncoder!="undefined")return new TextEncoder().encode(ne);for(var Be=new O(ne.length+(ne.length>>>1)),Ge=0,tt=function(P){Be[Ge++]=P},N=0;N<le;++N){if(Ge+5>Be.length){var d=new O(Ge+8+(le-N<<1));d.set(Be),Be=d}var g=ne.charCodeAt(N);g<128||ie?tt(g):g<2048?(tt(192|g>>>6),tt(128|g&63)):g>55295&&g<57344?(g=65536+(g&1023<<10)|ne.charCodeAt(++N)&1023,tt(240|g>>>18),tt(128|g>>>12&63),tt(128|g>>>6&63),tt(128|g&63)):(tt(224|g>>>12),tt(128|g>>>6&63),tt(128|g&63))}return y(Be,0,Ge)}function Zr(ne,ie){var le="";if(!ie&&typeof TextDecoder!="undefined")return new TextDecoder().decode(ne);for(var Be=0;Be<ne.length;){var Ge=ne[Be++];Ge<128||ie?le+=String.fromCharCode(Ge):Ge<224?le+=String.fromCharCode((Ge&31)<<6|ne[Be++]&63):Ge<240?le+=String.fromCharCode((Ge&15)<<12|(ne[Be++]&63)<<6|ne[Be++]&63):(Ge=((Ge&15)<<18|(ne[Be++]&63)<<12|(ne[Be++]&63)<<6|ne[Be++]&63)-65536,le+=String.fromCharCode(55296|Ge>>10,56320|Ge&1023))}return le}var Lr=function(ne,ie){return ie+30+qe(ne,ie+26)+qe(ne,ie+28)},Pr=function(ne,ie,le){var Be=qe(ne,ie+28),Ge=Zr(ne.subarray(ie+46,ie+46+Be),!(qe(ne,ie+8)&2048)),tt=ie+46+Be,N=le?kr(ne,tt):[Ve(ne,ie+20),Ve(ne,ie+24),Ve(ne,ie+42)],d=N[0],g=N[1],P=N[2];return[qe(ne,ie+10),d,g,Ge,tt+qe(ne,ie+30)+qe(ne,ie+32),P]},kr=function(ne,ie){for(;qe(ne,ie)!=1;ie+=4+qe(ne,ie+2));return[Ve(ne,ie+12),Ve(ne,ie+4),Ve(ne,ie+20)]},vr=function(ne,ie,le,Be,Ge,tt,N,d,g,P){var V=tt.length,k=Be.length;Xe(ne,ie,g!=null?33639248:67324752),ie+=4,g!=null&&(ne[ie]=20,ie+=2),ne[ie]=20,ie+=2,ne[ie++]=P==8&&(d.level==1?6:d.level<6?4:d.level==9?2:0),ne[ie++]=N&&8,ne[ie]=P,ie+=2;var pe=new Date(d.mtime||Date.now()),ke=pe.getFullYear()-1980;if(ke<0||ke>119)throw"date not in range 1980-2099";Xe(ne,ie,(ke<<24)*2|pe.getMonth()+1<<21|pe.getDate()<<16|pe.getHours()<<11|pe.getMinutes()<<5|pe.getSeconds()>>>1),ie+=4,Xe(ne,ie,le),Xe(ne,ie+4,k),Xe(ne,ie+8,Ge),Xe(ne,ie+12,V),ie+=16,g!=null&&(Xe(ne,ie+=10,g),ie+=4),ne.set(tt,ie),ie+=V,g==null&&ne.set(Be,ie)},Dr=function(ne,ie,le,Be,Ge){Xe(ne,ie,101010256),Xe(ne,ie+8,le),Xe(ne,ie+10,le),Xe(ne,ie+12,Be),Xe(ne,ie+16,Ge)};function qr(ne,ie,le){if(le||(le=ie,ie={}),typeof le!="function")throw"no callback";var Be={};Gt(ne,"",Be,ie);var Ge=Object.keys(Be),tt=Ge.length,N=0,d=0,g=tt,P=new Array(tt),V=[],k=function(){for(var ot=0;ot<V.length;++ot)V[ot]()},pe=function(){var ot=new O(d+22),Ke=N,ft=d-N;d=0;for(var dt=0;dt<g;++dt){var Et=P[dt];try{vr(ot,d,Et.c,Et.d,Et.m,Et.n,Et.u,Et.p,null,Et.t),vr(ot,N,Et.c,Et.d,Et.m,Et.n,Et.u,Et.p,d,Et.t),N+=46+Et.n.length,d+=30+Et.n.length+Et.d.length}catch(Rt){return le(Rt,null)}}Dr(ot,N,P.length,ft,Ke),le(null,ot)};tt||pe();for(var ke=function(ot){var Ke=Ge[ot],ft=Be[Ke],dt=ft[0],Et=ft[1],Rt=xe(),ir=dt.length;Rt.p(dt);var Pt=zr(Ke),er=Pt.length,Ot=Et.level==0?0:8,hr=function(Qt,yr){if(Qt)k(),le(Qt,null);else{var dr=yr.length;P[ot]={t:Ot,d:yr,m:ir,c:Rt.d(),u:Ke.length!=dr,n:Pt,p:Et},N+=30+er+dr,d+=76+2*er+dr,--tt||pe()}};if(Pt.length>65535&&hr("filename too long",null),!Ot)hr(null,dt);else if(ir<16e4)try{hr(null,he(dt,Et))}catch(Qt){hr(Qt,null)}else V.push(Ae(dt,Et,hr))},Te=0;Te<g;++Te)ke(Te);return k}function Sr(ne,ie){ie===void 0&&(ie={});var le={},Be=[];Gt(ne,"",le,ie);var Ge=0,tt=0;for(var N in le){var d=le[N],g=d[0],P=d[1],V=P.level==0?0:8,k=zr(N),pe=k.length;if(k.length>65535)throw"filename too long";var ke=V?he(g,P):g,Te=ke.length,ot=xe();ot.p(g),Be.push({t:V,d:ke,m:g.length,c:ot.d(),u:N.length!=pe,n:k,o:Ge,p:P}),Ge+=30+pe+Te,tt+=76+2*pe+Te}for(var Ke=new O(tt+22),ft=Ge,dt=tt-Ge,Et=0;Et<Be.length;++Et){var Rt=Be[Et];vr(Ke,Rt.o,Rt.c,Rt.d,Rt.m,Rt.n,Rt.u,Rt.p,null,Rt.t),vr(Ke,Ge,Rt.c,Rt.d,Rt.m,Rt.n,Rt.u,Rt.p,Rt.o,Rt.t),Ge+=46+Rt.n.length}return Dr(Ke,Ge,Be.length,dt,ft),Ke}function en(ne,ie){if(typeof ie!="function")throw"no callback";for(var le=[],Be=function(){for(var pe=0;pe<le.length;++pe)le[pe]()},Ge={},tt=ne.length-22;Ve(ne,tt)!=101010256;--tt)if(!tt||ne.length-tt>65558){ie("invalid zip file",null);return}var N=qe(ne,tt+8);N||ie(null,{});var d=N,g=Ve(ne,tt+16),P=g==4294967295;if(P){if(tt=Ve(ne,tt-12),Ve(ne,tt)!=101075792)throw"invalid zip file";d=N=Ve(ne,tt+32),g=Ve(ne,tt+48)}for(var V=function(pe){var ke=Pr(ne,g,P),Te=ke[0],ot=ke[1],Ke=ke[2],ft=ke[3],dt=ke[4],Et=ke[5],Rt=Lr(ne,Et);g=dt;var ir=function(er,Ot){er?(Be(),ie(er,null)):(Ge[ft]=Ot,--N||ie(null,Ge))};if(!Te)ir(null,y(ne,Rt,Rt+ot));else if(Te==8){var Pt=ne.subarray(Rt,Rt+ot);if(ot<32e4)try{ir(null,ce(Pt,new O(Ke)))}catch(er){ir(er,null)}else le.push(oe(Pt,{size:Ke},ir))}else ir("unknown compression type "+Te,null)},k=0;k<d;++k)V(k);return Be}function Hr(ne){for(var ie={},le=ne.length-22;Ve(ne,le)!=101010256;--le)if(!le||ne.length-le>65558)throw"invalid zip file";var Be=qe(ne,le+8);if(!Be)return{};var Ge=Ve(ne,le+16),tt=Ge==4294967295;if(tt){if(le=Ve(ne,le-12),Ve(ne,le)!=101075792)throw"invalid zip file";Be=Ve(ne,le+32),Ge=Ve(ne,le+48)}for(var N=0;N<Be;++N){var d=Pr(ne,Ge,tt),g=d[0],P=d[1],V=d[2],k=d[3],pe=d[4],ke=d[5],Te=Lr(ne,ke);if(Ge=pe,!g)ie[k]=y(ne,Te,Te+P);else if(g==8)ie[k]=ce(ne.subarray(Te,Te+P),new O(V));else throw"unknown compression type "+g}return ie}},deN7:function(mt,Ze,Z){"use strict";var ve=Z("/zsF"),X=Z("PArb"),O=Z("14J3"),G=Z("BMrR"),D=Z("jCWc"),S=Z("kPKH"),z=Z("+L6B"),F=Z("2/Rp"),U=Z("miYZ"),I=Z("tsqr"),v=Z("9og8"),b=Z("giR+"),u=Z("fyUT"),a=Z("2qtc"),n=Z("kLXV"),s=Z("7Kak"),i=Z("9yH6"),t=Z("tJVT"),r=Z("k1fw"),A=Z("OaEy"),B=Z("2fM7"),w=Z("WmNS"),_=Z.n(w),x=Z("q1tI"),m=Z.n(x),c=Z("ZW9T"),e=Z("F0VM"),o=Z.n(e),l=Z("xKgJ"),y=Z("J66h"),p=Z.n(y),f=Z("ErOA"),R=Z("Ty5D"),L=Z("9Bee"),H=Z("XYT7"),j=Z("RCxd"),J=Z("/MfK"),M=B.a.Option,Y={selectOnLineNumbers:!0,readOnly:!0,minimap:{enabled:!1},scrollBeyondLastLine:!1,enableSplitViewResizing:!1,roundedSelection:!1,renderIndicators:!1,useShadows:!1},te;(function(fe){fe[fe.SET_PATH=0]="SET_PATH",fe[fe.GET_PASSED_CONTENT=1]="GET_PASSED_CONTENT"})(te||(te={}));function de(fe,Le){switch(Le.type){case te.SET_PATH:return Object(r.a)(Object(r.a)({},fe),{},{selectedPath:Le.payload});case te.GET_PASSED_CONTENT:return Object(r.a)(Object(r.a)({},fe),{},{passedContent:Le.payload});default:throw new Error}}Ze.a=function(fe){var Le=fe.language,xe=fe.dispatch,Ie=fe.shixunWorkReport,Fe=fe.v,Ue=fe.languages,be=fe.onPathChange,ue=fe.autoHeight,je=fe.diff_code_count,st=fe.data,nt=Object(x.useState)(Ue==null?void 0:Ue[0]),rt=Object(t.a)(nt,2),He=rt[0],re=rt[1],K=Ie!="shixunWorkReport"&&Object(R.i)();return Object(x.useEffect)(function(){re(Ue==null?void 0:Ue[0])},[]),Object(x.useEffect)(function(){var W;re(Ue==null||((W=Ue.filter(function(se){return se.language===(He==null?void 0:He.language)}))===null||W===void 0)?void 0:W[0])},[Ue]),m.a.createElement(m.a.Fragment,null,m.a.createElement("h2",null," ",m.a.createElement("span",null,m.a.createElement("span",null,"\u6700\u540E\u901A\u5173\u7684\u4EE3\u7801"),(Ue==null?void 0:Ue.length)>1&&m.a.createElement(i.a.Group,{defaultValue:Le,style:{marginLeft:10},onChange:function(se){var ye;re(Ue==null||((ye=Ue.filter(function(we){return we.language===se.target.value}))===null||ye===void 0)?void 0:ye[0])}},Ue==null?void 0:Ue.map(function(W){return m.a.createElement(i.a,{value:W==null?void 0:W.language},W==null?void 0:W.language)}))),Object(l.c)()&&Ie!="shixunWorkReport"&&m.a.createElement("span",null,m.a.createElement("span",null,"\u5F97\u5206 ",He==null?void 0:He.score,"/",He==null?void 0:He.total_score),m.a.createElement(F.a,{style:{margin:"0px 10px"},onClick:function(){var se=He==null?void 0:He.score;n.a.confirm({title:"\u8C03\u5206",content:m.a.createElement("div",null,m.a.createElement("p",null,"\u5F97\u5206\uFF1A",He==null?void 0:He.score,"/",He==null?void 0:He.total_score),m.a.createElement("p",null,"\u8C03\u5206\uFF1A",m.a.createElement(u.a,{min:0,max:He==null?void 0:He.total_score,defaultValue:He==null?void 0:He.score,onChange:function(we){se=we}}))),okText:"\u786E\u8BA4",onOk:function(){var ye=Object(v.a)(_.a.mark(function _e(){var $e;return _.a.wrap(function(Ve){for(;;)switch(Ve.prev=Ve.next){case 0:return Ve.next=2,Object(f.a)("/api/courses/".concat(K==null?void 0:K.coursesId,"/homework_commons/update_hack_score"),{method:"put",body:{course_id:K==null?void 0:K.coursesId,hack_user_code_id:He==null?void 0:He.hack_user_id,score:se}});case 2:$e=Ve.sent,$e.status===0&&(I.b.success("\u8C03\u5206\u6210\u529F"),xe({type:"shixunHomeworks/setActionTabs",payload:{}}),xe({type:"shixunHomeworks/getShixunWorkReports",payload:Object(r.a)({},K)}));case 4:case"end":return Ve.stop()}},_e)}));function we(){return ye.apply(this,arguments)}return we}(),cancelText:"\u53D6\u6D88"})},type:"primary"},"\u8C03\u5206"),Object(l.c)()&&Ie!="shixunWorkReport"&&m.a.createElement(F.a,{onClick:function(){xe({type:"shixunHomeworks/setActionTabs",payload:{key:"\u66F4\u6539\u70B9\u8BC4",selectArrs:{myshixun_identifier:Ie.user_id,type:"1",language:He==null?void 0:He.language,v:Fe,data:Object(r.a)({},Ie)}}})}},"\u70B9\u8BC4\u4EE3\u7801"))),m.a.createElement(c.b,{height:300,language:He==null?void 0:He.language,value:y.Base64.decode(He==null?void 0:He.code),autoHeight:ue,theme:"default",options:Y}),((He==null?void 0:He.comment)||(He==null?void 0:He.hidden_comment))&&m.a.createElement("div",null,m.a.createElement(G.a,{align:"middle",style:{borderTop:"1px solid #eee"}},m.a.createElement(S.a,{flex:1},m.a.createElement("h1",{className:o.a.title},"\u70B9\u8BC4\u5185\u5BB9")),m.a.createElement(S.a,{className:"pr30"},Object(l.c)()&&m.a.createElement(F.a,{onClick:Object(v.a)(_.a.mark(function W(){return _.a.wrap(function(ye){for(;;)switch(ye.prev=ye.next){case 0:n.a.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",icon:m.a.createElement(j.a,null),content:"\u662F\u5426\u786E\u8BA4\u5220\u9664\uFF1F",onOk:function(){return Object(v.a)(_.a.mark(function _e(){var $e;return _.a.wrap(function(Ve){for(;;)switch(Ve.prev=Ve.next){case 0:return Ve.next=2,Object(H.m)({comment_id:He==null?void 0:He.comment_id,homeworkId:K.homeworkId,type:"hack"});case 2:$e=Ve.sent,$e.status===0&&(I.b.success("\u5220\u9664\u6210\u529F"),xe({type:"shixunHomeworks/getShixunWorkReports",payload:Object(r.a)({},K)}));case 4:case"end":return Ve.stop()}},_e)}))()}});case 1:case"end":return ye.stop()}},W)}))},m.a.createElement(J.a,null),"\u5220\u9664"))),m.a.createElement(X.a,{style:{margin:0}}),(He==null?void 0:He.comment)&&m.a.createElement("aside",{className:"pl30 pr30 mt20"},m.a.createElement("span",{className:"c-light-black font12"},"# \u5B66\u751F\u548C\u8BFE\u5802\u8001\u5E08\u53EF\u89C1"),m.a.createElement("br",null),m.a.createElement(L.a,{value:He==null?void 0:He.comment})),(He==null?void 0:He.hidden_comment)&&m.a.createElement("aside",{className:"pl30 pr30 mt20"},m.a.createElement("span",{className:"c-light-black font12"},"# \u4EC5\u8BFE\u5802\u8001\u5E08\u53EF\u89C1"),m.a.createElement("br",null),m.a.createElement(L.a,{value:He==null?void 0:He.hidden_comment}))))}},dmUQ:function(mt,Ze,Z){"use strict";var ve=Z("Ff2n"),X=Z("rePB"),O=Z("1OyB"),G=Z("vuIU"),D=Z("Ji7U"),S=Z("md7G"),z=Z("foSv"),F=Z("q1tI"),U=Z.n(F),I=Z("TSYQ"),v=Z.n(I),b=Z("4IlW");function u(o,l){var y=Object.keys(o);if(Object.getOwnPropertySymbols){var p=Object.getOwnPropertySymbols(o);l&&(p=p.filter(function(f){return Object.getOwnPropertyDescriptor(o,f).enumerable})),y.push.apply(y,p)}return y}function a(o){for(var l=1;l<arguments.length;l++){var y=arguments[l]!=null?arguments[l]:{};l%2?u(Object(y),!0).forEach(function(p){Object(X.a)(o,p,y[p])}):Object.getOwnPropertyDescriptors?Object.defineProperties(o,Object.getOwnPropertyDescriptors(y)):u(Object(y)).forEach(function(p){Object.defineProperty(o,p,Object.getOwnPropertyDescriptor(y,p))})}return o}function n(o){var l=s();return function(){var p=Object(z.a)(o),f;if(l){var R=Object(z.a)(this).constructor;f=Reflect.construct(p,arguments,R)}else f=p.apply(this,arguments);return Object(S.a)(this,f)}}function s(){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(o){return!1}}function i(){}function t(o){o.preventDefault()}var r=function(l){return l.replace(/[^\w.-]+/g,"")},A=200,B=600,w=Number.MAX_SAFE_INTEGER||Math.pow(2,53)-1,_=function(l){return l!=null},x=function(l,y){return y===l||typeof y=="number"&&typeof l=="number"&&isNaN(y)&&isNaN(l)},m=function(o){Object(D.a)(y,o);var l=n(y);function y(p){var f;Object(O.a)(this,y),f=l.call(this,p),f.onKeyDown=function(H){var j=f.props,J=j.onKeyDown,M=j.onPressEnter;if(H.keyCode===b.a.UP){var Y=f.getRatio(H);f.up(H,Y,null),f.stop()}else if(H.keyCode===b.a.DOWN){var te=f.getRatio(H);f.down(H,te,null),f.stop()}else H.keyCode===b.a.ENTER&&M&&M(H);if(f.recordCursorPosition(),f.lastKeyCode=H.keyCode,J){for(var de=arguments.length,fe=new Array(de>1?de-1:0),Le=1;Le<de;Le++)fe[Le-1]=arguments[Le];J.apply(void 0,[H].concat(fe))}},f.onKeyUp=function(H){var j=f.props.onKeyUp;if(f.stop(),f.recordCursorPosition(),j){for(var J=arguments.length,M=new Array(J>1?J-1:0),Y=1;Y<J;Y++)M[Y-1]=arguments[Y];j.apply(void 0,[H].concat(M))}},f.onChange=function(H){var j=f.props.onChange;f.state.focused&&(f.inputting=!0),f.rawInput=f.props.parser(f.getValueFromEvent(H)),f.setState({inputValue:f.rawInput}),j(f.toNumber(f.rawInput))},f.onMouseUp=function(){var H=f.props.onMouseUp;f.recordCursorPosition(),H&&H.apply(void 0,arguments)},f.onFocus=function(){var H;f.setState({focused:!0}),(H=f.props).onFocus.apply(H,arguments)},f.onBlur=function(){var H=f.props.onBlur;f.inputting=!1,f.setState({focused:!1});var j=f.getCurrentValidValue(f.state.inputValue),J=f.setValue(j,i);if(H){var M=f.input.value,Y=f.getInputDisplayValue({focus:!1,value:J});f.input.value=Y&&Number(Y),H.apply(void 0,arguments),f.input.value=M}},f.getRatio=function(H){var j=1;return H.metaKey||H.ctrlKey?j=.1:H.shiftKey&&(j=10),j},f.getFullNum=function(H){return isNaN(H)?H:/e/i.test(String(H))?Number(H).toFixed(18).replace(/\.?0+$/,""):H},f.getPrecision=function(H){if(_(f.props.precision))return f.props.precision;var j=String(H);if(j.indexOf("e-")>=0)return parseInt(j.slice(j.indexOf("e-")+2),10);var J=0;return j.indexOf(".")>=0&&(J=j.length-j.indexOf(".")-1),J},f.getInputDisplayValue=function(H){var j=H||f.state,J=j.focused,M=j.inputValue,Y=j.value,te;J?te=M:te=f.toPrecisionAsStep(Y),te==null&&(te="");var de=f.formatWrapper(te);return _(f.props.decimalSeparator)&&(de=de.toString().replace(".",f.props.decimalSeparator)),de},f.recordCursorPosition=function(){try{f.cursorStart=f.input.selectionStart,f.cursorEnd=f.input.selectionEnd,f.currentValue=f.input.value,f.cursorBefore=f.input.value.substring(0,f.cursorStart),f.cursorAfter=f.input.value.substring(f.cursorEnd)}catch(H){}},f.restoreByAfter=function(H){if(H===void 0)return!1;var j=f.input.value,J=j.lastIndexOf(H);if(J===-1)return!1;var M=f.cursorBefore.length;return f.lastKeyCode===b.a.DELETE&&f.cursorBefore.charAt(M-1)===H[0]?(f.fixCaret(M,M),!0):J+H.length===j.length?(f.fixCaret(J,J),!0):!1},f.partRestoreByAfter=function(H){return H===void 0?!1:Array.prototype.some.call(H,function(j,J){var M=H.substring(J);return f.restoreByAfter(M)})},f.isNotCompleteNumber=function(H){return isNaN(H)||H===""||H===null||H&&H.toString().indexOf(".")===H.toString().length-1},f.stop=function(){f.autoStepTimer&&clearTimeout(f.autoStepTimer)},f.down=function(H,j,J){f.pressingUpOrDown=!0,f.step("down",H,j,J)},f.up=function(H,j,J){f.pressingUpOrDown=!0,f.step("up",H,j,J)},f.saveInput=function(H){f.input=H};var R=p.value;R===void 0&&(R=p.defaultValue),f.state={focused:p.autoFocus};var L=f.getValidValue(f.toNumber(R));return f.state=a(a({},f.state),{},{inputValue:f.toPrecisionAsStep(L),value:L}),f}return Object(G.a)(y,[{key:"componentDidMount",value:function(){this.componentDidUpdate(null)}},{key:"componentDidUpdate",value:function(f){var R=this.props,L=R.value,H=R.onChange,j=R.max,J=R.min,M=this.state.focused;if(f){if(!x(f.value,L)||!x(f.max,j)||!x(f.min,J)){var Y=M?L:this.getValidValue(L),te;this.pressingUpOrDown?te=Y:this.inputting?te=this.rawInput:te=this.toPrecisionAsStep(Y),this.setState({value:Y,inputValue:te})}var de="value"in this.props?L:this.state.value;"max"in this.props&&f.max!==j&&typeof de=="number"&&de>j&&H&&H(j),"min"in this.props&&f.min!==J&&typeof de=="number"&&de<J&&H&&H(J)}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===b.a.BACKSPACE?fe=this.cursorStart-1:this.lastKeyCode===b.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 b.a.BACKSPACE:this.fixCaret(this.cursorStart-1,this.cursorStart-1);break;case b.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(f){var R=f;return R===""?R="":this.isNotCompleteNumber(parseFloat(R))?R=this.state.value:R=this.getValidValue(R),this.toNumber(R)}},{key:"getValueFromEvent",value:function(f){var R=f.target.value.trim().replace(/。/g,".");return _(this.props.decimalSeparator)&&(R=R.replace(this.props.decimalSeparator,".")),R}},{key:"getValidValue",value:function(f){var R=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.props.min,L=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.props.max,H=parseFloat(f);return isNaN(H)?f:(H<R&&(H=R),H>L&&(H=L),H)}},{key:"setValue",value:function(f,R){var L=this.props.precision,H=this.isNotCompleteNumber(parseFloat(f))?null:parseFloat(f),j=this.state.value,J=j===void 0?null:j,M=this.state.inputValue,Y=M===void 0?null:M,te=typeof H=="number"?H.toFixed(L):"".concat(H),de=H!==J||te!=="".concat(Y);return"value"in this.props?(Y=this.toPrecisionAsStep(this.state.value),this.setState({inputValue:Y},R)):this.setState({value:H,inputValue:this.toPrecisionAsStep(f)},R),de&&this.props.onChange(H),H}},{key:"getMaxPrecision",value:function(f){var R=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,L=this.props,H=L.precision,j=L.step;if(_(H))return H;var J=this.getPrecision(R),M=this.getPrecision(j),Y=this.getPrecision(f);return f?Math.max(Y,J+M):J+M}},{key:"getPrecisionFactor",value:function(f){var R=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,L=this.getMaxPrecision(f,R);return Math.pow(10,L)}},{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(f){return this.props.formatter?this.props.formatter(f):f}},{key:"toPrecisionAsStep",value:function(f){if(this.isNotCompleteNumber(f)||f==="")return f;var R=Math.abs(this.getMaxPrecision(f));return isNaN(R)?f.toString():Number(f).toFixed(R)}},{key:"toNumber",value:function(f){var R=this.props.precision,L=this.state.focused,H=f&&f.length>16&&L;return this.isNotCompleteNumber(f)||H?f:_(R)?Math.round(f*Math.pow(10,R))/Math.pow(10,R):Number(f)}},{key:"upStep",value:function(f,R){var L=this.props.step,H=this.getPrecisionFactor(f,R),j=Math.abs(this.getMaxPrecision(f,R)),J=((H*f+H*L*R)/H).toFixed(j);return this.toNumber(J)}},{key:"downStep",value:function(f,R){var L=this.props.step,H=this.getPrecisionFactor(f,R),j=Math.abs(this.getMaxPrecision(f,R)),J=((H*f-H*L*R)/H).toFixed(j);return this.toNumber(J)}},{key:"step",value:function(f,R){var L=this,H=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,j=arguments.length>3?arguments[3]:void 0;this.stop(),R&&(R.persist(),R.preventDefault());var J=this.props;if(J.disabled)return;var M=this.getCurrentValidValue(this.state.inputValue)||0;if(this.isNotCompleteNumber(M))return;var Y=this["".concat(f,"Step")](M,H),te=Y>J.max||Y<J.min;if(Y>J.max?Y=J.max:Y<J.min&&(Y=J.min),this.setValue(Y,null),this.setState({focused:!0},function(){L.pressingUpOrDown=!1}),te)return;this.autoStepTimer=setTimeout(function(){L[f](R,H,!0)},j?A:B)}},{key:"fixCaret",value:function(f,R){if(f===void 0||R===void 0||!this.input||!this.input.value)return;try{var L=this.input.selectionStart,H=this.input.selectionEnd;(f!==L||R!==H)&&this.input.setSelectionRange(f,R)}catch(j){}}},{key:"render",value:function(){var f,R=this.props,L=R.prefixCls,H=R.disabled,j=R.readOnly,J=R.useTouch,M=R.autoComplete,Y=R.upHandler,te=R.downHandler,de=R.className,fe=R.max,Le=R.min,xe=R.style,Ie=R.title,Fe=R.onMouseEnter,Ue=R.onMouseLeave,be=R.onMouseOver,ue=R.onMouseOut,je=R.required,st=R.onClick,nt=R.tabIndex,rt=R.type,He=R.placeholder,re=R.id,K=R.inputMode,W=R.pattern,se=R.step,ye=R.maxLength,we=R.autoFocus,_e=R.name,$e=R.onPaste,qe=R.onInput,Ve=Object(ve.a)(R,["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"]),Xe=this.state,at=Xe.value,ct=Xe.focused,Ce=v()(L,(f={},Object(X.a)(f,de,!!de),Object(X.a)(f,"".concat(L,"-disabled"),H),Object(X.a)(f,"".concat(L,"-focused"),ct),f)),De={};Object.keys(Ve).forEach(function(ce){(ce.substr(0,5)==="data-"||ce.substr(0,5)==="aria-"||ce==="role")&&(De[ce]=Ve[ce])});var Qe=!j&&!H,We=this.getInputDisplayValue(null),Re=(at||at===0)&&(isNaN(at)||Number(at)>=fe),Me=(at||at===0)&&(isNaN(at)||Number(at)<=Le),Ee=Re||H||j,Ae=Me||H||j,he=v()("".concat(L,"-handler"),"".concat(L,"-handler-up"),Object(X.a)({},"".concat(L,"-handler-up-disabled"),Ee)),q=v()("".concat(L,"-handler"),"".concat(L,"-handler-down"),Object(X.a)({},"".concat(L,"-handler-down-disabled"),Ae)),ee=J?{onTouchStart:Ee?i:this.up,onTouchEnd:this.stop}:{onMouseDown:Ee?i:this.up,onMouseUp:this.stop,onMouseLeave:this.stop},oe=J?{onTouchStart:Ae?i:this.down,onTouchEnd:this.stop}:{onMouseDown:Ae?i:this.down,onMouseUp:this.stop,onMouseLeave:this.stop};return U.a.createElement("div",{className:Ce,style:xe,title:Ie,onMouseEnter:Fe,onMouseLeave:Ue,onMouseOver:be,onMouseOut:ue,onFocus:function(){return null},onBlur:function(){return null}},U.a.createElement("div",{className:"".concat(L,"-handler-wrap")},U.a.createElement("span",Object.assign({unselectable:"on"},ee,{role:"button","aria-label":"Increase Value","aria-disabled":Ee,className:he}),Y||U.a.createElement("span",{unselectable:"on",className:"".concat(L,"-handler-up-inner"),onClick:t})),U.a.createElement("span",Object.assign({unselectable:"on"},oe,{role:"button","aria-label":"Decrease Value","aria-disabled":Ae,className:q}),te||U.a.createElement("span",{unselectable:"on",className:"".concat(L,"-handler-down-inner"),onClick:t}))),U.a.createElement("div",{className:"".concat(L,"-input-wrap")},U.a.createElement("input",Object.assign({role:"spinbutton","aria-valuemin":Le,"aria-valuemax":fe,"aria-valuenow":at,required:je,type:rt,placeholder:He,onPaste:$e,onClick:st,onMouseUp:this.onMouseUp,className:"".concat(L,"-input"),tabIndex:nt,autoComplete:M,onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:Qe?this.onKeyDown:i,onKeyUp:Qe?this.onKeyUp:i,autoFocus:we,maxLength:ye,readOnly:j,disabled:H,max:fe,min:Le,step:se,name:_e,title:Ie,id:re,onChange:this.onChange,ref:this.saveInput,value:this.getFullNum(We),pattern:W,inputMode:K,onInput:qe},De))))}}]),y}(U.a.Component);m.defaultProps={focusOnUpDown:!0,useTouch:!1,prefixCls:"rc-input-number",max:w,min:-w,step:1,style:{},onChange:i,onKeyDown:i,onPressEnter:i,onFocus:i,onBlur:i,parser:r,required:!1,autoComplete:"off"};var c=m,e=Ze.a=c},fyJ8:function(mt,Ze,Z){"use strict";var ve=Z("rePB"),X=Z("VTBJ"),O=Z("Ff2n"),G=Z("U8pU"),D=Z("q1tI"),S=Z.n(D),z=Z("TSYQ"),F=Z.n(z),U=Z("c+Xe"),I=Z("sR1s");function v(s){return s&&Object(G.a)(s)==="object"&&!Array.isArray(s)&&!D.isValidElement(s)}function b(s){return typeof s=="string"?!0:Object(U.c)(s)}function u(s,i){var t,r=s.prefixCls,A=s.className,B=s.record,w=s.index,_=s.dataIndex,x=s.render,m=s.children,c=s.component,e=c===void 0?"td":c,o=s.colSpan,l=s.rowSpan,y=s.fixLeft,p=s.fixRight,f=s.firstFixLeft,R=s.lastFixLeft,L=s.firstFixRight,H=s.lastFixRight,j=s.appendNode,J=s.additionalProps,M=J===void 0?{}:J,Y=s.ellipsis,te=s.align,de=s.rowType,fe=s.isSticky,Le="".concat(r,"-cell"),xe,Ie;if(m)Ie=m;else{var Fe=Object(I.b)(B,_);if(Ie=Fe,x){var Ue=x(Fe,B,w);v(Ue)?(Ie=Ue.children,xe=Ue.props):Ie=Ue}}Object(G.a)(Ie)==="object"&&!Array.isArray(Ie)&&!D.isValidElement(Ie)&&(Ie=null),Y&&(R||L)&&(Ie=D.createElement("span",{className:"".concat(Le,"-content")},Ie));var be=xe||{},ue=be.colSpan,je=be.rowSpan,st=be.style,nt=be.className,rt=Object(O.a)(be,["colSpan","rowSpan","style","className"]),He=ue!==void 0?ue:o,re=je!==void 0?je:l;if(He===0||re===0)return null;var K={},W=typeof y=="number",se=typeof p=="number";W&&(K.position="sticky",K.left=y),se&&(K.position="sticky",K.right=p);var ye={};te&&(ye.textAlign=te);var we,_e=Y===!0?{showTitle:!0}:Y;_e&&(_e.showTitle||de==="header")&&(typeof Ie=="string"||typeof Ie=="number"?we=Ie.toString():D.isValidElement(Ie)&&typeof Ie.props.children=="string"&&(we=Ie.props.children));var $e=Object(X.a)(Object(X.a)(Object(X.a)({title:we},rt),M),{},{colSpan:He&&He!==1?He:null,rowSpan:re&&re!==1?re:null,className:F()(Le,A,(t={},Object(ve.a)(t,"".concat(Le,"-fix-left"),W),Object(ve.a)(t,"".concat(Le,"-fix-left-first"),f),Object(ve.a)(t,"".concat(Le,"-fix-left-last"),R),Object(ve.a)(t,"".concat(Le,"-fix-right"),se),Object(ve.a)(t,"".concat(Le,"-fix-right-first"),L),Object(ve.a)(t,"".concat(Le,"-fix-right-last"),H),Object(ve.a)(t,"".concat(Le,"-ellipsis"),Y),Object(ve.a)(t,"".concat(Le,"-with-append"),j),Object(ve.a)(t,"".concat(Le,"-fix-sticky"),(W||se)&&fe),t),M.className,nt),style:Object(X.a)(Object(X.a)(Object(X.a)(Object(X.a)({},M.style),ye),K),st),ref:b(e)?i:null});return D.createElement(e,Object.assign({},$e),j,Ie)}var a=D.forwardRef(u);a.displayName="Cell";var n=D.memo(a,function(s,i){return i.shouldCellUpdate?!i.shouldCellUpdate(i.record,s.record):!1});Ze.a=n},hW8S:function(mt,Ze,Z){"use strict";Z.d(Ze,"a",function(){return G}),Z.d(Ze,"c",function(){return D}),Z.d(Ze,"b",function(){return S});var ve=Z("VTBJ"),X=Z("Ff2n"),O=Z("Kwbf"),G="RC_TABLE_INTERNAL_COL_DEFINE";function D(z){var F=z.expandable,U=Object(X.a)(z,["expandable"]);return"expandable"in z?Object(ve.a)(Object(ve.a)({},U),F):U}function S(z){return Object.keys(z).reduce(function(F,U){return(U.substr(0,5)==="data-"||U.substr(0,5)==="aria-")&&(F[U]=z[U]),F},{})}},"kVK+":function(mt,Ze){/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */Ze.read=function(Z,ve,X,O,G){var D,S,z=G*8-O-1,F=(1<<z)-1,U=F>>1,I=-7,v=X?G-1:0,b=X?-1:1,u=Z[ve+v];for(v+=b,D=u&(1<<-I)-1,u>>=-I,I+=z;I>0;D=D*256+Z[ve+v],v+=b,I-=8);for(S=D&(1<<-I)-1,D>>=-I,I+=O;I>0;S=S*256+Z[ve+v],v+=b,I-=8);if(D===0)D=1-U;else{if(D===F)return S?NaN:(u?-1:1)*Infinity;S=S+Math.pow(2,O),D=D-U}return(u?-1:1)*S*Math.pow(2,D-O)},Ze.write=function(Z,ve,X,O,G,D){var S,z,F,U=D*8-G-1,I=(1<<U)-1,v=I>>1,b=G===23?Math.pow(2,-24)-Math.pow(2,-77):0,u=O?0:D-1,a=O?1:-1,n=ve<0||ve===0&&1/ve<0?1:0;for(ve=Math.abs(ve),isNaN(ve)||ve===Infinity?(z=isNaN(ve)?1:0,S=I):(S=Math.floor(Math.log(ve)/Math.LN2),ve*(F=Math.pow(2,-S))<1&&(S--,F*=2),S+v>=1?ve+=b/F:ve+=b*Math.pow(2,1-v),ve*F>=2&&(S++,F/=2),S+v>=I?(z=0,S=I):S+v>=1?(z=(ve*F-1)*Math.pow(2,G),S=S+v):(z=ve*Math.pow(2,v-1)*Math.pow(2,G),S=0));G>=8;Z[X+u]=z&255,u+=a,z/=256,G-=8);for(S=S<<G|z,U+=G;U>0;Z[X+u]=S&255,u+=a,S/=256,U-=8);Z[X+u-a]|=n*128}},n6Qo:function(mt,Ze,Z){"use strict";Z.d(Ze,"a",function(){return F});var ve=Z("q1tI"),X=Z("biw7"),O=Z("fyJ8");function G(U){var I=U.className,v=U.index,b=U.children,u=U.colSpan,a=U.rowSpan,n=ve.useContext(X.a),s=n.prefixCls,i=n.fixedInfoList,t=i[v];return ve.createElement(O.a,Object.assign({className:I,index:v,component:"td",prefixCls:s,record:null,dataIndex:null,render:function(){return{children:b,props:{colSpan:u,rowSpan:a}}}},t))}function D(U){return ve.createElement("tr",Object.assign({},U))}function S(U){var I=U.children,v=ve.useContext(X.a),b=v.prefixCls;return ve.createElement("tfoot",{className:"".concat(b,"-summary")},I)}var z=Ze.b=S,F={Cell:G,Row:D}},p5ED:function(mt,Ze,Z){"use strict";var ve=Z("+L6B"),X=Z("2/Rp"),O=Z("5Dmo"),G=Z("3S7+"),D=Z("k1fw"),S=Z("tJVT"),z=Z("q1tI"),F=Z.n(z),U=Z("vHTk"),I=Z.n(U),v=Z("yEEn"),b=Z("ZW9T"),u=Z("1vsH");Ze.a=function(a){var n=a.name,s=a.data,i=a.theme,t=a.type,r=a.filename,A=a.monacoEditor,B=a.className,w=a.style,_=a.close,x=a.onClose,m=a.hasMask,c=Object(z.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),e=Object(S.a)(c,2),o=e[0],l=e[1],y=Object(z.useState)(""),p=Object(S.a)(y,2),f=p[0],R=p[1],L,H=1024*1024,j=10*H,J=Object(z.useRef)();t==="office"&&(L=Object(u.T)(s).filesize,L>j&&(t="other")),r&&(A.filename=r),Object(z.useEffect)(function(){var te,de,fe=(te=document.cookie)===null||te===void 0||((de=te.replace(/\s/g,""))===null||de===void 0)?void 0:de.split(";");fe==null||fe.map(function(Le){var xe=Le.split("=");xe[0]==="_educoder_session"&&R(xe[1])})},[]);var M=function(){if(s.startsWith("http")||s.startsWith("/")){Y();return}Object(u.z)(r||"educoder",s,r)},Y=function(){Object(u.x)(r||n,s)};return console.log("data:",s,"fileanme:",r," name:",n),F.a.createElement("div",{style:Object(D.a)({},w||{}),className:"".concat(m&&I.a.bgBlack," ").concat(t?I.a.wrp:"hide")},_&&F.a.createElement("div",{className:I.a.close,ref:J},F.a.createElement(G.a,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:function(){return J.current}},F.a.createElement("span",{onClick:Y},F.a.createElement("i",{className:"icon-quxiaozhiding"}))),F.a.createElement(G.a,{title:"\u5173\u95ED",getPopupContainer:function(){return J.current}},F.a.createElement("span",{className:"",onClick:x},F.a.createElement("i",{className:"icon-guanbi1"})))),F.a.createElement("div",{className:"".concat(I.a[B]," ").concat(B," ").concat(I.a.monaco," ").concat(t==="txt"?"show":"hide")},t==="txt"&&F.a.createElement(b.b,A)),t==="audio"&&F.a.createElement("audio",{src:"".concat(s!=null&&s.startsWith("/")||(s==null?void 0:s.indexOf("https://"))>-1?s:"data:audio/mp3;base64,").concat(s),autoPlay:!0}),t==="video"&&F.a.createElement(F.a.Fragment,null,s!=null&&s.startsWith("/")?F.a.createElement("video",{controls:!0,src:"".concat(s),autoPlay:!0}):F.a.createElement("video",{controls:!0,src:"data:video/mp4;base64,".concat(s),autoPlay:!0})),t==="html"&&F.a.createElement("iframe",{src:s+"&disposition=inline"}),t==="pdf"&&F.a.createElement("embed",{className:I.a.embed,src:s}),t==="image"&&F.a.createElement(F.a.Fragment,null,F.a.createElement("img",{src:"".concat(s!=null&&s.startsWith("/")||(s==null?void 0:s.indexOf("https://"))>-1?"":"data:image/png;base64,").concat(s)})),t==="other"&&F.a.createElement("div",null,F.a.createElement(X.a,{type:"primary",size:"large",onClick:M},F.a.createElement(v.a,null),"\u70B9\u51FB\u4E0B\u8F7D")),(t==="download"||t==="office")&&F.a.createElement(X.a,{type:"primary",size:"large",onClick:M},F.a.createElement(v.a,null),"\u70B9\u51FB\u4E0B\u8F7D"))}},psGv:function(mt,Ze,Z){var ve,X;(function(){var O;(function(){"use strict";var z=[,,function(v){function b(n){this.__parent=n,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=[]}b.prototype.clone_empty=function(){var n=new b(this.__parent);return n.set_indent(this.__indent_count,this.__alignment_count),n},b.prototype.item=function(n){return n<0?this.__items[this.__items.length+n]:this.__items[n]},b.prototype.has_match=function(n){for(var s=this.__items.length-1;s>=0;s--)if(this.__items[s].match(n))return!0;return!1},b.prototype.set_indent=function(n,s){this.is_empty()&&(this.__indent_count=n||0,this.__alignment_count=s||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},b.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)},b.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},b.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var n=this.__parent.current_line;return n.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),n.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),n.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,n.__items[0]===" "&&(n.__items.splice(0,1),n.__character_count-=1),!0}return!1},b.prototype.is_empty=function(){return this.__items.length===0},b.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},b.prototype.push=function(n){this.__items.push(n);var s=n.lastIndexOf(`
`);s!==-1?this.__character_count=n.length-s:this.__character_count+=n.length},b.prototype.pop=function(){var n=null;return this.is_empty()||(n=this.__items.pop(),this.__character_count-=n.length),n},b.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},b.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},b.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},b.prototype.toString=function(){var n="";return this.is_empty()?this.__parent.indent_empty_lines&&(n=this.__parent.get_indent_string(this.__indent_count)):(n=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),n+=this.__items.join("")),n};function u(n,s){this.__cache=[""],this.__indent_size=n.indent_size,this.__indent_string=n.indent_char,n.indent_with_tabs||(this.__indent_string=new Array(n.indent_size+1).join(n.indent_char)),s=s||"",n.indent_level>0&&(s=new Array(n.indent_level+1).join(this.__indent_string)),this.__base_string=s,this.__base_string_length=s.length}u.prototype.get_indent_size=function(n,s){var i=this.__base_string_length;return s=s||0,n<0&&(i=0),i+=n*this.__indent_size,i+=s,i},u.prototype.get_indent_string=function(n,s){var i=this.__base_string;return s=s||0,n<0&&(n=0,i=""),s+=n*this.__indent_size,this.__ensure_cache(s),i+=this.__cache[s],i},u.prototype.__ensure_cache=function(n){for(;n>=this.__cache.length;)this.__add_column()},u.prototype.__add_column=function(){var n=this.__cache.length,s=0,i="";this.__indent_size&&n>=this.__indent_size&&(s=Math.floor(n/this.__indent_size),n-=s*this.__indent_size,i=new Array(s+1).join(this.__indent_string)),n&&(i+=new Array(n+1).join(" ")),this.__cache.push(i)};function a(n,s){this.__indent_cache=new u(n,s),this.raw=!1,this._end_with_newline=n.end_with_newline,this.indent_size=n.indent_size,this.wrap_line_length=n.wrap_line_length,this.indent_empty_lines=n.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new b(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}a.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},a.prototype.get_line_number=function(){return this.__lines.length},a.prototype.get_indent_string=function(n,s){return this.__indent_cache.get_indent_string(n,s)},a.prototype.get_indent_size=function(n,s){return this.__indent_cache.get_indent_size(n,s)},a.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},a.prototype.add_new_line=function(n){return this.is_empty()||!n&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},a.prototype.get_code=function(n){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 n!==`
`&&(i=i.replace(/[\n]/g,n)),i},a.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},a.prototype.set_indent=function(n,s){return n=n||0,s=s||0,this.next_line.set_indent(n,s),this.__lines.length>1?(this.current_line.set_indent(n,s),!0):(this.current_line.set_indent(),!1)},a.prototype.add_raw_token=function(n){for(var s=0;s<n.newlines;s++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(n.whitespace_before),this.current_line.push(n.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},a.prototype.add_token=function(n){this.__add_space_before_token(),this.current_line.push(n),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=this.current_line._allow_wrap()},a.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(" "))},a.prototype.remove_indent=function(n){for(var s=this.__lines.length;n<s;)this.__lines[n]._remove_indent(),n++;this.current_line._remove_wrap_indent()},a.prototype.trim=function(n){for(n=n===void 0?!1:n,this.current_line.trim();n&&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},a.prototype.just_added_newline=function(){return this.current_line.is_empty()},a.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},a.prototype.ensure_empty_line_above=function(n,s){for(var i=this.__lines.length-2;i>=0;){var t=this.__lines[i];if(t.is_empty())break;if(t.item(0).indexOf(n)!==0&&t.item(-1)!==s){this.__lines.splice(i+1,0,new b(this)),this.previous_line=this.__lines[this.__lines.length-2];break}i--}},v.exports.Output=a},function(v){function b(u,a,n,s){this.type=u,this.text=a,this.comments_before=null,this.newlines=n||0,this.whitespace_before=s||"",this.parent=null,this.next=null,this.previous=null,this.opened=null,this.closed=null,this.directives=null}v.exports.Token=b},,,function(v){function b(n,s){this.raw_options=u(n,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"])}b.prototype._get_array=function(n,s){var i=this.raw_options[n],t=s||[];return typeof i=="object"?i!==null&&typeof i.concat=="function"&&(t=i.concat()):typeof i=="string"&&(t=i.split(/[^a-zA-Z0-9_\/\-]+/)),t},b.prototype._get_boolean=function(n,s){var i=this.raw_options[n],t=i===void 0?!!s:!!i;return t},b.prototype._get_characters=function(n,s){var i=this.raw_options[n],t=s||"";return typeof i=="string"&&(t=i.replace(/\\r/,"\r").replace(/\\n/,`
`).replace(/\\t/," ")),t},b.prototype._get_number=function(n,s){var i=this.raw_options[n];s=parseInt(s,10),isNaN(s)&&(s=0);var t=parseInt(i,10);return isNaN(t)&&(t=s),t},b.prototype._get_selection=function(n,s,i){var t=this._get_selection_list(n,s,i);if(t.length!==1)throw new Error("Invalid Option Value: The option '"+n+`' can only be one of the following values:
`+s+`
You passed in: '`+this.raw_options[n]+"'");return t[0]},b.prototype._get_selection_list=function(n,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 t=this._get_array(n,i);if(!this._is_valid_selection(t,s))throw new Error("Invalid Option Value: The option '"+n+`' can contain only the following values:
`+s+`
You passed in: '`+this.raw_options[n]+"'");return t},b.prototype._is_valid_selection=function(n,s){return n.length&&s.length&&!n.some(function(i){return s.indexOf(i)===-1})};function u(n,s){var i={};n=a(n);var t;for(t in n)t!==s&&(i[t]=n[t]);if(s&&n[s])for(t in n[s])i[t]=n[s][t];return i}function a(n){var s={},i;for(i in n){var t=i.replace(/-/g,"_");s[t]=n[i]}return s}v.exports.Options=b,v.exports.normalizeOpts=a,v.exports.mergeOpts=u},,function(v){var b=RegExp.prototype.hasOwnProperty("sticky");function u(a){this.__input=a||"",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 a=null;return this.hasNext()&&(a=this.__input.charAt(this.__position),this.__position+=1),a},u.prototype.peek=function(a){var n=null;return a=a||0,a+=this.__position,a>=0&&a<this.__input_length&&(n=this.__input.charAt(a)),n},u.prototype.__match=function(a,n){a.lastIndex=n;var s=a.exec(this.__input);return s&&!(b&&a.sticky)&&(s.index!==n&&(s=null)),s},u.prototype.test=function(a,n){return n=n||0,n+=this.__position,n>=0&&n<this.__input_length?!!this.__match(a,n):!1},u.prototype.testChar=function(a,n){var s=this.peek(n);return a.lastIndex=0,s!==null&&a.test(s)},u.prototype.match=function(a){var n=this.__match(a,this.__position);return n?this.__position+=n[0].length:n=null,n},u.prototype.read=function(a,n,s){var i="",t;return a&&(t=this.match(a),t&&(i+=t[0])),n&&(t||!a)&&(i+=this.readUntil(n,s)),i},u.prototype.readUntil=function(a,n){var s="",i=this.__position;a.lastIndex=this.__position;var t=a.exec(this.__input);return t?(i=t.index,n&&(i+=t[0].length)):i=this.__input_length,s=this.__input.substring(this.__position,i),this.__position=i,s},u.prototype.readUntilAfter=function(a){return this.readUntil(a,!0)},u.prototype.get_regexp=function(a,n){var s=null,i="g";return n&&b&&(i="y"),typeof a=="string"&&a!==""?s=new RegExp(a,i):a&&(s=new RegExp(a.source,i)),s},u.prototype.get_literal_regexp=function(a){return RegExp(a.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},u.prototype.peekUntilAfter=function(a){var n=this.__position,s=this.readUntilAfter(a);return this.__position=n,s},u.prototype.lookBack=function(a){var n=this.__position-1;return n>=a.length&&this.__input.substring(n-a.length,n).toLowerCase()===a},v.exports.InputScanner=u},function(v,b,u){var a=u(8).InputScanner,n=u(3).Token,s=u(10).TokenStream,i=u(11).WhitespacePattern,t={START:"TK_START",RAW:"TK_RAW",EOF:"TK_EOF"},r=function(A,B){this._input=new a(A),this._options=B||{},this.__tokens=null,this._patterns={},this._patterns.whitespace=new i(this._input)};r.prototype.tokenize=function(){this._input.restart(),this.__tokens=new s,this._reset();for(var A,B=new n(t.START,""),w=null,_=[],x=new s;B.type!==t.EOF;){for(A=this._get_next_token(B,w);this._is_comment(A);)x.add(A),A=this._get_next_token(B,w);x.isEmpty()||(A.comments_before=x,x=new s),A.parent=w,this._is_opening(A)?(_.push(w),w=A):w&&this._is_closing(A,w)&&(A.opened=w,w.closed=A,w=_.pop(),A.parent=w),A.previous=B,B.next=A,this.__tokens.add(A),B=A}return this.__tokens},r.prototype._is_first_token=function(){return this.__tokens.isEmpty()},r.prototype._reset=function(){},r.prototype._get_next_token=function(A,B){this._readWhitespace();var w=this._input.read(/.+/g);return w?this._create_token(t.RAW,w):this._create_token(t.EOF,"")},r.prototype._is_comment=function(A){return!1},r.prototype._is_opening=function(A){return!1},r.prototype._is_closing=function(A,B){return!1},r.prototype._create_token=function(A,B){var w=new n(A,B,this._patterns.whitespace.newline_count,this._patterns.whitespace.whitespace_before_token);return w},r.prototype._readWhitespace=function(){return this._patterns.whitespace.read()},v.exports.Tokenizer=r,v.exports.TOKEN=t},function(v){function b(u){this.__tokens=[],this.__tokens_length=this.__tokens.length,this.__position=0,this.__parent_token=u}b.prototype.restart=function(){this.__position=0},b.prototype.isEmpty=function(){return this.__tokens_length===0},b.prototype.hasNext=function(){return this.__position<this.__tokens_length},b.prototype.next=function(){var u=null;return this.hasNext()&&(u=this.__tokens[this.__position],this.__position+=1),u},b.prototype.peek=function(u){var a=null;return u=u||0,u+=this.__position,u>=0&&u<this.__tokens_length&&(a=this.__tokens[u]),a},b.prototype.add=function(u){this.__parent_token&&(u.parent=this.__parent_token),this.__tokens.push(u),this.__tokens_length+=1},v.exports.TokenStream=b},function(v,b,u){var a=u(12).Pattern;function n(s,i){a.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=""}n.prototype=new a,n.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+"]")},n.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},n.prototype.matching=function(s,i){var t=this._create();return t.__set_whitespace_patterns(s,i),t._update(),t},n.prototype._create=function(){return new n(this._input,this)},n.prototype.__split=function(s,i){s.lastIndex=0;for(var t=0,r=[],A=s.exec(i);A;)r.push(i.substring(t,A.index)),t=A.index+A[0].length,A=s.exec(i);return t<i.length?r.push(i.substring(t,i.length)):r.push(""),r},v.exports.WhitespacePattern=n},function(v){function b(u,a){this._input=u,this._starting_pattern=null,this._match_pattern=null,this._until_pattern=null,this._until_after=!1,a&&(this._starting_pattern=this._input.get_regexp(a._starting_pattern,!0),this._match_pattern=this._input.get_regexp(a._match_pattern,!0),this._until_pattern=this._input.get_regexp(a._until_pattern),this._until_after=a._until_after)}b.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},b.prototype.read_match=function(){return this._input.match(this._match_pattern)},b.prototype.until_after=function(u){var a=this._create();return a._until_after=!0,a._until_pattern=this._input.get_regexp(u),a._update(),a},b.prototype.until=function(u){var a=this._create();return a._until_after=!1,a._until_pattern=this._input.get_regexp(u),a._update(),a},b.prototype.starting_with=function(u){var a=this._create();return a._starting_pattern=this._input.get_regexp(u,!0),a._update(),a},b.prototype.matching=function(u){var a=this._create();return a._match_pattern=this._input.get_regexp(u,!0),a._update(),a},b.prototype._create=function(){return new b(this._input,this)},b.prototype._update=function(){},v.exports.Pattern=b},function(v){function b(u,a){u=typeof u=="string"?u:u.source,a=typeof a=="string"?a:a.source,this.__directives_block_pattern=new RegExp(u+/ beautify( \w+[:]\w+)+ /.source+a,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(u+/\sbeautify\signore:end\s/.source+a,"g")}b.prototype.get_directives=function(u){if(!u.match(this.__directives_block_pattern))return null;var a={};this.__directive_pattern.lastIndex=0;for(var n=this.__directive_pattern.exec(u);n;)a[n[1]]=n[2],n=this.__directive_pattern.exec(u);return a},b.prototype.readIgnored=function(u){return u.readUntilAfter(this.__directives_end_ignore_pattern)},v.exports.Directives=b},function(v,b,u){var a=u(12).Pattern,n={django:!1,erb:!1,handlebars:!1,php:!1,smarty:!1};function s(i,t){a.call(this,i,t),this.__template_pattern=null,this._disabled=Object.assign({},n),this._excluded=Object.assign({},n),t&&(this.__template_pattern=this._input.get_regexp(t.__template_pattern),this._excluded=Object.assign(this._excluded,t._excluded),this._disabled=Object.assign(this._disabled,t._disabled));var r=new a(i);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}/)}}s.prototype=new a,s.prototype._create=function(){return new s(this._input,this)},s.prototype._update=function(){this.__set_templated_pattern()},s.prototype.disable=function(i){var t=this._create();return t._disabled[i]=!0,t._update(),t},s.prototype.read_options=function(i){var t=this._create();for(var r in n)t._disabled[r]=i.templating.indexOf(r)===-1;return t._update(),t},s.prototype.exclude=function(i){var t=this._create();return t._excluded[i]=!0,t._update(),t},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 t=this._read_template();t;)this._match_pattern?t+=this._input.read(this._match_pattern):t+=this._input.readUntil(this.__template_pattern),i+=t,t=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="",t=this._input.peek();if(t==="<"){var r=this._input.peek(1);!this._disabled.php&&!this._excluded.php&&r==="?"&&(i=i||this.__patterns.php.read()),!this._disabled.erb&&!this._excluded.erb&&r==="%"&&(i=i||this.__patterns.erb.read())}else t==="{"&&(!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},v.exports.TemplatablePattern=s},,,,function(v,b,u){var a=u(19).Beautifier,n=u(20).Options;function s(i,t,r,A){var B=new a(i,t,r,A);return B.beautify()}v.exports=s,v.exports.defaultOptions=function(){return new n}},function(v,b,u){var a=u(20).Options,n=u(2).Output,s=u(21).Tokenizer,i=u(21).TOKEN,t=/\r\n|[\r\n]/,r=/\r\n|[\r\n]/g,A=function(y,p){this.indent_level=0,this.alignment_size=0,this.max_preserve_newlines=y.max_preserve_newlines,this.preserve_newlines=y.preserve_newlines,this._output=new n(y,p)};A.prototype.current_line_has_match=function(y){return this._output.current_line.has_match(y)},A.prototype.set_space_before_token=function(y,p){this._output.space_before_token=y,this._output.non_breaking_space=p},A.prototype.set_wrap_point=function(){this._output.set_indent(this.indent_level,this.alignment_size),this._output.set_wrap_point()},A.prototype.add_raw_token=function(y){this._output.add_raw_token(y)},A.prototype.print_preserved_newlines=function(y){var p=0;y.type!==i.TEXT&&y.previous.type!==i.TEXT&&(p=y.newlines?1:0),this.preserve_newlines&&(p=y.newlines<this.max_preserve_newlines+1?y.newlines:this.max_preserve_newlines+1);for(var f=0;f<p;f++)this.print_newline(f>0);return p!==0},A.prototype.traverse_whitespace=function(y){return y.whitespace_before||y.newlines?(this.print_preserved_newlines(y)||(this._output.space_before_token=!0),!0):!1},A.prototype.previous_token_wrapped=function(){return this._output.previous_token_wrapped},A.prototype.print_newline=function(y){this._output.add_new_line(y)},A.prototype.print_token=function(y){y.text&&(this._output.set_indent(this.indent_level,this.alignment_size),this._output.add_token(y.text))},A.prototype.indent=function(){this.indent_level++},A.prototype.get_full_indent=function(y){return y=this.indent_level+(y||0),y<1?"":this._output.get_indent_string(y)};var B=function(y){for(var p=null,f=y.next;f.type!==i.EOF&&y.closed!==f;){if(f.type===i.ATTRIBUTE&&f.text==="type"){f.next&&f.next.type===i.EQUALS&&f.next.next&&f.next.next.type===i.VALUE&&(p=f.next.next.text);break}f=f.next}return p},w=function(y,p){var f=null,R=null;return p.closed?(y==="script"?f="text/javascript":y==="style"&&(f="text/css"),f=B(p)||f,f.search("text/css")>-1?R="css":f.search(/module|((text|application|dojo)\/(x-)?(javascript|ecmascript|jscript|livescript|(ld\+)?json|method|aspect))/)>-1?R="javascript":f.search(/(text|application|dojo)\/(x-)?(html)/)>-1?R="html":f.search(/test\/null/)>-1&&(R="null"),R):null};function _(y,p){return p.indexOf(y)!==-1}function x(y,p,f){this.parent=y||null,this.tag=p?p.tag_name:"",this.indent_level=f||0,this.parser_token=p||null}function m(y){this._printer=y,this._current_frame=null}m.prototype.get_parser_token=function(){return this._current_frame?this._current_frame.parser_token:null},m.prototype.record_tag=function(y){var p=new x(this._current_frame,y,this._printer.indent_level);this._current_frame=p},m.prototype._try_pop_frame=function(y){var p=null;return y&&(p=y.parser_token,this._printer.indent_level=y.indent_level,this._current_frame=y.parent),p},m.prototype._get_frame=function(y,p){for(var f=this._current_frame;f&&!(y.indexOf(f.tag)!==-1);){if(p&&p.indexOf(f.tag)!==-1){f=null;break}f=f.parent}return f},m.prototype.try_pop=function(y,p){var f=this._get_frame([y],p);return this._try_pop_frame(f)},m.prototype.indent_to_tag=function(y){var p=this._get_frame(y);p&&(this._printer.indent_level=p.indent_level)};function c(y,p,f,R){this._source_text=y||"",p=p||{},this._js_beautify=f,this._css_beautify=R,this._tag_stack=null;var L=new a(p,"html");this._options=L,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"}c.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var y=this._source_text,p=this._options.eol;this._options.eol==="auto"&&(p=`
`,y&&t.test(y)&&(p=y.match(t)[0])),y=y.replace(r,`
`);var f=y.match(/^[\t ]*/)[0],R={text:"",type:""},L=new e,H=new A(this._options,f),j=new s(y,this._options).tokenize();this._tag_stack=new m(H);for(var J=null,M=j.next();M.type!==i.EOF;)M.type===i.TAG_OPEN||M.type===i.COMMENT?(J=this._handle_tag_open(H,M,L,R),L=J):M.type===i.ATTRIBUTE||M.type===i.EQUALS||M.type===i.VALUE||M.type===i.TEXT&&!L.tag_complete?J=this._handle_inside_tag(H,M,L,j):M.type===i.TAG_CLOSE?J=this._handle_tag_close(H,M,L):M.type===i.TEXT?J=this._handle_text(H,M,L):H.add_raw_token(M),R=J,M=j.next();var Y=H._output.get_code(p);return Y},c.prototype._handle_tag_close=function(y,p,f){var R={text:p.text,type:p.type};return y.alignment_size=0,f.tag_complete=!0,y.set_space_before_token(p.newlines||p.whitespace_before!=="",!0),f.is_unformatted?y.add_raw_token(p):(f.tag_start_char==="<"&&(y.set_space_before_token(p.text[0]==="/",!0),this._is_wrap_attributes_force_expand_multiline&&f.has_wrapped_attrs&&y.print_newline(!1)),y.print_token(p)),f.indent_content&&!(f.is_unformatted||f.is_content_unformatted)&&(y.indent(),f.indent_content=!1),!f.is_inline_element&&!(f.is_unformatted||f.is_content_unformatted)&&y.set_wrap_point(),R},c.prototype._handle_inside_tag=function(y,p,f,R){var L=f.has_wrapped_attrs,H={text:p.text,type:p.type};if(y.set_space_before_token(p.newlines||p.whitespace_before!=="",!0),f.is_unformatted)y.add_raw_token(p);else if(f.tag_start_char==="{"&&p.type===i.TEXT)y.print_preserved_newlines(p)?(p.newlines=0,y.add_raw_token(p)):y.print_token(p);else{if(p.type===i.ATTRIBUTE?(y.set_space_before_token(!0),f.attr_count+=1):(p.type===i.EQUALS||p.type===i.VALUE&&p.previous.type===i.EQUALS)&&y.set_space_before_token(!1),p.type===i.ATTRIBUTE&&f.tag_start_char==="<"&&((this._is_wrap_attributes_preserve||this._is_wrap_attributes_preserve_aligned)&&(y.traverse_whitespace(p),L=L||p.newlines!==0),this._is_wrap_attributes_force)){var j=f.attr_count>1;if(this._is_wrap_attributes_force_expand_multiline&&f.attr_count===1){var J=!0,M=0,Y;do{if(Y=R.peek(M),Y.type===i.ATTRIBUTE){J=!1;break}M+=1}while(M<4&&Y.type!==i.EOF&&Y.type!==i.TAG_CLOSE);j=!J}j&&(y.print_newline(!1),L=!0)}y.print_token(p),L=L||y.previous_token_wrapped(),f.has_wrapped_attrs=L}return H},c.prototype._handle_text=function(y,p,f){var R={text:p.text,type:"TK_CONTENT"};return f.custom_beautifier_name?this._print_custom_beatifier_text(y,p,f):f.is_unformatted||f.is_content_unformatted?y.add_raw_token(p):(y.traverse_whitespace(p),y.print_token(p)),R},c.prototype._print_custom_beatifier_text=function(y,p,f){var R=this;if(p.text!==""){var L=p.text,H,j=1,J="",M="";f.custom_beautifier_name==="javascript"&&typeof this._js_beautify=="function"?H=this._js_beautify:f.custom_beautifier_name==="css"&&typeof this._css_beautify=="function"?H=this._css_beautify:f.custom_beautifier_name==="html"&&(H=function(xe,Ie){var Fe=new c(xe,Ie,R._js_beautify,R._css_beautify);return Fe.beautify()}),this._options.indent_scripts==="keep"?j=0:this._options.indent_scripts==="separate"&&(j=-y.indent_level);var Y=y.get_full_indent(j);if(L=L.replace(/\n[ \t]*$/,""),f.custom_beautifier_name!=="html"&&L[0]==="<"&&L.match(/^(<!--|<!\[CDATA\[)/)){var te=/^(<!--[^\n]*|<!\[CDATA\[)(\n?)([ \t\n]*)([\s\S]*)(-->|]]>)$/.exec(L);if(!te){y.add_raw_token(p);return}J=Y+te[1]+`
`,L=te[4],te[5]&&(M=Y+te[5]),L=L.replace(/\n[ \t]*$/,""),(te[2]||te[3].indexOf(`
`)!==-1)&&(te=te[3].match(/[ \t]+$/),te&&(p.whitespace_before=te[0]))}if(L)if(H){var de=function(){this.eol=`
`};de.prototype=this._options.raw_options;var fe=new de;L=H(Y+L,fe)}else{var Le=p.whitespace_before;Le&&(L=L.replace(new RegExp(`
(`+Le+")?","g"),`
`)),L=Y+L.replace(/\n/g,`
`+Y)}J&&(L?L=J+L+`
`+M:L=J+M),y.print_newline(!1),L&&(p.text=L,p.whitespace_before="",p.newlines=0,y.add_raw_token(p),y.print_newline(!0))}},c.prototype._handle_tag_open=function(y,p,f,R){var L=this._get_tag_open_token(p);return(f.is_unformatted||f.is_content_unformatted)&&!f.is_empty_element&&p.type===i.TAG_OPEN&&p.text.indexOf("</")===0?(y.add_raw_token(p),L.start_tag_token=this._tag_stack.try_pop(L.tag_name)):(y.traverse_whitespace(p),this._set_tag_position(y,p,L,f,R),L.is_inline_element||y.set_wrap_point(),y.print_token(p)),(this._is_wrap_attributes_force_aligned||this._is_wrap_attributes_aligned_multiple||this._is_wrap_attributes_preserve_aligned)&&(L.alignment_size=p.text.length+1),!L.tag_complete&&!L.is_unformatted&&(y.alignment_size=L.alignment_size),L};var e=function(y,p){if(this.parent=y||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="",!p)this.tag_complete=!0;else{var f;this.tag_start_char=p.text[0],this.text=p.text,this.tag_start_char==="<"?(f=p.text.match(/^<([^\s>]*)/),this.tag_check=f?f[1]:""):(f=p.text.match(/^{{~?(?:[\^]|#\*?)?([^\s}]+)/),this.tag_check=f?f[1]:"",(p.text.startsWith("{{#>")||p.text.startsWith("{{~#>"))&&this.tag_check[0]===">"&&(this.tag_check===">"&&p.next!==null?this.tag_check=p.next.text.split(" ")[0]:this.tag_check=p.text.split(">")[1])),this.tag_check=this.tag_check.toLowerCase(),p.type===i.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||p.closed&&p.closed.text==="/>";var R=2;this.tag_start_char==="{"&&this.text.length>=3&&(this.text.charAt(2)==="~"&&(R=3)),this.is_end_tag=this.is_end_tag||this.tag_start_char==="{"&&(this.text.length<3||/[^#\^]/.test(this.text.charAt(R)))}};c.prototype._get_tag_open_token=function(y){var p=new e(this._tag_stack.get_parser_token(),y);return p.alignment_size=this._options.wrap_attributes_indent_size,p.is_end_tag=p.is_end_tag||_(p.tag_check,this._options.void_elements),p.is_empty_element=p.tag_complete||p.is_start_tag&&p.is_end_tag,p.is_unformatted=!p.tag_complete&&_(p.tag_check,this._options.unformatted),p.is_content_unformatted=!p.is_empty_element&&_(p.tag_check,this._options.content_unformatted),p.is_inline_element=_(p.tag_name,this._options.inline)||p.tag_name.includes("-")||p.tag_start_char==="{",p},c.prototype._set_tag_position=function(y,p,f,R,L){if(f.is_empty_element||(f.is_end_tag?f.start_tag_token=this._tag_stack.try_pop(f.tag_name):(this._do_optional_end_element(f)&&(f.is_inline_element||y.print_newline(!1)),this._tag_stack.record_tag(f),(f.tag_name==="script"||f.tag_name==="style")&&!(f.is_unformatted||f.is_content_unformatted)&&(f.custom_beautifier_name=w(f.tag_check,p)))),_(f.tag_check,this._options.extra_liners)&&(y.print_newline(!1),y._output.just_added_blankline()||y.print_newline(!0)),f.is_empty_element){if(f.tag_start_char==="{"&&f.tag_check==="else"){this._tag_stack.indent_to_tag(["if","unless","each"]),f.indent_content=!0;var H=y.current_line_has_match(/{{#if/);H||y.print_newline(!1)}f.tag_name==="!--"&&L.type===i.TAG_CLOSE&&R.is_end_tag&&f.text.indexOf(`
`)===-1||(f.is_inline_element||f.is_unformatted||y.print_newline(!1),this._calcluate_parent_multiline(y,f))}else if(f.is_end_tag){var j=!1;j=f.start_tag_token&&f.start_tag_token.multiline_content,j=j||!f.is_inline_element&&!(R.is_inline_element||R.is_unformatted)&&!(L.type===i.TAG_CLOSE&&f.start_tag_token===R)&&L.type!=="TK_CONTENT",(f.is_content_unformatted||f.is_unformatted)&&(j=!1),j&&y.print_newline(!1)}else f.indent_content=!f.custom_beautifier_name,f.tag_start_char==="<"&&(f.tag_name==="html"?f.indent_content=this._options.indent_inner_html:f.tag_name==="head"?f.indent_content=this._options.indent_head_inner_html:f.tag_name==="body"&&(f.indent_content=this._options.indent_body_inner_html)),!(f.is_inline_element||f.is_unformatted)&&(L.type!=="TK_CONTENT"||f.is_content_unformatted)&&y.print_newline(!1),this._calcluate_parent_multiline(y,f)},c.prototype._calcluate_parent_multiline=function(y,p){p.parent&&y._output.just_added_newline()&&!((p.is_inline_element||p.is_unformatted)&&p.parent.is_inline_element)&&(p.parent.multiline_content=!0)};var o=["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"],l=["a","audio","del","ins","map","noscript","video"];c.prototype._do_optional_end_element=function(y){var p=null;if(y.is_empty_element||!y.is_start_tag||!y.parent)return;if(y.tag_name==="body")p=p||this._tag_stack.try_pop("head");else if(y.tag_name==="li")p=p||this._tag_stack.try_pop("li",["ol","ul"]);else if(y.tag_name==="dd"||y.tag_name==="dt")p=p||this._tag_stack.try_pop("dt",["dl"]),p=p||this._tag_stack.try_pop("dd",["dl"]);else if(y.parent.tag_name==="p"&&o.indexOf(y.tag_name)!==-1){var f=y.parent.parent;(!f||l.indexOf(f.tag_name)===-1)&&(p=p||this._tag_stack.try_pop("p"))}else y.tag_name==="rp"||y.tag_name==="rt"?(p=p||this._tag_stack.try_pop("rt",["ruby","rtc"]),p=p||this._tag_stack.try_pop("rp",["ruby","rtc"])):y.tag_name==="optgroup"?p=p||this._tag_stack.try_pop("optgroup",["select"]):y.tag_name==="option"?p=p||this._tag_stack.try_pop("option",["select","datalist","optgroup"]):y.tag_name==="colgroup"?p=p||this._tag_stack.try_pop("caption",["table"]):y.tag_name==="thead"?(p=p||this._tag_stack.try_pop("caption",["table"]),p=p||this._tag_stack.try_pop("colgroup",["table"])):y.tag_name==="tbody"||y.tag_name==="tfoot"?(p=p||this._tag_stack.try_pop("caption",["table"]),p=p||this._tag_stack.try_pop("colgroup",["table"]),p=p||this._tag_stack.try_pop("thead",["table"]),p=p||this._tag_stack.try_pop("tbody",["table"])):y.tag_name==="tr"?(p=p||this._tag_stack.try_pop("caption",["table"]),p=p||this._tag_stack.try_pop("colgroup",["table"]),p=p||this._tag_stack.try_pop("tr",["table","thead","tbody","tfoot"])):(y.tag_name==="th"||y.tag_name==="td")&&(p=p||this._tag_stack.try_pop("td",["table","thead","tbody","tfoot","tr"]),p=p||this._tag_stack.try_pop("th",["table","thead","tbody","tfoot","tr"]));return y.parent=this._tag_stack.get_parser_token(),p},v.exports.Beautifier=c},function(v,b,u){var a=u(6).Options;function n(s){a.call(this,s,"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"])}n.prototype=new a,v.exports.Options=n},function(v,b,u){var a=u(9).Tokenizer,n=u(9).TOKEN,s=u(13).Directives,i=u(14).TemplatablePattern,t=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:n.START,RAW:n.RAW,EOF:n.EOF},A=new s(/<\!--/,/-->/),B=function(w,_){a.call(this,w,_),this._current_tag_name="";var x=new i(this._input).read_options(this._options),m=new t(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:m.starting_with(/{{!--/).until_after(/--}}/),handlebars:m.starting_with(/{{/).until_after(/}}/),handlebars_open:m.until(/[\n\r\t }]/),handlebars_raw_close:m.until(/}}/),comment:m.starting_with(/<!--/).until_after(/-->/),cdata:m.starting_with(/<!\[CDATA\[/).until_after(/]]>/),conditional_comment:m.starting_with(/<!\[/).until_after(/]>/),processing:m.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 c=this._input.get_literal_regexp(this._options.unformatted_content_delimiter);this.__patterns.unformatted_content_delimiter=m.matching(c).until_after(c)}};B.prototype=new a,B.prototype._is_comment=function(w){return!1},B.prototype._is_opening=function(w){return w.type===r.TAG_OPEN},B.prototype._is_closing=function(w,_){return w.type===r.TAG_CLOSE&&_&&((w.text===">"||w.text==="/>")&&_.text[0]==="<"||w.text==="}}"&&_.text[0]==="{"&&_.text[1]==="{")},B.prototype._reset=function(){this._current_tag_name=""},B.prototype._get_next_token=function(w,_){var x=null;this._readWhitespace();var m=this._input.peek();return m===null?this._create_token(r.EOF,""):(x=x||this._read_open_handlebars(m,_),x=x||this._read_attribute(m,w,_),x=x||this._read_close(m,_),x=x||this._read_raw_content(m,w,_),x=x||this._read_content_word(m),x=x||this._read_comment_or_cdata(m),x=x||this._read_processing(m),x=x||this._read_open(m,_),x=x||this._create_token(r.UNKNOWN,this._input.next()),x)},B.prototype._read_comment_or_cdata=function(w){var _=null,x=null,m=null;if(w==="<"){var c=this._input.peek(1);c==="!"&&(x=this.__patterns.comment.read(),x?(m=A.get_directives(x),m&&m.ignore==="start"&&(x+=A.readIgnored(this._input))):x=this.__patterns.cdata.read()),x&&(_=this._create_token(r.COMMENT,x),_.directives=m)}return _},B.prototype._read_processing=function(w){var _=null,x=null,m=null;if(w==="<"){var c=this._input.peek(1);(c==="!"||c==="?")&&(x=this.__patterns.conditional_comment.read(),x=x||this.__patterns.processing.read()),x&&(_=this._create_token(r.COMMENT,x),_.directives=m)}return _},B.prototype._read_open=function(w,_){var x=null,m=null;return _||w==="<"&&(x=this._input.next(),this._input.peek()==="/"&&(x+=this._input.next()),x+=this.__patterns.element_name.read(),m=this._create_token(r.TAG_OPEN,x)),m},B.prototype._read_open_handlebars=function(w,_){var x=null,m=null;return _||this._options.indent_handlebars&&w==="{"&&this._input.peek(1)==="{"&&(this._input.peek(2)==="!"?(x=this.__patterns.handlebars_comment.read(),x=x||this.__patterns.handlebars.read(),m=this._create_token(r.COMMENT,x)):(x=this.__patterns.handlebars_open.read(),m=this._create_token(r.TAG_OPEN,x))),m},B.prototype._read_close=function(w,_){var x=null,m=null;return _&&(_.text[0]==="<"&&(w===">"||w==="/"&&this._input.peek(1)===">")?(x=this._input.next(),w==="/"&&(x+=this._input.next()),m=this._create_token(r.TAG_CLOSE,x)):_.text[0]==="{"&&w==="}"&&this._input.peek(1)==="}"&&(this._input.next(),this._input.next(),m=this._create_token(r.TAG_CLOSE,"}}"))),m},B.prototype._read_attribute=function(w,_,x){var m=null,c="";if(x&&x.text[0]==="<")if(w==="=")m=this._create_token(r.EQUALS,this._input.next());else if(w==='"'||w==="'"){var e=this._input.next();w==='"'?e+=this.__patterns.double_quote.read():e+=this.__patterns.single_quote.read(),m=this._create_token(r.VALUE,e)}else c=this.__patterns.attribute.read(),c&&(_.type===r.EQUALS?m=this._create_token(r.VALUE,c):m=this._create_token(r.ATTRIBUTE,c));return m},B.prototype._is_content_unformatted=function(w){return this._options.void_elements.indexOf(w)===-1&&(this._options.content_unformatted.indexOf(w)!==-1||this._options.unformatted.indexOf(w)!==-1)},B.prototype._read_raw_content=function(w,_,x){var m="";if(x&&x.text[0]==="{")m=this.__patterns.handlebars_raw_close.read();else if(_.type===r.TAG_CLOSE&&_.opened.text[0]==="<"&&_.text[0]!=="/"){var c=_.opened.text.substr(1).toLowerCase();if(c==="script"||c==="style"){var e=this._read_comment_or_cdata(w);if(e)return e.type=r.TEXT,e;m=this._input.readUntil(new RegExp("</"+c+"[\\n\\r\\t ]*?>","ig"))}else this._is_content_unformatted(c)&&(m=this._input.readUntil(new RegExp("</"+c+"[\\n\\r\\t ]*?>","ig")))}return m?this._create_token(r.TEXT,m):null},B.prototype._read_content_word=function(w){var _="";if(this._options.unformatted_content_delimiter&&(w===this._options.unformatted_content_delimiter[0]&&(_=this.__patterns.unformatted_content_delimiter.read())),_||(_=this.__patterns.word.read()),_)return this._create_token(r.TEXT,_)},v.exports.Tokenizer=B,v.exports.TOKEN=r}],F={};function U(v){var b=F[v];if(b!==void 0)return b.exports;var u=F[v]={exports:{}};return z[v](u,u.exports,U),u.exports}var I=U(18);O=I})();var G=O;if(!0)!(ve=[Z,Z("6UM0"),Z("TXwP")],X=function(z){var F=Z("6UM0"),U=Z("TXwP");return{html_beautify:function(I,v){return G(I,v,F.js_beautify,U.css_beautify)}}}.apply(Ze,ve),X!==void 0&&(mt.exports=X));else var D,S})()},"rAM+":function(mt,Ze,Z){"use strict";Z.d(Ze,"a",function(){return X});var ve=Z("Qw5x");function X(O,G){var D;if(typeof Symbol=="undefined"||O[Symbol.iterator]==null){if(Array.isArray(O)||(D=Object(ve.a)(O))||G&&O&&typeof O.length=="number"){D&&(O=D);var S=0,z=function(){};return{s:z,n:function(){return S>=O.length?{done:!0}:{done:!1,value:O[S++]}},e:function(b){throw b},f:z}}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 F=!0,U=!1,I;return{s:function(){D=O[Symbol.iterator]()},n:function(){var b=D.next();return F=b.done,b},e:function(b){U=!0,I=b},f:function(){try{!F&&D.return!=null&&D.return()}finally{if(U)throw I}}}}},rUJ1:function(mt,Ze){const Z=/[&<>"']/,ve=/[&<>"']/g,X=/[<>"']|&(?!#?\w+;)/,O=/[<>"']|&(?!#?\w+;)/g,G={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},D=m=>G[m];function S(m,c){if(c){if(Z.test(m))return m.replace(ve,D)}else if(X.test(m))return m.replace(O,D);return m}const z=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function F(m){return m.replace(z,(c,e)=>(e=e.toLowerCase(),e==="colon"?":":e.charAt(0)==="#"?e.charAt(1)==="x"?String.fromCharCode(parseInt(e.substring(2),16)):String.fromCharCode(+e.substring(1)):""))}const U=/(^|[^\[])\^/g;function I(m,c){m=m.source||m,c=c||"";const e={replace:(o,l)=>(l=l.source||l,l=l.replace(U,"$1"),m=m.replace(o,l),e),getRegex:()=>new RegExp(m,c)};return e}const v=/[^\w:]/g,b=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function u(m,c,e){if(m){let o;try{o=decodeURIComponent(F(e)).replace(v,"").toLowerCase()}catch(l){return null}if(o.indexOf("javascript:")===0||o.indexOf("vbscript:")===0||o.indexOf("data:")===0)return null}c&&!b.test(e)&&(e=t(c,e));try{e=encodeURI(e).replace(/%25/g,"%")}catch(o){return null}return e}const a={},n=/^[^:]+:\/*[^/]*$/,s=/^([^:]+:)[\s\S]*$/,i=/^([^:]+:\/*[^/]*)[\s\S]*$/;function t(m,c){a[" "+m]||(n.test(m)?a[" "+m]=m+"/":a[" "+m]=w(m,"/",!0)),m=a[" "+m];const e=m.indexOf(":")===-1;return c.substring(0,2)==="//"?e?c:m.replace(s,"$1")+c:c.charAt(0)==="/"?e?c:m.replace(i,"$1")+c:m+c}const r={exec:function(){}};function A(m){let c=1,e,o;for(;c<arguments.length;c++){e=arguments[c];for(o in e)Object.prototype.hasOwnProperty.call(e,o)&&(m[o]=e[o])}return m}function B(m,c){const e=m.replace(/\|/g,(y,p,f)=>{let R=!1,L=p;for(;--L>=0&&f[L]==="\\";)R=!R;return R?"|":" |"}),o=e.split(/ \|/);let l=0;if(o.length>c)o.splice(c);else for(;o.length<c;)o.push("");for(;l<o.length;l++)o[l]=o[l].trim().replace(/\\\|/g,"|");return o}function w(m,c,e){const o=m.length;if(o===0)return"";let l=0;for(;l<o;){const y=m.charAt(o-l-1);if(y===c&&!e)l++;else if(y!==c&&e)l++;else break}return m.substr(0,o-l)}function _(m,c){if(m.indexOf(c[1])===-1)return-1;const e=m.length;let o=0,l=0;for(;l<e;l++)if(m[l]==="\\")l++;else if(m[l]===c[0])o++;else if(m[l]===c[1]&&(o--,o<0))return l;return-1}function x(m){m&&m.sanitize&&!m.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")}mt.exports={escape:S,unescape:F,edit:I,cleanUrl:u,resolveUrl:t,noopTest:r,merge:A,splitCells:B,rtrim:w,findClosingBracket:_,checkSanitizeDeprecation:x}},sR1s:function(mt,Ze,Z){"use strict";Z.d(Ze,"b",function(){return G}),Z.d(Ze,"a",function(){return D}),Z.d(Ze,"c",function(){return S}),Z.d(Ze,"d",function(){return z});var ve=Z("U8pU"),X="RC_TABLE_KEY";function O(F){return F==null?[]:Array.isArray(F)?F:[F]}function G(F,U){if(!U&&typeof U!="number")return F;for(var I=O(U),v=F,b=0;b<I.length;b+=1){if(!v)return null;var u=I[b];v=v[u]}return v}function D(F){var U=[],I={};return F.forEach(function(v){for(var b=v||{},u=b.key,a=b.dataIndex,n=u||O(a).join("-")||X;I[n];)n="".concat(n,"_next");I[n]=!0,U.push(n)}),U}function S(){var F={};function U(u,a){a&&Object.keys(a).forEach(function(n){var s=a[n];s&&Object(ve.a)(s)==="object"?(u[n]=u[n]||{},U(u[n],s)):u[n]=s})}for(var I=arguments.length,v=new Array(I),b=0;b<I;b++)v[b]=arguments[b];return v.forEach(function(u){U(F,u)}),F}function z(F){return F!=null}},sboe:function(mt,Ze,Z){"use strict";Z.d(Ze,"a",function(){return O});var ve=Z("q1tI"),X=Z.n(ve),O=ve.createContext(null)},t23M:function(mt,Ze,Z){"use strict";var ve=Z("VTBJ"),X=Z("1OyB"),O=Z("vuIU"),G=Z("Ji7U"),D=Z("LK+K"),S=Z("q1tI"),z=Z.n(S),F=Z("m+aA"),U=Z("Zm9Q"),I=Z("Kwbf"),v=Z("c+Xe"),b=Z("bdgK"),u="rc-observer-key",a=function(n){Object(G.a)(i,n);var s=Object(D.a)(i);function i(){var t;return Object(X.a)(this,i),t=s.apply(this,arguments),t.resizeObserver=null,t.childNode=null,t.currentElement=null,t.state={width:0,height:0,offsetHeight:0,offsetWidth:0},t.onResize=function(r){var A=t.props.onResize,B=r[0].target,w=B.getBoundingClientRect(),_=w.width,x=w.height,m=B.offsetWidth,c=B.offsetHeight,e=Math.floor(_),o=Math.floor(x);if(t.state.width!==e||t.state.height!==o||t.state.offsetWidth!==m||t.state.offsetHeight!==c){var l={width:e,height:o,offsetWidth:m,offsetHeight:c};t.setState(l),A&&Promise.resolve().then(function(){A(Object(ve.a)(Object(ve.a)({},l),{},{offsetWidth:m,offsetHeight:c}))})}},t.setChildNode=function(r){t.childNode=r},t}return Object(O.a)(i,[{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 A=Object(F.a)(this.childNode||this),B=A!==this.currentElement;B&&(this.destroyObserver(),this.currentElement=A),!this.resizeObserver&&A&&(this.resizeObserver=new b.default(this.onResize),this.resizeObserver.observe(A))}},{key:"destroyObserver",value:function(){this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=null)}},{key:"render",value:function(){var r=this.props.children,A=Object(U.a)(r);if(A.length>1)Object(I.a)(!1,"Find more than one child node with `children` in ResizeObserver. Will only observe first one.");else if(A.length===0)return Object(I.a)(!1,"`children` of ResizeObserver is empty. Nothing is in observe."),null;var B=A[0];if(S.isValidElement(B)&&Object(v.c)(B)){var w=B.ref;A[0]=S.cloneElement(B,{ref:Object(v.a)(w,this.setChildNode)})}return A.length===1?A[0]:A.map(function(_,x){return!S.isValidElement(_)||"key"in _&&_.key!==null?_:S.cloneElement(_,{key:"".concat(u,"-").concat(x)})})}}]),i}(S.Component);a.displayName="ResizeObserver",Ze.a=a},ulZh:function(mt,Ze,Z){typeof window!="undefined"&&function(X,O){mt.exports=O()}(this,function(){return function(ve){var X={};function O(G){if(X[G])return X[G].exports;var D=X[G]={i:G,l:!1,exports:{}};return ve[G].call(D.exports,D,D.exports,O),D.l=!0,D.exports}return O.m=ve,O.c=X,O.d=function(G,D,S){O.o(G,D)||Object.defineProperty(G,D,{enumerable:!0,get:S})},O.r=function(G){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(G,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(G,"__esModule",{value:!0})},O.t=function(G,D){if(D&1&&(G=O(G)),D&8)return G;if(D&4&&typeof G=="object"&&G&&G.__esModule)return G;var S=Object.create(null);if(O.r(S),Object.defineProperty(S,"default",{enumerable:!0,value:G}),D&2&&typeof G!="string")for(var z in G)O.d(S,z,function(F){return G[F]}.bind(null,z));return S},O.n=function(G){var D=G&&G.__esModule?function(){return G.default}:function(){return G};return O.d(D,"a",D),D},O.o=function(G,D){return Object.prototype.hasOwnProperty.call(G,D)},O.p="/dist/",O(O.s="./src/hls.ts")}({"./node_modules/eventemitter3/index.js":function(ve,X,O){"use strict";var G=Object.prototype.hasOwnProperty,D="~";function S(){}Object.create&&(S.prototype=Object.create(null),new S().__proto__||(D=!1));function z(v,b,u){this.fn=v,this.context=b,this.once=u||!1}function F(v,b,u,a,n){if(typeof u!="function")throw new TypeError("The listener must be a function");var s=new z(u,a||v,n),i=D?D+b:b;return v._events[i]?v._events[i].fn?v._events[i]=[v._events[i],s]:v._events[i].push(s):(v._events[i]=s,v._eventsCount++),v}function U(v,b){--v._eventsCount===0?v._events=new S:delete v._events[b]}function I(){this._events=new S,this._eventsCount=0}I.prototype.eventNames=function(){var b=[],u,a;if(this._eventsCount===0)return b;for(a in u=this._events)G.call(u,a)&&b.push(D?a.slice(1):a);return Object.getOwnPropertySymbols?b.concat(Object.getOwnPropertySymbols(u)):b},I.prototype.listeners=function(b){var u=D?D+b:b,a=this._events[u];if(!a)return[];if(a.fn)return[a.fn];for(var n=0,s=a.length,i=new Array(s);n<s;n++)i[n]=a[n].fn;return i},I.prototype.listenerCount=function(b){var u=D?D+b:b,a=this._events[u];return a?a.fn?1:a.length:0},I.prototype.emit=function(b,u,a,n,s,i){var t=D?D+b:b;if(!this._events[t])return!1;var r=this._events[t],A=arguments.length,B,w;if(r.fn){r.once&&this.removeListener(b,r.fn,void 0,!0);switch(A){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,a),!0;case 4:return r.fn.call(r.context,u,a,n),!0;case 5:return r.fn.call(r.context,u,a,n,s),!0;case 6:return r.fn.call(r.context,u,a,n,s,i),!0}for(w=1,B=new Array(A-1);w<A;w++)B[w-1]=arguments[w];r.fn.apply(r.context,B)}else{var _=r.length,x;for(w=0;w<_;w++){r[w].once&&this.removeListener(b,r[w].fn,void 0,!0);switch(A){case 1:r[w].fn.call(r[w].context);break;case 2:r[w].fn.call(r[w].context,u);break;case 3:r[w].fn.call(r[w].context,u,a);break;case 4:r[w].fn.call(r[w].context,u,a,n);break;default:if(!B)for(x=1,B=new Array(A-1);x<A;x++)B[x-1]=arguments[x];r[w].fn.apply(r[w].context,B)}}}return!0},I.prototype.on=function(b,u,a){return F(this,b,u,a,!1)},I.prototype.once=function(b,u,a){return F(this,b,u,a,!0)},I.prototype.removeListener=function(b,u,a,n){var s=D?D+b:b;if(!this._events[s])return this;if(!u)return U(this,s),this;var i=this._events[s];if(i.fn)i.fn===u&&(!n||i.once)&&(!a||i.context===a)&&U(this,s);else{for(var t=0,r=[],A=i.length;t<A;t++)(i[t].fn!==u||n&&!i[t].once||a&&i[t].context!==a)&&r.push(i[t]);r.length?this._events[s]=r.length===1?r[0]:r:U(this,s)}return this},I.prototype.removeAllListeners=function(b){var u;return b?(u=D?D+b:b,this._events[u]&&U(this,u)):(this._events=new S,this._eventsCount=0),this},I.prototype.off=I.prototype.removeListener,I.prototype.addListener=I.prototype.on,I.prefixed=D,I.EventEmitter=I,ve.exports=I},"./node_modules/url-toolkit/src/url-toolkit.js":function(ve,X,O){(function(G){var D=/^((?:[a-zA-Z0-9+\-.]+:)?)(\/\/[^\/?#]*)?((?:[^\/?#]*\/)*[^;?#]*)?(;[^?#]*)?(\?[^#]*)?(#[^]*)?$/,S=/^([^\/?#]*)([^]*)$/,z=/(?:\/|^)\.(?=\/)/g,F=/(?:\/|^)\.\.\/(?!\.\.\/)[^\/]*(?=\/)/g,U={buildAbsoluteURL:function(I,v,b){if(b=b||{},I=I.trim(),v=v.trim(),!v){if(!b.alwaysNormalize)return I;var u=U.parseURL(I);if(!u)throw new Error("Error trying to parse base URL.");return u.path=U.normalizePath(u.path),U.buildURLFromParts(u)}var a=U.parseURL(v);if(!a)throw new Error("Error trying to parse relative URL.");if(a.scheme)return b.alwaysNormalize?(a.path=U.normalizePath(a.path),U.buildURLFromParts(a)):v;var n=U.parseURL(I);if(!n)throw new Error("Error trying to parse base URL.");if(!n.netLoc&&n.path&&n.path[0]!=="/"){var s=S.exec(n.path);n.netLoc=s[1],n.path=s[2]}n.netLoc&&!n.path&&(n.path="/");var i={scheme:n.scheme,netLoc:a.netLoc,path:null,params:a.params,query:a.query,fragment:a.fragment};if(!a.netLoc&&(i.netLoc=n.netLoc,a.path[0]!=="/"))if(!a.path)i.path=n.path,a.params||(i.params=n.params,a.query||(i.query=n.query));else{var t=n.path,r=t.substring(0,t.lastIndexOf("/")+1)+a.path;i.path=U.normalizePath(r)}return i.path===null&&(i.path=b.alwaysNormalize?U.normalizePath(a.path):a.path),U.buildURLFromParts(i)},parseURL:function(I){var v=D.exec(I);return v?{scheme:v[1]||"",netLoc:v[2]||"",path:v[3]||"",params:v[4]||"",query:v[5]||"",fragment:v[6]||""}:null},normalizePath:function(I){for(I=I.split("").reverse().join("").replace(z,"");I.length!==(I=I.replace(F,"")).length;);return I.split("").reverse().join("")},buildURLFromParts:function(I){return I.scheme+I.netLoc+I.path+I.params+I.query+I.fragment}};ve.exports=U})(this)},"./node_modules/webworkify-webpack/index.js":function(ve,X,O){function G(b){var u={};function a(s){if(u[s])return u[s].exports;var i=u[s]={i:s,l:!1,exports:{}};return b[s].call(i.exports,i,i.exports,a),i.l=!0,i.exports}a.m=b,a.c=u,a.i=function(s){return s},a.d=function(s,i,t){a.o(s,i)||Object.defineProperty(s,i,{configurable:!1,enumerable:!0,get:t})},a.r=function(s){Object.defineProperty(s,"__esModule",{value:!0})},a.n=function(s){var i=s&&s.__esModule?function(){return s.default}:function(){return s};return a.d(i,"a",i),i},a.o=function(s,i){return Object.prototype.hasOwnProperty.call(s,i)},a.p="/",a.oe=function(s){throw console.error(s),s};var n=a(a.s=ENTRY_MODULE);return n.default||n}var D="[\\.|\\-|\\+|\\w|/|@]+",S="\\(\\s*(/\\*.*?\\*/)?\\s*.*?("+D+").*?\\)";function z(b){return(b+"").replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}function F(b){return!isNaN(1*b)}function U(b,u,a){var n={};n[a]=[];var s=u.toString(),i=s.match(/^function\s?\w*\(\w+,\s*\w+,\s*(\w+)\)/);if(!i)return n;for(var t=i[1],r=new RegExp("(\\\\n|\\W)"+z(t)+S,"g"),A;A=r.exec(s);){if(A[3]==="dll-reference")continue;n[a].push(A[3])}for(r=new RegExp("\\("+z(t)+'\\("(dll-reference\\s('+D+'))"\\)\\)'+S,"g");A=r.exec(s);)b[A[2]]||(n[a].push(A[1]),b[A[2]]=O(A[1]).m),n[A[2]]=n[A[2]]||[],n[A[2]].push(A[4]);for(var B=Object.keys(n),w=0;w<B.length;w++)for(var _=0;_<n[B[w]].length;_++)F(n[B[w]][_])&&(n[B[w]][_]=1*n[B[w]][_]);return n}function I(b){var u=Object.keys(b);return u.reduce(function(a,n){return a||b[n].length>0},!1)}function v(b,u){for(var a={main:[u]},n={main:[]},s={main:{}};I(a);)for(var i=Object.keys(a),t=0;t<i.length;t++){var r=i[t],A=a[r],B=A.pop();if(s[r]=s[r]||{},s[r][B]||!b[r][B])continue;s[r][B]=!0,n[r]=n[r]||[],n[r].push(B);for(var w=U(b,b[r][B],r),_=Object.keys(w),x=0;x<_.length;x++)a[_[x]]=a[_[x]]||[],a[_[x]]=a[_[x]].concat(w[_[x]])}return n}ve.exports=function(b,u){u=u||{};var a={main:O.m},n=u.all?{main:Object.keys(a.main)}:v(a,b),s="";Object.keys(n).filter(function(B){return B!=="main"}).forEach(function(B){for(var w=0;n[B][w];)w++;n[B].push(w),a[B][w]="(function(module, exports, __webpack_require__) { module.exports = __webpack_require__; })",s=s+"var "+B+" = ("+G.toString().replace("ENTRY_MODULE",JSON.stringify(w))+")({"+n[B].map(function(_){return""+JSON.stringify(_)+": "+a[B][_].toString()}).join(",")+`});
`}),s=s+"new (("+G.toString().replace("ENTRY_MODULE",JSON.stringify(b))+")({"+n.main.map(function(B){return""+JSON.stringify(B)+": "+a.main[B].toString()}).join(",")+"}))(self);";var i=new window.Blob([s],{type:"text/javascript"});if(u.bare)return i;var t=window.URL||window.webkitURL||window.mozURL||window.msURL,r=t.createObjectURL(i),A=new window.Worker(r);return A.objectURL=r,A}},"./src/config.ts":function(ve,X,O){"use strict";O.r(X),O.d(X,"hlsDefaultConfig",function(){return x}),O.d(X,"mergeConfig",function(){return c}),O.d(X,"enableStreamingMode",function(){return e});var G=O("./src/controller/abr-controller.ts"),D=O("./src/controller/audio-stream-controller.ts"),S=O("./src/controller/audio-track-controller.ts"),z=O("./src/controller/subtitle-stream-controller.ts"),F=O("./src/controller/subtitle-track-controller.ts"),U=O("./src/controller/buffer-controller.ts"),I=O("./src/controller/timeline-controller.ts"),v=O("./src/controller/cap-level-controller.ts"),b=O("./src/controller/fps-controller.ts"),u=O("./src/controller/eme-controller.ts"),a=O("./src/controller/cmcd-controller.ts"),n=O("./src/utils/xhr-loader.ts"),s=O("./src/utils/fetch-loader.ts"),i=O("./src/utils/cues.ts"),t=O("./src/utils/mediakeys-helper.ts"),r=O("./src/utils/logger.ts");function A(){return A=Object.assign||function(o){for(var l=1;l<arguments.length;l++){var y=arguments[l];for(var p in y)Object.prototype.hasOwnProperty.call(y,p)&&(o[p]=y[p])}return o},A.apply(this,arguments)}function B(o,l){var y=Object.keys(o);if(Object.getOwnPropertySymbols){var p=Object.getOwnPropertySymbols(o);l&&(p=p.filter(function(f){return Object.getOwnPropertyDescriptor(o,f).enumerable})),y.push.apply(y,p)}return y}function w(o){for(var l=1;l<arguments.length;l++){var y=arguments[l]!=null?arguments[l]:{};l%2?B(Object(y),!0).forEach(function(p){_(o,p,y[p])}):Object.getOwnPropertyDescriptors?Object.defineProperties(o,Object.getOwnPropertyDescriptors(y)):B(Object(y)).forEach(function(p){Object.defineProperty(o,p,Object.getOwnPropertyDescriptor(y,p))})}return o}function _(o,l,y){return l in o?Object.defineProperty(o,l,{value:y,enumerable:!0,configurable:!0,writable:!0}):o[l]=y,o}var x=w(w({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:n.default,fLoader:void 0,pLoader:void 0,xhrSetup:void 0,licenseXhrSetup:void 0,licenseResponseCallback:void 0,abrController:G.default,bufferController:U.default,capLevelController:v.default,fpsController:b.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:t.requestMediaKeySystemAccess,testBandwidth:!0,progressive:!1,lowLatencyMode:!0,cmcd:void 0},m()),{},{subtitleStreamController:z.SubtitleStreamController,subtitleTrackController:F.default,timelineController:I.TimelineController,audioStreamController:D.default,audioTrackController:S.default,emeController:u.default,cmcdController:a.default});function m(){return{cueHandler:i.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 c(o,l){if((l.liveSyncDurationCount||l.liveMaxLatencyDurationCount)&&(l.liveSyncDuration||l.liveMaxLatencyDuration))throw new Error("Illegal hls.js config: don't mix up liveSyncDurationCount/liveMaxLatencyDurationCount and liveSyncDuration/liveMaxLatencyDuration");if(l.liveMaxLatencyDurationCount!==void 0&&(l.liveSyncDurationCount===void 0||l.liveMaxLatencyDurationCount<=l.liveSyncDurationCount))throw new Error('Illegal hls.js config: "liveMaxLatencyDurationCount" must be greater than "liveSyncDurationCount"');if(l.liveMaxLatencyDuration!==void 0&&(l.liveSyncDuration===void 0||l.liveMaxLatencyDuration<=l.liveSyncDuration))throw new Error('Illegal hls.js config: "liveMaxLatencyDuration" must be greater than "liveSyncDuration"');return A({},o,l)}function e(o){var l=o.loader;if(l!==s.default&&l!==n.default)r.logger.log("[config]: Custom loader detected, cannot enable progressive streaming"),o.progressive=!1;else{var y=Object(s.fetchSupported)();y&&(o.loader=s.default,o.progressive=!0,o.enableSoftwareAES=!0,r.logger.log("[config]: Progressive streaming enabled, using FetchLoader"))}}},"./src/controller/abr-controller.ts":function(ve,X,O){"use strict";O.r(X);var G=O("./src/polyfills/number.ts"),D=O("./src/utils/ewma-bandwidth-estimator.ts"),S=O("./src/events.ts"),z=O("./src/utils/buffer-helper.ts"),F=O("./src/errors.ts"),U=O("./src/types/loader.ts"),I=O("./src/utils/logger.ts");function v(a,n){for(var s=0;s<n.length;s++){var i=n[s];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(a,i.key,i)}}function b(a,n,s){return n&&v(a.prototype,n),s&&v(a,s),a}var u=function(){function a(s){this.hls=void 0,this.lastLoadedFragLevel=0,this._nextAutoLevel=-1,this.timer=void 0,this.onCheck=this._abandonRulesCheck.bind(this),this.fragCurrent=null,this.partCurrent=null,this.bitrateTestDelay=0,this.bwEstimator=void 0,this.hls=s;var i=s.config;this.bwEstimator=new D.default(i.abrEwmaSlowVoD,i.abrEwmaFastVoD,i.abrEwmaDefaultEstimate),this.registerListeners()}var n=a.prototype;return n.registerListeners=function(){var i=this.hls;i.on(S.Events.FRAG_LOADING,this.onFragLoading,this),i.on(S.Events.FRAG_LOADED,this.onFragLoaded,this),i.on(S.Events.FRAG_BUFFERED,this.onFragBuffered,this),i.on(S.Events.LEVEL_LOADED,this.onLevelLoaded,this),i.on(S.Events.ERROR,this.onError,this)},n.unregisterListeners=function(){var i=this.hls;i.off(S.Events.FRAG_LOADING,this.onFragLoading,this),i.off(S.Events.FRAG_LOADED,this.onFragLoaded,this),i.off(S.Events.FRAG_BUFFERED,this.onFragBuffered,this),i.off(S.Events.LEVEL_LOADED,this.onLevelLoaded,this),i.off(S.Events.ERROR,this.onError,this)},n.destroy=function(){this.unregisterListeners(),this.clearTimer(),this.hls=this.onCheck=null,this.fragCurrent=this.partCurrent=null},n.onFragLoading=function(i,t){var r=t.frag;if(r.type===U.PlaylistLevelType.MAIN&&!this.timer){var A;this.fragCurrent=r,this.partCurrent=(A=t.part)!=null?A:null,this.timer=self.setInterval(this.onCheck,100)}},n.onLevelLoaded=function(i,t){var r=this.hls.config;t.details.live?this.bwEstimator.update(r.abrEwmaSlowLive,r.abrEwmaFastLive):this.bwEstimator.update(r.abrEwmaSlowVoD,r.abrEwmaFastVoD)},n._abandonRulesCheck=function(){var i=this.fragCurrent,t=this.partCurrent,r=this.hls,A=r.autoLevelEnabled,B=r.config,w=r.media;if(!i||!w)return;var _=t?t.stats:i.stats,x=t?t.duration:i.duration;if(_.aborted){I.logger.warn("frag loader destroy or aborted, disarm abandonRules"),this.clearTimer(),this._nextAutoLevel=-1;return}if(!A||w.paused||!w.playbackRate||!w.readyState)return;var m=performance.now()-_.loading.start,c=Math.abs(w.playbackRate);if(m<=500*x/c)return;var e=r.levels,o=r.minAutoLevel,l=e[i.level],y=_.total||Math.max(_.loaded,Math.round(x*l.maxBitrate/8)),p=Math.max(1,_.bwEstimate?_.bwEstimate/8:_.loaded*1e3/m),f=(y-_.loaded)/p,R=w.currentTime,L=(z.BufferHelper.bufferInfo(w,R,B.maxBufferHole).end-R)/c;if(L>=2*x/c||f<=L)return;var H=Number.POSITIVE_INFINITY,j;for(j=i.level-1;j>o;j--){var J=e[j].maxBitrate;if(H=x*J/(8*.8*p),H<L)break}if(H>=f)return;var M=this.bwEstimator.getEstimate();I.logger.warn("Fragment "+i.sn+(t?" part "+t.index:"")+" of level "+i.level+" is loading too slowly and will cause an underbuffer; aborting and switching to level "+j+`
Current BW estimate: `+(Object(G.isFiniteNumber)(M)?(M/1024).toFixed(3):"Unknown")+` Kb/s
Estimated load time for current fragment: `+f.toFixed(3)+` s
Estimated load time for the next fragment: `+H.toFixed(3)+` s
Time to underbuffer: `+L.toFixed(3)+" s"),r.nextLoadLevel=j,this.bwEstimator.sample(m,_.loaded),this.clearTimer(),i.loader&&(this.fragCurrent=this.partCurrent=null,i.loader.abort()),r.trigger(S.Events.FRAG_LOAD_EMERGENCY_ABORTED,{frag:i,part:t,stats:_})},n.onFragLoaded=function(i,t){var r=t.frag,A=t.part;if(r.type===U.PlaylistLevelType.MAIN&&Object(G.isFiniteNumber)(r.sn)){var B=A?A.stats:r.stats,w=A?A.duration:r.duration;if(this.clearTimer(),this.lastLoadedFragLevel=r.level,this._nextAutoLevel=-1,this.hls.config.abrMaxWithRealBitrate){var _=this.hls.levels[r.level],x=(_.loaded?_.loaded.bytes:0)+B.loaded,m=(_.loaded?_.loaded.duration:0)+w;_.loaded={bytes:x,duration:m},_.realBitrate=Math.round(8*x/m)}if(r.bitrateTest){var c={stats:B,frag:r,part:A,id:r.type};this.onFragBuffered(S.Events.FRAG_BUFFERED,c),r.bitrateTest=!1}}},n.onFragBuffered=function(i,t){var r=t.frag,A=t.part,B=A?A.stats:r.stats;if(B.aborted)return;if(r.type!==U.PlaylistLevelType.MAIN||r.sn==="initSegment")return;var w=B.parsing.end-B.loading.start;this.bwEstimator.sample(w,B.loaded),B.bwEstimate=this.bwEstimator.getEstimate(),r.bitrateTest?this.bitrateTestDelay=w/1e3:this.bitrateTestDelay=0},n.onError=function(i,t){switch(t.details){case F.ErrorDetails.FRAG_LOAD_ERROR:case F.ErrorDetails.FRAG_LOAD_TIMEOUT:this.clearTimer();break;default:break}},n.clearTimer=function(){self.clearInterval(this.timer),this.timer=void 0},n.getNextABRAutoLevel=function(){var i=this.fragCurrent,t=this.partCurrent,r=this.hls,A=r.maxAutoLevel,B=r.config,w=r.minAutoLevel,_=r.media,x=t?t.duration:i?i.duration:0,m=_?_.currentTime:0,c=_&&_.playbackRate!==0?Math.abs(_.playbackRate):1,e=this.bwEstimator?this.bwEstimator.getEstimate():B.abrEwmaDefaultEstimate,o=(z.BufferHelper.bufferInfo(_,m,B.maxBufferHole).end-m)/c,l=this.findBestLevel(e,w,A,o,B.abrBandWidthFactor,B.abrBandWidthUpFactor);if(l>=0)return l;I.logger.trace((o?"rebuffering expected":"buffer is empty")+", finding optimal quality level");var y=x?Math.min(x,B.maxStarvationDelay):B.maxStarvationDelay,p=B.abrBandWidthFactor,f=B.abrBandWidthUpFactor;if(!o){var R=this.bitrateTestDelay;if(R){var L=x?Math.min(x,B.maxLoadingDelay):B.maxLoadingDelay;y=L-R,I.logger.trace("bitrate test took "+Math.round(1e3*R)+"ms, set first fragment max fetchDuration to "+Math.round(1e3*y)+" ms"),p=f=1}}return l=this.findBestLevel(e,w,A,o+y,p,f),Math.max(l,0)},n.findBestLevel=function(i,t,r,A,B,w){for(var _,x=this.fragCurrent,m=this.partCurrent,c=this.lastLoadedFragLevel,e=this.hls.levels,o=e[c],l=!!(o!=null&&(_=o.details)!==null&&_!==void 0&&_.live),y=o==null?void 0:o.codecSet,p=m?m.duration:x?x.duration:0,f=r;f>=t;f--){var R=e[f];if(!R||y&&R.codecSet!==y)continue;var L=R.details,H=(m?L==null?void 0:L.partTarget:L==null?void 0:L.averagetargetduration)||p,j=void 0;f<=c?j=B*i:j=w*i;var J=e[f].maxBitrate,M=J*H/j;if(I.logger.trace("level/adjustedbw/bitrate/avgDuration/maxFetchDuration/fetchDuration: "+f+"/"+Math.round(j)+"/"+J+"/"+H+"/"+A+"/"+M),j>J&&(!M||l&&!this.bitrateTestDelay||M<A))return f}return-1},b(a,[{key:"nextAutoLevel",get:function(){var i=this._nextAutoLevel,t=this.bwEstimator;if(i!==-1&&(!t||!t.canEstimate()))return i;var r=this.getNextABRAutoLevel();return i!==-1&&(r=Math.min(i,r)),r},set:function(i){this._nextAutoLevel=i}}]),a}();X.default=u},"./src/controller/audio-stream-controller.ts":function(ve,X,O){"use strict";O.r(X);var G=O("./src/polyfills/number.ts"),D=O("./src/controller/base-stream-controller.ts"),S=O("./src/events.ts"),z=O("./src/utils/buffer-helper.ts"),F=O("./src/controller/fragment-tracker.ts"),U=O("./src/types/level.ts"),I=O("./src/types/loader.ts"),v=O("./src/loader/fragment.ts"),b=O("./src/demux/chunk-cache.ts"),u=O("./src/demux/transmuxer-interface.ts"),a=O("./src/types/transmuxer.ts"),n=O("./src/controller/fragment-finders.ts"),s=O("./src/utils/discontinuities.ts"),i=O("./src/errors.ts"),t=O("./src/utils/logger.ts");function r(){return r=Object.assign||function(x){for(var m=1;m<arguments.length;m++){var c=arguments[m];for(var e in c)Object.prototype.hasOwnProperty.call(c,e)&&(x[e]=c[e])}return x},r.apply(this,arguments)}function A(x,m){x.prototype=Object.create(m.prototype),x.prototype.constructor=x,B(x,m)}function B(x,m){return B=Object.setPrototypeOf||function(e,o){return e.__proto__=o,e},B(x,m)}var w=100,_=function(x){A(m,x);function m(e,o){var l;return l=x.call(this,e,o,"[audio-stream-controller]")||this,l.videoBuffer=null,l.videoTrackCC=-1,l.waitingVideoCC=-1,l.audioSwitch=!1,l.trackId=-1,l.waitingData=null,l.mainDetails=null,l.bufferFlushed=!1,l._registerListeners(),l}var c=m.prototype;return c.onHandlerDestroying=function(){this._unregisterListeners(),this.mainDetails=null},c._registerListeners=function(){var o=this.hls;o.on(S.Events.MEDIA_ATTACHED,this.onMediaAttached,this),o.on(S.Events.MEDIA_DETACHING,this.onMediaDetaching,this),o.on(S.Events.MANIFEST_LOADING,this.onManifestLoading,this),o.on(S.Events.LEVEL_LOADED,this.onLevelLoaded,this),o.on(S.Events.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),o.on(S.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),o.on(S.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),o.on(S.Events.ERROR,this.onError,this),o.on(S.Events.BUFFER_RESET,this.onBufferReset,this),o.on(S.Events.BUFFER_CREATED,this.onBufferCreated,this),o.on(S.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),o.on(S.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),o.on(S.Events.FRAG_BUFFERED,this.onFragBuffered,this)},c._unregisterListeners=function(){var o=this.hls;o.off(S.Events.MEDIA_ATTACHED,this.onMediaAttached,this),o.off(S.Events.MEDIA_DETACHING,this.onMediaDetaching,this),o.off(S.Events.MANIFEST_LOADING,this.onManifestLoading,this),o.off(S.Events.LEVEL_LOADED,this.onLevelLoaded,this),o.off(S.Events.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),o.off(S.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),o.off(S.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),o.off(S.Events.ERROR,this.onError,this),o.off(S.Events.BUFFER_RESET,this.onBufferReset,this),o.off(S.Events.BUFFER_CREATED,this.onBufferCreated,this),o.off(S.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),o.off(S.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),o.off(S.Events.FRAG_BUFFERED,this.onFragBuffered,this)},c.onInitPtsFound=function(o,l){var y=l.frag,p=l.id,f=l.initPTS;if(p==="main"){var R=y.cc;this.initPTS[y.cc]=f,this.log("InitPTS for cc: "+R+" found from main: "+f),this.videoTrackCC=R,this.state===D.State.WAITING_INIT_PTS&&this.tick()}},c.startLoad=function(o){if(!this.levels){this.startPosition=o,this.state=D.State.STOPPED;return}var l=this.lastCurrentTime;this.stopLoad(),this.setInterval(w),this.fragLoadError=0,l>0&&o===-1?(this.log("Override startPosition with lastCurrentTime @"+l.toFixed(3)),this.state=D.State.IDLE):(this.loadedmetadata=!1,this.state=D.State.WAITING_TRACK),this.nextLoadPosition=this.startPosition=this.lastCurrentTime=o,this.tick()},c.doTick=function(){switch(this.state){case D.State.IDLE:this.doTickIdle();break;case D.State.WAITING_TRACK:{var o,l=this.levels,y=this.trackId,p=l==null||((o=l[y])===null||o===void 0)?void 0:o.details;if(p){if(this.waitForCdnTuneIn(p))break;this.state=D.State.WAITING_INIT_PTS}break}case D.State.FRAG_LOADING_WAITING_RETRY:{var f,R=performance.now(),L=this.retryDate;(!L||R>=L||(f=this.media)!==null&&f!==void 0&&f.seeking)&&(this.log("RetryDate reached, switch back to IDLE state"),this.state=D.State.IDLE);break}case D.State.WAITING_INIT_PTS:{var H=this.waitingData;if(H){var j=H.frag,J=H.part,M=H.cache,Y=H.complete;if(this.initPTS[j.cc]!==void 0){this.waitingData=null,this.waitingVideoCC=-1,this.state=D.State.FRAG_LOADING;var te=M.flush(),de={frag:j,part:J,payload:te,networkDetails:null};this._handleFragmentLoadProgress(de),Y&&x.prototype._handleFragmentLoadComplete.call(this,de)}else if(this.videoTrackCC!==this.waitingVideoCC)t.logger.log("Waiting fragment cc ("+j.cc+") cancelled because video is at cc "+this.videoTrackCC),this.clearWaitingFragment();else{var fe=this.getLoadPosition(),Le=z.BufferHelper.bufferInfo(this.mediaBuffer,fe,this.config.maxBufferHole),xe=Object(n.fragmentWithinToleranceTest)(Le.end,this.config.maxFragLookUpTolerance,j);xe<0&&(t.logger.log("Waiting fragment cc ("+j.cc+") @ "+j.start+" cancelled because another fragment at "+Le.end+" is needed"),this.clearWaitingFragment())}}else this.state=D.State.IDLE}}this.onTickEnd()},c.clearWaitingFragment=function(){var o=this.waitingData;o&&(this.fragmentTracker.removeFragment(o.frag),this.waitingData=null,this.waitingVideoCC=-1,this.state=D.State.IDLE)},c.onTickEnd=function(){var o=this.media;if(!o||!o.readyState)return;var l=this.mediaBuffer?this.mediaBuffer:o,y=l.buffered;!this.loadedmetadata&&y.length&&(this.loadedmetadata=!0),this.lastCurrentTime=o.currentTime},c.doTickIdle=function(){var o,l,y=this.hls,p=this.levels,f=this.media,R=this.trackId,L=y.config;if(!p||!p[R])return;if(!f&&(this.startFragRequested||!L.startFragPrefetch))return;var H=p[R],j=H.details;if(!j||j.live&&this.levelLastLoaded!==R||this.waitForCdnTuneIn(j)){this.state=D.State.WAITING_TRACK;return}this.bufferFlushed&&(this.bufferFlushed=!1,this.afterBufferFlushed(this.mediaBuffer?this.mediaBuffer:this.media,v.ElementaryStreamTypes.AUDIO,I.PlaylistLevelType.AUDIO));var J=this.getFwdBufferInfo(this.mediaBuffer?this.mediaBuffer:this.media,I.PlaylistLevelType.AUDIO);if(J===null)return;var M=J.len,Y=this.getMaxBufferLength(),te=this.audioSwitch;if(M>=Y&&!te)return;if(!te&&this._streamEnded(J,j)){y.trigger(S.Events.BUFFER_EOS,{type:"audio"}),this.state=D.State.ENDED;return}var de=j.fragments,fe=de[0].start,Le=J.end;if(te){var xe=this.getLoadPosition();Le=xe,j.PTSKnown&&xe<fe&&((J.end>fe||J.nextStart)&&(this.log("Alt audio track ahead of main track, seek to start of alt audio track"),f.currentTime=fe+.05))}var Ie=this.getNextFragment(Le,j);if(!Ie){this.bufferFlushed=!0;return}((o=Ie.decryptdata)===null||o===void 0?void 0:o.keyFormat)==="identity"&&!((l=Ie.decryptdata)!==null&&l!==void 0&&l.key)?this.loadKey(Ie,j):this.loadFragment(Ie,j,Le)},c.getMaxBufferLength=function(){var o=x.prototype.getMaxBufferLength.call(this),l=this.getFwdBufferInfo(this.videoBuffer?this.videoBuffer:this.media,I.PlaylistLevelType.MAIN);return l===null?o:Math.max(o,l.len)},c.onMediaDetaching=function(){this.videoBuffer=null,x.prototype.onMediaDetaching.call(this)},c.onAudioTracksUpdated=function(o,l){var y=l.audioTracks;this.resetTransmuxer(),this.levels=y.map(function(p){return new U.Level(p)})},c.onAudioTrackSwitching=function(o,l){var y=!!l.url;this.trackId=l.id;var p=this.fragCurrent;p!=null&&p.loader&&p.loader.abort(),this.fragCurrent=null,this.clearWaitingFragment(),y?this.setInterval(w):this.resetTransmuxer(),y?(this.audioSwitch=!0,this.state=D.State.IDLE):this.state=D.State.STOPPED,this.tick()},c.onManifestLoading=function(){this.mainDetails=null,this.fragmentTracker.removeAllFragments(),this.startPosition=this.lastCurrentTime=0,this.bufferFlushed=!1},c.onLevelLoaded=function(o,l){this.mainDetails=l.details},c.onAudioTrackLoaded=function(o,l){var y,p=this.levels,f=l.details,R=l.id;if(!p){this.warn("Audio tracks were reset while loading level "+R);return}this.log("Track "+R+" loaded ["+f.startSN+","+f.endSN+"],duration:"+f.totalduration);var L=p[R],H=0;if(f.live||(y=L.details)!==null&&y!==void 0&&y.live){var j=this.mainDetails;if(f.fragments[0]||(f.deltaUpdateFailed=!0),f.deltaUpdateFailed||!j)return;!L.details&&f.hasProgramDateTime&&j.hasProgramDateTime?(Object(s.alignMediaPlaylistByPDT)(f,j),H=f.fragments[0].start):H=this.alignPlaylists(f,L.details)}L.details=f,this.levelLastLoaded=R,!this.startFragRequested&&(this.mainDetails||!f.live)&&this.setStartPosition(L.details,H),this.state===D.State.WAITING_TRACK&&!this.waitForCdnTuneIn(f)&&(this.state=D.State.IDLE),this.tick()},c._handleFragmentLoadProgress=function(o){var l,y=o.frag,p=o.part,f=o.payload,R=this.config,L=this.trackId,H=this.levels;if(!H){this.warn("Audio tracks were reset while fragment load was in progress. Fragment "+y.sn+" of level "+y.level+" will not be buffered");return}var j=H[L];console.assert(j,"Audio track is defined on fragment load progress");var J=j.details;console.assert(J,"Audio track details are defined on fragment load progress");var M=R.defaultAudioCodec||j.audioCodec||"mp4a.40.2",Y=this.transmuxer;Y||(Y=this.transmuxer=new u.default(this.hls,I.PlaylistLevelType.AUDIO,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)));var te=this.initPTS[y.cc],de=(l=y.initSegment)===null||l===void 0?void 0:l.data;if(te!==void 0){var fe=!1,Le=p?p.index:-1,xe=Le!==-1,Ie=new a.ChunkMetadata(y.level,y.sn,y.stats.chunkCount,f.byteLength,Le,xe);Y.push(f,de,M,"",y,p,J.totalduration,fe,Ie,te)}else{t.logger.log("Unknown video PTS for cc "+y.cc+", waiting for video PTS before demuxing audio frag "+y.sn+" of ["+J.startSN+" ,"+J.endSN+"],track "+L);var Fe=this.waitingData=this.waitingData||{frag:y,part:p,cache:new b.default,complete:!1},Ue=Fe.cache;Ue.push(new Uint8Array(f)),this.waitingVideoCC=this.videoTrackCC,this.state=D.State.WAITING_INIT_PTS}},c._handleFragmentLoadComplete=function(o){if(this.waitingData){this.waitingData.complete=!0;return}x.prototype._handleFragmentLoadComplete.call(this,o)},c.onBufferReset=function(){this.mediaBuffer=this.videoBuffer=null,this.loadedmetadata=!1},c.onBufferCreated=function(o,l){var y=l.tracks.audio;y&&(this.mediaBuffer=y.buffer),l.tracks.video&&(this.videoBuffer=l.tracks.video.buffer)},c.onFragBuffered=function(o,l){var y=l.frag,p=l.part;if(y.type!==I.PlaylistLevelType.AUDIO)return;if(this.fragContextChanged(y)){this.warn("Fragment "+y.sn+(p?" p: "+p.index:"")+" of level "+y.level+" finished buffering, but was aborted. state: "+this.state+", audioSwitch: "+this.audioSwitch);return}y.sn!=="initSegment"&&(this.fragPrevious=y,this.audioSwitch&&(this.audioSwitch=!1,this.hls.trigger(S.Events.AUDIO_TRACK_SWITCHED,{id:this.trackId}))),this.fragBufferedComplete(y,p)},c.onError=function(o,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(I.PlaylistLevelType.AUDIO,l);break;case i.ErrorDetails.AUDIO_TRACK_LOAD_ERROR:case i.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:this.state!==D.State.ERROR&&this.state!==D.State.STOPPED&&(this.state=l.fatal?D.State.ERROR:D.State.IDLE,this.warn(l.details+" while loading frag, switching to "+this.state+" state"));break;case i.ErrorDetails.BUFFER_FULL_ERROR:if(l.parent==="audio"&&(this.state===D.State.PARSING||this.state===D.State.PARSED)){var y=!0,p=this.getFwdBufferInfo(this.mediaBuffer,I.PlaylistLevelType.AUDIO);p&&p.len>.5&&(y=!this.reduceMaxBufferLength(p.len)),y&&(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}},c.onBufferFlushed=function(o,l){var y=l.type;y===v.ElementaryStreamTypes.AUDIO&&(this.bufferFlushed=!0)},c._handleTransmuxComplete=function(o){var l,y="audio",p=this.hls,f=o.remuxResult,R=o.chunkMeta,L=this.getCurrentContext(R);if(!L){this.warn("The loading context changed while buffering fragment "+R.sn+" of level "+R.level+". This chunk will not be buffered."),this.resetLiveStartWhenNotLoaded(R.level);return}var H=L.frag,j=L.part,J=f.audio,M=f.text,Y=f.id3,te=f.initSegment;if(this.fragContextChanged(H))return;if(this.state=D.State.PARSING,this.audioSwitch&&J&&this.completeAudioSwitch(),te!=null&&te.tracks&&(this._bufferInitSegment(te.tracks,H,R),p.trigger(S.Events.FRAG_PARSING_INIT_SEGMENT,{frag:H,id:y,tracks:te.tracks})),J){var de=J.startPTS,fe=J.endPTS,Le=J.startDTS,xe=J.endDTS;j&&(j.elementaryStreams[v.ElementaryStreamTypes.AUDIO]={startPTS:de,endPTS:fe,startDTS:Le,endDTS:xe}),H.setElementaryStreamInfo(v.ElementaryStreamTypes.AUDIO,de,fe,Le,xe),this.bufferFragmentData(J,H,j,R)}if(Y!=null&&(l=Y.samples)!==null&&l!==void 0&&l.length){var Ie=r({frag:H,id:y},Y);p.trigger(S.Events.FRAG_PARSING_METADATA,Ie)}if(M){var Fe=r({frag:H,id:y},M);p.trigger(S.Events.FRAG_PARSING_USERDATA,Fe)}},c._bufferInitSegment=function(o,l,y){if(this.state!==D.State.PARSING)return;o.video&&delete o.video;var p=o.audio;if(!p)return;p.levelCodec=p.codec,p.id="audio",this.log("Init audio buffer, container:"+p.container+", codecs[parsed]=["+p.codec+"]"),this.hls.trigger(S.Events.BUFFER_CODECS,o);var f=p.initSegment;if(f!=null&&f.byteLength){var R={type:"audio",frag:l,part:null,chunkMeta:y,parent:l.type,data:f};this.hls.trigger(S.Events.BUFFER_APPENDING,R)}this.tick()},c.loadFragment=function(o,l,y){var p=this.fragmentTracker.getState(o);this.fragCurrent=o,(this.audioSwitch||p===F.FragmentState.NOT_LOADED||p===F.FragmentState.PARTIAL)&&(o.sn==="initSegment"?this._loadInitSegment(o):l.live&&!Object(G.isFiniteNumber)(this.initPTS[o.cc])?(this.log("Waiting for video PTS in continuity counter "+o.cc+" of live stream before loading audio fragment "+o.sn+" of level "+this.trackId),this.state=D.State.WAITING_INIT_PTS):(this.startFragRequested=!0,x.prototype.loadFragment.call(this,o,l,y)))},c.completeAudioSwitch=function(){var o=this.hls,l=this.media,y=this.trackId;l&&(this.log("Switching audio track : flushing all audio"),x.prototype.flushMainBuffer.call(this,0,Number.POSITIVE_INFINITY,"audio")),this.audioSwitch=!1,o.trigger(S.Events.AUDIO_TRACK_SWITCHED,{id:y})},m}(D.default);X.default=_},"./src/controller/audio-track-controller.ts":function(ve,X,O){"use strict";O.r(X);var G=O("./src/events.ts"),D=O("./src/errors.ts"),S=O("./src/controller/base-playlist-controller.ts"),z=O("./src/types/loader.ts");function F(u,a){for(var n=0;n<a.length;n++){var s=a[n];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(u,s.key,s)}}function U(u,a,n){return a&&F(u.prototype,a),n&&F(u,n),u}function I(u,a){u.prototype=Object.create(a.prototype),u.prototype.constructor=u,v(u,a)}function v(u,a){return v=Object.setPrototypeOf||function(s,i){return s.__proto__=i,s},v(u,a)}var b=function(u){I(a,u);function a(s){var i;return i=u.call(this,s,"[audio-track-controller]")||this,i.tracks=[],i.groupId=null,i.tracksInGroup=[],i.trackId=-1,i.trackName="",i.selectDefaultTrack=!0,i.registerListeners(),i}var n=a.prototype;return n.registerListeners=function(){var i=this.hls;i.on(G.Events.MANIFEST_LOADING,this.onManifestLoading,this),i.on(G.Events.MANIFEST_PARSED,this.onManifestParsed,this),i.on(G.Events.LEVEL_LOADING,this.onLevelLoading,this),i.on(G.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),i.on(G.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),i.on(G.Events.ERROR,this.onError,this)},n.unregisterListeners=function(){var i=this.hls;i.off(G.Events.MANIFEST_LOADING,this.onManifestLoading,this),i.off(G.Events.MANIFEST_PARSED,this.onManifestParsed,this),i.off(G.Events.LEVEL_LOADING,this.onLevelLoading,this),i.off(G.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),i.off(G.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),i.off(G.Events.ERROR,this.onError,this)},n.destroy=function(){this.unregisterListeners(),this.tracks.length=0,this.tracksInGroup.length=0,u.prototype.destroy.call(this)},n.onManifestLoading=function(){this.tracks=[],this.groupId=null,this.tracksInGroup=[],this.trackId=-1,this.trackName="",this.selectDefaultTrack=!0},n.onManifestParsed=function(i,t){this.tracks=t.audioTracks||[]},n.onAudioTrackLoaded=function(i,t){var r=t.id,A=t.details,B=this.tracksInGroup[r];if(!B){this.warn("Invalid audio track id "+r);return}var w=B.details;B.details=t.details,this.log("audioTrack "+r+" loaded ["+A.startSN+"-"+A.endSN+"]"),r===this.trackId&&(this.retryCount=0,this.playlistLoaded(r,t,w))},n.onLevelLoading=function(i,t){this.switchLevel(t.level)},n.onLevelSwitching=function(i,t){this.switchLevel(t.level)},n.switchLevel=function(i){var t=this.hls.levels[i];if(!(t!=null&&t.audioGroupIds))return;var r=t.audioGroupIds[t.urlId];if(this.groupId!==r){this.groupId=r;var A=this.tracks.filter(function(w){return!r||w.groupId===r});this.selectDefaultTrack&&!A.some(function(w){return w.default})&&(this.selectDefaultTrack=!1),this.tracksInGroup=A;var B={audioTracks:A};this.log("Updating audio tracks, "+A.length+' track(s) found in "'+r+'" group-id'),this.hls.trigger(G.Events.AUDIO_TRACKS_UPDATED,B),this.selectInitialTrack()}},n.onError=function(i,t){if(u.prototype.onError.call(this,i,t),t.fatal||!t.context)return;t.context.type===z.PlaylistContextType.AUDIO_TRACK&&t.context.id===this.trackId&&t.context.groupId===this.groupId&&this.retryLoadingOrFail(t)},n.setAudioTrack=function(i){var t=this.tracksInGroup;if(i<0||i>=t.length){this.warn("Invalid id passed to audio-track controller");return}this.clearTimer();var r=t[this.trackId];this.log("Now switching to audio-track index "+i);var A=t[i],B=A.id,w=A.groupId,_=w===void 0?"":w,x=A.name,m=A.type,c=A.url;if(this.trackId=i,this.trackName=x,this.selectDefaultTrack=!1,this.hls.trigger(G.Events.AUDIO_TRACK_SWITCHING,{id:B,groupId:_,name:x,type:m,url:c}),A.details&&!A.details.live)return;var e=this.switchParams(A.url,r==null?void 0:r.details);this.loadPlaylist(e)},n.selectInitialTrack=function(){var i=this.tracksInGroup;console.assert(i.length,"Initial audio track should be selected when tracks are known");var t=this.trackName,r=this.findTrackId(t)||this.findTrackId();r!==-1?this.setAudioTrack(r):(this.warn("No track found for running audio group-ID: "+this.groupId),this.hls.trigger(G.Events.ERROR,{type:D.ErrorTypes.MEDIA_ERROR,details:D.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,fatal:!0}))},n.findTrackId=function(i){for(var t=this.tracksInGroup,r=0;r<t.length;r++){var A=t[r];if((!this.selectDefaultTrack||A.default)&&(!i||i===A.name))return A.id}return-1},n.loadPlaylist=function(i){var t=this.tracksInGroup[this.trackId];if(this.shouldLoadTrack(t)){var r=t.id,A=t.groupId,B=t.url;if(i)try{B=i.addDirectives(B)}catch(w){this.warn("Could not construct new URL with HLS Delivery Directives: "+w)}this.log("loading audio-track playlist for id: "+r),this.clearTimer(),this.hls.trigger(G.Events.AUDIO_TRACK_LOADING,{url:B,id:r,groupId:A,deliveryDirectives:i||null})}},U(a,[{key:"audioTracks",get:function(){return this.tracksInGroup}},{key:"audioTrack",get:function(){return this.trackId},set:function(i){this.selectDefaultTrack=!1,this.setAudioTrack(i)}}]),a}(S.default);X.default=b},"./src/controller/base-playlist-controller.ts":function(ve,X,O){"use strict";O.r(X),O.d(X,"default",function(){return U});var G=O("./src/polyfills/number.ts"),D=O("./src/types/level.ts"),S=O("./src/controller/level-helper.ts"),z=O("./src/utils/logger.ts"),F=O("./src/errors.ts"),U=function(){function I(b,u){this.hls=void 0,this.timer=-1,this.canLoad=!1,this.retryCount=0,this.log=void 0,this.warn=void 0,this.log=z.logger.log.bind(z.logger,u+":"),this.warn=z.logger.warn.bind(z.logger,u+":"),this.hls=b}var v=I.prototype;return v.destroy=function(){this.clearTimer(),this.hls=this.log=this.warn=null},v.onError=function(u,a){a.fatal&&a.type===F.ErrorTypes.NETWORK_ERROR&&this.clearTimer()},v.clearTimer=function(){clearTimeout(this.timer),this.timer=-1},v.startLoad=function(){this.canLoad=!0,this.retryCount=0,this.loadPlaylist()},v.stopLoad=function(){this.canLoad=!1,this.clearTimer()},v.switchParams=function(u,a){var n=a==null?void 0:a.renditionReports;if(n)for(var s=0;s<n.length;s++){var i=n[s],t=""+i.URI;if(t===u.substr(-t.length)){var r=parseInt(i["LAST-MSN"]),A=parseInt(i["LAST-PART"]);if(a&&this.hls.config.lowLatencyMode){var B=Math.min(a.age-a.partTarget,a.targetduration);A!==void 0&&B>a.partTarget&&(A+=1)}if(Object(G.isFiniteNumber)(r))return new D.HlsUrlParameters(r,Object(G.isFiniteNumber)(A)?A:void 0,D.HlsSkip.No)}}},v.loadPlaylist=function(u){},v.shouldLoadTrack=function(u){return this.canLoad&&u&&!!u.url&&(!u.details||u.details.live)},v.playlistLoaded=function(u,a,n){var s=this,i=a.details,t=a.stats,r=t.loading.end?Math.max(0,self.performance.now()-t.loading.end):0;if(i.advancedDateTime=Date.now()-r,i.live||n!=null&&n.live){if(i.reloaded(n),n&&this.log("live playlist "+u+" "+(i.advanced?"REFRESHED "+i.lastPartSn+"-"+i.lastPartIndex:"MISSED")),n&&i.fragments.length>0&&Object(S.mergeDetails)(n,i),!this.canLoad||!i.live)return;var A,B=void 0,w=void 0;if(i.canBlockReload&&i.endSN&&i.advanced){var _=this.hls.config.lowLatencyMode,x=i.lastPartSn,m=i.endSN,c=i.lastPartIndex,e=c!==-1,o=x===m,l=_?0:c;e?(B=o?m+1:x,w=o?l:c+1):B=m+1;var y=i.age,p=y+i.ageHeader,f=Math.min(p-i.partTarget,i.targetduration*1.5);if(f>0){if(n&&f>n.tuneInGoal)this.warn("CDN Tune-in goal increased from: "+n.tuneInGoal+" to: "+f+" with playlist age: "+i.age),f=0;else{var R=Math.floor(f/i.targetduration);if(B+=R,w!==void 0){var L=Math.round(f%i.targetduration/i.partTarget);w+=L}this.log("CDN Tune-in age: "+i.ageHeader+"s last advanced "+y.toFixed(2)+"s goal: "+f+" skip sn "+R+" to part "+w)}i.tuneInGoal=f}if(A=this.getDeliveryDirectives(i,a.deliveryDirectives,B,w),_||!o){this.loadPlaylist(A);return}}else A=this.getDeliveryDirectives(i,a.deliveryDirectives,B,w);var H=Object(S.computeReloadInterval)(i,t);B!==void 0&&i.canBlockReload&&(H-=i.partTarget||1),this.log("reload live playlist "+u+" in "+Math.round(H)+" ms"),this.timer=self.setTimeout(function(){return s.loadPlaylist(A)},H)}else this.clearTimer()},v.getDeliveryDirectives=function(u,a,n,s){var i=Object(D.getSkipValue)(u,n);return a!=null&&a.skip&&u.deltaUpdateFailed&&(n=a.msn,s=a.part,i=D.HlsSkip.No),new D.HlsUrlParameters(n,s,i)},v.retryLoadingOrFail=function(u){var a=this,n=this.hls.config,s=this.retryCount<n.levelLoadingMaxRetry;if(s){var i;if(this.retryCount++,u.details.indexOf("LoadTimeOut")>-1&&(i=u.context)!==null&&i!==void 0&&i.deliveryDirectives)this.warn("retry playlist loading #"+this.retryCount+' after "'+u.details+'"'),this.loadPlaylist();else{var t=Math.min(Math.pow(2,this.retryCount)*n.levelLoadingRetryDelay,n.levelLoadingMaxRetryTimeout);this.timer=self.setTimeout(function(){return a.loadPlaylist()},t),this.warn("retry playlist loading #"+this.retryCount+" in "+t+' ms after "'+u.details+'"')}}else this.warn('cannot recover from error "'+u.details+'"'),this.clearTimer(),u.fatal=!0;return s},I}()},"./src/controller/base-stream-controller.ts":function(ve,X,O){"use strict";O.r(X),O.d(X,"State",function(){return m}),O.d(X,"default",function(){return c});var G=O("./src/polyfills/number.ts"),D=O("./src/task-loop.ts"),S=O("./src/controller/fragment-tracker.ts"),z=O("./src/utils/buffer-helper.ts"),F=O("./src/utils/logger.ts"),U=O("./src/events.ts"),I=O("./src/errors.ts"),v=O("./src/types/transmuxer.ts"),b=O("./src/utils/mp4-tools.ts"),u=O("./src/utils/discontinuities.ts"),a=O("./src/controller/fragment-finders.ts"),n=O("./src/controller/level-helper.ts"),s=O("./src/loader/fragment-loader.ts"),i=O("./src/crypt/decrypter.ts"),t=O("./src/utils/time-ranges.ts"),r=O("./src/types/loader.ts");function A(e,o){for(var l=0;l<o.length;l++){var y=o[l];y.enumerable=y.enumerable||!1,y.configurable=!0,"value"in y&&(y.writable=!0),Object.defineProperty(e,y.key,y)}}function B(e,o,l){return o&&A(e.prototype,o),l&&A(e,l),e}function w(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _(e,o){e.prototype=Object.create(o.prototype),e.prototype.constructor=e,x(e,o)}function x(e,o){return x=Object.setPrototypeOf||function(y,p){return y.__proto__=p,y},x(e,o)}var m={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"},c=function(e){_(o,e);function o(y,p,f){var R;return R=e.call(this)||this,R.hls=void 0,R.fragPrevious=null,R.fragCurrent=null,R.fragmentTracker=void 0,R.transmuxer=null,R._state=m.STOPPED,R.media=void 0,R.mediaBuffer=void 0,R.config=void 0,R.bitrateTest=!1,R.lastCurrentTime=0,R.nextLoadPosition=0,R.startPosition=0,R.loadedmetadata=!1,R.fragLoadError=0,R.retryDate=0,R.levels=null,R.fragmentLoader=void 0,R.levelLastLoaded=null,R.startFragRequested=!1,R.decrypter=void 0,R.initPTS=[],R.onvseeking=null,R.onvended=null,R.logPrefix="",R.log=void 0,R.warn=void 0,R.logPrefix=f,R.log=F.logger.log.bind(F.logger,f+":"),R.warn=F.logger.warn.bind(F.logger,f+":"),R.hls=y,R.fragmentLoader=new s.default(y.config),R.fragmentTracker=p,R.config=y.config,R.decrypter=new i.default(y,y.config),y.on(U.Events.KEY_LOADED,R.onKeyLoaded,w(R)),R}var l=o.prototype;return l.doTick=function(){this.onTickEnd()},l.onTickEnd=function(){},l.startLoad=function(p){},l.stopLoad=function(){this.fragmentLoader.abort();var p=this.fragCurrent;p&&this.fragmentTracker.removeFragment(p),this.resetTransmuxer(),this.fragCurrent=null,this.fragPrevious=null,this.clearInterval(),this.clearNextTick(),this.state=m.STOPPED},l._streamEnded=function(p,f){var R=this.fragCurrent,L=this.fragmentTracker;if(!f.live&&R&&R.sn===f.endSN&&!p.nextStart){var H=L.getState(R);return H===S.FragmentState.PARTIAL||H===S.FragmentState.OK}return!1},l.onMediaAttached=function(p,f){var R=this.media=this.mediaBuffer=f.media;this.onvseeking=this.onMediaSeeking.bind(this),this.onvended=this.onMediaEnded.bind(this),R.addEventListener("seeking",this.onvseeking),R.addEventListener("ended",this.onvended);var L=this.config;this.levels&&L.autoStartLoad&&this.state===m.STOPPED&&this.startLoad(L.startPosition)},l.onMediaDetaching=function(){var p=this.media;p!=null&&p.ended&&(this.log("MSE detaching and video ended, reset startPosition"),this.startPosition=this.lastCurrentTime=0),p&&(p.removeEventListener("seeking",this.onvseeking),p.removeEventListener("ended",this.onvended),this.onvseeking=this.onvended=null),this.media=this.mediaBuffer=null,this.loadedmetadata=!1,this.fragmentTracker.removeAllFragments(),this.stopLoad()},l.onMediaSeeking=function(){var p=this.config,f=this.fragCurrent,R=this.media,L=this.mediaBuffer,H=this.state,j=R?R.currentTime:0,J=z.BufferHelper.bufferInfo(L||R,j,p.maxBufferHole);if(this.log("media seeking to "+(Object(G.isFiniteNumber)(j)?j.toFixed(3):j)+", state: "+H),H===m.ENDED)this.resetLoadingState();else if(f&&!J.len){var M=p.maxFragLookUpTolerance,Y=f.start-M,te=f.start+f.duration+M,de=j>te;(j<Y||de)&&(de&&f.loader&&(this.log("seeking outside of buffer while fragment load in progress, cancel fragment load"),f.loader.abort()),this.resetLoadingState())}R&&(this.lastCurrentTime=j),!this.loadedmetadata&&!J.len&&(this.nextLoadPosition=this.startPosition=j),this.tickImmediate()},l.onMediaEnded=function(){this.startPosition=this.lastCurrentTime=0},l.onKeyLoaded=function(p,f){if(this.state!==m.KEY_LOADING||f.frag!==this.fragCurrent||!this.levels)return;this.state=m.IDLE;var R=this.levels[f.frag.level].details;R&&this.loadFragment(f.frag,R,f.frag.start)},l.onHandlerDestroying=function(){this.stopLoad(),e.prototype.onHandlerDestroying.call(this)},l.onHandlerDestroyed=function(){this.state=m.STOPPED,this.hls.off(U.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,e.prototype.onHandlerDestroyed.call(this)},l.loadKey=function(p,f){this.log("Loading key for "+p.sn+" of ["+f.startSN+"-"+f.endSN+"], "+(this.logPrefix==="[stream-controller]"?"level":"track")+" "+p.level),this.state=m.KEY_LOADING,this.fragCurrent=p,this.hls.trigger(U.Events.KEY_LOADING,{frag:p})},l.loadFragment=function(p,f,R){this._loadFragForPlayback(p,f,R)},l._loadFragForPlayback=function(p,f,R){var L=this,H=function(J){if(L.fragContextChanged(p)){L.warn("Fragment "+p.sn+(J.part?" p: "+J.part.index:"")+" of level "+p.level+" was dropped during download."),L.fragmentTracker.removeFragment(p);return}p.stats.chunkCount++,L._handleFragmentLoadProgress(J)};this._doFragLoad(p,f,R,H).then(function(j){if(!j)return;L.fragLoadError=0;var J=L.state;if(L.fragContextChanged(p)){(J===m.FRAG_LOADING||J===m.BACKTRACKING||!L.fragCurrent&&J===m.PARSING)&&(L.fragmentTracker.removeFragment(p),L.state=m.IDLE);return}if("payload"in j&&(L.log("Loaded fragment "+p.sn+" of level "+p.level),L.hls.trigger(U.Events.FRAG_LOADED,j),L.state===m.BACKTRACKING)){L.fragmentTracker.backtrack(p,j),L.resetFragmentLoading(p);return}L._handleFragmentLoadComplete(j)}).catch(function(j){L.warn(j),L.resetFragmentLoading(p)})},l.flushMainBuffer=function(p,f,R){if(R===void 0&&(R=null),!(p-f))return;var L={startOffset:p,endOffset:f,type:R};this.fragLoadError=0,this.hls.trigger(U.Events.BUFFER_FLUSHING,L)},l._loadInitSegment=function(p){var f=this;this._doFragLoad(p).then(function(R){if(!R||f.fragContextChanged(p)||!f.levels)throw new Error("init load aborted");return R}).then(function(R){var L=f.hls,H=R.payload,j=p.decryptdata;if(H&&H.byteLength>0&&j&&j.key&&j.iv&&j.method==="AES-128"){var J=self.performance.now();return f.decrypter.webCryptoDecrypt(new Uint8Array(H),j.key.buffer,j.iv.buffer).then(function(M){var Y=self.performance.now();return L.trigger(U.Events.FRAG_DECRYPTED,{frag:p,payload:M,stats:{tstart:J,tdecrypt:Y}}),R.payload=M,R})}return R}).then(function(R){var L=f.fragCurrent,H=f.hls,j=f.levels;if(!j)throw new Error("init load aborted, missing levels");var J=j[p.level].details;console.assert(J,"Level details are defined when init segment is loaded");var M=p.stats;f.state=m.IDLE,f.fragLoadError=0,p.data=new Uint8Array(R.payload),M.parsing.start=M.buffering.start=self.performance.now(),M.parsing.end=M.buffering.end=self.performance.now(),R.frag===L&&H.trigger(U.Events.FRAG_BUFFERED,{stats:M,frag:L,part:null,id:p.type}),f.tick()}).catch(function(R){f.warn(R),f.resetFragmentLoading(p)})},l.fragContextChanged=function(p){var f=this.fragCurrent;return!p||!f||p.level!==f.level||p.sn!==f.sn||p.urlId!==f.urlId},l.fragBufferedComplete=function(p,f){var R=this.mediaBuffer?this.mediaBuffer:this.media;this.log("Buffered "+p.type+" sn: "+p.sn+(f?" part: "+f.index:"")+" of "+(this.logPrefix==="[stream-controller]"?"level":"track")+" "+p.level+" "+t.default.toString(z.BufferHelper.getBuffered(R))),this.state=m.IDLE,this.tick()},l._handleFragmentLoadComplete=function(p){var f=this.transmuxer;if(!f)return;var R=p.frag,L=p.part,H=p.partsLoaded,j=!H||H.length===0||H.some(function(M){return!M}),J=new v.ChunkMetadata(R.level,R.sn,R.stats.chunkCount+1,0,L?L.index:-1,!j);f.flush(J)},l._handleFragmentLoadProgress=function(p){},l._doFragLoad=function(p,f,R,L){var H=this;if(R===void 0&&(R=null),!this.levels)throw new Error("frag load aborted, missing levels");if(R=Math.max(p.start,R||0),this.config.lowLatencyMode&&f){var j=f.partList;if(j&&L){R>p.end&&f.fragmentHint&&(p=f.fragmentHint);var J=this.getNextPart(j,p,R);if(J>-1){var M=j[J];return this.log("Loading part sn: "+p.sn+" p: "+M.index+" cc: "+p.cc+" of playlist ["+f.startSN+"-"+f.endSN+"] parts [0-"+J+"-"+(j.length-1)+"] "+(this.logPrefix==="[stream-controller]"?"level":"track")+": "+p.level+", target: "+parseFloat(R.toFixed(3))),this.nextLoadPosition=M.start+M.duration,this.state=m.FRAG_LOADING,this.hls.trigger(U.Events.FRAG_LOADING,{frag:p,part:j[J],targetBufferTime:R}),this.doFragPartsLoad(p,j,J,L).catch(function(Y){return H.handleFragLoadError(Y)})}else if(!p.url||this.loadedEndOfParts(j,R))return Promise.resolve(null)}}return this.log("Loading fragment "+p.sn+" cc: "+p.cc+" "+(f?"of ["+f.startSN+"-"+f.endSN+"] ":"")+(this.logPrefix==="[stream-controller]"?"level":"track")+": "+p.level+", target: "+parseFloat(R.toFixed(3))),Object(G.isFiniteNumber)(p.sn)&&!this.bitrateTest&&(this.nextLoadPosition=p.start+p.duration),this.state=m.FRAG_LOADING,this.hls.trigger(U.Events.FRAG_LOADING,{frag:p,targetBufferTime:R}),this.fragmentLoader.load(p,L).catch(function(Y){return H.handleFragLoadError(Y)})},l.doFragPartsLoad=function(p,f,R,L){var H=this;return new Promise(function(j,J){var M=[],Y=function te(de){var fe=f[de];H.fragmentLoader.loadPart(p,fe,L).then(function(Le){M[fe.index]=Le;var xe=Le.part;H.hls.trigger(U.Events.FRAG_LOADED,Le);var Ie=f[de+1];if(Ie&&Ie.fragment===p)te(de+1);else return j({frag:p,part:xe,partsLoaded:M})}).catch(J)};Y(R)})},l.handleFragLoadError=function(p){var f=p.data;return f&&f.details===I.ErrorDetails.INTERNAL_ABORTED?this.handleFragLoadAborted(f.frag,f.part):this.hls.trigger(U.Events.ERROR,f),null},l._handleTransmuxerFlush=function(p){var f=this.getCurrentContext(p);if(!f||this.state!==m.PARSING){this.fragCurrent||(this.state=m.IDLE);return}var R=f.frag,L=f.part,H=f.level,j=self.performance.now();R.stats.parsing.end=j,L&&(L.stats.parsing.end=j),this.updateLevelTiming(R,L,H,p.partial)},l.getCurrentContext=function(p){var f=this.levels,R=p.level,L=p.sn,H=p.part;if(!f||!f[R])return this.warn("Levels object was unset while buffering fragment "+L+" of level "+R+". The current chunk will not be buffered."),null;var j=f[R],J=H>-1?Object(n.getPartWith)(j,L,H):null,M=J?J.fragment:Object(n.getFragmentWithSN)(j,L,this.fragCurrent);return M?{frag:M,part:J,level:j}:null},l.bufferFragmentData=function(p,f,R,L){if(!p||this.state!==m.PARSING)return;var H=p.data1,j=p.data2,J=H;if(H&&j&&(J=Object(b.appendUint8Array)(H,j)),!J||!J.length)return;var M={type:p.type,frag:f,part:R,chunkMeta:L,parent:f.type,data:J};this.hls.trigger(U.Events.BUFFER_APPENDING,M),p.dropped&&p.independent&&!R&&this.flushBufferGap(f)},l.flushBufferGap=function(p){var f=this.media;if(!f)return;if(!z.BufferHelper.isBuffered(f,f.currentTime)){this.flushMainBuffer(0,p.start);return}var R=f.currentTime,L=z.BufferHelper.bufferInfo(f,R,0),H=p.duration,j=Math.min(this.config.maxFragLookUpTolerance*2,H*.25),J=Math.max(Math.min(p.start-j,L.end-j),R+j);p.start-J>j&&this.flushMainBuffer(J,p.start)},l.getFwdBufferInfo=function(p,f){var R=this.config,L=this.getLoadPosition();if(!Object(G.isFiniteNumber)(L))return null;var H=z.BufferHelper.bufferInfo(p,L,R.maxBufferHole);if(H.len===0&&H.nextStart!==void 0){var j=this.fragmentTracker.getBufferedFrag(L,f);if(j&&H.nextStart<j.end)return z.BufferHelper.bufferInfo(p,L,Math.max(H.nextStart,R.maxBufferHole))}return H},l.getMaxBufferLength=function(p){var f=this.config,R;return p?R=Math.max(8*f.maxBufferSize/p,f.maxBufferLength):R=f.maxBufferLength,Math.min(R,f.maxMaxBufferLength)},l.reduceMaxBufferLength=function(p){var f=this.config,R=p||f.maxBufferLength;return f.maxMaxBufferLength>=R?(f.maxMaxBufferLength/=2,this.warn("Reduce max buffer length to "+f.maxMaxBufferLength+"s"),!0):!1},l.getNextFragment=function(p,f){var R,L,H=f.fragments,j=H.length;if(!j)return null;var J=this.config,M=H[0].start,Y;if(f.live){var te=J.initialLiveManifestSize;if(j<te)return this.warn("Not enough fragments to start playback (have: "+j+", need: "+te+")"),null;!f.PTSKnown&&!this.startFragRequested&&this.startPosition===-1&&(Y=this.getInitialLiveFragment(f,H),this.startPosition=Y?this.hls.liveSyncPosition||Y.start:p)}else p<=M&&(Y=H[0]);if(!Y){var de=J.lowLatencyMode?f.partEnd:f.fragmentEnd;Y=this.getFragmentAtPosition(p,de,f)}return(R=Y)!==null&&R!==void 0&&R.initSegment&&!((L=Y)!==null&&L!==void 0&&L.initSegment.data)&&!this.bitrateTest&&(Y=Y.initSegment),Y},l.getNextPart=function(p,f,R){for(var L=-1,H=!1,j=!0,J=0,M=p.length;J<M;J++){var Y=p[J];if(j=j&&!Y.independent,L>-1&&R<Y.start)break;var te=Y.loaded;!te&&(H||Y.independent||j)&&Y.fragment===f&&(L=J),H=te}return L},l.loadedEndOfParts=function(p,f){var R=p[p.length-1];return R&&f>R.start&&R.loaded},l.getInitialLiveFragment=function(p,f){var R=this.fragPrevious,L=null;if(R){if(p.hasProgramDateTime&&(this.log("Live playlist, switching playlist, load frag with same PDT: "+R.programDateTime),L=Object(a.findFragmentByPDT)(f,R.endProgramDateTime,this.config.maxFragLookUpTolerance)),!L){var H=R.sn+1;if(H>=p.startSN&&H<=p.endSN){var j=f[H-p.startSN];R.cc===j.cc&&(L=j,this.log("Live playlist, switching playlist, load frag with next SN: "+L.sn))}L||(L=Object(a.findFragWithCC)(f,R.cc),L&&this.log("Live playlist, switching playlist, load frag with same CC: "+L.sn))}}else{var J=this.hls.liveSyncPosition;J!==null&&(L=this.getFragmentAtPosition(J,this.bitrateTest?p.fragmentEnd:p.edge,p))}return L},l.getFragmentAtPosition=function(p,f,R){var L=this.config,H=this.fragPrevious,j=R.fragments,J=R.endSN,M=R.fragmentHint,Y=L.maxFragLookUpTolerance,te=!!(L.lowLatencyMode&&R.partList&&M);te&&M&&!this.bitrateTest&&(j=j.concat(M),J=M.sn);var de;if(p<f){var fe=p>f-Y?0:Y;de=Object(a.findFragmentByPTS)(H,j,p,fe)}else de=j[j.length-1];if(de){var Le=de.sn-R.startSN,xe=H&&de.level===H.level,Ie=j[Le+1],Fe=this.fragmentTracker.getState(de);if(Fe===S.FragmentState.BACKTRACKED){de=null;for(var Ue=Le;j[Ue]&&this.fragmentTracker.getState(j[Ue])===S.FragmentState.BACKTRACKED;)H?de=j[Ue--]:de=j[--Ue];de||(de=Ie)}else H&&de.sn===H.sn&&!te&&(xe&&(de.sn<J&&this.fragmentTracker.getState(Ie)!==S.FragmentState.OK?(this.log("SN "+de.sn+" just loaded, load next one: "+Ie.sn),de=Ie):de=null))}return de},l.synchronizeToLiveEdge=function(p){var f=this.config,R=this.media;if(!R)return;var L=this.hls.liveSyncPosition,H=R.currentTime,j=p.fragments[0].start,J=p.edge,M=H>=j-f.maxFragLookUpTolerance&&H<=J;if(L!==null&&R.duration>L&&(H<L||!M)){var Y=f.liveMaxLatencyDuration!==void 0?f.liveMaxLatencyDuration:f.liveMaxLatencyDurationCount*p.targetduration;(!M&&R.readyState<4||H<J-Y)&&(this.loadedmetadata||(this.nextLoadPosition=L),R.readyState&&(this.warn("Playback: "+H.toFixed(3)+" is located too far from the end of live sliding playlist: "+J+", reset currentTime to : "+L.toFixed(3)),R.currentTime=L))}},l.alignPlaylists=function(p,f){var R=this.levels,L=this.levelLastLoaded,H=this.fragPrevious,j=L!==null?R[L]:null,J=p.fragments.length;if(!J)return this.warn("No fragments in live playlist"),0;var M=p.fragments[0].start,Y=!f,te=p.alignedSliding&&Object(G.isFiniteNumber)(M);if(Y||!te&&!M){Object(u.alignStream)(H,j,p);var de=p.fragments[0].start;return this.log("Live playlist sliding: "+de.toFixed(2)+" start-sn: "+(f?f.startSN:"na")+"->"+p.startSN+" prev-sn: "+(H?H.sn:"na")+" fragments: "+J),de}return M},l.waitForCdnTuneIn=function(p){var f=3;return p.live&&p.canBlockReload&&p.tuneInGoal>Math.max(p.partHoldBack,p.partTarget*f)},l.setStartPosition=function(p,f){var R=this.startPosition;if(R<f&&(R=-1),R===-1||this.lastCurrentTime===-1){var L=p.startTimeOffset;Object(G.isFiniteNumber)(L)?(R=f+L,L<0&&(R+=p.totalduration),R=Math.min(Math.max(f,R),f+p.totalduration),this.log("Start time offset "+L+" found in playlist, adjust startPosition to "+R),this.startPosition=R):p.live?R=this.hls.liveSyncPosition||f:this.startPosition=R=0,this.lastCurrentTime=R}this.nextLoadPosition=R},l.getLoadPosition=function(){var p=this.media,f=0;return this.loadedmetadata&&p?f=p.currentTime:this.nextLoadPosition&&(f=this.nextLoadPosition),f},l.handleFragLoadAborted=function(p,f){this.transmuxer&&p.sn!=="initSegment"&&p.stats.aborted&&(this.warn("Fragment "+p.sn+(f?" part"+f.index:"")+" of level "+p.level+" was aborted"),this.resetFragmentLoading(p))},l.resetFragmentLoading=function(p){(!this.fragCurrent||!this.fragContextChanged(p))&&(this.state=m.IDLE)},l.onFragmentOrKeyLoadError=function(p,f){if(f.fatal)return;var R=f.frag;if(!R||R.type!==p)return;var L=this.fragCurrent;console.assert(L&&R.sn===L.sn&&R.level===L.level&&R.urlId===L.urlId,"Frag load error must match current frag to retry");var H=this.config;if(this.fragLoadError+1<=H.fragLoadingMaxRetry){if(this.resetLiveStartWhenNotLoaded(R.level))return;var j=Math.min(Math.pow(2,this.fragLoadError)*H.fragLoadingRetryDelay,H.fragLoadingMaxRetryTimeout);this.warn("Fragment "+R.sn+" of "+p+" "+R.level+" failed to load, retrying in "+j+"ms"),this.retryDate=self.performance.now()+j,this.fragLoadError++,this.state=m.FRAG_LOADING_WAITING_RETRY}else f.levelRetry?(p===r.PlaylistLevelType.AUDIO&&(this.fragCurrent=null),this.fragLoadError=0,this.state=m.IDLE):(F.logger.error(f.details+" reaches max retry, redispatch as fatal ..."),f.fatal=!0,this.hls.stopLoad(),this.state=m.ERROR)},l.afterBufferFlushed=function(p,f,R){if(!p)return;var L=z.BufferHelper.getBuffered(p);this.fragmentTracker.detectEvictedFragments(f,L,R),this.state===m.ENDED&&this.resetLoadingState()},l.resetLoadingState=function(){this.fragCurrent=null,this.fragPrevious=null,this.state=m.IDLE},l.resetLiveStartWhenNotLoaded=function(p){if(!this.loadedmetadata){this.startFragRequested=!1;var f=this.levels?this.levels[p].details:null;if(f!=null&&f.live)return this.startPosition=-1,this.setStartPosition(f,0),this.resetLoadingState(),!0;this.nextLoadPosition=this.startPosition}return!1},l.updateLevelTiming=function(p,f,R,L){var H=this,j=R.details;console.assert(!!j,"level.details must be defined");var J=Object.keys(p.elementaryStreams).reduce(function(M,Y){var te=p.elementaryStreams[Y];if(te){var de=te.endPTS-te.startPTS;if(de<=0)return H.warn("Could not parse fragment "+p.sn+" "+Y+" duration reliably ("+de+") resetting transmuxer to fallback to playlist timing"),H.resetTransmuxer(),M||!1;var fe=L?0:Object(n.updateFragPTSDTS)(j,p,te.startPTS,te.endPTS,te.startDTS,te.endDTS);return H.hls.trigger(U.Events.LEVEL_PTS_UPDATED,{details:j,level:R,drift:fe,type:Y,frag:p,start:te.startPTS,end:te.endPTS}),!0}return M},!1);J?(this.state=m.PARSED,this.hls.trigger(U.Events.FRAG_PARSED,{frag:p,part:f})):this.resetLoadingState()},l.resetTransmuxer=function(){this.transmuxer&&(this.transmuxer.destroy(),this.transmuxer=null)},B(o,[{key:"state",get:function(){return this._state},set:function(p){var f=this._state;f!==p&&(this._state=p,this.log(f+"->"+p))}}]),o}(D.default)},"./src/controller/buffer-controller.ts":function(ve,X,O){"use strict";O.r(X),O.d(X,"default",function(){return a});var G=O("./src/polyfills/number.ts"),D=O("./src/events.ts"),S=O("./src/utils/logger.ts"),z=O("./src/errors.ts"),F=O("./src/utils/buffer-helper.ts"),U=O("./src/utils/mediasource-helper.ts"),I=O("./src/loader/fragment.ts"),v=O("./src/controller/buffer-operation-queue.ts"),b=Object(U.getMediaSource)(),u=/([ha]vc.)(?:\.[^.,]+)+/,a=function(){function n(i){var t=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=t.hls,A=t.media,B=t.mediaSource;S.logger.log("[buffer-controller]: Media source opened"),A&&(t.updateMediaElementDuration(),r.trigger(D.Events.MEDIA_ATTACHED,{media:A})),B&&B.removeEventListener("sourceopen",t._onMediaSourceOpen),t.checkPendingTracks()},this._onMediaSourceClose=function(){S.logger.log("[buffer-controller]: Media source closed")},this._onMediaSourceEnded=function(){S.logger.log("[buffer-controller]: Media source ended")},this.hls=i,this._initSourceBuffer(),this.registerListeners()}var s=n.prototype;return s.hasSourceTypes=function(){return this.getSourceBufferTypes().length>0||Object.keys(this.pendingTracks).length>0},s.destroy=function(){this.unregisterListeners(),this.details=null},s.registerListeners=function(){var t=this.hls;t.on(D.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),t.on(D.Events.MEDIA_DETACHING,this.onMediaDetaching,this),t.on(D.Events.MANIFEST_PARSED,this.onManifestParsed,this),t.on(D.Events.BUFFER_RESET,this.onBufferReset,this),t.on(D.Events.BUFFER_APPENDING,this.onBufferAppending,this),t.on(D.Events.BUFFER_CODECS,this.onBufferCodecs,this),t.on(D.Events.BUFFER_EOS,this.onBufferEos,this),t.on(D.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),t.on(D.Events.LEVEL_UPDATED,this.onLevelUpdated,this),t.on(D.Events.FRAG_PARSED,this.onFragParsed,this),t.on(D.Events.FRAG_CHANGED,this.onFragChanged,this)},s.unregisterListeners=function(){var t=this.hls;t.off(D.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),t.off(D.Events.MEDIA_DETACHING,this.onMediaDetaching,this),t.off(D.Events.MANIFEST_PARSED,this.onManifestParsed,this),t.off(D.Events.BUFFER_RESET,this.onBufferReset,this),t.off(D.Events.BUFFER_APPENDING,this.onBufferAppending,this),t.off(D.Events.BUFFER_CODECS,this.onBufferCodecs,this),t.off(D.Events.BUFFER_EOS,this.onBufferEos,this),t.off(D.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),t.off(D.Events.LEVEL_UPDATED,this.onLevelUpdated,this),t.off(D.Events.FRAG_PARSED,this.onFragParsed,this),t.off(D.Events.FRAG_CHANGED,this.onFragChanged,this)},s._initSourceBuffer=function(){this.sourceBuffer={},this.operationQueue=new v.default(this.sourceBuffer),this.listeners={audio:[],video:[],audiovideo:[]}},s.onManifestParsed=function(t,r){var A=2;(r.audio&&!r.video||!r.altAudio)&&(A=1),this.bufferCodecEventsExpected=this._bufferCodecEventsTotal=A,this.details=null,S.logger.log(this.bufferCodecEventsExpected+" bufferCodec event(s) expected")},s.onMediaAttaching=function(t,r){var A=this.media=r.media;if(A&&b){var B=this.mediaSource=new b;B.addEventListener("sourceopen",this._onMediaSourceOpen),B.addEventListener("sourceended",this._onMediaSourceEnded),B.addEventListener("sourceclose",this._onMediaSourceClose),A.src=self.URL.createObjectURL(B),this._objectUrl=A.src}},s.onMediaDetaching=function(){var t=this.media,r=this.mediaSource,A=this._objectUrl;if(r){if(S.logger.log("[buffer-controller]: media source detaching"),r.readyState==="open")try{r.endOfStream()}catch(B){S.logger.warn("[buffer-controller]: onMediaDetaching: "+B.message+" while calling endOfStream")}this.onBufferReset(),r.removeEventListener("sourceopen",this._onMediaSourceOpen),r.removeEventListener("sourceended",this._onMediaSourceEnded),r.removeEventListener("sourceclose",this._onMediaSourceClose),t&&(A&&self.URL.revokeObjectURL(A),t.src===A?(t.removeAttribute("src"),t.load()):S.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(D.Events.MEDIA_DETACHED,void 0)},s.onBufferReset=function(){var t=this;this.getSourceBufferTypes().forEach(function(r){var A=t.sourceBuffer[r];try{A&&(t.removeBufferListeners(r),t.mediaSource&&t.mediaSource.removeSourceBuffer(A),t.sourceBuffer[r]=void 0)}catch(B){S.logger.warn("[buffer-controller]: Failed to reset the "+r+" buffer",B)}}),this._initSourceBuffer()},s.onBufferCodecs=function(t,r){var A=this,B=this.getSourceBufferTypes().length;if(Object.keys(r).forEach(function(w){if(B){var _=A.tracks[w];if(_&&typeof _.buffer.changeType=="function"){var x=r[w],m=x.codec,c=x.levelCodec,e=x.container,o=(_.levelCodec||_.codec).replace(u,"$1"),l=(c||m).replace(u,"$1");if(o!==l){var y=e+";codecs="+(c||m);A.appendChangeType(w,y)}}}else A.pendingTracks[w]=r[w]}),B)return;this.bufferCodecEventsExpected=Math.max(this.bufferCodecEventsExpected-1,0),this.mediaSource&&this.mediaSource.readyState==="open"&&this.checkPendingTracks()},s.appendChangeType=function(t,r){var A=this,B=this.operationQueue,w={execute:function(){var x=A.sourceBuffer[t];x&&(S.logger.log("[buffer-controller]: changing "+t+" sourceBuffer type to "+r),x.changeType(r)),B.shiftAndExecuteNext(t)},onStart:function(){},onComplete:function(){},onError:function(x){S.logger.warn("[buffer-controller]: Failed to change "+t+" SourceBuffer type",x)}};B.append(w,t)},s.onBufferAppending=function(t,r){var A=this,B=this.hls,w=this.operationQueue,_=this.tracks,x=r.data,m=r.type,c=r.frag,e=r.part,o=r.chunkMeta,l=o.buffering[m],y=self.performance.now();l.start=y;var p=c.stats.buffering,f=e?e.stats.buffering:null;p.start===0&&(p.start=y),f&&f.start===0&&(f.start=y);var R=_.audio,L=m==="audio"&&o.id===1&&(R==null?void 0:R.container)==="audio/mpeg",H={execute:function(){if(l.executeStart=self.performance.now(),L){var J=A.sourceBuffer[m];if(J){var M=c.start-J.timestampOffset;Math.abs(M)>=.1&&(S.logger.log("[buffer-controller]: Updating audio SourceBuffer timestampOffset to "+c.start+" (delta: "+M+") sn: "+c.sn+")"),J.timestampOffset=c.start)}}A.appendExecutor(x,m)},onStart:function(){},onComplete:function(){var J=self.performance.now();l.executeEnd=l.end=J,p.first===0&&(p.first=J),f&&f.first===0&&(f.first=J);var M=A.sourceBuffer,Y={};for(var te in M)Y[te]=F.BufferHelper.getBuffered(M[te]);A.appendError=0,A.hls.trigger(D.Events.BUFFER_APPENDED,{type:m,frag:c,part:e,chunkMeta:o,parent:c.type,timeRanges:Y})},onError:function(J){S.logger.error("[buffer-controller]: Error encountered while trying to append to the "+m+" SourceBuffer",J);var M={type:z.ErrorTypes.MEDIA_ERROR,parent:c.type,details:z.ErrorDetails.BUFFER_APPEND_ERROR,err:J,fatal:!1};J.code===DOMException.QUOTA_EXCEEDED_ERR?M.details=z.ErrorDetails.BUFFER_FULL_ERROR:(A.appendError++,M.details=z.ErrorDetails.BUFFER_APPEND_ERROR,A.appendError>B.config.appendErrorMaxRetry&&(S.logger.error("[buffer-controller]: Failed "+B.config.appendErrorMaxRetry+" times to append segment in sourceBuffer"),M.fatal=!0)),B.trigger(D.Events.ERROR,M)}};w.append(H,m)},s.onBufferFlushing=function(t,r){var A=this,B=this.operationQueue,w=function(x){return{execute:A.removeExecutor.bind(A,x,r.startOffset,r.endOffset),onStart:function(){},onComplete:function(){A.hls.trigger(D.Events.BUFFER_FLUSHED,{type:x})},onError:function(c){S.logger.warn("[buffer-controller]: Failed to remove from "+x+" SourceBuffer",c)}}};r.type?B.append(w(r.type),r.type):this.getSourceBufferTypes().forEach(function(_){B.append(w(_),_)})},s.onFragParsed=function(t,r){var A=this,B=r.frag,w=r.part,_=[],x=w?w.elementaryStreams:B.elementaryStreams;x[I.ElementaryStreamTypes.AUDIOVIDEO]?_.push("audiovideo"):(x[I.ElementaryStreamTypes.AUDIO]&&_.push("audio"),x[I.ElementaryStreamTypes.VIDEO]&&_.push("video"));var m=function(){var e=self.performance.now();B.stats.buffering.end=e,w&&(w.stats.buffering.end=e);var o=w?w.stats:B.stats;A.hls.trigger(D.Events.FRAG_BUFFERED,{frag:B,part:w,stats:o,id:B.type})};_.length===0&&S.logger.warn("Fragments must have at least one ElementaryStreamType set. type: "+B.type+" level: "+B.level+" sn: "+B.sn),this.blockBuffers(m,_)},s.onFragChanged=function(t,r){this.flushBackBuffer()},s.onBufferEos=function(t,r){var A=this,B=this.getSourceBufferTypes().reduce(function(w,_){var x=A.sourceBuffer[_];return(!r.type||r.type===_)&&(x&&!x.ended&&(x.ended=!0,S.logger.log("[buffer-controller]: "+_+" sourceBuffer now EOS"))),w&&!!(!x||x.ended)},!0);B&&this.blockBuffers(function(){var w=A.mediaSource;if(!w||w.readyState!=="open")return;w.endOfStream()})},s.onLevelUpdated=function(t,r){var A=r.details;if(!A.fragments.length)return;this.details=A,this.getSourceBufferTypes().length?this.blockBuffers(this.updateMediaElementDuration.bind(this)):this.updateMediaElementDuration()},s.flushBackBuffer=function(){var t=this.hls,r=this.details,A=this.media,B=this.sourceBuffer;if(!A||r===null)return;var w=this.getSourceBufferTypes();if(!w.length)return;var _=r.live&&t.config.liveBackBufferLength!==null?t.config.liveBackBufferLength:t.config.backBufferLength;if(!Object(G.isFiniteNumber)(_)||_<0)return;var x=A.currentTime,m=r.levelTargetDuration,c=Math.max(_,m),e=Math.floor(x/m)*m-c;w.forEach(function(o){var l=B[o];if(l){var y=F.BufferHelper.getBuffered(l);y.length>0&&e>y.start(0)&&(t.trigger(D.Events.BACK_BUFFER_REACHED,{bufferEnd:e}),r.live&&t.trigger(D.Events.LIVE_BACK_BUFFER_REACHED,{bufferEnd:e}),t.trigger(D.Events.BUFFER_FLUSHING,{startOffset:0,endOffset:e,type:o}))}})},s.updateMediaElementDuration=function(){if(!this.details||!this.media||!this.mediaSource||this.mediaSource.readyState!=="open")return;var t=this.details,r=this.hls,A=this.media,B=this.mediaSource,w=t.fragments[0].start+t.totalduration,_=A.duration,x=Object(G.isFiniteNumber)(B.duration)?B.duration:0;t.live&&r.config.liveDurationInfinity?(S.logger.log("[buffer-controller]: Media Source duration is set to Infinity"),B.duration=Infinity,this.updateSeekableRange(t)):(w>x&&w>_||!Object(G.isFiniteNumber)(_))&&(S.logger.log("[buffer-controller]: Updating Media Source duration to "+w.toFixed(3)),B.duration=w)},s.updateSeekableRange=function(t){var r=this.mediaSource,A=t.fragments,B=A.length;if(B&&t.live&&r!==null&&r!==void 0&&r.setLiveSeekableRange){var w=Math.max(0,A[0].start),_=Math.max(w,w+t.totalduration);r.setLiveSeekableRange(w,_)}},s.checkPendingTracks=function(){var t=this.bufferCodecEventsExpected,r=this.operationQueue,A=this.pendingTracks,B=Object.keys(A).length;if(B&&!t||B===2){this.createSourceBuffers(A),this.pendingTracks={};var w=this.getSourceBufferTypes();if(w.length===0){this.hls.trigger(D.Events.ERROR,{type:z.ErrorTypes.MEDIA_ERROR,details:z.ErrorDetails.BUFFER_INCOMPATIBLE_CODECS_ERROR,fatal:!0,reason:"could not create source buffer for media codec(s)"});return}w.forEach(function(_){r.executeNext(_)})}},s.createSourceBuffers=function(t){var r=this.sourceBuffer,A=this.mediaSource;if(!A)throw Error("createSourceBuffers called when mediaSource was null");var B=0;for(var w in t)if(!r[w]){var _=t[w];if(!_)throw Error("source buffer exists for track "+w+", however track does not");var x=_.levelCodec||_.codec,m=_.container+";codecs="+x;S.logger.log("[buffer-controller]: creating sourceBuffer("+m+")");try{var c=r[w]=A.addSourceBuffer(m),e=w;this.addBufferListener(e,"updatestart",this._onSBUpdateStart),this.addBufferListener(e,"updateend",this._onSBUpdateEnd),this.addBufferListener(e,"error",this._onSBUpdateError),this.tracks[w]={buffer:c,codec:x,container:_.container,levelCodec:_.levelCodec,id:_.id},B++}catch(o){S.logger.error("[buffer-controller]: error while trying to add sourceBuffer: "+o.message),this.hls.trigger(D.Events.ERROR,{type:z.ErrorTypes.MEDIA_ERROR,details:z.ErrorDetails.BUFFER_ADD_CODEC_ERROR,fatal:!1,error:o,mimeType:m})}}B&&this.hls.trigger(D.Events.BUFFER_CREATED,{tracks:this.tracks})},s._onSBUpdateStart=function(t){var r=this.operationQueue,A=r.current(t);A.onStart()},s._onSBUpdateEnd=function(t){var r=this.operationQueue,A=r.current(t);A.onComplete(),r.shiftAndExecuteNext(t)},s._onSBUpdateError=function(t,r){S.logger.error("[buffer-controller]: "+t+" SourceBuffer error",r),this.hls.trigger(D.Events.ERROR,{type:z.ErrorTypes.MEDIA_ERROR,details:z.ErrorDetails.BUFFER_APPENDING_ERROR,fatal:!1});var A=this.operationQueue.current(t);A&&A.onError(r)},s.removeExecutor=function(t,r,A){var B=this.media,w=this.mediaSource,_=this.operationQueue,x=this.sourceBuffer,m=x[t];if(!B||!w||!m){S.logger.warn("[buffer-controller]: Attempting to remove from the "+t+" SourceBuffer, but it does not exist"),_.shiftAndExecuteNext(t);return}var c=Object(G.isFiniteNumber)(B.duration)?B.duration:Infinity,e=Object(G.isFiniteNumber)(w.duration)?w.duration:Infinity,o=Math.max(0,r),l=Math.min(A,c,e);l>o?(S.logger.log("[buffer-controller]: Removing ["+o+","+l+"] from the "+t+" SourceBuffer"),console.assert(!m.updating,t+" sourceBuffer must not be updating"),m.remove(o,l)):_.shiftAndExecuteNext(t)},s.appendExecutor=function(t,r){var A=this.operationQueue,B=this.sourceBuffer,w=B[r];if(!w){S.logger.warn("[buffer-controller]: Attempting to append to the "+r+" SourceBuffer, but it does not exist"),A.shiftAndExecuteNext(r);return}w.ended=!1,console.assert(!w.updating,r+" sourceBuffer must not be updating"),w.appendBuffer(t)},s.blockBuffers=function(t,r){var A=this;if(r===void 0&&(r=this.getSourceBufferTypes()),!r.length){S.logger.log("[buffer-controller]: Blocking operation requested, but no SourceBuffers exist"),Promise.resolve(t);return}var B=this.operationQueue,w=r.map(function(_){return B.appendBlocker(_)});Promise.all(w).then(function(){t(),r.forEach(function(_){var x=A.sourceBuffer[_];(!x||!x.updating)&&B.shiftAndExecuteNext(_)})})},s.getSourceBufferTypes=function(){return Object.keys(this.sourceBuffer)},s.addBufferListener=function(t,r,A){var B=this.sourceBuffer[t];if(!B)return;var w=A.bind(this,t);this.listeners[t].push({event:r,listener:w}),B.addEventListener(r,w)},s.removeBufferListeners=function(t){var r=this.sourceBuffer[t];if(!r)return;this.listeners[t].forEach(function(A){r.removeEventListener(A.event,A.listener)})},n}()},"./src/controller/buffer-operation-queue.ts":function(ve,X,O){"use strict";O.r(X),O.d(X,"default",function(){return D});var G=O("./src/utils/logger.ts"),D=function(){function S(F){this.buffers=void 0,this.queues={video:[],audio:[],audiovideo:[]},this.buffers=F}var z=S.prototype;return z.append=function(U,I){var v=this.queues[I];v.push(U),v.length===1&&this.buffers[I]&&this.executeNext(I)},z.insertAbort=function(U,I){var v=this.queues[I];v.unshift(U),this.executeNext(I)},z.appendBlocker=function(U){var I,v=new Promise(function(u){I=u}),b={execute:I,onStart:function(){},onComplete:function(){},onError:function(){}};return this.append(b,U),v},z.executeNext=function(U){var I=this.buffers,v=this.queues,b=I[U],u=v[U];if(u.length){var a=u[0];try{a.execute()}catch(n){G.logger.warn("[buffer-operation-queue]: Unhandled exception executing the current operation"),a.onError(n),(!b||!b.updating)&&(u.shift(),this.executeNext(U))}}},z.shiftAndExecuteNext=function(U){this.queues[U].shift(),this.executeNext(U)},z.current=function(U){return this.queues[U][0]},S}()},"./src/controller/cap-level-controller.ts":function(ve,X,O){"use strict";O.r(X);var G=O("./src/events.ts");function D(F,U){for(var I=0;I<U.length;I++){var v=U[I];v.enumerable=v.enumerable||!1,v.configurable=!0,"value"in v&&(v.writable=!0),Object.defineProperty(F,v.key,v)}}function S(F,U,I){return U&&D(F.prototype,U),I&&D(F,I),F}var z=function(){function F(I){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=I,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.firstLevel=-1,this.media=null,this.restrictedLevels=[],this.timer=void 0,this.clientRect=null,this.registerListeners()}var U=F.prototype;return U.setStreamController=function(v){this.streamController=v},U.destroy=function(){this.unregisterListener(),this.hls.config.capLevelToPlayerSize&&this.stopCapping(),this.media=null,this.clientRect=null,this.hls=this.streamController=null},U.registerListeners=function(){var v=this.hls;v.on(G.Events.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),v.on(G.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),v.on(G.Events.MANIFEST_PARSED,this.onManifestParsed,this),v.on(G.Events.BUFFER_CODECS,this.onBufferCodecs,this),v.on(G.Events.MEDIA_DETACHING,this.onMediaDetaching,this)},U.unregisterListener=function(){var v=this.hls;v.off(G.Events.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),v.off(G.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),v.off(G.Events.MANIFEST_PARSED,this.onManifestParsed,this),v.off(G.Events.BUFFER_CODECS,this.onBufferCodecs,this),v.off(G.Events.MEDIA_DETACHING,this.onMediaDetaching,this)},U.onFpsDropLevelCapping=function(v,b){F.isLevelAllowed(b.droppedLevel,this.restrictedLevels)&&this.restrictedLevels.push(b.droppedLevel)},U.onMediaAttaching=function(v,b){this.media=b.media instanceof HTMLVideoElement?b.media:null},U.onManifestParsed=function(v,b){var u=this.hls;this.restrictedLevels=[],this.firstLevel=b.firstLevel,u.config.capLevelToPlayerSize&&b.video&&this.startCapping()},U.onBufferCodecs=function(v,b){var u=this.hls;u.config.capLevelToPlayerSize&&b.video&&this.startCapping()},U.onMediaDetaching=function(){this.stopCapping()},U.detectPlayerSize=function(){if(this.media&&this.mediaHeight>0&&this.mediaWidth>0){var v=this.hls.levels;if(v.length){var b=this.hls;b.autoLevelCapping=this.getMaxLevel(v.length-1),b.autoLevelCapping>this.autoLevelCapping&&this.streamController&&this.streamController.nextLevelSwitch(),this.autoLevelCapping=b.autoLevelCapping}}},U.getMaxLevel=function(v){var b=this,u=this.hls.levels;if(!u.length)return-1;var a=u.filter(function(n,s){return F.isLevelAllowed(s,b.restrictedLevels)&&s<=v});return this.clientRect=null,F.getMaxLevelByMediaSize(a,this.mediaWidth,this.mediaHeight)},U.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()},U.stopCapping=function(){this.restrictedLevels=[],this.firstLevel=-1,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.timer&&(self.clearInterval(this.timer),this.timer=void 0)},U.getDimensions=function(){if(this.clientRect)return this.clientRect;var v=this.media,b={width:0,height:0};if(v){var u=v.getBoundingClientRect();b.width=u.width,b.height=u.height,!b.width&&!b.height&&(b.width=u.right-u.left||v.width||0,b.height=u.bottom-u.top||v.height||0)}return this.clientRect=b,b},F.isLevelAllowed=function(v,b){return b===void 0&&(b=[]),b.indexOf(v)===-1},F.getMaxLevelByMediaSize=function(v,b,u){if(!v||!v.length)return-1;for(var a=function(r,A){return A?r.width!==A.width||r.height!==A.height:!0},n=v.length-1,s=0;s<v.length;s+=1){var i=v[s];if((i.width>=b||i.height>=u)&&a(i,v[s+1])){n=s;break}}return n},S(F,[{key:"mediaWidth",get:function(){return this.getDimensions().width*F.contentScaleFactor}},{key:"mediaHeight",get:function(){return this.getDimensions().height*F.contentScaleFactor}}],[{key:"contentScaleFactor",get:function(){var v=1;try{v=self.devicePixelRatio}catch(b){}return v}}]),F}();X.default=z},"./src/controller/cmcd-controller.ts":function(ve,X,O){"use strict";O.r(X),O.d(X,"default",function(){return a});var G=O("./src/events.ts"),D=O("./src/types/cmcd.ts"),S=O("./src/utils/buffer-helper.ts"),z=O("./src/utils/logger.ts");function F(n,s){for(var i=0;i<s.length;i++){var t=s[i];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(n,t.key,t)}}function U(n,s,i){return s&&F(n.prototype,s),i&&F(n,i),n}function I(n,s){var i=typeof Symbol!="undefined"&&n[Symbol.iterator]||n["@@iterator"];if(i)return(i=i.call(n)).next.bind(i);if(Array.isArray(n)||(i=v(n))||s&&n&&typeof n.length=="number"){i&&(n=i);var t=0;return function(){return t>=n.length?{done:!0}:{done:!1,value:n[t++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function v(n,s){if(!n)return;if(typeof n=="string")return b(n,s);var i=Object.prototype.toString.call(n).slice(8,-1);if(i==="Object"&&n.constructor&&(i=n.constructor.name),i==="Map"||i==="Set")return Array.from(n);if(i==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return b(n,s)}function b(n,s){(s==null||s>n.length)&&(s=n.length);for(var i=0,t=new Array(s);i<s;i++)t[i]=n[i];return t}function u(){return u=Object.assign||function(n){for(var s=1;s<arguments.length;s++){var i=arguments[s];for(var t in i)Object.prototype.hasOwnProperty.call(i,t)&&(n[t]=i[t])}return n},u.apply(this,arguments)}var a=function(){function n(i){var t=this;this.hls=void 0,this.config=void 0,this.media=void 0,this.sid=void 0,this.cid=void 0,this.useHeaders=!1,this.initialized=!1,this.starved=!1,this.buffering=!0,this.audioBuffer=void 0,this.videoBuffer=void 0,this.onWaiting=function(){t.initialized&&(t.starved=!0),t.buffering=!0},this.onPlaying=function(){t.initialized||(t.initialized=!0),t.buffering=!1},this.applyPlaylistData=function(B){try{t.apply(B,{ot:D.CMCDObjectType.MANIFEST,su:!t.initialized})}catch(w){z.logger.warn("Could not generate manifest CMCD data.",w)}},this.applyFragmentData=function(B){try{var w=B.frag,_=t.hls.levels[w.level],x=t.getObjectType(w),m={d:w.duration*1e3,ot:x};(x===D.CMCDObjectType.VIDEO||x===D.CMCDObjectType.AUDIO||x==D.CMCDObjectType.MUXED)&&(m.br=_.bitrate/1e3,m.tb=t.getTopBandwidth(x),m.bl=t.getBufferLength(x)),t.apply(B,m)}catch(c){z.logger.warn("Could not generate segment CMCD data.",c)}},this.hls=i;var r=this.config=i.config,A=r.cmcd;A!=null&&(r.pLoader=this.createPlaylistLoader(),r.fLoader=this.createFragmentLoader(),this.sid=A.sessionId||n.uuid(),this.cid=A.contentId,this.useHeaders=A.useHeaders===!0,this.registerListeners())}var s=n.prototype;return s.registerListeners=function(){var t=this.hls;t.on(G.Events.MEDIA_ATTACHED,this.onMediaAttached,this),t.on(G.Events.MEDIA_DETACHED,this.onMediaDetached,this),t.on(G.Events.BUFFER_CREATED,this.onBufferCreated,this)},s.unregisterListeners=function(){var t=this.hls;t.off(G.Events.MEDIA_ATTACHED,this.onMediaAttached,this),t.off(G.Events.MEDIA_DETACHED,this.onMediaDetached,this),t.off(G.Events.BUFFER_CREATED,this.onBufferCreated,this),this.onMediaDetached()},s.destroy=function(){this.unregisterListeners(),this.hls=this.config=this.audioBuffer=this.videoBuffer=null},s.onMediaAttached=function(t,r){this.media=r.media,this.media.addEventListener("waiting",this.onWaiting),this.media.addEventListener("playing",this.onPlaying)},s.onMediaDetached=function(){if(!this.media)return;this.media.removeEventListener("waiting",this.onWaiting),this.media.removeEventListener("playing",this.onPlaying),this.media=null},s.onBufferCreated=function(t,r){var A,B;this.audioBuffer=(A=r.tracks.audio)===null||A===void 0?void 0:A.buffer,this.videoBuffer=(B=r.tracks.video)===null||B===void 0?void 0:B.buffer},s.createData=function(){var t;return{v:D.CMCDVersion,sf:D.CMCDStreamingFormat.HLS,sid:this.sid,cid:this.cid,pr:(t=this.media)===null||t===void 0?void 0:t.playbackRate,mtp:this.hls.bandwidthEstimate/1e3}},s.apply=function(t,r){r===void 0&&(r={}),u(r,this.createData());var A=r.ot===D.CMCDObjectType.INIT||r.ot===D.CMCDObjectType.VIDEO||r.ot===D.CMCDObjectType.MUXED;if(this.starved&&A&&(r.bs=!0,r.su=!0,this.starved=!1),r.su==null&&(r.su=this.buffering),this.useHeaders){var B=n.toHeaders(r);if(!Object.keys(B).length)return;t.headers||(t.headers={}),u(t.headers,B)}else{var w=n.toQuery(r);if(!w)return;t.url=n.appendQueryToUri(t.url,w)}},s.getObjectType=function(t){var r=t.type;return r==="subtitle"?D.CMCDObjectType.TIMED_TEXT:t.sn==="initSegment"?D.CMCDObjectType.INIT:r==="audio"?D.CMCDObjectType.AUDIO:r==="main"?this.hls.audioTracks.length?D.CMCDObjectType.VIDEO:D.CMCDObjectType.MUXED:void 0},s.getTopBandwidth=function(t){for(var r=0,A=t===D.CMCDObjectType.AUDIO?this.hls.audioTracks:this.hls.levels,B=I(A),w;!(w=B()).done;){var _=w.value;_.bitrate>r&&(r=_.bitrate)}return r>0?r:NaN},s.getBufferLength=function(t){var r=this.hls.media,A=t===D.CMCDObjectType.AUDIO?this.audioBuffer:this.videoBuffer;if(!A||!r)return NaN;var B=S.BufferHelper.bufferInfo(A,r.currentTime,this.config.maxBufferHole);return B.len*1e3},s.createPlaylistLoader=function(){var t=this.config.pLoader,r=this.applyPlaylistData,A=t||this.config.loader;return function(){function B(_){this.loader=void 0,this.loader=new A(_)}var w=B.prototype;return w.destroy=function(){this.loader.destroy()},w.abort=function(){this.loader.abort()},w.load=function(x,m,c){r(x),this.loader.load(x,m,c)},U(B,[{key:"stats",get:function(){return this.loader.stats}},{key:"context",get:function(){return this.loader.context}}]),B}()},s.createFragmentLoader=function(){var t=this.config.fLoader,r=this.applyFragmentData,A=t||this.config.loader;return function(){function B(_){this.loader=void 0,this.loader=new A(_)}var w=B.prototype;return w.destroy=function(){this.loader.destroy()},w.abort=function(){this.loader.abort()},w.load=function(x,m,c){r(x),this.loader.load(x,m,c)},U(B,[{key:"stats",get:function(){return this.loader.stats}},{key:"context",get:function(){return this.loader.context}}]),B}()},n.uuid=function(){var t=URL.createObjectURL(new Blob),r=t.toString();return URL.revokeObjectURL(t),r.substr(r.lastIndexOf("/")+1)},n.serialize=function(t){for(var r=[],A=function(L){return!Number.isNaN(L)&&L!=null&&L!==""&&L!==!1},B=function(L){return Math.round(L)},w=function(L){return B(L/100)*100},_=function(L){return encodeURIComponent(L)},x={br:B,d:B,bl:w,dl:w,mtp:w,nor:_,rtp:w,tb:B},m=Object.keys(t||{}).sort(),c=I(m),e;!(e=c()).done;){var o=e.value,l=t[o];if(!A(l))continue;if(o==="v"&&l===1)continue;if(o=="pr"&&l===1)continue;var y=x[o];y&&(l=y(l));var p=typeof l,f=void 0;o==="ot"||o==="sf"||o==="st"?f=o+"="+l:p==="boolean"?f=o:p==="number"?f=o+"="+l:f=o+"="+JSON.stringify(l),r.push(f)}return r.join(",")},n.toHeaders=function(t){for(var r=Object.keys(t),A={},B=["Object","Request","Session","Status"],w=[{},{},{},{}],_={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,m=r;x<m.length;x++){var c=m[x],e=_[c]!=null?_[c]:1;w[e][c]=t[c]}for(var o=0;o<w.length;o++){var l=n.serialize(w[o]);l&&(A["CMCD-"+B[o]]=l)}return A},n.toQuery=function(t){return"CMCD="+encodeURIComponent(n.serialize(t))},n.appendQueryToUri=function(t,r){if(!r)return t;var A=t.includes("?")?"&":"?";return""+t+A+r},n}()},"./src/controller/eme-controller.ts":function(ve,X,O){"use strict";O.r(X);var G=O("./src/events.ts"),D=O("./src/errors.ts"),S=O("./src/utils/logger.ts"),z=O("./src/utils/mediakeys-helper.ts");function F(a,n){for(var s=0;s<n.length;s++){var i=n[s];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(a,i.key,i)}}function U(a,n,s){return n&&F(a.prototype,n),s&&F(a,s),a}var I=3,v=function(n,s,i){var t={audioCapabilities:[],videoCapabilities:[]};return n.forEach(function(r){t.audioCapabilities.push({contentType:'audio/mp4; codecs="'+r+'"',robustness:i.audioRobustness||""})}),s.forEach(function(r){t.videoCapabilities.push({contentType:'video/mp4; codecs="'+r+'"',robustness:i.videoRobustness||""})}),[t]},b=function(n,s,i,t){switch(n){case z.KeySystems.WIDEVINE:return v(s,i,t);default:throw new Error("Unknown key-system: "+n)}},u=function(){function a(s){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=s,this._config=s.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 n=a.prototype;return n.destroy=function(){this._unregisterListeners(),this.hls=this._onMediaEncrypted=null,this._requestMediaKeySystemAccess=null},n._registerListeners=function(){this.hls.on(G.Events.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.on(G.Events.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.on(G.Events.MANIFEST_PARSED,this.onManifestParsed,this)},n._unregisterListeners=function(){this.hls.off(G.Events.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.off(G.Events.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.off(G.Events.MANIFEST_PARSED,this.onManifestParsed,this)},n.getLicenseServerUrl=function(i){switch(i){case z.KeySystems.WIDEVINE:if(!this._widevineLicenseUrl)break;return this._widevineLicenseUrl}throw new Error('no license server URL configured for key-system "'+i+'"')},n._attemptKeySystemAccess=function(i,t,r){var A=this,B=b(i,t,r,this._drmSystemOptions);S.logger.log("Requesting encrypted media key-system access");var w=this.requestMediaKeySystemAccess(i,B);this.mediaKeysPromise=w.then(function(_){return A._onMediaKeySystemAccessObtained(i,_)}),w.catch(function(_){S.logger.error('Failed to obtain key-system "'+i+'" access:',_)})},n._onMediaKeySystemAccessObtained=function(i,t){var r=this;S.logger.log('Access for key-system "'+i+'" obtained');var A={mediaKeysSessionInitialized:!1,mediaKeySystemAccess:t,mediaKeySystemDomain:i};this._mediaKeysList.push(A);var B=Promise.resolve().then(function(){return t.createMediaKeys()}).then(function(w){return A.mediaKeys=w,S.logger.log('Media-keys created for key-system "'+i+'"'),r._onMediaKeysCreated(),w});return B.catch(function(w){S.logger.error("Failed to create media-keys:",w)}),B},n._onMediaKeysCreated=function(){var i=this;this._mediaKeysList.forEach(function(t){t.mediaKeysSession||(t.mediaKeysSession=t.mediaKeys.createSession(),i._onNewMediaKeySession(t.mediaKeysSession))})},n._onNewMediaKeySession=function(i){var t=this;S.logger.log("New key-system session "+i.sessionId),i.addEventListener("message",function(r){t._onKeySessionMessage(i,r.message)},!1)},n._onKeySessionMessage=function(i,t){S.logger.log("Got EME message event, creating license request"),this._requestLicense(t,function(r){S.logger.log("Received license data (length: "+(r&&r.byteLength)+"), updating key-session"),i.update(r)})},n.onMediaEncrypted=function(i){var t=this;if(S.logger.log('Media is encrypted using "'+i.initDataType+'" init data type'),!this.mediaKeysPromise){S.logger.error("Fatal: Media is encrypted but no CDM access or no keys have been requested"),this.hls.trigger(G.Events.ERROR,{type:D.ErrorTypes.KEY_SYSTEM_ERROR,details:D.ErrorDetails.KEY_SYSTEM_NO_KEYS,fatal:!0});return}var r=function(B){if(!t._media)return;t._attemptSetMediaKeys(B),t._generateRequestWithPreferredKeySession(i.initDataType,i.initData)};this.mediaKeysPromise.then(r).catch(r)},n._attemptSetMediaKeys=function(i){if(!this._media)throw new Error("Attempted to set mediaKeys without first attaching a media element");if(!this._hasSetMediaKeys){var t=this._mediaKeysList[0];if(!t||!t.mediaKeys){S.logger.error("Fatal: Media is encrypted but no CDM access or no keys have been obtained yet"),this.hls.trigger(G.Events.ERROR,{type:D.ErrorTypes.KEY_SYSTEM_ERROR,details:D.ErrorDetails.KEY_SYSTEM_NO_KEYS,fatal:!0});return}S.logger.log("Setting keys for encrypted media"),this._media.setMediaKeys(t.mediaKeys),this._hasSetMediaKeys=!0}},n._generateRequestWithPreferredKeySession=function(i,t){var r=this,A=this._mediaKeysList[0];if(!A){S.logger.error("Fatal: Media is encrypted but not any key-system access has been obtained yet"),this.hls.trigger(G.Events.ERROR,{type:D.ErrorTypes.KEY_SYSTEM_ERROR,details:D.ErrorDetails.KEY_SYSTEM_NO_ACCESS,fatal:!0});return}if(A.mediaKeysSessionInitialized){S.logger.warn("Key-Session already initialized but requested again");return}var B=A.mediaKeysSession;if(!B){S.logger.error("Fatal: Media is encrypted but no key-session existing"),this.hls.trigger(G.Events.ERROR,{type:D.ErrorTypes.KEY_SYSTEM_ERROR,details:D.ErrorDetails.KEY_SYSTEM_NO_SESSION,fatal:!0});return}if(!t){S.logger.warn("Fatal: initData required for generating a key session is null"),this.hls.trigger(G.Events.ERROR,{type:D.ErrorTypes.KEY_SYSTEM_ERROR,details:D.ErrorDetails.KEY_SYSTEM_NO_INIT_DATA,fatal:!0});return}S.logger.log('Generating key-session request for "'+i+'" init data type'),A.mediaKeysSessionInitialized=!0,B.generateRequest(i,t).then(function(){S.logger.debug("Key-session generation succeeded")}).catch(function(w){S.logger.error("Error generating key-session request:",w),r.hls.trigger(G.Events.ERROR,{type:D.ErrorTypes.KEY_SYSTEM_ERROR,details:D.ErrorDetails.KEY_SYSTEM_NO_SESSION,fatal:!1})})},n._createLicenseXhr=function(i,t,r){var A=new XMLHttpRequest;A.responseType="arraybuffer",A.onreadystatechange=this._onLicenseRequestReadyStageChange.bind(this,A,i,t,r);var B=this._licenseXhrSetup;if(B)try{B.call(this.hls,A,i),B=void 0}catch(w){S.logger.error(w)}try{A.readyState||A.open("POST",i,!0),B&&B.call(this.hls,A,i)}catch(w){throw new Error("issue setting up KeySystem license XHR "+w)}return A},n._onLicenseRequestReadyStageChange=function(i,t,r,A){switch(i.readyState){case 4:if(i.status===200){this._requestLicenseFailureCount=0,S.logger.log("License request succeeded");var B=i.response,w=this._licenseResponseCallback;if(w)try{B=w.call(this.hls,i,t)}catch(x){S.logger.error(x)}A(B)}else{if(S.logger.error("License Request XHR failed ("+t+"). Status: "+i.status+" ("+i.statusText+")"),this._requestLicenseFailureCount++,this._requestLicenseFailureCount>I){this.hls.trigger(G.Events.ERROR,{type:D.ErrorTypes.KEY_SYSTEM_ERROR,details:D.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0});return}var _=I-this._requestLicenseFailureCount+1;S.logger.warn("Retrying license request, "+_+" attempts left"),this._requestLicense(r,A)}break}},n._generateLicenseRequestChallenge=function(i,t){switch(i.mediaKeySystemDomain){case z.KeySystems.WIDEVINE:return t}throw new Error("unsupported key-system: "+i.mediaKeySystemDomain)},n._requestLicense=function(i,t){S.logger.log("Requesting content license for key-system");var r=this._mediaKeysList[0];if(!r){S.logger.error("Fatal error: Media is encrypted but no key-system access has been obtained yet"),this.hls.trigger(G.Events.ERROR,{type:D.ErrorTypes.KEY_SYSTEM_ERROR,details:D.ErrorDetails.KEY_SYSTEM_NO_ACCESS,fatal:!0});return}try{var A=this.getLicenseServerUrl(r.mediaKeySystemDomain),B=this._createLicenseXhr(A,i,t);S.logger.log("Sending license request to URL: "+A);var w=this._generateLicenseRequestChallenge(r,i);B.send(w)}catch(_){S.logger.error("Failure requesting DRM license: "+_),this.hls.trigger(G.Events.ERROR,{type:D.ErrorTypes.KEY_SYSTEM_ERROR,details:D.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0})}},n.onMediaAttached=function(i,t){if(!this._emeEnabled)return;var r=t.media;this._media=r,r.addEventListener("encrypted",this._onMediaEncrypted)},n.onMediaDetached=function(){var i=this._media,t=this._mediaKeysList;if(!i)return;i.removeEventListener("encrypted",this._onMediaEncrypted),this._media=null,this._mediaKeysList=[],Promise.all(t.map(function(r){if(r.mediaKeysSession)return r.mediaKeysSession.close().catch(function(){})})).then(function(){return i.setMediaKeys(null)}).catch(function(){})},n.onManifestParsed=function(i,t){if(!this._emeEnabled)return;var r=t.levels.map(function(B){return B.audioCodec}).filter(function(B){return!!B}),A=t.levels.map(function(B){return B.videoCodec}).filter(function(B){return!!B});this._attemptKeySystemAccess(z.KeySystems.WIDEVINE,r,A)},U(a,[{key:"requestMediaKeySystemAccess",get:function(){if(!this._requestMediaKeySystemAccess)throw new Error("No requestMediaKeySystemAccess function configured");return this._requestMediaKeySystemAccess}}]),a}();X.default=u},"./src/controller/fps-controller.ts":function(ve,X,O){"use strict";O.r(X);var G=O("./src/events.ts"),D=O("./src/utils/logger.ts"),S=function(){function z(U){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=U,this.registerListeners()}var F=z.prototype;return F.setStreamController=function(I){this.streamController=I},F.registerListeners=function(){this.hls.on(G.Events.MEDIA_ATTACHING,this.onMediaAttaching,this)},F.unregisterListeners=function(){this.hls.off(G.Events.MEDIA_ATTACHING,this.onMediaAttaching)},F.destroy=function(){this.timer&&clearInterval(this.timer),this.unregisterListeners(),this.isVideoPlaybackQualityAvailable=!1,this.media=null},F.onMediaAttaching=function(I,v){var b=this.hls.config;if(b.capLevelOnFPSDrop){var u=v.media instanceof self.HTMLVideoElement?v.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),b.fpsDroppedMonitoringPeriod)}},F.checkFPS=function(I,v,b){var u=performance.now();if(v){if(this.lastTime){var a=u-this.lastTime,n=b-this.lastDroppedFrames,s=v-this.lastDecodedFrames,i=1e3*n/a,t=this.hls;if(t.trigger(G.Events.FPS_DROP,{currentDropped:n,currentDecoded:s,totalDroppedFrames:b}),i>0&&n>t.config.fpsDroppedMonitoringThreshold*s){var r=t.currentLevel;D.logger.warn("drop FPS ratio greater than max allowed value for currentLevel: "+r),r>0&&(t.autoLevelCapping===-1||t.autoLevelCapping>=r)&&(r=r-1,t.trigger(G.Events.FPS_DROP_LEVEL_CAPPING,{level:r,droppedLevel:t.currentLevel}),t.autoLevelCapping=r,this.streamController.nextLevelSwitch())}}this.lastTime=u,this.lastDroppedFrames=b,this.lastDecodedFrames=v}},F.checkFPSInterval=function(){var I=this.media;if(I)if(this.isVideoPlaybackQualityAvailable){var v=I.getVideoPlaybackQuality();this.checkFPS(I,v.totalVideoFrames,v.droppedVideoFrames)}else this.checkFPS(I,I.webkitDecodedFrameCount,I.webkitDroppedFrameCount)},z}();X.default=S},"./src/controller/fragment-finders.ts":function(ve,X,O){"use strict";O.r(X),O.d(X,"findFragmentByPDT",function(){return S}),O.d(X,"findFragmentByPTS",function(){return z}),O.d(X,"fragmentWithinToleranceTest",function(){return F}),O.d(X,"pdtWithinToleranceTest",function(){return U}),O.d(X,"findFragWithCC",function(){return I});var G=O("./src/polyfills/number.ts"),D=O("./src/utils/binary-search.ts");function S(v,b,u){if(b===null||!Array.isArray(v)||!v.length||!Object(G.isFiniteNumber)(b))return null;var a=v[0].programDateTime;if(b<(a||0))return null;var n=v[v.length-1].endProgramDateTime;if(b>=(n||0))return null;u=u||0;for(var s=0;s<v.length;++s){var i=v[s];if(U(b,u,i))return i}return null}function z(v,b,u,a){u===void 0&&(u=0),a===void 0&&(a=0);var n=null;if(v?n=b[v.sn-b[0].sn+1]||null:u===0&&b[0].start===0&&(n=b[0]),n&&F(u,a,n)===0)return n;var s=D.default.search(b,F.bind(null,u,a));return s||n}function F(v,b,u){v===void 0&&(v=0),b===void 0&&(b=0);var a=Math.min(b,u.duration+(u.deltaPTS?u.deltaPTS:0));return u.start+u.duration-a<=v?1:u.start-a>v&&u.start?-1:0}function U(v,b,u){var a=Math.min(b,u.duration+(u.deltaPTS?u.deltaPTS:0))*1e3,n=u.endProgramDateTime||0;return n-a>v}function I(v,b){return D.default.search(v,function(u){return u.cc<b?1:u.cc>b?-1:0})}},"./src/controller/fragment-tracker.ts":function(ve,X,O){"use strict";O.r(X),O.d(X,"FragmentState",function(){return S}),O.d(X,"FragmentTracker",function(){return z});var G=O("./src/events.ts"),D=O("./src/types/loader.ts"),S;(function(I){I.NOT_LOADED="NOT_LOADED",I.BACKTRACKED="BACKTRACKED",I.APPENDING="APPENDING",I.PARTIAL="PARTIAL",I.OK="OK"})(S||(S={}));var z=function(){function I(b){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=b,this._registerListeners()}var v=I.prototype;return v._registerListeners=function(){var u=this.hls;u.on(G.Events.BUFFER_APPENDED,this.onBufferAppended,this),u.on(G.Events.FRAG_BUFFERED,this.onFragBuffered,this),u.on(G.Events.FRAG_LOADED,this.onFragLoaded,this)},v._unregisterListeners=function(){var u=this.hls;u.off(G.Events.BUFFER_APPENDED,this.onBufferAppended,this),u.off(G.Events.FRAG_BUFFERED,this.onFragBuffered,this),u.off(G.Events.FRAG_LOADED,this.onFragLoaded,this)},v.destroy=function(){this._unregisterListeners(),this.fragments=this.timeRanges=null},v.getAppendedFrag=function(u,a){if(a===D.PlaylistLevelType.MAIN){var n=this.activeFragment,s=this.activeParts;if(!n)return null;if(s)for(var i=s.length;i--;){var t=s[i],r=t?t.end:n.appendedPTS;if(t.start<=u&&r!==void 0&&u<=r)return i>9&&(this.activeParts=s.slice(i-9)),t}else if(n.start<=u&&n.appendedPTS!==void 0&&u<=n.appendedPTS)return n}return this.getBufferedFrag(u,a)},v.getBufferedFrag=function(u,a){for(var n=this.fragments,s=Object.keys(n),i=s.length;i--;){var t=n[s[i]];if((t==null?void 0:t.body.type)===a&&t.buffered){var r=t.body;if(r.start<=u&&u<=r.end)return r}}return null},v.detectEvictedFragments=function(u,a,n){var s=this;Object.keys(this.fragments).forEach(function(i){var t=s.fragments[i];if(!t)return;if(!t.buffered){t.body.type===n&&s.removeFragment(t.body);return}var r=t.range[u];if(!r)return;r.time.some(function(A){var B=!s.isTimeBuffered(A.startPTS,A.endPTS,a);return B&&s.removeFragment(t.body),B})})},v.detectPartialFragments=function(u){var a=this,n=this.timeRanges,s=u.frag,i=u.part;if(!n||s.sn==="initSegment")return;var t=U(s),r=this.fragments[t];if(!r)return;Object.keys(n).forEach(function(A){var B=s.elementaryStreams[A];if(!B)return;var w=n[A],_=i!==null||B.partial===!0;r.range[A]=a.getBufferedTimes(s,i,_,w)}),r.backtrack=r.loaded=null,Object.keys(r.range).length?r.buffered=!0:this.removeFragment(r.body)},v.fragBuffered=function(u){var a=U(u),n=this.fragments[a];n&&(n.backtrack=n.loaded=null,n.buffered=!0)},v.getBufferedTimes=function(u,a,n,s){for(var i={time:[],partial:n},t=a?a.start:u.start,r=a?a.end:u.end,A=u.minEndPTS||r,B=u.maxStartPTS||t,w=0;w<s.length;w++){var _=s.start(w)-this.bufferPadding,x=s.end(w)+this.bufferPadding;if(B>=_&&A<=x){i.time.push({startPTS:Math.max(t,s.start(w)),endPTS:Math.min(r,s.end(w))});break}else if(t<x&&r>_)i.partial=!0,i.time.push({startPTS:Math.max(t,s.start(w)),endPTS:Math.min(r,s.end(w))});else if(r<=_)break}return i},v.getPartialFragment=function(u){var a=null,n,s,i,t=0,r=this.bufferPadding,A=this.fragments;return Object.keys(A).forEach(function(B){var w=A[B];if(!w)return;F(w)&&(s=w.body.start-r,i=w.body.end+r,u>=s&&u<=i&&(n=Math.min(u-s,i-u),t<=n&&(a=w.body,t=n)))}),a},v.getState=function(u){var a=U(u),n=this.fragments[a];return n?n.buffered?F(n)?S.PARTIAL:S.OK:n.backtrack?S.BACKTRACKED:S.APPENDING:S.NOT_LOADED},v.backtrack=function(u,a){var n=U(u),s=this.fragments[n];if(!s||s.backtrack)return null;var i=s.backtrack=a||s.loaded;return s.loaded=null,i},v.getBacktrackData=function(u){var a=U(u),n=this.fragments[a];if(n){var s,i=n.backtrack;if(i!=null&&(s=i.payload)!==null&&s!==void 0&&s.byteLength)return i;this.removeFragment(u)}return null},v.isTimeBuffered=function(u,a,n){for(var s,i,t=0;t<n.length;t++){if(s=n.start(t)-this.bufferPadding,i=n.end(t)+this.bufferPadding,u>=s&&a<=i)return!0;if(a<=s)return!1}return!1},v.onFragLoaded=function(u,a){var n=a.frag,s=a.part;if(n.sn==="initSegment"||n.bitrateTest||s)return;var i=U(n);this.fragments[i]={body:n,loaded:a,backtrack:null,buffered:!1,range:Object.create(null)}},v.onBufferAppended=function(u,a){var n=this,s=a.frag,i=a.part,t=a.timeRanges;if(s.type===D.PlaylistLevelType.MAIN)if(this.activeFragment=s,i){var r=this.activeParts;r||(this.activeParts=r=[]),r.push(i)}else this.activeParts=null;this.timeRanges=t,Object.keys(t).forEach(function(A){var B=t[A];if(n.detectEvictedFragments(A,B),!i)for(var w=0;w<B.length;w++)s.appendedPTS=Math.max(B.end(w),s.appendedPTS||0)})},v.onFragBuffered=function(u,a){this.detectPartialFragments(a)},v.hasFragment=function(u){var a=U(u);return!!this.fragments[a]},v.removeFragmentsInRange=function(u,a,n){var s=this;Object.keys(this.fragments).forEach(function(i){var t=s.fragments[i];if(!t)return;if(t.buffered){var r=t.body;r.type===n&&r.start<a&&r.end>u&&s.removeFragment(r)}})},v.removeFragment=function(u){var a=U(u);u.stats.loaded=0,u.clearElementaryStreamInfo(),delete this.fragments[a]},v.removeAllFragments=function(){this.fragments=Object.create(null),this.activeFragment=null,this.activeParts=null},I}();function F(I){var v,b;return I.buffered&&(((v=I.range.video)===null||v===void 0?void 0:v.partial)||((b=I.range.audio)===null||b===void 0?void 0:b.partial))}function U(I){return I.type+"_"+I.level+"_"+I.urlId+"_"+I.sn}},"./src/controller/gap-controller.ts":function(ve,X,O){"use strict";O.r(X),O.d(X,"STALL_MINIMUM_DURATION_MS",function(){return F}),O.d(X,"MAX_START_GAP_JUMP",function(){return U}),O.d(X,"SKIP_BUFFER_HOLE_STEP_SECONDS",function(){return I}),O.d(X,"SKIP_BUFFER_RANGE_START",function(){return v}),O.d(X,"default",function(){return b});var G=O("./src/utils/buffer-helper.ts"),D=O("./src/errors.ts"),S=O("./src/events.ts"),z=O("./src/utils/logger.ts"),F=250,U=2,I=.1,v=.05,b=function(){function u(n,s,i,t){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=n,this.media=s,this.fragmentTracker=i,this.hls=t}var a=u.prototype;return a.destroy=function(){this.hls=this.fragmentTracker=this.media=null},a.poll=function(s){var i=this.config,t=this.media,r=this.stalled,A=t.currentTime,B=t.seeking,w=this.seeking&&!B,_=!this.seeking&&B;if(this.seeking=B,A!==s){if(this.moved=!0,r!==null){if(this.stallReported){var x=self.performance.now()-r;z.logger.warn("playback not stuck anymore @"+A+", after "+Math.round(x)+"ms"),this.stallReported=!1}this.stalled=null,this.nudgeRetry=0}return}if((_||w)&&(this.stalled=null),t.paused||t.ended||t.playbackRate===0||!G.BufferHelper.getBuffered(t).length)return;var m=G.BufferHelper.bufferInfo(t,A,0),c=m.len>0,e=m.nextStart||0;if(!c&&!e)return;if(B){var o=m.len>U,l=!e||e-A>U&&!this.fragmentTracker.getPartialFragment(A);if(o||l)return;this.moved=!1}if(!this.moved&&this.stalled!==null){var y,p=Math.max(e,m.start||0)-A,f=this.hls.levels?this.hls.levels[this.hls.currentLevel]:null,R=f==null||((y=f.details)===null||y===void 0)?void 0:y.live,L=R?f.details.targetduration*2:U;if(p>0&&p<=L){this._trySkipBufferHole(null);return}}var H=self.performance.now();if(r===null){this.stalled=H;return}var j=H-r;!B&&j>=F&&this._reportStall(m.len);var J=G.BufferHelper.bufferInfo(t,A,i.maxBufferHole);this._tryFixBufferStall(J,j)},a._tryFixBufferStall=function(s,i){var t=this.config,r=this.fragmentTracker,A=this.media,B=A.currentTime,w=r.getPartialFragment(B);if(w){var _=this._trySkipBufferHole(w);if(_)return}s.len>t.maxBufferHole&&i>t.highBufferWatchdogPeriod*1e3&&(z.logger.warn("Trying to nudge playhead over buffer-hole"),this.stalled=null,this._tryNudgeBuffer())},a._reportStall=function(s){var i=this.hls,t=this.media,r=this.stallReported;r||(this.stallReported=!0,z.logger.warn("Playback stalling at @"+t.currentTime+" due to low buffer (buffer="+s+")"),i.trigger(S.Events.ERROR,{type:D.ErrorTypes.MEDIA_ERROR,details:D.ErrorDetails.BUFFER_STALLED_ERROR,fatal:!1,buffer:s}))},a._trySkipBufferHole=function(s){for(var i=this.config,t=this.hls,r=this.media,A=r.currentTime,B=0,w=G.BufferHelper.getBuffered(r),_=0;_<w.length;_++){var x=w.start(_);if(A+i.maxBufferHole>=B&&A<x){var m=Math.max(x+v,r.currentTime+I);return z.logger.warn("skipping hole, adjusting currentTime from "+A+" to "+m),this.moved=!0,this.stalled=null,r.currentTime=m,s&&t.trigger(S.Events.ERROR,{type:D.ErrorTypes.MEDIA_ERROR,details:D.ErrorDetails.BUFFER_SEEK_OVER_HOLE,fatal:!1,reason:"fragment loaded with buffer holes, seeking from "+A+" to "+m,frag:s}),m}B=w.end(_)}return 0},a._tryNudgeBuffer=function(){var s=this.config,i=this.hls,t=this.media,r=t.currentTime,A=(this.nudgeRetry||0)+1;if(this.nudgeRetry=A,A<s.nudgeMaxRetry){var B=r+A*s.nudgeOffset;z.logger.warn("Nudging 'currentTime' from "+r+" to "+B),t.currentTime=B,i.trigger(S.Events.ERROR,{type:D.ErrorTypes.MEDIA_ERROR,details:D.ErrorDetails.BUFFER_NUDGE_ON_STALL,fatal:!1})}else z.logger.error("Playhead still not moving while enough data buffered @"+r+" after "+s.nudgeMaxRetry+" nudges"),i.trigger(S.Events.ERROR,{type:D.ErrorTypes.MEDIA_ERROR,details:D.ErrorDetails.BUFFER_STALLED_ERROR,fatal:!0})},u}()},"./src/controller/id3-track-controller.ts":function(ve,X,O){"use strict";O.r(X);var G=O("./src/events.ts"),D=O("./src/utils/texttrack-utils.ts"),S=O("./src/demux/id3.ts"),z=.25,F=function(){function U(v){this.hls=void 0,this.id3Track=null,this.media=null,this.hls=v,this._registerListeners()}var I=U.prototype;return I.destroy=function(){this._unregisterListeners()},I._registerListeners=function(){var b=this.hls;b.on(G.Events.MEDIA_ATTACHED,this.onMediaAttached,this),b.on(G.Events.MEDIA_DETACHING,this.onMediaDetaching,this),b.on(G.Events.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),b.on(G.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},I._unregisterListeners=function(){var b=this.hls;b.off(G.Events.MEDIA_ATTACHED,this.onMediaAttached,this),b.off(G.Events.MEDIA_DETACHING,this.onMediaDetaching,this),b.off(G.Events.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),b.off(G.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},I.onMediaAttached=function(b,u){this.media=u.media},I.onMediaDetaching=function(){if(!this.id3Track)return;Object(D.clearCurrentCues)(this.id3Track),this.id3Track=null,this.media=null},I.getID3Track=function(b){if(!this.media)return;for(var u=0;u<b.length;u++){var a=b[u];if(a.kind==="metadata"&&a.label==="id3")return Object(D.sendAddTrackEvent)(a,this.media),a}return this.media.addTextTrack("metadata","id3")},I.onFragParsingMetadata=function(b,u){if(!this.media)return;var a=u.frag,n=u.samples;this.id3Track||(this.id3Track=this.getID3Track(this.media.textTracks),this.id3Track.mode="hidden");for(var s=self.WebKitDataCue||self.VTTCue||self.TextTrackCue,i=0;i<n.length;i++){var t=S.getID3Frames(n[i].data);if(t){var r=n[i].pts,A=i<n.length-1?n[i+1].pts:a.end,B=A-r;B<=0&&(A=r+z);for(var w=0;w<t.length;w++){var _=t[w];if(!S.isTimeStampFrame(_)){var x=new s(r,A,"");x.value=_,this.id3Track.addCue(x)}}}}},I.onBufferFlushing=function(b,u){var a=u.startOffset,n=u.endOffset,s=u.type;if(!s||s==="audio"){var i=this.id3Track;i&&Object(D.removeCuesInRange)(i,a,n)}},U}();X.default=F},"./src/controller/latency-controller.ts":function(ve,X,O){"use strict";O.r(X),O.d(X,"default",function(){return U});var G=O("./src/errors.ts"),D=O("./src/events.ts"),S=O("./src/utils/logger.ts");function z(I,v){for(var b=0;b<v.length;b++){var u=v[b];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(I,u.key,u)}}function F(I,v,b){return v&&z(I.prototype,v),b&&z(I,b),I}var U=function(){function I(b){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=b,this.config=b.config,this.registerListeners()}var v=I.prototype;return v.destroy=function(){this.unregisterListeners(),this.onMediaDetaching(),this.levelDetails=null,this.hls=this.timeupdateHandler=null},v.registerListeners=function(){this.hls.on(D.Events.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.on(D.Events.MEDIA_DETACHING,this.onMediaDetaching,this),this.hls.on(D.Events.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.on(D.Events.LEVEL_UPDATED,this.onLevelUpdated,this),this.hls.on(D.Events.ERROR,this.onError,this)},v.unregisterListeners=function(){this.hls.off(D.Events.MEDIA_ATTACHED,this.onMediaAttached),this.hls.off(D.Events.MEDIA_DETACHING,this.onMediaDetaching),this.hls.off(D.Events.MANIFEST_LOADING,this.onManifestLoading),this.hls.off(D.Events.LEVEL_UPDATED,this.onLevelUpdated),this.hls.off(D.Events.ERROR,this.onError)},v.onMediaAttached=function(u,a){this.media=a.media,this.media.addEventListener("timeupdate",this.timeupdateHandler)},v.onMediaDetaching=function(){this.media&&(this.media.removeEventListener("timeupdate",this.timeupdateHandler),this.media=null)},v.onManifestLoading=function(){this.levelDetails=null,this._latency=null,this.stallCount=0},v.onLevelUpdated=function(u,a){var n=a.details;this.levelDetails=n,n.advanced&&this.timeupdate(),!n.live&&this.media&&this.media.removeEventListener("timeupdate",this.timeupdateHandler)},v.onError=function(u,a){if(a.details!==G.ErrorDetails.BUFFER_STALLED_ERROR)return;this.stallCount++,S.logger.warn("[playback-rate-controller]: Stall detected, adjusting target latency")},v.timeupdate=function(){var u=this.media,a=this.levelDetails;if(!u||!a)return;this.currentTime=u.currentTime;var n=this.computeLatency();if(n===null)return;this._latency=n;var s=this.config,i=s.lowLatencyMode,t=s.maxLiveSyncPlaybackRate;if(!i||t===1)return;var r=this.targetLatency;if(r===null)return;var A=n-r,B=Math.min(this.maxLatency,r+a.targetduration),w=A<B;if(a.live&&w&&A>.05&&this.forwardBufferLength>1){var _=Math.min(2,Math.max(1,t)),x=Math.round(2/(1+Math.exp(-.75*A-this.edgeStalled))*20)/20;u.playbackRate=Math.min(_,Math.max(1,x))}else u.playbackRate!==1&&u.playbackRate!==0&&(u.playbackRate=1)},v.estimateLiveEdge=function(){var u=this.levelDetails;return u===null?null:u.edge+u.age},v.computeLatency=function(){var u=this.estimateLiveEdge();return u===null?null:u-this.currentTime},F(I,[{key:"latency",get:function(){return this._latency||0}},{key:"maxLatency",get:function(){var u=this.config,a=this.levelDetails;return u.liveMaxLatencyDuration!==void 0?u.liveMaxLatencyDuration:a?u.liveMaxLatencyDurationCount*a.targetduration:0}},{key:"targetLatency",get:function(){var u=this.levelDetails;if(u===null)return null;var a=u.holdBack,n=u.partHoldBack,s=u.targetduration,i=this.config,t=i.liveSyncDuration,r=i.liveSyncDurationCount,A=i.lowLatencyMode,B=this.hls.userConfig,w=A&&n||a;(B.liveSyncDuration||B.liveSyncDurationCount||w===0)&&(w=t!==void 0?t:r*s);var _=s,x=1;return w+Math.min(this.stallCount*x,_)}},{key:"liveSyncPosition",get:function(){var u=this.estimateLiveEdge(),a=this.targetLatency,n=this.levelDetails;if(u===null||a===null||n===null)return null;var s=n.edge,i=u-a-this.edgeStalled,t=s-n.totalduration,r=s-(this.config.lowLatencyMode&&n.partTarget||n.targetduration);return Math.min(Math.max(t,i),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 a=(this.config.lowLatencyMode&&u.partTarget||u.targetduration)*3;return Math.max(u.age-a,0)}},{key:"forwardBufferLength",get:function(){var u=this.media,a=this.levelDetails;if(!u||!a)return 0;var n=u.buffered.length;return n?u.buffered.end(n-1):a.edge-this.currentTime}}]),I}()},"./src/controller/level-controller.ts":function(ve,X,O){"use strict";O.r(X),O.d(X,"default",function(){return i});var G=O("./src/types/level.ts"),D=O("./src/events.ts"),S=O("./src/errors.ts"),z=O("./src/utils/codecs.ts"),F=O("./src/controller/level-helper.ts"),U=O("./src/controller/base-playlist-controller.ts"),I=O("./src/types/loader.ts");function v(){return v=Object.assign||function(t){for(var r=1;r<arguments.length;r++){var A=arguments[r];for(var B in A)Object.prototype.hasOwnProperty.call(A,B)&&(t[B]=A[B])}return t},v.apply(this,arguments)}function b(t,r){for(var A=0;A<r.length;A++){var B=r[A];B.enumerable=B.enumerable||!1,B.configurable=!0,"value"in B&&(B.writable=!0),Object.defineProperty(t,B.key,B)}}function u(t,r,A){return r&&b(t.prototype,r),A&&b(t,A),t}function a(t,r){t.prototype=Object.create(r.prototype),t.prototype.constructor=t,n(t,r)}function n(t,r){return n=Object.setPrototypeOf||function(B,w){return B.__proto__=w,B},n(t,r)}var s=/chrome|firefox/.test(navigator.userAgent.toLowerCase()),i=function(t){a(r,t);function r(B){var w;return w=t.call(this,B,"[level-controller]")||this,w._levels=[],w._firstLevel=-1,w._startLevel=void 0,w.currentLevelIndex=-1,w.manualLevelIndex=-1,w.onParsedComplete=void 0,w._registerListeners(),w}var A=r.prototype;return A._registerListeners=function(){var w=this.hls;w.on(D.Events.MANIFEST_LOADED,this.onManifestLoaded,this),w.on(D.Events.LEVEL_LOADED,this.onLevelLoaded,this),w.on(D.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),w.on(D.Events.FRAG_LOADED,this.onFragLoaded,this),w.on(D.Events.ERROR,this.onError,this)},A._unregisterListeners=function(){var w=this.hls;w.off(D.Events.MANIFEST_LOADED,this.onManifestLoaded,this),w.off(D.Events.LEVEL_LOADED,this.onLevelLoaded,this),w.off(D.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),w.off(D.Events.FRAG_LOADED,this.onFragLoaded,this),w.off(D.Events.ERROR,this.onError,this)},A.destroy=function(){this._unregisterListeners(),this.manualLevelIndex=-1,this._levels.length=0,t.prototype.destroy.call(this)},A.startLoad=function(){var w=this._levels;w.forEach(function(_){_.loadError=0}),t.prototype.startLoad.call(this)},A.onManifestLoaded=function(w,_){var x=[],m=[],c=[],e,o={},l,y=!1,p=!1,f=!1;if(_.levels.forEach(function(j){var J=j.attrs;y=y||!!(j.width&&j.height),p=p||!!j.videoCodec,f=f||!!j.audioCodec,s&&j.audioCodec&&j.audioCodec.indexOf("mp4a.40.34")!==-1&&(j.audioCodec=void 0);var M=j.bitrate+"-"+j.attrs.RESOLUTION+"-"+j.attrs.CODECS;l=o[M],l?l.url.push(j.url):(l=new G.Level(j),o[M]=l,x.push(l)),J&&(J.AUDIO&&Object(F.addGroupId)(l,"audio",J.AUDIO),J.SUBTITLES&&Object(F.addGroupId)(l,"text",J.SUBTITLES))}),(y||p)&&f&&(x=x.filter(function(j){var J=j.videoCodec,M=j.width,Y=j.height;return!!J||!!(M&&Y)})),x=x.filter(function(j){var J=j.audioCodec,M=j.videoCodec;return(!J||Object(z.isCodecSupportedInMp4)(J,"audio"))&&(!M||Object(z.isCodecSupportedInMp4)(M,"video"))}),_.audioTracks&&(m=_.audioTracks.filter(function(j){return!j.audioCodec||Object(z.isCodecSupportedInMp4)(j.audioCodec,"audio")}),Object(F.assignTrackIdsByGroup)(m)),_.subtitles&&(c=_.subtitles,Object(F.assignTrackIdsByGroup)(c)),x.length>0){e=x[0].bitrate,x.sort(function(j,J){return j.bitrate-J.bitrate}),this._levels=x;for(var R=0;R<x.length;R++)if(x[R].bitrate===e){this._firstLevel=R,this.log("manifest loaded, "+x.length+" level(s) found, first bitrate: "+e);break}var L=f&&!p,H={levels:x,audioTracks:m,subtitleTracks:c,firstLevel:this._firstLevel,stats:_.stats,audio:f,video:p,altAudio:!L&&m.some(function(j){return!!j.url})};this.hls.trigger(D.Events.MANIFEST_PARSED,H),(this.hls.config.autoStartLoad||this.hls.forceStartLoad)&&this.hls.startLoad(this.hls.config.startPosition)}else this.hls.trigger(D.Events.ERROR,{type:S.ErrorTypes.MEDIA_ERROR,details:S.ErrorDetails.MANIFEST_INCOMPATIBLE_CODECS_ERROR,fatal:!0,url:_.url,reason:"no level with compatible codecs found in manifest"})},A.onError=function(w,_){if(t.prototype.onError.call(this,w,_),_.fatal)return;var x=_.context,m=this._levels[this.currentLevelIndex];if(x&&(x.type===I.PlaylistContextType.AUDIO_TRACK&&m.audioGroupIds&&x.groupId===m.audioGroupIds[m.urlId]||x.type===I.PlaylistContextType.SUBTITLE_TRACK&&m.textGroupIds&&x.groupId===m.textGroupIds[m.urlId])){this.redundantFailover(this.currentLevelIndex);return}var c=!1,e=!0,o;switch(_.details){case S.ErrorDetails.FRAG_LOAD_ERROR:case S.ErrorDetails.FRAG_LOAD_TIMEOUT:case S.ErrorDetails.KEY_LOAD_ERROR:case S.ErrorDetails.KEY_LOAD_TIMEOUT:if(_.frag){var l=this._levels[_.frag.level];l?(l.fragmentError++,l.fragmentError>this.hls.config.fragLoadingMaxRetry&&(o=_.frag.level)):o=_.frag.level}break;case S.ErrorDetails.LEVEL_LOAD_ERROR:case S.ErrorDetails.LEVEL_LOAD_TIMEOUT:x&&(x.deliveryDirectives&&(e=!1),o=x.level),c=!0;break;case S.ErrorDetails.REMUX_ALLOC_ERROR:o=_.level,c=!0;break}o!==void 0&&this.recoverLevel(_,o,c,e)},A.recoverLevel=function(w,_,x,m){var c=w.details,e=this._levels[_];if(e.loadError++,x){var o=this.retryLoadingOrFail(w);if(o)w.levelRetry=!0;else{this.currentLevelIndex=-1;return}}if(m){var l=e.url.length;if(l>1&&e.loadError<l)w.levelRetry=!0,this.redundantFailover(_);else if(this.manualLevelIndex===-1){var y=_===0?this._levels.length-1:_-1;this.currentLevelIndex!==y&&this._levels[y].loadError===0&&(this.warn(c+": switch to "+y),w.levelRetry=!0,this.hls.nextAutoLevel=y)}}},A.redundantFailover=function(w){var _=this._levels[w],x=_.url.length;if(x>1){var m=(_.urlId+1)%x;this.warn("Switching to redundant URL-id "+m),this._levels.forEach(function(c){c.urlId=m}),this.level=w}},A.onFragLoaded=function(w,_){var x=_.frag;if(x!==void 0&&x.type===I.PlaylistLevelType.MAIN){var m=this._levels[x.level];m!==void 0&&(m.fragmentError=0,m.loadError=0)}},A.onLevelLoaded=function(w,_){var x,m=_.level,c=_.details,e=this._levels[m];if(!e){var o;this.warn("Invalid level index "+m),(o=_.deliveryDirectives)!==null&&o!==void 0&&o.skip&&(c.deltaUpdateFailed=!0);return}m===this.currentLevelIndex?(e.fragmentError===0&&(e.loadError=0,this.retryCount=0),this.playlistLoaded(m,_,e.details)):(x=_.deliveryDirectives)!==null&&x!==void 0&&x.skip&&(c.deltaUpdateFailed=!0)},A.onAudioTrackSwitched=function(w,_){var x=this.hls.levels[this.currentLevelIndex];if(!x)return;if(x.audioGroupIds){for(var m=-1,c=this.hls.audioTracks[_.id].groupId,e=0;e<x.audioGroupIds.length;e++)if(x.audioGroupIds[e]===c){m=e;break}m!==x.urlId&&(x.urlId=m,this.startLoad())}},A.loadPlaylist=function(w){var _=this.currentLevelIndex,x=this._levels[_];if(this.canLoad&&x&&x.url.length>0){var m=x.urlId,c=x.url[m];if(w)try{c=w.addDirectives(c)}catch(e){this.warn("Could not construct new URL with HLS Delivery Directives: "+e)}this.log("Attempt loading level index "+_+(w?" at sn "+w.msn+" part "+w.part:"")+" with URL-id "+m+" "+c),this.clearTimer(),this.hls.trigger(D.Events.LEVEL_LOADING,{url:c,level:_,id:m,deliveryDirectives:w||null})}},A.removeLevel=function(w,_){var x=function(e,o){return o!==_},m=this._levels.filter(function(c,e){return e!==w?!0:c.url.length>1&&_!==void 0?(c.url=c.url.filter(x),c.audioGroupIds&&(c.audioGroupIds=c.audioGroupIds.filter(x)),c.textGroupIds&&(c.textGroupIds=c.textGroupIds.filter(x)),c.urlId=0,!0):!1}).map(function(c,e){var o=c.details;return o!=null&&o.fragments&&o.fragments.forEach(function(l){l.level=e}),c});this._levels=m,this.hls.trigger(D.Events.LEVELS_UPDATED,{levels:m})},u(r,[{key:"levels",get:function(){return this._levels.length===0?null:this._levels}},{key:"level",get:function(){return this.currentLevelIndex},set:function(w){var _,x=this._levels;if(x.length===0)return;if(this.currentLevelIndex===w&&(_=x[w])!==null&&_!==void 0&&_.details)return;if(w<0||w>=x.length){var m=w<0;if(this.hls.trigger(D.Events.ERROR,{type:S.ErrorTypes.OTHER_ERROR,details:S.ErrorDetails.LEVEL_SWITCH_ERROR,level:w,fatal:m,reason:"invalid level idx"}),m)return;w=Math.min(w,x.length-1)}this.clearTimer();var c=this.currentLevelIndex,e=x[c],o=x[w];this.log("switching to level "+w+" from "+c),this.currentLevelIndex=w;var l=v({},o,{level:w,maxBitrate:o.maxBitrate,uri:o.uri,urlId:o.urlId});delete l._urlId,this.hls.trigger(D.Events.LEVEL_SWITCHING,l);var y=o.details;if(!y||y.live){var p=this.switchParams(o.uri,e==null?void 0:e.details);this.loadPlaylist(p)}}},{key:"manualLevel",get:function(){return this.manualLevelIndex},set:function(w){this.manualLevelIndex=w,this._startLevel===void 0&&(this._startLevel=w),w!==-1&&(this.level=w)}},{key:"firstLevel",get:function(){return this._firstLevel},set:function(w){this._firstLevel=w}},{key:"startLevel",get:function(){if(this._startLevel===void 0){var w=this.hls.config.startLevel;return w!==void 0?w:this._firstLevel}else return this._startLevel},set:function(w){this._startLevel=w}},{key:"nextLoadLevel",get:function(){return this.manualLevelIndex!==-1?this.manualLevelIndex:this.hls.nextAutoLevel},set:function(w){this.level=w,this.manualLevelIndex===-1&&(this.hls.nextAutoLevel=w)}}]),r}(U.default)},"./src/controller/level-helper.ts":function(ve,X,O){"use strict";O.r(X),O.d(X,"addGroupId",function(){return S}),O.d(X,"assignTrackIdsByGroup",function(){return z}),O.d(X,"updatePTS",function(){return F}),O.d(X,"updateFragPTSDTS",function(){return I}),O.d(X,"mergeDetails",function(){return v}),O.d(X,"mapPartIntersection",function(){return b}),O.d(X,"mapFragmentIntersection",function(){return u}),O.d(X,"adjustSliding",function(){return a}),O.d(X,"addSliding",function(){return n}),O.d(X,"computeReloadInterval",function(){return s}),O.d(X,"getFragmentWithSN",function(){return i}),O.d(X,"getPartWith",function(){return t});var G=O("./src/polyfills/number.ts"),D=O("./src/utils/logger.ts");function S(r,A,B){switch(A){case"audio":r.audioGroupIds||(r.audioGroupIds=[]),r.audioGroupIds.push(B);break;case"text":r.textGroupIds||(r.textGroupIds=[]),r.textGroupIds.push(B);break}}function z(r){var A={};r.forEach(function(B){var w=B.groupId||"";B.id=A[w]=A[w]||0,A[w]++})}function F(r,A,B){var w=r[A],_=r[B];U(w,_)}function U(r,A){var B=A.startPTS;if(Object(G.isFiniteNumber)(B)){var w=0,_;A.sn>r.sn?(w=B-r.start,_=r):(w=r.start-B,_=A),_.duration!==w&&(_.duration=w)}else if(A.sn>r.sn){var x=r.cc===A.cc;x&&r.minEndPTS?A.start=r.start+(r.minEndPTS-r.start):A.start=r.start+r.duration}else A.start=Math.max(r.start-A.duration,0)}function I(r,A,B,w,_,x){var m=w-B;m<=0&&(D.logger.warn("Fragment should have a positive duration",A),w=B+A.duration,x=_+A.duration);var c=B,e=w,o=A.startPTS,l=A.endPTS;if(Object(G.isFiniteNumber)(o)){var y=Math.abs(o-B);Object(G.isFiniteNumber)(A.deltaPTS)?A.deltaPTS=Math.max(y,A.deltaPTS):A.deltaPTS=y,c=Math.max(B,o),B=Math.min(B,o),_=Math.min(_,A.startDTS),e=Math.min(w,l),w=Math.max(w,l),x=Math.max(x,A.endDTS)}A.duration=w-B;var p=B-A.start;A.appendedPTS=w,A.start=A.startPTS=B,A.maxStartPTS=c,A.startDTS=_,A.endPTS=w,A.minEndPTS=e,A.endDTS=x;var f=A.sn;if(!r||f<r.startSN||f>r.endSN)return 0;var R,L=f-r.startSN,H=r.fragments;for(H[L]=A,R=L;R>0;R--)U(H[R],H[R-1]);for(R=L;R<H.length-1;R++)U(H[R],H[R+1]);return r.fragmentHint&&U(H[H.length-1],r.fragmentHint),r.PTSKnown=r.alignedSliding=!0,p}function v(r,A){for(var B=null,w=r.fragments,_=w.length-1;_>=0;_--){var x=w[_].initSegment;if(x){B=x;break}}r.fragmentHint&&delete r.fragmentHint.endPTS;var m=0,c;if(u(r,A,function(R,L){R.relurl&&(m=R.cc-L.cc),Object(G.isFiniteNumber)(R.startPTS)&&Object(G.isFiniteNumber)(R.endPTS)&&(L.start=L.startPTS=R.startPTS,L.startDTS=R.startDTS,L.appendedPTS=R.appendedPTS,L.maxStartPTS=R.maxStartPTS,L.endPTS=R.endPTS,L.endDTS=R.endDTS,L.minEndPTS=R.minEndPTS,L.duration=R.endPTS-R.startPTS,L.duration&&(c=L),A.PTSKnown=A.alignedSliding=!0),L.elementaryStreams=R.elementaryStreams,L.loader=R.loader,L.stats=R.stats,L.urlId=R.urlId,R.initSegment&&(L.initSegment=R.initSegment,B=R.initSegment)}),B){var e=A.fragmentHint?A.fragments.concat(A.fragmentHint):A.fragments;e.forEach(function(R){var L;(!R.initSegment||R.initSegment.relurl===((L=B)===null||L===void 0?void 0:L.relurl))&&(R.initSegment=B)})}if(A.skippedSegments&&(A.deltaUpdateFailed=A.fragments.some(function(R){return!R}),A.deltaUpdateFailed)){D.logger.warn("[level-helper] Previous playlist missing segments skipped in delta playlist");for(var o=A.skippedSegments;o--;)A.fragments.shift();A.startSN=A.fragments[0].sn,A.startCC=A.fragments[0].cc}var l=A.fragments;if(m){D.logger.warn("discontinuity sliding from playlist, take drift into account");for(var y=0;y<l.length;y++)l[y].cc+=m}A.skippedSegments&&(A.startCC=A.fragments[0].cc),b(r.partList,A.partList,function(R,L){L.elementaryStreams=R.elementaryStreams,L.stats=R.stats}),c?I(A,c,c.startPTS,c.endPTS,c.startDTS,c.endDTS):a(r,A),l.length&&(A.totalduration=A.edge-l[0].start),A.driftStartTime=r.driftStartTime,A.driftStart=r.driftStart;var p=A.advancedDateTime;if(A.advanced&&p){var f=A.edge;A.driftStart||(A.driftStartTime=p,A.driftStart=f),A.driftEndTime=p,A.driftEnd=f}else A.driftEndTime=r.driftEndTime,A.driftEnd=r.driftEnd,A.advancedDateTime=r.advancedDateTime}function b(r,A,B){if(r&&A)for(var w=0,_=0,x=r.length;_<=x;_++){var m=r[_],c=A[_+w];m&&c&&m.index===c.index&&m.fragment.sn===c.fragment.sn?B(m,c):w--}}function u(r,A,B){for(var w=A.skippedSegments,_=Math.max(r.startSN,A.startSN)-A.startSN,x=(r.fragmentHint?1:0)+(w?A.endSN:Math.min(r.endSN,A.endSN))-A.startSN,m=A.startSN-r.startSN,c=A.fragmentHint?A.fragments.concat(A.fragmentHint):A.fragments,e=r.fragmentHint?r.fragments.concat(r.fragmentHint):r.fragments,o=_;o<=x;o++){var l=e[m+o],y=c[o];w&&!y&&o<w&&(y=A.fragments[o]=l),l&&y&&B(l,y)}}function a(r,A){var B=A.startSN+A.skippedSegments-r.startSN,w=r.fragments;if(B<0||B>=w.length)return;n(A,w[B].start)}function n(r,A){if(A){for(var B=r.fragments,w=r.skippedSegments;w<B.length;w++)B[w].start+=A;r.fragmentHint&&(r.fragmentHint.start+=A)}}function s(r,A){var B=1e3*r.levelTargetDuration,w=B/2,_=r.age,x=_>0&&_<B*3,m=A.loading.end-A.loading.start,c,e=r.availabilityDelay;if(r.updated===!1)if(x){var o=333*r.misses;c=Math.max(Math.min(w,m*2),o),r.availabilityDelay=(r.availabilityDelay||0)+c}else c=w;else x?(e=Math.min(e||B/2,_),r.availabilityDelay=e,c=e+B-_):c=B-m;return Math.round(c)}function i(r,A,B){if(!r||!r.details)return null;var w=r.details,_=w.fragments[A-w.startSN];return _||(_=w.fragmentHint,_&&_.sn===A?_:A<w.startSN&&B&&B.sn===A?B:null)}function t(r,A,B){if(!r||!r.details)return null;var w=r.details.partList;if(w)for(var _=w.length;_--;){var x=w[_];if(x.index===B&&x.fragment.sn===A)return x}return null}},"./src/controller/stream-controller.ts":function(ve,X,O){"use strict";O.r(X),O.d(X,"default",function(){return w});var G=O("./src/polyfills/number.ts"),D=O("./src/controller/base-stream-controller.ts"),S=O("./src/is-supported.ts"),z=O("./src/events.ts"),F=O("./src/utils/buffer-helper.ts"),U=O("./src/controller/fragment-tracker.ts"),I=O("./src/types/loader.ts"),v=O("./src/loader/fragment.ts"),b=O("./src/demux/transmuxer-interface.ts"),u=O("./src/types/transmuxer.ts"),a=O("./src/controller/gap-controller.ts"),n=O("./src/errors.ts"),s=O("./src/utils/logger.ts");function i(_,x){for(var m=0;m<x.length;m++){var c=x[m];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(_,c.key,c)}}function t(_,x,m){return x&&i(_.prototype,x),m&&i(_,m),_}function r(_,x){_.prototype=Object.create(x.prototype),_.prototype.constructor=_,A(_,x)}function A(_,x){return A=Object.setPrototypeOf||function(c,e){return c.__proto__=e,c},A(_,x)}var B=100,w=function(_){r(x,_);function x(c,e){var o;return o=_.call(this,c,e,"[stream-controller]")||this,o.audioCodecSwap=!1,o.gapController=null,o.level=-1,o._forceStartLoad=!1,o.altAudio=!1,o.audioOnly=!1,o.fragPlaying=null,o.onvplaying=null,o.onvseeked=null,o.fragLastKbps=0,o.stalled=!1,o.couldBacktrack=!1,o.audioCodecSwitch=!1,o.videoBuffer=null,o._registerListeners(),o}var m=x.prototype;return m._registerListeners=function(){var e=this.hls;e.on(z.Events.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(z.Events.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(z.Events.MANIFEST_LOADING,this.onManifestLoading,this),e.on(z.Events.MANIFEST_PARSED,this.onManifestParsed,this),e.on(z.Events.LEVEL_LOADING,this.onLevelLoading,this),e.on(z.Events.LEVEL_LOADED,this.onLevelLoaded,this),e.on(z.Events.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),e.on(z.Events.ERROR,this.onError,this),e.on(z.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.on(z.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),e.on(z.Events.BUFFER_CREATED,this.onBufferCreated,this),e.on(z.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),e.on(z.Events.LEVELS_UPDATED,this.onLevelsUpdated,this),e.on(z.Events.FRAG_BUFFERED,this.onFragBuffered,this)},m._unregisterListeners=function(){var e=this.hls;e.off(z.Events.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(z.Events.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(z.Events.MANIFEST_LOADING,this.onManifestLoading,this),e.off(z.Events.MANIFEST_PARSED,this.onManifestParsed,this),e.off(z.Events.LEVEL_LOADED,this.onLevelLoaded,this),e.off(z.Events.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),e.off(z.Events.ERROR,this.onError,this),e.off(z.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.off(z.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),e.off(z.Events.BUFFER_CREATED,this.onBufferCreated,this),e.off(z.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),e.off(z.Events.LEVELS_UPDATED,this.onLevelsUpdated,this),e.off(z.Events.FRAG_BUFFERED,this.onFragBuffered,this)},m.onHandlerDestroying=function(){this._unregisterListeners(),this.onMediaDetaching()},m.startLoad=function(e){if(this.levels){var o=this.lastCurrentTime,l=this.hls;if(this.stopLoad(),this.setInterval(B),this.level=-1,this.fragLoadError=0,!this.startFragRequested){var y=l.startLevel;y===-1&&(l.config.testBandwidth?(y=0,this.bitrateTest=!0):y=l.nextAutoLevel),this.level=l.nextLoadLevel=y,this.loadedmetadata=!1}o>0&&e===-1&&(this.log("Override startPosition with lastCurrentTime @"+o.toFixed(3)),e=o),this.state=D.State.IDLE,this.nextLoadPosition=this.startPosition=this.lastCurrentTime=e,this.tick()}else this._forceStartLoad=!0,this.state=D.State.STOPPED},m.stopLoad=function(){this._forceStartLoad=!1,_.prototype.stopLoad.call(this)},m.doTick=function(){switch(this.state){case D.State.IDLE:this.doTickIdle();break;case D.State.WAITING_LEVEL:{var e,o=this.levels,l=this.level,y=o==null||((e=o[l])===null||e===void 0)?void 0:e.details;if(y&&(!y.live||this.levelLastLoaded===this.level)){if(this.waitForCdnTuneIn(y))break;this.state=D.State.IDLE;break}break}case D.State.FRAG_LOADING_WAITING_RETRY:{var p,f=self.performance.now(),R=this.retryDate;(!R||f>=R||(p=this.media)!==null&&p!==void 0&&p.seeking)&&(this.log("retryDate reached, switch back to IDLE state"),this.state=D.State.IDLE)}break;default:break}this.onTickEnd()},m.onTickEnd=function(){_.prototype.onTickEnd.call(this),this.checkBuffer(),this.checkFragmentChanged()},m.doTickIdle=function(){var e,o,l=this.hls,y=this.levelLastLoaded,p=this.levels,f=this.media,R=l.config,L=l.nextLoadLevel;if(y===null||!f&&(this.startFragRequested||!R.startFragPrefetch))return;if(this.altAudio&&this.audioOnly)return;if(!p||!p[L])return;var H=p[L];this.level=l.nextLoadLevel=L;var j=H.details;if(!j||this.state===D.State.WAITING_LEVEL||j.live&&this.levelLastLoaded!==L){this.state=D.State.WAITING_LEVEL;return}var J=this.getFwdBufferInfo(this.mediaBuffer?this.mediaBuffer:f,I.PlaylistLevelType.MAIN);if(J===null)return;var M=J.len,Y=this.getMaxBufferLength(H.maxBitrate);if(M>=Y)return;if(this._streamEnded(J,j)){var te={};this.altAudio&&(te.type="video"),this.hls.trigger(z.Events.BUFFER_EOS,te),this.state=D.State.ENDED;return}var de=J.end,fe=this.getNextFragment(de,j);if(this.couldBacktrack&&!this.fragPrevious&&fe&&fe.sn!=="initSegment"){var Le=fe.sn-j.startSN;Le>1&&(fe=j.fragments[Le-1],this.fragmentTracker.removeFragment(fe))}if(fe&&this.fragmentTracker.getState(fe)===U.FragmentState.OK&&this.nextLoadPosition>de){var xe=this.audioOnly&&!this.altAudio?v.ElementaryStreamTypes.AUDIO:v.ElementaryStreamTypes.VIDEO;this.afterBufferFlushed(f,xe,I.PlaylistLevelType.MAIN),fe=this.getNextFragment(this.nextLoadPosition,j)}if(!fe)return;fe.initSegment&&!fe.initSegment.data&&!this.bitrateTest&&(fe=fe.initSegment),((e=fe.decryptdata)===null||e===void 0?void 0:e.keyFormat)==="identity"&&!((o=fe.decryptdata)!==null&&o!==void 0&&o.key)?this.loadKey(fe,j):this.loadFragment(fe,j,de)},m.loadFragment=function(e,o,l){var y,p=this.fragmentTracker.getState(e);if(this.fragCurrent=e,p===U.FragmentState.BACKTRACKED){var f=this.fragmentTracker.getBacktrackData(e);if(f){this._handleFragmentLoadProgress(f),this._handleFragmentLoadComplete(f);return}else p=U.FragmentState.NOT_LOADED}p===U.FragmentState.NOT_LOADED||p===U.FragmentState.PARTIAL?e.sn==="initSegment"?this._loadInitSegment(e):this.bitrateTest?(e.bitrateTest=!0,this.log("Fragment "+e.sn+" of level "+e.level+" is being downloaded to test bitrate and will not be buffered"),this._loadBitrateTestFrag(e)):(this.startFragRequested=!0,_.prototype.loadFragment.call(this,e,o,l)):p===U.FragmentState.APPENDING?this.reduceMaxBufferLength(e.duration)&&this.fragmentTracker.removeFragment(e):((y=this.media)===null||y===void 0?void 0:y.buffered.length)===0&&this.fragmentTracker.removeAllFragments()},m.getAppendedFrag=function(e){var o=this.fragmentTracker.getAppendedFrag(e,I.PlaylistLevelType.MAIN);return o&&"fragment"in o?o.fragment:o},m.getBufferedFrag=function(e){return this.fragmentTracker.getBufferedFrag(e,I.PlaylistLevelType.MAIN)},m.followingBufferedFrag=function(e){return e?this.getBufferedFrag(e.end+.5):null},m.immediateLevelSwitch=function(){this.abortCurrentFrag(),this.flushMainBuffer(0,Number.POSITIVE_INFINITY)},m.nextLevelSwitch=function(){var e=this.levels,o=this.media;if(o!=null&&o.readyState){var l,y=this.getAppendedFrag(o.currentTime);if(y&&y.start>1&&this.flushMainBuffer(0,y.start-1),!o.paused&&e){var p=this.hls.nextLoadLevel,f=e[p],R=this.fragLastKbps;R&&this.fragCurrent?l=this.fragCurrent.duration*f.maxBitrate/(1e3*R)+1:l=0}else l=0;var L=this.getBufferedFrag(o.currentTime+l);if(L){var H=this.followingBufferedFrag(L);if(H){this.abortCurrentFrag();var j=H.maxStartPTS?H.maxStartPTS:H.start,J=H.duration,M=Math.max(L.end,j+Math.min(Math.max(J-this.config.maxFragLookUpTolerance,J*.5),J*.75));this.flushMainBuffer(M,Number.POSITIVE_INFINITY)}}}},m.abortCurrentFrag=function(){var e=this.fragCurrent;this.fragCurrent=null,e!=null&&e.loader&&e.loader.abort(),this.state===D.State.KEY_LOADING&&(this.state=D.State.IDLE),this.nextLoadPosition=this.getLoadPosition()},m.flushMainBuffer=function(e,o){_.prototype.flushMainBuffer.call(this,e,o,this.altAudio?"video":null)},m.onMediaAttached=function(e,o){_.prototype.onMediaAttached.call(this,e,o);var l=o.media;this.onvplaying=this.onMediaPlaying.bind(this),this.onvseeked=this.onMediaSeeked.bind(this),l.addEventListener("playing",this.onvplaying),l.addEventListener("seeked",this.onvseeked),this.gapController=new a.default(this.config,l,this.fragmentTracker,this.hls)},m.onMediaDetaching=function(){var e=this.media;e&&(e.removeEventListener("playing",this.onvplaying),e.removeEventListener("seeked",this.onvseeked),this.onvplaying=this.onvseeked=null,this.videoBuffer=null),this.fragPlaying=null,this.gapController&&(this.gapController.destroy(),this.gapController=null),_.prototype.onMediaDetaching.call(this)},m.onMediaPlaying=function(){this.tick()},m.onMediaSeeked=function(){var e=this.media,o=e?e.currentTime:null;Object(G.isFiniteNumber)(o)&&this.log("Media seeked to "+o.toFixed(3)),this.tick()},m.onManifestLoading=function(){this.log("Trigger BUFFER_RESET"),this.hls.trigger(z.Events.BUFFER_RESET,void 0),this.fragmentTracker.removeAllFragments(),this.couldBacktrack=this.stalled=!1,this.startPosition=this.lastCurrentTime=0,this.fragPlaying=null},m.onManifestParsed=function(e,o){var l=!1,y=!1,p;o.levels.forEach(function(f){p=f.audioCodec,p&&(p.indexOf("mp4a.40.2")!==-1&&(l=!0),p.indexOf("mp4a.40.5")!==-1&&(y=!0))}),this.audioCodecSwitch=l&&y&&!Object(S.changeTypeSupported)(),this.audioCodecSwitch&&this.log("Both AAC/HE-AAC audio found in levels; declaring level codec as HE-AAC"),this.levels=o.levels,this.startFragRequested=!1},m.onLevelLoading=function(e,o){var l=this.levels;if(!l||this.state!==D.State.IDLE)return;var y=l[o.level];(!y.details||y.details.live&&this.levelLastLoaded!==o.level||this.waitForCdnTuneIn(y.details))&&(this.state=D.State.WAITING_LEVEL)},m.onLevelLoaded=function(e,o){var l,y=this.levels,p=o.level,f=o.details,R=f.totalduration;if(!y){this.warn("Levels were reset while loading level "+p);return}this.log("Level "+p+" loaded ["+f.startSN+","+f.endSN+"], cc ["+f.startCC+", "+f.endCC+"] duration:"+R);var L=this.fragCurrent;L&&(this.state===D.State.FRAG_LOADING||this.state===D.State.FRAG_LOADING_WAITING_RETRY)&&(L.level!==o.level&&L.loader&&(this.state=D.State.IDLE,L.loader.abort()));var H=y[p],j=0;if(f.live||(l=H.details)!==null&&l!==void 0&&l.live){if(f.fragments[0]||(f.deltaUpdateFailed=!0),f.deltaUpdateFailed)return;j=this.alignPlaylists(f,H.details)}if(H.details=f,this.levelLastLoaded=p,this.hls.trigger(z.Events.LEVEL_UPDATED,{details:f,level:p}),this.state===D.State.WAITING_LEVEL){if(this.waitForCdnTuneIn(f))return;this.state=D.State.IDLE}this.startFragRequested?f.live&&this.synchronizeToLiveEdge(f):this.setStartPosition(f,j),this.tick()},m._handleFragmentLoadProgress=function(e){var o,l=e.frag,y=e.part,p=e.payload,f=this.levels;if(!f){this.warn("Levels were reset while fragment load was in progress. Fragment "+l.sn+" of level "+l.level+" will not be buffered");return}var R=f[l.level],L=R.details;if(!L){this.warn("Dropping fragment "+l.sn+" of level "+l.level+" after level details were reset");return}var H=R.videoCodec,j=L.PTSKnown||!L.live,J=(o=l.initSegment)===null||o===void 0?void 0:o.data,M=this._getAudioCodec(R),Y=this.transmuxer=this.transmuxer||new b.default(this.hls,I.PlaylistLevelType.MAIN,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)),te=y?y.index:-1,de=te!==-1,fe=new u.ChunkMetadata(l.level,l.sn,l.stats.chunkCount,p.byteLength,te,de),Le=this.initPTS[l.cc];Y.push(p,J,M,H,l,y,L.totalduration,j,fe,Le)},m.onAudioTrackSwitching=function(e,o){var l=this.altAudio,y=!!o.url,p=o.id;if(!y){if(this.mediaBuffer!==this.media){this.log("Switching on main audio, use media.buffered to schedule main fragment loading"),this.mediaBuffer=this.media;var f=this.fragCurrent;f!=null&&f.loader&&(this.log("Switching to main audio track, cancel main fragment load"),f.loader.abort()),this.resetTransmuxer(),this.resetLoadingState()}else this.audioOnly&&this.resetTransmuxer();var R=this.hls;l&&R.trigger(z.Events.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:"audio"}),R.trigger(z.Events.AUDIO_TRACK_SWITCHED,{id:p})}},m.onAudioTrackSwitched=function(e,o){var l=o.id,y=!!this.hls.audioTracks[l].url;if(y){var p=this.videoBuffer;p&&this.mediaBuffer!==p&&(this.log("Switching on alternate audio, use video.buffered to schedule main fragment loading"),this.mediaBuffer=p)}this.altAudio=y,this.tick()},m.onBufferCreated=function(e,o){var l=o.tracks,y,p,f=!1;for(var R in l){var L=l[R];if(L.id==="main"){if(p=R,y=L,R==="video"){var H=l[R];H&&(this.videoBuffer=H.buffer)}}else f=!0}f&&y?(this.log("Alternate track found, use "+p+".buffered to schedule main fragment loading"),this.mediaBuffer=y.buffer):this.mediaBuffer=this.media},m.onFragBuffered=function(e,o){var l=o.frag,y=o.part;if(l&&l.type!==I.PlaylistLevelType.MAIN)return;if(this.fragContextChanged(l)){this.warn("Fragment "+l.sn+(y?" p: "+y.index:"")+" of level "+l.level+" finished buffering, but was aborted. state: "+this.state),this.state===D.State.PARSED&&(this.state=D.State.IDLE);return}var p=y?y.stats:l.stats;this.fragLastKbps=Math.round(8*p.total/(p.buffering.end-p.loading.first)),l.sn!=="initSegment"&&(this.fragPrevious=l),this.fragBufferedComplete(l,y)},m.onError=function(e,o){switch(o.details){case n.ErrorDetails.FRAG_LOAD_ERROR:case n.ErrorDetails.FRAG_LOAD_TIMEOUT:case n.ErrorDetails.KEY_LOAD_ERROR:case n.ErrorDetails.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(I.PlaylistLevelType.MAIN,o);break;case n.ErrorDetails.LEVEL_LOAD_ERROR:case n.ErrorDetails.LEVEL_LOAD_TIMEOUT:this.state!==D.State.ERROR&&(o.fatal?(this.warn(""+o.details),this.state=D.State.ERROR):!o.levelRetry&&this.state===D.State.WAITING_LEVEL&&(this.state=D.State.IDLE));break;case n.ErrorDetails.BUFFER_FULL_ERROR:if(o.parent==="main"&&(this.state===D.State.PARSING||this.state===D.State.PARSED)){var l=!0,y=this.getFwdBufferInfo(this.media,I.PlaylistLevelType.MAIN);y&&y.len>.5&&(l=!this.reduceMaxBufferLength(y.len)),l&&(this.warn("buffer full error also media.currentTime is not buffered, flush main"),this.immediateLevelSwitch()),this.resetLoadingState()}break;default:break}},m.checkBuffer=function(){var e=this.media,o=this.gapController;if(!e||!o||!e.readyState)return;var l=F.BufferHelper.getBuffered(e);!this.loadedmetadata&&l.length?(this.loadedmetadata=!0,this.seekToStartPos()):o.poll(this.lastCurrentTime),this.lastCurrentTime=e.currentTime},m.onFragLoadEmergencyAborted=function(){this.state=D.State.IDLE,this.loadedmetadata||(this.startFragRequested=!1,this.nextLoadPosition=this.startPosition),this.tickImmediate()},m.onBufferFlushed=function(e,o){var l=o.type;if(l!==v.ElementaryStreamTypes.AUDIO||this.audioOnly&&!this.altAudio){var y=(l===v.ElementaryStreamTypes.VIDEO?this.videoBuffer:this.mediaBuffer)||this.media;this.afterBufferFlushed(y,l,I.PlaylistLevelType.MAIN)}},m.onLevelsUpdated=function(e,o){this.levels=o.levels},m.swapAudioCodec=function(){this.audioCodecSwap=!this.audioCodecSwap},m.seekToStartPos=function(){var e=this.media,o=e.currentTime,l=this.startPosition;if(l>=0&&o<l){if(e.seeking){s.logger.log("could not seek to "+l+", already seeking at "+o);return}var y=F.BufferHelper.getBuffered(e),p=y.length?y.start(0):0,f=p-l;f>0&&(f<this.config.maxBufferHole||f<this.config.maxFragLookUpTolerance)&&(s.logger.log("adjusting start position by "+f+" to match buffer start"),l+=f,this.startPosition=l),this.log("seek to target start position "+l+" from current time "+o),e.currentTime=l}},m._getAudioCodec=function(e){var o=this.config.defaultAudioCodec||e.audioCodec;return this.audioCodecSwap&&o&&(this.log("Swapping audio codec"),o.indexOf("mp4a.40.5")!==-1?o="mp4a.40.2":o="mp4a.40.5"),o},m._loadBitrateTestFrag=function(e){var o=this;this._doFragLoad(e).then(function(l){var y=o.hls;if(!l||y.nextLoadLevel||o.fragContextChanged(e))return;o.fragLoadError=0,o.state=D.State.IDLE,o.startFragRequested=!1,o.bitrateTest=!1;var p=e.stats;p.parsing.start=p.parsing.end=p.buffering.start=p.buffering.end=self.performance.now(),y.trigger(z.Events.FRAG_LOADED,l)})},m._handleTransmuxComplete=function(e){var o,l="main",y=this.hls,p=e.remuxResult,f=e.chunkMeta,R=this.getCurrentContext(f);if(!R){this.warn("The loading context changed while buffering fragment "+f.sn+" of level "+f.level+". This chunk will not be buffered."),this.resetLiveStartWhenNotLoaded(f.level);return}var L=R.frag,H=R.part,j=R.level,J=p.video,M=p.text,Y=p.id3,te=p.initSegment,de=this.altAudio?void 0:p.audio;if(this.fragContextChanged(L))return;if(this.state=D.State.PARSING,te){te.tracks&&(this._bufferInitSegment(j,te.tracks,L,f),y.trigger(z.Events.FRAG_PARSING_INIT_SEGMENT,{frag:L,id:l,tracks:te.tracks}));var fe=te.initPTS,Le=te.timescale;Object(G.isFiniteNumber)(fe)&&(this.initPTS[L.cc]=fe,y.trigger(z.Events.INIT_PTS_FOUND,{frag:L,id:l,initPTS:fe,timescale:Le}))}if(J&&p.independent!==!1){if(j.details){var xe=J.startPTS,Ie=J.endPTS,Fe=J.startDTS,Ue=J.endDTS;if(H)H.elementaryStreams[J.type]={startPTS:xe,endPTS:Ie,startDTS:Fe,endDTS:Ue};else if(J.firstKeyFrame&&J.independent&&(this.couldBacktrack=!0),J.dropped&&J.independent){var be=this.getLoadPosition()+this.config.maxBufferHole;if(be<xe){this.backtrack(L);return}L.setElementaryStreamInfo(J.type,L.start,Ie,L.start,Ue,!0)}L.setElementaryStreamInfo(J.type,xe,Ie,Fe,Ue),this.bufferFragmentData(J,L,H,f)}}else if(p.independent===!1){this.backtrack(L);return}if(de){var ue=de.startPTS,je=de.endPTS,st=de.startDTS,nt=de.endDTS;H&&(H.elementaryStreams[v.ElementaryStreamTypes.AUDIO]={startPTS:ue,endPTS:je,startDTS:st,endDTS:nt}),L.setElementaryStreamInfo(v.ElementaryStreamTypes.AUDIO,ue,je,st,nt),this.bufferFragmentData(de,L,H,f)}if(Y!=null&&(o=Y.samples)!==null&&o!==void 0&&o.length){var rt={frag:L,id:l,samples:Y.samples};y.trigger(z.Events.FRAG_PARSING_METADATA,rt)}if(M){var He={frag:L,id:l,samples:M.samples};y.trigger(z.Events.FRAG_PARSING_USERDATA,He)}},m._bufferInitSegment=function(e,o,l,y){var p=this;if(this.state!==D.State.PARSING)return;this.audioOnly=!!o.audio&&!o.video,this.altAudio&&!this.audioOnly&&delete o.audio;var f=o.audio,R=o.video,L=o.audiovideo;if(f){var H=e.audioCodec,j=navigator.userAgent.toLowerCase();this.audioCodecSwitch&&(H&&(H.indexOf("mp4a.40.5")!==-1?H="mp4a.40.2":H="mp4a.40.5"),f.metadata.channelCount!==1&&j.indexOf("firefox")===-1&&(H="mp4a.40.5")),j.indexOf("android")!==-1&&f.container!=="audio/mpeg"&&(H="mp4a.40.2",this.log("Android: force audio codec to "+H)),e.audioCodec&&e.audioCodec!==H&&this.log('Swapping manifest audio codec "'+e.audioCodec+'" for "'+H+'"'),f.levelCodec=H,f.id="main",this.log("Init audio buffer, container:"+f.container+", codecs[selected/level/parsed]=["+(H||"")+"/"+(e.audioCodec||"")+"/"+f.codec+"]")}R&&(R.levelCodec=e.videoCodec,R.id="main",this.log("Init video buffer, container:"+R.container+", codecs[level/parsed]=["+(e.videoCodec||"")+"/"+R.codec+"]")),L&&this.log("Init audiovideo buffer, container:"+L.container+", codecs[level/parsed]=["+(e.attrs.CODECS||"")+"/"+L.codec+"]"),this.hls.trigger(z.Events.BUFFER_CODECS,o),Object.keys(o).forEach(function(J){var M=o[J],Y=M.initSegment;Y!=null&&Y.byteLength&&p.hls.trigger(z.Events.BUFFER_APPENDING,{type:J,data:Y,frag:l,part:null,chunkMeta:y,parent:l.type})}),this.tick()},m.backtrack=function(e){this.couldBacktrack=!0,this.resetTransmuxer(),this.flushBufferGap(e);var o=this.fragmentTracker.backtrack(e);this.fragPrevious=null,this.nextLoadPosition=e.start,o?this.resetFragmentLoading(e):this.state=D.State.BACKTRACKING},m.checkFragmentChanged=function(){var e=this.media,o=null;if(e&&e.readyState>1&&e.seeking===!1){var l=e.currentTime;if(F.BufferHelper.isBuffered(e,l)?o=this.getAppendedFrag(l):F.BufferHelper.isBuffered(e,l+.1)&&(o=this.getAppendedFrag(l+.1)),o){var y=this.fragPlaying,p=o.level;(!y||o.sn!==y.sn||y.level!==p||o.urlId!==y.urlId)&&(this.hls.trigger(z.Events.FRAG_CHANGED,{frag:o}),(!y||y.level!==p)&&this.hls.trigger(z.Events.LEVEL_SWITCHED,{level:p}),this.fragPlaying=o)}}},t(x,[{key:"nextLevel",get:function(){var e=this.nextBufferedFrag;return e?e.level:-1}},{key:"currentLevel",get:function(){var e=this.media;if(e){var o=this.getAppendedFrag(e.currentTime);if(o)return o.level}return-1}},{key:"nextBufferedFrag",get:function(){var e=this.media;if(e){var o=this.getAppendedFrag(e.currentTime);return this.followingBufferedFrag(o)}else return null}},{key:"forceStartLoad",get:function(){return this._forceStartLoad}}]),x}(D.default)},"./src/controller/subtitle-stream-controller.ts":function(ve,X,O){"use strict";O.r(X),O.d(X,"SubtitleStreamController",function(){return r});var G=O("./src/events.ts"),D=O("./src/utils/logger.ts"),S=O("./src/utils/buffer-helper.ts"),z=O("./src/controller/fragment-finders.ts"),F=O("./src/utils/discontinuities.ts"),U=O("./src/controller/level-helper.ts"),I=O("./src/controller/fragment-tracker.ts"),v=O("./src/controller/base-stream-controller.ts"),b=O("./src/types/loader.ts"),u=O("./src/types/level.ts");function a(A,B){for(var w=0;w<B.length;w++){var _=B[w];_.enumerable=_.enumerable||!1,_.configurable=!0,"value"in _&&(_.writable=!0),Object.defineProperty(A,_.key,_)}}function n(A,B,w){return B&&a(A.prototype,B),w&&a(A,w),A}function s(A,B){A.prototype=Object.create(B.prototype),A.prototype.constructor=A,i(A,B)}function i(A,B){return i=Object.setPrototypeOf||function(_,x){return _.__proto__=x,_},i(A,B)}var t=500,r=function(A){s(B,A);function B(_,x){var m;return m=A.call(this,_,x,"[subtitle-stream-controller]")||this,m.levels=[],m.currentTrackId=-1,m.tracksBuffered=[],m.mainDetails=null,m._registerListeners(),m}var w=B.prototype;return w.onHandlerDestroying=function(){this._unregisterListeners(),this.mainDetails=null},w._registerListeners=function(){var x=this.hls;x.on(G.Events.MEDIA_ATTACHED,this.onMediaAttached,this),x.on(G.Events.MEDIA_DETACHING,this.onMediaDetaching,this),x.on(G.Events.MANIFEST_LOADING,this.onManifestLoading,this),x.on(G.Events.LEVEL_LOADED,this.onLevelLoaded,this),x.on(G.Events.ERROR,this.onError,this),x.on(G.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),x.on(G.Events.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),x.on(G.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),x.on(G.Events.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),x.on(G.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},w._unregisterListeners=function(){var x=this.hls;x.off(G.Events.MEDIA_ATTACHED,this.onMediaAttached,this),x.off(G.Events.MEDIA_DETACHING,this.onMediaDetaching,this),x.off(G.Events.MANIFEST_LOADING,this.onManifestLoading,this),x.off(G.Events.LEVEL_LOADED,this.onLevelLoaded,this),x.off(G.Events.ERROR,this.onError,this),x.off(G.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),x.off(G.Events.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),x.off(G.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),x.off(G.Events.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),x.off(G.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},w.startLoad=function(){this.stopLoad(),this.state=v.State.IDLE,this.setInterval(t),this.tick()},w.onManifestLoading=function(){this.mainDetails=null,this.fragmentTracker.removeAllFragments()},w.onLevelLoaded=function(x,m){this.mainDetails=m.details},w.onSubtitleFragProcessed=function(x,m){var c=m.frag,e=m.success;if(this.fragPrevious=c,this.state=v.State.IDLE,!e)return;var o=this.tracksBuffered[this.currentTrackId];if(!o)return;for(var l,y=c.start,p=0;p<o.length;p++)if(y>=o[p].start&&y<=o[p].end){l=o[p];break}var f=c.start+c.duration;l?l.end=f:(l={start:y,end:f},o.push(l)),this.fragmentTracker.fragBuffered(c)},w.onBufferFlushing=function(x,m){var c=m.startOffset,e=m.endOffset;if(c===0&&e!==Number.POSITIVE_INFINITY){var o=this.currentTrackId,l=this.levels;if(!l.length||!l[o]||!l[o].details)return;var y=l[o].details,p=y.targetduration,f=e-p;if(f<=0)return;m.endOffsetSubtitles=Math.max(0,f),this.tracksBuffered.forEach(function(R){for(var L=0;L<R.length;){if(R[L].end<=f){R.shift();continue}else if(R[L].start<f)R[L].start=f;else break;L++}}),this.fragmentTracker.removeFragmentsInRange(c,f,b.PlaylistLevelType.SUBTITLE)}},w.onError=function(x,m){var c,e=m.frag;if(!e||e.type!==b.PlaylistLevelType.SUBTITLE)return;(c=this.fragCurrent)!==null&&c!==void 0&&c.loader&&this.fragCurrent.loader.abort(),this.state=v.State.IDLE},w.onSubtitleTracksUpdated=function(x,m){var c=this,e=m.subtitleTracks;this.tracksBuffered=[],this.levels=e.map(function(o){return new u.Level(o)}),this.fragmentTracker.removeAllFragments(),this.fragPrevious=null,this.levels.forEach(function(o){c.tracksBuffered[o.id]=[]}),this.mediaBuffer=null},w.onSubtitleTrackSwitch=function(x,m){if(this.currentTrackId=m.id,!this.levels.length||this.currentTrackId===-1){this.clearInterval();return}var c=this.levels[this.currentTrackId];c!=null&&c.details?this.mediaBuffer=this.mediaBufferTimeRanges:this.mediaBuffer=null,c&&this.setInterval(t)},w.onSubtitleTrackLoaded=function(x,m){var c,e=m.details,o=m.id,l=this.currentTrackId,y=this.levels;if(!y.length)return;var p=y[l];if(o>=y.length||o!==l||!p)return;if(this.mediaBuffer=this.mediaBufferTimeRanges,e.live||(c=p.details)!==null&&c!==void 0&&c.live){var f=this.mainDetails;if(e.deltaUpdateFailed||!f)return;var R=f.fragments[0];if(!p.details)e.hasProgramDateTime&&f.hasProgramDateTime?Object(F.alignMediaPlaylistByPDT)(e,f):R&&Object(U.addSliding)(e,R.start);else{var L=this.alignPlaylists(e,p.details);L===0&&R&&Object(U.addSliding)(e,R.start)}}if(p.details=e,this.levelLastLoaded=o,this.tick(),e.live&&!this.fragCurrent&&this.media&&this.state===v.State.IDLE){var H=Object(z.findFragmentByPTS)(null,e.fragments,this.media.currentTime,0);H||(this.warn("Subtitle playlist not aligned with playback"),p.details=void 0)}},w._handleFragmentLoadComplete=function(x){var m=x.frag,c=x.payload,e=m.decryptdata,o=this.hls;if(this.fragContextChanged(m))return;if(c&&c.byteLength>0&&e&&e.key&&e.iv&&e.method==="AES-128"){var l=performance.now();this.decrypter.webCryptoDecrypt(new Uint8Array(c),e.key.buffer,e.iv.buffer).then(function(y){var p=performance.now();o.trigger(G.Events.FRAG_DECRYPTED,{frag:m,payload:y,stats:{tstart:l,tdecrypt:p}})})}},w.doTick=function(){if(!this.media){this.state=v.State.IDLE;return}if(this.state===v.State.IDLE){var x,m=this.currentTrackId,c=this.levels;if(!c.length||!c[m]||!c[m].details)return;var e=c[m].details,o=e.targetduration,l=this.config,y=this.media,p=S.BufferHelper.bufferedInfo(this.mediaBufferTimeRanges,y.currentTime-o,l.maxBufferHole),f=p.end,R=p.len,L=this.getMaxBufferLength()+o;if(R>L)return;console.assert(e,"Subtitle track details are defined on idle subtitle stream controller tick");var H=e.fragments,j=H.length,J=e.edge,M,Y=this.fragPrevious;if(f<J){var te=l.maxFragLookUpTolerance;Y&&e.hasProgramDateTime&&(M=Object(z.findFragmentByPDT)(H,Y.endProgramDateTime,te)),M||(M=Object(z.findFragmentByPTS)(Y,H,f,te),!M&&Y&&Y.start<H[0].start&&(M=H[0]))}else M=H[j-1];(x=M)!==null&&x!==void 0&&x.encrypted?(D.logger.log("Loading key for "+M.sn),this.state=v.State.KEY_LOADING,this.hls.trigger(G.Events.KEY_LOADING,{frag:M})):M&&this.fragmentTracker.getState(M)===I.FragmentState.NOT_LOADED&&this.loadFragment(M,e,f)}},w.loadFragment=function(x,m,c){this.fragCurrent=x,A.prototype.loadFragment.call(this,x,m,c)},n(B,[{key:"mediaBufferTimeRanges",get:function(){return this.tracksBuffered[this.currentTrackId]||[]}}]),B}(v.default)},"./src/controller/subtitle-track-controller.ts":function(ve,X,O){"use strict";O.r(X);var G=O("./src/events.ts"),D=O("./src/utils/texttrack-utils.ts"),S=O("./src/controller/base-playlist-controller.ts"),z=O("./src/types/loader.ts");function F(a,n){for(var s=0;s<n.length;s++){var i=n[s];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(a,i.key,i)}}function U(a,n,s){return n&&F(a.prototype,n),s&&F(a,s),a}function I(a,n){a.prototype=Object.create(n.prototype),a.prototype.constructor=a,v(a,n)}function v(a,n){return v=Object.setPrototypeOf||function(i,t){return i.__proto__=t,i},v(a,n)}var b=function(a){I(n,a);function n(i){var t;return t=a.call(this,i,"[subtitle-track-controller]")||this,t.media=null,t.tracks=[],t.groupId=null,t.tracksInGroup=[],t.trackId=-1,t.selectDefaultTrack=!0,t.queuedDefaultTrack=-1,t.trackChangeListener=function(){return t.onTextTracksChanged()},t.asyncPollTrackChange=function(){return t.pollTrackChange(0)},t.useTextTrackPolling=!1,t.subtitlePollingInterval=-1,t.subtitleDisplay=!0,t.registerListeners(),t}var s=n.prototype;return s.destroy=function(){this.unregisterListeners(),this.tracks.length=0,this.tracksInGroup.length=0,this.trackChangeListener=this.asyncPollTrackChange=null,a.prototype.destroy.call(this)},s.registerListeners=function(){var t=this.hls;t.on(G.Events.MEDIA_ATTACHED,this.onMediaAttached,this),t.on(G.Events.MEDIA_DETACHING,this.onMediaDetaching,this),t.on(G.Events.MANIFEST_LOADING,this.onManifestLoading,this),t.on(G.Events.MANIFEST_PARSED,this.onManifestParsed,this),t.on(G.Events.LEVEL_LOADING,this.onLevelLoading,this),t.on(G.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),t.on(G.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),t.on(G.Events.ERROR,this.onError,this)},s.unregisterListeners=function(){var t=this.hls;t.off(G.Events.MEDIA_ATTACHED,this.onMediaAttached,this),t.off(G.Events.MEDIA_DETACHING,this.onMediaDetaching,this),t.off(G.Events.MANIFEST_LOADING,this.onManifestLoading,this),t.off(G.Events.MANIFEST_PARSED,this.onManifestParsed,this),t.off(G.Events.LEVEL_LOADING,this.onLevelLoading,this),t.off(G.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),t.off(G.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),t.off(G.Events.ERROR,this.onError,this)},s.onMediaAttached=function(t,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)},s.pollTrackChange=function(t){self.clearInterval(this.subtitlePollingInterval),this.subtitlePollingInterval=self.setInterval(this.trackChangeListener,t)},s.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 t=u(this.media.textTracks);t.forEach(function(r){Object(D.clearCurrentCues)(r)}),this.subtitleTrack=-1,this.media=null},s.onManifestLoading=function(){this.tracks=[],this.groupId=null,this.tracksInGroup=[],this.trackId=-1,this.selectDefaultTrack=!0},s.onManifestParsed=function(t,r){this.tracks=r.subtitleTracks},s.onSubtitleTrackLoaded=function(t,r){var A=r.id,B=r.details,w=this.trackId,_=this.tracksInGroup[w];if(!_){this.warn("Invalid subtitle track id "+A);return}var x=_.details;_.details=r.details,this.log("subtitle track "+A+" loaded ["+B.startSN+"-"+B.endSN+"]"),A===this.trackId&&(this.retryCount=0,this.playlistLoaded(A,r,x))},s.onLevelLoading=function(t,r){this.switchLevel(r.level)},s.onLevelSwitching=function(t,r){this.switchLevel(r.level)},s.switchLevel=function(t){var r=this.hls.levels[t];if(!(r!=null&&r.textGroupIds))return;var A=r.textGroupIds[r.urlId];if(this.groupId!==A){var B=this.tracksInGroup?this.tracksInGroup[this.trackId]:void 0,w=this.tracks.filter(function(m){return!A||m.groupId===A});this.tracksInGroup=w;var _=this.findTrackId(B==null?void 0:B.name)||this.findTrackId();this.groupId=A;var x={subtitleTracks:w};this.log("Updating subtitle tracks, "+w.length+' track(s) found in "'+A+'" group-id'),this.hls.trigger(G.Events.SUBTITLE_TRACKS_UPDATED,x),_!==-1&&this.setSubtitleTrack(_,B)}},s.findTrackId=function(t){for(var r=this.tracksInGroup,A=0;A<r.length;A++){var B=r[A];if((!this.selectDefaultTrack||B.default)&&(!t||t===B.name))return B.id}return-1},s.onError=function(t,r){if(a.prototype.onError.call(this,t,r),r.fatal||!r.context)return;r.context.type===z.PlaylistContextType.SUBTITLE_TRACK&&r.context.id===this.trackId&&r.context.groupId===this.groupId&&this.retryLoadingOrFail(r)},s.loadPlaylist=function(t){var r=this.tracksInGroup[this.trackId];if(this.shouldLoadTrack(r)){var A=r.id,B=r.groupId,w=r.url;if(t)try{w=t.addDirectives(w)}catch(_){this.warn("Could not construct new URL with HLS Delivery Directives: "+_)}this.log("Loading subtitle playlist for id "+A),this.hls.trigger(G.Events.SUBTITLE_TRACK_LOADING,{url:w,id:A,groupId:B,deliveryDirectives:t||null})}},s.toggleTrackModes=function(t){var r=this,A=this.media,B=this.subtitleDisplay,w=this.trackId;if(!A)return;var _=u(A.textTracks),x=_.filter(function(e){return e.groupId===r.groupId});if(t===-1)[].slice.call(_).forEach(function(e){e.mode="disabled"});else{var m=x[w];m&&(m.mode="disabled")}var c=x[t];c&&(c.mode=B?"showing":"hidden")},s.setSubtitleTrack=function(t,r){var A,B=this.tracksInGroup;if(!this.media){this.queuedDefaultTrack=t;return}if(this.trackId!==t&&this.toggleTrackModes(t),this.trackId===t&&(t===-1||(A=B[t])!==null&&A!==void 0&&A.details)||t<-1||t>=B.length)return;this.clearTimer();var w=B[t];if(this.log("Switching to subtitle track "+t),this.trackId=t,w){var _=w.id,x=w.groupId,m=x===void 0?"":x,c=w.name,e=w.type,o=w.url;this.hls.trigger(G.Events.SUBTITLE_TRACK_SWITCH,{id:_,groupId:m,name:c,type:e,url:o});var l=this.switchParams(w.url,r==null?void 0:r.details);this.loadPlaylist(l)}else this.hls.trigger(G.Events.SUBTITLE_TRACK_SWITCH,{id:t})},s.onTextTracksChanged=function(){if(this.useTextTrackPolling||self.clearInterval(this.subtitlePollingInterval),!this.media||!this.hls.config.renderTextTracksNatively)return;for(var t=-1,r=u(this.media.textTracks),A=0;A<r.length;A++)if(r[A].mode==="hidden")t=A;else if(r[A].mode==="showing"){t=A;break}this.subtitleTrack!==t&&(this.subtitleTrack=t)},U(n,[{key:"subtitleTracks",get:function(){return this.tracksInGroup}},{key:"subtitleTrack",get:function(){return this.trackId},set:function(t){this.selectDefaultTrack=!1;var r=this.tracksInGroup?this.tracksInGroup[this.trackId]:void 0;this.setSubtitleTrack(t,r)}}]),n}(S.default);function u(a){for(var n=[],s=0;s<a.length;s++){var i=a[s];i.kind==="subtitles"&&i.label&&n.push(a[s])}return n}X.default=b},"./src/controller/timeline-controller.ts":function(ve,X,O){"use strict";O.r(X),O.d(X,"TimelineController",function(){return u});var G=O("./src/polyfills/number.ts"),D=O("./src/events.ts"),S=O("./src/utils/cea-608-parser.ts"),z=O("./src/utils/output-filter.ts"),F=O("./src/utils/webvtt-parser.ts"),U=O("./src/utils/texttrack-utils.ts"),I=O("./src/utils/imsc1-ttml-parser.ts"),v=O("./src/types/loader.ts"),b=O("./src/utils/logger.ts"),u=function(){function i(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=s(),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 A=new z.default(this,"textTrack1"),B=new z.default(this,"textTrack2"),w=new z.default(this,"textTrack3"),_=new z.default(this,"textTrack4");this.cea608Parser1=new S.default(1,A,B),this.cea608Parser2=new S.default(3,w,_)}r.on(D.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),r.on(D.Events.MEDIA_DETACHING,this.onMediaDetaching,this),r.on(D.Events.MANIFEST_LOADING,this.onManifestLoading,this),r.on(D.Events.MANIFEST_LOADED,this.onManifestLoaded,this),r.on(D.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),r.on(D.Events.FRAG_LOADING,this.onFragLoading,this),r.on(D.Events.FRAG_LOADED,this.onFragLoaded,this),r.on(D.Events.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),r.on(D.Events.FRAG_DECRYPTED,this.onFragDecrypted,this),r.on(D.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),r.on(D.Events.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),r.on(D.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)}var t=i.prototype;return t.destroy=function(){var A=this.hls;A.off(D.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),A.off(D.Events.MEDIA_DETACHING,this.onMediaDetaching,this),A.off(D.Events.MANIFEST_LOADING,this.onManifestLoading,this),A.off(D.Events.MANIFEST_LOADED,this.onManifestLoaded,this),A.off(D.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),A.off(D.Events.FRAG_LOADING,this.onFragLoading,this),A.off(D.Events.FRAG_LOADED,this.onFragLoaded,this),A.off(D.Events.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),A.off(D.Events.FRAG_DECRYPTED,this.onFragDecrypted,this),A.off(D.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),A.off(D.Events.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),A.off(D.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),this.hls=this.config=this.cea608Parser1=this.cea608Parser2=null},t.addCues=function(A,B,w,_,x){for(var m=!1,c=x.length;c--;){var e=x[c],o=n(e[0],e[1],B,w);if(o>=0&&(e[0]=Math.min(e[0],B),e[1]=Math.max(e[1],w),m=!0,o/(w-B)>.5))return}if(m||x.push([B,w]),this.config.renderTextTracksNatively){var l=this.captionsTracks[A];this.Cues.newCue(l,B,w,_)}else{var y=this.Cues.newCue(null,B,w,_);this.hls.trigger(D.Events.CUES_PARSED,{type:"captions",cues:y,track:A})}},t.onInitPtsFound=function(A,B){var w=this,_=B.frag,x=B.id,m=B.initPTS,c=B.timescale,e=this.unparsedVttFrags;x==="main"&&(this.initPTS[_.cc]=m,this.timescale[_.cc]=c),e.length&&(this.unparsedVttFrags=[],e.forEach(function(o){w.onFragLoaded(D.Events.FRAG_LOADED,o)}))},t.getExistingTrack=function(A){var B=this.media;if(B)for(var w=0;w<B.textTracks.length;w++){var _=B.textTracks[w];if(_[A])return _}return null},t.createCaptionsTrack=function(A){this.config.renderTextTracksNatively?this.createNativeTrack(A):this.createNonNativeTrack(A)},t.createNativeTrack=function(A){if(this.captionsTracks[A])return;var B=this.captionsProperties,w=this.captionsTracks,_=this.media,x=B[A],m=x.label,c=x.languageCode,e=this.getExistingTrack(A);if(e)w[A]=e,Object(U.clearCurrentCues)(w[A]),Object(U.sendAddTrackEvent)(w[A],_);else{var o=this.createTextTrack("captions",m,c);o&&(o[A]=!0,w[A]=o)}},t.createNonNativeTrack=function(A){if(this.nonNativeCaptionsTracks[A])return;var B=this.captionsProperties[A];if(!B)return;var w=B.label,_={_id:A,label:w,kind:"captions",default:B.media?!!B.media.default:!1,closedCaptions:B.media};this.nonNativeCaptionsTracks[A]=_,this.hls.trigger(D.Events.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:[_]})},t.createTextTrack=function(A,B,w){var _=this.media;return _?_.addTextTrack(A,B,w):void 0},t.onMediaAttaching=function(A,B){this.media=B.media,this._cleanTracks()},t.onMediaDetaching=function(){var A=this.captionsTracks;Object.keys(A).forEach(function(B){Object(U.clearCurrentCues)(A[B]),delete A[B]}),this.nonNativeCaptionsTracks={}},t.onManifestLoading=function(){this.lastSn=-1,this.lastPartIndex=-1,this.prevCC=-1,this.vttCCs=s(),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())},t._cleanTracks=function(){var A=this.media;if(!A)return;var B=A.textTracks;if(B)for(var w=0;w<B.length;w++)Object(U.clearCurrentCues)(B[w])},t.onSubtitleTracksUpdated=function(A,B){var w=this;this.textTracks=[];var _=B.subtitleTracks||[],x=_.some(function(o){return o.textCodec===I.IMSC1_CODEC});if(this.config.enableWebVTT||x&&this.config.enableIMSC1){var m=this.tracks&&_&&this.tracks.length===_.length;if(this.tracks=_||[],this.config.renderTextTracksNatively){var c=this.media?this.media.textTracks:[];this.tracks.forEach(function(o,l){var y;if(l<c.length){for(var p=null,f=0;f<c.length;f++)if(a(c[f],o)){p=c[f];break}p&&(y=p)}y?Object(U.clearCurrentCues)(y):(y=w.createTextTrack("subtitles",o.name,o.lang),y&&(y.mode="disabled")),y&&(y.groupId=o.groupId,w.textTracks.push(y))})}else if(!m&&this.tracks&&this.tracks.length){var e=this.tracks.map(function(o){return{label:o.name,kind:o.type.toLowerCase(),default:o.default,subtitleTrack:o}});this.hls.trigger(D.Events.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:e})}}},t.onManifestLoaded=function(A,B){var w=this;this.config.enableCEA708Captions&&B.captions&&B.captions.forEach(function(_){var x=/(?:CC|SERVICE)([1-4])/.exec(_.instreamId);if(!x)return;var m="textTrack"+x[1],c=w.captionsProperties[m];if(!c)return;c.label=_.name,_.lang&&(c.languageCode=_.lang),c.media=_})},t.onFragLoading=function(A,B){var w=this.cea608Parser1,_=this.cea608Parser2,x=this.lastSn,m=this.lastPartIndex;if(!this.enabled||!(w&&_))return;if(B.frag.type===v.PlaylistLevelType.MAIN){var c,e,o=B.frag.sn,l=(c=B==null||((e=B.part)===null||e===void 0)?void 0:e.index)!=null?c:-1;o===x+1||o===x&&l===m+1||(w.reset(),_.reset()),this.lastSn=o,this.lastPartIndex=l}},t.onFragLoaded=function(A,B){var w=B.frag,_=B.payload,x=this.initPTS,m=this.unparsedVttFrags;if(w.type===v.PlaylistLevelType.SUBTITLE)if(_.byteLength){if(!Object(G.isFiniteNumber)(x[w.cc])){m.push(B),x.length&&this.hls.trigger(D.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:w,error:new Error("Missing initial subtitle PTS")});return}var c=w.decryptdata;if(c==null||c.key==null||c.method!=="AES-128"){var e=this.tracks[w.level],o=this.vttCCs;o[w.cc]||(o[w.cc]={start:w.start,prevCC:this.prevCC,new:!0},this.prevCC=w.cc),e&&e.textCodec===I.IMSC1_CODEC?this._parseIMSC1(w,_):this._parseVTTs(w,_,o)}}else this.hls.trigger(D.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:w,error:new Error("Empty subtitle payload")})},t._parseIMSC1=function(A,B){var w=this,_=this.hls;Object(I.parseIMSC1)(B,this.initPTS[A.cc],this.timescale[A.cc],function(x){w._appendCues(x,A.level),_.trigger(D.Events.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:A})},function(x){b.logger.log("Failed to parse IMSC1: "+x),_.trigger(D.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:A,error:x})})},t._parseVTTs=function(A,B,w){var _=this,x=this.hls;Object(F.parseWebVTT)(B,this.initPTS[A.cc],this.timescale[A.cc],w,A.cc,A.start,function(m){_._appendCues(m,A.level),x.trigger(D.Events.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:A})},function(m){_._fallbackToIMSC1(A,B),b.logger.log("Failed to parse VTT cue: "+m),x.trigger(D.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:A,error:m})})},t._fallbackToIMSC1=function(A,B){var w=this,_=this.tracks[A.level];_.textCodec||Object(I.parseIMSC1)(B,this.initPTS[A.cc],this.timescale[A.cc],function(){_.textCodec=I.IMSC1_CODEC,w._parseIMSC1(A,B)},function(){_.textCodec="wvtt"})},t._appendCues=function(A,B){var w=this.hls;if(this.config.renderTextTracksNatively){var _=this.textTracks[B];if(_.mode==="disabled")return;A.forEach(function(c){return Object(U.addCueToTrack)(_,c)})}else{var x=this.tracks[B],m=x.default?"default":"subtitles"+B;w.trigger(D.Events.CUES_PARSED,{type:"subtitles",cues:A,track:m})}},t.onFragDecrypted=function(A,B){var w=B.frag;if(w.type===v.PlaylistLevelType.SUBTITLE){if(!Object(G.isFiniteNumber)(this.initPTS[w.cc])){this.unparsedVttFrags.push(B);return}this.onFragLoaded(D.Events.FRAG_LOADED,B)}},t.onSubtitleTracksCleared=function(){this.tracks=[],this.captionsTracks={}},t.onFragParsingUserdata=function(A,B){var w=this.cea608Parser1,_=this.cea608Parser2;if(!this.enabled||!(w&&_))return;for(var x=0;x<B.samples.length;x++){var m=B.samples[x].bytes;if(m){var c=this.extractCea608Data(m);w.addData(B.samples[x].pts,c[0]),_.addData(B.samples[x].pts,c[1])}}},t.onBufferFlushing=function(A,B){var w=B.startOffset,_=B.endOffset,x=B.endOffsetSubtitles,m=B.type,c=this.media;if(!c||c.currentTime<_)return;if(!m||m==="video"){var e=this.captionsTracks;Object.keys(e).forEach(function(l){return Object(U.removeCuesInRange)(e[l],w,_)})}if(this.config.renderTextTracksNatively&&(w===0&&x!==void 0)){var o=this.textTracks;Object.keys(o).forEach(function(l){return Object(U.removeCuesInRange)(o[l],w,x)})}},t.extractCea608Data=function(A){for(var B=A[0]&31,w=2,_=[[],[]],x=0;x<B;x++){var m=A[w++],c=127&A[w++],e=127&A[w++],o=(4&m)!==0,l=3&m;if(c===0&&e===0)continue;o&&((l===0||l===1)&&(_[l].push(c),_[l].push(e)))}return _},i}();function a(i,t){return i&&i.label===t.name&&!(i.textTrack1||i.textTrack2)}function n(i,t,r,A){return Math.min(t,A)-Math.max(i,r)}function s(){return{ccOffset:0,presentationOffset:0,0:{start:0,prevCC:-1,new:!1}}}},"./src/crypt/aes-crypto.ts":function(ve,X,O){"use strict";O.r(X),O.d(X,"default",function(){return G});var G=function(){function D(z,F){this.subtle=void 0,this.aesIV=void 0,this.subtle=z,this.aesIV=F}var S=D.prototype;return S.decrypt=function(F,U){return this.subtle.decrypt({name:"AES-CBC",iv:this.aesIV},U,F)},D}()},"./src/crypt/aes-decryptor.ts":function(ve,X,O){"use strict";O.r(X),O.d(X,"removePadding",function(){return D}),O.d(X,"default",function(){return S});var G=O("./src/utils/typed-array.ts");function D(z){var F=z.byteLength,U=F&&new DataView(z.buffer).getUint8(F-1);return U?Object(G.sliceUint8)(z,0,F-U):z}var S=function(){function z(){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 F=z.prototype;return F.uint8ArrayToUint32Array_=function(I){for(var v=new DataView(I),b=new Uint32Array(4),u=0;u<4;u++)b[u]=v.getUint32(u*4);return b},F.initTable=function(){var I=this.sBox,v=this.invSBox,b=this.subMix,u=b[0],a=b[1],n=b[2],s=b[3],i=this.invSubMix,t=i[0],r=i[1],A=i[2],B=i[3],w=new Uint32Array(256),_=0,x=0,m=0;for(m=0;m<256;m++)m<128?w[m]=m<<1:w[m]=m<<1^283;for(m=0;m<256;m++){var c=x^x<<1^x<<2^x<<3^x<<4;c=c>>>8^c&255^99,I[_]=c,v[c]=_;var e=w[_],o=w[e],l=w[o],y=w[c]*257^c*16843008;u[_]=y<<24|y>>>8,a[_]=y<<16|y>>>16,n[_]=y<<8|y>>>24,s[_]=y,y=l*16843009^o*65537^e*257^_*16843008,t[c]=y<<24|y>>>8,r[c]=y<<16|y>>>16,A[c]=y<<8|y>>>24,B[c]=y,_?(_=e^w[w[w[l^e]]],x^=w[w[x]]):_=x=1}},F.expandKey=function(I){for(var v=this.uint8ArrayToUint32Array_(I),b=!0,u=0;u<v.length&&b;)b=v[u]===this.key[u],u++;if(b)return;this.key=v;var a=this.keySize=v.length;if(a!==4&&a!==6&&a!==8)throw new Error("Invalid aes key size="+a);var n=this.ksRows=(a+6+1)*4,s,i,t=this.keySchedule=new Uint32Array(n),r=this.invKeySchedule=new Uint32Array(n),A=this.sBox,B=this.rcon,w=this.invSubMix,_=w[0],x=w[1],m=w[2],c=w[3],e,o;for(s=0;s<n;s++){if(s<a){e=t[s]=v[s];continue}o=e,s%a===0?(o=o<<8|o>>>24,o=A[o>>>24]<<24|A[o>>>16&255]<<16|A[o>>>8&255]<<8|A[o&255],o^=B[s/a|0]<<24):a>6&&s%a===4&&(o=A[o>>>24]<<24|A[o>>>16&255]<<16|A[o>>>8&255]<<8|A[o&255]),t[s]=e=(t[s-a]^o)>>>0}for(i=0;i<n;i++)s=n-i,i&3?o=t[s]:o=t[s-4],i<4||s<=4?r[i]=o:r[i]=_[A[o>>>24]]^x[A[o>>>16&255]]^m[A[o>>>8&255]]^c[A[o&255]],r[i]=r[i]>>>0},F.networkToHostOrderSwap=function(I){return I<<24|(I&65280)<<8|(I&16711680)>>8|I>>>24},F.decrypt=function(I,v,b){for(var u=this.keySize+6,a=this.invKeySchedule,n=this.invSBox,s=this.invSubMix,i=s[0],t=s[1],r=s[2],A=s[3],B=this.uint8ArrayToUint32Array_(b),w=B[0],_=B[1],x=B[2],m=B[3],c=new Int32Array(I),e=new Int32Array(c.length),o,l,y,p,f,R,L,H,j,J,M,Y,te,de,fe=this.networkToHostOrderSwap;v<c.length;){for(j=fe(c[v]),J=fe(c[v+1]),M=fe(c[v+2]),Y=fe(c[v+3]),f=j^a[0],R=Y^a[1],L=M^a[2],H=J^a[3],te=4,de=1;de<u;de++)o=i[f>>>24]^t[R>>16&255]^r[L>>8&255]^A[H&255]^a[te],l=i[R>>>24]^t[L>>16&255]^r[H>>8&255]^A[f&255]^a[te+1],y=i[L>>>24]^t[H>>16&255]^r[f>>8&255]^A[R&255]^a[te+2],p=i[H>>>24]^t[f>>16&255]^r[R>>8&255]^A[L&255]^a[te+3],f=o,R=l,L=y,H=p,te=te+4;o=n[f>>>24]<<24^n[R>>16&255]<<16^n[L>>8&255]<<8^n[H&255]^a[te],l=n[R>>>24]<<24^n[L>>16&255]<<16^n[H>>8&255]<<8^n[f&255]^a[te+1],y=n[L>>>24]<<24^n[H>>16&255]<<16^n[f>>8&255]<<8^n[R&255]^a[te+2],p=n[H>>>24]<<24^n[f>>16&255]<<16^n[R>>8&255]<<8^n[L&255]^a[te+3],e[v]=fe(o^w),e[v+1]=fe(p^_),e[v+2]=fe(y^x),e[v+3]=fe(l^m),w=j,_=J,x=M,m=Y,v=v+4}return e.buffer},z}()},"./src/crypt/decrypter.ts":function(ve,X,O){"use strict";O.r(X),O.d(X,"default",function(){return v});var G=O("./src/crypt/aes-crypto.ts"),D=O("./src/crypt/fast-aes-key.ts"),S=O("./src/crypt/aes-decryptor.ts"),z=O("./src/utils/logger.ts"),F=O("./src/utils/mp4-tools.ts"),U=O("./src/utils/typed-array.ts"),I=16,v=function(){function b(a,n,s){var i=s===void 0?{}:s,t=i.removePKCS7Padding,r=t===void 0?!0:t;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=a,this.config=n,this.removePKCS7Padding=r,r)try{var A=self.crypto;A&&(this.subtle=A.subtle||A.webkitSubtle)}catch(B){}this.subtle===null&&(this.config.enableSoftwareAES=!0)}var u=b.prototype;return u.destroy=function(){this.observer=null},u.isSync=function(){return this.config.enableSoftwareAES},u.flush=function(){var n=this.currentResult;if(!n){this.reset();return}var s=new Uint8Array(n);return this.reset(),this.removePKCS7Padding?Object(S.removePadding)(s):s},u.reset=function(){this.currentResult=null,this.currentIV=null,this.remainderData=null,this.softwareDecrypter&&(this.softwareDecrypter=null)},u.decrypt=function(n,s,i,t){if(this.config.enableSoftwareAES){this.softwareDecrypt(new Uint8Array(n),s,i);var r=this.flush();r&&t(r.buffer)}else this.webCryptoDecrypt(new Uint8Array(n),s,i).then(t)},u.softwareDecrypt=function(n,s,i){var t=this.currentIV,r=this.currentResult,A=this.remainderData;this.logOnce("JS AES decrypt"),A&&(n=Object(F.appendUint8Array)(A,n),this.remainderData=null);var B=this.getValidChunk(n);if(!B.length)return null;t&&(i=t);var w=this.softwareDecrypter;w||(w=this.softwareDecrypter=new S.default),w.expandKey(s);var _=r;return this.currentResult=w.decrypt(B.buffer,0,i),this.currentIV=Object(U.sliceUint8)(B,-16).buffer,_||null},u.webCryptoDecrypt=function(n,s,i){var t=this,r=this.subtle;return(this.key!==s||!this.fastAesKey)&&(this.key=s,this.fastAesKey=new D.default(r,s)),this.fastAesKey.expandKey().then(function(A){if(!r)return Promise.reject(new Error("web crypto not initialized"));var B=new G.default(r,i);return B.decrypt(n.buffer,A)}).catch(function(A){return t.onWebCryptoError(A,n,s,i)})},u.onWebCryptoError=function(n,s,i,t){return z.logger.warn("[decrypter.ts]: WebCrypto Error, disable WebCrypto API:",n),this.config.enableSoftwareAES=!0,this.logEnabled=!0,this.softwareDecrypt(s,i,t)},u.getValidChunk=function(n){var s=n,i=n.length-n.length%I;return i!==n.length&&(s=Object(U.sliceUint8)(n,0,i),this.remainderData=Object(U.sliceUint8)(n,i)),s},u.logOnce=function(n){if(!this.logEnabled)return;z.logger.log("[decrypter.ts]: "+n),this.logEnabled=!1},b}()},"./src/crypt/fast-aes-key.ts":function(ve,X,O){"use strict";O.r(X),O.d(X,"default",function(){return G});var G=function(){function D(z,F){this.subtle=void 0,this.key=void 0,this.subtle=z,this.key=F}var S=D.prototype;return S.expandKey=function(){return this.subtle.importKey("raw",this.key,{name:"AES-CBC"},!1,["encrypt","decrypt"])},D}()},"./src/demux/aacdemuxer.ts":function(ve,X,O){"use strict";O.r(X);var G=O("./src/demux/base-audio-demuxer.ts"),D=O("./src/demux/adts.ts"),S=O("./src/utils/logger.ts"),z=O("./src/demux/id3.ts");function F(v,b){v.prototype=Object.create(b.prototype),v.prototype.constructor=v,U(v,b)}function U(v,b){return U=Object.setPrototypeOf||function(a,n){return a.__proto__=n,a},U(v,b)}var I=function(v){F(b,v);function b(a,n){var s;return s=v.call(this)||this,s.observer=void 0,s.config=void 0,s.observer=a,s.config=n,s}var u=b.prototype;return u.resetInitSegment=function(n,s,i){v.prototype.resetInitSegment.call(this,n,s,i),this._audioTrack={container:"audio/adts",type:"audio",id:2,pid:-1,sequenceNumber:0,isAAC:!0,samples:[],manifestCodec:n,duration:i,inputTimeScale:9e4,dropped:0}},b.probe=function(n){if(!n)return!1;for(var s=z.getID3Data(n,0)||[],i=s.length,t=n.length;i<t;i++)if(D.probe(n,i))return S.logger.log("ADTS sync word found !"),!0;return!1},u.canParse=function(n,s){return D.canParse(n,s)},u.appendFrame=function(n,s,i){D.initTrackConfig(n,this.observer,s,i,n.manifestCodec);var t=D.appendFrame(n,s,i,this.initPTS,this.frameIndex);if(t&&t.missing===0)return t},b}(G.default);I.minProbeByteLength=9,X.default=I},"./src/demux/adts.ts":function(ve,X,O){"use strict";O.r(X),O.d(X,"getAudioConfig",function(){return z}),O.d(X,"isHeaderPattern",function(){return F}),O.d(X,"getHeaderLength",function(){return U}),O.d(X,"getFullFrameLength",function(){return I}),O.d(X,"canGetFrameLength",function(){return v}),O.d(X,"isHeader",function(){return b}),O.d(X,"canParse",function(){return u}),O.d(X,"probe",function(){return a}),O.d(X,"initTrackConfig",function(){return n}),O.d(X,"getFrameDuration",function(){return s}),O.d(X,"parseFrameHeader",function(){return i}),O.d(X,"appendFrame",function(){return t});var G=O("./src/utils/logger.ts"),D=O("./src/errors.ts"),S=O("./src/events.ts");function z(r,A,B,w){var _,x,m,c,e=navigator.userAgent.toLowerCase(),o=w,l=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];_=((A[B+2]&192)>>>6)+1;var y=(A[B+2]&60)>>>2;if(y>l.length-1){r.trigger(S.Events.ERROR,{type:D.ErrorTypes.MEDIA_ERROR,details:D.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"invalid ADTS sampling index:"+y});return}return m=(A[B+2]&1)<<2,m|=(A[B+3]&192)>>>6,G.logger.log("manifest codec:"+w+", ADTS type:"+_+", samplingIndex:"+y),/firefox/i.test(e)?y>=6?(_=5,c=new Array(4),x=y-3):(_=2,c=new Array(2),x=y):e.indexOf("android")!==-1?(_=2,c=new Array(2),x=y):(_=5,c=new Array(4),w&&(w.indexOf("mp4a.40.29")!==-1||w.indexOf("mp4a.40.5")!==-1)||!w&&y>=6?x=y-3:((w&&w.indexOf("mp4a.40.2")!==-1&&(y>=6&&m===1||/vivaldi/i.test(e))||!w&&m===1)&&(_=2,c=new Array(2)),x=y)),c[0]=_<<3,c[0]|=(y&14)>>1,c[1]|=(y&1)<<7,c[1]|=m<<3,_===5&&(c[1]|=(x&14)>>1,c[2]=(x&1)<<7,c[2]|=2<<2,c[3]=0),{config:c,samplerate:l[y],channelCount:m,codec:"mp4a.40."+_,manifestCodec:o}}function F(r,A){return r[A]===255&&(r[A+1]&246)===240}function U(r,A){return r[A+1]&1?7:9}function I(r,A){return(r[A+3]&3)<<11|r[A+4]<<3|(r[A+5]&224)>>>5}function v(r,A){return A+5<r.length}function b(r,A){return A+1<r.length&&F(r,A)}function u(r,A){return v(r,A)&&F(r,A)&&I(r,A)<=r.length-A}function a(r,A){if(b(r,A)){var B=U(r,A);if(A+B>=r.length)return!1;var w=I(r,A);if(w<=B)return!1;var _=A+w;return _===r.length||b(r,_)}return!1}function n(r,A,B,w,_){if(!r.samplerate){var x=z(A,B,w,_);if(!x)return;r.config=x.config,r.samplerate=x.samplerate,r.channelCount=x.channelCount,r.codec=x.codec,r.manifestCodec=x.manifestCodec,G.logger.log("parsed codec:"+r.codec+", rate:"+x.samplerate+", channels:"+x.channelCount)}}function s(r){return 1024*9e4/r}function i(r,A,B,w,_){var x=U(r,A),m=I(r,A);if(m-=x,m>0){var c=B+w*_;return{headerLength:x,frameLength:m,stamp:c}}}function t(r,A,B,w,_){var x=s(r.samplerate),m=i(A,B,w,_,x);if(m){var c=m.frameLength,e=m.headerLength,o=m.stamp,l=e+c,y=Math.max(0,B+l-A.length),p;y?(p=new Uint8Array(l-e),p.set(A.subarray(B+e,A.length),0)):p=A.subarray(B+e,B+l);var f={unit:p,pts:o};return y||r.samples.push(f),{sample:f,length:l,missing:y}}}},"./src/demux/base-audio-demuxer.ts":function(ve,X,O){"use strict";O.r(X),O.d(X,"initPTSFn",function(){return I});var G=O("./src/polyfills/number.ts"),D=O("./src/demux/id3.ts"),S=O("./src/demux/dummy-demuxed-track.ts"),z=O("./src/utils/mp4-tools.ts"),F=O("./src/utils/typed-array.ts"),U=function(){function v(){this._audioTrack=void 0,this._id3Track=void 0,this.frameIndex=0,this.cachedData=null,this.initPTS=null}var b=v.prototype;return b.resetInitSegment=function(a,n,s){this._id3Track={type:"id3",id:3,pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0}},b.resetTimeStamp=function(){},b.resetContiguity=function(){},b.canParse=function(a,n){return!1},b.appendFrame=function(a,n,s){},b.demux=function(a,n){this.cachedData&&(a=Object(z.appendUint8Array)(this.cachedData,a),this.cachedData=null);var s=D.getID3Data(a,0),i=s?s.length:0,t,r,A=this._audioTrack,B=this._id3Track,w=s?D.getTimeStamp(s):void 0,_=a.length;for((this.frameIndex===0||this.initPTS===null)&&(this.initPTS=I(w,n)),s&&s.length>0&&B.samples.push({pts:this.initPTS,dts:this.initPTS,data:s}),r=this.initPTS;i<_;){if(this.canParse(a,i)){var x=this.appendFrame(A,a,i);x?(this.frameIndex++,r=x.sample.pts,i+=x.length,t=i):i=_}else D.canParse(a,i)?(s=D.getID3Data(a,i),B.samples.push({pts:r,dts:r,data:s}),i+=s.length,t=i):i++;if(i===_&&t!==_){var m=Object(F.sliceUint8)(a,t);this.cachedData?this.cachedData=Object(z.appendUint8Array)(this.cachedData,m):this.cachedData=m}}return{audioTrack:A,avcTrack:Object(S.dummyTrack)(),id3Track:B,textTrack:Object(S.dummyTrack)()}},b.demuxSampleAes=function(a,n,s){return Promise.reject(new Error("["+this+"] This demuxer does not support Sample-AES decryption"))},b.flush=function(a){var n=this.cachedData;return n&&(this.cachedData=null,this.demux(n,0)),this.frameIndex=0,{audioTrack:this._audioTrack,avcTrack:Object(S.dummyTrack)(),id3Track:this._id3Track,textTrack:Object(S.dummyTrack)()}},b.destroy=function(){},v}(),I=function(b,u){return Object(G.isFiniteNumber)(b)?b*90:u*9e4};X.default=U},"./src/demux/chunk-cache.ts":function(ve,X,O){"use strict";O.r(X),O.d(X,"default",function(){return G});var G=function(){function S(){this.chunks=[],this.dataLength=0}var z=S.prototype;return z.push=function(U){this.chunks.push(U),this.dataLength+=U.length},z.flush=function(){var U=this.chunks,I=this.dataLength,v;if(U.length)U.length===1?v=U[0]:v=D(U,I);else return new Uint8Array(0);return this.reset(),v},z.reset=function(){this.chunks.length=0,this.dataLength=0},S}();function D(S,z){for(var F=new Uint8Array(z),U=0,I=0;I<S.length;I++){var v=S[I];F.set(v,U),U+=v.length}return F}},"./src/demux/dummy-demuxed-track.ts":function(ve,X,O){"use strict";O.r(X),O.d(X,"dummyTrack",function(){return G});function G(){return{type:"",id:-1,pid:-1,inputTimeScale:9e4,sequenceNumber:-1,samples:[],dropped:0}}},"./src/demux/exp-golomb.ts":function(ve,X,O){"use strict";O.r(X);var G=O("./src/utils/logger.ts"),D=function(){function S(F){this.data=void 0,this.bytesAvailable=void 0,this.word=void 0,this.bitsAvailable=void 0,this.data=F,this.bytesAvailable=F.byteLength,this.word=0,this.bitsAvailable=0}var z=S.prototype;return z.loadWord=function(){var U=this.data,I=this.bytesAvailable,v=U.byteLength-I,b=new Uint8Array(4),u=Math.min(4,I);if(u===0)throw new Error("no bytes available");b.set(U.subarray(v,v+u)),this.word=new DataView(b.buffer).getUint32(0),this.bitsAvailable=u*8,this.bytesAvailable-=u},z.skipBits=function(U){var I;this.bitsAvailable>U?(this.word<<=U,this.bitsAvailable-=U):(U-=this.bitsAvailable,I=U>>3,U-=I>>3,this.bytesAvailable-=I,this.loadWord(),this.word<<=U,this.bitsAvailable-=U)},z.readBits=function(U){var I=Math.min(this.bitsAvailable,U),v=this.word>>>32-I;return U>32&&G.logger.error("Cannot read more than 32 bits at a time"),this.bitsAvailable-=I,this.bitsAvailable>0?this.word<<=I:this.bytesAvailable>0&&this.loadWord(),I=U-I,I>0&&this.bitsAvailable?v<<I|this.readBits(I):v},z.skipLZ=function(){var U;for(U=0;U<this.bitsAvailable;++U)if((this.word&2147483648>>>U)!==0)return this.word<<=U,this.bitsAvailable-=U,U;return this.loadWord(),U+this.skipLZ()},z.skipUEG=function(){this.skipBits(1+this.skipLZ())},z.skipEG=function(){this.skipBits(1+this.skipLZ())},z.readUEG=function(){var U=this.skipLZ();return this.readBits(U+1)-1},z.readEG=function(){var U=this.readUEG();return 1&U?1+U>>>1:-1*(U>>>1)},z.readBoolean=function(){return this.readBits(1)===1},z.readUByte=function(){return this.readBits(8)},z.readUShort=function(){return this.readBits(16)},z.readUInt=function(){return this.readBits(32)},z.skipScalingList=function(U){for(var I=8,v=8,b,u=0;u<U;u++)v!==0&&(b=this.readEG(),v=(I+b+256)%256),I=v===0?I:v},z.readSPS=function(){var U=0,I=0,v=0,b=0,u,a,n,s=this.readUByte.bind(this),i=this.readBits.bind(this),t=this.readUEG.bind(this),r=this.readBoolean.bind(this),A=this.skipBits.bind(this),B=this.skipEG.bind(this),w=this.skipUEG.bind(this),_=this.skipScalingList.bind(this);s();var x=s();if(i(5),A(3),s(),w(),x===100||x===110||x===122||x===244||x===44||x===83||x===86||x===118||x===128){var m=t();if(m===3&&A(1),w(),w(),A(1),r())for(a=m!==3?8:12,n=0;n<a;n++)r()&&(n<6?_(16):_(64))}w();var c=t();if(c===0)t();else if(c===1)for(A(1),B(),B(),u=t(),n=0;n<u;n++)B();w(),A(1);var e=t(),o=t(),l=i(1);l===0&&A(1),A(1),r()&&(U=t(),I=t(),v=t(),b=t());var y=[1,1];if(r()&&r()){var p=s();switch(p){case 1:y=[1,1];break;case 2:y=[12,11];break;case 3:y=[10,11];break;case 4:y=[16,11];break;case 5:y=[40,33];break;case 6:y=[24,11];break;case 7:y=[20,11];break;case 8:y=[32,11];break;case 9:y=[80,33];break;case 10:y=[18,11];break;case 11:y=[15,11];break;case 12:y=[64,33];break;case 13:y=[160,99];break;case 14:y=[4,3];break;case 15:y=[3,2];break;case 16:y=[2,1];break;case 255:{y=[s()<<8|s(),s()<<8|s()];break}}}return{width:Math.ceil((e+1)*16-U*2-I*2),height:(2-l)*(o+1)*16-(l?2:4)*(v+b),pixelRatio:y}},z.readSliceType=function(){return this.readUByte(),this.readUEG(),this.readUEG()},S}();X.default=D},"./src/demux/id3.ts":function(ve,X,O){"use strict";O.r(X),O.d(X,"isHeader",function(){return G}),O.d(X,"isFooter",function(){return D}),O.d(X,"getID3Data",function(){return S}),O.d(X,"canParse",function(){return F}),O.d(X,"getTimeStamp",function(){return U}),O.d(X,"isTimeStampFrame",function(){return I}),O.d(X,"getID3Frames",function(){return b}),O.d(X,"decodeFrame",function(){return u}),O.d(X,"utf8ArrayToStr",function(){return t}),O.d(X,"testables",function(){return r});var G=function(_,x){return x+10<=_.length&&(_[x]===73&&_[x+1]===68&&_[x+2]===51&&(_[x+3]<255&&_[x+4]<255&&(_[x+6]<128&&_[x+7]<128&&_[x+8]<128&&_[x+9]<128)))},D=function(_,x){return x+10<=_.length&&(_[x]===51&&_[x+1]===68&&_[x+2]===73&&(_[x+3]<255&&_[x+4]<255&&(_[x+6]<128&&_[x+7]<128&&_[x+8]<128&&_[x+9]<128)))},S=function(_,x){for(var m=x,c=0;G(_,x);){c+=10;var e=z(_,x+6);c+=e,D(_,x+10)&&(c+=10),x+=c}return c>0?_.subarray(m,m+c):void 0},z=function(_,x){var m=0;return m=(_[x]&127)<<21,m|=(_[x+1]&127)<<14,m|=(_[x+2]&127)<<7,m|=_[x+3]&127,m},F=function(_,x){return G(_,x)&&z(_,x+6)+10<=_.length-x},U=function(_){for(var x=b(_),m=0;m<x.length;m++){var c=x[m];if(I(c))return i(c)}return},I=function(_){return _&&_.key==="PRIV"&&_.info==="com.apple.streaming.transportStreamTimestamp"},v=function(_){var x=String.fromCharCode(_[0],_[1],_[2],_[3]),m=z(_,4),c=10;return{type:x,size:m,data:_.subarray(c,c+m)}},b=function(_){for(var x=0,m=[];G(_,x);){var c=z(_,x+6);x+=10;for(var e=x+c;x+8<e;){var o=v(_.subarray(x)),l=u(o);l&&m.push(l),x+=o.size+10}D(_,x)&&(x+=10)}return m},u=function(_){return _.type==="PRIV"?a(_):_.type[0]==="W"?s(_):n(_)},a=function(_){if(_.size<2)return;var x=t(_.data,!0),m=new Uint8Array(_.data.subarray(x.length+1));return{key:_.type,info:x,data:m.buffer}},n=function(_){if(_.size<2)return;if(_.type==="TXXX"){var x=1,m=t(_.data.subarray(x),!0);x+=m.length+1;var c=t(_.data.subarray(x));return{key:_.type,info:m,data:c}}var e=t(_.data.subarray(1));return{key:_.type,data:e}},s=function(_){if(_.type==="WXXX"){if(_.size<2)return;var x=1,m=t(_.data.subarray(x),!0);x+=m.length+1;var c=t(_.data.subarray(x));return{key:_.type,info:m,data:c}}var e=t(_.data);return{key:_.type,data:e}},i=function(_){if(_.data.byteLength===8){var x=new Uint8Array(_.data),m=x[3]&1,c=(x[4]<<23)+(x[5]<<15)+(x[6]<<7)+x[7];return c/=45,m&&(c+=4772185884e-2),Math.round(c)}return},t=function(_,x){x===void 0&&(x=!1);var m=B();if(m){var c=m.decode(_);if(x){var e=c.indexOf("\0");return e!==-1?c.substring(0,e):c}return c.replace(/\0/g,"")}for(var o=_.length,l,y,p,f="",R=0;R<o;){if(l=_[R++],l===0&&x)return f;if(l===0||l===3)continue;switch(l>>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:f+=String.fromCharCode(l);break;case 12:case 13:y=_[R++],f+=String.fromCharCode((l&31)<<6|y&63);break;case 14:y=_[R++],p=_[R++],f+=String.fromCharCode((l&15)<<12|(y&63)<<6|(p&63)<<0);break;default:}}return f},r={decodeTextFrame:n},A;function B(){return!A&&typeof self.TextDecoder!="undefined"&&(A=new self.TextDecoder("utf-8")),A}},"./src/demux/mp3demuxer.ts":function(ve,X,O){"use strict";O.r(X);var G=O("./src/demux/base-audio-demuxer.ts"),D=O("./src/demux/id3.ts"),S=O("./src/utils/logger.ts"),z=O("./src/demux/mpegaudio.ts");function F(v,b){v.prototype=Object.create(b.prototype),v.prototype.constructor=v,U(v,b)}function U(v,b){return U=Object.setPrototypeOf||function(a,n){return a.__proto__=n,a},U(v,b)}var I=function(v){F(b,v);function b(){return v.apply(this,arguments)||this}var u=b.prototype;return u.resetInitSegment=function(n,s,i){v.prototype.resetInitSegment.call(this,n,s,i),this._audioTrack={container:"audio/mpeg",type:"audio",id:2,pid:-1,sequenceNumber:0,isAAC:!1,samples:[],manifestCodec:n,duration:i,inputTimeScale:9e4,dropped:0}},b.probe=function(n){if(!n)return!1;for(var s=D.getID3Data(n,0)||[],i=s.length,t=n.length;i<t;i++)if(z.probe(n,i))return S.logger.log("MPEG Audio sync word found !"),!0;return!1},u.canParse=function(n,s){return z.canParse(n,s)},u.appendFrame=function(n,s,i){return this.initPTS===null?void 0:z.appendFrame(n,s,i,this.initPTS,this.frameIndex)},b}(G.default);I.minProbeByteLength=4,X.default=I},"./src/demux/mp4demuxer.ts":function(ve,X,O){"use strict";O.r(X);var G=O("./src/utils/mp4-tools.ts"),D=O("./src/demux/dummy-demuxed-track.ts"),S=function(){function z(U,I){this.remainderData=null,this.config=void 0,this.config=I}var F=z.prototype;return F.resetTimeStamp=function(){},F.resetInitSegment=function(){},F.resetContiguity=function(){},z.probe=function(I){return Object(G.findBox)({data:I,start:0,end:Math.min(I.length,16384)},["moof"]).length>0},F.demux=function(I){var v=I,b=Object(D.dummyTrack)();if(this.config.progressive){this.remainderData&&(v=Object(G.appendUint8Array)(this.remainderData,I));var u=Object(G.segmentValidRange)(v);this.remainderData=u.remainder,b.samples=u.valid||new Uint8Array}else b.samples=v;return{audioTrack:Object(D.dummyTrack)(),avcTrack:b,id3Track:Object(D.dummyTrack)(),textTrack:Object(D.dummyTrack)()}},F.flush=function(){var I=Object(D.dummyTrack)();return I.samples=this.remainderData||new Uint8Array,this.remainderData=null,{audioTrack:Object(D.dummyTrack)(),avcTrack:I,id3Track:Object(D.dummyTrack)(),textTrack:Object(D.dummyTrack)()}},F.demuxSampleAes=function(I,v,b){return Promise.reject(new Error("The MP4 demuxer does not support SAMPLE-AES decryption"))},F.destroy=function(){},z}();S.minProbeByteLength=1024,X.default=S},"./src/demux/mpegaudio.ts":function(ve,X,O){"use strict";O.r(X),O.d(X,"appendFrame",function(){return U}),O.d(X,"parseHeader",function(){return I}),O.d(X,"isHeaderPattern",function(){return v}),O.d(X,"isHeader",function(){return b}),O.d(X,"canParse",function(){return u}),O.d(X,"probe",function(){return a});var G=null,D=[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],S=[44100,48e3,32e3,22050,24e3,16e3,11025,12e3,8e3],z=[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],F=[0,1,1,4];function U(n,s,i,t,r){if(i+24>s.length)return;var A=I(s,i);if(A&&i+A.frameLength<=s.length){var B=A.samplesPerFrame*9e4/A.sampleRate,w=t+r*B,_={unit:s.subarray(i,i+A.frameLength),pts:w,dts:w};return n.config=[],n.channelCount=A.channelCount,n.samplerate=A.sampleRate,n.samples.push(_),{sample:_,length:A.frameLength,missing:0}}}function I(n,s){var i=n[s+1]>>3&3,t=n[s+1]>>1&3,r=n[s+2]>>4&15,A=n[s+2]>>2&3;if(i!==1&&r!==0&&r!==15&&A!==3){var B=n[s+2]>>1&1,w=n[s+3]>>6,_=i===3?3-t:t===3?3:4,x=D[_*14+r-1]*1e3,m=i===3?0:i===2?1:2,c=S[m*3+A],e=w===3?1:2,o=z[i][t],l=F[t],y=o*8*l,p=Math.floor(o*x/c+B)*l;if(G===null){var f=navigator.userAgent||"",R=f.match(/Chrome\/(\d+)/i);G=R?parseInt(R[1]):0}var L=!!G&&G<=87;return L&&t===2&&x>=224e3&&w===0&&(n[s+3]=n[s+3]|128),{sampleRate:c,channelCount:e,frameLength:p,samplesPerFrame:y}}}function v(n,s){return n[s]===255&&(n[s+1]&224)===224&&(n[s+1]&6)!==0}function b(n,s){return s+1<n.length&&v(n,s)}function u(n,s){var i=4;return v(n,s)&&i<=n.length-s}function a(n,s){if(s+1<n.length&&v(n,s)){var i=4,t=I(n,s),r=i;t!=null&&t.frameLength&&(r=t.frameLength);var A=s+r;return A===n.length||b(n,A)}return!1}},"./src/demux/sample-aes.ts":function(ve,X,O){"use strict";O.r(X);var G=O("./src/crypt/decrypter.ts"),D=O("./src/demux/tsdemuxer.ts"),S=function(){function z(U,I,v){this.keyData=void 0,this.decrypter=void 0,this.keyData=v,this.decrypter=new G.default(U,I,{removePKCS7Padding:!1})}var F=z.prototype;return F.decryptBuffer=function(I,v){this.decrypter.decrypt(I,this.keyData.key.buffer,this.keyData.iv.buffer,v)},F.decryptAacSample=function(I,v,b,u){var a=I[v].unit,n=a.subarray(16,a.length-a.length%16),s=n.buffer.slice(n.byteOffset,n.byteOffset+n.length),i=this;this.decryptBuffer(s,function(t){var r=new Uint8Array(t);a.set(r,16),u||i.decryptAacSamples(I,v+1,b)})},F.decryptAacSamples=function(I,v,b){for(;;v++){if(v>=I.length){b();return}if(I[v].unit.length<32)continue;var u=this.decrypter.isSync();if(this.decryptAacSample(I,v,b,u),!u)return}},F.getAvcEncryptedData=function(I){for(var v=Math.floor((I.length-48)/160)*16+16,b=new Int8Array(v),u=0,a=32;a<=I.length-16;a+=160,u+=16)b.set(I.subarray(a,a+16),u);return b},F.getAvcDecryptedUnit=function(I,v){for(var b=new Uint8Array(v),u=0,a=32;a<=I.length-16;a+=160,u+=16)I.set(b.subarray(u,u+16),a);return I},F.decryptAvcSample=function(I,v,b,u,a,n){var s=Object(D.discardEPB)(a.data),i=this.getAvcEncryptedData(s),t=this;this.decryptBuffer(i.buffer,function(r){a.data=t.getAvcDecryptedUnit(s,r),n||t.decryptAvcSamples(I,v,b+1,u)})},F.decryptAvcSamples=function(I,v,b,u){if(I instanceof Uint8Array)throw new Error("Cannot decrypt samples of type Uint8Array");for(;;v++,b=0){if(v>=I.length){u();return}for(var a=I[v].units;!(b>=a.length);b++){var n=a[b];if(n.data.length<=48||n.type!==1&&n.type!==5)continue;var s=this.decrypter.isSync();if(this.decryptAvcSample(I,v,b,u,n,s),!s)return}}},z}();X.default=S},"./src/demux/transmuxer-interface.ts":function(ve,X,O){"use strict";O.r(X),O.d(X,"default",function(){return a});var G=O("./node_modules/webworkify-webpack/index.js"),D=O.n(G),S=O("./src/events.ts"),z=O("./src/demux/transmuxer.ts"),F=O("./src/utils/logger.ts"),U=O("./src/errors.ts"),I=O("./src/utils/mediasource-helper.ts"),v=O("./node_modules/eventemitter3/index.js"),b=O.n(v),u=Object(I.getMediaSource)()||{isTypeSupported:function(){return!1}},a=function(){function n(i,t,r,A){var B=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=i,this.id=t,this.onTransmuxComplete=r,this.onFlush=A;var w=i.config,_=function(o,l){l=l||{},l.frag=B.frag,l.id=B.id,i.trigger(o,l)};this.observer=new v.EventEmitter,this.observer.on(S.Events.FRAG_DECRYPTED,_),this.observer.on(S.Events.ERROR,_);var x={mp4:u.isTypeSupported("video/mp4"),mpeg:u.isTypeSupported("audio/mpeg"),mp3:u.isTypeSupported('audio/mp4; codecs="mp3"')},m=navigator.vendor;if(w.enableWorker&&typeof Worker!="undefined"){F.logger.log("demuxing in webworker");var c;try{c=this.worker=G("./src/demux/transmuxer-worker.ts"),this.onwmsg=this.onWorkerMessage.bind(this),c.addEventListener("message",this.onwmsg),c.onerror=function(e){i.trigger(S.Events.ERROR,{type:U.ErrorTypes.OTHER_ERROR,details:U.ErrorDetails.INTERNAL_EXCEPTION,fatal:!0,event:"demuxerWorker",error:new Error(e.message+" ("+e.filename+":"+e.lineno+")")})},c.postMessage({cmd:"init",typeSupported:x,vendor:m,id:t,config:JSON.stringify(w)})}catch(e){F.logger.warn("Error in worker:",e),F.logger.error("Error while initializing DemuxerWorker, fallback to inline"),c&&self.URL.revokeObjectURL(c.objectURL),this.transmuxer=new z.default(this.observer,x,w,m,t),this.worker=null}}else this.transmuxer=new z.default(this.observer,x,w,m,t)}var s=n.prototype;return s.destroy=function(){var t=this.worker;if(t)t.removeEventListener("message",this.onwmsg),t.terminate(),this.worker=null;else{var r=this.transmuxer;r&&(r.destroy(),this.transmuxer=null)}var A=this.observer;A&&A.removeAllListeners(),this.observer=null},s.push=function(t,r,A,B,w,_,x,m,c,e){var o=this;c.transmuxing.start=self.performance.now();var l=this.transmuxer,y=this.worker,p=_?_.start:w.start,f=w.decryptdata,R=this.frag,L=!(R&&w.cc===R.cc),H=!(R&&c.level===R.level),j=R?c.sn-R.sn:-1,J=this.part?c.part-this.part.index:1,M=!H&&(j===1||j===0&&J===1),Y=self.performance.now();(H||j||w.stats.parsing.start===0)&&(w.stats.parsing.start=Y),_&&(J||!M)&&(_.stats.parsing.start=Y);var te=new z.TransmuxState(L,M,m,H,p);if(!M||L){F.logger.log("[transmuxer-interface, "+w.type+"]: Starting new transmux session for sn: "+c.sn+" p: "+c.part+" level: "+c.level+" id: "+c.id+`
discontinuity: `+L+`
trackSwitch: `+H+`
contiguous: `+M+`
accurateTimeOffset: `+m+`
timeOffset: `+p);var de=new z.TransmuxConfig(A,B,r,x,e);this.configureTransmuxer(de)}if(this.frag=w,this.part=_,y)y.postMessage({cmd:"demux",data:t,decryptdata:f,chunkMeta:c,state:te},t instanceof ArrayBuffer?[t]:[]);else if(l){var fe=l.push(t,f,c,te);Object(z.isPromise)(fe)?fe.then(function(Le){o.handleTransmuxComplete(Le)}):this.handleTransmuxComplete(fe)}},s.flush=function(t){var r=this;t.transmuxing.start=self.performance.now();var A=this.transmuxer,B=this.worker;if(B)B.postMessage({cmd:"flush",chunkMeta:t});else if(A){var w=A.flush(t);Object(z.isPromise)(w)?w.then(function(_){r.handleFlushResult(_,t)}):this.handleFlushResult(w,t)}},s.handleFlushResult=function(t,r){var A=this;t.forEach(function(B){A.handleTransmuxComplete(B)}),this.onFlush(r)},s.onWorkerMessage=function(t){var r=t.data,A=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,A.trigger(r.event,r.data);break}}},s.configureTransmuxer=function(t){var r=this.worker,A=this.transmuxer;r?r.postMessage({cmd:"configure",config:t}):A&&A.configure(t)},s.handleTransmuxComplete=function(t){t.chunkMeta.transmuxing.end=self.performance.now(),this.onTransmuxComplete(t)},n}()},"./src/demux/transmuxer-worker.ts":function(ve,X,O){"use strict";O.r(X),O.d(X,"default",function(){return U});var G=O("./src/demux/transmuxer.ts"),D=O("./src/events.ts"),S=O("./src/utils/logger.ts"),z=O("./node_modules/eventemitter3/index.js"),F=O.n(z);function U(a){var n=new z.EventEmitter,s=function(t,r){a.postMessage({event:t,data:r})};n.on(D.Events.FRAG_DECRYPTED,s),n.on(D.Events.ERROR,s),a.addEventListener("message",function(i){var t=i.data;switch(t.cmd){case"init":{var r=JSON.parse(t.config);a.transmuxer=new G.default(n,t.typeSupported,r,t.vendor,t.id),Object(S.enableLogs)(r.debug),s("init",null);break}case"configure":{a.transmuxer.configure(t.config);break}case"demux":{var A=a.transmuxer.push(t.data,t.decryptdata,t.chunkMeta,t.state);Object(G.isPromise)(A)?A.then(function(_){I(a,_)}):I(a,A);break}case"flush":{var B=t.chunkMeta,w=a.transmuxer.flush(B);Object(G.isPromise)(w)?w.then(function(_){b(a,_,B)}):b(a,w,B);break}default:break}})}function I(a,n){if(u(n.remuxResult))return;var s=[],i=n.remuxResult,t=i.audio,r=i.video;t&&v(s,t),r&&v(s,r),a.postMessage({event:"transmuxComplete",data:n},s)}function v(a,n){n.data1&&a.push(n.data1.buffer),n.data2&&a.push(n.data2.buffer)}function b(a,n,s){n.forEach(function(i){I(a,i)}),a.postMessage({event:"flush",data:s})}function u(a){return!a.audio&&!a.video&&!a.text&&!a.id3&&!a.initSegment}},"./src/demux/transmuxer.ts":function(ve,X,O){"use strict";O.r(X),O.d(X,"default",function(){return r}),O.d(X,"isPromise",function(){return w}),O.d(X,"TransmuxConfig",function(){return _}),O.d(X,"TransmuxState",function(){return x});var G=O("./src/events.ts"),D=O("./src/errors.ts"),S=O("./src/crypt/decrypter.ts"),z=O("./src/demux/aacdemuxer.ts"),F=O("./src/demux/mp4demuxer.ts"),U=O("./src/demux/tsdemuxer.ts"),I=O("./src/demux/mp3demuxer.ts"),v=O("./src/remux/mp4-remuxer.ts"),b=O("./src/remux/passthrough-remuxer.ts"),u=O("./src/demux/chunk-cache.ts"),a=O("./src/utils/mp4-tools.ts"),n=O("./src/utils/logger.ts"),s;try{s=self.performance.now.bind(self.performance)}catch(m){n.logger.debug("Unable to use Performance API on this environment"),s=self.Date.now}var i=[{demux:U.default,remux:v.default},{demux:F.default,remux:b.default},{demux:z.default,remux:v.default},{demux:I.default,remux:v.default}],t=1024;i.forEach(function(m){var c=m.demux;t=Math.max(t,c.minProbeByteLength)});var r=function(){function m(e,o,l,y,p){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=e,this.typeSupported=o,this.config=l,this.vendor=y,this.id=p}var c=m.prototype;return c.configure=function(o){this.transmuxConfig=o,this.decrypter&&this.decrypter.reset()},c.push=function(o,l,y,p){var f=this,R=y.transmuxing;R.executeStart=s();var L=new Uint8Array(o),H=this.cache,j=this.config,J=this.currentTransmuxState,M=this.transmuxConfig;p&&(this.currentTransmuxState=p);var Y=A(L,l);if(Y&&Y.method==="AES-128"){var te=this.getDecrypter();if(j.enableSoftwareAES){var de=te.softwareDecrypt(L,Y.key.buffer,Y.iv.buffer);if(!de)return R.executeEnd=s(),B(y);L=new Uint8Array(de)}else return this.decryptionPromise=te.webCryptoDecrypt(L,Y.key.buffer,Y.iv.buffer).then(function(K){var W=f.push(K,null,y);return f.decryptionPromise=null,W}),this.decryptionPromise}var fe=p||J,Le=fe.contiguous,xe=fe.discontinuity,Ie=fe.trackSwitch,Fe=fe.accurateTimeOffset,Ue=fe.timeOffset,be=M.audioCodec,ue=M.videoCodec,je=M.defaultInitPts,st=M.duration,nt=M.initSegmentData;if((xe||Ie)&&this.resetInitSegment(nt,be,ue,st),xe&&this.resetInitialTimestamp(je),Le||this.resetContiguity(),this.needsProbing(L,xe,Ie)){if(H.dataLength){var rt=H.flush();L=Object(a.appendUint8Array)(rt,L)}this.configureTransmuxer(L,M)}var He=this.transmux(L,Y,Ue,Fe,y),re=this.currentTransmuxState;return re.contiguous=!0,re.discontinuity=!1,re.trackSwitch=!1,R.executeEnd=s(),He},c.flush=function(o){var l=this,y=o.transmuxing;y.executeStart=s();var p=this.decrypter,f=this.cache,R=this.currentTransmuxState,L=this.decryptionPromise;if(L)return L.then(function(){return l.flush(o)});var H=[],j=R.timeOffset;if(p){var J=p.flush();J&&H.push(this.push(J,null,o))}var M=f.dataLength;f.reset();var Y=this.demuxer,te=this.remuxer;if(!Y||!te)return M>=t&&this.observer.emit(G.Events.ERROR,G.Events.ERROR,{type:D.ErrorTypes.MEDIA_ERROR,details:D.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"no demux matching with content found"}),y.executeEnd=s(),[B(o)];var de=Y.flush(j);return w(de)?de.then(function(fe){return l.flushRemux(H,fe,o),H}):(this.flushRemux(H,de,o),H)},c.flushRemux=function(o,l,y){var p=l.audioTrack,f=l.avcTrack,R=l.id3Track,L=l.textTrack,H=this.currentTransmuxState,j=H.accurateTimeOffset,J=H.timeOffset;n.logger.log("[transmuxer.ts]: Flushed fragment "+y.sn+(y.part>-1?" p: "+y.part:"")+" of level "+y.level);var M=this.remuxer.remux(p,f,R,L,J,j,!0,this.id);o.push({remuxResult:M,chunkMeta:y}),y.transmuxing.executeEnd=s()},c.resetInitialTimestamp=function(o){var l=this.demuxer,y=this.remuxer;if(!l||!y)return;l.resetTimeStamp(o),y.resetTimeStamp(o)},c.resetContiguity=function(){var o=this.demuxer,l=this.remuxer;if(!o||!l)return;o.resetContiguity(),l.resetNextTimestamp()},c.resetInitSegment=function(o,l,y,p){var f=this.demuxer,R=this.remuxer;if(!f||!R)return;f.resetInitSegment(l,y,p),R.resetInitSegment(o,l,y)},c.destroy=function(){this.demuxer&&(this.demuxer.destroy(),this.demuxer=void 0),this.remuxer&&(this.remuxer.destroy(),this.remuxer=void 0)},c.transmux=function(o,l,y,p,f){var R;return l&&l.method==="SAMPLE-AES"?R=this.transmuxSampleAes(o,l,y,p,f):R=this.transmuxUnencrypted(o,y,p,f),R},c.transmuxUnencrypted=function(o,l,y,p){var f=this.demuxer.demux(o,l,!1,!this.config.progressive),R=f.audioTrack,L=f.avcTrack,H=f.id3Track,j=f.textTrack,J=this.remuxer.remux(R,L,H,j,l,y,!1,this.id);return{remuxResult:J,chunkMeta:p}},c.transmuxSampleAes=function(o,l,y,p,f){var R=this;return this.demuxer.demuxSampleAes(o,l,y).then(function(L){var H=R.remuxer.remux(L.audioTrack,L.avcTrack,L.id3Track,L.textTrack,y,p,!1,R.id);return{remuxResult:H,chunkMeta:f}})},c.configureTransmuxer=function(o,l){for(var y=this.config,p=this.observer,f=this.typeSupported,R=this.vendor,L=l.audioCodec,H=l.defaultInitPts,j=l.duration,J=l.initSegmentData,M=l.videoCodec,Y,te=0,de=i.length;te<de;te++)if(i[te].demux.probe(o)){Y=i[te];break}Y||(n.logger.warn("Failed to find demuxer by probing frag, treating as mp4 passthrough"),Y={demux:F.default,remux:b.default});var fe=this.demuxer,Le=this.remuxer,xe=Y.remux,Ie=Y.demux;(!Le||!(Le instanceof xe))&&(this.remuxer=new xe(p,y,f,R)),(!fe||!(fe instanceof Ie))&&(this.demuxer=new Ie(p,y,f),this.probe=Ie.probe),this.resetInitSegment(J,L,M,j),this.resetInitialTimestamp(H)},c.needsProbing=function(o,l,y){return!this.demuxer||!this.remuxer||l||y},c.getDecrypter=function(){var o=this.decrypter;return o||(o=this.decrypter=new S.default(this.observer,this.config)),o},m}();function A(m,c){var e=null;return m.byteLength>0&&c!=null&&c.key!=null&&c.iv!==null&&c.method!=null&&(e=c),e}var B=function(c){return{remuxResult:{},chunkMeta:c}};function w(m){return"then"in m&&m.then instanceof Function}var _=function(c,e,o,l,y){this.audioCodec=void 0,this.videoCodec=void 0,this.initSegmentData=void 0,this.duration=void 0,this.defaultInitPts=void 0,this.audioCodec=c,this.videoCodec=e,this.initSegmentData=o,this.duration=l,this.defaultInitPts=y},x=function(c,e,o,l,y){this.discontinuity=void 0,this.contiguous=void 0,this.accurateTimeOffset=void 0,this.trackSwitch=void 0,this.timeOffset=void 0,this.discontinuity=c,this.contiguous=e,this.accurateTimeOffset=o,this.trackSwitch=l,this.timeOffset=y}},"./src/demux/tsdemuxer.ts":function(ve,X,O){"use strict";O.r(X),O.d(X,"discardEPB",function(){return B});var G=O("./src/demux/adts.ts"),D=O("./src/demux/mpegaudio.ts"),S=O("./src/demux/exp-golomb.ts"),z=O("./src/demux/id3.ts"),F=O("./src/demux/sample-aes.ts"),U=O("./src/events.ts"),I=O("./src/utils/mp4-tools.ts"),v=O("./src/utils/logger.ts"),b=O("./src/errors.ts"),u={video:1,audio:2,id3:3,text:4},a=function(){function w(x,m,c){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=m,this.typeSupported=c}w.probe=function(m){var c=w.syncOffset(m);return c<0?!1:(c&&v.logger.warn("MPEG2-TS detected but first sync word found @ offset "+c+", junk ahead ?"),!0)},w.syncOffset=function(m){for(var c=Math.min(1e3,m.length-3*188),e=0;e<c;){if(m[e]===71&&m[e+188]===71&&m[e+2*188]===71)return e;e++}return-1},w.createTrack=function(m,c){return{container:m==="video"||m==="audio"?"video/mp2t":void 0,type:m,id:u[m],pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0,duration:m==="audio"?c:void 0}};var _=w.prototype;return _.resetInitSegment=function(m,c,e){this.pmtParsed=!1,this._pmtId=-1,this._avcTrack=w.createTrack("video",e),this._audioTrack=w.createTrack("audio",e),this._id3Track=w.createTrack("id3",e),this._txtTrack=w.createTrack("text",e),this._audioTrack.isAAC=!0,this.aacOverFlow=null,this.aacLastPTS=null,this.avcSample=null,this.audioCodec=m,this.videoCodec=c,this._duration=e},_.resetTimeStamp=function(){},_.resetContiguity=function(){var m=this._audioTrack,c=this._avcTrack,e=this._id3Track;m&&(m.pesData=null),c&&(c.pesData=null),e&&(e.pesData=null),this.aacOverFlow=null,this.aacLastPTS=null},_.demux=function(m,c,e,o){e===void 0&&(e=!1),o===void 0&&(o=!1),e||(this.sampleAes=null);var l,y=this._avcTrack,p=this._audioTrack,f=this._id3Track,R=y.pid,L=y.pesData,H=p.pid,j=f.pid,J=p.pesData,M=f.pesData,Y=!1,te=this.pmtParsed,de=this._pmtId,fe=m.length;if(this.remainderData&&(m=Object(I.appendUint8Array)(this.remainderData,m),fe=m.length,this.remainderData=null),fe<188&&!o)return this.remainderData=m,{audioTrack:p,avcTrack:y,id3Track:f,textTrack:this._txtTrack};var Le=Math.max(0,w.syncOffset(m));fe-=(fe+Le)%188,fe<m.byteLength&&!o&&(this.remainderData=new Uint8Array(m.buffer,fe,m.buffer.byteLength-fe));for(var xe=Le;xe<fe;xe+=188)if(m[xe]===71){var Ie=!!(m[xe+1]&64),Fe=((m[xe+1]&31)<<8)+m[xe+2],Ue=(m[xe+3]&48)>>4,be=void 0;if(Ue>1){if(be=xe+5+m[xe+4],be===xe+188)continue}else be=xe+4;switch(Fe){case R:Ie&&(L&&(l=t(L))&&this.parseAVCPES(l,!1),L={data:[],size:0}),L&&(L.data.push(m.subarray(be,xe+188)),L.size+=xe+188-be);break;case H:Ie&&(J&&(l=t(J))&&(p.isAAC?this.parseAACPES(l):this.parseMPEGPES(l)),J={data:[],size:0}),J&&(J.data.push(m.subarray(be,xe+188)),J.size+=xe+188-be);break;case j:Ie&&(M&&(l=t(M))&&this.parseID3PES(l),M={data:[],size:0}),M&&(M.data.push(m.subarray(be,xe+188)),M.size+=xe+188-be);break;case 0:Ie&&(be+=m[be]+1),de=this._pmtId=s(m,be);break;case de:{Ie&&(be+=m[be]+1);var ue=i(m,be,this.typeSupported.mpeg===!0||this.typeSupported.mp3===!0,e);R=ue.avc,R>0&&(y.pid=R),H=ue.audio,H>0&&(p.pid=H,p.isAAC=ue.isAAC),j=ue.id3,j>0&&(f.pid=j),Y&&!te&&(v.logger.log("reparse from beginning"),Y=!1,xe=Le-188),te=this.pmtParsed=!0;break}case 17:case 8191:break;default:Y=!0;break}}else this.observer.emit(U.Events.ERROR,U.Events.ERROR,{type:b.ErrorTypes.MEDIA_ERROR,details:b.ErrorDetails.FRAG_PARSING_ERROR,fatal:!1,reason:"TS packet did not start with 0x47"});y.pesData=L,p.pesData=J,f.pesData=M;var je={audioTrack:p,avcTrack:y,id3Track:f,textTrack:this._txtTrack};return o&&this.extractRemainingSamples(je),je},_.flush=function(){var m=this.remainderData;this.remainderData=null;var c;return m?c=this.demux(m,-1,!1,!0):c={audioTrack:this._audioTrack,avcTrack:this._avcTrack,textTrack:this._txtTrack,id3Track:this._id3Track},this.extractRemainingSamples(c),this.sampleAes?this.decrypt(c,this.sampleAes):c},_.extractRemainingSamples=function(m){var c=m.audioTrack,e=m.avcTrack,o=m.id3Track,l=e.pesData,y=c.pesData,p=o.pesData,f;l&&(f=t(l))?(this.parseAVCPES(f,!0),e.pesData=null):e.pesData=l,y&&(f=t(y))?(c.isAAC?this.parseAACPES(f):this.parseMPEGPES(f),c.pesData=null):(y!=null&&y.size&&v.logger.log("last AAC PES packet truncated,might overlap between fragments"),c.pesData=y),p&&(f=t(p))?(this.parseID3PES(f),o.pesData=null):o.pesData=p},_.demuxSampleAes=function(m,c,e){var o=this.demux(m,e,!0,!this.config.progressive),l=this.sampleAes=new F.default(this.observer,this.config,c);return this.decrypt(o,l)},_.decrypt=function(m,c){return new Promise(function(e){var o=m.audioTrack,l=m.avcTrack;o.samples&&o.isAAC?c.decryptAacSamples(o.samples,0,function(){l.samples?c.decryptAvcSamples(l.samples,0,0,function(){e(m)}):e(m)}):l.samples&&c.decryptAvcSamples(l.samples,0,0,function(){e(m)})})},_.destroy=function(){this._initPTS=this._initDTS=null,this._duration=0},_.parseAVCPES=function(m,c){var e=this,o=this._avcTrack,l=this.parseAVCNALu(m.data),y=!1,p=this.avcSample,f,R=!1;m.data=null,p&&l.length&&!o.audFound&&(r(p,o),p=this.avcSample=n(!1,m.pts,m.dts,"")),l.forEach(function(L){switch(L.type){case 1:{f=!0,p||(p=e.avcSample=n(!0,m.pts,m.dts,"")),y&&(p.debug+="NDR "),p.frame=!0;var H=L.data;if(R&&H.length>4){var j=new S.default(H).readSliceType();(j===2||j===4||j===7||j===9)&&(p.key=!0)}break}case 5:f=!0,p||(p=e.avcSample=n(!0,m.pts,m.dts,"")),y&&(p.debug+="IDR "),p.key=!0,p.frame=!0;break;case 6:{f=!0,y&&p&&(p.debug+="SEI ");var J=new S.default(B(L.data));J.readUByte();for(var M=0,Y=0,te=!1,de=0;!te&&J.bytesAvailable>1;){M=0;do de=J.readUByte(),M+=de;while(de===255);Y=0;do de=J.readUByte(),Y+=de;while(de===255);if(M===4&&J.bytesAvailable!==0){te=!0;var fe=J.readUByte();if(fe===181){var Le=J.readUShort();if(Le===49){var xe=J.readUInt();if(xe===1195456820){var Ie=J.readUByte();if(Ie===3){for(var Fe=J.readUByte(),Ue=J.readUByte(),be=31&Fe,ue=[Fe,Ue],je=0;je<be;je++)ue.push(J.readUByte()),ue.push(J.readUByte()),ue.push(J.readUByte());A(e._txtTrack.samples,{type:3,pts:m.pts,bytes:ue})}}}}}else if(M===5&&J.bytesAvailable!==0){if(te=!0,Y>16){for(var st=[],nt=0;nt<16;nt++)st.push(J.readUByte().toString(16)),(nt===3||nt===5||nt===7||nt===9)&&st.push("-");for(var rt=Y-16,He=new Uint8Array(rt),re=0;re<rt;re++)He[re]=J.readUByte();A(e._txtTrack.samples,{pts:m.pts,payloadType:M,uuid:st.join(""),userData:Object(z.utf8ArrayToStr)(He),userDataBytes:He})}}else if(Y<J.bytesAvailable)for(var K=0;K<Y;K++)J.readUByte()}break}case 7:if(f=!0,R=!0,y&&p&&(p.debug+="SPS "),!o.sps){var W=new S.default(L.data),se=W.readSPS();o.width=se.width,o.height=se.height,o.pixelRatio=se.pixelRatio,o.sps=[L.data],o.duration=e._duration;for(var ye=L.data.subarray(1,4),we="avc1.",_e=0;_e<3;_e++){var $e=ye[_e].toString(16);$e.length<2&&($e="0"+$e),we+=$e}o.codec=we}break;case 8:f=!0,y&&p&&(p.debug+="PPS "),o.pps||(o.pps=[L.data]);break;case 9:f=!1,o.audFound=!0,p&&r(p,o),p=e.avcSample=n(!1,m.pts,m.dts,y?"AUD ":"");break;case 12:f=!1;break;default:f=!1,p&&(p.debug+="unknown NAL "+L.type+" ");break}if(p&&f){var qe=p.units;qe.push(L)}}),c&&p&&(r(p,o),this.avcSample=null)},_.getLastNalUnit=function(){var m,c=this.avcSample,e;if(!c||c.units.length===0){var o=this._avcTrack.samples;c=o[o.length-1]}if((m=c)!==null&&m!==void 0&&m.units){var l=c.units;e=l[l.length-1]}return e},_.parseAVCNALu=function(m){var c=m.byteLength,e=this._avcTrack,o=e.naluState||0,l=o,y=[],p=0,f,R,L,H=-1,j=0;for(o===-1&&(H=0,j=m[0]&31,o=0,p=1);p<c;){if(f=m[p++],!o){o=f?0:1;continue}if(o===1){o=f?0:2;continue}if(!f)o=3;else if(f===1){if(H>=0){var J={data:m.subarray(H,p-o-1),type:j};y.push(J)}else{var M=this.getLastNalUnit();if(M&&(l&&p<=4-l&&(M.state&&(M.data=M.data.subarray(0,M.data.byteLength-l))),R=p-o-1,R>0)){var Y=new Uint8Array(M.data.byteLength+R);Y.set(M.data,0),Y.set(m.subarray(0,R),M.data.byteLength),M.data=Y,M.state=0}}p<c?(L=m[p]&31,H=p,j=L,o=0):o=-1}else o=0}if(H>=0&&o>=0){var te={data:m.subarray(H,c),type:j,state:o};y.push(te)}if(y.length===0){var de=this.getLastNalUnit();if(de){var fe=new Uint8Array(de.data.byteLength+m.byteLength);fe.set(de.data,0),fe.set(m,de.data.byteLength),de.data=fe}}return e.naluState=o,y},_.parseAACPES=function(m){var c=0,e=this._audioTrack,o=this.aacOverFlow,l=m.data;if(o){this.aacOverFlow=null;var y=o.sample.unit.byteLength,p=Math.min(o.missing,y),f=y-p;o.sample.unit.set(l.subarray(0,p),f),e.samples.push(o.sample),c=o.missing}var R,L;for(R=c,L=l.length;R<L-1&&!G.isHeader(l,R);R++);if(R!==c){var H,j;if(R<L-1?(H="AAC PES did not start with ADTS header,offset:"+R,j=!1):(H="no ADTS header found in AAC PES",j=!0),v.logger.warn("parsing error:"+H),this.observer.emit(U.Events.ERROR,U.Events.ERROR,{type:b.ErrorTypes.MEDIA_ERROR,details:b.ErrorDetails.FRAG_PARSING_ERROR,fatal:j,reason:H}),j)return}G.initTrackConfig(e,this.observer,l,R,this.audioCodec);var J;if(m.pts!==void 0)J=m.pts;else if(o){var M=G.getFrameDuration(e.samplerate);J=o.sample.pts+M}else{v.logger.warn("[tsdemuxer]: AAC PES unknown PTS");return}for(var Y=0;R<L;)if(G.isHeader(l,R)){if(R+5<L){var te=G.appendFrame(e,l,R,J,Y);if(te)if(te.missing)this.aacOverFlow=te;else{R+=te.length,Y++;continue}}break}else R++},_.parseMPEGPES=function(m){var c=m.data,e=c.length,o=0,l=0,y=m.pts;if(y===void 0){v.logger.warn("[tsdemuxer]: MPEG PES unknown PTS");return}for(;l<e;)if(D.isHeader(c,l)){var p=D.appendFrame(this._audioTrack,c,l,y,o);if(p)l+=p.length,o++;else break}else l++},_.parseID3PES=function(m){if(m.pts===void 0){v.logger.warn("[tsdemuxer]: ID3 PES unknown PTS");return}this._id3Track.samples.push(m)},w}();a.minProbeByteLength=188;function n(w,_,x,m){return{key:w,frame:!1,pts:_,dts:x,units:[],debug:m,length:0}}function s(w,_){return(w[_+10]&31)<<8|w[_+11]}function i(w,_,x,m){var c={audio:-1,avc:-1,id3:-1,isAAC:!0},e=(w[_+1]&15)<<8|w[_+2],o=_+3+e-4,l=(w[_+10]&15)<<8|w[_+11];for(_+=12+l;_<o;){var y=(w[_+1]&31)<<8|w[_+2];switch(w[_]){case 207:if(!m){v.logger.log("ADTS AAC with AES-128-CBC frame encryption found in unencrypted stream");break}case 15:c.audio===-1&&(c.audio=y);break;case 21:c.id3===-1&&(c.id3=y);break;case 219:if(!m){v.logger.log("H.264 with AES-128-CBC slice encryption found in unencrypted stream");break}case 27:c.avc===-1&&(c.avc=y);break;case 3:case 4:x?c.audio===-1&&(c.audio=y,c.isAAC=!1):v.logger.log("MPEG audio found, not supported in this browser");break;case 36:v.logger.warn("Unsupported HEVC stream type found");break;default:break}_+=((w[_+3]&15)<<8|w[_+4])+5}return c}function t(w){var _=0,x,m,c,e,o,l=w.data;if(!w||w.size===0)return null;for(;l[0].length<19&&l.length>1;){var y=new Uint8Array(l[0].length+l[1].length);y.set(l[0]),y.set(l[1],l[0].length),l[0]=y,l.splice(1,1)}x=l[0];var p=(x[0]<<16)+(x[1]<<8)+x[2];if(p===1){if(m=(x[4]<<8)+x[5],m&&m>w.size-6)return null;var f=x[7];f&192&&(e=(x[9]&14)*536870912+(x[10]&255)*4194304+(x[11]&254)*16384+(x[12]&255)*128+(x[13]&254)/2,f&64?(o=(x[14]&14)*536870912+(x[15]&255)*4194304+(x[16]&254)*16384+(x[17]&255)*128+(x[18]&254)/2,e-o>60*9e4&&(v.logger.warn(Math.round((e-o)/9e4)+"s delta between PTS and DTS, align them"),e=o)):o=e),c=x[8];var R=c+9;if(w.size<=R)return null;w.size-=R;for(var L=new Uint8Array(w.size),H=0,j=l.length;H<j;H++){x=l[H];var J=x.byteLength;if(R)if(R>J){R-=J;continue}else x=x.subarray(R),J-=R,R=0;L.set(x,_),_+=J}return m&&(m-=c+3),{data:L,pts:e,dts:o,len:m}}return null}function r(w,_){if(w.units.length&&w.frame){if(w.pts===void 0){var x=_.samples,m=x.length;if(m){var c=x[m-1];w.pts=c.pts,w.dts=c.dts}else{_.dropped++;return}}_.samples.push(w)}w.debug.length&&v.logger.log(w.pts+"/"+w.dts+":"+w.debug)}function A(w,_){var x=w.length;if(x>0){if(_.pts>=w[x-1].pts)w.push(_);else for(var m=x-1;m>=0;m--)if(_.pts<w[m].pts){w.splice(m,0,_);break}}else w.push(_)}function B(w){for(var _=w.byteLength,x=[],m=1;m<_-2;)w[m]===0&&w[m+1]===0&&w[m+2]===3?(x.push(m+2),m+=2):m++;if(x.length===0)return w;var c=_-x.length,e=new Uint8Array(c),o=0;for(m=0;m<c;o++,m++)o===x[0]&&(o++,x.shift()),e[m]=w[o];return e}X.default=a},"./src/errors.ts":function(ve,X,O){"use strict";O.r(X),O.d(X,"ErrorTypes",function(){return G}),O.d(X,"ErrorDetails",function(){return D});var G;(function(S){S.NETWORK_ERROR="networkError",S.MEDIA_ERROR="mediaError",S.KEY_SYSTEM_ERROR="keySystemError",S.MUX_ERROR="muxError",S.OTHER_ERROR="otherError"})(G||(G={}));var D;(function(S){S.KEY_SYSTEM_NO_KEYS="keySystemNoKeys",S.KEY_SYSTEM_NO_ACCESS="keySystemNoAccess",S.KEY_SYSTEM_NO_SESSION="keySystemNoSession",S.KEY_SYSTEM_LICENSE_REQUEST_FAILED="keySystemLicenseRequestFailed",S.KEY_SYSTEM_NO_INIT_DATA="keySystemNoInitData",S.MANIFEST_LOAD_ERROR="manifestLoadError",S.MANIFEST_LOAD_TIMEOUT="manifestLoadTimeOut",S.MANIFEST_PARSING_ERROR="manifestParsingError",S.MANIFEST_INCOMPATIBLE_CODECS_ERROR="manifestIncompatibleCodecsError",S.LEVEL_EMPTY_ERROR="levelEmptyError",S.LEVEL_LOAD_ERROR="levelLoadError",S.LEVEL_LOAD_TIMEOUT="levelLoadTimeOut",S.LEVEL_SWITCH_ERROR="levelSwitchError",S.AUDIO_TRACK_LOAD_ERROR="audioTrackLoadError",S.AUDIO_TRACK_LOAD_TIMEOUT="audioTrackLoadTimeOut",S.SUBTITLE_LOAD_ERROR="subtitleTrackLoadError",S.SUBTITLE_TRACK_LOAD_TIMEOUT="subtitleTrackLoadTimeOut",S.FRAG_LOAD_ERROR="fragLoadError",S.FRAG_LOAD_TIMEOUT="fragLoadTimeOut",S.FRAG_DECRYPT_ERROR="fragDecryptError",S.FRAG_PARSING_ERROR="fragParsingError",S.REMUX_ALLOC_ERROR="remuxAllocError",S.KEY_LOAD_ERROR="keyLoadError",S.KEY_LOAD_TIMEOUT="keyLoadTimeOut",S.BUFFER_ADD_CODEC_ERROR="bufferAddCodecError",S.BUFFER_INCOMPATIBLE_CODECS_ERROR="bufferIncompatibleCodecsError",S.BUFFER_APPEND_ERROR="bufferAppendError",S.BUFFER_APPENDING_ERROR="bufferAppendingError",S.BUFFER_STALLED_ERROR="bufferStalledError",S.BUFFER_FULL_ERROR="bufferFullError",S.BUFFER_SEEK_OVER_HOLE="bufferSeekOverHole",S.BUFFER_NUDGE_ON_STALL="bufferNudgeOnStall",S.INTERNAL_EXCEPTION="internalException",S.INTERNAL_ABORTED="aborted",S.UNKNOWN="unknown"})(D||(D={}))},"./src/events.ts":function(ve,X,O){"use strict";O.r(X),O.d(X,"Events",function(){return G});var G;(function(D){D.MEDIA_ATTACHING="hlsMediaAttaching",D.MEDIA_ATTACHED="hlsMediaAttached",D.MEDIA_DETACHING="hlsMediaDetaching",D.MEDIA_DETACHED="hlsMediaDetached",D.BUFFER_RESET="hlsBufferReset",D.BUFFER_CODECS="hlsBufferCodecs",D.BUFFER_CREATED="hlsBufferCreated",D.BUFFER_APPENDING="hlsBufferAppending",D.BUFFER_APPENDED="hlsBufferAppended",D.BUFFER_EOS="hlsBufferEos",D.BUFFER_FLUSHING="hlsBufferFlushing",D.BUFFER_FLUSHED="hlsBufferFlushed",D.MANIFEST_LOADING="hlsManifestLoading",D.MANIFEST_LOADED="hlsManifestLoaded",D.MANIFEST_PARSED="hlsManifestParsed",D.LEVEL_SWITCHING="hlsLevelSwitching",D.LEVEL_SWITCHED="hlsLevelSwitched",D.LEVEL_LOADING="hlsLevelLoading",D.LEVEL_LOADED="hlsLevelLoaded",D.LEVEL_UPDATED="hlsLevelUpdated",D.LEVEL_PTS_UPDATED="hlsLevelPtsUpdated",D.LEVELS_UPDATED="hlsLevelsUpdated",D.AUDIO_TRACKS_UPDATED="hlsAudioTracksUpdated",D.AUDIO_TRACK_SWITCHING="hlsAudioTrackSwitching",D.AUDIO_TRACK_SWITCHED="hlsAudioTrackSwitched",D.AUDIO_TRACK_LOADING="hlsAudioTrackLoading",D.AUDIO_TRACK_LOADED="hlsAudioTrackLoaded",D.SUBTITLE_TRACKS_UPDATED="hlsSubtitleTracksUpdated",D.SUBTITLE_TRACKS_CLEARED="hlsSubtitleTracksCleared",D.SUBTITLE_TRACK_SWITCH="hlsSubtitleTrackSwitch",D.SUBTITLE_TRACK_LOADING="hlsSubtitleTrackLoading",D.SUBTITLE_TRACK_LOADED="hlsSubtitleTrackLoaded",D.SUBTITLE_FRAG_PROCESSED="hlsSubtitleFragProcessed",D.CUES_PARSED="hlsCuesParsed",D.NON_NATIVE_TEXT_TRACKS_FOUND="hlsNonNativeTextTracksFound",D.INIT_PTS_FOUND="hlsInitPtsFound",D.FRAG_LOADING="hlsFragLoading",D.FRAG_LOAD_EMERGENCY_ABORTED="hlsFragLoadEmergencyAborted",D.FRAG_LOADED="hlsFragLoaded",D.FRAG_DECRYPTED="hlsFragDecrypted",D.FRAG_PARSING_INIT_SEGMENT="hlsFragParsingInitSegment",D.FRAG_PARSING_USERDATA="hlsFragParsingUserdata",D.FRAG_PARSING_METADATA="hlsFragParsingMetadata",D.FRAG_PARSED="hlsFragParsed",D.FRAG_BUFFERED="hlsFragBuffered",D.FRAG_CHANGED="hlsFragChanged",D.FPS_DROP="hlsFpsDrop",D.FPS_DROP_LEVEL_CAPPING="hlsFpsDropLevelCapping",D.ERROR="hlsError",D.DESTROYING="hlsDestroying",D.KEY_LOADING="hlsKeyLoading",D.KEY_LOADED="hlsKeyLoaded",D.LIVE_BACK_BUFFER_REACHED="hlsLiveBackBufferReached",D.BACK_BUFFER_REACHED="hlsBackBufferReached"})(G||(G={}))},"./src/hls.ts":function(ve,X,O){"use strict";O.r(X),O.d(X,"default",function(){return w});var G=O("./node_modules/url-toolkit/src/url-toolkit.js"),D=O.n(G),S=O("./src/loader/playlist-loader.ts"),z=O("./src/loader/key-loader.ts"),F=O("./src/controller/id3-track-controller.ts"),U=O("./src/controller/latency-controller.ts"),I=O("./src/controller/level-controller.ts"),v=O("./src/controller/fragment-tracker.ts"),b=O("./src/controller/stream-controller.ts"),u=O("./src/is-supported.ts"),a=O("./src/utils/logger.ts"),n=O("./src/config.ts"),s=O("./node_modules/eventemitter3/index.js"),i=O.n(s),t=O("./src/events.ts"),r=O("./src/errors.ts");function A(_,x){for(var m=0;m<x.length;m++){var c=x[m];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(_,c.key,c)}}function B(_,x,m){return x&&A(_.prototype,x),m&&A(_,m),_}var w=function(){_.isSupported=function(){return Object(u.isSupported)()};function _(m){m===void 0&&(m={}),this.config=void 0,this.userConfig=void 0,this.coreComponents=void 0,this.networkControllers=void 0,this._emitter=new s.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 c=this.config=Object(n.mergeConfig)(_.DefaultConfig,m);this.userConfig=m,Object(a.enableLogs)(c.debug),this._autoLevelCapping=-1,c.progressive&&Object(n.enableStreamingMode)(c);var e=c.abrController,o=c.bufferController,l=c.capLevelController,y=c.fpsController,p=this.abrController=new e(this),f=this.bufferController=new o(this),R=this.capLevelController=new l(this),L=new y(this),H=new S.default(this),j=new z.default(this),J=new F.default(this),M=this.levelController=new I.default(this),Y=new v.FragmentTracker(this),te=this.streamController=new b.default(this,Y);R.setStreamController(te),L.setStreamController(te);var de=[M,te];this.networkControllers=de;var fe=[H,j,p,f,R,L,J,Y];this.audioTrackController=this.createController(c.audioTrackController,null,de),this.createController(c.audioStreamController,Y,de),this.subtitleTrackController=this.createController(c.subtitleTrackController,null,de),this.createController(c.subtitleStreamController,Y,de),this.createController(c.timelineController,null,fe),this.emeController=this.createController(c.emeController,null,fe),this.cmcdController=this.createController(c.cmcdController,null,fe),this.latencyController=this.createController(U.default,null,fe),this.coreComponents=fe}var x=_.prototype;return x.createController=function(c,e,o){if(c){var l=e?new c(this,e):new c(this);return o&&o.push(l),l}return null},x.on=function(c,e,o){o===void 0&&(o=this),this._emitter.on(c,e,o)},x.once=function(c,e,o){o===void 0&&(o=this),this._emitter.once(c,e,o)},x.removeAllListeners=function(c){this._emitter.removeAllListeners(c)},x.off=function(c,e,o,l){o===void 0&&(o=this),this._emitter.off(c,e,o,l)},x.listeners=function(c){return this._emitter.listeners(c)},x.emit=function(c,e,o){return this._emitter.emit(c,e,o)},x.trigger=function(c,e){if(this.config.debug)return this.emit(c,c,e);try{return this.emit(c,c,e)}catch(o){a.logger.error("An internal error happened while handling event "+c+'. Error message: "'+o.message+'". Here is a stacktrace:',o),this.trigger(t.Events.ERROR,{type:r.ErrorTypes.OTHER_ERROR,details:r.ErrorDetails.INTERNAL_EXCEPTION,fatal:!1,event:c,error:o})}return!1},x.listenerCount=function(c){return this._emitter.listenerCount(c)},x.destroy=function(){a.logger.log("destroy"),this.trigger(t.Events.DESTROYING,void 0),this.detachMedia(),this.removeAllListeners(),this._autoLevelCapping=-1,this.url=null,this.networkControllers.forEach(function(c){return c.destroy()}),this.networkControllers.length=0,this.coreComponents.forEach(function(c){return c.destroy()}),this.coreComponents.length=0},x.attachMedia=function(c){a.logger.log("attachMedia"),this._media=c,this.trigger(t.Events.MEDIA_ATTACHING,{media:c})},x.detachMedia=function(){a.logger.log("detachMedia"),this.trigger(t.Events.MEDIA_DETACHING,void 0),this._media=null},x.loadSource=function(c){this.stopLoad();var e=this.media,o=this.url,l=this.url=G.buildAbsoluteURL(self.location.href,c,{alwaysNormalize:!0});a.logger.log("loadSource:"+l),e&&o&&o!==l&&this.bufferController.hasSourceTypes()&&(this.detachMedia(),this.attachMedia(e)),this.trigger(t.Events.MANIFEST_LOADING,{url:c})},x.startLoad=function(c){c===void 0&&(c=-1),a.logger.log("startLoad("+c+")"),this.networkControllers.forEach(function(e){e.startLoad(c)})},x.stopLoad=function(){a.logger.log("stopLoad"),this.networkControllers.forEach(function(c){c.stopLoad()})},x.swapAudioCodec=function(){a.logger.log("swapAudioCodec"),this.streamController.swapAudioCodec()},x.recoverMediaError=function(){a.logger.log("recoverMediaError");var c=this._media;this.detachMedia(),c&&this.attachMedia(c)},x.removeLevel=function(c,e){e===void 0&&(e=0),this.levelController.removeLevel(c,e)},B(_,[{key:"levels",get:function(){var c=this.levelController.levels;return c||[]}},{key:"currentLevel",get:function(){return this.streamController.currentLevel},set:function(c){a.logger.log("set currentLevel:"+c),this.loadLevel=c,this.abrController.clearTimer(),this.streamController.immediateLevelSwitch()}},{key:"nextLevel",get:function(){return this.streamController.nextLevel},set:function(c){a.logger.log("set nextLevel:"+c),this.levelController.manualLevel=c,this.streamController.nextLevelSwitch()}},{key:"loadLevel",get:function(){return this.levelController.level},set:function(c){a.logger.log("set loadLevel:"+c),this.levelController.manualLevel=c}},{key:"nextLoadLevel",get:function(){return this.levelController.nextLoadLevel},set:function(c){this.levelController.nextLoadLevel=c}},{key:"firstLevel",get:function(){return Math.max(this.levelController.firstLevel,this.minAutoLevel)},set:function(c){a.logger.log("set firstLevel:"+c),this.levelController.firstLevel=c}},{key:"startLevel",get:function(){return this.levelController.startLevel},set:function(c){a.logger.log("set startLevel:"+c),c!==-1&&(c=Math.max(c,this.minAutoLevel)),this.levelController.startLevel=c}},{key:"capLevelToPlayerSize",get:function(){return this.config.capLevelToPlayerSize},set:function(c){var e=!!c;e!==this.config.capLevelToPlayerSize&&(e?this.capLevelController.startCapping():(this.capLevelController.stopCapping(),this.autoLevelCapping=-1,this.streamController.nextLevelSwitch()),this.config.capLevelToPlayerSize=e)}},{key:"autoLevelCapping",get:function(){return this._autoLevelCapping},set:function(c){this._autoLevelCapping!==c&&(a.logger.log("set autoLevelCapping:"+c),this._autoLevelCapping=c)}},{key:"bandwidthEstimate",get:function(){var c=this.abrController.bwEstimator;return c?c.getEstimate():NaN}},{key:"autoLevelEnabled",get:function(){return this.levelController.manualLevel===-1}},{key:"manualLevel",get:function(){return this.levelController.manualLevel}},{key:"minAutoLevel",get:function(){var c=this.levels,e=this.config.minAutoBitrate;if(!c)return 0;for(var o=c.length,l=0;l<o;l++)if(c[l].maxBitrate>e)return l;return 0}},{key:"maxAutoLevel",get:function(){var c=this.levels,e=this.autoLevelCapping,o;return e===-1&&c&&c.length?o=c.length-1:o=e,o}},{key:"nextAutoLevel",get:function(){return Math.min(Math.max(this.abrController.nextAutoLevel,this.minAutoLevel),this.maxAutoLevel)},set:function(c){this.abrController.nextAutoLevel=Math.max(this.minAutoLevel,c)}},{key:"audioTracks",get:function(){var c=this.audioTrackController;return c?c.audioTracks:[]}},{key:"audioTrack",get:function(){var c=this.audioTrackController;return c?c.audioTrack:-1},set:function(c){var e=this.audioTrackController;e&&(e.audioTrack=c)}},{key:"subtitleTracks",get:function(){var c=this.subtitleTrackController;return c?c.subtitleTracks:[]}},{key:"subtitleTrack",get:function(){var c=this.subtitleTrackController;return c?c.subtitleTrack:-1},set:function(c){var e=this.subtitleTrackController;e&&(e.subtitleTrack=c)}},{key:"media",get:function(){return this._media}},{key:"subtitleDisplay",get:function(){var c=this.subtitleTrackController;return c?c.subtitleDisplay:!1},set:function(c){var e=this.subtitleTrackController;e&&(e.subtitleDisplay=c)}},{key:"lowLatencyMode",get:function(){return this.config.lowLatencyMode},set:function(c){this.config.lowLatencyMode=c}},{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 t.Events}},{key:"ErrorTypes",get:function(){return r.ErrorTypes}},{key:"ErrorDetails",get:function(){return r.ErrorDetails}},{key:"DefaultConfig",get:function(){return _.defaultConfig?_.defaultConfig:n.hlsDefaultConfig},set:function(c){_.defaultConfig=c}}]),_}();w.defaultConfig=void 0},"./src/is-supported.ts":function(ve,X,O){"use strict";O.r(X),O.d(X,"isSupported",function(){return S}),O.d(X,"changeTypeSupported",function(){return z});var G=O("./src/utils/mediasource-helper.ts");function D(){return self.SourceBuffer||self.WebKitSourceBuffer}function S(){var F=Object(G.getMediaSource)();if(!F)return!1;var U=D(),I=F&&typeof F.isTypeSupported=="function"&&F.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"'),v=!U||U.prototype&&typeof U.prototype.appendBuffer=="function"&&typeof U.prototype.remove=="function";return!!I&&!!v}function z(){var F,U=D();return typeof(U==null||((F=U.prototype)===null||F===void 0)?void 0:F.changeType)=="function"}},"./src/loader/fragment-loader.ts":function(ve,X,O){"use strict";O.r(X),O.d(X,"default",function(){return a}),O.d(X,"LoadError",function(){return s});var G=O("./src/polyfills/number.ts"),D=O("./src/errors.ts");function S(i,t){i.prototype=Object.create(t.prototype),i.prototype.constructor=i,v(i,t)}function z(i){var t=typeof Map=="function"?new Map:void 0;return z=function(A){if(A===null||!I(A))return A;if(typeof A!="function")throw new TypeError("Super expression must either be null or a function");if(typeof t!="undefined"){if(t.has(A))return t.get(A);t.set(A,B)}function B(){return F(A,arguments,b(this).constructor)}return B.prototype=Object.create(A.prototype,{constructor:{value:B,enumerable:!1,writable:!0,configurable:!0}}),v(B,A)},z(i)}function F(i,t,r){return U()?F=Reflect.construct:F=function(B,w,_){var x=[null];x.push.apply(x,w);var m=Function.bind.apply(B,x),c=new m;return _&&v(c,_.prototype),c},F.apply(null,arguments)}function U(){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(i){return!1}}function I(i){return Function.toString.call(i).indexOf("[native code]")!==-1}function v(i,t){return v=Object.setPrototypeOf||function(A,B){return A.__proto__=B,A},v(i,t)}function b(i){return b=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},b(i)}var u=Math.pow(2,17),a=function(){function i(r){this.config=void 0,this.loader=null,this.partLoadTimeout=-1,this.config=r}var t=i.prototype;return t.destroy=function(){this.loader&&(this.loader.destroy(),this.loader=null)},t.abort=function(){this.loader&&this.loader.abort()},t.load=function(A,B){var w=this,_=A.url;if(!_)return Promise.reject(new s({type:D.ErrorTypes.NETWORK_ERROR,details:D.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:A,networkDetails:null},"Fragment does not have a "+(_?"part list":"url")));this.abort();var x=this.config,m=x.fLoader,c=x.loader;return new Promise(function(e,o){w.loader&&w.loader.destroy();var l=w.loader=A.loader=m?new m(x):new c(x),y=n(A),p={timeout:x.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:x.fragLoadingMaxRetryTimeout,highWaterMark:u};A.stats=l.stats,l.load(y,p,{onSuccess:function(R,L,H,j){w.resetLoader(A,l),e({frag:A,part:null,payload:R.data,networkDetails:j})},onError:function(R,L,H){w.resetLoader(A,l),o(new s({type:D.ErrorTypes.NETWORK_ERROR,details:D.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:A,response:R,networkDetails:H}))},onAbort:function(R,L,H){w.resetLoader(A,l),o(new s({type:D.ErrorTypes.NETWORK_ERROR,details:D.ErrorDetails.INTERNAL_ABORTED,fatal:!1,frag:A,networkDetails:H}))},onTimeout:function(R,L,H){w.resetLoader(A,l),o(new s({type:D.ErrorTypes.NETWORK_ERROR,details:D.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:A,networkDetails:H}))},onProgress:function(R,L,H,j){B&&B({frag:A,part:null,payload:H,networkDetails:j})}})})},t.loadPart=function(A,B,w){var _=this;this.abort();var x=this.config,m=x.fLoader,c=x.loader;return new Promise(function(e,o){_.loader&&_.loader.destroy();var l=_.loader=A.loader=m?new m(x):new c(x),y=n(A,B),p={timeout:x.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:x.fragLoadingMaxRetryTimeout,highWaterMark:u};B.stats=l.stats,l.load(y,p,{onSuccess:function(R,L,H,j){_.resetLoader(A,l),_.updateStatsFromPart(A,B);var J={frag:A,part:B,payload:R.data,networkDetails:j};w(J),e(J)},onError:function(R,L,H){_.resetLoader(A,l),o(new s({type:D.ErrorTypes.NETWORK_ERROR,details:D.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:A,part:B,response:R,networkDetails:H}))},onAbort:function(R,L,H){A.stats.aborted=B.stats.aborted,_.resetLoader(A,l),o(new s({type:D.ErrorTypes.NETWORK_ERROR,details:D.ErrorDetails.INTERNAL_ABORTED,fatal:!1,frag:A,part:B,networkDetails:H}))},onTimeout:function(R,L,H){_.resetLoader(A,l),o(new s({type:D.ErrorTypes.NETWORK_ERROR,details:D.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:A,part:B,networkDetails:H}))}})})},t.updateStatsFromPart=function(A,B){var w=A.stats,_=B.stats,x=_.total;if(w.loaded+=_.loaded,x){var m=Math.round(A.duration/B.duration),c=Math.min(Math.round(w.loaded/x),m),e=m-c,o=e*Math.round(w.loaded/c);w.total=w.loaded+o}else w.total=Math.max(w.loaded,w.total);var l=w.loading,y=_.loading;l.start?l.first+=y.first-y.start:(l.start=y.start,l.first=y.first),l.end=y.end},t.resetLoader=function(A,B){A.loader=null,this.loader===B&&(self.clearTimeout(this.partLoadTimeout),this.loader=null),B.destroy()},i}();function n(i,t){t===void 0&&(t=null);var r=t||i,A={frag:i,part:t,responseType:"arraybuffer",url:r.url,headers:{},rangeStart:0,rangeEnd:0},B=r.byteRangeStartOffset,w=r.byteRangeEndOffset;return Object(G.isFiniteNumber)(B)&&Object(G.isFiniteNumber)(w)&&(A.rangeStart=B,A.rangeEnd=w),A}var s=function(i){S(t,i);function t(r){for(var A,B=arguments.length,w=new Array(B>1?B-1:0),_=1;_<B;_++)w[_-1]=arguments[_];return A=i.call.apply(i,[this].concat(w))||this,A.data=void 0,A.data=r,A}return t}(z(Error))},"./src/loader/fragment.ts":function(ve,X,O){"use strict";O.r(X),O.d(X,"ElementaryStreamTypes",function(){return a}),O.d(X,"BaseSegment",function(){return n}),O.d(X,"Fragment",function(){return s}),O.d(X,"Part",function(){return i});var G=O("./src/polyfills/number.ts"),D=O("./node_modules/url-toolkit/src/url-toolkit.js"),S=O.n(D),z=O("./src/utils/logger.ts"),F=O("./src/loader/level-key.ts"),U=O("./src/loader/load-stats.ts");function I(t,r){t.prototype=Object.create(r.prototype),t.prototype.constructor=t,v(t,r)}function v(t,r){return v=Object.setPrototypeOf||function(B,w){return B.__proto__=w,B},v(t,r)}function b(t,r){for(var A=0;A<r.length;A++){var B=r[A];B.enumerable=B.enumerable||!1,B.configurable=!0,"value"in B&&(B.writable=!0),Object.defineProperty(t,B.key,B)}}function u(t,r,A){return r&&b(t.prototype,r),A&&b(t,A),t}var a;(function(t){t.AUDIO="audio",t.VIDEO="video",t.AUDIOVIDEO="audiovideo"})(a||(a={}));var n=function(){function t(A){var B;this._byteRange=null,this._url=null,this.baseurl=void 0,this.relurl=void 0,this.elementaryStreams=(B={},B[a.AUDIO]=null,B[a.VIDEO]=null,B[a.AUDIOVIDEO]=null,B),this.baseurl=A}var r=t.prototype;return r.setByteRange=function(B,w){var _=B.split("@",2),x=[];_.length===1?x[0]=w?w.byteRangeEndOffset:0:x[0]=parseInt(_[1]),x[1]=parseInt(_[0])+x[0],this._byteRange=x},u(t,[{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(D.buildAbsoluteURL)(this.baseurl,this.relurl,{alwaysNormalize:!0})),this._url||""},set:function(B){this._url=B}}]),t}(),s=function(t){I(r,t);function r(B,w){var _;return _=t.call(this,w)||this,_._decryptdata=null,_.rawProgramDateTime=null,_.programDateTime=null,_.tagList=[],_.duration=0,_.sn=0,_.levelkey=void 0,_.type=void 0,_.loader=null,_.level=-1,_.cc=0,_.startPTS=void 0,_.endPTS=void 0,_.appendedPTS=void 0,_.startDTS=void 0,_.endDTS=void 0,_.start=0,_.deltaPTS=void 0,_.maxStartPTS=void 0,_.minEndPTS=void 0,_.stats=new U.LoadStats,_.urlId=0,_.data=void 0,_.bitrateTest=!1,_.title=null,_.initSegment=null,_.type=B,_}var A=r.prototype;return A.createInitializationVector=function(w){for(var _=new Uint8Array(16),x=12;x<16;x++)_[x]=w>>8*(15-x)&255;return _},A.setDecryptDataFromLevelKey=function(w,_){var x=w;return(w==null?void 0:w.method)==="AES-128"&&w.uri&&!w.iv&&(x=F.LevelKey.fromURI(w.uri),x.method=w.method,x.iv=this.createInitializationVector(_),x.keyFormat="identity"),x},A.setElementaryStreamInfo=function(w,_,x,m,c,e){e===void 0&&(e=!1);var o=this.elementaryStreams,l=o[w];if(!l){o[w]={startPTS:_,endPTS:x,startDTS:m,endDTS:c,partial:e};return}l.startPTS=Math.min(l.startPTS,_),l.endPTS=Math.max(l.endPTS,x),l.startDTS=Math.min(l.startDTS,m),l.endDTS=Math.max(l.endDTS,c)},A.clearElementaryStreamInfo=function(){var w=this.elementaryStreams;w[a.AUDIO]=null,w[a.VIDEO]=null,w[a.AUDIOVIDEO]=null},u(r,[{key:"decryptdata",get:function(){if(!this.levelkey&&!this._decryptdata)return null;if(!this._decryptdata&&this.levelkey){var w=this.sn;typeof w!="number"&&(this.levelkey&&this.levelkey.method==="AES-128"&&!this.levelkey.iv&&z.logger.warn('missing IV for initialization segment with method="'+this.levelkey.method+'" - compliance issue'),w=0),this._decryptdata=this.setDecryptDataFromLevelKey(this.levelkey,w)}return this._decryptdata}},{key:"end",get:function(){return this.start+this.duration}},{key:"endProgramDateTime",get:function(){if(this.programDateTime===null)return null;if(!Object(G.isFiniteNumber)(this.programDateTime))return null;var w=Object(G.isFiniteNumber)(this.duration)?this.duration:0;return this.programDateTime+w*1e3}},{key:"encrypted",get:function(){var w;return!!((w=this.decryptdata)!==null&&w!==void 0&&w.keyFormat&&this.decryptdata.uri)}}]),r}(n),i=function(t){I(r,t);function r(A,B,w,_,x){var m;m=t.call(this,w)||this,m.fragOffset=0,m.duration=0,m.gap=!1,m.independent=!1,m.relurl=void 0,m.fragment=void 0,m.index=void 0,m.stats=new U.LoadStats,m.duration=A.decimalFloatingPoint("DURATION"),m.gap=A.bool("GAP"),m.independent=A.bool("INDEPENDENT"),m.relurl=A.enumeratedString("URI"),m.fragment=B,m.index=_;var c=A.enumeratedString("BYTERANGE");return c&&m.setByteRange(c,x),x&&(m.fragOffset=x.fragOffset+x.duration),m}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 B=this.elementaryStreams;return!!(B.audio||B.video||B.audiovideo)}}]),r}(n)},"./src/loader/key-loader.ts":function(ve,X,O){"use strict";O.r(X),O.d(X,"default",function(){return z});var G=O("./src/events.ts"),D=O("./src/errors.ts"),S=O("./src/utils/logger.ts"),z=function(){function F(I){this.hls=void 0,this.loaders={},this.decryptkey=null,this.decrypturl=null,this.hls=I,this._registerListeners()}var U=F.prototype;return U._registerListeners=function(){this.hls.on(G.Events.KEY_LOADING,this.onKeyLoading,this)},U._unregisterListeners=function(){this.hls.off(G.Events.KEY_LOADING,this.onKeyLoading)},U.destroy=function(){this._unregisterListeners();for(var v in this.loaders){var b=this.loaders[v];b&&b.destroy()}this.loaders={}},U.onKeyLoading=function(v,b){var u=b.frag,a=u.type,n=this.loaders[a];if(!u.decryptdata){S.logger.warn("Missing decryption data on fragment in onKeyLoading");return}var s=u.decryptdata.uri;if(s!==this.decrypturl||this.decryptkey===null){var i=this.hls.config;if(n&&(S.logger.warn("abort previous key loader for type:"+a),n.abort()),!s){S.logger.warn("key uri is falsy");return}var t=i.loader,r=u.loader=this.loaders[a]=new t(i);this.decrypturl=s,this.decryptkey=null;var A={url:s,frag:u,responseType:"arraybuffer"},B={timeout:i.fragLoadingTimeOut,maxRetry:0,retryDelay:i.fragLoadingRetryDelay,maxRetryDelay:i.fragLoadingMaxRetryTimeout,highWaterMark:0},w={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};r.load(A,B,w)}else this.decryptkey&&(u.decryptdata.key=this.decryptkey,this.hls.trigger(G.Events.KEY_LOADED,{frag:u}))},U.loadsuccess=function(v,b,u){var a=u.frag;if(!a.decryptdata){S.logger.error("after key load, decryptdata unset");return}this.decryptkey=a.decryptdata.key=new Uint8Array(v.data),a.loader=null,delete this.loaders[a.type],this.hls.trigger(G.Events.KEY_LOADED,{frag:a})},U.loaderror=function(v,b){var u=b.frag,a=u.loader;a&&a.abort(),delete this.loaders[u.type],this.hls.trigger(G.Events.ERROR,{type:D.ErrorTypes.NETWORK_ERROR,details:D.ErrorDetails.KEY_LOAD_ERROR,fatal:!1,frag:u,response:v})},U.loadtimeout=function(v,b){var u=b.frag,a=u.loader;a&&a.abort(),delete this.loaders[u.type],this.hls.trigger(G.Events.ERROR,{type:D.ErrorTypes.NETWORK_ERROR,details:D.ErrorDetails.KEY_LOAD_TIMEOUT,fatal:!1,frag:u})},F}()},"./src/loader/level-details.ts":function(ve,X,O){"use strict";O.r(X),O.d(X,"LevelDetails",function(){return F});var G=O("./src/polyfills/number.ts");function D(U,I){for(var v=0;v<I.length;v++){var b=I[v];b.enumerable=b.enumerable||!1,b.configurable=!0,"value"in b&&(b.writable=!0),Object.defineProperty(U,b.key,b)}}function S(U,I,v){return I&&D(U.prototype,I),v&&D(U,v),U}var z=10,F=function(){function U(v){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=v}var I=U.prototype;return I.reloaded=function(b){if(!b){this.advanced=!0,this.updated=!0;return}var u=this.lastPartSn-b.lastPartSn,a=this.lastPartIndex-b.lastPartIndex;this.updated=this.endSN!==b.endSN||!!a||!!u,this.advanced=this.endSN>b.endSN||u>0||u===0&&a>0,this.updated||this.advanced?this.misses=Math.floor(b.misses*.6):this.misses=b.misses+1,this.availabilityDelay=b.availabilityDelay},S(U,[{key:"hasProgramDateTime",get:function(){return this.fragments.length?Object(G.isFiniteNumber)(this.fragments[this.fragments.length-1].programDateTime):!1}},{key:"levelTargetDuration",get:function(){return this.averagetargetduration||this.targetduration||z}},{key:"drift",get:function(){var b=this.driftEndTime-this.driftStartTime;if(b>0){var u=this.driftEnd-this.driftStart;return u*1e3/b}return 1}},{key:"edge",get:function(){return this.partEnd||this.fragmentEnd}},{key:"partEnd",get:function(){var b;return(b=this.partList)!==null&&b!==void 0&&b.length?this.partList[this.partList.length-1].end:this.fragmentEnd}},{key:"fragmentEnd",get:function(){var b;return(b=this.fragments)!==null&&b!==void 0&&b.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 b;return(b=this.partList)!==null&&b!==void 0&&b.length?this.partList[this.partList.length-1].index:-1}},{key:"lastPartSn",get:function(){var b;return(b=this.partList)!==null&&b!==void 0&&b.length?this.partList[this.partList.length-1].fragment.sn:this.endSN}}]),U}()},"./src/loader/level-key.ts":function(ve,X,O){"use strict";O.r(X),O.d(X,"LevelKey",function(){return F});var G=O("./node_modules/url-toolkit/src/url-toolkit.js"),D=O.n(G);function S(U,I){for(var v=0;v<I.length;v++){var b=I[v];b.enumerable=b.enumerable||!1,b.configurable=!0,"value"in b&&(b.writable=!0),Object.defineProperty(U,b.key,b)}}function z(U,I,v){return I&&S(U.prototype,I),v&&S(U,v),U}var F=function(){U.fromURL=function(v,b){return new U(v,b)},U.fromURI=function(v){return new U(v)};function U(I,v){this._uri=null,this.method=null,this.keyFormat=null,this.keyFormatVersions=null,this.keyID=null,this.key=null,this.iv=null,v?this._uri=Object(G.buildAbsoluteURL)(I,v,{alwaysNormalize:!0}):this._uri=I}return z(U,[{key:"uri",get:function(){return this._uri}}]),U}()},"./src/loader/load-stats.ts":function(ve,X,O){"use strict";O.r(X),O.d(X,"LoadStats",function(){return G});var G=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(ve,X,O){"use strict";O.r(X),O.d(X,"default",function(){return r});var G=O("./src/polyfills/number.ts"),D=O("./node_modules/url-toolkit/src/url-toolkit.js"),S=O.n(D),z=O("./src/loader/fragment.ts"),F=O("./src/loader/level-details.ts"),U=O("./src/loader/level-key.ts"),I=O("./src/utils/attr-list.ts"),v=O("./src/utils/logger.ts"),b=O("./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,a=/#EXT-X-MEDIA:(.*)/g,n=new RegExp([/#EXTINF:\s*(\d*(?:\.\d+)?)(?:,(.*)\s+)?/.source,/(?!#) *(\S[\S ]*)/.source,/#EXT-X-BYTERANGE:*(.+)/.source,/#EXT-X-PROGRAM-DATE-TIME:(.+)/.source,/#.*/.source].join("|"),"g"),s=new RegExp([/#(EXTM3U)/.source,/#EXT-X-(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("|")),i=/\.(mp4|m4s|m4v|m4a)$/i;function t(x){var m,c;return i.test((m=(c=D.parseURL(x))===null||c===void 0?void 0:c.path)!=null?m:"")}var r=function(){function x(){}return x.findGroup=function(c,e){for(var o=0;o<c.length;o++){var l=c[o];if(l.id===e)return l}},x.convertAVC1ToAVCOTI=function(c){var e=c.split(".");if(e.length>2){var o=e.shift()+".";return o+=parseInt(e.shift()).toString(16),o+=("000"+parseInt(e.shift()).toString(16)).substr(-4),o}return c},x.resolve=function(c,e){return D.buildAbsoluteURL(e,c,{alwaysNormalize:!0})},x.parseMasterPlaylist=function(c,e){var o=[],l={},y=!1;u.lastIndex=0;for(var p;(p=u.exec(c))!=null;)if(p[1]){var f=new I.AttrList(p[1]),R={attrs:f,bitrate:f.decimalInteger("AVERAGE-BANDWIDTH")||f.decimalInteger("BANDWIDTH"),name:f.NAME,url:x.resolve(p[2],e)},L=f.decimalResolution("RESOLUTION");L&&(R.width=L.width,R.height=L.height),A((f.CODECS||"").split(/[ ,]+/).filter(function(j){return j}),R),R.videoCodec&&R.videoCodec.indexOf("avc1")!==-1&&(R.videoCodec=x.convertAVC1ToAVCOTI(R.videoCodec)),o.push(R)}else if(p[3]){var H=new I.AttrList(p[3]);H["DATA-ID"]&&(y=!0,l[H["DATA-ID"]]=H)}return{levels:o,sessionData:y?l:null}},x.parseMasterPlaylistMedia=function(c,e,o,l){l===void 0&&(l=[]);var y,p=[],f=0;for(a.lastIndex=0;(y=a.exec(c))!==null;){var R=new I.AttrList(y[1]);if(R.TYPE===o){var L={attrs:R,bitrate:0,id:f++,groupId:R["GROUP-ID"],instreamId:R["INSTREAM-ID"],name:R.NAME||R.LANGUAGE||"",type:o,default:R.bool("DEFAULT"),autoselect:R.bool("AUTOSELECT"),forced:R.bool("FORCED"),lang:R.LANGUAGE,url:R.URI?x.resolve(R.URI,e):""};if(l.length){var H=x.findGroup(l,L.groupId)||l[0];B(L,H,"audioCodec"),B(L,H,"textCodec")}p.push(L)}}return p},x.parseLevelPlaylist=function(c,e,o,l,y){var p=new F.LevelDetails(e),f=p.fragments,R=null,L=0,H=0,j=0,J=0,M=null,Y=new z.Fragment(l,e),te,de,fe,Le=-1,xe=!1;for(n.lastIndex=0,p.m3u8=c;(te=n.exec(c))!==null;){xe&&(xe=!1,Y=new z.Fragment(l,e),Y.start=j,Y.sn=L,Y.cc=J,Y.level=o,R&&(Y.initSegment=R,Y.rawProgramDateTime=R.rawProgramDateTime));var Ie=te[1];if(Ie){Y.duration=parseFloat(Ie);var Fe=(" "+te[2]).slice(1);Y.title=Fe||null,Y.tagList.push(Fe?["INF",Ie,Fe]:["INF",Ie])}else if(te[3])Object(G.isFiniteNumber)(Y.duration)&&(Y.start=j,fe&&(Y.levelkey=fe),Y.sn=L,Y.level=o,Y.cc=J,Y.urlId=y,f.push(Y),Y.relurl=(" "+te[3]).slice(1),_(Y,M),M=Y,j+=Y.duration,L++,H=0,xe=!0);else if(te[4]){var Ue=(" "+te[4]).slice(1);M?Y.setByteRange(Ue,M):Y.setByteRange(Ue)}else if(te[5])Y.rawProgramDateTime=(" "+te[5]).slice(1),Y.tagList.push(["PROGRAM-DATE-TIME",Y.rawProgramDateTime]),Le===-1&&(Le=f.length);else{if(te=te[0].match(s),!te){v.logger.warn("No matches on slow regex match for level playlist!");continue}for(de=1;de<te.length&&!(typeof te[de]!="undefined");de++);var be=(" "+te[de]).slice(1),ue=(" "+te[de+1]).slice(1),je=te[de+2]?(" "+te[de+2]).slice(1):"";switch(be){case"PLAYLIST-TYPE":p.type=ue.toUpperCase();break;case"MEDIA-SEQUENCE":L=p.startSN=parseInt(ue);break;case"SKIP":{var st=new I.AttrList(ue),nt=st.decimalInteger("SKIPPED-SEGMENTS");if(Object(G.isFiniteNumber)(nt)){p.skippedSegments=nt;for(var rt=nt;rt--;)f.unshift(null);L+=nt}var He=st.enumeratedString("RECENTLY-REMOVED-DATERANGES");He&&(p.recentlyRemovedDateranges=He.split(" "));break}case"TARGETDURATION":p.targetduration=parseFloat(ue);break;case"VERSION":p.version=parseInt(ue);break;case"EXTM3U":break;case"ENDLIST":p.live=!1;break;case"#":(ue||je)&&Y.tagList.push(je?[ue,je]:[ue]);break;case"DIS":J++;case"GAP":Y.tagList.push([be]);break;case"BITRATE":Y.tagList.push([be,ue]);break;case"DISCONTINUITY-SEQ":J=parseInt(ue);break;case"KEY":{var re,K=new I.AttrList(ue),W=K.enumeratedString("METHOD"),se=K.URI,ye=K.hexadecimalInteger("IV"),we=K.enumeratedString("KEYFORMATVERSIONS"),_e=K.enumeratedString("KEYID"),$e=(re=K.enumeratedString("KEYFORMAT"))!=null?re:"identity",qe=["com.apple.streamingkeydelivery","com.microsoft.playready","urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed","com.widevine"];if(qe.indexOf($e)>-1){v.logger.warn("Keyformat "+$e+" is not supported from the manifest");continue}else if($e!=="identity")continue;W&&(fe=U.LevelKey.fromURL(e,se),se&&["AES-128","SAMPLE-AES","SAMPLE-AES-CENC"].indexOf(W)>=0&&(fe.method=W,fe.keyFormat=$e,_e&&(fe.keyID=_e),we&&(fe.keyFormatVersions=we),fe.iv=ye));break}case"START":{var Ve=new I.AttrList(ue),Xe=Ve.decimalFloatingPoint("TIME-OFFSET");Object(G.isFiniteNumber)(Xe)&&(p.startTimeOffset=Xe);break}case"MAP":{var at=new I.AttrList(ue);Y.relurl=at.URI,at.BYTERANGE&&Y.setByteRange(at.BYTERANGE),Y.level=o,Y.sn="initSegment",fe&&(Y.levelkey=fe),Y.initSegment=null,R=Y,xe=!0;break}case"SERVER-CONTROL":{var ct=new I.AttrList(ue);p.canBlockReload=ct.bool("CAN-BLOCK-RELOAD"),p.canSkipUntil=ct.optionalFloat("CAN-SKIP-UNTIL",0),p.canSkipDateRanges=p.canSkipUntil>0&&ct.bool("CAN-SKIP-DATERANGES"),p.partHoldBack=ct.optionalFloat("PART-HOLD-BACK",0),p.holdBack=ct.optionalFloat("HOLD-BACK",0);break}case"PART-INF":{var Ce=new I.AttrList(ue);p.partTarget=Ce.decimalFloatingPoint("PART-TARGET");break}case"PART":{var De=p.partList;De||(De=p.partList=[]);var Qe=H>0?De[De.length-1]:void 0,We=H++,Re=new z.Part(new I.AttrList(ue),Y,e,We,Qe);De.push(Re),Y.duration+=Re.duration;break}case"PRELOAD-HINT":{var Me=new I.AttrList(ue);p.preloadHint=Me;break}case"RENDITION-REPORT":{var Ee=new I.AttrList(ue);p.renditionReports=p.renditionReports||[],p.renditionReports.push(Ee);break}default:v.logger.warn("line parsed but not handled: "+te);break}}}M&&!M.relurl?(f.pop(),j-=M.duration,p.partList&&(p.fragmentHint=M)):p.partList&&(_(Y,M),Y.cc=J,p.fragmentHint=Y);var Ae=f.length,he=f[0],q=f[Ae-1];if(j+=p.skippedSegments*p.targetduration,j>0&&Ae&&q){p.averagetargetduration=j/Ae;var ee=q.sn;p.endSN=ee!=="initSegment"?ee:0,he&&(p.startCC=he.cc,he.initSegment||p.fragments.every(function(oe){return oe.relurl&&t(oe.relurl)})&&(v.logger.warn("MP4 fragments found but no init segment (probably no MAP, incomplete M3U8), trying to fetch SIDX"),Y=new z.Fragment(l,e),Y.relurl=q.relurl,Y.level=o,Y.sn="initSegment",he.initSegment=Y,p.needSidxRanges=!0))}else p.endSN=0,p.startCC=0;return p.fragmentHint&&(j+=p.fragmentHint.duration),p.totalduration=j,p.endCC=J,Le>0&&w(f,Le),p},x}();function A(x,m){["video","audio","text"].forEach(function(c){var e=x.filter(function(l){return Object(b.isCodecType)(l,c)});if(e.length){var o=e.filter(function(l){return l.lastIndexOf("avc1",0)===0||l.lastIndexOf("mp4a",0)===0});m[c+"Codec"]=o.length>0?o[0]:e[0],x=x.filter(function(l){return e.indexOf(l)===-1})}}),m.unknownCodecs=x}function B(x,m,c){var e=m[c];e&&(x[c]=e)}function w(x,m){for(var c=x[m],e=m;e--;){var o=x[e];if(!o)return;o.programDateTime=c.programDateTime-o.duration*1e3,c=o}}function _(x,m){x.rawProgramDateTime?x.programDateTime=Date.parse(x.rawProgramDateTime):m!=null&&m.programDateTime&&(x.programDateTime=m.endProgramDateTime),Object(G.isFiniteNumber)(x.programDateTime)||(x.programDateTime=null,x.rawProgramDateTime=null)}},"./src/loader/playlist-loader.ts":function(ve,X,O){"use strict";O.r(X);var G=O("./src/polyfills/number.ts"),D=O("./src/events.ts"),S=O("./src/errors.ts"),z=O("./src/utils/logger.ts"),F=O("./src/utils/mp4-tools.ts"),U=O("./src/loader/m3u8-parser.ts"),I=O("./src/types/loader.ts"),v=O("./src/utils/attr-list.ts");function b(n){var s=n.type;switch(s){case I.PlaylistContextType.AUDIO_TRACK:return I.PlaylistLevelType.AUDIO;case I.PlaylistContextType.SUBTITLE_TRACK:return I.PlaylistLevelType.SUBTITLE;default:return I.PlaylistLevelType.MAIN}}function u(n,s){var i=n.url;return(i===void 0||i.indexOf("data:")===0)&&(i=s.url),i}var a=function(){function n(i){this.hls=void 0,this.loaders=Object.create(null),this.hls=i,this.registerListeners()}var s=n.prototype;return s.registerListeners=function(){var t=this.hls;t.on(D.Events.MANIFEST_LOADING,this.onManifestLoading,this),t.on(D.Events.LEVEL_LOADING,this.onLevelLoading,this),t.on(D.Events.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),t.on(D.Events.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)},s.unregisterListeners=function(){var t=this.hls;t.off(D.Events.MANIFEST_LOADING,this.onManifestLoading,this),t.off(D.Events.LEVEL_LOADING,this.onLevelLoading,this),t.off(D.Events.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),t.off(D.Events.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)},s.createInternalLoader=function(t){var r=this.hls.config,A=r.pLoader,B=r.loader,w=A||B,_=new w(r);return t.loader=_,this.loaders[t.type]=_,_},s.getInternalLoader=function(t){return this.loaders[t.type]},s.resetInternalLoader=function(t){this.loaders[t]&&delete this.loaders[t]},s.destroyInternalLoaders=function(){for(var t in this.loaders){var r=this.loaders[t];r&&r.destroy(),this.resetInternalLoader(t)}},s.destroy=function(){this.unregisterListeners(),this.destroyInternalLoaders()},s.onManifestLoading=function(t,r){var A=r.url;this.load({id:null,groupId:null,level:0,responseType:"text",type:I.PlaylistContextType.MANIFEST,url:A,deliveryDirectives:null})},s.onLevelLoading=function(t,r){var A=r.id,B=r.level,w=r.url,_=r.deliveryDirectives;this.load({id:A,groupId:null,level:B,responseType:"text",type:I.PlaylistContextType.LEVEL,url:w,deliveryDirectives:_})},s.onAudioTrackLoading=function(t,r){var A=r.id,B=r.groupId,w=r.url,_=r.deliveryDirectives;this.load({id:A,groupId:B,level:null,responseType:"text",type:I.PlaylistContextType.AUDIO_TRACK,url:w,deliveryDirectives:_})},s.onSubtitleTrackLoading=function(t,r){var A=r.id,B=r.groupId,w=r.url,_=r.deliveryDirectives;this.load({id:A,groupId:B,level:null,responseType:"text",type:I.PlaylistContextType.SUBTITLE_TRACK,url:w,deliveryDirectives:_})},s.load=function(t){var r,A=this.hls.config,B=this.getInternalLoader(t);if(B){var w=B.context;if(w&&w.url===t.url){z.logger.trace("[playlist-loader]: playlist request ongoing");return}z.logger.log("[playlist-loader]: aborting previous loader for type: "+t.type),B.abort()}var _,x,m,c;switch(t.type){case I.PlaylistContextType.MANIFEST:_=A.manifestLoadingMaxRetry,x=A.manifestLoadingTimeOut,m=A.manifestLoadingRetryDelay,c=A.manifestLoadingMaxRetryTimeout;break;case I.PlaylistContextType.LEVEL:case I.PlaylistContextType.AUDIO_TRACK:case I.PlaylistContextType.SUBTITLE_TRACK:_=0,x=A.levelLoadingTimeOut;break;default:_=A.levelLoadingMaxRetry,x=A.levelLoadingTimeOut,m=A.levelLoadingRetryDelay,c=A.levelLoadingMaxRetryTimeout;break}if(B=this.createInternalLoader(t),(r=t.deliveryDirectives)!==null&&r!==void 0&&r.part){var e;if(t.type===I.PlaylistContextType.LEVEL&&t.level!==null?e=this.hls.levels[t.level].details:t.type===I.PlaylistContextType.AUDIO_TRACK&&t.id!==null?e=this.hls.audioTracks[t.id].details:t.type===I.PlaylistContextType.SUBTITLE_TRACK&&t.id!==null&&(e=this.hls.subtitleTracks[t.id].details),e){var o=e.partTarget,l=e.targetduration;o&&l&&(x=Math.min(Math.max(o*3,l*.8)*1e3,x))}}var y={timeout:x,maxRetry:_,retryDelay:m,maxRetryDelay:c,highWaterMark:0},p={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};B.load(t,y,p)},s.loadsuccess=function(t,r,A,B){if(B===void 0&&(B=null),A.isSidxRequest){this.handleSidxRequest(t,A),this.handlePlaylistLoaded(t,r,A,B);return}this.resetInternalLoader(A.type);var w=t.data;if(w.indexOf("#EXTM3U")!==0){this.handleManifestParsingError(t,A,"no EXTM3U delimiter",B);return}r.parsing.start=performance.now(),w.indexOf("#EXTINF:")>0||w.indexOf("#EXT-X-TARGETDURATION:")>0?this.handleTrackOrLevelPlaylist(t,r,A,B):this.handleMasterPlaylist(t,r,A,B)},s.loaderror=function(t,r,A){A===void 0&&(A=null),this.handleNetworkError(r,A,!1,t)},s.loadtimeout=function(t,r,A){A===void 0&&(A=null),this.handleNetworkError(r,A,!0)},s.handleMasterPlaylist=function(t,r,A,B){var w=this.hls,_=t.data,x=u(t,A),m=U.default.parseMasterPlaylist(_,x),c=m.levels,e=m.sessionData;if(!c.length){this.handleManifestParsingError(t,A,"no level found in manifest",B);return}var o=c.map(function(L){return{id:L.attrs.AUDIO,audioCodec:L.audioCodec}}),l=c.map(function(L){return{id:L.attrs.SUBTITLES,textCodec:L.textCodec}}),y=U.default.parseMasterPlaylistMedia(_,x,"AUDIO",o),p=U.default.parseMasterPlaylistMedia(_,x,"SUBTITLES",l),f=U.default.parseMasterPlaylistMedia(_,x,"CLOSED-CAPTIONS");if(y.length){var R=y.some(function(L){return!L.url});!R&&c[0].audioCodec&&!c[0].attrs.AUDIO&&(z.logger.log("[playlist-loader]: audio codec signaled in quality level, but no embedded audio track signaled, create one"),y.unshift({type:"main",name:"main",default:!1,autoselect:!1,forced:!1,id:-1,attrs:new v.AttrList({}),bitrate:0,url:""}))}w.trigger(D.Events.MANIFEST_LOADED,{levels:c,audioTracks:y,subtitles:p,captions:f,url:x,stats:r,networkDetails:B,sessionData:e})},s.handleTrackOrLevelPlaylist=function(t,r,A,B){var w=this.hls,_=A.id,x=A.level,m=A.type,c=u(t,A),e=Object(G.isFiniteNumber)(_)?_:0,o=Object(G.isFiniteNumber)(x)?x:e,l=b(A),y=U.default.parseLevelPlaylist(t.data,c,o,l,e);if(!y.fragments.length){w.trigger(D.Events.ERROR,{type:S.ErrorTypes.NETWORK_ERROR,details:S.ErrorDetails.LEVEL_EMPTY_ERROR,fatal:!1,url:c,reason:"no fragments found in level",level:typeof A.level=="number"?A.level:void 0});return}if(m===I.PlaylistContextType.MANIFEST){var p={attrs:new v.AttrList({}),bitrate:0,details:y,name:"",url:c};w.trigger(D.Events.MANIFEST_LOADED,{levels:[p],audioTracks:[],url:c,stats:r,networkDetails:B,sessionData:null})}if(r.parsing.end=performance.now(),y.needSidxRanges){var f,R=(f=y.fragments[0].initSegment)===null||f===void 0?void 0:f.url;this.load({url:R,isSidxRequest:!0,type:m,level:x,levelDetails:y,id:_,groupId:null,rangeStart:0,rangeEnd:2048,responseType:"arraybuffer",deliveryDirectives:null});return}A.levelDetails=y,this.handlePlaylistLoaded(t,r,A,B)},s.handleSidxRequest=function(t,r){var A=Object(F.parseSegmentIndex)(new Uint8Array(t.data));if(!A)return;var B=A.references,w=r.levelDetails;B.forEach(function(_,x){var m=_.info,c=w.fragments[x];c.byteRange.length===0&&c.setByteRange(String(1+m.end-m.start)+"@"+String(m.start)),c.initSegment&&c.initSegment.setByteRange(String(A.moovEndOffset)+"@0")})},s.handleManifestParsingError=function(t,r,A,B){this.hls.trigger(D.Events.ERROR,{type:S.ErrorTypes.NETWORK_ERROR,details:S.ErrorDetails.MANIFEST_PARSING_ERROR,fatal:r.type===I.PlaylistContextType.MANIFEST,url:t.url,reason:A,response:t,context:r,networkDetails:B})},s.handleNetworkError=function(t,r,A,B){A===void 0&&(A=!1),z.logger.warn("[playlist-loader]: A network "+(A?"timeout":"error")+" occurred while loading "+t.type+" level: "+t.level+" id: "+t.id+' group-id: "'+t.groupId+'"');var w=S.ErrorDetails.UNKNOWN,_=!1,x=this.getInternalLoader(t);switch(t.type){case I.PlaylistContextType.MANIFEST:w=A?S.ErrorDetails.MANIFEST_LOAD_TIMEOUT:S.ErrorDetails.MANIFEST_LOAD_ERROR,_=!0;break;case I.PlaylistContextType.LEVEL:w=A?S.ErrorDetails.LEVEL_LOAD_TIMEOUT:S.ErrorDetails.LEVEL_LOAD_ERROR,_=!1;break;case I.PlaylistContextType.AUDIO_TRACK:w=A?S.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:S.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,_=!1;break;case I.PlaylistContextType.SUBTITLE_TRACK:w=A?S.ErrorDetails.SUBTITLE_TRACK_LOAD_TIMEOUT:S.ErrorDetails.SUBTITLE_LOAD_ERROR,_=!1;break}x&&this.resetInternalLoader(t.type);var m={type:S.ErrorTypes.NETWORK_ERROR,details:w,fatal:_,url:t.url,loader:x,context:t,networkDetails:r};B&&(m.response=B),this.hls.trigger(D.Events.ERROR,m)},s.handlePlaylistLoaded=function(t,r,A,B){var w=A.type,_=A.level,x=A.id,m=A.groupId,c=A.loader,e=A.levelDetails,o=A.deliveryDirectives;if(!(e!=null&&e.targetduration)){this.handleManifestParsingError(t,A,"invalid target duration",B);return}if(!c)return;e.live&&(c.getCacheAge&&(e.ageHeader=c.getCacheAge()||0),(!c.getCacheAge||isNaN(e.ageHeader))&&(e.ageHeader=0));switch(w){case I.PlaylistContextType.MANIFEST:case I.PlaylistContextType.LEVEL:this.hls.trigger(D.Events.LEVEL_LOADED,{details:e,level:_||0,id:x||0,stats:r,networkDetails:B,deliveryDirectives:o});break;case I.PlaylistContextType.AUDIO_TRACK:this.hls.trigger(D.Events.AUDIO_TRACK_LOADED,{details:e,id:x||0,groupId:m||"",stats:r,networkDetails:B,deliveryDirectives:o});break;case I.PlaylistContextType.SUBTITLE_TRACK:this.hls.trigger(D.Events.SUBTITLE_TRACK_LOADED,{details:e,id:x||0,groupId:m||"",stats:r,networkDetails:B,deliveryDirectives:o});break}},n}();X.default=a},"./src/polyfills/number.ts":function(ve,X,O){"use strict";O.r(X),O.d(X,"isFiniteNumber",function(){return G}),O.d(X,"MAX_SAFE_INTEGER",function(){return D});var G=Number.isFinite||function(S){return typeof S=="number"&&isFinite(S)},D=Number.MAX_SAFE_INTEGER||9007199254740991},"./src/remux/aac-helper.ts":function(ve,X,O){"use strict";O.r(X);var G=function(){function D(){}return D.getSilentFrame=function(z,F){switch(z){case"mp4a.40.2":if(F===1)return new Uint8Array([0,200,0,128,35,128]);if(F===2)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(F===3)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(F===4)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(F===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(F===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(F===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(F===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(F===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},D}();X.default=G},"./src/remux/mp4-generator.ts":function(ve,X,O){"use strict";O.r(X);var G=Math.pow(2,32)-1,D=function(){function S(){}return S.init=function(){S.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 F;for(F in S.types)S.types.hasOwnProperty(F)&&(S.types[F]=[F.charCodeAt(0),F.charCodeAt(1),F.charCodeAt(2),F.charCodeAt(3)]);var U=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]),I=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]);S.HDLR_TYPES={video:U,audio:I};var v=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),b=new Uint8Array([0,0,0,0,0,0,0,0]);S.STTS=S.STSC=S.STCO=b,S.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),S.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),S.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),S.STSD=new Uint8Array([0,0,0,0,0,0,0,1]);var u=new Uint8Array([105,115,111,109]),a=new Uint8Array([97,118,99,49]),n=new Uint8Array([0,0,0,1]);S.FTYP=S.box(S.types.ftyp,u,n,u,a),S.DINF=S.box(S.types.dinf,S.box(S.types.dref,v))},S.box=function(F){for(var U=8,I=arguments.length,v=new Array(I>1?I-1:0),b=1;b<I;b++)v[b-1]=arguments[b];for(var u=v.length,a=u;u--;)U+=v[u].byteLength;var n=new Uint8Array(U);for(n[0]=U>>24&255,n[1]=U>>16&255,n[2]=U>>8&255,n[3]=U&255,n.set(F,4),u=0,U=8;u<a;u++)n.set(v[u],U),U+=v[u].byteLength;return n},S.hdlr=function(F){return S.box(S.types.hdlr,S.HDLR_TYPES[F])},S.mdat=function(F){return S.box(S.types.mdat,F)},S.mdhd=function(F,U){U*=F;var I=Math.floor(U/(G+1)),v=Math.floor(U%(G+1));return S.box(S.types.mdhd,new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,F>>24&255,F>>16&255,F>>8&255,F&255,I>>24,I>>16&255,I>>8&255,I&255,v>>24,v>>16&255,v>>8&255,v&255,85,196,0,0]))},S.mdia=function(F){return S.box(S.types.mdia,S.mdhd(F.timescale,F.duration),S.hdlr(F.type),S.minf(F))},S.mfhd=function(F){return S.box(S.types.mfhd,new Uint8Array([0,0,0,0,F>>24,F>>16&255,F>>8&255,F&255]))},S.minf=function(F){return F.type==="audio"?S.box(S.types.minf,S.box(S.types.smhd,S.SMHD),S.DINF,S.stbl(F)):S.box(S.types.minf,S.box(S.types.vmhd,S.VMHD),S.DINF,S.stbl(F))},S.moof=function(F,U,I){return S.box(S.types.moof,S.mfhd(F),S.traf(I,U))},S.moov=function(F){for(var U=F.length,I=[];U--;)I[U]=S.trak(F[U]);return S.box.apply(null,[S.types.moov,S.mvhd(F[0].timescale,F[0].duration)].concat(I).concat(S.mvex(F)))},S.mvex=function(F){for(var U=F.length,I=[];U--;)I[U]=S.trex(F[U]);return S.box.apply(null,[S.types.mvex].concat(I))},S.mvhd=function(F,U){U*=F;var I=Math.floor(U/(G+1)),v=Math.floor(U%(G+1)),b=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,F>>24&255,F>>16&255,F>>8&255,F&255,I>>24,I>>16&255,I>>8&255,I&255,v>>24,v>>16&255,v>>8&255,v&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 S.box(S.types.mvhd,b)},S.sdtp=function(F){var U=F.samples||[],I=new Uint8Array(4+U.length),v,b;for(v=0;v<U.length;v++)b=U[v].flags,I[v+4]=b.dependsOn<<4|b.isDependedOn<<2|b.hasRedundancy;return S.box(S.types.sdtp,I)},S.stbl=function(F){return S.box(S.types.stbl,S.stsd(F),S.box(S.types.stts,S.STTS),S.box(S.types.stsc,S.STSC),S.box(S.types.stsz,S.STSZ),S.box(S.types.stco,S.STCO))},S.avc1=function(F){var U=[],I=[],v,b,u;for(v=0;v<F.sps.length;v++)b=F.sps[v],u=b.byteLength,U.push(u>>>8&255),U.push(u&255),U=U.concat(Array.prototype.slice.call(b));for(v=0;v<F.pps.length;v++)b=F.pps[v],u=b.byteLength,I.push(u>>>8&255),I.push(u&255),I=I.concat(Array.prototype.slice.call(b));var a=S.box(S.types.avcC,new Uint8Array([1,U[3],U[4],U[5],252|3,224|F.sps.length].concat(U).concat([F.pps.length]).concat(I))),n=F.width,s=F.height,i=F.pixelRatio[0],t=F.pixelRatio[1];return S.box(S.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,n>>8&255,n&255,s>>8&255,s&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]),a,S.box(S.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])),S.box(S.types.pasp,new Uint8Array([i>>24,i>>16&255,i>>8&255,i&255,t>>24,t>>16&255,t>>8&255,t&255])))},S.esds=function(F){var U=F.config.length;return new Uint8Array([0,0,0,0,3,23+U,0,1,0,4,15+U,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([U]).concat(F.config).concat([6,1,2]))},S.mp4a=function(F){var U=F.samplerate;return S.box(S.types.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,F.channelCount,0,16,0,0,0,0,U>>8&255,U&255,0,0]),S.box(S.types.esds,S.esds(F)))},S.mp3=function(F){var U=F.samplerate;return S.box(S.types[".mp3"],new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,F.channelCount,0,16,0,0,0,0,U>>8&255,U&255,0,0]))},S.stsd=function(F){return F.type==="audio"?!F.isAAC&&F.codec==="mp3"?S.box(S.types.stsd,S.STSD,S.mp3(F)):S.box(S.types.stsd,S.STSD,S.mp4a(F)):S.box(S.types.stsd,S.STSD,S.avc1(F))},S.tkhd=function(F){var U=F.id,I=F.duration*F.timescale,v=F.width,b=F.height,u=Math.floor(I/(G+1)),a=Math.floor(I%(G+1));return S.box(S.types.tkhd,new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,U>>24&255,U>>16&255,U>>8&255,U&255,0,0,0,0,u>>24,u>>16&255,u>>8&255,u&255,a>>24,a>>16&255,a>>8&255,a&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,v>>8&255,v&255,0,0,b>>8&255,b&255,0,0]))},S.traf=function(F,U){var I=S.sdtp(F),v=F.id,b=Math.floor(U/(G+1)),u=Math.floor(U%(G+1));return S.box(S.types.traf,S.box(S.types.tfhd,new Uint8Array([0,0,0,0,v>>24,v>>16&255,v>>8&255,v&255])),S.box(S.types.tfdt,new Uint8Array([1,0,0,0,b>>24,b>>16&255,b>>8&255,b&255,u>>24,u>>16&255,u>>8&255,u&255])),S.trun(F,I.length+16+20+8+16+8+8),I)},S.trak=function(F){return F.duration=F.duration||4294967295,S.box(S.types.trak,S.tkhd(F),S.mdia(F))},S.trex=function(F){var U=F.id;return S.box(S.types.trex,new Uint8Array([0,0,0,0,U>>24,U>>16&255,U>>8&255,U&255,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]))},S.trun=function(F,U){var I=F.samples||[],v=I.length,b=12+16*v,u=new Uint8Array(b),a,n,s,i,t,r;for(U+=8+b,u.set([0,0,15,1,v>>>24&255,v>>>16&255,v>>>8&255,v&255,U>>>24&255,U>>>16&255,U>>>8&255,U&255],0),a=0;a<v;a++)n=I[a],s=n.duration,i=n.size,t=n.flags,r=n.cts,u.set([s>>>24&255,s>>>16&255,s>>>8&255,s&255,i>>>24&255,i>>>16&255,i>>>8&255,i&255,t.isLeading<<2|t.dependsOn,t.isDependedOn<<6|t.hasRedundancy<<4|t.paddingValue<<1|t.isNonSync,t.degradPrio&240<<8,t.degradPrio&15,r>>>24&255,r>>>16&255,r>>>8&255,r&255],12+16*a);return S.box(S.types.trun,u)},S.initSegment=function(F){S.types||S.init();var U=S.moov(F),I=new Uint8Array(S.FTYP.byteLength+U.byteLength);return I.set(S.FTYP),I.set(U,S.FTYP.byteLength),I},S}();D.types=void 0,D.HDLR_TYPES=void 0,D.STTS=void 0,D.STSC=void 0,D.STCO=void 0,D.STSZ=void 0,D.VMHD=void 0,D.SMHD=void 0,D.STSD=void 0,D.FTYP=void 0,D.DINF=void 0,X.default=D},"./src/remux/mp4-remuxer.ts":function(ve,X,O){"use strict";O.r(X),O.d(X,"default",function(){return r}),O.d(X,"normalizePts",function(){return A});var G=O("./src/polyfills/number.ts"),D=O("./src/remux/aac-helper.ts"),S=O("./src/remux/mp4-generator.ts"),z=O("./src/events.ts"),F=O("./src/errors.ts"),U=O("./src/utils/logger.ts"),I=O("./src/types/loader.ts"),v=O("./src/utils/timescale-conversion.ts");function b(){return b=Object.assign||function(x){for(var m=1;m<arguments.length;m++){var c=arguments[m];for(var e in c)Object.prototype.hasOwnProperty.call(c,e)&&(x[e]=c[e])}return x},b.apply(this,arguments)}var u=10*1e3,a=1024,n=1152,s=null,i=null,t=!1,r=function(){function x(c,e,o,l){if(l===void 0&&(l=""),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=c,this.config=e,this.typeSupported=o,this.ISGenerated=!1,s===null){var y=navigator.userAgent||"",p=y.match(/Chrome\/(\d+)/i);s=p?parseInt(p[1]):0}if(i===null){var f=navigator.userAgent.match(/Safari\/(\d+)/i);i=f?parseInt(f[1]):0}t=!!s&&s<75||!!i&&i<600}var m=x.prototype;return m.destroy=function(){},m.resetTimeStamp=function(e){U.logger.log("[mp4-remuxer]: initPTS & initDTS reset"),this._initPTS=this._initDTS=e},m.resetNextTimestamp=function(){U.logger.log("[mp4-remuxer]: reset next timestamp"),this.isVideoContiguous=!1,this.isAudioContiguous=!1},m.resetInitSegment=function(){U.logger.log("[mp4-remuxer]: ISGenerated flag reset"),this.ISGenerated=!1},m.getVideoStartPts=function(e){var o=!1,l=e.reduce(function(y,p){var f=p.pts-y;return f<-4294967296?(o=!0,A(y,p.pts)):f>0?y:p.pts},e[0].pts);return o&&U.logger.debug("PTS rollover detected"),l},m.remux=function(e,o,l,y,p,f,R,L){var H,j,J,M,Y,te,de=p,fe=p,Le=e.pid>-1,xe=o.pid>-1,Ie=o.samples.length,Fe=e.samples.length>0,Ue=Ie>1,be=(!Le||Fe)&&(!xe||Ue)||this.ISGenerated||R;if(be){this.ISGenerated||(J=this.generateIS(e,o,p));var ue=this.isVideoContiguous,je=-1;if(Ue&&(je=B(o.samples),!ue&&this.config.forceKeyFrameOnDiscontinuity))if(te=!0,je>0){U.logger.warn("[mp4-remuxer]: Dropped "+je+" out of "+Ie+" video samples due to a missing keyframe");var st=this.getVideoStartPts(o.samples);o.samples=o.samples.slice(je),o.dropped+=je,fe+=(o.samples[0].pts-st)/(o.timescale||9e4)}else je===-1&&(U.logger.warn("[mp4-remuxer]: No keyframe found out of "+Ie+" video samples"),te=!1);if(this.ISGenerated){if(Fe&&Ue){var nt=this.getVideoStartPts(o.samples),rt=A(e.samples[0].pts,nt)-nt,He=rt/o.inputTimeScale;de+=Math.max(0,He),fe+=Math.max(0,-He)}if(Fe){if(e.samplerate||(U.logger.warn("[mp4-remuxer]: regenerate InitSegment as audio detected"),J=this.generateIS(e,o,p)),j=this.remuxAudio(e,de,this.isAudioContiguous,f,xe||Ue||L===I.PlaylistLevelType.AUDIO?fe:void 0),Ue){var re=j?j.endPTS-j.startPTS:0;o.inputTimeScale||(U.logger.warn("[mp4-remuxer]: regenerate InitSegment as video detected"),J=this.generateIS(e,o,p)),H=this.remuxVideo(o,fe,ue,re)}}else Ue&&(H=this.remuxVideo(o,fe,ue,0));H&&(H.firstKeyFrame=je,H.independent=je!==-1)}}return this.ISGenerated&&(l.samples.length&&(Y=this.remuxID3(l,p)),y.samples.length&&(M=this.remuxText(y,p))),{audio:j,video:H,initSegment:J,independent:te,text:M,id3:Y}},m.generateIS=function(e,o,l){var y=e.samples,p=o.samples,f=this.typeSupported,R={},L=!Object(G.isFiniteNumber)(this._initPTS),H="audio/mp4",j,J,M;if(L&&(j=J=Infinity),e.config&&y.length&&(e.timescale=e.samplerate,e.isAAC||(f.mpeg?(H="audio/mpeg",e.codec=""):f.mp3&&(e.codec="mp3")),R.audio={id:"audio",container:H,codec:e.codec,initSegment:!e.isAAC&&f.mpeg?new Uint8Array(0):S.default.initSegment([e]),metadata:{channelCount:e.channelCount}},L&&(M=e.inputTimeScale,j=J=y[0].pts-Math.round(M*l))),o.sps&&o.pps&&p.length&&(o.timescale=o.inputTimeScale,R.video={id:"main",container:"video/mp4",codec:o.codec,initSegment:S.default.initSegment([o]),metadata:{width:o.width,height:o.height}},L)){M=o.inputTimeScale;var Y=this.getVideoStartPts(p),te=Math.round(M*l);J=Math.min(J,A(p[0].dts,Y)-te),j=Math.min(j,Y-te)}if(Object.keys(R).length)return this.ISGenerated=!0,L&&(this._initPTS=j,this._initDTS=J),{tracks:R,initPTS:j,timescale:M}},m.remuxVideo=function(e,o,l,y){var p=e.inputTimeScale,f=e.samples,R=[],L=f.length,H=this._initPTS,j=this.nextAvcDts,J=8,M,Y,te,de=Number.POSITIVE_INFINITY,fe=Number.NEGATIVE_INFINITY,Le=0,xe=!1;if(!l||j===null){var Ie=o*p,Fe=f[0].pts-A(f[0].dts,f[0].pts);j=Ie-Fe}for(var Ue=0;Ue<L;Ue++){var be=f[Ue];if(be.pts=A(be.pts-H,j),be.dts=A(be.dts-H,j),be.dts>be.pts){var ue=9e4*.2;Le=Math.max(Math.min(Le,be.pts-be.dts),-1*ue)}be.dts<f[Ue>0?Ue-1:Ue].dts&&(xe=!0)}xe&&f.sort(function(xt,St){var it=xt.dts-St.dts,jt=xt.pts-St.pts;return it||jt}),Y=f[0].dts,te=f[f.length-1].dts;var je=Math.round((te-Y)/(L-1));if(Le<0){if(Le<je*-2){U.logger.warn("PTS < DTS detected in video samples, offsetting DTS from PTS by "+Object(v.toMsFromMpegTsClock)(-je,!0)+" ms");for(var st=Le,nt=0;nt<L;nt++)f[nt].dts=st=Math.max(st,f[nt].pts-je),f[nt].pts=Math.max(st,f[nt].pts)}else{U.logger.warn("PTS < DTS detected in video samples, shifting DTS by "+Object(v.toMsFromMpegTsClock)(Le,!0)+" ms to overcome this issue");for(var rt=0;rt<L;rt++)f[rt].dts=f[rt].dts+Le}Y=f[0].dts}if(l){var He=Y-j,re=He>je,K=He<-1;if(re||K){re?U.logger.warn("AVC: "+Object(v.toMsFromMpegTsClock)(He,!0)+" ms ("+He+"dts) hole between fragments detected, filling it"):U.logger.warn("AVC: "+Object(v.toMsFromMpegTsClock)(-He,!0)+" ms ("+He+"dts) overlapping between fragments detected"),Y=j;var W=f[0].pts-He;f[0].dts=Y,f[0].pts=W,U.logger.log("Video: First PTS/DTS adjusted: "+Object(v.toMsFromMpegTsClock)(W,!0)+"/"+Object(v.toMsFromMpegTsClock)(Y,!0)+", delta: "+Object(v.toMsFromMpegTsClock)(He,!0)+" ms")}}t&&(Y=Math.max(0,Y));for(var se=0,ye=0,we=0;we<L;we++){for(var _e=f[we],$e=_e.units,qe=$e.length,Ve=0,Xe=0;Xe<qe;Xe++)Ve+=$e[Xe].data.length;ye+=Ve,se+=qe,_e.length=Ve,_e.dts=Math.max(_e.dts,Y),_e.pts=Math.max(_e.pts,_e.dts,0),de=Math.min(_e.pts,de),fe=Math.max(_e.pts,fe)}te=f[L-1].dts;var at=ye+4*se+8,ct;try{ct=new Uint8Array(at)}catch(xt){this.observer.emit(z.Events.ERROR,z.Events.ERROR,{type:F.ErrorTypes.MUX_ERROR,details:F.ErrorDetails.REMUX_ALLOC_ERROR,fatal:!1,bytes:at,reason:"fail allocating video mdat "+at});return}var Ce=new DataView(ct.buffer);Ce.setUint32(0,at),ct.set(S.default.types.mdat,4);for(var De=0;De<L;De++){for(var Qe=f[De],We=Qe.units,Re=0,Me=0,Ee=We.length;Me<Ee;Me++){var Ae=We[Me],he=Ae.data,q=Ae.data.byteLength;Ce.setUint32(J,q),J+=4,ct.set(he,J),J+=q,Re+=4+q}if(De<L-1)M=f[De+1].dts-Qe.dts;else{var ee=this.config,oe=Qe.dts-f[De>0?De-1:De].dts;if(ee.stretchShortVideoTrack&&this.nextAudioPts!==null){var ce=Math.floor(ee.maxBufferHole*p),Se=(y?de+y*p:this.nextAudioPts)-Qe.pts;Se>ce?(M=Se-oe,M<0&&(M=oe),U.logger.log("[mp4-remuxer]: It is approximately "+Se/90+" ms to the next segment; using duration "+M/90+" ms for the last video frame.")):M=oe}else M=oe}var Pe=Math.round(Qe.pts-Qe.dts);R.push(new w(Qe.key,M,Re,Pe))}if(R.length&&s&&s<70){var Je=R[0].flags;Je.dependsOn=2,Je.isNonSync=0}console.assert(M!==void 0,"mp4SampleDuration must be computed"),this.nextAvcDts=j=te+M,this.isVideoContiguous=!0;var lt=S.default.moof(e.sequenceNumber++,Y,b({},e,{samples:R})),ht="video",At={data1:lt,data2:ct,startPTS:de/p,endPTS:(fe+M)/p,startDTS:Y/p,endDTS:j/p,type:ht,hasAudio:!1,hasVideo:!0,nb:R.length,dropped:e.dropped};return e.samples=[],e.dropped=0,console.assert(ct.length,"MDAT length must not be zero"),At},m.remuxAudio=function(e,o,l,y,p){var f=e.inputTimeScale,R=e.samplerate?e.samplerate:f,L=f/R,H=e.isAAC?a:n,j=H*L,J=this._initPTS,M=!e.isAAC&&this.typeSupported.mpeg,Y=[],te=e.samples,de=M?0:8,fe=this.nextAudioPts||-1,Le=o*f;if(this.isAudioContiguous=l=l||te.length&&fe>0&&(y&&Math.abs(Le-fe)<9e3||Math.abs(A(te[0].pts-J,Le)-fe)<20*j),te.forEach(function(he){he.pts=A(he.pts-J,Le)}),!l||fe<0){if(te=te.filter(function(he){return he.pts>=0}),!te.length)return;p===0?fe=0:y?fe=Math.max(0,Le):fe=te[0].pts}if(e.isAAC)for(var xe=p!==void 0,Ie=this.config.maxAudioFramesDrift,Fe=0,Ue=fe;Fe<te.length;Fe++){var be=te[Fe],ue=be.pts,je=ue-Ue,st=Math.abs(1e3*je/f);if(je<=-Ie*j&&xe)Fe===0&&(U.logger.warn("Audio frame @ "+(ue/f).toFixed(3)+"s overlaps nextAudioPts by "+Math.round(1e3*je/f)+" ms."),this.nextAudioPts=fe=Ue=ue);else if(je>=Ie*j&&st<u&&xe){var nt=Math.round(je/j);Ue=ue-nt*j,Ue<0&&(nt--,Ue+=j),Fe===0&&(this.nextAudioPts=fe=Ue),U.logger.warn("[mp4-remuxer]: Injecting "+nt+" audio frame @ "+(Ue/f).toFixed(3)+"s due to "+Math.round(1e3*je/f)+" ms gap.");for(var rt=0;rt<nt;rt++){var He=Math.max(Ue,0),re=D.default.getSilentFrame(e.manifestCodec||e.codec,e.channelCount);re||(U.logger.log("[mp4-remuxer]: Unable to get silent frame for given audio codec; duplicating last frame instead."),re=be.unit.subarray()),te.splice(Fe,0,{unit:re,pts:He}),Ue+=j,Fe++}}be.pts=Ue,Ue+=j}for(var K=null,W=null,se,ye=0,we=te.length;we--;)ye+=te[we].unit.byteLength;for(var _e=0,$e=te.length;_e<$e;_e++){var qe=te[_e],Ve=qe.unit,Xe=qe.pts;if(W!==null){var at=Y[_e-1];at.duration=Math.round((Xe-W)/L)}else if(l&&e.isAAC&&(Xe=fe),K=Xe,ye>0){ye+=de;try{se=new Uint8Array(ye)}catch(he){this.observer.emit(z.Events.ERROR,z.Events.ERROR,{type:F.ErrorTypes.MUX_ERROR,details:F.ErrorDetails.REMUX_ALLOC_ERROR,fatal:!1,bytes:ye,reason:"fail allocating audio mdat "+ye});return}if(!M){var ct=new DataView(se.buffer);ct.setUint32(0,ye),se.set(S.default.types.mdat,4)}}else return;se.set(Ve,de);var Ce=Ve.byteLength;de+=Ce,Y.push(new w(!0,H,Ce,0)),W=Xe}var De=Y.length;if(!De)return;var Qe=Y[Y.length-1];this.nextAudioPts=fe=W+L*Qe.duration;var We=M?new Uint8Array(0):S.default.moof(e.sequenceNumber++,K/L,b({},e,{samples:Y}));e.samples=[];var Re=K/f,Me=fe/f,Ee="audio",Ae={data1:We,data2:se,startPTS:Re,endPTS:Me,startDTS:Re,endDTS:Me,type:Ee,hasAudio:!0,hasVideo:!1,nb:De};return this.isAudioContiguous=!0,console.assert(se.length,"MDAT length must not be zero"),Ae},m.remuxEmptyAudio=function(e,o,l,y){var p=e.inputTimeScale,f=e.samplerate?e.samplerate:p,R=p/f,L=this.nextAudioPts,H=(L!==null?L:y.startDTS*p)+this._initDTS,j=y.endDTS*p+this._initDTS,J=R*a,M=Math.ceil((j-H)/J),Y=D.default.getSilentFrame(e.manifestCodec||e.codec,e.channelCount);if(U.logger.warn("[mp4-remuxer]: remux empty Audio"),!Y){U.logger.trace("[mp4-remuxer]: Unable to remuxEmptyAudio since we were unable to get a silent frame for given audio codec");return}for(var te=[],de=0;de<M;de++){var fe=H+de*J;te.push({unit:Y,pts:fe,dts:fe})}return e.samples=te,this.remuxAudio(e,o,l,!1)},m.remuxID3=function(e,o){var l=e.samples.length;if(!l)return;for(var y=e.inputTimeScale,p=this._initPTS,f=this._initDTS,R=0;R<l;R++){var L=e.samples[R];L.pts=A(L.pts-p,o*y)/y,L.dts=A(L.dts-f,o*y)/y}var H=e.samples;return e.samples=[],{samples:H}},m.remuxText=function(e,o){var l=e.samples.length;if(!l)return;for(var y=e.inputTimeScale,p=this._initPTS,f=0;f<l;f++){var R=e.samples[f];R.pts=A(R.pts-p,o*y)/y}e.samples.sort(function(H,j){return H.pts-j.pts});var L=e.samples;return e.samples=[],{samples:L}},x}();function A(x,m){var c;if(m===null)return x;for(m<x?c=-8589934592:c=8589934592;Math.abs(x-m)>4294967296;)x+=c;return x}function B(x){for(var m=0;m<x.length;m++)if(x[m].key)return m;return-1}var w=function(m,c,e,o){this.size=void 0,this.duration=void 0,this.cts=void 0,this.flags=void 0,this.duration=c,this.size=e,this.cts=o,this.flags=new _(m)},_=function(m){this.isLeading=0,this.isDependedOn=0,this.hasRedundancy=0,this.degradPrio=0,this.dependsOn=1,this.isNonSync=1,this.dependsOn=m?2:1,this.isNonSync=m?0:1}},"./src/remux/passthrough-remuxer.ts":function(ve,X,O){"use strict";O.r(X);var G=O("./src/polyfills/number.ts"),D=O("./src/utils/mp4-tools.ts"),S=O("./src/loader/fragment.ts"),z=O("./src/utils/logger.ts"),F=function(){function v(){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 b=v.prototype;return b.destroy=function(){},b.resetTimeStamp=function(a){this.initPTS=a,this.lastEndDTS=null},b.resetNextTimestamp=function(){this.lastEndDTS=null},b.resetInitSegment=function(a,n,s){this.audioCodec=n,this.videoCodec=s,this.generateInitSegment(a),this.emitInitSegment=!0},b.generateInitSegment=function(a){var n=this.audioCodec,s=this.videoCodec;if(!a||!a.byteLength){this.initTracks=void 0,this.initData=void 0;return}var i=this.initData=Object(D.parseInitSegment)(a);n||(n=I(i.audio,S.ElementaryStreamTypes.AUDIO)),s||(s=I(i.video,S.ElementaryStreamTypes.VIDEO));var t={};i.audio&&i.video?t.audiovideo={container:"video/mp4",codec:n+","+s,initSegment:a,id:"main"}:i.audio?t.audio={container:"audio/mp4",codec:n,initSegment:a,id:"audio"}:i.video?t.video={container:"video/mp4",codec:s,initSegment:a,id:"main"}:z.logger.warn("[passthrough-remuxer.ts]: initSegment does not contain moov or trak boxes."),this.initTracks=t},b.remux=function(a,n,s,i,t){var r=this.initPTS,A=this.lastEndDTS,B={audio:void 0,video:void 0,text:i,id3:s,initSegment:void 0};Object(G.isFiniteNumber)(A)||(A=this.lastEndDTS=t||0);var w=n.samples;if(!w||!w.length)return B;var _={initPTS:void 0,timescale:1},x=this.initData;if((!x||!x.length)&&(this.generateInitSegment(w),x=this.initData),!x||!x.length)return z.logger.warn("[passthrough-remuxer.ts]: Failed to generate initSegment."),B;this.emitInitSegment&&(_.tracks=this.initTracks,this.emitInitSegment=!1),Object(G.isFiniteNumber)(r)||(this.initPTS=_.initPTS=r=U(x,w,A));var m=Object(D.getDuration)(w,x),c=A,e=m+c;Object(D.offsetStartDTS)(x,w,r),m>0?this.lastEndDTS=e:(z.logger.warn("Duration parsed from mp4 should be greater than zero"),this.resetNextTimestamp());var o=!!x.audio,l=!!x.video,y="";o&&(y+="audio"),l&&(y+="video");var p={data1:w,startPTS:c,startDTS:c,endPTS:e,endDTS:e,type:y,hasAudio:o,hasVideo:l,nb:1,dropped:0};return B.audio=p.type==="audio"?p:void 0,B.video=p.type!=="audio"?p:void 0,B.text=i,B.id3=s,B.initSegment=_,B},v}(),U=function(b,u,a){return Object(D.getStartDTS)(b,u)-a};function I(v,b){var u=v==null?void 0:v.codec;return u&&u.length>4?u:u==="hvc1"?"hvc1.1.c.L120.90":u==="av01"?"av01.0.04M.08":u==="avc1"||b===S.ElementaryStreamTypes.VIDEO?"avc1.42e01e":"mp4a.40.5"}X.default=F},"./src/task-loop.ts":function(ve,X,O){"use strict";O.r(X),O.d(X,"default",function(){return G});var G=function(){function D(){this._boundTick=void 0,this._tickTimer=null,this._tickInterval=null,this._tickCallCount=0,this._boundTick=this.tick.bind(this)}var S=D.prototype;return S.destroy=function(){this.onHandlerDestroying(),this.onHandlerDestroyed()},S.onHandlerDestroying=function(){this.clearNextTick(),this.clearInterval()},S.onHandlerDestroyed=function(){},S.hasInterval=function(){return!!this._tickInterval},S.hasNextTick=function(){return!!this._tickTimer},S.setInterval=function(F){return this._tickInterval?!1:(this._tickInterval=self.setInterval(this._boundTick,F),!0)},S.clearInterval=function(){return this._tickInterval?(self.clearInterval(this._tickInterval),this._tickInterval=null,!0):!1},S.clearNextTick=function(){return this._tickTimer?(self.clearTimeout(this._tickTimer),this._tickTimer=null,!0):!1},S.tick=function(){this._tickCallCount++,this._tickCallCount===1&&(this.doTick(),this._tickCallCount>1&&this.tickImmediate(),this._tickCallCount=0)},S.tickImmediate=function(){this.clearNextTick(),this._tickTimer=self.setTimeout(this._boundTick,0)},S.doTick=function(){},D}()},"./src/types/cmcd.ts":function(ve,X,O){"use strict";O.r(X),O.d(X,"CMCDVersion",function(){return G}),O.d(X,"CMCDObjectType",function(){return D}),O.d(X,"CMCDStreamingFormat",function(){return S}),O.d(X,"CMCDStreamType",function(){return z});var G=1,D;(function(F){F.MANIFEST="m",F.AUDIO="a",F.VIDEO="v",F.MUXED="av",F.INIT="i",F.CAPTION="c",F.TIMED_TEXT="tt",F.KEY="k",F.OTHER="o"})(D||(D={}));var S;(function(F){F.DASH="d",F.HLS="h",F.SMOOTH="s",F.OTHER="o"})(S||(S={}));var z;(function(F){F.VOD="v",F.LIVE="l"})(z||(z={}))},"./src/types/level.ts":function(ve,X,O){"use strict";O.r(X),O.d(X,"HlsSkip",function(){return S}),O.d(X,"getSkipValue",function(){return z}),O.d(X,"HlsUrlParameters",function(){return F}),O.d(X,"Level",function(){return U});function G(I,v){for(var b=0;b<v.length;b++){var u=v[b];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(I,u.key,u)}}function D(I,v,b){return v&&G(I.prototype,v),b&&G(I,b),I}var S;(function(I){I.No="",I.Yes="YES",I.v2="v2"})(S||(S={}));function z(I,v){var b=I.canSkipUntil,u=I.canSkipDateRanges,a=I.endSN,n=v!==void 0?v-a:0;return b&&n<b?u?S.v2:S.Yes:S.No}var F=function(){function I(b,u,a){this.msn=void 0,this.part=void 0,this.skip=void 0,this.msn=b,this.part=u,this.skip=a}var v=I.prototype;return v.addDirectives=function(u){var a=new self.URL(u);return this.msn!==void 0&&a.searchParams.set("_HLS_msn",this.msn.toString()),this.part!==void 0&&a.searchParams.set("_HLS_part",this.part.toString()),this.skip&&a.searchParams.set("_HLS_skip",this.skip),a.toString()},I}(),U=function(){function I(v){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=[v.url],this.attrs=v.attrs,this.bitrate=v.bitrate,v.details&&(this.details=v.details),this.id=v.id||0,this.name=v.name,this.width=v.width||0,this.height=v.height||0,this.audioCodec=v.audioCodec,this.videoCodec=v.videoCodec,this.unknownCodecs=v.unknownCodecs,this.codecSet=[v.videoCodec,v.audioCodec].filter(function(b){return b}).join(",").replace(/\.[^.,]+/g,"")}return D(I,[{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(b){var u=b%this.url.length;this._urlId!==u&&(this.details=void 0,this._urlId=u)}}]),I}()},"./src/types/loader.ts":function(ve,X,O){"use strict";O.r(X),O.d(X,"PlaylistContextType",function(){return G}),O.d(X,"PlaylistLevelType",function(){return D});var G;(function(S){S.MANIFEST="manifest",S.LEVEL="level",S.AUDIO_TRACK="audioTrack",S.SUBTITLE_TRACK="subtitleTrack"})(G||(G={}));var D;(function(S){S.MAIN="main",S.AUDIO="audio",S.SUBTITLE="subtitle"})(D||(D={}))},"./src/types/transmuxer.ts":function(ve,X,O){"use strict";O.r(X),O.d(X,"ChunkMetadata",function(){return G});var G=function(z,F,U,I,v,b){I===void 0&&(I=0),v===void 0&&(v=-1),b===void 0&&(b=!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=D(),this.buffering={audio:D(),video:D(),audiovideo:D()},this.level=z,this.sn=F,this.id=U,this.size=I,this.part=v,this.partial=b};function D(){return{start:0,executeStart:0,executeEnd:0,end:0}}},"./src/utils/attr-list.ts":function(ve,X,O){"use strict";O.r(X),O.d(X,"AttrList",function(){return S});var G=/^(\d+)x(\d+)$/,D=/\s*(.+?)\s*=((?:\".*?\")|.*?)(?:,|$)/g,S=function(){function z(U){typeof U=="string"&&(U=z.parseAttrList(U));for(var I in U)U.hasOwnProperty(I)&&(this[I]=U[I])}var F=z.prototype;return F.decimalInteger=function(I){var v=parseInt(this[I],10);return v>Number.MAX_SAFE_INTEGER?Infinity:v},F.hexadecimalInteger=function(I){if(this[I]){var v=(this[I]||"0x").slice(2);v=(v.length&1?"0":"")+v;for(var b=new Uint8Array(v.length/2),u=0;u<v.length/2;u++)b[u]=parseInt(v.slice(u*2,u*2+2),16);return b}else return null},F.hexadecimalIntegerAsNumber=function(I){var v=parseInt(this[I],16);return v>Number.MAX_SAFE_INTEGER?Infinity:v},F.decimalFloatingPoint=function(I){return parseFloat(this[I])},F.optionalFloat=function(I,v){var b=this[I];return b?parseFloat(b):v},F.enumeratedString=function(I){return this[I]},F.bool=function(I){return this[I]==="YES"},F.decimalResolution=function(I){var v=G.exec(this[I]);return v===null?void 0:{width:parseInt(v[1],10),height:parseInt(v[2],10)}},z.parseAttrList=function(I){var v,b={},u='"';for(D.lastIndex=0;(v=D.exec(I))!==null;){var a=v[2];a.indexOf(u)===0&&a.lastIndexOf(u)===a.length-1&&(a=a.slice(1,-1)),b[v[1]]=a}return b},z}()},"./src/utils/binary-search.ts":function(ve,X,O){"use strict";O.r(X);var G={search:function(S,z){for(var F=0,U=S.length-1,I=null,v=null;F<=U;){I=(F+U)/2|0,v=S[I];var b=z(v);if(b>0)F=I+1;else if(b<0)U=I-1;else return v}return null}};X.default=G},"./src/utils/buffer-helper.ts":function(ve,X,O){"use strict";O.r(X),O.d(X,"BufferHelper",function(){return S});var G=O("./src/utils/logger.ts"),D={length:0,start:function(){return 0},end:function(){return 0}},S=function(){function z(){}return z.isBuffered=function(U,I){try{if(U){for(var v=z.getBuffered(U),b=0;b<v.length;b++)if(I>=v.start(b)&&I<=v.end(b))return!0}}catch(u){}return!1},z.bufferInfo=function(U,I,v){try{if(U){var b=z.getBuffered(U),u=[],a;for(a=0;a<b.length;a++)u.push({start:b.start(a),end:b.end(a)});return this.bufferedInfo(u,I,v)}}catch(n){}return{len:0,start:I,end:I,nextStart:void 0}},z.bufferedInfo=function(U,I,v){I=Math.max(0,I),U.sort(function(_,x){var m=_.start-x.start;return m||x.end-_.end});var b=[];if(v)for(var u=0;u<U.length;u++){var a=b.length;if(a){var n=b[a-1].end;U[u].start-n<v?U[u].end>n&&(b[a-1].end=U[u].end):b.push(U[u])}else b.push(U[u])}else b=U;for(var s=0,i,t=I,r=I,A=0;A<b.length;A++){var B=b[A].start,w=b[A].end;if(I+v>=B&&I<w)t=B,r=w,s=r-I;else if(I+v<B){i=B;break}}return{len:s,start:t||0,end:r||0,nextStart:i}},z.getBuffered=function(U){try{return U.buffered}catch(I){return G.logger.log("failed to get media.buffered",I),D}},z}()},"./src/utils/cea-608-parser.ts":function(ve,X,O){"use strict";O.r(X),O.d(X,"Row",function(){return r}),O.d(X,"CaptionScreen",function(){return A});var G=O("./src/utils/logger.ts"),D={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},S=function(e){var o=e;return D.hasOwnProperty(e)&&(o=D[e]),String.fromCharCode(o)},z=15,F=100,U={17:1,18:3,21:5,22:7,23:9,16:11,19:12,20:14},I={17:2,18:4,21:6,22:8,23:10,19:13,20:15},v={25:1,26:3,29:5,30:7,31:9,24:11,27:12,28:14},b={25:2,26:4,29:6,30:8,31:10,27:13,28:15},u=["white","green","blue","cyan","red","yellow","magenta","black","transparent"],a;(function(c){c[c.ERROR=0]="ERROR",c[c.TEXT=1]="TEXT",c[c.WARNING=2]="WARNING",c[c.INFO=2]="INFO",c[c.DEBUG=3]="DEBUG",c[c.DATA=3]="DATA"})(a||(a={}));var n=function(){function c(){this.time=null,this.verboseLevel=a.ERROR}var e=c.prototype;return e.log=function(l,y){this.verboseLevel>=l&&G.logger.log(this.time+" ["+l+"] "+y)},c}(),s=function(e){for(var o=[],l=0;l<e.length;l++)o.push(e[l].toString(16));return o},i=function(){function c(o,l,y,p,f){this.foreground=void 0,this.underline=void 0,this.italics=void 0,this.background=void 0,this.flash=void 0,this.foreground=o||"white",this.underline=l||!1,this.italics=y||!1,this.background=p||"black",this.flash=f||!1}var e=c.prototype;return e.reset=function(){this.foreground="white",this.underline=!1,this.italics=!1,this.background="black",this.flash=!1},e.setStyles=function(l){for(var y=["foreground","underline","italics","background","flash"],p=0;p<y.length;p++){var f=y[p];l.hasOwnProperty(f)&&(this[f]=l[f])}},e.isDefault=function(){return this.foreground==="white"&&!this.underline&&!this.italics&&this.background==="black"&&!this.flash},e.equals=function(l){return this.foreground===l.foreground&&this.underline===l.underline&&this.italics===l.italics&&this.background===l.background&&this.flash===l.flash},e.copy=function(l){this.foreground=l.foreground,this.underline=l.underline,this.italics=l.italics,this.background=l.background,this.flash=l.flash},e.toString=function(){return"color="+this.foreground+", underline="+this.underline+", italics="+this.italics+", background="+this.background+", flash="+this.flash},c}(),t=function(){function c(o,l,y,p,f,R){this.uchar=void 0,this.penState=void 0,this.uchar=o||" ",this.penState=new i(l,y,p,f,R)}var e=c.prototype;return e.reset=function(){this.uchar=" ",this.penState.reset()},e.setChar=function(l,y){this.uchar=l,this.penState.copy(y)},e.setPenState=function(l){this.penState.copy(l)},e.equals=function(l){return this.uchar===l.uchar&&this.penState.equals(l.penState)},e.copy=function(l){this.uchar=l.uchar,this.penState.copy(l.penState)},e.isEmpty=function(){return this.uchar===" "&&this.penState.isDefault()},c}(),r=function(){function c(o){this.chars=void 0,this.pos=void 0,this.currPenState=void 0,this.cueStartTime=void 0,this.logger=void 0,this.chars=[];for(var l=0;l<F;l++)this.chars.push(new t);this.logger=o,this.pos=0,this.currPenState=new i}var e=c.prototype;return e.equals=function(l){for(var y=!0,p=0;p<F;p++)if(!this.chars[p].equals(l.chars[p])){y=!1;break}return y},e.copy=function(l){for(var y=0;y<F;y++)this.chars[y].copy(l.chars[y])},e.isEmpty=function(){for(var l=!0,y=0;y<F;y++)if(!this.chars[y].isEmpty()){l=!1;break}return l},e.setCursor=function(l){this.pos!==l&&(this.pos=l),this.pos<0?(this.logger.log(a.DEBUG,"Negative cursor position "+this.pos),this.pos=0):this.pos>F&&(this.logger.log(a.DEBUG,"Too large cursor position "+this.pos),this.pos=F)},e.moveCursor=function(l){var y=this.pos+l;if(l>1)for(var p=this.pos+1;p<y+1;p++)this.chars[p].setPenState(this.currPenState);this.setCursor(y)},e.backSpace=function(){this.moveCursor(-1),this.chars[this.pos].setChar(" ",this.currPenState)},e.insertChar=function(l){l>=144&&this.backSpace();var y=S(l);if(this.pos>=F){this.logger.log(a.ERROR,"Cannot insert "+l.toString(16)+" ("+y+") at position "+this.pos+". Skipping it!");return}this.chars[this.pos].setChar(y,this.currPenState),this.moveCursor(1)},e.clearFromPos=function(l){var y;for(y=l;y<F;y++)this.chars[y].reset()},e.clear=function(){this.clearFromPos(0),this.pos=0,this.currPenState.reset()},e.clearToEndOfRow=function(){this.clearFromPos(this.pos)},e.getTextString=function(){for(var l=[],y=!0,p=0;p<F;p++){var f=this.chars[p].uchar;f!==" "&&(y=!1),l.push(f)}return y?"":l.join("")},e.setPenStyles=function(l){this.currPenState.setStyles(l);var y=this.chars[this.pos];y.setPenState(this.currPenState)},c}(),A=function(){function c(o){this.rows=void 0,this.currRow=void 0,this.nrRollUpRows=void 0,this.lastOutputScreen=void 0,this.logger=void 0,this.rows=[];for(var l=0;l<z;l++)this.rows.push(new r(o));this.logger=o,this.currRow=z-1,this.nrRollUpRows=null,this.lastOutputScreen=null,this.reset()}var e=c.prototype;return e.reset=function(){for(var l=0;l<z;l++)this.rows[l].clear();this.currRow=z-1},e.equals=function(l){for(var y=!0,p=0;p<z;p++)if(!this.rows[p].equals(l.rows[p])){y=!1;break}return y},e.copy=function(l){for(var y=0;y<z;y++)this.rows[y].copy(l.rows[y])},e.isEmpty=function(){for(var l=!0,y=0;y<z;y++)if(!this.rows[y].isEmpty()){l=!1;break}return l},e.backSpace=function(){var l=this.rows[this.currRow];l.backSpace()},e.clearToEndOfRow=function(){var l=this.rows[this.currRow];l.clearToEndOfRow()},e.insertChar=function(l){var y=this.rows[this.currRow];y.insertChar(l)},e.setPen=function(l){var y=this.rows[this.currRow];y.setPenStyles(l)},e.moveCursor=function(l){var y=this.rows[this.currRow];y.moveCursor(l)},e.setCursor=function(l){this.logger.log(a.INFO,"setCursor: "+l);var y=this.rows[this.currRow];y.setCursor(l)},e.setPAC=function(l){this.logger.log(a.INFO,"pacData = "+JSON.stringify(l));var y=l.row-1;if(this.nrRollUpRows&&y<this.nrRollUpRows-1&&(y=this.nrRollUpRows-1),this.nrRollUpRows&&this.currRow!==y){for(var p=0;p<z;p++)this.rows[p].clear();var f=this.currRow+1-this.nrRollUpRows,R=this.lastOutputScreen;if(R){var L=R.rows[f].cueStartTime,H=this.logger.time;if(L&&H!==null&&L<H)for(var j=0;j<this.nrRollUpRows;j++)this.rows[y-this.nrRollUpRows+j+1].copy(R.rows[f+j])}}this.currRow=y;var J=this.rows[this.currRow];if(l.indent!==null){var M=l.indent,Y=Math.max(M-1,0);J.setCursor(l.indent),l.color=J.chars[Y].penState.foreground}var te={foreground:l.color,underline:l.underline,italics:l.italics,background:"black",flash:!1};this.setPen(te)},e.setBkgData=function(l){this.logger.log(a.INFO,"bkgData = "+JSON.stringify(l)),this.backSpace(),this.setPen(l),this.insertChar(32)},e.setRollUpRows=function(l){this.nrRollUpRows=l},e.rollUp=function(){if(this.nrRollUpRows===null){this.logger.log(a.DEBUG,"roll_up but nrRollUpRows not set yet");return}this.logger.log(a.TEXT,this.getDisplayText());var l=this.currRow+1-this.nrRollUpRows,y=this.rows.splice(l,1)[0];y.clear(),this.rows.splice(this.currRow,0,y),this.logger.log(a.INFO,"Rolling up")},e.getDisplayText=function(l){l=l||!1;for(var y=[],p="",f=-1,R=0;R<z;R++){var L=this.rows[R].getTextString();L&&(f=R+1,l?y.push("Row "+f+": '"+L+"'"):y.push(L.trim()))}return y.length>0&&(l?p="["+y.join(" | ")+"]":p=y.join(`
`)),p},e.getTextAndFormat=function(){return this.rows},c}(),B=function(){function c(o,l,y){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=o,this.outputFilter=l,this.mode=null,this.verbose=0,this.displayedMemory=new A(y),this.nonDisplayedMemory=new A(y),this.lastOutputScreen=new A(y),this.currRollUpRow=this.displayedMemory.rows[z-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null,this.logger=y}var e=c.prototype;return e.reset=function(){this.mode=null,this.displayedMemory.reset(),this.nonDisplayedMemory.reset(),this.lastOutputScreen.reset(),this.outputFilter.reset(),this.currRollUpRow=this.displayedMemory.rows[z-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null},e.getHandler=function(){return this.outputFilter},e.setHandler=function(l){this.outputFilter=l},e.setPAC=function(l){this.writeScreen.setPAC(l)},e.setBkgData=function(l){this.writeScreen.setBkgData(l)},e.setMode=function(l){if(l===this.mode)return;this.mode=l,this.logger.log(a.INFO,"MODE="+l),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=l},e.insertChars=function(l){for(var y=0;y<l.length;y++)this.writeScreen.insertChar(l[y]);var p=this.writeScreen===this.displayedMemory?"DISP":"NON_DISP";this.logger.log(a.INFO,p+": "+this.writeScreen.getDisplayText(!0)),(this.mode==="MODE_PAINT-ON"||this.mode==="MODE_ROLL-UP")&&(this.logger.log(a.TEXT,"DISPLAYED: "+this.displayedMemory.getDisplayText(!0)),this.outputDataUpdate())},e.ccRCL=function(){this.logger.log(a.INFO,"RCL - Resume Caption Loading"),this.setMode("MODE_POP-ON")},e.ccBS=function(){if(this.logger.log(a.INFO,"BS - BackSpace"),this.mode==="MODE_TEXT")return;this.writeScreen.backSpace(),this.writeScreen===this.displayedMemory&&this.outputDataUpdate()},e.ccAOF=function(){},e.ccAON=function(){},e.ccDER=function(){this.logger.log(a.INFO,"DER- Delete to End of Row"),this.writeScreen.clearToEndOfRow(),this.outputDataUpdate()},e.ccRU=function(l){this.logger.log(a.INFO,"RU("+l+") - Roll Up"),this.writeScreen=this.displayedMemory,this.setMode("MODE_ROLL-UP"),this.writeScreen.setRollUpRows(l)},e.ccFON=function(){this.logger.log(a.INFO,"FON - Flash On"),this.writeScreen.setPen({flash:!0})},e.ccRDC=function(){this.logger.log(a.INFO,"RDC - Resume Direct Captioning"),this.setMode("MODE_PAINT-ON")},e.ccTR=function(){this.logger.log(a.INFO,"TR"),this.setMode("MODE_TEXT")},e.ccRTD=function(){this.logger.log(a.INFO,"RTD"),this.setMode("MODE_TEXT")},e.ccEDM=function(){this.logger.log(a.INFO,"EDM - Erase Displayed Memory"),this.displayedMemory.reset(),this.outputDataUpdate(!0)},e.ccCR=function(){this.logger.log(a.INFO,"CR - Carriage Return"),this.writeScreen.rollUp(),this.outputDataUpdate(!0)},e.ccENM=function(){this.logger.log(a.INFO,"ENM - Erase Non-displayed Memory"),this.nonDisplayedMemory.reset()},e.ccEOC=function(){if(this.logger.log(a.INFO,"EOC - End Of Caption"),this.mode==="MODE_POP-ON"){var l=this.displayedMemory;this.displayedMemory=this.nonDisplayedMemory,this.nonDisplayedMemory=l,this.writeScreen=this.nonDisplayedMemory,this.logger.log(a.TEXT,"DISP: "+this.displayedMemory.getDisplayText())}this.outputDataUpdate(!0)},e.ccTO=function(l){this.logger.log(a.INFO,"TO("+l+") - Tab Offset"),this.writeScreen.moveCursor(l)},e.ccMIDROW=function(l){var y={flash:!1};if(y.underline=l%2===1,y.italics=l>=46,y.italics)y.foreground="white";else{var p=Math.floor(l/2)-16,f=["white","green","blue","cyan","red","yellow","magenta"];y.foreground=f[p]}this.logger.log(a.INFO,"MIDROW: "+JSON.stringify(y)),this.writeScreen.setPen(y)},e.outputDataUpdate=function(l){l===void 0&&(l=!1);var y=this.logger.time;if(y===null)return;this.outputFilter&&(this.cueStartTime===null&&!this.displayedMemory.isEmpty()?this.cueStartTime=y:this.displayedMemory.equals(this.lastOutputScreen)||(this.outputFilter.newCue(this.cueStartTime,y,this.lastOutputScreen),l&&this.outputFilter.dispatchCue&&this.outputFilter.dispatchCue(),this.cueStartTime=this.displayedMemory.isEmpty()?null:y),this.lastOutputScreen.copy(this.displayedMemory))},e.cueSplitAtTime=function(l){this.outputFilter&&(this.displayedMemory.isEmpty()||(this.outputFilter.newCue&&this.outputFilter.newCue(this.cueStartTime,l,this.displayedMemory),this.cueStartTime=l))},c}(),w=function(){function c(o,l,y){this.channels=void 0,this.currentChannel=0,this.cmdHistory=void 0,this.logger=void 0;var p=new n;this.channels=[null,new B(o,l,p),new B(o+1,y,p)],this.cmdHistory=m(),this.logger=p}var e=c.prototype;return e.getHandler=function(l){return this.channels[l].getHandler()},e.setHandler=function(l,y){this.channels[l].setHandler(y)},e.addData=function(l,y){var p,f,R,L=!1;this.logger.time=l;for(var H=0;H<y.length;H+=2){if(f=y[H]&127,R=y[H+1]&127,f===0&&R===0)continue;if(this.logger.log(a.DATA,"["+s([y[H],y[H+1]])+"] -> ("+s([f,R])+")"),p=this.parseCmd(f,R),p||(p=this.parseMidrow(f,R)),p||(p=this.parsePAC(f,R)),p||(p=this.parseBackgroundAttributes(f,R)),!p&&(L=this.parseChars(f,R),L)){var j=this.currentChannel;if(j&&j>0){var J=this.channels[j];J.insertChars(L)}else this.logger.log(a.WARNING,"No channel found yet. TEXT-MODE?")}!p&&!L&&this.logger.log(a.WARNING,"Couldn't parse cleaned data "+s([f,R])+" orig: "+s([y[H],y[H+1]]))}},e.parseCmd=function(l,y){var p=this.cmdHistory,f=(l===20||l===28||l===21||l===29)&&y>=32&&y<=47,R=(l===23||l===31)&&y>=33&&y<=35;if(!(f||R))return!1;if(x(l,y,p))return _(null,null,p),this.logger.log(a.DEBUG,"Repeated command ("+s([l,y])+") is dropped"),!0;var L=l===20||l===21||l===23?1:2,H=this.channels[L];return l===20||l===21||l===28||l===29?y===32?H.ccRCL():y===33?H.ccBS():y===34?H.ccAOF():y===35?H.ccAON():y===36?H.ccDER():y===37?H.ccRU(2):y===38?H.ccRU(3):y===39?H.ccRU(4):y===40?H.ccFON():y===41?H.ccRDC():y===42?H.ccTR():y===43?H.ccRTD():y===44?H.ccEDM():y===45?H.ccCR():y===46?H.ccENM():y===47&&H.ccEOC():H.ccTO(y-32),_(l,y,p),this.currentChannel=L,!0},e.parseMidrow=function(l,y){var p=0;if((l===17||l===25)&&y>=32&&y<=47){if(l===17?p=1:p=2,p!==this.currentChannel)return this.logger.log(a.ERROR,"Mismatch channel in midrow parsing"),!1;var f=this.channels[p];return f?(f.ccMIDROW(y),this.logger.log(a.DEBUG,"MIDROW ("+s([l,y])+")"),!0):!1}return!1},e.parsePAC=function(l,y){var p,f=this.cmdHistory,R=(l>=17&&l<=23||l>=25&&l<=31)&&y>=64&&y<=127,L=(l===16||l===24)&&y>=64&&y<=95;if(!(R||L))return!1;if(x(l,y,f))return _(null,null,f),!0;var H=l<=23?1:2;y>=64&&y<=95?p=H===1?U[l]:v[l]:p=H===1?I[l]:b[l];var j=this.channels[H];return j?(j.setPAC(this.interpretPAC(p,y)),_(l,y,f),this.currentChannel=H,!0):!1},e.interpretPAC=function(l,y){var p,f={color:null,italics:!1,indent:null,underline:!1,row:l};return y>95?p=y-96:p=y-64,f.underline=(p&1)===1,p<=13?f.color=["white","green","blue","cyan","red","yellow","magenta","white"][Math.floor(p/2)]:p<=15?(f.italics=!0,f.color="white"):f.indent=Math.floor((p-16)/2)*4,f},e.parseChars=function(l,y){var p,f=null,R=null;if(l>=25?(p=2,R=l-8):(p=1,R=l),R>=17&&R<=19){var L;R===17?L=y+80:R===18?L=y+112:L=y+144,this.logger.log(a.INFO,"Special char '"+S(L)+"' in channel "+p),f=[L]}else l>=32&&l<=127&&(f=y===0?[l]:[l,y]);if(f){var H=s(f);this.logger.log(a.DEBUG,"Char codes = "+H.join(",")),_(l,y,this.cmdHistory)}return f},e.parseBackgroundAttributes=function(l,y){var p=(l===16||l===24)&&y>=32&&y<=47,f=(l===23||l===31)&&y>=45&&y<=47;if(!(p||f))return!1;var R,L={};l===16||l===24?(R=Math.floor((y-32)/2),L.background=u[R],y%2===1&&(L.background=L.background+"_semi")):y===45?L.background="transparent":(L.foreground="black",y===47&&(L.underline=!0));var H=l<=23?1:2,j=this.channels[H];return j.setBkgData(L),_(l,y,this.cmdHistory),!0},e.reset=function(){for(var l=0;l<Object.keys(this.channels).length;l++){var y=this.channels[l];y&&y.reset()}this.cmdHistory=m()},e.cueSplitAtTime=function(l){for(var y=0;y<this.channels.length;y++){var p=this.channels[y];p&&p.cueSplitAtTime(l)}},c}();function _(c,e,o){o.a=c,o.b=e}function x(c,e,o){return o.a===c&&o.b===e}function m(){return{a:null,b:null}}X.default=w},"./src/utils/codecs.ts":function(ve,X,O){"use strict";O.r(X),O.d(X,"isCodecType",function(){return D}),O.d(X,"isCodecSupportedInMp4",function(){return S});var G={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 D(z,F){var U=G[F];return!!U&&U[z.slice(0,4)]===!0}function S(z,F){return MediaSource.isTypeSupported((F||"video")+'/mp4;codecs="'+z+'"')}},"./src/utils/cues.ts":function(ve,X,O){"use strict";O.r(X);var G=O("./src/utils/vttparser.ts"),D=O("./src/utils/webvtt-parser.ts"),S=O("./src/utils/texttrack-utils.ts"),z=/\s/,F={newCue:function(I,v,b,u){for(var a=[],n,s,i,t,r,A=self.VTTCue||self.TextTrackCue,B=0;B<u.rows.length;B++)if(n=u.rows[B],i=!0,t=0,r="",!n.isEmpty()){for(var w=0;w<n.chars.length;w++)z.test(n.chars[w].uchar)&&i?t++:(r+=n.chars[w].uchar,i=!1);n.cueStartTime=v,v===b&&(b+=1e-4),t>=16?t--:t++;var _=Object(G.fixLineBreaks)(r.trim()),x=Object(D.generateCueId)(v,b,_);(!I||!I.cues||!I.cues.getCueById(x))&&(s=new A(v,b,_),s.id=x,s.line=B+1,s.align="left",s.position=10+Math.min(80,Math.floor(t*8/32)*10),a.push(s))}return I&&a.length&&(a.sort(function(m,c){return m.line==="auto"||c.line==="auto"?0:m.line>8&&c.line>8?c.line-m.line:m.line-c.line}),a.forEach(function(m){return Object(S.addCueToTrack)(I,m)})),a}};X.default=F},"./src/utils/discontinuities.ts":function(ve,X,O){"use strict";O.r(X),O.d(X,"findFirstFragWithCC",function(){return z}),O.d(X,"shouldAlignOnDiscontinuities",function(){return F}),O.d(X,"findDiscontinuousReferenceFrag",function(){return U}),O.d(X,"adjustSlidingStart",function(){return v}),O.d(X,"alignStream",function(){return b}),O.d(X,"alignPDT",function(){return a}),O.d(X,"alignFragmentByPDTDelta",function(){return n}),O.d(X,"alignMediaPlaylistByPDT",function(){return s});var G=O("./src/polyfills/number.ts"),D=O("./src/utils/logger.ts"),S=O("./src/controller/level-helper.ts");function z(i,t){for(var r=null,A=0,B=i.length;A<B;A++){var w=i[A];if(w&&w.cc===t){r=w;break}}return r}function F(i,t,r){return!!(t.details&&(r.endCC>r.startCC||i&&i.cc<r.startCC))}function U(i,t){var r=i.fragments,A=t.fragments;if(!A.length||!r.length){D.logger.log("No fragments to align");return}var B=z(r,A[0].cc);if(!B||B&&!B.startPTS){D.logger.log("No frag in previous level to align on");return}return B}function I(i,t){if(i){var r=i.start+t;i.start=i.startPTS=r,i.endPTS=r+i.duration}}function v(i,t){for(var r=t.fragments,A=0,B=r.length;A<B;A++)I(r[A],i);t.fragmentHint&&I(t.fragmentHint,i),t.alignedSliding=!0}function b(i,t,r){if(!t)return;u(i,r,t),!r.alignedSliding&&t.details&&a(r,t.details),!r.alignedSliding&&t.details&&!r.skippedSegments&&Object(S.adjustSliding)(t.details,r)}function u(i,t,r){if(F(i,r,t)){var A=U(r.details,t);A&&Object(G.isFiniteNumber)(A.start)&&(D.logger.log("Adjusting PTS using last level due to CC increase within current level "+t.url),v(A.start,t))}}function a(i,t){if(!t.fragments.length||!i.hasProgramDateTime||!t.hasProgramDateTime)return;var r=t.fragments[0].programDateTime,A=i.fragments[0].programDateTime,B=(A-r)/1e3+t.fragments[0].start;B&&Object(G.isFiniteNumber)(B)&&(D.logger.log("Adjusting PTS using programDateTime delta "+(A-r)+"ms, sliding:"+B.toFixed(3)+" "+i.url+" "),v(B,i))}function n(i,t){var r=i.programDateTime;if(!r)return;var A=(r-t)/1e3;i.start=i.startPTS=A,i.endPTS=A+i.duration}function s(i,t){if(!t.fragments.length||!i.hasProgramDateTime||!t.hasProgramDateTime)return;var r=t.fragments[0].programDateTime,A=t.fragments[0].start,B=r-A*1e3;i.fragments.forEach(function(w){n(w,B)}),i.fragmentHint&&n(i.fragmentHint,B),i.alignedSliding=!0}},"./src/utils/ewma-bandwidth-estimator.ts":function(ve,X,O){"use strict";O.r(X);var G=O("./src/utils/ewma.ts"),D=function(){function S(F,U,I){this.defaultEstimate_=void 0,this.minWeight_=void 0,this.minDelayMs_=void 0,this.slow_=void 0,this.fast_=void 0,this.defaultEstimate_=I,this.minWeight_=.001,this.minDelayMs_=50,this.slow_=new G.default(F),this.fast_=new G.default(U)}var z=S.prototype;return z.update=function(U,I){var v=this.slow_,b=this.fast_;this.slow_.halfLife!==U&&(this.slow_=new G.default(U,v.getEstimate(),v.getTotalWeight())),this.fast_.halfLife!==I&&(this.fast_=new G.default(I,b.getEstimate(),b.getTotalWeight()))},z.sample=function(U,I){U=Math.max(U,this.minDelayMs_);var v=8*I,b=U/1e3,u=v/b;this.fast_.sample(b,u),this.slow_.sample(b,u)},z.canEstimate=function(){var U=this.fast_;return U&&U.getTotalWeight()>=this.minWeight_},z.getEstimate=function(){return this.canEstimate()?Math.min(this.fast_.getEstimate(),this.slow_.getEstimate()):this.defaultEstimate_},z.destroy=function(){},S}();X.default=D},"./src/utils/ewma.ts":function(ve,X,O){"use strict";O.r(X);var G=function(){function D(z,F,U){F===void 0&&(F=0),U===void 0&&(U=0),this.halfLife=void 0,this.alpha_=void 0,this.estimate_=void 0,this.totalWeight_=void 0,this.halfLife=z,this.alpha_=z?Math.exp(Math.log(.5)/z):0,this.estimate_=F,this.totalWeight_=U}var S=D.prototype;return S.sample=function(F,U){var I=Math.pow(this.alpha_,F);this.estimate_=U*(1-I)+I*this.estimate_,this.totalWeight_+=F},S.getTotalWeight=function(){return this.totalWeight_},S.getEstimate=function(){if(this.alpha_){var F=1-Math.pow(this.alpha_,this.totalWeight_);if(F)return this.estimate_/F}return this.estimate_},D}();X.default=G},"./src/utils/fetch-loader.ts":function(ve,X,O){"use strict";O.r(X),O.d(X,"fetchSupported",function(){return n});var G=O("./src/polyfills/number.ts"),D=O("./src/loader/load-stats.ts"),S=O("./src/demux/chunk-cache.ts");function z(A,B){A.prototype=Object.create(B.prototype),A.prototype.constructor=A,b(A,B)}function F(A){var B=typeof Map=="function"?new Map:void 0;return F=function(_){if(_===null||!v(_))return _;if(typeof _!="function")throw new TypeError("Super expression must either be null or a function");if(typeof B!="undefined"){if(B.has(_))return B.get(_);B.set(_,x)}function x(){return U(_,arguments,u(this).constructor)}return x.prototype=Object.create(_.prototype,{constructor:{value:x,enumerable:!1,writable:!0,configurable:!0}}),b(x,_)},F(A)}function U(A,B,w){return I()?U=Reflect.construct:U=function(x,m,c){var e=[null];e.push.apply(e,m);var o=Function.bind.apply(x,e),l=new o;return c&&b(l,c.prototype),l},U.apply(null,arguments)}function I(){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(A){return!1}}function v(A){return Function.toString.call(A).indexOf("[native code]")!==-1}function b(A,B){return b=Object.setPrototypeOf||function(_,x){return _.__proto__=x,_},b(A,B)}function u(A){return u=Object.setPrototypeOf?Object.getPrototypeOf:function(w){return w.__proto__||Object.getPrototypeOf(w)},u(A)}function a(){return a=Object.assign||function(A){for(var B=1;B<arguments.length;B++){var w=arguments[B];for(var _ in w)Object.prototype.hasOwnProperty.call(w,_)&&(A[_]=w[_])}return A},a.apply(this,arguments)}function n(){if(self.fetch&&self.AbortController&&self.ReadableStream&&self.Request)try{return new self.ReadableStream({}),!0}catch(A){}return!1}var s=function(){function A(w){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=w.fetchSetup||t,this.controller=new self.AbortController,this.stats=new D.LoadStats}var B=A.prototype;return B.destroy=function(){this.loader=this.callbacks=null,this.abortInternal()},B.abortInternal=function(){var _=this.response;(!_||!_.ok)&&(this.stats.aborted=!0,this.controller.abort())},B.abort=function(){var _;this.abortInternal(),(_=this.callbacks)!==null&&_!==void 0&&_.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.response)},B.load=function(_,x,m){var c=this,e=this.stats;if(e.loading.start)throw new Error("Loader can only be used once.");e.loading.start=self.performance.now();var o=i(_,this.controller.signal),l=m.onProgress,y=_.responseType==="arraybuffer",p=y?"byteLength":"length";this.context=_,this.config=x,this.callbacks=m,this.request=this.fetchSetup(_,o),self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(function(){c.abortInternal(),m.onTimeout(e,_,c.response)},x.timeout),self.fetch(this.request).then(function(f){if(c.response=c.loader=f,!f.ok){var R=f.status,L=f.statusText;throw new r(L||"fetch, bad network response",R,f)}return e.loading.first=Math.max(self.performance.now(),e.loading.start),e.total=parseInt(f.headers.get("Content-Length")||"0"),l&&Object(G.isFiniteNumber)(x.highWaterMark)?c.loadProgressively(f,e,_,x.highWaterMark,l):y?f.arrayBuffer():f.text()}).then(function(f){var R=c.response;self.clearTimeout(c.requestTimeout),e.loading.end=Math.max(self.performance.now(),e.loading.first),e.loaded=e.total=f[p];var L={url:R.url,data:f};l&&!Object(G.isFiniteNumber)(x.highWaterMark)&&l(e,_,f,R),m.onSuccess(L,e,_,R)}).catch(function(f){if(self.clearTimeout(c.requestTimeout),e.aborted)return;var R=f.code||0;m.onError({code:R,text:f.message},_,f.details)})},B.getCacheAge=function(){var _=null;if(this.response){var x=this.response.headers.get("age");_=x?parseFloat(x):null}return _},B.loadProgressively=function(_,x,m,c,e){c===void 0&&(c=0);var o=new S.default,l=_.body.getReader(),y=function p(){return l.read().then(function(f){if(f.done)return o.dataLength&&e(x,m,o.flush(),_),Promise.resolve(new ArrayBuffer(0));var R=f.value,L=R.length;return x.loaded+=L,L<c||o.dataLength?(o.push(R),o.dataLength>=c&&e(x,m,o.flush(),_)):e(x,m,R,_),p()}).catch(function(){return Promise.reject()})};return y()},A}();function i(A,B){var w={method:"GET",mode:"cors",credentials:"same-origin",signal:B,headers:new self.Headers(a({},A.headers))};return A.rangeEnd&&w.headers.set("Range","bytes="+A.rangeStart+"-"+String(A.rangeEnd-1)),w}function t(A,B){return new self.Request(A.url,B)}var r=function(A){z(B,A);function B(w,_,x){var m;return m=A.call(this,w)||this,m.code=void 0,m.details=void 0,m.code=_,m.details=x,m}return B}(F(Error));X.default=s},"./src/utils/imsc1-ttml-parser.ts":function(ve,X,O){"use strict";O.r(X),O.d(X,"IMSC1_CODEC",function(){return v}),O.d(X,"parseIMSC1",function(){return n});var G=O("./src/utils/mp4-tools.ts"),D=O("./src/utils/vttparser.ts"),S=O("./src/utils/vttcue.ts"),z=O("./src/demux/id3.ts"),F=O("./src/utils/timescale-conversion.ts"),U=O("./src/utils/webvtt-parser.ts");function I(){return I=Object.assign||function(c){for(var e=1;e<arguments.length;e++){var o=arguments[e];for(var l in o)Object.prototype.hasOwnProperty.call(o,l)&&(c[l]=o[l])}return c},I.apply(this,arguments)}var v="stpp.ttml.im1t",b=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,u=/^(\d*(?:\.\d*)?)(h|m|s|ms|f|t)$/,a={left:"start",center:"center",right:"end",start:"start",end:"end"};function n(c,e,o,l,y){var p=Object(G.findBox)(new Uint8Array(c),["mdat"]);if(p.length===0){y(new Error("Could not parse IMSC1 mdat"));return}var f=p[0],R=Object(z.utf8ArrayToStr)(new Uint8Array(c,f.start,f.end-f.start)),L=Object(F.toTimescaleFromScale)(e,1,o);try{l(s(R,L))}catch(H){y(H)}}function s(c,e){var o=new DOMParser,l=o.parseFromString(c,"text/xml"),y=l.getElementsByTagName("tt")[0];if(!y)throw new Error("Invalid ttml");var p={frameRate:30,subFrameRate:1,frameRateMultiplier:0,tickRate:0},f=Object.keys(p).reduce(function(J,M){return J[M]=y.getAttribute("ttp:"+M)||p[M],J},{}),R=y.getAttribute("xml:space")!=="preserve",L=t(i(y,"styling","style")),H=t(i(y,"layout","region")),j=i(y,"body","[begin]");return[].map.call(j,function(J){var M=r(J,R);if(!M||!J.hasAttribute("begin"))return null;var Y=_(J.getAttribute("begin"),f),te=_(J.getAttribute("dur"),f),de=_(J.getAttribute("end"),f);if(Y===null)throw w(J);if(de===null){if(te===null)throw w(J);de=Y+te}var fe=new S.default(Y-e,de-e,M);fe.id=Object(U.generateCueId)(fe.startTime,fe.endTime,fe.text);var Le=H[J.getAttribute("region")],xe=L[J.getAttribute("style")];fe.position=10,fe.size=80;var Ie=A(Le,xe),Fe=Ie.textAlign;if(Fe){var Ue=a[Fe];Ue&&(fe.lineAlign=Ue),fe.align=Fe}return I(fe,Ie),fe}).filter(function(J){return J!==null})}function i(c,e,o){var l=c.getElementsByTagName(e)[0];return l?[].slice.call(l.querySelectorAll(o)):[]}function t(c){return c.reduce(function(e,o){var l=o.getAttribute("xml:id");return l&&(e[l]=o),e},{})}function r(c,e){return[].slice.call(c.childNodes).reduce(function(o,l,y){var p;return l.nodeName==="br"&&y?o+`
`:(p=l.childNodes)!==null&&p!==void 0&&p.length?r(l,e):e?o+l.textContent.trim().replace(/\s+/g," "):o+l.textContent},"")}function A(c,e){var o="http://www.w3.org/ns/ttml#styling",l=["displayAlign","textAlign","color","backgroundColor","fontSize","fontFamily"];return l.reduce(function(y,p){var f=B(e,o,p)||B(c,o,p);return f&&(y[p]=f),y},{})}function B(c,e,o){return c.hasAttributeNS(e,o)?c.getAttributeNS(e,o):null}function w(c){return new Error("Could not parse ttml timestamp "+c)}function _(c,e){if(!c)return null;var o=Object(D.parseTimeStamp)(c);return o===null&&(b.test(c)?o=x(c,e):u.test(c)&&(o=m(c,e))),o}function x(c,e){var o=b.exec(c),l=(o[4]|0)+(o[5]|0)/e.subFrameRate;return(o[1]|0)*3600+(o[2]|0)*60+(o[3]|0)+l/e.frameRate}function m(c,e){var o=u.exec(c),l=Number(o[1]),y=o[2];switch(y){case"h":return l*3600;case"m":return l*60;case"ms":return l*1e3;case"f":return l/e.frameRate;case"t":return l/e.tickRate}return l}},"./src/utils/logger.ts":function(ve,X,O){"use strict";O.r(X),O.d(X,"enableLogs",function(){return U}),O.d(X,"logger",function(){return I});var G=function(){},D={trace:G,debug:G,log:G,warn:G,info:G,error:G},S=D;function z(v){var b=self.console[v];return b?b.bind(self.console,"["+v+"] >"):G}function F(v){for(var b=arguments.length,u=new Array(b>1?b-1:0),a=1;a<b;a++)u[a-1]=arguments[a];u.forEach(function(n){S[n]=v[n]?v[n].bind(v):z(n)})}function U(v){if(self.console&&v===!0||typeof v=="object"){F(v,"debug","log","info","warn","error");try{S.log()}catch(b){S=D}}else S=D}var I=S},"./src/utils/mediakeys-helper.ts":function(ve,X,O){"use strict";O.r(X),O.d(X,"KeySystems",function(){return G}),O.d(X,"requestMediaKeySystemAccess",function(){return D});var G;(function(S){S.WIDEVINE="com.widevine.alpha",S.PLAYREADY="com.microsoft.playready"})(G||(G={}));var D=function(){return typeof self!="undefined"&&self.navigator&&self.navigator.requestMediaKeySystemAccess?self.navigator.requestMediaKeySystemAccess.bind(self.navigator):null}()},"./src/utils/mediasource-helper.ts":function(ve,X,O){"use strict";O.r(X),O.d(X,"getMediaSource",function(){return G});function G(){return self.MediaSource||self.WebKitMediaSource}},"./src/utils/mp4-tools.ts":function(ve,X,O){"use strict";O.r(X),O.d(X,"bin2str",function(){return F}),O.d(X,"readUint16",function(){return U}),O.d(X,"readUint32",function(){return I}),O.d(X,"writeUint32",function(){return v}),O.d(X,"findBox",function(){return b}),O.d(X,"parseSegmentIndex",function(){return u}),O.d(X,"parseInitSegment",function(){return a}),O.d(X,"getStartDTS",function(){return n}),O.d(X,"getDuration",function(){return s}),O.d(X,"computeRawDurationFromSamples",function(){return i}),O.d(X,"offsetStartDTS",function(){return t}),O.d(X,"segmentValidRange",function(){return r}),O.d(X,"appendUint8Array",function(){return A});var G=O("./src/utils/typed-array.ts"),D=O("./src/loader/fragment.ts"),S=Math.pow(2,32)-1,z=[].push;function F(B){return String.fromCharCode.apply(null,B)}function U(B,w){"data"in B&&(w+=B.start,B=B.data);var _=B[w]<<8|B[w+1];return _<0?65536+_:_}function I(B,w){"data"in B&&(w+=B.start,B=B.data);var _=B[w]<<24|B[w+1]<<16|B[w+2]<<8|B[w+3];return _<0?4294967296+_:_}function v(B,w,_){"data"in B&&(w+=B.start,B=B.data),B[w]=_>>24,B[w+1]=_>>16&255,B[w+2]=_>>8&255,B[w+3]=_&255}function b(B,w){var _=[];if(!w.length)return _;var x,m,c;"data"in B?(x=B.data,m=B.start,c=B.end):(x=B,m=0,c=x.byteLength);for(var e=m;e<c;){var o=I(x,e),l=F(x.subarray(e+4,e+8)),y=o>1?e+o:c;if(l===w[0])if(w.length===1)_.push({data:x,start:e+8,end:y});else{var p=b({data:x,start:e+8,end:y},w.slice(1));p.length&&z.apply(_,p)}e=y}return _}function u(B){var w=b(B,["moov"]),_=w[0],x=_?_.end:null,m=b(B,["sidx"]);if(!m||!m[0])return null;var c=[],e=m[0],o=e.data[0],l=o===0?8:16,y=I(e,l);l+=4;var p=0,f=0;o===0?l+=8:l+=16,l+=2;var R=e.end+f,L=U(e,l);l+=2;for(var H=0;H<L;H++){var j=l,J=I(e,j);j+=4;var M=J&2147483647,Y=(J&2147483648)>>>31;if(Y===1)return console.warn("SIDX has hierarchical references (not supported)"),null;var te=I(e,j);j+=4,c.push({referenceSize:M,subsegmentDuration:te,info:{duration:te/y,start:R,end:R+M-1}}),R+=M,j+=4,l=j}return{earliestPresentationTime:p,timescale:y,version:o,referencesCount:L,references:c,moovEndOffset:x}}function a(B){for(var w=[],_=b(B,["moov","trak"]),x=0;x<_.length;x++){var m=_[x],c=b(m,["tkhd"])[0];if(c){var e=c.data[c.start],o=e===0?12:20,l=I(c,o),y=b(m,["mdia","mdhd"])[0];if(y){e=y.data[y.start],o=e===0?12:20;var p=I(y,o),f=b(m,["mdia","hdlr"])[0];if(f){var R=F(f.data.subarray(f.start+8,f.start+12)),L={soun:D.ElementaryStreamTypes.AUDIO,vide:D.ElementaryStreamTypes.VIDEO}[R];if(L){var H=b(m,["mdia","minf","stbl","stsd"])[0],j=void 0;H&&(j=F(H.data.subarray(H.start+12,H.start+16))),w[l]={timescale:p,type:L},w[L]={timescale:p,id:l,codec:j}}}}}}var J=b(B,["moov","mvex","trex"]);return J.forEach(function(M){var Y=I(M,4),te=w[Y];te&&(te.default={duration:I(M,12),flags:I(M,20)})}),w}function n(B,w){return b(w,["moof","traf"]).reduce(function(_,x){var m=b(x,["tfdt"])[0],c=m.data[m.start],e=b(x,["tfhd"]).reduce(function(o,l){var y=I(l,4),p=B[y];if(p){var f=I(m,4);c===1&&(f*=Math.pow(2,32),f+=I(m,8));var R=p.timescale||9e4,L=f/R;if(isFinite(L)&&(o===null||L<o))return L}return o},null);return e!==null&&isFinite(e)&&(_===null||e<_)?e:_},null)||0}function s(B,w){for(var _=0,x=0,m=0,c=b(B,["moof","traf"]),e=0;e<c.length;e++){var o=c[e],l=b(o,["tfhd"])[0],y=I(l,4),p=w[y];if(!p)continue;var f=p.default,R=I(l,0)|(f==null?void 0:f.flags),L=f==null?void 0:f.duration;R&8&&(R&2?L=I(l,12):L=I(l,8));for(var H=p.timescale||9e4,j=b(o,["trun"]),J=0;J<j.length;J++){if(L){var M=I(j[J],4);_=L*M}else _=i(j[J]);p.type===D.ElementaryStreamTypes.VIDEO?x+=_/H:p.type===D.ElementaryStreamTypes.AUDIO&&(m+=_/H)}}if(x===0&&m===0){var Y=u(B);if(Y!=null&&Y.references)return Y.references.reduce(function(te,de){return te+de.info.duration||0},0)}return x||m}function i(B){var w=I(B,0),_=8;w&1&&(_+=4),w&4&&(_+=4);for(var x=0,m=I(B,4),c=0;c<m;c++){if(w&256){var e=I(B,_);x+=e,_+=4}w&512&&(_+=4),w&1024&&(_+=4),w&2048&&(_+=4)}return x}function t(B,w,_){b(w,["moof","traf"]).forEach(function(x){b(x,["tfhd"]).forEach(function(m){var c=I(m,4),e=B[c];if(!e)return;var o=e.timescale||9e4;b(x,["tfdt"]).forEach(function(l){var y=l.data[l.start],p=I(l,4);if(y===0)v(l,4,p-_*o);else{p*=Math.pow(2,32),p+=I(l,8),p-=_*o,p=Math.max(p,0);var f=Math.floor(p/(S+1)),R=Math.floor(p%(S+1));v(l,4,f),v(l,8,R)}})})})}function r(B){var w={valid:null,remainder:null},_=b(B,["moof"]);if(_){if(_.length<2)return w.remainder=B,w}else return w;var x=_[_.length-1];return w.valid=Object(G.sliceUint8)(B,0,x.start-8),w.remainder=Object(G.sliceUint8)(B,x.start-8),w}function A(B,w){var _=new Uint8Array(B.length+w.length);return _.set(B),_.set(w,B.length),_}},"./src/utils/output-filter.ts":function(ve,X,O){"use strict";O.r(X),O.d(X,"default",function(){return G});var G=function(){function D(z,F){this.timelineController=void 0,this.cueRanges=[],this.trackName=void 0,this.startTime=null,this.endTime=null,this.screen=null,this.timelineController=z,this.trackName=F}var S=D.prototype;return S.dispatchCue=function(){if(this.startTime===null)return;this.timelineController.addCues(this.trackName,this.startTime,this.endTime,this.screen,this.cueRanges),this.startTime=null},S.newCue=function(F,U,I){(this.startTime===null||this.startTime>F)&&(this.startTime=F),this.endTime=U,this.screen=I,this.timelineController.createCaptionsTrack(this.trackName)},S.reset=function(){this.cueRanges=[]},D}()},"./src/utils/texttrack-utils.ts":function(ve,X,O){"use strict";O.r(X),O.d(X,"sendAddTrackEvent",function(){return D}),O.d(X,"addCueToTrack",function(){return S}),O.d(X,"clearCurrentCues",function(){return z}),O.d(X,"removeCuesInRange",function(){return F}),O.d(X,"getCuesInRange",function(){return I});var G=O("./src/utils/logger.ts");function D(v,b){var u;try{u=new Event("addtrack")}catch(a){u=document.createEvent("Event"),u.initEvent("addtrack",!1,!1)}u.track=v,b.dispatchEvent(u)}function S(v,b){var u=v.mode;if(u==="disabled"&&(v.mode="hidden"),v.cues&&!v.cues.getCueById(b.id))try{if(v.addCue(b),!v.cues.getCueById(b.id))throw new Error("addCue is failed for: "+b)}catch(n){G.logger.debug("[texttrack-utils]: "+n);var a=new self.TextTrackCue(b.startTime,b.endTime,b.text);a.id=b.id,v.addCue(a)}u==="disabled"&&(v.mode=u)}function z(v){var b=v.mode;if(b==="disabled"&&(v.mode="hidden"),v.cues)for(var u=v.cues.length;u--;)v.removeCue(v.cues[u]);b==="disabled"&&(v.mode=b)}function F(v,b,u){var a=v.mode;if(a==="disabled"&&(v.mode="hidden"),v.cues&&v.cues.length>0)for(var n=I(v.cues,b,u),s=0;s<n.length;s++)v.removeCue(n[s]);a==="disabled"&&(v.mode=a)}function U(v,b){if(b<v[0].startTime)return 0;var u=v.length-1;if(b>v[u].endTime)return-1;for(var a=0,n=u;a<=n;){var s=Math.floor((n+a)/2);if(b<v[s].startTime)n=s-1;else if(b>v[s].startTime&&a<u)a=s+1;else return s}return v[a].startTime-b<b-v[n].startTime?a:n}function I(v,b,u){var a=[],n=U(v,b);if(n>-1)for(var s=n,i=v.length;s<i;s++){var t=v[s];if(t.startTime>=b&&t.endTime<=u)a.push(t);else if(t.startTime>u)return a}return a}},"./src/utils/time-ranges.ts":function(ve,X,O){"use strict";O.r(X);var G={toString:function(S){for(var z="",F=S.length,U=0;U<F;U++)z+="["+S.start(U).toFixed(3)+","+S.end(U).toFixed(3)+"]";return z}};X.default=G},"./src/utils/timescale-conversion.ts":function(ve,X,O){"use strict";O.r(X),O.d(X,"toTimescaleFromBase",function(){return D}),O.d(X,"toTimescaleFromScale",function(){return S}),O.d(X,"toMsFromMpegTsClock",function(){return z}),O.d(X,"toMpegTsClockFromTimescale",function(){return F});var G=9e4;function D(U,I,v,b){v===void 0&&(v=1),b===void 0&&(b=!1);var u=U*I*v;return b?Math.round(u):u}function S(U,I,v,b){return v===void 0&&(v=1),b===void 0&&(b=!1),D(U,I,1/v,b)}function z(U,I){return I===void 0&&(I=!1),D(U,1e3,1/G,I)}function F(U,I){return I===void 0&&(I=1),D(U,G,1/I)}},"./src/utils/typed-array.ts":function(ve,X,O){"use strict";O.r(X),O.d(X,"sliceUint8",function(){return G});function G(D,S,z){return Uint8Array.prototype.slice?D.slice(S,z):new Uint8Array(Array.prototype.slice.call(D,S,z))}},"./src/utils/vttcue.ts":function(ve,X,O){"use strict";O.r(X),X.default=function(){if(typeof self!="undefined"&&self.VTTCue)return self.VTTCue;var G=["","lr","rl"],D=["start","middle","end","left","right"];function S(v,b){if(typeof b!="string")return!1;if(!Array.isArray(v))return!1;var u=b.toLowerCase();return~v.indexOf(u)?u:!1}function z(v){return S(G,v)}function F(v){return S(D,v)}function U(v){for(var b=arguments.length,u=new Array(b>1?b-1:0),a=1;a<b;a++)u[a-1]=arguments[a];for(var n=1;n<arguments.length;n++){var s=arguments[n];for(var i in s)v[i]=s[i]}return v}function I(v,b,u){var a=this,n={enumerable:!0};a.hasBeenReset=!1;var s="",i=!1,t=v,r=b,A=u,B=null,w="",_=!0,x="auto",m="start",c=50,e="middle",o=50,l="middle";Object.defineProperty(a,"id",U({},n,{get:function(){return s},set:function(p){s=""+p}})),Object.defineProperty(a,"pauseOnExit",U({},n,{get:function(){return i},set:function(p){i=!!p}})),Object.defineProperty(a,"startTime",U({},n,{get:function(){return t},set:function(p){if(typeof p!="number")throw new TypeError("Start time must be set to a number.");t=p,this.hasBeenReset=!0}})),Object.defineProperty(a,"endTime",U({},n,{get:function(){return r},set:function(p){if(typeof p!="number")throw new TypeError("End time must be set to a number.");r=p,this.hasBeenReset=!0}})),Object.defineProperty(a,"text",U({},n,{get:function(){return A},set:function(p){A=""+p,this.hasBeenReset=!0}})),Object.defineProperty(a,"region",U({},n,{get:function(){return B},set:function(p){B=p,this.hasBeenReset=!0}})),Object.defineProperty(a,"vertical",U({},n,{get:function(){return w},set:function(p){var f=z(p);if(f===!1)throw new SyntaxError("An invalid or illegal string was specified.");w=f,this.hasBeenReset=!0}})),Object.defineProperty(a,"snapToLines",U({},n,{get:function(){return _},set:function(p){_=!!p,this.hasBeenReset=!0}})),Object.defineProperty(a,"line",U({},n,{get:function(){return x},set:function(p){if(typeof p!="number"&&p!=="auto")throw new SyntaxError("An invalid number or illegal string was specified.");x=p,this.hasBeenReset=!0}})),Object.defineProperty(a,"lineAlign",U({},n,{get:function(){return m},set:function(p){var f=F(p);if(!f)throw new SyntaxError("An invalid or illegal string was specified.");m=f,this.hasBeenReset=!0}})),Object.defineProperty(a,"position",U({},n,{get:function(){return c},set:function(p){if(p<0||p>100)throw new Error("Position must be between 0 and 100.");c=p,this.hasBeenReset=!0}})),Object.defineProperty(a,"positionAlign",U({},n,{get:function(){return e},set:function(p){var f=F(p);if(!f)throw new SyntaxError("An invalid or illegal string was specified.");e=f,this.hasBeenReset=!0}})),Object.defineProperty(a,"size",U({},n,{get:function(){return o},set:function(p){if(p<0||p>100)throw new Error("Size must be between 0 and 100.");o=p,this.hasBeenReset=!0}})),Object.defineProperty(a,"align",U({},n,{get:function(){return l},set:function(p){var f=F(p);if(!f)throw new SyntaxError("An invalid or illegal string was specified.");l=f,this.hasBeenReset=!0}})),a.displayState=void 0}return I.prototype.getCueAsHTML=function(){var v=self.WebVTT;return v.convertCueToDOMTree(self,this.text)},I}()},"./src/utils/vttparser.ts":function(ve,X,O){"use strict";O.r(X),O.d(X,"parseTimeStamp",function(){return S}),O.d(X,"fixLineBreaks",function(){return b}),O.d(X,"VTTParser",function(){return u});var G=O("./src/utils/vttcue.ts"),D=function(){function a(){}var n=a.prototype;return n.decode=function(i,t){if(!i)return"";if(typeof i!="string")throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(i))},a}();function S(a){function n(i,t,r,A){return(i|0)*3600+(t|0)*60+(r|0)+parseFloat(A||0)}var s=a.match(/^(?:(\d+):)?(\d{2}):(\d{2})(\.\d+)?/);return s?parseFloat(s[2])>59?n(s[2],s[3],0,s[4]):n(s[1],s[2],s[3],s[4]):null}var z=function(){function a(){this.values=Object.create(null)}var n=a.prototype;return n.set=function(i,t){!this.get(i)&&t!==""&&(this.values[i]=t)},n.get=function(i,t,r){return r?this.has(i)?this.values[i]:t[r]:this.has(i)?this.values[i]:t},n.has=function(i){return i in this.values},n.alt=function(i,t,r){for(var A=0;A<r.length;++A)if(t===r[A]){this.set(i,t);break}},n.integer=function(i,t){/^-?\d+$/.test(t)&&this.set(i,parseInt(t,10))},n.percent=function(i,t){if(/^([\d]{1,3})(\.[\d]*)?%$/.test(t)){var r=parseFloat(t);if(r>=0&&r<=100)return this.set(i,r),!0}return!1},a}();function F(a,n,s,i){var t=i?a.split(i):[a];for(var r in t){if(typeof t[r]!="string")continue;var A=t[r].split(s);if(A.length!==2)continue;var B=A[0],w=A[1];n(B,w)}}var U=new G.default(0,0,""),I=U.align==="middle"?"middle":"center";function v(a,n,s){var i=a;function t(){var B=S(a);if(B===null)throw new Error("Malformed timestamp: "+i);return a=a.replace(/^[^\sa-zA-Z-]+/,""),B}function r(B,w){var _=new z;F(B,function(c,e){var o;switch(c){case"region":for(var l=s.length-1;l>=0;l--)if(s[l].id===e){_.set(c,s[l].region);break}break;case"vertical":_.alt(c,e,["rl","lr"]);break;case"line":o=e.split(","),_.integer(c,o[0]),_.percent(c,o[0])&&_.set("snapToLines",!1),_.alt(c,o[0],["auto"]),o.length===2&&_.alt("lineAlign",o[1],["start",I,"end"]);break;case"position":o=e.split(","),_.percent(c,o[0]),o.length===2&&_.alt("positionAlign",o[1],["start",I,"end","line-left","line-right","auto"]);break;case"size":_.percent(c,e);break;case"align":_.alt(c,e,["start",I,"end","left","right"]);break}},/:/,/\s/),w.region=_.get("region",null),w.vertical=_.get("vertical","");var x=_.get("line","auto");x==="auto"&&U.line===-1&&(x=-1),w.line=x,w.lineAlign=_.get("lineAlign","start"),w.snapToLines=_.get("snapToLines",!0),w.size=_.get("size",100),w.align=_.get("align",I);var m=_.get("position","auto");m==="auto"&&U.position===50&&(m=w.align==="start"||w.align==="left"?0:w.align==="end"||w.align==="right"?100:50),w.position=m}function A(){a=a.replace(/^\s+/,"")}if(A(),n.startTime=t(),A(),a.substr(0,3)!=="-->")throw new Error("Malformed time stamp (time stamps must be separated by '-->'): "+i);a=a.substr(3),A(),n.endTime=t(),A(),r(a,n)}function b(a){return a.replace(/<br(?: \/)?>/gi,`
`)}var u=function(){function a(){this.state="INITIAL",this.buffer="",this.decoder=new D,this.regionList=[],this.cue=null,this.oncue=void 0,this.onparsingerror=void 0,this.onflush=void 0}var n=a.prototype;return n.parse=function(i){var t=this;i&&(t.buffer+=t.decoder.decode(i,{stream:!0}));function r(){var m=t.buffer,c=0;for(m=b(m);c<m.length&&m[c]!=="\r"&&m[c]!==`
`;)++c;var e=m.substr(0,c);return m[c]==="\r"&&++c,m[c]===`
`&&++c,t.buffer=m.substr(c),e}function A(m){F(m,function(c,e){},/:/)}try{var B="";if(t.state==="INITIAL"){if(!/\r\n|\n/.test(t.buffer))return this;B=r();var w=B.match(/^()?WEBVTT([ \t].*)?$/);if(!w||!w[0])throw new Error("Malformed WebVTT signature.");t.state="HEADER"}for(var _=!1;t.buffer;){if(!/\r\n|\n/.test(t.buffer))return this;_?_=!1:B=r();switch(t.state){case"HEADER":/:/.test(B)?A(B):B||(t.state="ID");continue;case"NOTE":B||(t.state="ID");continue;case"ID":if(/^NOTE($|[ \t])/.test(B)){t.state="NOTE";break}if(!B)continue;if(t.cue=new G.default(0,0,""),t.state="CUE",B.indexOf("-->")===-1){t.cue.id=B;continue}case"CUE":if(!t.cue){t.state="BADCUE";continue}try{v(B,t.cue,t.regionList)}catch(m){t.cue=null,t.state="BADCUE";continue}t.state="CUETEXT";continue;case"CUETEXT":{var x=B.indexOf("-->")!==-1;if(!B||x&&(_=!0)){t.oncue&&t.cue&&t.oncue(t.cue),t.cue=null,t.state="ID";continue}if(t.cue===null)continue;t.cue.text&&(t.cue.text+=`
`),t.cue.text+=B}continue;case"BADCUE":B||(t.state="ID")}}}catch(m){t.state==="CUETEXT"&&t.cue&&t.oncue&&t.oncue(t.cue),t.cue=null,t.state=t.state==="INITIAL"?"BADWEBVTT":"BADCUE"}return this},n.flush=function(){var i=this;try{if((i.cue||i.state==="HEADER")&&(i.buffer+=`
`,i.parse()),i.state==="INITIAL"||i.state==="BADWEBVTT")throw new Error("Malformed WebVTT signature.")}catch(t){i.onparsingerror&&i.onparsingerror(t)}return i.onflush&&i.onflush(),this},a}()},"./src/utils/webvtt-parser.ts":function(ve,X,O){"use strict";O.r(X),O.d(X,"generateCueId",function(){return u}),O.d(X,"parseWebVTT",function(){return n});var G=O("./src/polyfills/number.ts"),D=O("./src/utils/vttparser.ts"),S=O("./src/demux/id3.ts"),z=O("./src/utils/timescale-conversion.ts"),F=O("./src/remux/mp4-remuxer.ts"),U=/\r\n|\n\r|\n|\r/g,I=function(i,t,r){return r===void 0&&(r=0),i.substr(r,t.length)===t},v=function(i){var t=parseInt(i.substr(-3)),r=parseInt(i.substr(-6,2)),A=parseInt(i.substr(-9,2)),B=i.length>9?parseInt(i.substr(0,i.indexOf(":"))):0;if(!Object(G.isFiniteNumber)(t)||!Object(G.isFiniteNumber)(r)||!Object(G.isFiniteNumber)(A)||!Object(G.isFiniteNumber)(B))throw Error("Malformed X-TIMESTAMP-MAP: Local:"+i);return t+=1e3*r,t+=60*1e3*A,t+=60*60*1e3*B,t},b=function(i){for(var t=5381,r=i.length;r;)t=t*33^i.charCodeAt(--r);return(t>>>0).toString()};function u(s,i,t){return b(s.toString())+b(i.toString())+b(t)}var a=function(i,t,r){var A=i[t],B=i[A.prevCC];if(!B||!B.new&&A.new){i.ccOffset=i.presentationOffset=A.start,A.new=!1;return}for(;(w=B)!==null&&w!==void 0&&w.new;){var w;i.ccOffset+=A.start-B.start,A.new=!1,A=B,B=i[A.prevCC]}i.presentationOffset=r};function n(s,i,t,r,A,B,w,_){var x=new D.VTTParser,m=Object(S.utf8ArrayToStr)(new Uint8Array(s)).trim().replace(U,`
`).split(`
`),c=[],e=Object(z.toMpegTsClockFromTimescale)(i,t),o="00:00.000",l=0,y=0,p,f=!0,R=!1;x.oncue=function(L){var H=r[A],j=r.ccOffset,J=(l-e)/9e4;if(H!=null&&H.new&&(y!==void 0?j=r.ccOffset=H.start:a(r,A,J)),J&&(j=J-r.presentationOffset),R){var M=L.endTime-L.startTime,Y=Object(F.normalizePts)((L.startTime+j-y)*9e4,B*9e4)/9e4;L.startTime=Y,L.endTime=Y+M}var te=L.text.trim();L.text=decodeURIComponent(encodeURIComponent(te)),L.id||(L.id=u(L.startTime,L.endTime,te)),L.endTime>0&&c.push(L)},x.onparsingerror=function(L){p=L},x.onflush=function(){if(p){_(p);return}w(c)},m.forEach(function(L){if(f)if(I(L,"X-TIMESTAMP-MAP=")){f=!1,R=!0,L.substr(16).split(",").forEach(function(H){I(H,"LOCAL:")?o=H.substr(6):I(H,"MPEGTS:")&&(l=parseInt(H.substr(7)))});try{y=v(o)/1e3}catch(H){R=!1,p=H}return}else L===""&&(f=!1);x.parse(L+`
`)}),x.flush()}},"./src/utils/xhr-loader.ts":function(ve,X,O){"use strict";O.r(X);var G=O("./src/utils/logger.ts"),D=O("./src/loader/load-stats.ts"),S=/^age:\s*[\d.]+\s*$/m,z=function(){function F(I){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=I?I.xhrSetup:null,this.stats=new D.LoadStats,this.retryDelay=0}var U=F.prototype;return U.destroy=function(){this.callbacks=null,this.abortInternal(),this.loader=null,this.config=null},U.abortInternal=function(){var v=this.loader;self.clearTimeout(this.requestTimeout),self.clearTimeout(this.retryTimeout),v&&(v.onreadystatechange=null,v.onprogress=null,v.readyState!==4&&(this.stats.aborted=!0,v.abort()))},U.abort=function(){var v;this.abortInternal(),(v=this.callbacks)!==null&&v!==void 0&&v.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.loader)},U.load=function(v,b,u){if(this.stats.loading.start)throw new Error("Loader can only be used once.");this.stats.loading.start=self.performance.now(),this.context=v,this.config=b,this.callbacks=u,this.retryDelay=b.retryDelay,this.loadInternal()},U.loadInternal=function(){var v=this.config,b=this.context;if(!v)return;var u=this.loader=new self.XMLHttpRequest,a=this.stats;a.loading.first=0,a.loaded=0;var n=this.xhrSetup;try{if(n)try{n(u,b.url)}catch(t){u.open("GET",b.url,!0),n(u,b.url)}u.readyState||u.open("GET",b.url,!0);var s=this.context.headers;if(s)for(var i in s)u.setRequestHeader(i,s[i])}catch(t){this.callbacks.onError({code:u.status,text:t.message},b,u);return}b.rangeEnd&&u.setRequestHeader("Range","bytes="+b.rangeStart+"-"+(b.rangeEnd-1)),u.onreadystatechange=this.readystatechange.bind(this),u.onprogress=this.loadprogress.bind(this),u.responseType=b.responseType,self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),v.timeout),u.send()},U.readystatechange=function(){var v=this.context,b=this.loader,u=this.stats;if(!v||!b)return;var a=b.readyState,n=this.config;if(u.aborted)return;if(a>=2)if(self.clearTimeout(this.requestTimeout),u.loading.first===0&&(u.loading.first=Math.max(self.performance.now(),u.loading.start)),a===4){b.onreadystatechange=null,b.onprogress=null;var s=b.status;if(s>=200&&s<300){u.loading.end=Math.max(self.performance.now(),u.loading.first);var i,t;if(v.responseType==="arraybuffer"?(i=b.response,t=i.byteLength):(i=b.responseText,t=i.length),u.loaded=u.total=t,!this.callbacks)return;var r=this.callbacks.onProgress;if(r&&r(u,v,i,b),!this.callbacks)return;var A={url:b.responseURL,data:i};this.callbacks.onSuccess(A,u,v,b)}else u.retry>=n.maxRetry||s>=400&&s<499?(G.logger.error(s+" while loading "+v.url),this.callbacks.onError({code:s,text:b.statusText},v,b)):(G.logger.warn(s+" while loading "+v.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,n.maxRetryDelay),u.retry++)}else self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),n.timeout)},U.loadtimeout=function(){G.logger.warn("timeout while loading "+this.context.url);var v=this.callbacks;v&&(this.abortInternal(),v.onTimeout(this.stats,this.context,this.loader))},U.loadprogress=function(v){var b=this.stats;b.loaded=v.loaded,v.lengthComputable&&(b.total=v.total)},U.getCacheAge=function(){var v=null;if(this.loader&&S.test(this.loader.getAllResponseHeaders())){var b=this.loader.getResponseHeader("age");v=b?parseFloat(b):null}return v},F}();X.default=z}}).default})},vHTk:function(mt,Ze,Z){mt.exports={wrp:"wrp___z2l1F",bgBlack:"bgBlack___3ezfX",monaco:"monaco___1ypjT",darkBlue:"darkBlue___2ViJc",close:"close___3q-z4",embed:"embed___3dQqc"}},wCXF:function(mt,Ze,Z){"use strict";Z.d(Ze,"a",function(){return Ve});var ve=Z("rePB"),X=Z("VTBJ"),O=Z("KQm4"),G=Z("U8pU"),D=Z("ODXe"),S=Z("q1tI"),z=Z("TSYQ"),F=Z.n(z),U=Z("Gytx"),I=Z.n(U),v=Z("Kwbf"),b=Z("t23M"),u=Z("qx4F"),a=Z("6eGT"),n=Z("IBYe"),s=Z("Ff2n"),i=Z("c+Xe"),t=Z("fyJ8"),r=Z("biw7");function A(Ce,De,Qe,We,Re){var Me=Qe[Ce]||{},Ee=Qe[De]||{},Ae,he;Me.fixed==="left"?Ae=We.left[Ce]:Ee.fixed==="right"&&(he=We.right[De]);var q=!1,ee=!1,oe=!1,ce=!1,Se=Qe[De+1],Pe=Qe[Ce-1];if(Re==="rtl"){if(Ae!==void 0){var Je=Pe&&Pe.fixed==="left";ce=!Je}else if(he!==void 0){var lt=Se&&Se.fixed==="right";oe=!lt}}else if(Ae!==void 0){var ht=Se&&Se.fixed==="left";q=!ht}else if(he!==void 0){var At=Pe&&Pe.fixed==="right";ee=!At}return{fixLeft:Ae,fixRight:he,lastFixLeft:q,firstFixRight:ee,lastFixRight:oe,firstFixLeft:ce,isSticky:We.isSticky}}var B=Z("sR1s");function w(Ce){var De=Ce.cells,Qe=Ce.stickyOffsets,We=Ce.flattenColumns,Re=Ce.rowComponent,Me=Ce.cellComponent,Ee=Ce.onHeaderRow,Ae=Ce.index,he=S.useContext(r.a),q=he.prefixCls,ee=he.direction,oe;Ee&&(oe=Ee(De.map(function(Se){return Se.column}),Ae));var ce=Object(B.a)(De.map(function(Se){return Se.column}));return S.createElement(Re,Object.assign({},oe),De.map(function(Se,Pe){var Je=Se.column,lt=A(Se.colStart,Se.colEnd,We,Qe,ee),ht;return Je&&Je.onHeaderCell&&(ht=Se.column.onHeaderCell(Je)),S.createElement(t.a,Object.assign({},Se,{ellipsis:Je.ellipsis,align:Je.align,component:Me,prefixCls:q,key:ce[Pe]},lt,{additionalProps:ht,rowType:"header"}))}))}w.displayName="HeaderRow";var _=w;function x(Ce){var De=[];function Qe(Ee,Ae){var he=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;De[he]=De[he]||[];var q=Ae,ee=Ee.filter(Boolean).map(function(oe){var ce={key:oe.key,className:oe.className||"",children:oe.title,column:oe,colStart:q},Se=1,Pe=oe.children;return Pe&&Pe.length>0&&(Se=Qe(Pe,q,he+1).reduce(function(Je,lt){return Je+lt},0),ce.hasSubColumns=!0),"colSpan"in oe&&(Se=oe.colSpan),"rowSpan"in oe&&(ce.rowSpan=oe.rowSpan),ce.colSpan=Se,ce.colEnd=ce.colStart+Se-1,De[he].push(ce),q+=Se,Se});return ee}Qe(Ce,0);for(var We=De.length,Re=function(Ae){De[Ae].forEach(function(he){!("rowSpan"in he)&&!he.hasSubColumns&&(he.rowSpan=We-Ae)})},Me=0;Me<We;Me+=1)Re(Me);return De}function m(Ce){var De=Ce.stickyOffsets,Qe=Ce.columns,We=Ce.flattenColumns,Re=Ce.onHeaderRow,Me=S.useContext(r.a),Ee=Me.prefixCls,Ae=Me.getComponent,he=S.useMemo(function(){return x(Qe)},[Qe]),q=Ae(["header","wrapper"],"thead"),ee=Ae(["header","row"],"tr"),oe=Ae(["header","cell"],"th");return S.createElement(q,{className:"".concat(Ee,"-thead")},he.map(function(ce,Se){var Pe=S.createElement(_,{key:Se,flattenColumns:We,cells:ce,stickyOffsets:De,rowComponent:ee,cellComponent:oe,onHeaderRow:Re,index:Se});return Pe}))}var c=m,e=Z("hW8S");function o(Ce){for(var De=Ce.colWidths,Qe=Ce.columns,We=Ce.columCount,Re=[],Me=We||Qe.length,Ee=!1,Ae=Me-1;Ae>=0;Ae-=1){var he=De[Ae],q=Qe&&Qe[Ae],ee=q&&q[e.a];(he||ee||Ee)&&(Re.unshift(S.createElement("col",Object.assign({key:Ae,style:{width:he,minWidth:he}},ee))),Ee=!0)}return S.createElement("colgroup",null,Re)}var l=o;function y(Ce,De){return Object(S.useMemo)(function(){for(var Qe=[],We=0;We<De;We+=1){var Re=Ce[We];if(Re!==void 0)Qe[We]=Re;else return null}return Qe},[Ce.join("_"),De])}var p=S.forwardRef(function(Ce,De){var Qe=Ce.noData,We=Ce.columns,Re=Ce.flattenColumns,Me=Ce.colWidths,Ee=Ce.columCount,Ae=Ce.stickyOffsets,he=Ce.direction,q=Ce.fixHeader,ee=Ce.offsetHeader,oe=Ce.stickyClassName,ce=Ce.onScroll,Se=Object(s.a)(Ce,["noData","columns","flattenColumns","colWidths","columCount","stickyOffsets","direction","fixHeader","offsetHeader","stickyClassName","onScroll"]),Pe=S.useContext(r.a),Je=Pe.prefixCls,lt=Pe.scrollbarSize,ht=Pe.isSticky,At=ht&&!q?0:lt,xt=S.useRef(null),St=S.useCallback(function(rr){Object(i.b)(De,rr),Object(i.b)(xt,rr)},[]);S.useEffect(function(){var rr;function kt(et){var Tt=et.currentTarget,Ft=et.deltaX;Ft&&(ce({currentTarget:Tt,scrollLeft:Tt.scrollLeft+Ft}),et.preventDefault())}return(rr=xt.current)===null||rr===void 0||rr.addEventListener("wheel",kt),function(){var et;(et=xt.current)===null||et===void 0||et.removeEventListener("wheel",kt)}},[]);var it=Re[Re.length-1],jt={fixed:it?it.fixed:null,onHeaderCell:function(){return{className:"".concat(Je,"-cell-scrollbar")}}},Wt=Object(S.useMemo)(function(){return At?[].concat(Object(O.a)(We),[jt]):We},[At,We]),It=Object(S.useMemo)(function(){return At?[].concat(Object(O.a)(Re),[jt]):Re},[At,Re]),Xt=Object(S.useMemo)(function(){var rr=Ae.right,kt=Ae.left;return Object(X.a)(Object(X.a)({},Ae),{},{left:he==="rtl"?[].concat(Object(O.a)(kt.map(function(et){return et+At})),[0]):kt,right:he==="rtl"?rr:[].concat(Object(O.a)(rr.map(function(et){return et+At})),[0]),isSticky:ht})},[At,Ae,ht]),Dt=y(Me,Ee);return S.createElement("div",{style:Object(X.a)({overflow:"hidden"},ht?{top:ee}:{}),ref:St,className:F()("".concat(Je,"-header"),Object(ve.a)({},oe,!!oe))},S.createElement("table",{style:{tableLayout:"fixed",visibility:Qe||Dt?null:"hidden"}},S.createElement(l,{colWidths:Dt?[].concat(Object(O.a)(Dt),[At]):[],columCount:Ee+1,columns:It}),S.createElement(c,Object.assign({},Se,{stickyOffsets:Xt,columns:Wt,flattenColumns:It}))))});p.displayName="FixedHeader";var f=p,R=S.createContext(null),L=R;function H(Ce){var De=Ce.prefixCls,Qe=Ce.children,We=Ce.component,Re=Ce.cellComponent,Me=Ce.fixHeader,Ee=Ce.fixColumn,Ae=Ce.horizonScroll,he=Ce.className,q=Ce.expanded,ee=Ce.componentWidth,oe=Ce.colSpan,ce=S.useContext(r.a),Se=ce.scrollbarSize;return S.useMemo(function(){var Pe=Qe;return Ee&&(Pe=S.createElement("div",{style:{width:ee-(Me?Se:0),position:"sticky",left:0,overflow:"hidden"},className:"".concat(De,"-expanded-row-fixed")},Pe)),S.createElement(We,{className:he,style:{display:q?null:"none"}},S.createElement(t.a,{component:Re,prefixCls:De,colSpan:oe},Pe))},[Qe,We,Me,Ae,he,q,ee,oe,Se])}var j=H;function J(Ce){var De=Ce.className,Qe=Ce.style,We=Ce.record,Re=Ce.index,Me=Ce.rowKey,Ee=Ce.getRowKey,Ae=Ce.rowExpandable,he=Ce.expandedKeys,q=Ce.onRow,ee=Ce.indent,oe=ee===void 0?0:ee,ce=Ce.rowComponent,Se=Ce.cellComponent,Pe=Ce.childrenColumnName,Je=S.useContext(r.a),lt=Je.prefixCls,ht=Je.fixedInfoList,At=S.useContext(L),xt=At.fixHeader,St=At.fixColumn,it=At.horizonScroll,jt=At.componentWidth,Wt=At.flattenColumns,It=At.expandableType,Xt=At.expandRowByClick,Dt=At.onTriggerExpand,rr=At.rowClassName,kt=At.expandedRowClassName,et=At.indentSize,Tt=At.expandIcon,Ft=At.expandedRowRender,gt=At.expandIconColumnIndex,Gt=S.useState(!1),zr=Object(D.a)(Gt,2),Zr=zr[0],Lr=zr[1],Pr=he&&he.has(Ce.recordKey);S.useEffect(function(){Pr&&Lr(!0)},[Pr]);var kr=It==="row"&&(!Ae||Ae(We)),vr=It==="nest",Dr=Pe&&We&&We[Pe],qr=kr||vr,Sr;q&&(Sr=q(We,Re));var en=function(d){if(Xt&&qr&&Dt(We,d),Sr&&Sr.onClick){for(var g,P=arguments.length,V=new Array(P>1?P-1:0),k=1;k<P;k++)V[k-1]=arguments[k];(g=Sr).onClick.apply(g,[d].concat(V))}},Hr;typeof rr=="string"?Hr=rr:typeof rr=="function"&&(Hr=rr(We,Re,oe));var ne=Object(B.a)(Wt),ie=S.createElement(ce,Object.assign({},Sr,{"data-row-key":Me,className:F()(De,"".concat(lt,"-row"),"".concat(lt,"-row-level-").concat(oe),Hr,Sr&&Sr.className),style:Object(X.a)(Object(X.a)({},Qe),Sr?Sr.style:null),onClick:en}),Wt.map(function(N,d){var g=N.render,P=N.dataIndex,V=N.className,k=ne[d],pe=ht[d],ke;d===(gt||0)&&vr&&(ke=S.createElement(S.Fragment,null,S.createElement("span",{style:{paddingLeft:"".concat(et*oe,"px")},className:"".concat(lt,"-row-indent indent-level-").concat(oe)}),Tt({prefixCls:lt,expanded:Pr,expandable:Dr,record:We,onExpand:Dt})));var Te;return N.onCell&&(Te=N.onCell(We,Re)),S.createElement(t.a,Object.assign({className:V,ellipsis:N.ellipsis,align:N.align,component:Se,prefixCls:lt,key:k,record:We,index:Re,dataIndex:P,render:g,shouldCellUpdate:N.shouldCellUpdate},pe,{appendNode:ke,additionalProps:Te}))})),le;if(kr&&(Zr||Pr)){var Be=Ft(We,Re,oe+1,Pr),Ge=kt&&kt(We,Re,oe);le=S.createElement(j,{expanded:Pr,className:F()("".concat(lt,"-expanded-row"),"".concat(lt,"-expanded-row-level-").concat(oe+1),Ge),prefixCls:lt,fixHeader:xt,fixColumn:St,horizonScroll:it,component:ce,componentWidth:jt,cellComponent:Se,colSpan:Wt.length},Be)}var tt;return Dr&&Pr&&(tt=(We[Pe]||[]).map(function(N,d){var g=Ee(N,d);return S.createElement(J,Object.assign({},Ce,{key:g,rowKey:g,record:N,recordKey:g,index:d,indent:oe+1}))})),S.createElement(S.Fragment,null,ie,le,tt)}J.displayName="BodyRow";var M=J,Y=S.createContext(null),te=Y;function de(Ce){var De=Ce.columnKey,Qe=Ce.onColumnResize,We=S.useRef();return S.useEffect(function(){We.current&&Qe(De,We.current.offsetWidth)},[]),S.createElement(b.a,{onResize:function(Me){var Ee=Me.offsetWidth;Qe(De,Ee)}},S.createElement("td",{ref:We,style:{padding:0,border:0,height:0}},S.createElement("div",{style:{height:0,overflow:"hidden"}},"\xA0")))}function fe(Ce){var De=Ce.data,Qe=Ce.getRowKey,We=Ce.measureColumnWidth,Re=Ce.expandedKeys,Me=Ce.onRow,Ee=Ce.rowExpandable,Ae=Ce.emptyNode,he=Ce.childrenColumnName,q=S.useContext(te),ee=q.onColumnResize,oe=S.useContext(r.a),ce=oe.prefixCls,Se=oe.getComponent,Pe=S.useContext(L),Je=Pe.fixHeader,lt=Pe.horizonScroll,ht=Pe.flattenColumns,At=Pe.componentWidth;return S.useMemo(function(){var xt=Se(["body","wrapper"],"tbody"),St=Se(["body","row"],"tr"),it=Se(["body","cell"],"td"),jt;De.length?jt=De.map(function(It,Xt){var Dt=Qe(It,Xt);return S.createElement(M,{key:Dt,rowKey:Dt,record:It,recordKey:Dt,index:Xt,rowComponent:St,cellComponent:it,expandedKeys:Re,onRow:Me,getRowKey:Qe,rowExpandable:Ee,childrenColumnName:he})}):jt=S.createElement(j,{expanded:!0,className:"".concat(ce,"-placeholder"),prefixCls:ce,fixHeader:Je,fixColumn:lt,horizonScroll:lt,component:St,componentWidth:At,cellComponent:it,colSpan:ht.length},Ae);var Wt=Object(B.a)(ht);return S.createElement(xt,{className:"".concat(ce,"-tbody")},We&&S.createElement("tr",{"aria-hidden":"true",className:"".concat(ce,"-measure-row"),style:{height:0}},Wt.map(function(It){return S.createElement(de,{key:It,columnKey:It,onColumnResize:ee})})),jt)},[De,ce,Me,We,Re,Qe,Se,At,Ae,ht])}var Le=S.memo(fe);Le.displayName="Body";var xe=Le,Ie=Z("wRmb"),Fe=Z("xEkU"),Ue=Z.n(Fe);function be(Ce){var De=Object(S.useRef)(Ce),Qe=Object(S.useState)({}),We=Object(D.a)(Qe,2),Re=We[1],Me=Object(S.useRef)(null),Ee=Object(S.useRef)([]);function Ae(he){Me.current===null&&(Ee.current=[],Me.current=Ue()(function(){Ee.current.forEach(function(q){De.current=q(De.current)}),Me.current=null,Re({})})),Ee.current.push(he)}return Object(S.useEffect)(function(){return function(){Ue.a.cancel(Me.current)}},[]),[De.current,Ae]}function ue(Ce){var De=Object(S.useRef)(Ce),Qe=Object(S.useRef)(null);function We(){window.clearTimeout(Qe.current)}function Re(Ee){De.current=Ee,We(),Qe.current=window.setTimeout(function(){De.current=null,Qe.current=null},100)}function Me(){return De.current}return Object(S.useEffect)(function(){return We},[]),[Re,Me]}function je(Ce,De,Qe){var We=Object(S.useMemo)(function(){for(var Re=[],Me=[],Ee=0,Ae=0,he=0;he<De;he+=1)if(Qe==="rtl"){Me[he]=Ae,Ae+=Ce[he]||0;var q=De-he-1;Re[q]=Ee,Ee+=Ce[q]||0}else{Re[he]=Ee,Ee+=Ce[he]||0;var ee=De-he-1;Me[ee]=Ae,Ae+=Ce[ee]||0}return{left:Re,right:Me}},[Ce,De,Qe]);return We}var st=je;function nt(Ce){var De=Ce.className,Qe=Ce.children;return S.createElement("div",{className:De},Qe)}var rt=nt,He=Z("n6Qo");function re(Ce){var De,Qe=Ce.prefixCls,We=Ce.record,Re=Ce.onExpand,Me=Ce.expanded,Ee=Ce.expandable,Ae="".concat(Qe,"-row-expand-icon");if(!Ee)return S.createElement("span",{className:F()(Ae,"".concat(Qe,"-row-spaced"))});var he=function(ee){Re(We,ee),ee.stopPropagation()};return S.createElement("span",{className:F()(Ae,(De={},Object(ve.a)(De,"".concat(Qe,"-row-expanded"),Me),Object(ve.a)(De,"".concat(Qe,"-row-collapsed"),!Me),De)),onClick:he})}function K(Ce,De,Qe){var We=[];function Re(Me){(Me||[]).forEach(function(Ee,Ae){We.push(De(Ee,Ae)),Re(Ee[Qe])})}return Re(Ce),We}var W=Z("zT1h"),se=Z("y0+3"),ye=function(De,Qe){var We,Re,Me=De.scrollBodyRef,Ee=De.onScroll,Ae=De.offsetScroll,he=S.useContext(r.a),q=he.prefixCls,ee=((We=Me.current)===null||We===void 0?void 0:We.scrollWidth)||0,oe=((Re=Me.current)===null||Re===void 0?void 0:Re.clientWidth)||0,ce=ee&&oe*(oe/ee),Se=S.useRef(),Pe=be({scrollLeft:0,isHiddenScrollBar:!1}),Je=Object(D.a)(Pe,2),lt=Je[0],ht=Je[1],At=S.useRef({delta:0,x:0}),xt=S.useState(!1),St=Object(D.a)(xt,2),it=St[0],jt=St[1],Wt=function(){jt(!1)},It=function(et){et.persist(),At.current.delta=et.pageX-lt.scrollLeft,At.current.x=0,jt(!0),et.preventDefault()},Xt=function(et){var Tt,Ft=et||((Tt=window)===null||Tt===void 0?void 0:Tt.event),gt=Ft.buttons;if(!it||gt===0){it&&jt(!1);return}var Gt=At.current.x+et.pageX-At.current.x-At.current.delta;Gt<=0&&(Gt=0),Gt+ce>=oe&&(Gt=oe-ce),Ee({scrollLeft:Gt/oe*(ee+2)}),At.current.x=et.pageX},Dt=function(){var et=Object(se.b)(Me.current).top,Tt=et+Me.current.offsetHeight,Ft=document.documentElement.scrollTop+window.innerHeight;Tt-Object(u.a)()<=Ft||et>=Ft-Ae?ht(function(gt){return Object(X.a)(Object(X.a)({},gt),{},{isHiddenScrollBar:!0})}):ht(function(gt){return Object(X.a)(Object(X.a)({},gt),{},{isHiddenScrollBar:!1})})},rr=function(et){ht(function(Tt){return Object(X.a)(Object(X.a)({},Tt),{},{scrollLeft:et/ee*oe||0})})};return S.useImperativeHandle(Qe,function(){return{setScrollLeft:rr}}),S.useEffect(function(){var kt=Object(W.a)(document.body,"mouseup",Wt,!1),et=Object(W.a)(document.body,"mousemove",Xt,!1);return Dt(),function(){kt.remove(),et.remove()}},[ce,it]),S.useEffect(function(){var kt=Object(W.a)(window,"scroll",Dt,!1),et=Object(W.a)(window,"resize",Dt,!1);return function(){kt.remove(),et.remove()}},[]),S.useEffect(function(){lt.isHiddenScrollBar||ht(function(kt){var et,Tt;return Object(X.a)(Object(X.a)({},kt),{},{scrollLeft:Me.current.scrollLeft/((et=Me.current)===null||et===void 0?void 0:et.scrollWidth)*((Tt=Me.current)===null||Tt===void 0?void 0:Tt.clientWidth)})})},[lt.isHiddenScrollBar]),ee<=oe||!ce||lt.isHiddenScrollBar?null:S.createElement("div",{style:{height:Object(u.a)(),width:oe,bottom:Ae},className:"".concat(q,"-sticky-scroll")},S.createElement("div",{onMouseDown:It,ref:Se,className:F()("".concat(q,"-sticky-scroll-bar"),Object(ve.a)({},"".concat(q,"-sticky-scroll-bar-active"),it)),style:{width:"".concat(ce,"px"),transform:"translate3d(".concat(lt.scrollLeft,"px, 0, 0)")}}))},we=S.forwardRef(ye);function _e(Ce,De){return S.useMemo(function(){var Qe=!!Ce;return{isSticky:Qe,stickyClassName:Qe?"".concat(De,"-sticky-header"):"",offsetHeader:Object(G.a)(Ce)==="object"&&Ce.offsetHeader||0,offsetScroll:Object(G.a)(Ce)==="object"&&Ce.offsetScroll||0}},[Ce,De])}var $e=[],qe={},Ve="rc-table-internal-hook",Xe=S.memo(function(Ce){var De=Ce.children;return De},function(Ce,De){return I()(Ce.props,De.props)?Ce.pingLeft!==De.pingLeft||Ce.pingRight!==De.pingRight:!1});function at(Ce){var De,Qe=Ce.prefixCls,We=Ce.className,Re=Ce.rowClassName,Me=Ce.style,Ee=Ce.data,Ae=Ce.rowKey,he=Ce.scroll,q=Ce.tableLayout,ee=Ce.direction,oe=Ce.title,ce=Ce.footer,Se=Ce.summary,Pe=Ce.id,Je=Ce.showHeader,lt=Ce.components,ht=Ce.emptyText,At=Ce.onRow,xt=Ce.onHeaderRow,St=Ce.internalHooks,it=Ce.transformColumns,jt=Ce.internalRefs,Wt=Ce.sticky,It=Ee||$e,Xt=!!It.length,Dt=S.useState(0),rr=Object(D.a)(Dt,2),kt=rr[0],et=rr[1];S.useEffect(function(){et(Object(u.a)())});var Tt=S.useMemo(function(){return Object(B.c)(lt,{})},[lt]),Ft=S.useCallback(function(Kt,zt){return Object(B.b)(Tt,Kt)||zt},[Tt]),gt=S.useMemo(function(){return typeof Ae=="function"?Ae:function(Kt){var zt=Kt&&Kt[Ae];return zt}},[Ae]),Gt=Object(e.c)(Ce),zr=Gt.expandIcon,Zr=Gt.expandedRowKeys,Lr=Gt.defaultExpandedRowKeys,Pr=Gt.defaultExpandAllRows,kr=Gt.expandedRowRender,vr=Gt.onExpand,Dr=Gt.onExpandedRowsChange,qr=Gt.expandRowByClick,Sr=Gt.rowExpandable,en=Gt.expandIconColumnIndex,Hr=Gt.expandedRowClassName,ne=Gt.childrenColumnName,ie=Gt.indentSize,le=zr||re,Be=ne||"children",Ge=S.useMemo(function(){return kr?"row":Ce.expandable&&St===Ve&&Ce.expandable.__PARENT_RENDER_ICON__||It.some(function(Kt){return Kt&&Object(G.a)(Kt)==="object"&&Kt[Be]})?"nest":!1},[!!kr,It]),tt=S.useState(function(){return Lr||(Pr?K(It,gt,Be):[])}),N=Object(D.a)(tt,2),d=N[0],g=N[1],P=S.useMemo(function(){return new Set(Zr||d||[])},[Zr,d]),V=S.useCallback(function(Kt){var zt=gt(Kt,It.indexOf(Kt)),Or,$r=P.has(zt);$r?(P.delete(zt),Or=Object(O.a)(P)):Or=[].concat(Object(O.a)(P),[zt]),g(Or),vr&&vr(!$r,Kt),Dr&&Dr(Or)},[gt,P,It,vr,Dr]),k=S.useState(0),pe=Object(D.a)(k,2),ke=pe[0],Te=pe[1],ot=Object(Ie.b)(Object(X.a)(Object(X.a)(Object(X.a)({},Ce),Gt),{},{expandable:!!kr,expandedKeys:P,getRowKey:gt,onTriggerExpand:V,expandIcon:le,expandIconColumnIndex:en,direction:ee}),St===Ve?it:null),Ke=Object(D.a)(ot,2),ft=Ke[0],dt=Ke[1],Et=S.useMemo(function(){return{columns:ft,flattenColumns:dt}},[ft,dt]),Rt=S.useRef(),ir=S.useRef(),Pt=S.useRef(),er=S.useState(!1),Ot=Object(D.a)(er,2),hr=Ot[0],Qt=Ot[1],yr=S.useState(!1),dr=Object(D.a)(yr,2),wr=dr[0],Cr=dr[1],fr=be(new Map),pr=Object(D.a)(fr,2),gr=pr[0],Tr=pr[1],br=Object(B.a)(dt),Ir=br.map(function(Kt){return gr.get(Kt)}),Rr=S.useMemo(function(){return Ir},[Ir.join("_")]),or=st(Rr,dt.length,ee),Yt=he&&Object(B.d)(he.y),Ut=he&&Object(B.d)(he.x),tr=Ut&&dt.some(function(Kt){var zt=Kt.fixed;return zt}),Jt=S.useRef(),Er=_e(Wt,Qe),ar=Er.isSticky,mn=Er.offsetHeader,Mt=Er.offsetScroll,Ht=Er.stickyClassName,Lt,nr,Bt;Yt&&(nr={overflowY:"scroll",maxHeight:he.y}),Ut&&(Lt={overflowX:"auto"},Yt||(nr={overflowY:"hidden"}),Bt={width:he.x===!0?"auto":he.x,minWidth:"100%"});var $t=S.useCallback(function(Kt,zt){Tr(function(Or){var $r=new Map(Or);return $r.set(Kt,zt),$r})},[]),Vt=ue(null),nn=Object(D.a)(Vt,2),an=nn[0],vn=nn[1];function jr(Kt,zt){if(!zt)return;typeof zt=="function"?zt(Kt):zt.scrollLeft!==Kt&&(zt.scrollLeft=Kt)}var Xr=function(zt){var Or=zt.currentTarget,$r=zt.scrollLeft,Fn=typeof $r=="number"?$r:Or.scrollLeft,Cn=Or||qe;if(!vn()||vn()===Cn){var li;an(Cn),jr(Fn,ir.current),jr(Fn,Pt.current),jr(Fn,(li=Jt.current)===null||li===void 0?void 0:li.setScrollLeft)}if(Or){var Vi=Or.scrollWidth,zi=Or.clientWidth;Qt(Fn>0),Cr(Fn<Vi-zi)}},sn=function(){Pt.current&&Xr({currentTarget:Pt.current})},Wr=function(zt){var Or=zt.width;sn(),Te(Rt.current?Rt.current.offsetWidth:Or)};S.useEffect(function(){return sn},[]),S.useEffect(function(){Ut&&sn()},[Ut]),S.useEffect(function(){St===Ve&&jt&&(jt.body.current=Pt.current)});var In=Ft(["table"],"table"),xr=S.useMemo(function(){return q||(tr?he.x==="max-content"?"auto":"fixed":Yt||dt.some(function(Kt){var zt=Kt.ellipsis;return zt})?"fixed":"auto")},[Yt,tr,dt,q]),un,Yr={colWidths:Rr,columCount:dt.length,stickyOffsets:or,onHeaderRow:xt,fixHeader:Yt},_n=S.useMemo(function(){return Xt?null:typeof ht=="function"?ht():ht},[Xt,ht]),bn=S.createElement(xe,{data:It,measureColumnWidth:Yt||Ut||ar,expandedKeys:P,rowExpandable:Sr,getRowKey:gt,onRow:At,emptyNode:_n,childrenColumnName:Be}),Jr=S.createElement(l,{colWidths:dt.map(function(Kt){var zt=Kt.width;return zt}),columns:dt}),tn=Se&&S.createElement(He.b,null,Se(It)),on=Ft(["body"]);if(Yt||ar){var cn;typeof on=="function"?(cn=on(It,{scrollbarSize:kt,ref:Pt,onScroll:Xr}),Yr.colWidths=dt.map(function(Kt,zt){var Or=Kt.width,$r=zt===ft.length-1?Or-kt:Or;return typeof $r=="number"&&!Number.isNaN($r)?$r:(Object(v.a)(!1,"When use `components.body` with render props. Each column should have a fixed value."),0)})):cn=S.createElement("div",{style:Object(X.a)(Object(X.a)({},Lt),nr),onScroll:Xr,ref:Pt,className:F()("".concat(Qe,"-body"))},S.createElement(In,{style:Object(X.a)(Object(X.a)({},Bt),{},{tableLayout:xr})},Jr,bn,tn),ar&&S.createElement(we,{ref:Jt,offsetScroll:Mt,scrollBodyRef:Pt,onScroll:Xr})),un=S.createElement(S.Fragment,null,Je!==!1&&S.createElement(f,Object.assign({noData:!It.length},Yr,Et,{direction:ee,offsetHeader:mn,stickyClassName:Ht,ref:ir,onScroll:Xr})),cn)}else un=S.createElement("div",{style:Object(X.a)(Object(X.a)({},Lt),nr),className:F()("".concat(Qe,"-content")),onScroll:Xr,ref:Pt},S.createElement(In,{style:Object(X.a)(Object(X.a)({},Bt),{},{tableLayout:xr})},Jr,Je!==!1&&S.createElement(c,Object.assign({},Yr,Et)),bn,tn));var yn=Object(e.b)(Ce),Nr=S.createElement("div",Object.assign({className:F()(Qe,We,(De={},Object(ve.a)(De,"".concat(Qe,"-rtl"),ee==="rtl"),Object(ve.a)(De,"".concat(Qe,"-ping-left"),hr),Object(ve.a)(De,"".concat(Qe,"-ping-right"),wr),Object(ve.a)(De,"".concat(Qe,"-layout-fixed"),q==="fixed"),Object(ve.a)(De,"".concat(Qe,"-fixed-header"),Yt),Object(ve.a)(De,"".concat(Qe,"-fixed-column"),tr),Object(ve.a)(De,"".concat(Qe,"-scroll-horizontal"),Ut),Object(ve.a)(De,"".concat(Qe,"-has-fix-left"),dt[0]&&dt[0].fixed),Object(ve.a)(De,"".concat(Qe,"-has-fix-right"),dt[dt.length-1]&&dt[dt.length-1].fixed==="right"),De)),style:Me,id:Pe,ref:Rt},yn),S.createElement(Xe,{pingLeft:hr,pingRight:wr,props:Object(X.a)(Object(X.a)({},Ce),{},{stickyOffsets:or,mergedExpandedKeys:P})},oe&&S.createElement(rt,{className:"".concat(Qe,"-title")},oe(It)),S.createElement("div",{className:"".concat(Qe,"-container")},un),ce&&S.createElement(rt,{className:"".concat(Qe,"-footer")},ce(It))));Ut&&(Nr=S.createElement(b.a,{onResize:Wr},Nr));var An=S.useMemo(function(){return{prefixCls:Qe,getComponent:Ft,scrollbarSize:kt,direction:ee,fixedInfoList:dt.map(function(Kt,zt){return A(zt,zt,dt,or,ee)}),isSticky:ar}},[Qe,Ft,kt,ee,dt,or,ee,ar]),wn=S.useMemo(function(){return Object(X.a)(Object(X.a)({},Et),{},{tableLayout:xr,rowClassName:Re,expandedRowClassName:Hr,componentWidth:ke,fixHeader:Yt,fixColumn:tr,horizonScroll:Ut,expandIcon:le,expandableType:Ge,expandRowByClick:qr,expandedRowRender:kr,onTriggerExpand:V,expandIconColumnIndex:en,indentSize:ie})},[Et,xr,Re,Hr,ke,Yt,tr,Ut,le,Ge,qr,kr,V,en,ie]),Rn=S.useMemo(function(){return{onColumnResize:$t}},[$t]);return S.createElement(r.a.Provider,{value:An},S.createElement(L.Provider,{value:wn},S.createElement(te.Provider,{value:Rn},Nr)))}at.Column=n.a,at.ColumnGroup=a.a,at.Summary=He.a,at.defaultProps={rowKey:"key",prefixCls:"rc-table",emptyText:function(){return"No Data"}};var ct=Ze.b=at},wOnQ:function(mt,Ze,Z){/*!
* html2canvas 1.4.1 <https://html2canvas.hertzen.com>
* Copyright (c) 2022 Niklas von Hertzen <https://hertzen.com>
* Released under MIT License
*/(function(ve,X){mt.exports=X()})(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 ve=function(E,h){return ve=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(T,C){T.__proto__=C}||function(T,C){for(var Q in C)Object.prototype.hasOwnProperty.call(C,Q)&&(T[Q]=C[Q])},ve(E,h)};function X(E,h){if(typeof h!="function"&&h!==null)throw new TypeError("Class extends value "+String(h)+" is not a constructor or null");ve(E,h);function T(){this.constructor=E}E.prototype=h===null?Object.create(h):(T.prototype=h.prototype,new T)}var O=function(){return O=Object.assign||function(h){for(var T,C=1,Q=arguments.length;C<Q;C++){T=arguments[C];for(var $ in T)Object.prototype.hasOwnProperty.call(T,$)&&(h[$]=T[$])}return h},O.apply(this,arguments)};function G(E,h,T,C){function Q($){return $ instanceof T?$:new T(function(ae){ae($)})}return new(T||(T=Promise))(function($,ae){function me(Ne){try{Oe(C.next(Ne))}catch(ze){ae(ze)}}function ge(Ne){try{Oe(C.throw(Ne))}catch(ze){ae(ze)}}function Oe(Ne){Ne.done?$(Ne.value):Q(Ne.value).then(me,ge)}Oe((C=C.apply(E,h||[])).next())})}function D(E,h){var T={label:0,sent:function(){if($[0]&1)throw $[1];return $[1]},trys:[],ops:[]},C,Q,$,ae;return ae={next:me(0),throw:me(1),return:me(2)},typeof Symbol=="function"&&(ae[Symbol.iterator]=function(){return this}),ae;function me(Oe){return function(Ne){return ge([Oe,Ne])}}function ge(Oe){if(C)throw new TypeError("Generator is already executing.");for(;T;)try{if(C=1,Q&&($=Oe[0]&2?Q.return:Oe[0]?Q.throw||(($=Q.return)&&$.call(Q),0):Q.next)&&!($=$.call(Q,Oe[1])).done)return $;(Q=0,$)&&(Oe=[Oe[0]&2,$.value]);switch(Oe[0]){case 0:case 1:$=Oe;break;case 4:return T.label++,{value:Oe[1],done:!1};case 5:T.label++,Q=Oe[1],Oe=[0];continue;case 7:Oe=T.ops.pop(),T.trys.pop();continue;default:if(!($=T.trys,$=$.length>0&&$[$.length-1])&&(Oe[0]===6||Oe[0]===2)){T=0;continue}if(Oe[0]===3&&(!$||Oe[1]>$[0]&&Oe[1]<$[3])){T.label=Oe[1];break}if(Oe[0]===6&&T.label<$[1]){T.label=$[1],$=Oe;break}if($&&T.label<$[2]){T.label=$[2],T.ops.push(Oe);break}$[2]&&T.ops.pop(),T.trys.pop();continue}Oe=h.call(E,T)}catch(Ne){Oe=[6,Ne],Q=0}finally{C=$=0}if(Oe[0]&5)throw Oe[1];return{value:Oe[0]?Oe[1]:void 0,done:!0}}}function S(E,h,T){if(T||arguments.length===2)for(var C=0,Q=h.length,$;C<Q;C++)($||!(C in h))&&($||($=Array.prototype.slice.call(h,0,C)),$[C]=h[C]);return E.concat($||h)}for(var z=function(){function E(h,T,C,Q){this.left=h,this.top=T,this.width=C,this.height=Q}return E.prototype.add=function(h,T,C,Q){return new E(this.left+h,this.top+T,this.width+C,this.height+Q)},E.fromClientRect=function(h,T){return new E(T.left+h.windowBounds.left,T.top+h.windowBounds.top,T.width,T.height)},E.fromDOMRectList=function(h,T){var C=Array.from(T).find(function(Q){return Q.width!==0});return C?new E(C.left+h.windowBounds.left,C.top+h.windowBounds.top,C.width,C.height):E.EMPTY},E.EMPTY=new E(0,0,0,0),E}(),F=function(E,h){return z.fromClientRect(E,h.getBoundingClientRect())},U=function(E){var h=E.body,T=E.documentElement;if(!h||!T)throw new Error("Unable to get document size");var C=Math.max(Math.max(h.scrollWidth,T.scrollWidth),Math.max(h.offsetWidth,T.offsetWidth),Math.max(h.clientWidth,T.clientWidth)),Q=Math.max(Math.max(h.scrollHeight,T.scrollHeight),Math.max(h.offsetHeight,T.offsetHeight),Math.max(h.clientHeight,T.clientHeight));return new z(0,0,C,Q)},I=function(E){for(var h=[],T=0,C=E.length;T<C;){var Q=E.charCodeAt(T++);if(Q>=55296&&Q<=56319&&T<C){var $=E.charCodeAt(T++);($&64512)===56320?h.push(((Q&1023)<<10)+($&1023)+65536):(h.push(Q),T--)}else h.push(Q)}return h},v=function(){for(var E=[],h=0;h<arguments.length;h++)E[h]=arguments[h];if(String.fromCodePoint)return String.fromCodePoint.apply(String,E);var T=E.length;if(!T)return"";for(var C=[],Q=-1,$="";++Q<T;){var ae=E[Q];ae<=65535?C.push(ae):(ae-=65536,C.push((ae>>10)+55296,ae%1024+56320)),(Q+1===T||C.length>16384)&&($+=String.fromCharCode.apply(String,C),C.length=0)}return $},b="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",u=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),a=0;a<b.length;a++)u[b.charCodeAt(a)]=a;for(var n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),i=0;i<n.length;i++)s[n.charCodeAt(i)]=i;for(var t=function(E){var h=E.length*.75,T=E.length,C,Q=0,$,ae,me,ge;E[E.length-1]==="="&&(h--,E[E.length-2]==="="&&h--);var Oe=typeof ArrayBuffer!="undefined"&&typeof Uint8Array!="undefined"&&typeof Uint8Array.prototype.slice!="undefined"?new ArrayBuffer(h):new Array(h),Ne=Array.isArray(Oe)?Oe:new Uint8Array(Oe);for(C=0;C<T;C+=4)$=s[E.charCodeAt(C)],ae=s[E.charCodeAt(C+1)],me=s[E.charCodeAt(C+2)],ge=s[E.charCodeAt(C+3)],Ne[Q++]=$<<2|ae>>4,Ne[Q++]=(ae&15)<<4|me>>2,Ne[Q++]=(me&3)<<6|ge&63;return Oe},r=function(E){for(var h=E.length,T=[],C=0;C<h;C+=2)T.push(E[C+1]<<8|E[C]);return T},A=function(E){for(var h=E.length,T=[],C=0;C<h;C+=4)T.push(E[C+3]<<24|E[C+2]<<16|E[C+1]<<8|E[C]);return T},B=5,w=6+5,_=2,x=w-B,m=65536>>B,c=1<<B,e=c-1,o=1024>>B,l=m+o,y=l,p=2048>>6,f=y+p,R=65536>>w,L=1<<x,H=L-1,j=function(E,h,T){return E.slice?E.slice(h,T):new Uint16Array(Array.prototype.slice.call(E,h,T))},J=function(E,h,T){return E.slice?E.slice(h,T):new Uint32Array(Array.prototype.slice.call(E,h,T))},M=function(E,h){var T=t(E),C=Array.isArray(T)?A(T):new Uint32Array(T),Q=Array.isArray(T)?r(T):new Uint16Array(T),$=24,ae=j(Q,$/2,C[4]/2),me=C[5]===2?j(Q,($+C[4])/2):J(C,Math.ceil(($+C[4])/4));return new Y(C[0],C[1],C[2],C[3],ae,me)},Y=function(){function E(h,T,C,Q,$,ae){this.initialValue=h,this.errorValue=T,this.highStart=C,this.highValueIndex=Q,this.index=$,this.data=ae}return E.prototype.get=function(h){var T;if(h>=0){if(h<55296||h>56319&&h<=65535)return T=this.index[h>>B],T=(T<<_)+(h&e),this.data[T];if(h<=65535)return T=this.index[m+(h-55296>>B)],T=(T<<_)+(h&e),this.data[T];if(h<this.highStart)return T=f-R+(h>>w),T=this.index[T],T+=h>>B&H,T=this.index[T],T=(T<<_)+(h&e),this.data[T];if(h<=1114111)return this.data[this.highValueIndex]}return this.errorValue},E}(),te="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",de=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),fe=0;fe<te.length;fe++)de[te.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==",xe=50,Ie=1,Fe=2,Ue=3,be=4,ue=5,je=7,st=8,nt=9,rt=10,He=11,re=12,K=13,W=14,se=15,ye=16,we=17,_e=18,$e=19,qe=20,Ve=21,Xe=22,at=23,ct=24,Ce=25,De=26,Qe=27,We=28,Re=29,Me=30,Ee=31,Ae=32,he=33,q=34,ee=35,oe=36,ce=37,Se=38,Pe=39,Je=40,lt=41,ht=42,At=43,xt=[9001,65288],St="!",it="\xD7",jt="\xF7",Wt=M(Le),It=[Me,oe],Xt=[Ie,Fe,Ue,ue],Dt=[rt,st],rr=[Qe,De],kt=Xt.concat(Dt),et=[Se,Pe,Je,q,ee],Tt=[se,K],Ft=function(E,h){h===void 0&&(h="strict");var T=[],C=[],Q=[];return E.forEach(function($,ae){var me=Wt.get($);if(me>xe?(Q.push(!0),me-=xe):Q.push(!1),["normal","auto","loose"].indexOf(h)!==-1&&[8208,8211,12316,12448].indexOf($)!==-1)return C.push(ae),T.push(ye);if(me===be||me===He){if(ae===0)return C.push(ae),T.push(Me);var ge=T[ae-1];return kt.indexOf(ge)===-1?(C.push(C[ae-1]),T.push(ge)):(C.push(ae),T.push(Me))}if(C.push(ae),me===Ee)return T.push(h==="strict"?Ve:ce);if(me===ht)return T.push(Me);if(me===Re)return T.push(Me);if(me===At)return $>=131072&&$<=196605||$>=196608&&$<=262141?T.push(ce):T.push(Me);T.push(me)}),[C,T,Q]},gt=function(E,h,T,C){var Q=C[T];if(Array.isArray(E)?E.indexOf(Q)!==-1:E===Q)for(var $=T;$<=C.length;){$++;var ae=C[$];if(ae===h)return!0;if(ae!==rt)break}if(Q===rt)for(var $=T;$>0;){$--;var me=C[$];if(Array.isArray(E)?E.indexOf(me)!==-1:E===me)for(var ge=T;ge<=C.length;){ge++;var ae=C[ge];if(ae===h)return!0;if(ae!==rt)break}if(me!==rt)break}return!1},Gt=function(E,h){for(var T=E;T>=0;){var C=h[T];if(C===rt)T--;else return C}return 0},zr=function(E,h,T,C,Q){if(T[C]===0)return it;var $=C-1;if(Array.isArray(Q)&&Q[$]===!0)return it;var ae=$-1,me=$+1,ge=h[$],Oe=ae>=0?h[ae]:0,Ne=h[me];if(ge===Fe&&Ne===Ue)return it;if(Xt.indexOf(ge)!==-1)return St;if(Xt.indexOf(Ne)!==-1)return it;if(Dt.indexOf(Ne)!==-1)return it;if(Gt($,h)===st)return jt;if(Wt.get(E[$])===He)return it;if((ge===Ae||ge===he)&&Wt.get(E[me])===He)return it;if(ge===je||Ne===je)return it;if(ge===nt)return it;if([rt,K,se].indexOf(ge)===-1&&Ne===nt)return it;if([we,_e,$e,ct,We].indexOf(Ne)!==-1)return it;if(Gt($,h)===Xe)return it;if(gt(at,Xe,$,h))return it;if(gt([we,_e],Ve,$,h))return it;if(gt(re,re,$,h))return it;if(ge===rt)return jt;if(ge===at||Ne===at)return it;if(Ne===ye||ge===ye)return jt;if([K,se,Ve].indexOf(Ne)!==-1||ge===W)return it;if(Oe===oe&&Tt.indexOf(ge)!==-1)return it;if(ge===We&&Ne===oe)return it;if(Ne===qe)return it;if(It.indexOf(Ne)!==-1&&ge===Ce||It.indexOf(ge)!==-1&&Ne===Ce)return it;if(ge===Qe&&[ce,Ae,he].indexOf(Ne)!==-1||[ce,Ae,he].indexOf(ge)!==-1&&Ne===De)return it;if(It.indexOf(ge)!==-1&&rr.indexOf(Ne)!==-1||rr.indexOf(ge)!==-1&&It.indexOf(Ne)!==-1)return it;if([Qe,De].indexOf(ge)!==-1&&(Ne===Ce||[Xe,se].indexOf(Ne)!==-1&&h[me+1]===Ce)||[Xe,se].indexOf(ge)!==-1&&Ne===Ce||ge===Ce&&[Ce,We,ct].indexOf(Ne)!==-1)return it;if([Ce,We,ct,we,_e].indexOf(Ne)!==-1)for(var ze=$;ze>=0;){var Ye=h[ze];if(Ye===Ce)return it;if([We,ct].indexOf(Ye)!==-1)ze--;else break}if([Qe,De].indexOf(Ne)!==-1)for(var ze=[we,_e].indexOf(ge)!==-1?ae:$;ze>=0;){var Ye=h[ze];if(Ye===Ce)return it;if([We,ct].indexOf(Ye)!==-1)ze--;else break}if(Se===ge&&[Se,Pe,q,ee].indexOf(Ne)!==-1||[Pe,q].indexOf(ge)!==-1&&[Pe,Je].indexOf(Ne)!==-1||[Je,ee].indexOf(ge)!==-1&&Ne===Je)return it;if(et.indexOf(ge)!==-1&&[qe,De].indexOf(Ne)!==-1||et.indexOf(Ne)!==-1&&ge===Qe)return it;if(It.indexOf(ge)!==-1&&It.indexOf(Ne)!==-1)return it;if(ge===ct&&It.indexOf(Ne)!==-1)return it;if(It.concat(Ce).indexOf(ge)!==-1&&Ne===Xe&&xt.indexOf(E[me])===-1||It.concat(Ce).indexOf(Ne)!==-1&&ge===_e)return it;if(ge===lt&&Ne===lt){for(var _t=T[$],ut=1;_t>0&&(_t--,h[_t]===lt);)ut++;if(ut%2!==0)return it}return ge===Ae&&Ne===he?it:jt},Zr=function(E,h){h||(h={lineBreak:"normal",wordBreak:"normal"});var T=Ft(E,h.lineBreak),C=T[0],Q=T[1],$=T[2];(h.wordBreak==="break-all"||h.wordBreak==="break-word")&&(Q=Q.map(function(me){return[Ce,Me,ht].indexOf(me)!==-1?ce:me}));var ae=h.wordBreak==="keep-all"?$.map(function(me,ge){return me&&E[ge]>=19968&&E[ge]<=40959}):void 0;return[C,Q,ae]},Lr=function(){function E(h,T,C,Q){this.codePoints=h,this.required=T===St,this.start=C,this.end=Q}return E.prototype.slice=function(){return v.apply(void 0,this.codePoints.slice(this.start,this.end))},E}(),Pr=function(E,h){var T=I(E),C=Zr(T,h),Q=C[0],$=C[1],ae=C[2],me=T.length,ge=0,Oe=0;return{next:function(){if(Oe>=me)return{done:!0,value:null};for(var Ne=it;Oe<me&&(Ne=zr(T,$,Q,++Oe,ae))===it;);if(Ne!==it||Oe===me){var ze=new Lr(T,Ne,ge,Oe);return ge=Oe,{value:ze,done:!1}}return{done:!0,value:null}}}},kr=1<<0,vr=1<<1,Dr=1<<2,qr=1<<3,Sr=10,en=47,Hr=92,ne=9,ie=32,le=34,Be=61,Ge=35,tt=36,N=37,d=39,g=40,P=41,V=95,k=45,pe=33,ke=60,Te=62,ot=64,Ke=91,ft=93,dt=61,Et=123,Rt=63,ir=125,Pt=124,er=126,Ot=128,hr=65533,Qt=42,yr=43,dr=44,wr=58,Cr=59,fr=46,pr=0,gr=8,Tr=11,br=14,Ir=31,Rr=127,or=-1,Yt=48,Ut=97,tr=101,Jt=102,Er=117,ar=122,mn=65,Mt=69,Ht=70,Lt=85,nr=90,Bt=function(E){return E>=Yt&&E<=57},$t=function(E){return E>=55296&&E<=57343},Vt=function(E){return Bt(E)||E>=mn&&E<=Ht||E>=Ut&&E<=Jt},nn=function(E){return E>=Ut&&E<=ar},an=function(E){return E>=mn&&E<=nr},vn=function(E){return nn(E)||an(E)},jr=function(E){return E>=Ot},Xr=function(E){return E===Sr||E===ne||E===ie},sn=function(E){return vn(E)||jr(E)||E===V},Wr=function(E){return sn(E)||Bt(E)||E===k},In=function(E){return E>=pr&&E<=gr||E===Tr||E>=br&&E<=Ir||E===Rr},xr=function(E,h){return E!==Hr?!1:h!==Sr},un=function(E,h,T){return E===k?sn(h)||xr(h,T):sn(E)?!0:!!(E===Hr&&xr(E,h))},Yr=function(E,h,T){return E===yr||E===k?Bt(h)?!0:h===fr&&Bt(T):E===fr?Bt(h):Bt(E)},_n=function(E){var h=0,T=1;(E[h]===yr||E[h]===k)&&(E[h]===k&&(T=-1),h++);for(var C=[];Bt(E[h]);)C.push(E[h++]);var Q=C.length?parseInt(v.apply(void 0,C),10):0;E[h]===fr&&h++;for(var $=[];Bt(E[h]);)$.push(E[h++]);var ae=$.length,me=ae?parseInt(v.apply(void 0,$),10):0;(E[h]===Mt||E[h]===tr)&&h++;var ge=1;(E[h]===yr||E[h]===k)&&(E[h]===k&&(ge=-1),h++);for(var Oe=[];Bt(E[h]);)Oe.push(E[h++]);var Ne=Oe.length?parseInt(v.apply(void 0,Oe),10):0;return T*(Q+me*Math.pow(10,-ae))*Math.pow(10,ge*Ne)},bn={type:2},Jr={type:3},tn={type:4},on={type:13},cn={type:8},yn={type:21},Nr={type:9},An={type:10},wn={type:11},Rn={type:12},Kt={type:14},zt={type:23},Or={type:1},$r={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 E(){this._value=[]}return E.prototype.write=function(h){this._value=this._value.concat(I(h))},E.prototype.read=function(){for(var h=[],T=this.consumeToken();T!==Xi;)h.push(T),T=this.consumeToken();return h},E.prototype.consumeToken=function(){var h=this.consumeCodePoint();switch(h){case le:return this.consumeStringToken(le);case Ge:var T=this.peekCodePoint(0),C=this.peekCodePoint(1),Q=this.peekCodePoint(2);if(Wr(T)||xr(C,Q)){var $=un(T,C,Q)?vr:kr,ae=this.consumeName();return{type:5,value:ae,flags:$}}break;case tt:if(this.peekCodePoint(0)===Be)return this.consumeCodePoint(),on;break;case d:return this.consumeStringToken(d);case g:return bn;case P:return Jr;case Qt:if(this.peekCodePoint(0)===Be)return this.consumeCodePoint(),Kt;break;case yr:if(Yr(h,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(h),this.consumeNumericToken();break;case dr:return tn;case k:var me=h,ge=this.peekCodePoint(0),Oe=this.peekCodePoint(1);if(Yr(me,ge,Oe))return this.reconsumeCodePoint(h),this.consumeNumericToken();if(un(me,ge,Oe))return this.reconsumeCodePoint(h),this.consumeIdentLikeToken();if(ge===k&&Oe===Te)return this.consumeCodePoint(),this.consumeCodePoint(),Fn;break;case fr:if(Yr(h,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(h),this.consumeNumericToken();break;case en:if(this.peekCodePoint(0)===Qt)for(this.consumeCodePoint();;){var Ne=this.consumeCodePoint();if(Ne===Qt&&(Ne=this.consumeCodePoint(),Ne===en))return this.consumeToken();if(Ne===or)return this.consumeToken()}break;case wr:return Cn;case Cr:return li;case ke:if(this.peekCodePoint(0)===pe&&this.peekCodePoint(1)===k&&this.peekCodePoint(2)===k)return this.consumeCodePoint(),this.consumeCodePoint(),$r;break;case ot:var ze=this.peekCodePoint(0),Ye=this.peekCodePoint(1),_t=this.peekCodePoint(2);if(un(ze,Ye,_t)){var ae=this.consumeName();return{type:7,value:ae}}break;case Ke:return Vi;case Hr:if(xr(h,this.peekCodePoint(0)))return this.reconsumeCodePoint(h),this.consumeIdentLikeToken();break;case ft:return zi;case dt:if(this.peekCodePoint(0)===Be)return this.consumeCodePoint(),cn;break;case Et:return wn;case ir:return Rn;case Er:case Lt:var ut=this.peekCodePoint(0),pt=this.peekCodePoint(1);return ut===yr&&(Vt(pt)||pt===Rt)&&(this.consumeCodePoint(),this.consumeUnicodeRangeToken()),this.reconsumeCodePoint(h),this.consumeIdentLikeToken();case Pt:if(this.peekCodePoint(0)===Be)return this.consumeCodePoint(),Nr;if(this.peekCodePoint(0)===Pt)return this.consumeCodePoint(),yn;break;case er:if(this.peekCodePoint(0)===Be)return this.consumeCodePoint(),An;break;case or:return Xi}return Xr(h)?(this.consumeWhiteSpace(),$s):Bt(h)?(this.reconsumeCodePoint(h),this.consumeNumericToken()):sn(h)?(this.reconsumeCodePoint(h),this.consumeIdentLikeToken()):{type:6,value:v(h)}},E.prototype.consumeCodePoint=function(){var h=this._value.shift();return typeof h=="undefined"?-1:h},E.prototype.reconsumeCodePoint=function(h){this._value.unshift(h)},E.prototype.peekCodePoint=function(h){return h>=this._value.length?-1:this._value[h]},E.prototype.consumeUnicodeRangeToken=function(){for(var h=[],T=this.consumeCodePoint();Vt(T)&&h.length<6;)h.push(T),T=this.consumeCodePoint();for(var C=!1;T===Rt&&h.length<6;)h.push(T),T=this.consumeCodePoint(),C=!0;if(C){var Q=parseInt(v.apply(void 0,h.map(function(ge){return ge===Rt?Yt:ge})),16),$=parseInt(v.apply(void 0,h.map(function(ge){return ge===Rt?Ht:ge})),16);return{type:30,start:Q,end:$}}var ae=parseInt(v.apply(void 0,h),16);if(this.peekCodePoint(0)===k&&Vt(this.peekCodePoint(1))){this.consumeCodePoint(),T=this.consumeCodePoint();for(var me=[];Vt(T)&&me.length<6;)me.push(T),T=this.consumeCodePoint();var $=parseInt(v.apply(void 0,me),16);return{type:30,start:ae,end:$}}else return{type:30,start:ae,end:ae}},E.prototype.consumeIdentLikeToken=function(){var h=this.consumeName();return h.toLowerCase()==="url"&&this.peekCodePoint(0)===g?(this.consumeCodePoint(),this.consumeUrlToken()):this.peekCodePoint(0)===g?(this.consumeCodePoint(),{type:19,value:h}):{type:20,value:h}},E.prototype.consumeUrlToken=function(){var h=[];if(this.consumeWhiteSpace(),this.peekCodePoint(0)===or)return{type:22,value:""};var T=this.peekCodePoint(0);if(T===d||T===le){var C=this.consumeStringToken(this.consumeCodePoint());return C.type===0&&(this.consumeWhiteSpace(),this.peekCodePoint(0)===or||this.peekCodePoint(0)===P)?(this.consumeCodePoint(),{type:22,value:C.value}):(this.consumeBadUrlRemnants(),zt)}for(;;){var Q=this.consumeCodePoint();if(Q===or||Q===P)return{type:22,value:v.apply(void 0,h)};if(Xr(Q))return this.consumeWhiteSpace(),this.peekCodePoint(0)===or||this.peekCodePoint(0)===P?(this.consumeCodePoint(),{type:22,value:v.apply(void 0,h)}):(this.consumeBadUrlRemnants(),zt);if(Q===le||Q===d||Q===g||In(Q))return this.consumeBadUrlRemnants(),zt;if(Q===Hr)if(xr(Q,this.peekCodePoint(0)))h.push(this.consumeEscapedCodePoint());else return this.consumeBadUrlRemnants(),zt;else h.push(Q)}},E.prototype.consumeWhiteSpace=function(){for(;Xr(this.peekCodePoint(0));)this.consumeCodePoint()},E.prototype.consumeBadUrlRemnants=function(){for(;;){var h=this.consumeCodePoint();if(h===P||h===or)return;xr(h,this.peekCodePoint(0))&&this.consumeEscapedCodePoint()}},E.prototype.consumeStringSlice=function(h){for(var T=5e4,C="";h>0;){var Q=Math.min(T,h);C+=v.apply(void 0,this._value.splice(0,Q)),h-=Q}return this._value.shift(),C},E.prototype.consumeStringToken=function(h){var T="",C=0;do{var Q=this._value[C];if(Q===or||Q===void 0||Q===h)return T+=this.consumeStringSlice(C),{type:0,value:T};if(Q===Sr)return this._value.splice(0,C),Or;if(Q===Hr){var $=this._value[C+1];$!==or&&$!==void 0&&($===Sr?(T+=this.consumeStringSlice(C),C=-1,this._value.shift()):xr(Q,$)&&(T+=this.consumeStringSlice(C),T+=v(this.consumeEscapedCodePoint()),C=-1))}C++}while(!0)},E.prototype.consumeNumber=function(){var h=[],T=Dr,C=this.peekCodePoint(0);for((C===yr||C===k)&&h.push(this.consumeCodePoint());Bt(this.peekCodePoint(0));)h.push(this.consumeCodePoint());C=this.peekCodePoint(0);var Q=this.peekCodePoint(1);if(C===fr&&Bt(Q))for(h.push(this.consumeCodePoint(),this.consumeCodePoint()),T=qr;Bt(this.peekCodePoint(0));)h.push(this.consumeCodePoint());C=this.peekCodePoint(0),Q=this.peekCodePoint(1);var $=this.peekCodePoint(2);if((C===Mt||C===tr)&&((Q===yr||Q===k)&&Bt($)||Bt(Q)))for(h.push(this.consumeCodePoint(),this.consumeCodePoint()),T=qr;Bt(this.peekCodePoint(0));)h.push(this.consumeCodePoint());return[_n(h),T]},E.prototype.consumeNumericToken=function(){var h=this.consumeNumber(),T=h[0],C=h[1],Q=this.peekCodePoint(0),$=this.peekCodePoint(1),ae=this.peekCodePoint(2);if(un(Q,$,ae)){var me=this.consumeName();return{type:15,number:T,flags:C,unit:me}}return Q===N?(this.consumeCodePoint(),{type:16,number:T,flags:C}):{type:17,number:T,flags:C}},E.prototype.consumeEscapedCodePoint=function(){var h=this.consumeCodePoint();if(Vt(h)){for(var T=v(h);Vt(this.peekCodePoint(0))&&T.length<6;)T+=v(this.consumeCodePoint());Xr(this.peekCodePoint(0))&&this.consumeCodePoint();var C=parseInt(T,16);return C===0||$t(C)||C>1114111?hr:C}return h===or?hr:h},E.prototype.consumeName=function(){for(var h="";;){var T=this.consumeCodePoint();if(Wr(T))h+=v(T);else if(xr(T,this.peekCodePoint(0)))h+=v(this.consumeEscapedCodePoint());else return this.reconsumeCodePoint(T),h}},E}(),Ba=function(){function E(h){this._tokens=h}return E.create=function(h){var T=new Ta;return T.write(h),new E(T.read())},E.parseValue=function(h){return E.create(h).parseComponentValue()},E.parseValues=function(h){return E.create(h).parseComponentValues()},E.prototype.parseComponentValue=function(){for(var h=this.consumeToken();h.type===31;)h=this.consumeToken();if(h.type===32)throw new SyntaxError("Error parsing CSS component value, unexpected EOF");this.reconsumeToken(h);var T=this.consumeComponentValue();do h=this.consumeToken();while(h.type===31);if(h.type===32)return T;throw new SyntaxError("Error parsing CSS component value, multiple values found when expecting only one")},E.prototype.parseComponentValues=function(){for(var h=[];;){var T=this.consumeComponentValue();if(T.type===32)return h;h.push(T),h.push()}},E.prototype.consumeComponentValue=function(){var h=this.consumeToken();switch(h.type){case 11:case 28:case 2:return this.consumeSimpleBlock(h.type);case 19:return this.consumeFunction(h)}return h},E.prototype.consumeSimpleBlock=function(h){for(var T={type:h,values:[]},C=this.consumeToken();;){if(C.type===32||qs(C,h))return T;this.reconsumeToken(C),T.values.push(this.consumeComponentValue()),C=this.consumeToken()}},E.prototype.consumeFunction=function(h){for(var T={name:h.value,values:[],type:18};;){var C=this.consumeToken();if(C.type===32||C.type===3)return T;this.reconsumeToken(C),T.values.push(this.consumeComponentValue())}},E.prototype.consumeToken=function(){var h=this._tokens.shift();return typeof h=="undefined"?Xi:h},E.prototype.reconsumeToken=function(h){this._tokens.unshift(h)},E}(),ui=function(E){return E.type===15},qn=function(E){return E.type===17},mr=function(E){return E.type===20},Zs=function(E){return E.type===0},Yi=function(E,h){return mr(E)&&E.value===h},xa=function(E){return E.type!==31},ei=function(E){return E.type!==31&&E.type!==4},Tn=function(E){var h=[],T=[];return E.forEach(function(C){if(C.type===4){if(T.length===0)throw new Error("Error parsing function args, zero tokens for arg");h.push(T),T=[];return}C.type!==31&&T.push(C)}),T.length&&h.push(T),h},qs=function(E,h){return h===11&&E.type===12||h===28&&E.type===29?!0:h===2&&E.type===3},Pn=function(E){return E.type===17||E.type===15},Fr=function(E){return E.type===16||Pn(E)},Sa=function(E){return E.length>1?[E[0],E[1]]:[E[0]]},Gr={type:17,number:0,flags:Dr},Ji={type:16,number:50,flags:Dr},Nn={type:16,number:100,flags:Dr},ci=function(E,h,T){var C=E[0],Q=E[1];return[_r(C,h),_r(typeof Q!="undefined"?Q:C,T)]},_r=function(E,h){if(E.type===16)return E.number/100*h;if(ui(E))switch(E.unit){case"rem":case"em":return 16*E.number;case"px":default:return E.number}return E.number},Ia="deg",Ra="grad",Oa="rad",La="turn",Ei={name:"angle",parse:function(E,h){if(h.type===15)switch(h.unit){case Ia:return Math.PI*h.number/180;case Ra:return Math.PI/200*h.number;case Oa:return h.number;case La:return Math.PI*2*h.number}throw new Error("Unsupported angle type")}},Ua=function(E){return E.type===15&&(E.unit===Ia||E.unit===Ra||E.unit===Oa||E.unit===La)},Da=function(E){var h=E.filter(mr).map(function(T){return T.value}).join(" ");switch(h){case"to bottom right":case"to right bottom":case"left top":case"top left":return[Gr,Gr];case"to top":case"bottom":return dn(0);case"to bottom left":case"to left bottom":case"right top":case"top right":return[Gr,Nn];case"to right":case"left":return dn(90);case"to top left":case"to left top":case"right bottom":case"bottom right":return[Nn,Nn];case"to bottom":case"top":return dn(180);case"to top right":case"to right top":case"left bottom":case"bottom left":return[Nn,Gr];case"to left":case"right":return dn(270)}return 0},dn=function(E){return Math.PI*E/180},Mn={name:"color",parse:function(E,h){if(h.type===18){var T=eo[h.name];if(typeof T=="undefined")throw new Error('Attempting to parse an unsupported color function "'+h.name+'"');return T(E,h.values)}if(h.type===5){if(h.value.length===3){var C=h.value.substring(0,1),Q=h.value.substring(1,2),$=h.value.substring(2,3);return Hn(parseInt(C+C,16),parseInt(Q+Q,16),parseInt($+$,16),1)}if(h.value.length===4){var C=h.value.substring(0,1),Q=h.value.substring(1,2),$=h.value.substring(2,3),ae=h.value.substring(3,4);return Hn(parseInt(C+C,16),parseInt(Q+Q,16),parseInt($+$,16),parseInt(ae+ae,16)/255)}if(h.value.length===6){var C=h.value.substring(0,2),Q=h.value.substring(2,4),$=h.value.substring(4,6);return Hn(parseInt(C,16),parseInt(Q,16),parseInt($,16),1)}if(h.value.length===8){var C=h.value.substring(0,2),Q=h.value.substring(2,4),$=h.value.substring(4,6),ae=h.value.substring(6,8);return Hn(parseInt(C,16),parseInt(Q,16),parseInt($,16),parseInt(ae,16)/255)}}if(h.type===20){var me=On[h.value.toUpperCase()];if(typeof me!="undefined")return me}return On.TRANSPARENT}},kn=function(E){return(255&E)===0},Qr=function(E){var h=255&E,T=255&E>>8,C=255&E>>16,Q=255&E>>24;return h<255?"rgba("+Q+","+C+","+T+","+h/255+")":"rgb("+Q+","+C+","+T+")"},Hn=function(E,h,T,C){return(E<<24|h<<16|T<<8|Math.round(C*255)<<0)>>>0},Fa=function(E,h){if(E.type===17)return E.number;if(E.type===16){var T=h===3?1:255;return h===3?E.number/100*T:Math.round(E.number/100*T)}return 0},Pa=function(E,h){var T=h.filter(ei);if(T.length===3){var C=T.map(Fa),Q=C[0],$=C[1],ae=C[2];return Hn(Q,$,ae,1)}if(T.length===4){var me=T.map(Fa),Q=me[0],$=me[1],ae=me[2],ge=me[3];return Hn(Q,$,ae,ge)}return 0};function $i(E,h,T){return T<0&&(T+=1),T>=1&&(T-=1),T<1/6?(h-E)*T*6+E:T<1/2?h:T<2/3?(h-E)*6*(2/3-T)+E:E}var Na=function(E,h){var T=h.filter(ei),C=T[0],Q=T[1],$=T[2],ae=T[3],me=(C.type===17?dn(C.number):Ei.parse(E,C))/(Math.PI*2),ge=Fr(Q)?Q.number/100:0,Oe=Fr($)?$.number/100:0,Ne=typeof ae!="undefined"&&Fr(ae)?_r(ae,1):1;if(ge===0)return Hn(Oe*255,Oe*255,Oe*255,1);var ze=Oe<=.5?Oe*(ge+1):Oe+ge-Oe*ge,Ye=Oe*2-ze,_t=$i(Ye,ze,me+1/3),ut=$i(Ye,ze,me),pt=$i(Ye,ze,me-1/3);return Hn(_t*255,ut*255,pt*255,Ne)},eo={hsl:Na,hsla:Na,rgb:Pa,rgba:Pa},hi=function(E,h){return Mn.parse(E,Ba.create(h).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(E,h){return h.map(function(T){if(mr(T))switch(T.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"},_i=function(E,h){var T=Mn.parse(E,h[0]),C=h[1];return C&&Fr(C)?{color:T,stop:C}:{color:T,stop:null}},Ma=function(E,h){var T=E[0],C=E[E.length-1];T.stop===null&&(T.stop=Gr),C.stop===null&&(C.stop=Nn);for(var Q=[],$=0,ae=0;ae<E.length;ae++){var me=E[ae].stop;if(me!==null){var ge=_r(me,h);ge>$?Q.push(ge):Q.push($),$=ge}else Q.push(null)}for(var Oe=null,ae=0;ae<Q.length;ae++){var Ne=Q[ae];if(Ne===null)Oe===null&&(Oe=ae);else if(Oe!==null){for(var ze=ae-Oe,Ye=Q[Oe-1],_t=(Ne-Ye)/(ze+1),ut=1;ut<=ze;ut++)Q[Oe+ut-1]=_t*ut;Oe=null}}return E.map(function(pt,Nt){var yt=pt.color;return{color:yt,stop:Math.max(Math.min(1,Q[Nt]/h),0)}})},no=function(E,h,T){var C=h/2,Q=T/2,$=_r(E[0],h)-C,ae=Q-_r(E[1],T);return(Math.atan2(ae,$)+Math.PI*2)%(Math.PI*2)},io=function(E,h,T){var C=typeof E=="number"?E:no(E,h,T),Q=Math.abs(h*Math.sin(C))+Math.abs(T*Math.cos(C)),$=h/2,ae=T/2,me=Q/2,ge=Math.sin(C-Math.PI/2)*me,Oe=Math.cos(C-Math.PI/2)*me;return[Q,$-Oe,$+Oe,ae-ge,ae+ge]},En=function(E,h){return Math.sqrt(E*E+h*h)},ka=function(E,h,T,C,Q){var $=[[0,0],[0,h],[E,0],[E,h]];return $.reduce(function(ae,me){var ge=me[0],Oe=me[1],Ne=En(T-ge,C-Oe);return(Q?Ne<ae.optimumDistance:Ne>ae.optimumDistance)?{optimumCorner:me,optimumDistance:Ne}:ae},{optimumDistance:Q?Infinity:-Infinity,optimumCorner:null}).optimumCorner},ao=function(E,h,T,C,Q){var $=0,ae=0;switch(E.size){case 0:E.shape===0?$=ae=Math.min(Math.abs(h),Math.abs(h-C),Math.abs(T),Math.abs(T-Q)):E.shape===1&&($=Math.min(Math.abs(h),Math.abs(h-C)),ae=Math.min(Math.abs(T),Math.abs(T-Q)));break;case 2:if(E.shape===0)$=ae=Math.min(En(h,T),En(h,T-Q),En(h-C,T),En(h-C,T-Q));else if(E.shape===1){var me=Math.min(Math.abs(T),Math.abs(T-Q))/Math.min(Math.abs(h),Math.abs(h-C)),ge=ka(C,Q,h,T,!0),Oe=ge[0],Ne=ge[1];$=En(Oe-h,(Ne-T)/me),ae=me*$}break;case 1:E.shape===0?$=ae=Math.max(Math.abs(h),Math.abs(h-C),Math.abs(T),Math.abs(T-Q)):E.shape===1&&($=Math.max(Math.abs(h),Math.abs(h-C)),ae=Math.max(Math.abs(T),Math.abs(T-Q)));break;case 3:if(E.shape===0)$=ae=Math.max(En(h,T),En(h,T-Q),En(h-C,T),En(h-C,T-Q));else if(E.shape===1){var me=Math.max(Math.abs(T),Math.abs(T-Q))/Math.max(Math.abs(h),Math.abs(h-C)),ze=ka(C,Q,h,T,!1),Oe=ze[0],Ne=ze[1];$=En(Oe-h,(Ne-T)/me),ae=me*$}break}return Array.isArray(E.size)&&($=_r(E.size[0],C),ae=E.size.length===2?_r(E.size[1],Q):$),[$,ae]},so=function(E,h){var T=dn(180),C=[];return Tn(h).forEach(function(Q,$){if($===0){var ae=Q[0];if(ae.type===20&&ae.value==="to"){T=Da(Q);return}else if(Ua(ae)){T=Ei.parse(E,ae);return}}var me=_i(E,Q);C.push(me)}),{angle:T,stops:C,type:1}},bi=function(E,h){var T=dn(180),C=[];return Tn(h).forEach(function(Q,$){if($===0){var ae=Q[0];if(ae.type===20&&["top","left","right","bottom"].indexOf(ae.value)!==-1){T=Da(Q);return}else if(Ua(ae)){T=(Ei.parse(E,ae)+dn(270))%dn(360);return}}var me=_i(E,Q);C.push(me)}),{angle:T,stops:C,type:1}},oo=function(E,h){var T=dn(180),C=[],Q=1,$=0,ae=3,me=[];return Tn(h).forEach(function(ge,Oe){var Ne=ge[0];if(Oe===0){if(mr(Ne)&&Ne.value==="linear"){Q=1;return}else if(mr(Ne)&&Ne.value==="radial"){Q=2;return}}if(Ne.type===18){if(Ne.name==="from"){var ze=Mn.parse(E,Ne.values[0]);C.push({stop:Gr,color:ze})}else if(Ne.name==="to"){var ze=Mn.parse(E,Ne.values[0]);C.push({stop:Nn,color:ze})}else if(Ne.name==="color-stop"){var Ye=Ne.values.filter(ei);if(Ye.length===2){var ze=Mn.parse(E,Ye[1]),_t=Ye[0];qn(_t)&&C.push({stop:{type:16,number:_t.number*100,flags:_t.flags},color:ze})}}}}),Q===1?{angle:(T+dn(180))%dn(360),stops:C,type:Q}:{size:ae,shape:$,stops:C,position:me,type:Q}},Ha="closest-side",Qa="farthest-side",Ka="closest-corner",ja="farthest-corner",Wa="circle",Ga="ellipse",Va="cover",za="contain",Ao=function(E,h){var T=0,C=3,Q=[],$=[];return Tn(h).forEach(function(ae,me){var ge=!0;if(me===0){var Oe=!1;ge=ae.reduce(function(ze,Ye){if(Oe)if(mr(Ye))switch(Ye.value){case"center":return $.push(Ji),ze;case"top":case"left":return $.push(Gr),ze;case"right":case"bottom":return $.push(Nn),ze}else(Fr(Ye)||Pn(Ye))&&$.push(Ye);else if(mr(Ye))switch(Ye.value){case Wa:return T=0,!1;case Ga:return T=1,!1;case"at":return Oe=!0,!1;case Ha:return C=0,!1;case Va:case Qa:return C=1,!1;case za:case Ka:return C=2,!1;case ja:return C=3,!1}else if(Pn(Ye)||Fr(Ye))return Array.isArray(C)||(C=[]),C.push(Ye),!1;return ze},ge)}if(ge){var Ne=_i(E,ae);Q.push(Ne)}}),{size:C,shape:T,stops:Q,position:$,type:2}},wi=function(E,h){var T=0,C=3,Q=[],$=[];return Tn(h).forEach(function(ae,me){var ge=!0;if(me===0?ge=ae.reduce(function(Ne,ze){if(mr(ze))switch(ze.value){case"center":return $.push(Ji),!1;case"top":case"left":return $.push(Gr),!1;case"right":case"bottom":return $.push(Nn),!1}else if(Fr(ze)||Pn(ze))return $.push(ze),!1;return Ne},ge):me===1&&(ge=ae.reduce(function(Ne,ze){if(mr(ze))switch(ze.value){case Wa:return T=0,!1;case Ga:return T=1,!1;case za:case Ha:return C=0,!1;case Qa:return C=1,!1;case Ka:return C=2,!1;case Va:case ja:return C=3,!1}else if(Pn(ze)||Fr(ze))return Array.isArray(C)||(C=[]),C.push(ze),!1;return Ne},ge)),ge){var Oe=_i(E,ae);Q.push(Oe)}}),{size:C,shape:T,stops:Q,position:$,type:2}},lo=function(E){return E.type===1},uo=function(E){return E.type===2},Zi={name:"image",parse:function(E,h){if(h.type===22){var T={url:h.value,type:0};return E.cache.addImage(h.value),T}if(h.type===18){var C=Xa[h.name];if(typeof C=="undefined")throw new Error('Attempting to parse an unsupported image function "'+h.name+'"');return C(E,h.values)}throw new Error("Unsupported image type "+h.type)}};function co(E){return!(E.type===20&&E.value==="none")&&(E.type!==18||!!Xa[E.name])}var Xa={"linear-gradient":so,"-moz-linear-gradient":bi,"-ms-linear-gradient":bi,"-o-linear-gradient":bi,"-webkit-linear-gradient":bi,"radial-gradient":Ao,"-moz-radial-gradient":wi,"-ms-radial-gradient":wi,"-o-radial-gradient":wi,"-webkit-radial-gradient":wi,"-webkit-gradient":oo},ho={name:"background-image",initialValue:"none",type:1,prefix:!1,parse:function(E,h){if(h.length===0)return[];var T=h[0];return T.type===20&&T.value==="none"?[]:h.filter(function(C){return ei(C)&&co(C)}).map(function(C){return Zi.parse(E,C)})}},fo={name:"background-origin",initialValue:"border-box",prefix:!1,type:1,parse:function(E,h){return h.map(function(T){if(mr(T))switch(T.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(E,h){return Tn(h).map(function(T){return T.filter(Fr)}).map(Sa)}},go={name:"background-repeat",initialValue:"repeat",prefix:!1,type:1,parse:function(E,h){return Tn(h).map(function(T){return T.filter(mr).map(function(C){return C.value}).join(" ")}).map(mo)}},mo=function(E){switch(E){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(E){E.AUTO="auto",E.CONTAIN="contain",E.COVER="cover"})(ti||(ti={}));var vo={name:"background-size",initialValue:"0",prefix:!1,type:1,parse:function(E,h){return Tn(h).map(function(T){return T.filter(yo)})}},yo=function(E){return mr(E)||Fr(E)},Ci=function(E){return{name:"border-"+E+"-color",initialValue:"transparent",prefix:!1,type:3,format:"color"}},Eo=Ci("top"),_o=Ci("right"),bo=Ci("bottom"),wo=Ci("left"),Ti=function(E){return{name:"border-radius-"+E,initialValue:"0 0",prefix:!1,type:1,parse:function(h,T){return Sa(T.filter(Fr))}}},Co=Ti("top-left"),To=Ti("top-right"),Bo=Ti("bottom-right"),xo=Ti("bottom-left"),Bi=function(E){return{name:"border-"+E+"-style",initialValue:"solid",prefix:!1,type:2,parse:function(h,T){switch(T){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(E){return{name:"border-"+E+"-width",initialValue:"0",type:0,prefix:!1,parse:function(h,T){return ui(T)?T.number:0}}},Lo=xi("top"),Uo=xi("right"),Do=xi("bottom"),Fo=xi("left"),Po={name:"color",initialValue:"transparent",prefix:!1,type:3,format:"color"},No={name:"direction",initialValue:"ltr",prefix:!1,type:2,parse:function(E,h){switch(h){case"rtl":return 1;case"ltr":default:return 0}}},Mo={name:"display",initialValue:"inline-block",prefix:!1,type:1,parse:function(E,h){return h.filter(mr).reduce(function(T,C){return T|ko(C.value)},0)}},ko=function(E){switch(E){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(E,h){switch(h){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(E,h){return h.type===20&&h.value==="normal"?0:h.type===17||h.type===15?h.number:0}},Si;(function(E){E.NORMAL="normal",E.STRICT="strict"})(Si||(Si={}));var Ko={name:"line-break",initialValue:"normal",prefix:!1,type:2,parse:function(E,h){switch(h){case"strict":return Si.STRICT;case"normal":default:return Si.NORMAL}}},jo={name:"line-height",initialValue:"normal",prefix:!1,type:4},Ya=function(E,h){return mr(E)&&E.value==="normal"?1.2*h:E.type===17?h*E.number:Fr(E)?_r(E,h):h},Wo={name:"list-style-image",initialValue:"none",type:0,prefix:!1,parse:function(E,h){return h.type===20&&h.value==="none"?null:Zi.parse(E,h)}},Go={name:"list-style-position",initialValue:"outside",prefix:!1,type:2,parse:function(E,h){switch(h){case"inside":return 0;case"outside":default:return 1}}},qi={name:"list-style-type",initialValue:"none",prefix:!1,type:2,parse:function(E,h){switch(h){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(E){return{name:"margin-"+E,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(E,h){return h.filter(mr).map(function(T){switch(T.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(E,h){switch(h){case"break-word":return"break-word";case"normal":default:return"normal"}}},Ri=function(E){return{name:"padding-"+E,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(E,h){switch(h){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(E,h){switch(h){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(E,h){return h.length===1&&Yi(h[0],"none")?[]:Tn(h).map(function(T){for(var C={color:On.TRANSPARENT,offsetX:Gr,offsetY:Gr,blur:Gr},Q=0,$=0;$<T.length;$++){var ae=T[$];Pn(ae)?(Q===0?C.offsetX=ae:Q===1?C.offsetY=ae:C.blur=ae,Q++):C.color=Mn.parse(E,ae)}return C})}},aA={name:"text-transform",initialValue:"none",prefix:!1,type:2,parse:function(E,h){switch(h){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(E,h){if(h.type===20&&h.value==="none")return null;if(h.type===18){var T=lA[h.name];if(typeof T=="undefined")throw new Error('Attempting to parse an unsupported transform function "'+h.name+'"');return T(h.values)}return null}},oA=function(E){var h=E.filter(function(T){return T.type===17}).map(function(T){return T.number});return h.length===6?h:null},AA=function(E){var h=E.filter(function(ge){return ge.type===17}).map(function(ge){return ge.number}),T=h[0],C=h[1];h[2],h[3];var Q=h[4],$=h[5];h[6],h[7],h[8],h[9],h[10],h[11];var ae=h[12],me=h[13];return h[14],h[15],h.length===16?[T,C,Q,$,ae,me]:null},lA={matrix:oA,matrix3d:AA},Ja={type:16,number:50,flags:Dr},uA=[Ja,Ja],cA={name:"transform-origin",initialValue:"50% 50%",prefix:!0,type:1,parse:function(E,h){var T=h.filter(Fr);return T.length!==2?uA:[T[0],T[1]]}},hA={name:"visible",initialValue:"none",prefix:!1,type:2,parse:function(E,h){switch(h){case"hidden":return 1;case"collapse":return 2;case"visible":default:return 0}}},di;(function(E){E.NORMAL="normal",E.BREAK_ALL="break-all",E.KEEP_ALL="keep-all"})(di||(di={}));for(var dA={name:"word-break",initialValue:"normal",prefix:!1,type:2,parse:function(E,h){switch(h){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(E,h){if(h.type===20)return{auto:!0,order:0};if(qn(h))return{auto:!1,order:h.number};throw new Error("Invalid z-index number parsed")}},$a={name:"time",parse:function(E,h){if(h.type===15)switch(h.unit.toLowerCase()){case"s":return 1e3*h.number;case"ms":return h.number}throw new Error("Unsupported time type")}},pA={name:"opacity",initialValue:"1",type:0,prefix:!1,parse:function(E,h){return qn(h)?h.number:1}},gA={name:"text-decoration-color",initialValue:"transparent",prefix:!1,type:3,format:"color"},mA={name:"text-decoration-line",initialValue:"none",prefix:!1,type:1,parse:function(E,h){return h.filter(mr).map(function(T){switch(T.value){case"underline":return 1;case"overline":return 2;case"line-through":return 3;case"none":return 4}return 0}).filter(function(T){return T!==0})}},vA={name:"font-family",initialValue:"",prefix:!1,type:1,parse:function(E,h){var T=[],C=[];return h.forEach(function(Q){switch(Q.type){case 20:case 0:T.push(Q.value);break;case 17:T.push(Q.number.toString());break;case 4:C.push(T.join(" ")),T.length=0;break}}),T.length&&C.push(T.join(" ")),C.map(function(Q){return Q.indexOf(" ")===-1?Q:"'"+Q+"'"})}},yA={name:"font-size",initialValue:"0",prefix:!1,type:3,format:"length"},EA={name:"font-weight",initialValue:"normal",type:0,prefix:!1,parse:function(E,h){if(qn(h))return h.number;if(mr(h))switch(h.value){case"bold":return 700;case"normal":default:return 400}return 400}},_A={name:"font-variant",initialValue:"none",type:1,prefix:!1,parse:function(E,h){return h.filter(mr).map(function(T){return T.value})}},bA={name:"font-style",initialValue:"normal",prefix:!1,type:2,parse:function(E,h){switch(h){case"oblique":return"oblique";case"italic":return"italic";case"normal":default:return"normal"}}},Mr=function(E,h){return(E&h)!==0},wA={name:"content",initialValue:"none",type:1,prefix:!1,parse:function(E,h){if(h.length===0)return[];var T=h[0];return T.type===20&&T.value==="none"?[]:h}},CA={name:"counter-increment",initialValue:"none",prefix:!0,type:1,parse:function(E,h){if(h.length===0)return null;var T=h[0];if(T.type===20&&T.value==="none")return null;for(var C=[],Q=h.filter(xa),$=0;$<Q.length;$++){var ae=Q[$],me=Q[$+1];if(ae.type===20){var ge=me&&qn(me)?me.number:1;C.push({counter:ae.value,increment:ge})}}return C}},TA={name:"counter-reset",initialValue:"none",prefix:!0,type:1,parse:function(E,h){if(h.length===0)return[];for(var T=[],C=h.filter(xa),Q=0;Q<C.length;Q++){var $=C[Q],ae=C[Q+1];if(mr($)&&$.value!=="none"){var me=ae&&qn(ae)?ae.number:0;T.push({counter:$.value,reset:me})}}return T}},BA={name:"duration",initialValue:"0s",prefix:!1,type:1,parse:function(E,h){return h.filter(ui).map(function(T){return $a.parse(E,T)})}},xA={name:"quotes",initialValue:"none",prefix:!0,type:1,parse:function(E,h){if(h.length===0)return null;var T=h[0];if(T.type===20&&T.value==="none")return null;var C=[],Q=h.filter(Zs);if(Q.length%2!==0)return null;for(var $=0;$<Q.length;$+=2){var ae=Q[$].value,me=Q[$+1].value;C.push({open:ae,close:me})}return C}},Za=function(E,h,T){if(!E)return"";var C=E[Math.min(h,E.length-1)];return C?T?C.open:C.close:""},SA={name:"box-shadow",initialValue:"none",type:1,prefix:!1,parse:function(E,h){return h.length===1&&Yi(h[0],"none")?[]:Tn(h).map(function(T){for(var C={color:255,offsetX:Gr,offsetY:Gr,blur:Gr,spread:Gr,inset:!1},Q=0,$=0;$<T.length;$++){var ae=T[$];Yi(ae,"inset")?C.inset=!0:Pn(ae)?(Q===0?C.offsetX=ae:Q===1?C.offsetY=ae:Q===2?C.blur=ae:C.spread=ae,Q++):C.color=Mn.parse(E,ae)}return C})}},IA={name:"paint-order",initialValue:"normal",prefix:!1,type:1,parse:function(E,h){var T=[0,1,2],C=[];return h.filter(mr).forEach(function(Q){switch(Q.value){case"stroke":C.push(1);break;case"fill":C.push(0);break;case"markers":C.push(2);break}}),T.forEach(function(Q){C.indexOf(Q)===-1&&C.push(Q)}),C}},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(E,h){return ui(h)?h.number:0}},LA=function(){function E(h,T){var C,Q;this.animationDuration=wt(h,BA,T.animationDuration),this.backgroundClip=wt(h,to,T.backgroundClip),this.backgroundColor=wt(h,ro,T.backgroundColor),this.backgroundImage=wt(h,ho,T.backgroundImage),this.backgroundOrigin=wt(h,fo,T.backgroundOrigin),this.backgroundPosition=wt(h,po,T.backgroundPosition),this.backgroundRepeat=wt(h,go,T.backgroundRepeat),this.backgroundSize=wt(h,vo,T.backgroundSize),this.borderTopColor=wt(h,Eo,T.borderTopColor),this.borderRightColor=wt(h,_o,T.borderRightColor),this.borderBottomColor=wt(h,bo,T.borderBottomColor),this.borderLeftColor=wt(h,wo,T.borderLeftColor),this.borderTopLeftRadius=wt(h,Co,T.borderTopLeftRadius),this.borderTopRightRadius=wt(h,To,T.borderTopRightRadius),this.borderBottomRightRadius=wt(h,Bo,T.borderBottomRightRadius),this.borderBottomLeftRadius=wt(h,xo,T.borderBottomLeftRadius),this.borderTopStyle=wt(h,So,T.borderTopStyle),this.borderRightStyle=wt(h,Io,T.borderRightStyle),this.borderBottomStyle=wt(h,Ro,T.borderBottomStyle),this.borderLeftStyle=wt(h,Oo,T.borderLeftStyle),this.borderTopWidth=wt(h,Lo,T.borderTopWidth),this.borderRightWidth=wt(h,Uo,T.borderRightWidth),this.borderBottomWidth=wt(h,Do,T.borderBottomWidth),this.borderLeftWidth=wt(h,Fo,T.borderLeftWidth),this.boxShadow=wt(h,SA,T.boxShadow),this.color=wt(h,Po,T.color),this.direction=wt(h,No,T.direction),this.display=wt(h,Mo,T.display),this.float=wt(h,Ho,T.cssFloat),this.fontFamily=wt(h,vA,T.fontFamily),this.fontSize=wt(h,yA,T.fontSize),this.fontStyle=wt(h,bA,T.fontStyle),this.fontVariant=wt(h,_A,T.fontVariant),this.fontWeight=wt(h,EA,T.fontWeight),this.letterSpacing=wt(h,Qo,T.letterSpacing),this.lineBreak=wt(h,Ko,T.lineBreak),this.lineHeight=wt(h,jo,T.lineHeight),this.listStyleImage=wt(h,Wo,T.listStyleImage),this.listStylePosition=wt(h,Go,T.listStylePosition),this.listStyleType=wt(h,qi,T.listStyleType),this.marginTop=wt(h,Vo,T.marginTop),this.marginRight=wt(h,zo,T.marginRight),this.marginBottom=wt(h,Xo,T.marginBottom),this.marginLeft=wt(h,Yo,T.marginLeft),this.opacity=wt(h,pA,T.opacity);var $=wt(h,Jo,T.overflow);this.overflowX=$[0],this.overflowY=$[$.length>1?1:0],this.overflowWrap=wt(h,$o,T.overflowWrap),this.paddingTop=wt(h,Zo,T.paddingTop),this.paddingRight=wt(h,qo,T.paddingRight),this.paddingBottom=wt(h,eA,T.paddingBottom),this.paddingLeft=wt(h,tA,T.paddingLeft),this.paintOrder=wt(h,IA,T.paintOrder),this.position=wt(h,nA,T.position),this.textAlign=wt(h,rA,T.textAlign),this.textDecorationColor=wt(h,gA,(C=T.textDecorationColor)!==null&&C!==void 0?C:T.color),this.textDecorationLine=wt(h,mA,(Q=T.textDecorationLine)!==null&&Q!==void 0?Q:T.textDecoration),this.textShadow=wt(h,iA,T.textShadow),this.textTransform=wt(h,aA,T.textTransform),this.transform=wt(h,sA,T.transform),this.transformOrigin=wt(h,cA,T.transformOrigin),this.visibility=wt(h,hA,T.visibility),this.webkitTextStrokeColor=wt(h,RA,T.webkitTextStrokeColor),this.webkitTextStrokeWidth=wt(h,OA,T.webkitTextStrokeWidth),this.wordBreak=wt(h,dA,T.wordBreak),this.zIndex=wt(h,fA,T.zIndex)}return E.prototype.isVisible=function(){return this.display>0&&this.opacity>0&&this.visibility===0},E.prototype.isTransparent=function(){return kn(this.backgroundColor)},E.prototype.isTransformed=function(){return this.transform!==null},E.prototype.isPositioned=function(){return this.position!==0},E.prototype.isPositionedWithZIndex=function(){return this.isPositioned()&&!this.zIndex.auto},E.prototype.isFloating=function(){return this.float!==0},E.prototype.isInlineLevel=function(){return Mr(this.display,4)||Mr(this.display,33554432)||Mr(this.display,268435456)||Mr(this.display,536870912)||Mr(this.display,67108864)||Mr(this.display,134217728)},E}(),UA=function(){function E(h,T){this.content=wt(h,wA,T.content),this.quotes=wt(h,xA,T.quotes)}return E}(),qa=function(){function E(h,T){this.counterIncrement=wt(h,CA,T.counterIncrement),this.counterReset=wt(h,TA,T.counterReset)}return E}(),wt=function(E,h,T){var C=new Ta,Q=T!==null&&typeof T!="undefined"?T.toString():h.initialValue;C.write(Q);var $=new Ba(C.read());switch(h.type){case 2:var ae=$.parseComponentValue();return h.parse(E,mr(ae)?ae.value:h.initialValue);case 0:return h.parse(E,$.parseComponentValue());case 1:return h.parse(E,$.parseComponentValues());case 4:return $.parseComponentValue();case 3:switch(h.format){case"angle":return Ei.parse(E,$.parseComponentValue());case"color":return Mn.parse(E,$.parseComponentValue());case"image":return Zi.parse(E,$.parseComponentValue());case"length":var me=$.parseComponentValue();return Pn(me)?me:Gr;case"length-percentage":var ge=$.parseComponentValue();return Fr(ge)?ge:Gr;case"time":return $a.parse(E,$.parseComponentValue())}break}},DA="data-html2canvas-debug",FA=function(E){var h=E.getAttribute(DA);switch(h){case"all":return 1;case"clone":return 2;case"parse":return 3;case"render":return 4;default:return 0}},ea=function(E,h){var T=FA(E);return T===1||h===T},Bn=function(){function E(h,T){if(this.context=h,this.textNodes=[],this.elements=[],this.flags=0,ea(T,3))debugger;this.styles=new LA(h,window.getComputedStyle(T,null)),fa(T)&&(this.styles.animationDuration.some(function(C){return C>0})&&(T.style.animationDuration="0s"),this.styles.transform!==null&&(T.style.transform="none")),this.bounds=F(this.context,T),ea(T,4)&&(this.flags|=16)}return E}(),PA="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 NA=function(E){var h=E.length*.75,T=E.length,C,Q=0,$,ae,me,ge;E[E.length-1]==="="&&(h--,E[E.length-2]==="="&&h--);var Oe=typeof ArrayBuffer!="undefined"&&typeof Uint8Array!="undefined"&&typeof Uint8Array.prototype.slice!="undefined"?new ArrayBuffer(h):new Array(h),Ne=Array.isArray(Oe)?Oe:new Uint8Array(Oe);for(C=0;C<T;C+=4)$=fi[E.charCodeAt(C)],ae=fi[E.charCodeAt(C+1)],me=fi[E.charCodeAt(C+2)],ge=fi[E.charCodeAt(C+3)],Ne[Q++]=$<<2|ae>>4,Ne[Q++]=(ae&15)<<4|me>>2,Ne[Q++]=(me&3)<<6|ge&63;return Oe},MA=function(E){for(var h=E.length,T=[],C=0;C<h;C+=2)T.push(E[C+1]<<8|E[C]);return T},kA=function(E){for(var h=E.length,T=[],C=0;C<h;C+=4)T.push(E[C+3]<<24|E[C+2]<<16|E[C+1]<<8|E[C]);return T},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(E,h,T){return E.slice?E.slice(h,T):new Uint16Array(Array.prototype.slice.call(E,h,T))},JA=function(E,h,T){return E.slice?E.slice(h,T):new Uint32Array(Array.prototype.slice.call(E,h,T))},$A=function(E,h){var T=NA(E),C=Array.isArray(T)?kA(T):new Uint32Array(T),Q=Array.isArray(T)?MA(T):new Uint16Array(T),$=24,ae=rs(Q,$/2,C[4]/2),me=C[5]===2?rs(Q,($+C[4])/2):JA(C,Math.ceil(($+C[4])/4));return new ZA(C[0],C[1],C[2],C[3],ae,me)},ZA=function(){function E(h,T,C,Q,$,ae){this.initialValue=h,this.errorValue=T,this.highStart=C,this.highValueIndex=Q,this.index=$,this.data=ae}return E.prototype.get=function(h){var T;if(h>=0){if(h<55296||h>56319&&h<=65535)return T=this.index[h>>zn],T=(T<<ra)+(h&na),this.data[T];if(h<=65535)return T=this.index[ts+(h-55296>>zn)],T=(T<<ra)+(h&na),this.data[T];if(h<this.highStart)return T=VA-zA+(h>>ta),T=this.index[T],T+=h>>zn&YA,T=this.index[T],T=(T<<ra)+(h&na),this.data[T];if(h<=1114111)return this.data[this.highValueIndex]}return this.errorValue},E}(),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(E){for(var h=[],T=0,C=E.length;T<C;){var Q=E.charCodeAt(T++);if(Q>=55296&&Q<=56319&&T<C){var $=E.charCodeAt(T++);($&64512)===56320?h.push(((Q&1023)<<10)+($&1023)+65536):(h.push(Q),T--)}else h.push(Q)}return h},nl=function(){for(var E=[],h=0;h<arguments.length;h++)E[h]=arguments[h];if(String.fromCodePoint)return String.fromCodePoint.apply(String,E);var T=E.length;if(!T)return"";for(var C=[],Q=-1,$="";++Q<T;){var ae=E[Q];ae<=65535?C.push(ae):(ae-=65536,C.push((ae>>10)+55296,ae%1024+56320)),(Q+1===T||C.length>16384)&&($+=String.fromCharCode.apply(String,C),C.length=0)}return $},il=$A(PA),fn="\xD7",la="\xF7",al=function(E){return il.get(E)},sl=function(E,h,T){var C=T-2,Q=h[C],$=h[T-1],ae=h[T];if($===ia&&ae===aa)return fn;if($===ia||$===aa||$===is)return la;if(ae===ia||ae===aa||ae===is)return la;if($===ss&&[ss,sa,os,As].indexOf(ae)!==-1)return fn;if(($===os||$===sa)&&(ae===sa||ae===oa))return fn;if(($===As||$===oa)&&ae===oa)return fn;if(ae===ls||ae===as)return fn;if(ae===tl)return fn;if($===el)return fn;if($===ls&&ae===us){for(;Q===as;)Q=h[--C];if(Q===us)return fn}if($===Aa&&ae===Aa){for(var me=0;Q===Aa;)me++,Q=h[--C];if(me%2===0)return fn}return la},ol=function(E){var h=rl(E),T=h.length,C=0,Q=0,$=h.map(al);return{next:function(){if(C>=T)return{done:!0,value:null};for(var ae=fn;C<T&&(ae=sl(h,$,++C))===fn;);if(ae!==fn||C===T){var me=nl.apply(null,h.slice(Q,C));return Q=C,{value:me,done:!1}}return{done:!0,value:null}}}},Al=function(E){for(var h=ol(E),T=[],C;!(C=h.next()).done;)C.value&&T.push(C.value.slice());return T},ll=function(E){var h=123;if(E.createRange){var T=E.createRange();if(T.getBoundingClientRect){var C=E.createElement("boundtest");C.style.height=h+"px",C.style.display="block",E.body.appendChild(C),T.selectNode(C);var Q=T.getBoundingClientRect(),$=Math.round(Q.height);if(E.body.removeChild(C),$===h)return!0}}return!1},ul=function(E){var h=E.createElement("boundtest");h.style.width="50px",h.style.display="block",h.style.fontSize="12px",h.style.letterSpacing="0px",h.style.wordSpacing="0px",E.body.appendChild(h);var T=E.createRange();h.innerHTML=typeof"".repeat=="function"?"&#128104;".repeat(10):"";var C=h.firstChild,Q=I(C.data).map(function(ge){return v(ge)}),$=0,ae={},me=Q.every(function(ge,Oe){T.setStart(C,$),T.setEnd(C,$+ge.length);var Ne=T.getBoundingClientRect();$+=ge.length;var ze=Ne.x>ae.x||Ne.y>ae.y;return ae=Ne,Oe===0?!0:ze});return E.body.removeChild(h),me},cl=function(){return typeof new Image().crossOrigin!="undefined"},hl=function(){return typeof new XMLHttpRequest().responseType=="string"},dl=function(E){var h=new Image,T=E.createElement("canvas"),C=T.getContext("2d");if(!C)return!1;h.src="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg'></svg>";try{C.drawImage(h,0,0),T.toDataURL()}catch(Q){return!1}return!0},cs=function(E){return E[0]===0&&E[1]===255&&E[2]===0&&E[3]===255},fl=function(E){var h=E.createElement("canvas"),T=100;h.width=T,h.height=T;var C=h.getContext("2d");if(!C)return Promise.reject(!1);C.fillStyle="rgb(0, 255, 0)",C.fillRect(0,0,T,T);var Q=new Image,$=h.toDataURL();Q.src=$;var ae=ua(T,T,0,0,Q);return C.fillStyle="red",C.fillRect(0,0,T,T),hs(ae).then(function(me){C.drawImage(me,0,0);var ge=C.getImageData(0,0,T,T).data;C.fillStyle="red",C.fillRect(0,0,T,T);var Oe=E.createElement("div");return Oe.style.backgroundImage="url("+$+")",Oe.style.height=T+"px",cs(ge)?hs(ua(T,T,0,0,Oe)):Promise.reject(!1)}).then(function(me){return C.drawImage(me,0,0),cs(C.getImageData(0,0,T,T).data)}).catch(function(){return!1})},ua=function(E,h,T,C,Q){var $="http://www.w3.org/2000/svg",ae=document.createElementNS($,"svg"),me=document.createElementNS($,"foreignObject");return ae.setAttributeNS(null,"width",E.toString()),ae.setAttributeNS(null,"height",h.toString()),me.setAttributeNS(null,"width","100%"),me.setAttributeNS(null,"height","100%"),me.setAttributeNS(null,"x",T.toString()),me.setAttributeNS(null,"y",C.toString()),me.setAttributeNS(null,"externalResourcesRequired","true"),ae.appendChild(me),me.appendChild(Q),ae},hs=function(E){return new Promise(function(h,T){var C=new Image;C.onload=function(){return h(C)},C.onerror=T,C.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(new XMLSerializer().serializeToString(E))})},Vr={get SUPPORT_RANGE_BOUNDS(){var E=ll(document);return Object.defineProperty(Vr,"SUPPORT_RANGE_BOUNDS",{value:E}),E},get SUPPORT_WORD_BREAKING(){var E=Vr.SUPPORT_RANGE_BOUNDS&&ul(document);return Object.defineProperty(Vr,"SUPPORT_WORD_BREAKING",{value:E}),E},get SUPPORT_SVG_DRAWING(){var E=dl(document);return Object.defineProperty(Vr,"SUPPORT_SVG_DRAWING",{value:E}),E},get SUPPORT_FOREIGNOBJECT_DRAWING(){var E=typeof Array.from=="function"&&typeof window.fetch=="function"?fl(document):Promise.resolve(!1);return Object.defineProperty(Vr,"SUPPORT_FOREIGNOBJECT_DRAWING",{value:E}),E},get SUPPORT_CORS_IMAGES(){var E=cl();return Object.defineProperty(Vr,"SUPPORT_CORS_IMAGES",{value:E}),E},get SUPPORT_RESPONSE_TYPE(){var E=hl();return Object.defineProperty(Vr,"SUPPORT_RESPONSE_TYPE",{value:E}),E},get SUPPORT_CORS_XHR(){var E="withCredentials"in new XMLHttpRequest;return Object.defineProperty(Vr,"SUPPORT_CORS_XHR",{value:E}),E},get SUPPORT_NATIVE_TEXT_SEGMENTATION(){var E=!!(typeof Intl!="undefined"&&Intl.Segmenter);return Object.defineProperty(Vr,"SUPPORT_NATIVE_TEXT_SEGMENTATION",{value:E}),E}},pi=function(){function E(h,T){this.text=h,this.bounds=T}return E}(),pl=function(E,h,T,C){var Q=vl(h,T),$=[],ae=0;return Q.forEach(function(me){if(T.textDecorationLine.length||me.trim().length>0)if(Vr.SUPPORT_RANGE_BOUNDS){var ge=ds(C,ae,me.length).getClientRects();if(ge.length>1){var Oe=ca(me),Ne=0;Oe.forEach(function(Ye){$.push(new pi(Ye,z.fromDOMRectList(E,ds(C,Ne+ae,Ye.length).getClientRects()))),Ne+=Ye.length})}else $.push(new pi(me,z.fromDOMRectList(E,ge)))}else{var ze=C.splitText(me.length);$.push(new pi(me,gl(E,C))),C=ze}else Vr.SUPPORT_RANGE_BOUNDS||(C=C.splitText(me.length));ae+=me.length}),$},gl=function(E,h){var T=h.ownerDocument;if(T){var C=T.createElement("html2canvaswrapper");C.appendChild(h.cloneNode(!0));var Q=h.parentNode;if(Q){Q.replaceChild(C,h);var $=F(E,C);return C.firstChild&&Q.replaceChild(C.firstChild,C),$}}return z.EMPTY},ds=function(E,h,T){var C=E.ownerDocument;if(!C)throw new Error("Node has no owner document");var Q=C.createRange();return Q.setStart(E,h),Q.setEnd(E,h+T),Q},ca=function(E){if(Vr.SUPPORT_NATIVE_TEXT_SEGMENTATION){var h=new Intl.Segmenter(void 0,{granularity:"grapheme"});return Array.from(h.segment(E)).map(function(T){return T.segment})}return Al(E)},ml=function(E,h){if(Vr.SUPPORT_NATIVE_TEXT_SEGMENTATION){var T=new Intl.Segmenter(void 0,{granularity:"word"});return Array.from(T.segment(E)).map(function(C){return C.segment})}return El(E,h)},vl=function(E,h){return h.letterSpacing!==0?ca(E):ml(E,h)},yl=[32,160,4961,65792,65793,4153,4241],El=function(E,h){for(var T=Pr(E,{lineBreak:h.lineBreak,wordBreak:h.overflowWrap==="break-word"?"break-word":h.wordBreak}),C=[],Q,$=function(){if(Q.value){var ae=Q.value.slice(),me=I(ae),ge="";me.forEach(function(Oe){yl.indexOf(Oe)===-1?ge+=v(Oe):(ge.length&&C.push(ge),C.push(v(Oe)),ge="")}),ge.length&&C.push(ge)}};!(Q=T.next()).done;)$();return C},_l=function(){function E(h,T,C){this.text=bl(T.data,C.textTransform),this.textBounds=pl(h,this.text,C,T)}return E}(),bl=function(E,h){switch(h){case 1:return E.toLowerCase();case 3:return E.replace(wl,Cl);case 2:return E.toUpperCase();default:return E}},wl=/(^|\s|:|-|\(|\))([a-z])/g,Cl=function(E,h,T){return E.length>0?h+T.toUpperCase():E},fs=function(E){X(h,E);function h(T,C){var Q=E.call(this,T,C)||this;return Q.src=C.currentSrc||C.src,Q.intrinsicWidth=C.naturalWidth,Q.intrinsicHeight=C.naturalHeight,Q.context.cache.addImage(Q.src),Q}return h}(Bn),ps=function(E){X(h,E);function h(T,C){var Q=E.call(this,T,C)||this;return Q.canvas=C,Q.intrinsicWidth=C.width,Q.intrinsicHeight=C.height,Q}return h}(Bn),gs=function(E){X(h,E);function h(T,C){var Q=E.call(this,T,C)||this,$=new XMLSerializer,ae=F(T,C);return C.setAttribute("width",ae.width+"px"),C.setAttribute("height",ae.height+"px"),Q.svg="data:image/svg+xml,"+encodeURIComponent($.serializeToString(C)),Q.intrinsicWidth=C.width.baseVal.value,Q.intrinsicHeight=C.height.baseVal.value,Q.context.cache.addImage(Q.svg),Q}return h}(Bn),ms=function(E){X(h,E);function h(T,C){var Q=E.call(this,T,C)||this;return Q.value=C.value,Q}return h}(Bn),ha=function(E){X(h,E);function h(T,C){var Q=E.call(this,T,C)||this;return Q.start=C.start,Q.reversed=typeof C.reversed=="boolean"&&C.reversed===!0,Q}return h}(Bn),Tl=[{type:15,flags:0,unit:"px",number:3}],Bl=[{type:16,flags:0,number:50}],xl=function(E){return E.width>E.height?new z(E.left+(E.width-E.height)/2,E.top,E.height,E.height):E.width<E.height?new z(E.left,E.top+(E.height-E.width)/2,E.width,E.width):E},Sl=function(E){var h=E.type===Il?new Array(E.value.length+1).join("\u2022"):E.value;return h.length===0?E.placeholder||"":h},Ui="checkbox",Di="radio",Il="password",vs=707406591,da=function(E){X(h,E);function h(T,C){var Q=E.call(this,T,C)||this;Q.type=C.type.toLowerCase(),Q.checked=C.checked,Q.value=Sl(C),(Q.type===Ui||Q.type===Di)&&(Q.styles.backgroundColor=3739148031,Q.styles.borderTopColor=Q.styles.borderRightColor=Q.styles.borderBottomColor=Q.styles.borderLeftColor=2779096575,Q.styles.borderTopWidth=Q.styles.borderRightWidth=Q.styles.borderBottomWidth=Q.styles.borderLeftWidth=1,Q.styles.borderTopStyle=Q.styles.borderRightStyle=Q.styles.borderBottomStyle=Q.styles.borderLeftStyle=1,Q.styles.backgroundClip=[0],Q.styles.backgroundOrigin=[0],Q.bounds=xl(Q.bounds));switch(Q.type){case Ui:Q.styles.borderTopRightRadius=Q.styles.borderTopLeftRadius=Q.styles.borderBottomRightRadius=Q.styles.borderBottomLeftRadius=Tl;break;case Di:Q.styles.borderTopRightRadius=Q.styles.borderTopLeftRadius=Q.styles.borderBottomRightRadius=Q.styles.borderBottomLeftRadius=Bl;break}return Q}return h}(Bn),ys=function(E){X(h,E);function h(T,C){var Q=E.call(this,T,C)||this,$=C.options[C.selectedIndex||0];return Q.value=$&&$.text||"",Q}return h}(Bn),Es=function(E){X(h,E);function h(T,C){var Q=E.call(this,T,C)||this;return Q.value=C.value,Q}return h}(Bn),_s=function(E){X(h,E);function h(T,C){var Q=E.call(this,T,C)||this;Q.src=C.src,Q.width=parseInt(C.width,10)||0,Q.height=parseInt(C.height,10)||0,Q.backgroundColor=Q.styles.backgroundColor;try{if(C.contentWindow&&C.contentWindow.document&&C.contentWindow.document.documentElement){Q.tree=ws(T,C.contentWindow.document.documentElement);var $=C.contentWindow.document.documentElement?hi(T,getComputedStyle(C.contentWindow.document.documentElement).backgroundColor):On.TRANSPARENT,ae=C.contentWindow.document.body?hi(T,getComputedStyle(C.contentWindow.document.body).backgroundColor):On.TRANSPARENT;Q.backgroundColor=kn($)?kn(ae)?Q.styles.backgroundColor:ae:$}}catch(me){}return Q}return h}(Bn),Rl=["OL","UL","MENU"],Fi=function(E,h,T,C){for(var Q=h.firstChild,$=void 0;Q;Q=$)if($=Q.nextSibling,Cs(Q)&&Q.data.trim().length>0)T.textNodes.push(new _l(E,Q,T.styles));else if(ri(Q))if(Rs(Q)&&Q.assignedNodes)Q.assignedNodes().forEach(function(me){return Fi(E,me,T,C)});else{var ae=bs(E,Q);ae.styles.isVisible()&&(Ol(Q,ae,C)?ae.flags|=4:Ll(ae.styles)&&(ae.flags|=2),Rl.indexOf(Q.tagName)!==-1&&(ae.flags|=8),T.elements.push(ae),Q.slot,Q.shadowRoot?Fi(E,Q.shadowRoot,ae,C):!Ni(Q)&&!Ts(Q)&&!Mi(Q)&&Fi(E,Q,ae,C))}},bs=function(E,h){return ga(h)?new fs(E,h):Bs(h)?new ps(E,h):Ts(h)?new gs(E,h):Ul(h)?new ms(E,h):Dl(h)?new ha(E,h):Fl(h)?new da(E,h):Mi(h)?new ys(E,h):Ni(h)?new Es(E,h):Ss(h)?new _s(E,h):new Bn(E,h)},ws=function(E,h){var T=bs(E,h);return T.flags|=4,Fi(E,h,T,T),T},Ol=function(E,h,T){return h.styles.isPositionedWithZIndex()||h.styles.opacity<1||h.styles.isTransformed()||pa(E)&&T.styles.isTransparent()},Ll=function(E){return E.isPositioned()||E.isFloating()},Cs=function(E){return E.nodeType===Node.TEXT_NODE},ri=function(E){return E.nodeType===Node.ELEMENT_NODE},fa=function(E){return ri(E)&&typeof E.style!="undefined"&&!Pi(E)},Pi=function(E){return typeof E.className=="object"},Ul=function(E){return E.tagName==="LI"},Dl=function(E){return E.tagName==="OL"},Fl=function(E){return E.tagName==="INPUT"},Pl=function(E){return E.tagName==="HTML"},Ts=function(E){return E.tagName==="svg"},pa=function(E){return E.tagName==="BODY"},Bs=function(E){return E.tagName==="CANVAS"},xs=function(E){return E.tagName==="VIDEO"},ga=function(E){return E.tagName==="IMG"},Ss=function(E){return E.tagName==="IFRAME"},Is=function(E){return E.tagName==="STYLE"},Nl=function(E){return E.tagName==="SCRIPT"},Ni=function(E){return E.tagName==="TEXTAREA"},Mi=function(E){return E.tagName==="SELECT"},Rs=function(E){return E.tagName==="SLOT"},Os=function(E){return E.tagName.indexOf("-")>0},Ml=function(){function E(){this.counters={}}return E.prototype.getCounterValue=function(h){var T=this.counters[h];return T&&T.length?T[T.length-1]:1},E.prototype.getCounterValues=function(h){var T=this.counters[h];return T||[]},E.prototype.pop=function(h){var T=this;h.forEach(function(C){return T.counters[C].pop()})},E.prototype.parse=function(h){var T=this,C=h.counterIncrement,Q=h.counterReset,$=!0;C!==null&&C.forEach(function(me){var ge=T.counters[me.counter];ge&&me.increment!==0&&($=!1,ge.length||ge.push(1),ge[Math.max(0,ge.length-1)]+=me.increment)});var ae=[];return $&&Q.forEach(function(me){var ge=T.counters[me.counter];ae.push(me.counter),ge||(ge=T.counters[me.counter]=[]),ge.push(me.reset)}),ae},E}(),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"]},Us={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(E,h,T,C,Q,$){return E<h||E>T?mi(E,Q,$.length>0):C.integers.reduce(function(ae,me,ge){for(;E>=me;)E-=me,ae+=C.values[ge];return ae},"")+$},Ds=function(E,h,T,C){var Q="";do T||E--,Q=C(E)+Q,E/=h;while(E*h>=h);return Q},Ur=function(E,h,T,C,Q){var $=T-h+1;return(E<0?"-":"")+(Ds(Math.abs(E),$,C,function(ae){return v(Math.floor(ae%$)+h)})+Q)},Xn=function(E,h,T){T===void 0&&(T=". ");var C=h.length;return Ds(Math.abs(E),C,!1,function(Q){return h[Math.floor(Q%C)]})+T},ii=1<<0,Qn=1<<1,Kn=1<<2,gi=1<<3,Ln=function(E,h,T,C,Q,$){if(E<-9999||E>9999)return mi(E,4,Q.length>0);var ae=Math.abs(E),me=Q;if(ae===0)return h[0]+me;for(var ge=0;ae>0&&ge<=4;ge++){var Oe=ae%10;Oe===0&&Mr($,ii)&&me!==""?me=h[Oe]+me:Oe>1||Oe===1&&ge===0||Oe===1&&ge===1&&Mr($,Qn)||Oe===1&&ge===1&&Mr($,Kn)&&E>100||Oe===1&&ge>1&&Mr($,gi)?me=h[Oe]+(ge>0?T[ge-1]:"")+me:Oe===1&&ge>0&&(me=T[ge-1]+me),ae=Math.floor(ae/10)}return(E<0?C:"")+me},Fs="\u5341\u767E\u5343\u842C",Ps="\u62FE\u4F70\u4EDF\u842C",Ns="\u30DE\u30A4\u30CA\u30B9",ma="\uB9C8\uC774\uB108\uC2A4",mi=function(E,h,T){var C=T?". ":"",Q=T?"\u3001":"",$=T?", ":"",ae=T?" ":"";switch(h){case 0:return"\u2022"+ae;case 1:return"\u25E6"+ae;case 2:return"\u25FE"+ae;case 5:var me=Ur(E,48,57,!0,C);return me.length<4?"0"+me:me;case 4:return Xn(E,"\u3007\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D",Q);case 6:return ni(E,1,3999,Ls,3,C).toLowerCase();case 7:return ni(E,1,3999,Ls,3,C);case 8:return Ur(E,945,969,!1,C);case 9:return Ur(E,97,122,!1,C);case 10:return Ur(E,65,90,!1,C);case 11:return Ur(E,1632,1641,!0,C);case 12:case 49:return ni(E,1,9999,Us,3,C);case 35:return ni(E,1,9999,Us,3,C).toLowerCase();case 13:return Ur(E,2534,2543,!0,C);case 14:case 30:return Ur(E,6112,6121,!0,C);case 15:return Xn(E,"\u5B50\u4E11\u5BC5\u536F\u8FB0\u5DF3\u5348\u672A\u7533\u9149\u620C\u4EA5",Q);case 16:return Xn(E,"\u7532\u4E59\u4E19\u4E01\u620A\u5DF1\u5E9A\u8F9B\u58EC\u7678",Q);case 17:case 48:return Ln(E,"\u96F6\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D",Fs,"\u8CA0",Q,Qn|Kn|gi);case 47:return Ln(E,"\u96F6\u58F9\u8CB3\u53C3\u8086\u4F0D\u9678\u67D2\u634C\u7396",Ps,"\u8CA0",Q,ii|Qn|Kn|gi);case 42:return Ln(E,"\u96F6\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D",Fs,"\u8D1F",Q,Qn|Kn|gi);case 41:return Ln(E,"\u96F6\u58F9\u8D30\u53C1\u8086\u4F0D\u9646\u67D2\u634C\u7396",Ps,"\u8D1F",Q,ii|Qn|Kn|gi);case 26:return Ln(E,"\u3007\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D","\u5341\u767E\u5343\u4E07",Ns,Q,0);case 25:return Ln(E,"\u96F6\u58F1\u5F10\u53C2\u56DB\u4F0D\u516D\u4E03\u516B\u4E5D","\u62FE\u767E\u5343\u4E07",Ns,Q,ii|Qn|Kn);case 31:return Ln(E,"\uC601\uC77C\uC774\uC0BC\uC0AC\uC624\uC721\uCE60\uD314\uAD6C","\uC2ED\uBC31\uCC9C\uB9CC",ma,$,ii|Qn|Kn);case 33:return Ln(E,"\u96F6\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D","\u5341\u767E\u5343\u842C",ma,$,0);case 32:return Ln(E,"\u96F6\u58F9\u8CB3\u53C3\u56DB\u4E94\u516D\u4E03\u516B\u4E5D","\u62FE\u767E\u5343",ma,$,ii|Qn|Kn);case 18:return Ur(E,2406,2415,!0,C);case 20:return ni(E,1,19999,Hl,3,C);case 21:return Ur(E,2790,2799,!0,C);case 22:return Ur(E,2662,2671,!0,C);case 22:return ni(E,1,10999,kl,3,C);case 23:return Xn(E,"\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(E,"\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 Ur(E,3302,3311,!0,C);case 28:return Xn(E,"\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",Q);case 29:return Xn(E,"\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",Q);case 34:return Ur(E,3792,3801,!0,C);case 37:return Ur(E,6160,6169,!0,C);case 38:return Ur(E,4160,4169,!0,C);case 39:return Ur(E,2918,2927,!0,C);case 40:return Ur(E,1776,1785,!0,C);case 43:return Ur(E,3046,3055,!0,C);case 44:return Ur(E,3174,3183,!0,C);case 45:return Ur(E,3664,3673,!0,C);case 46:return Ur(E,3872,3881,!0,C);case 3:default:return Ur(E,48,57,!0,C)}},Ms="data-html2canvas-ignore",ks=function(){function E(h,T,C){if(this.context=h,this.options=C,this.scrolledElements=[],this.referenceElement=T,this.counters=new Ml,this.quoteDepth=0,!T.ownerDocument)throw new Error("Cloned element does not have an owner document");this.documentElement=this.cloneNode(T.ownerDocument.documentElement,!1)}return E.prototype.toIFrame=function(h,T){var C=this,Q=Ql(h,T);if(!Q.contentWindow)return Promise.reject("Unable to find iframe window");var $=h.defaultView.pageXOffset,ae=h.defaultView.pageYOffset,me=Q.contentWindow,ge=me.document,Oe=Wl(Q).then(function(){return G(C,void 0,void 0,function(){var Ne,ze;return D(this,function(Ye){switch(Ye.label){case 0:return this.scrolledElements.forEach(Xl),me&&(me.scrollTo(T.left,T.top),/(iPad|iPhone|iPod)/g.test(navigator.userAgent)&&(me.scrollY!==T.top||me.scrollX!==T.left)&&(this.context.logger.warn("Unable to restore scroll position for cloned document"),this.context.windowBounds=this.context.windowBounds.add(me.scrollX-T.left,me.scrollY-T.top,0,0))),Ne=this.options.onclone,ze=this.clonedReferenceElement,typeof ze=="undefined"?[2,Promise.reject("Error finding the "+this.referenceElement.nodeName+" in the cloned document")]:ge.fonts&&ge.fonts.ready?[4,ge.fonts.ready]:[3,2];case 1:Ye.sent(),Ye.label=2;case 2:return/(AppleWebKit)/g.test(navigator.userAgent)?[4,jl(ge)]:[3,4];case 3:Ye.sent(),Ye.label=4;case 4:return typeof Ne=="function"?[2,Promise.resolve().then(function(){return Ne(ge,ze)}).then(function(){return Q})]:[2,Q]}})})});return ge.open(),ge.write(Vl(document.doctype)+"<html></html>"),zl(this.referenceElement.ownerDocument,$,ae),ge.replaceChild(ge.adoptNode(this.documentElement),ge.documentElement),ge.close(),Oe},E.prototype.createElementClone=function(h){if(ea(h,2))debugger;if(Bs(h))return this.createCanvasClone(h);if(xs(h))return this.createVideoClone(h);if(Is(h))return this.createStyleClone(h);var T=h.cloneNode(!1);return ga(T)&&(ga(h)&&h.currentSrc&&h.currentSrc!==h.src&&(T.src=h.currentSrc,T.srcset=""),T.loading==="lazy"&&(T.loading="eager")),Os(T)?this.createCustomElementClone(T):T},E.prototype.createCustomElementClone=function(h){var T=document.createElement("html2canvascustomelement");return va(h.style,T),T},E.prototype.createStyleClone=function(h){try{var T=h.sheet;if(T&&T.cssRules){var C=[].slice.call(T.cssRules,0).reduce(function($,ae){return ae&&typeof ae.cssText=="string"?$+ae.cssText:$},""),Q=h.cloneNode(!1);return Q.textContent=C,Q}}catch($){if(this.context.logger.error("Unable to access cssRules property",$),$.name!=="SecurityError")throw $}return h.cloneNode(!1)},E.prototype.createCanvasClone=function(h){var T;if(this.options.inlineImages&&h.ownerDocument){var C=h.ownerDocument.createElement("img");try{return C.src=h.toDataURL(),C}catch(Oe){this.context.logger.info("Unable to inline canvas contents, canvas is tainted",h)}}var Q=h.cloneNode(!1);try{Q.width=h.width,Q.height=h.height;var $=h.getContext("2d"),ae=Q.getContext("2d");if(ae)if(!this.options.allowTaint&&$)ae.putImageData($.getImageData(0,0,h.width,h.height),0,0);else{var me=(T=h.getContext("webgl2"))!==null&&T!==void 0?T:h.getContext("webgl");if(me){var ge=me.getContextAttributes();(ge==null?void 0:ge.preserveDrawingBuffer)===!1&&this.context.logger.warn("Unable to clone WebGL context as it has preserveDrawingBuffer=false",h)}ae.drawImage(h,0,0)}return Q}catch(Oe){this.context.logger.info("Unable to clone canvas as it is tainted",h)}return Q},E.prototype.createVideoClone=function(h){var T=h.ownerDocument.createElement("canvas");T.width=h.offsetWidth,T.height=h.offsetHeight;var C=T.getContext("2d");try{return C&&(C.drawImage(h,0,0,T.width,T.height),this.options.allowTaint||C.getImageData(0,0,T.width,T.height)),T}catch($){this.context.logger.info("Unable to clone video as it is tainted",h)}var Q=h.ownerDocument.createElement("canvas");return Q.width=h.offsetWidth,Q.height=h.offsetHeight,Q},E.prototype.appendChildNode=function(h,T,C){(!ri(T)||!Nl(T)&&!T.hasAttribute(Ms)&&(typeof this.options.ignoreElements!="function"||!this.options.ignoreElements(T)))&&((!this.options.copyStyles||!ri(T)||!Is(T))&&h.appendChild(this.cloneNode(T,C)))},E.prototype.cloneChildNodes=function(h,T,C){for(var Q=this,$=h.shadowRoot?h.shadowRoot.firstChild:h.firstChild;$;$=$.nextSibling)if(ri($)&&Rs($)&&typeof $.assignedNodes=="function"){var ae=$.assignedNodes();ae.length&&ae.forEach(function(me){return Q.appendChildNode(T,me,C)})}else this.appendChildNode(T,$,C)},E.prototype.cloneNode=function(h,T){if(Cs(h))return document.createTextNode(h.data);if(!h.ownerDocument)return h.cloneNode(!1);var C=h.ownerDocument.defaultView;if(C&&ri(h)&&(fa(h)||Pi(h))){var Q=this.createElementClone(h);Q.style.transitionProperty="none";var $=C.getComputedStyle(h),ae=C.getComputedStyle(h,":before"),me=C.getComputedStyle(h,":after");this.referenceElement===h&&fa(Q)&&(this.clonedReferenceElement=Q),pa(Q)&&$l(Q);var ge=this.counters.parse(new qa(this.context,$)),Oe=this.resolvePseudoContent(h,Q,ae,vi.BEFORE);Os(h)&&(T=!0),xs(h)||this.cloneChildNodes(h,Q,T),Oe&&Q.insertBefore(Oe,Q.firstChild);var Ne=this.resolvePseudoContent(h,Q,me,vi.AFTER);return Ne&&Q.appendChild(Ne),this.counters.pop(ge),($&&(this.options.copyStyles||Pi(h))&&!Ss(h)||T)&&va($,Q),(h.scrollTop!==0||h.scrollLeft!==0)&&this.scrolledElements.push([Q,h.scrollLeft,h.scrollTop]),(Ni(h)||Mi(h))&&(Ni(Q)||Mi(Q))&&(Q.value=h.value),Q}return h.cloneNode(!1)},E.prototype.resolvePseudoContent=function(h,T,C,Q){var $=this;if(!C)return;var ae=C.content,me=T.ownerDocument;if(!me||!ae||ae==="none"||ae==="-moz-alt-content"||C.display==="none")return;this.counters.parse(new qa(this.context,C));var ge=new UA(this.context,C),Oe=me.createElement("html2canvaspseudoelement");va(C,Oe),ge.content.forEach(function(ze){if(ze.type===0)Oe.appendChild(me.createTextNode(ze.value));else if(ze.type===22){var Ye=me.createElement("img");Ye.src=ze.value,Ye.style.opacity="1",Oe.appendChild(Ye)}else if(ze.type===18){if(ze.name==="attr"){var _t=ze.values.filter(mr);_t.length&&Oe.appendChild(me.createTextNode(h.getAttribute(_t[0].value)||""))}else if(ze.name==="counter"){var ut=ze.values.filter(ei),pt=ut[0],Nt=ut[1];if(pt&&mr(pt)){var yt=$.counters.getCounterValue(pt.value),Ct=Nt&&mr(Nt)?qi.parse($.context,Nt.value):3;Oe.appendChild(me.createTextNode(mi(yt,Ct,!1)))}}else if(ze.name==="counters"){var sr=ze.values.filter(ei),pt=sr[0],qt=sr[1],Nt=sr[2];if(pt&&mr(pt)){var lr=$.counters.getCounterValues(pt.value),bt=Nt&&mr(Nt)?qi.parse($.context,Nt.value):3,Ar=qt&&qt.type===0?qt.value:"",ur=lr.map(function(rn){return mi(rn,bt,!1)}).join(Ar);Oe.appendChild(me.createTextNode(ur))}}}else if(ze.type===20)switch(ze.value){case"open-quote":Oe.appendChild(me.createTextNode(Za(ge.quotes,$.quoteDepth++,!0)));break;case"close-quote":Oe.appendChild(me.createTextNode(Za(ge.quotes,--$.quoteDepth,!1)));break;default:Oe.appendChild(me.createTextNode(ze.value))}}),Oe.className=ya+" "+Ea;var Ne=Q===vi.BEFORE?" "+ya:" "+Ea;return Pi(T)?T.className.baseValue+=Ne:T.className+=Ne,Oe},E.destroy=function(h){return h.parentNode?(h.parentNode.removeChild(h),!0):!1},E}(),vi;(function(E){E[E.BEFORE=0]="BEFORE",E[E.AFTER=1]="AFTER"})(vi||(vi={}));var Ql=function(E,h){var T=E.createElement("iframe");return T.className="html2canvas-container",T.style.visibility="hidden",T.style.position="fixed",T.style.left="-10000px",T.style.top="0px",T.style.border="0",T.width=h.width.toString(),T.height=h.height.toString(),T.scrolling="no",T.setAttribute(Ms,"true"),E.body.appendChild(T),T},Kl=function(E){return new Promise(function(h){if(E.complete){h();return}if(!E.src){h();return}E.onload=h,E.onerror=h})},jl=function(E){return Promise.all([].slice.call(E.images,0).map(Kl))},Wl=function(E){return new Promise(function(h,T){var C=E.contentWindow;if(!C)return T("No window assigned for iframe");var Q=C.document;C.onload=E.onload=function(){C.onload=E.onload=null;var $=setInterval(function(){Q.body.childNodes.length>0&&Q.readyState==="complete"&&(clearInterval($),h(E))},50)}})},Gl=["all","d","content"],va=function(E,h){for(var T=E.length-1;T>=0;T--){var C=E.item(T);Gl.indexOf(C)===-1&&h.style.setProperty(C,E.getPropertyValue(C))}return h},Vl=function(E){var h="";return E&&(h+="<!DOCTYPE ",E.name&&(h+=E.name),E.internalSubset&&(h+=E.internalSubset),E.publicId&&(h+='"'+E.publicId+'"'),E.systemId&&(h+='"'+E.systemId+'"'),h+=">"),h},zl=function(E,h,T){E&&E.defaultView&&(h!==E.defaultView.pageXOffset||T!==E.defaultView.pageYOffset)&&E.defaultView.scrollTo(h,T)},Xl=function(E){var h=E[0],T=E[1],C=E[2];h.scrollLeft=T,h.scrollTop=C},Yl=":before",Jl=":after",ya="___html2canvas___pseudoelement_before",Ea="___html2canvas___pseudoelement_after",Hs=`{
content: "" !important;
display: none !important;
}`,$l=function(E){Zl(E,"."+ya+Yl+Hs+`
.`+Ea+Jl+Hs)},Zl=function(E,h){var T=E.ownerDocument;if(T){var C=T.createElement("style");C.textContent=h,E.appendChild(C)}},Qs=function(){function E(){}return E.getOrigin=function(h){var T=E._link;return T?(T.href=h,T.href=T.href,T.protocol+T.hostname+T.port):"about:blank"},E.isSameOrigin=function(h){return E.getOrigin(h)===E._origin},E.setContext=function(h){E._link=h.document.createElement("a"),E._origin=E.getOrigin(h.location.href)},E._origin="about:blank",E}(),ql=function(){function E(h,T){this.context=h,this._options=T,this._cache={}}return E.prototype.addImage=function(h){var T=Promise.resolve();return this.has(h)||(ba(h)||nu(h))&&(this._cache[h]=this.loadImage(h)).catch(function(){}),T},E.prototype.match=function(h){return this._cache[h]},E.prototype.loadImage=function(h){return G(this,void 0,void 0,function(){var T,C,Q,$,ae=this;return D(this,function(me){switch(me.label){case 0:return T=Qs.isSameOrigin(h),C=!_a(h)&&this._options.useCORS===!0&&Vr.SUPPORT_CORS_IMAGES&&!T,Q=!_a(h)&&!T&&!ba(h)&&typeof this._options.proxy=="string"&&Vr.SUPPORT_CORS_XHR&&!C,!T&&this._options.allowTaint===!1&&!_a(h)&&!ba(h)&&!Q&&!C?[2]:($=h,Q?[4,this.proxy($)]:[3,2]);case 1:$=me.sent(),me.label=2;case 2:return this.context.logger.debug("Added image "+h.substring(0,256)),[4,new Promise(function(ge,Oe){var Ne=new Image;Ne.onload=function(){return ge(Ne)},Ne.onerror=Oe,(iu($)||C)&&(Ne.crossOrigin="anonymous"),Ne.src=$,Ne.complete===!0&&setTimeout(function(){return ge(Ne)},500),ae._options.imageTimeout>0&&setTimeout(function(){return Oe("Timed out ("+ae._options.imageTimeout+"ms) loading image")},ae._options.imageTimeout)})];case 3:return[2,me.sent()]}})})},E.prototype.has=function(h){return typeof this._cache[h]!="undefined"},E.prototype.keys=function(){return Promise.resolve(Object.keys(this._cache))},E.prototype.proxy=function(h){var T=this,C=this._options.proxy;if(!C)throw new Error("No proxy defined");var Q=h.substring(0,256);return new Promise(function($,ae){var me=Vr.SUPPORT_RESPONSE_TYPE?"blob":"text",ge=new XMLHttpRequest;ge.onload=function(){if(ge.status===200)if(me==="text")$(ge.response);else{var ze=new FileReader;ze.addEventListener("load",function(){return $(ze.result)},!1),ze.addEventListener("error",function(Ye){return ae(Ye)},!1),ze.readAsDataURL(ge.response)}else ae("Failed to proxy resource "+Q+" with status code "+ge.status)},ge.onerror=ae;var Oe=C.indexOf("?")>-1?"&":"?";if(ge.open("GET",""+C+Oe+"url="+encodeURIComponent(h)+"&responseType="+me),me!=="text"&&ge instanceof XMLHttpRequest&&(ge.responseType=me),T._options.imageTimeout){var Ne=T._options.imageTimeout;ge.timeout=Ne,ge.ontimeout=function(){return ae("Timed out ("+Ne+"ms) proxying "+Q)}}ge.send()})},E}(),eu=/^data:image\/svg\+xml/i,tu=/^data:image\/.*;base64,/i,ru=/^data:image\/.*/i,nu=function(E){return Vr.SUPPORT_SVG_DRAWING||!au(E)},_a=function(E){return ru.test(E)},iu=function(E){return tu.test(E)},ba=function(E){return E.substr(0,4)==="blob"},au=function(E){return E.substr(-3).toLowerCase()==="svg"||eu.test(E)},vt=function(){function E(h,T){this.type=0,this.x=h,this.y=T}return E.prototype.add=function(h,T){return new E(this.x+h,this.y+T)},E}(),ai=function(E,h,T){return new vt(E.x+(h.x-E.x)*T,E.y+(h.y-E.y)*T)},ki=function(){function E(h,T,C,Q){this.type=1,this.start=h,this.startControl=T,this.endControl=C,this.end=Q}return E.prototype.subdivide=function(h,T){var C=ai(this.start,this.startControl,h),Q=ai(this.startControl,this.endControl,h),$=ai(this.endControl,this.end,h),ae=ai(C,Q,h),me=ai(Q,$,h),ge=ai(ae,me,h);return T?new E(this.start,C,ae,ge):new E(ge,me,$,this.end)},E.prototype.add=function(h,T){return new E(this.start.add(h,T),this.startControl.add(h,T),this.endControl.add(h,T),this.end.add(h,T))},E.prototype.reverse=function(){return new E(this.end,this.endControl,this.startControl,this.start)},E}(),pn=function(E){return E.type===1},su=function(){function E(h){var T=h.styles,C=h.bounds,Q=ci(T.borderTopLeftRadius,C.width,C.height),$=Q[0],ae=Q[1],me=ci(T.borderTopRightRadius,C.width,C.height),ge=me[0],Oe=me[1],Ne=ci(T.borderBottomRightRadius,C.width,C.height),ze=Ne[0],Ye=Ne[1],_t=ci(T.borderBottomLeftRadius,C.width,C.height),ut=_t[0],pt=_t[1],Nt=[];Nt.push(($+ge)/C.width),Nt.push((ut+ze)/C.width),Nt.push((ae+pt)/C.height),Nt.push((Oe+Ye)/C.height);var yt=Math.max.apply(Math,Nt);yt>1&&($/=yt,ae/=yt,ge/=yt,Oe/=yt,ze/=yt,Ye/=yt,ut/=yt,pt/=yt);var Ct=C.width-ge,sr=C.height-Ye,qt=C.width-ze,lr=C.height-pt,bt=T.borderTopWidth,Ar=T.borderRightWidth,ur=T.borderBottomWidth,Zt=T.borderLeftWidth,ln=_r(T.paddingTop,h.bounds.width),rn=_r(T.paddingRight,h.bounds.width),hn=_r(T.paddingBottom,h.bounds.width),Kr=_r(T.paddingLeft,h.bounds.width);this.topLeftBorderDoubleOuterBox=$>0||ae>0?Br(C.left+Zt/3,C.top+bt/3,$-Zt/3,ae-bt/3,cr.TOP_LEFT):new vt(C.left+Zt/3,C.top+bt/3),this.topRightBorderDoubleOuterBox=$>0||ae>0?Br(C.left+Ct,C.top+bt/3,ge-Ar/3,Oe-bt/3,cr.TOP_RIGHT):new vt(C.left+C.width-Ar/3,C.top+bt/3),this.bottomRightBorderDoubleOuterBox=ze>0||Ye>0?Br(C.left+qt,C.top+sr,ze-Ar/3,Ye-ur/3,cr.BOTTOM_RIGHT):new vt(C.left+C.width-Ar/3,C.top+C.height-ur/3),this.bottomLeftBorderDoubleOuterBox=ut>0||pt>0?Br(C.left+Zt/3,C.top+lr,ut-Zt/3,pt-ur/3,cr.BOTTOM_LEFT):new vt(C.left+Zt/3,C.top+C.height-ur/3),this.topLeftBorderDoubleInnerBox=$>0||ae>0?Br(C.left+Zt*2/3,C.top+bt*2/3,$-Zt*2/3,ae-bt*2/3,cr.TOP_LEFT):new vt(C.left+Zt*2/3,C.top+bt*2/3),this.topRightBorderDoubleInnerBox=$>0||ae>0?Br(C.left+Ct,C.top+bt*2/3,ge-Ar*2/3,Oe-bt*2/3,cr.TOP_RIGHT):new vt(C.left+C.width-Ar*2/3,C.top+bt*2/3),this.bottomRightBorderDoubleInnerBox=ze>0||Ye>0?Br(C.left+qt,C.top+sr,ze-Ar*2/3,Ye-ur*2/3,cr.BOTTOM_RIGHT):new vt(C.left+C.width-Ar*2/3,C.top+C.height-ur*2/3),this.bottomLeftBorderDoubleInnerBox=ut>0||pt>0?Br(C.left+Zt*2/3,C.top+lr,ut-Zt*2/3,pt-ur*2/3,cr.BOTTOM_LEFT):new vt(C.left+Zt*2/3,C.top+C.height-ur*2/3),this.topLeftBorderStroke=$>0||ae>0?Br(C.left+Zt/2,C.top+bt/2,$-Zt/2,ae-bt/2,cr.TOP_LEFT):new vt(C.left+Zt/2,C.top+bt/2),this.topRightBorderStroke=$>0||ae>0?Br(C.left+Ct,C.top+bt/2,ge-Ar/2,Oe-bt/2,cr.TOP_RIGHT):new vt(C.left+C.width-Ar/2,C.top+bt/2),this.bottomRightBorderStroke=ze>0||Ye>0?Br(C.left+qt,C.top+sr,ze-Ar/2,Ye-ur/2,cr.BOTTOM_RIGHT):new vt(C.left+C.width-Ar/2,C.top+C.height-ur/2),this.bottomLeftBorderStroke=ut>0||pt>0?Br(C.left+Zt/2,C.top+lr,ut-Zt/2,pt-ur/2,cr.BOTTOM_LEFT):new vt(C.left+Zt/2,C.top+C.height-ur/2),this.topLeftBorderBox=$>0||ae>0?Br(C.left,C.top,$,ae,cr.TOP_LEFT):new vt(C.left,C.top),this.topRightBorderBox=ge>0||Oe>0?Br(C.left+Ct,C.top,ge,Oe,cr.TOP_RIGHT):new vt(C.left+C.width,C.top),this.bottomRightBorderBox=ze>0||Ye>0?Br(C.left+qt,C.top+sr,ze,Ye,cr.BOTTOM_RIGHT):new vt(C.left+C.width,C.top+C.height),this.bottomLeftBorderBox=ut>0||pt>0?Br(C.left,C.top+lr,ut,pt,cr.BOTTOM_LEFT):new vt(C.left,C.top+C.height),this.topLeftPaddingBox=$>0||ae>0?Br(C.left+Zt,C.top+bt,Math.max(0,$-Zt),Math.max(0,ae-bt),cr.TOP_LEFT):new vt(C.left+Zt,C.top+bt),this.topRightPaddingBox=ge>0||Oe>0?Br(C.left+Math.min(Ct,C.width-Ar),C.top+bt,Ct>C.width+Ar?0:Math.max(0,ge-Ar),Math.max(0,Oe-bt),cr.TOP_RIGHT):new vt(C.left+C.width-Ar,C.top+bt),this.bottomRightPaddingBox=ze>0||Ye>0?Br(C.left+Math.min(qt,C.width-Zt),C.top+Math.min(sr,C.height-ur),Math.max(0,ze-Ar),Math.max(0,Ye-ur),cr.BOTTOM_RIGHT):new vt(C.left+C.width-Ar,C.top+C.height-ur),this.bottomLeftPaddingBox=ut>0||pt>0?Br(C.left+Zt,C.top+Math.min(lr,C.height-ur),Math.max(0,ut-Zt),Math.max(0,pt-ur),cr.BOTTOM_LEFT):new vt(C.left+Zt,C.top+C.height-ur),this.topLeftContentBox=$>0||ae>0?Br(C.left+Zt+Kr,C.top+bt+ln,Math.max(0,$-(Zt+Kr)),Math.max(0,ae-(bt+ln)),cr.TOP_LEFT):new vt(C.left+Zt+Kr,C.top+bt+ln),this.topRightContentBox=ge>0||Oe>0?Br(C.left+Math.min(Ct,C.width+Zt+Kr),C.top+bt+ln,Ct>C.width+Zt+Kr?0:ge-Zt+Kr,Oe-(bt+ln),cr.TOP_RIGHT):new vt(C.left+C.width-(Ar+rn),C.top+bt+ln),this.bottomRightContentBox=ze>0||Ye>0?Br(C.left+Math.min(qt,C.width-(Zt+Kr)),C.top+Math.min(sr,C.height+bt+ln),Math.max(0,ze-(Ar+rn)),Ye-(ur+hn),cr.BOTTOM_RIGHT):new vt(C.left+C.width-(Ar+rn),C.top+C.height-(ur+hn)),this.bottomLeftContentBox=ut>0||pt>0?Br(C.left+Zt+Kr,C.top+lr,Math.max(0,ut-(Zt+Kr)),pt-(ur+hn),cr.BOTTOM_LEFT):new vt(C.left+Zt+Kr,C.top+C.height-(ur+hn))}return E}(),cr;(function(E){E[E.TOP_LEFT=0]="TOP_LEFT",E[E.TOP_RIGHT=1]="TOP_RIGHT",E[E.BOTTOM_RIGHT=2]="BOTTOM_RIGHT",E[E.BOTTOM_LEFT=3]="BOTTOM_LEFT"})(cr||(cr={}));var Br=function(E,h,T,C,Q){var $=4*((Math.sqrt(2)-1)/3),ae=T*$,me=C*$,ge=E+T,Oe=h+C;switch(Q){case cr.TOP_LEFT:return new ki(new vt(E,Oe),new vt(E,Oe-me),new vt(ge-ae,h),new vt(ge,h));case cr.TOP_RIGHT:return new ki(new vt(E,h),new vt(E+ae,h),new vt(ge,Oe-me),new vt(ge,Oe));case cr.BOTTOM_RIGHT:return new ki(new vt(ge,h),new vt(ge,h+me),new vt(E+ae,Oe),new vt(E,Oe));case cr.BOTTOM_LEFT:default:return new ki(new vt(ge,Oe),new vt(ge-ae,Oe),new vt(E,h+me),new vt(E,h))}},Hi=function(E){return[E.topLeftBorderBox,E.topRightBorderBox,E.bottomRightBorderBox,E.bottomLeftBorderBox]},ou=function(E){return[E.topLeftContentBox,E.topRightContentBox,E.bottomRightContentBox,E.bottomLeftContentBox]},Qi=function(E){return[E.topLeftPaddingBox,E.topRightPaddingBox,E.bottomRightPaddingBox,E.bottomLeftPaddingBox]},Au=function(){function E(h,T,C){this.offsetX=h,this.offsetY=T,this.matrix=C,this.type=0,this.target=2|4}return E}(),Ki=function(){function E(h,T){this.path=h,this.target=T,this.type=1}return E}(),lu=function(){function E(h){this.opacity=h,this.type=2,this.target=2|4}return E}(),uu=function(E){return E.type===0},Ks=function(E){return E.type===1},cu=function(E){return E.type===2},js=function(E,h){return E.length===h.length?E.some(function(T,C){return T===h[C]}):!1},hu=function(E,h,T,C,Q){return E.map(function($,ae){switch(ae){case 0:return $.add(h,T);case 1:return $.add(h+C,T);case 2:return $.add(h+C,T+Q);case 3:return $.add(h,T+Q)}return $})},Ws=function(){function E(h){this.element=h,this.inlineLevel=[],this.nonInlineLevel=[],this.negativeZIndex=[],this.zeroOrAutoZIndexOrTransformedOrOpacity=[],this.positiveZIndex=[],this.nonPositionedFloats=[],this.nonPositionedInlineLevel=[]}return E}(),Gs=function(){function E(h,T){if(this.container=h,this.parent=T,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 C=this.container.bounds.left+this.container.styles.transformOrigin[0].number,Q=this.container.bounds.top+this.container.styles.transformOrigin[1].number,$=this.container.styles.transform;this.effects.push(new Au(C,Q,$))}if(this.container.styles.overflowX!==0){var ae=Hi(this.curves),me=Qi(this.curves);js(ae,me)?this.effects.push(new Ki(ae,2|4)):(this.effects.push(new Ki(ae,2)),this.effects.push(new Ki(me,4)))}}return E.prototype.getEffects=function(h){for(var T=[2,3].indexOf(this.container.styles.position)===-1,C=this.parent,Q=this.effects.slice(0);C;){var $=C.effects.filter(function(ge){return!Ks(ge)});if(T||C.container.styles.position!==0||!C.parent){if(Q.unshift.apply(Q,$),T=[2,3].indexOf(C.container.styles.position)===-1,C.container.styles.overflowX!==0){var ae=Hi(C.curves),me=Qi(C.curves);js(ae,me)||Q.unshift(new Ki(me,2|4))}}else Q.unshift.apply(Q,$);C=C.parent}return Q.filter(function(ge){return Mr(ge.target,h)})},E}(),wa=function(E,h,T,C){E.container.elements.forEach(function(Q){var $=Mr(Q.flags,4),ae=Mr(Q.flags,2),me=new Gs(Q,E);Mr(Q.styles.display,2048)&&C.push(me);var ge=Mr(Q.flags,8)?[]:C;if($||ae){var Oe=$||Q.styles.isPositioned()?T:h,Ne=new Ws(me);if(Q.styles.isPositioned()||Q.styles.opacity<1||Q.styles.isTransformed()){var ze=Q.styles.zIndex.order;if(ze<0){var Ye=0;Oe.negativeZIndex.some(function(ut,pt){return ze>ut.element.container.styles.zIndex.order?(Ye=pt,!1):Ye>0}),Oe.negativeZIndex.splice(Ye,0,Ne)}else if(ze>0){var _t=0;Oe.positiveZIndex.some(function(ut,pt){return ze>=ut.element.container.styles.zIndex.order?(_t=pt+1,!1):_t>0}),Oe.positiveZIndex.splice(_t,0,Ne)}else Oe.zeroOrAutoZIndexOrTransformedOrOpacity.push(Ne)}else Q.styles.isFloating()?Oe.nonPositionedFloats.push(Ne):Oe.nonPositionedInlineLevel.push(Ne);wa(me,Ne,$?Ne:T,ge)}else Q.styles.isInlineLevel()?h.inlineLevel.push(me):h.nonInlineLevel.push(me),wa(me,h,T,ge);Mr(Q.flags,8)&&Vs(Q,ge)})},Vs=function(E,h){for(var T=E instanceof ha?E.start:1,C=E instanceof ha?E.reversed:!1,Q=0;Q<h.length;Q++){var $=h[Q];$.container instanceof ms&&typeof $.container.value=="number"&&$.container.value!==0&&(T=$.container.value),$.listValue=mi(T,$.container.styles.listStyleType,!0),T+=C?-1:1}},du=function(E){var h=new Gs(E,null),T=new Ws(h),C=[];return wa(h,T,T,C),Vs(h.container,C),T},zs=function(E,h){switch(h){case 0:return gn(E.topLeftBorderBox,E.topLeftPaddingBox,E.topRightBorderBox,E.topRightPaddingBox);case 1:return gn(E.topRightBorderBox,E.topRightPaddingBox,E.bottomRightBorderBox,E.bottomRightPaddingBox);case 2:return gn(E.bottomRightBorderBox,E.bottomRightPaddingBox,E.bottomLeftBorderBox,E.bottomLeftPaddingBox);case 3:default:return gn(E.bottomLeftBorderBox,E.bottomLeftPaddingBox,E.topLeftBorderBox,E.topLeftPaddingBox)}},fu=function(E,h){switch(h){case 0:return gn(E.topLeftBorderBox,E.topLeftBorderDoubleOuterBox,E.topRightBorderBox,E.topRightBorderDoubleOuterBox);case 1:return gn(E.topRightBorderBox,E.topRightBorderDoubleOuterBox,E.bottomRightBorderBox,E.bottomRightBorderDoubleOuterBox);case 2:return gn(E.bottomRightBorderBox,E.bottomRightBorderDoubleOuterBox,E.bottomLeftBorderBox,E.bottomLeftBorderDoubleOuterBox);case 3:default:return gn(E.bottomLeftBorderBox,E.bottomLeftBorderDoubleOuterBox,E.topLeftBorderBox,E.topLeftBorderDoubleOuterBox)}},pu=function(E,h){switch(h){case 0:return gn(E.topLeftBorderDoubleInnerBox,E.topLeftPaddingBox,E.topRightBorderDoubleInnerBox,E.topRightPaddingBox);case 1:return gn(E.topRightBorderDoubleInnerBox,E.topRightPaddingBox,E.bottomRightBorderDoubleInnerBox,E.bottomRightPaddingBox);case 2:return gn(E.bottomRightBorderDoubleInnerBox,E.bottomRightPaddingBox,E.bottomLeftBorderDoubleInnerBox,E.bottomLeftPaddingBox);case 3:default:return gn(E.bottomLeftBorderDoubleInnerBox,E.bottomLeftPaddingBox,E.topLeftBorderDoubleInnerBox,E.topLeftPaddingBox)}},gu=function(E,h){switch(h){case 0:return ji(E.topLeftBorderStroke,E.topRightBorderStroke);case 1:return ji(E.topRightBorderStroke,E.bottomRightBorderStroke);case 2:return ji(E.bottomRightBorderStroke,E.bottomLeftBorderStroke);case 3:default:return ji(E.bottomLeftBorderStroke,E.topLeftBorderStroke)}},ji=function(E,h){var T=[];return pn(E)?T.push(E.subdivide(.5,!1)):T.push(E),pn(h)?T.push(h.subdivide(.5,!0)):T.push(h),T},gn=function(E,h,T,C){var Q=[];return pn(E)?Q.push(E.subdivide(.5,!1)):Q.push(E),pn(T)?Q.push(T.subdivide(.5,!0)):Q.push(T),pn(C)?Q.push(C.subdivide(.5,!0).reverse()):Q.push(C),pn(h)?Q.push(h.subdivide(.5,!1).reverse()):Q.push(h),Q},Xs=function(E){var h=E.bounds,T=E.styles;return h.add(T.borderLeftWidth,T.borderTopWidth,-(T.borderRightWidth+T.borderLeftWidth),-(T.borderTopWidth+T.borderBottomWidth))},Wi=function(E){var h=E.styles,T=E.bounds,C=_r(h.paddingLeft,T.width),Q=_r(h.paddingRight,T.width),$=_r(h.paddingTop,T.width),ae=_r(h.paddingBottom,T.width);return T.add(C+h.borderLeftWidth,$+h.borderTopWidth,-(h.borderRightWidth+h.borderLeftWidth+C+Q),-(h.borderTopWidth+h.borderBottomWidth+$+ae))},mu=function(E,h){return E===0?h.bounds:E===2?Wi(h):Xs(h)},vu=function(E,h){return E===0?h.bounds:E===2?Wi(h):Xs(h)},Ca=function(E,h,T){var C=mu(oi(E.styles.backgroundOrigin,h),E),Q=vu(oi(E.styles.backgroundClip,h),E),$=yu(oi(E.styles.backgroundSize,h),T,C),ae=$[0],me=$[1],ge=ci(oi(E.styles.backgroundPosition,h),C.width-ae,C.height-me),Oe=Eu(oi(E.styles.backgroundRepeat,h),ge,$,C,Q),Ne=Math.round(C.left+ge[0]),ze=Math.round(C.top+ge[1]);return[Oe,Ne,ze,ae,me]},si=function(E){return mr(E)&&E.value===ti.AUTO},Gi=function(E){return typeof E=="number"},yu=function(E,h,T){var C=h[0],Q=h[1],$=h[2],ae=E[0],me=E[1];if(!ae)return[0,0];if(Fr(ae)&&me&&Fr(me))return[_r(ae,T.width),_r(me,T.height)];var ge=Gi($);if(mr(ae)&&(ae.value===ti.CONTAIN||ae.value===ti.COVER)){if(Gi($)){var Oe=T.width/T.height;return Oe<$!==(ae.value===ti.COVER)?[T.width,T.width/$]:[T.height*$,T.height]}return[T.width,T.height]}var Ne=Gi(C),ze=Gi(Q),Ye=Ne||ze;if(si(ae)&&(!me||si(me))){if(Ne&&ze)return[C,Q];if(!ge&&!Ye)return[T.width,T.height];if(Ye&&ge){var _t=Ne?C:Q*$,ut=ze?Q:C/$;return[_t,ut]}var pt=Ne?C:T.width,Nt=ze?Q:T.height;return[pt,Nt]}if(ge){var yt=0,Ct=0;return Fr(ae)?yt=_r(ae,T.width):Fr(me)&&(Ct=_r(me,T.height)),si(ae)?yt=Ct*$:(!me||si(me))&&(Ct=yt/$),[yt,Ct]}var sr=null,qt=null;if(Fr(ae)?sr=_r(ae,T.width):me&&Fr(me)&&(qt=_r(me,T.height)),sr!==null&&(!me||si(me))&&(qt=Ne&&ze?sr/C*Q:T.height),qt!==null&&si(ae)&&(sr=Ne&&ze?qt/Q*C:T.width),sr!==null&&qt!==null)return[sr,qt];throw new Error("Unable to calculate background-size for element")},oi=function(E,h){var T=E[h];return typeof T=="undefined"?E[0]:T},Eu=function(E,h,T,C,Q){var $=h[0],ae=h[1],me=T[0],ge=T[1];switch(E){case 2:return[new vt(Math.round(C.left),Math.round(C.top+ae)),new vt(Math.round(C.left+C.width),Math.round(C.top+ae)),new vt(Math.round(C.left+C.width),Math.round(ge+C.top+ae)),new vt(Math.round(C.left),Math.round(ge+C.top+ae))];case 3:return[new vt(Math.round(C.left+$),Math.round(C.top)),new vt(Math.round(C.left+$+me),Math.round(C.top)),new vt(Math.round(C.left+$+me),Math.round(C.height+C.top)),new vt(Math.round(C.left+$),Math.round(C.height+C.top))];case 1:return[new vt(Math.round(C.left+$),Math.round(C.top+ae)),new vt(Math.round(C.left+$+me),Math.round(C.top+ae)),new vt(Math.round(C.left+$+me),Math.round(C.top+ae+ge)),new vt(Math.round(C.left+$),Math.round(C.top+ae+ge))];default:return[new vt(Math.round(Q.left),Math.round(Q.top)),new vt(Math.round(Q.left+Q.width),Math.round(Q.top)),new vt(Math.round(Q.left+Q.width),Math.round(Q.height+Q.top)),new vt(Math.round(Q.left),Math.round(Q.height+Q.top))]}},_u="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",Ys="Hidden Text",bu=function(){function E(h){this._data={},this._document=h}return E.prototype.parseMetrics=function(h,T){var C=this._document.createElement("div"),Q=this._document.createElement("img"),$=this._document.createElement("span"),ae=this._document.body;C.style.visibility="hidden",C.style.fontFamily=h,C.style.fontSize=T,C.style.margin="0",C.style.padding="0",C.style.whiteSpace="nowrap",ae.appendChild(C),Q.src=_u,Q.width=1,Q.height=1,Q.style.margin="0",Q.style.padding="0",Q.style.verticalAlign="baseline",$.style.fontFamily=h,$.style.fontSize=T,$.style.margin="0",$.style.padding="0",$.appendChild(this._document.createTextNode(Ys)),C.appendChild($),C.appendChild(Q);var me=Q.offsetTop-$.offsetTop+2;C.removeChild($),C.appendChild(this._document.createTextNode(Ys)),C.style.lineHeight="normal",Q.style.verticalAlign="super";var ge=Q.offsetTop-C.offsetTop+2;return ae.removeChild(C),{baseline:me,middle:ge}},E.prototype.getMetrics=function(h,T){var C=h+" "+T;return typeof this._data[C]=="undefined"&&(this._data[C]=this.parseMetrics(h,T)),this._data[C]},E}(),Js=function(){function E(h,T){this.context=h,this.options=T}return E}(),wu=1e4,Cu=function(E){X(h,E);function h(T,C){var Q=E.call(this,T,C)||this;return Q._activeEffects=[],Q.canvas=C.canvas?C.canvas:document.createElement("canvas"),Q.ctx=Q.canvas.getContext("2d"),C.canvas||(Q.canvas.width=Math.floor(C.width*C.scale),Q.canvas.height=Math.floor(C.height*C.scale),Q.canvas.style.width=C.width+"px",Q.canvas.style.height=C.height+"px"),Q.fontMetrics=new bu(document),Q.ctx.scale(Q.options.scale,Q.options.scale),Q.ctx.translate(-C.x,-C.y),Q.ctx.textBaseline="bottom",Q._activeEffects=[],Q.context.logger.debug("Canvas renderer initialized ("+C.width+"x"+C.height+") with scale "+C.scale),Q}return h.prototype.applyEffects=function(T){for(var C=this;this._activeEffects.length;)this.popEffect();T.forEach(function(Q){return C.applyEffect(Q)})},h.prototype.applyEffect=function(T){this.ctx.save(),cu(T)&&(this.ctx.globalAlpha=T.opacity),uu(T)&&(this.ctx.translate(T.offsetX,T.offsetY),this.ctx.transform(T.matrix[0],T.matrix[1],T.matrix[2],T.matrix[3],T.matrix[4],T.matrix[5]),this.ctx.translate(-T.offsetX,-T.offsetY)),Ks(T)&&(this.path(T.path),this.ctx.clip()),this._activeEffects.push(T)},h.prototype.popEffect=function(){this._activeEffects.pop(),this.ctx.restore()},h.prototype.renderStack=function(T){return G(this,void 0,void 0,function(){var C;return D(this,function(Q){switch(Q.label){case 0:return C=T.element.container.styles,C.isVisible()?[4,this.renderStackContent(T)]:[3,2];case 1:Q.sent(),Q.label=2;case 2:return[2]}})})},h.prototype.renderNode=function(T){return G(this,void 0,void 0,function(){return D(this,function(C){switch(C.label){case 0:if(Mr(T.container.flags,16))debugger;return T.container.styles.isVisible()?[4,this.renderNodeBackgroundAndBorders(T)]:[3,3];case 1:return C.sent(),[4,this.renderNodeContent(T)];case 2:C.sent(),C.label=3;case 3:return[2]}})})},h.prototype.renderTextWithLetterSpacing=function(T,C,Q){var $=this;if(C===0)this.ctx.fillText(T.text,T.bounds.left,T.bounds.top+Q);else{var ae=ca(T.text);ae.reduce(function(me,ge){return $.ctx.fillText(ge,me,T.bounds.top+Q),me+$.ctx.measureText(ge).width},T.bounds.left)}},h.prototype.createFontStyle=function(T){var C=T.fontVariant.filter(function(ae){return ae==="normal"||ae==="small-caps"}).join(""),Q=Iu(T.fontFamily).join(", "),$=ui(T.fontSize)?""+T.fontSize.number+T.fontSize.unit:T.fontSize.number+"px";return[[T.fontStyle,C,T.fontWeight,$,Q].join(" "),Q,$]},h.prototype.renderTextNode=function(T,C){return G(this,void 0,void 0,function(){var Q,$,ae,me,ge,Oe,Ne,ze,Ye=this;return D(this,function(_t){return Q=this.createFontStyle(C),$=Q[0],ae=Q[1],me=Q[2],this.ctx.font=$,this.ctx.direction=C.direction===1?"rtl":"ltr",this.ctx.textAlign="left",this.ctx.textBaseline="alphabetic",ge=this.fontMetrics.getMetrics(ae,me),Oe=ge.baseline,Ne=ge.middle,ze=C.paintOrder,T.textBounds.forEach(function(ut){ze.forEach(function(pt){switch(pt){case 0:Ye.ctx.fillStyle=Qr(C.color),Ye.renderTextWithLetterSpacing(ut,C.letterSpacing,Oe);var Nt=C.textShadow;Nt.length&&ut.text.trim().length&&(Nt.slice(0).reverse().forEach(function(yt){Ye.ctx.shadowColor=Qr(yt.color),Ye.ctx.shadowOffsetX=yt.offsetX.number*Ye.options.scale,Ye.ctx.shadowOffsetY=yt.offsetY.number*Ye.options.scale,Ye.ctx.shadowBlur=yt.blur.number,Ye.renderTextWithLetterSpacing(ut,C.letterSpacing,Oe)}),Ye.ctx.shadowColor="",Ye.ctx.shadowOffsetX=0,Ye.ctx.shadowOffsetY=0,Ye.ctx.shadowBlur=0),C.textDecorationLine.length&&(Ye.ctx.fillStyle=Qr(C.textDecorationColor||C.color),C.textDecorationLine.forEach(function(yt){switch(yt){case 1:Ye.ctx.fillRect(ut.bounds.left,Math.round(ut.bounds.top+Oe),ut.bounds.width,1);break;case 2:Ye.ctx.fillRect(ut.bounds.left,Math.round(ut.bounds.top),ut.bounds.width,1);break;case 3:Ye.ctx.fillRect(ut.bounds.left,Math.ceil(ut.bounds.top+Ne),ut.bounds.width,1);break}}));break;case 1:C.webkitTextStrokeWidth&&ut.text.trim().length&&(Ye.ctx.strokeStyle=Qr(C.webkitTextStrokeColor),Ye.ctx.lineWidth=C.webkitTextStrokeWidth,Ye.ctx.lineJoin=window.chrome?"miter":"round",Ye.ctx.strokeText(ut.text,ut.bounds.left,ut.bounds.top+Oe)),Ye.ctx.strokeStyle="",Ye.ctx.lineWidth=0,Ye.ctx.lineJoin="miter";break}})}),[2]})})},h.prototype.renderReplacedElement=function(T,C,Q){if(Q&&T.intrinsicWidth>0&&T.intrinsicHeight>0){var $=Wi(T),ae=Qi(C);this.path(ae),this.ctx.save(),this.ctx.clip(),this.ctx.drawImage(Q,0,0,T.intrinsicWidth,T.intrinsicHeight,$.left,$.top,$.width,$.height),this.ctx.restore()}},h.prototype.renderNodeContent=function(T){return G(this,void 0,void 0,function(){var C,Q,$,ae,me,ge,Oe,Oe,Ne,ze,Ye,_t,ut,pt,Nt,yt,Ct,sr,qt,Oe,lr,ut,yt;return D(this,function(bt){switch(bt.label){case 0:this.applyEffects(T.getEffects(4)),C=T.container,Q=T.curves,$=C.styles,ae=0,me=C.textNodes,bt.label=1;case 1:return ae<me.length?(ge=me[ae],[4,this.renderTextNode(ge,$)]):[3,4];case 2:bt.sent(),bt.label=3;case 3:return ae++,[3,1];case 4:if(!(C instanceof fs))return[3,8];bt.label=5;case 5:return bt.trys.push([5,7,,8]),[4,this.context.cache.match(C.src)];case 6:return Oe=bt.sent(),this.renderReplacedElement(C,Q,Oe),[3,8];case 7:return bt.sent(),this.context.logger.error("Error loading image "+C.src),[3,8];case 8:if(C instanceof ps&&this.renderReplacedElement(C,Q,C.canvas),!(C instanceof gs))return[3,12];bt.label=9;case 9:return bt.trys.push([9,11,,12]),[4,this.context.cache.match(C.svg)];case 10:return Oe=bt.sent(),this.renderReplacedElement(C,Q,Oe),[3,12];case 11:return bt.sent(),this.context.logger.error("Error loading svg "+C.svg.substring(0,255)),[3,12];case 12:return C instanceof _s&&C.tree?(Ne=new h(this.context,{scale:this.options.scale,backgroundColor:C.backgroundColor,x:0,y:0,width:C.width,height:C.height}),[4,Ne.render(C.tree)]):[3,14];case 13:ze=bt.sent(),C.width&&C.height&&this.ctx.drawImage(ze,0,0,C.width,C.height,C.bounds.left,C.bounds.top,C.bounds.width,C.bounds.height),bt.label=14;case 14:if(C instanceof da&&(Ye=Math.min(C.bounds.width,C.bounds.height),C.type===Ui?C.checked&&(this.ctx.save(),this.path([new vt(C.bounds.left+Ye*.39363,C.bounds.top+Ye*.79),new vt(C.bounds.left+Ye*.16,C.bounds.top+Ye*.5549),new vt(C.bounds.left+Ye*.27347,C.bounds.top+Ye*.44071),new vt(C.bounds.left+Ye*.39694,C.bounds.top+Ye*.5649),new vt(C.bounds.left+Ye*.72983,C.bounds.top+Ye*.23),new vt(C.bounds.left+Ye*.84,C.bounds.top+Ye*.34085),new vt(C.bounds.left+Ye*.39363,C.bounds.top+Ye*.79)]),this.ctx.fillStyle=Qr(vs),this.ctx.fill(),this.ctx.restore()):C.type===Di&&(C.checked&&(this.ctx.save(),this.ctx.beginPath(),this.ctx.arc(C.bounds.left+Ye/2,C.bounds.top+Ye/2,Ye/4,0,Math.PI*2,!0),this.ctx.fillStyle=Qr(vs),this.ctx.fill(),this.ctx.restore()))),Tu(C)&&C.value.length){_t=this.createFontStyle($),ut=_t[0],pt=_t[1],Nt=this.fontMetrics.getMetrics(ut,pt).baseline,this.ctx.font=ut,this.ctx.fillStyle=Qr($.color),this.ctx.textBaseline="alphabetic",this.ctx.textAlign=xu(C.styles.textAlign),yt=Wi(C),Ct=0;switch(C.styles.textAlign){case 1:Ct+=yt.width/2;break;case 2:Ct+=yt.width;break}sr=yt.add(Ct,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(C.value,sr),$.letterSpacing,Nt),this.ctx.restore(),this.ctx.textBaseline="alphabetic",this.ctx.textAlign="left"}if(!Mr(C.styles.display,2048))return[3,20];if(!(C.styles.listStyleImage!==null))return[3,19];if(qt=C.styles.listStyleImage,!(qt.type===0))return[3,18];Oe=void 0,lr=qt.url,bt.label=15;case 15:return bt.trys.push([15,17,,18]),[4,this.context.cache.match(lr)];case 16:return Oe=bt.sent(),this.ctx.drawImage(Oe,C.bounds.left-(Oe.width+10),C.bounds.top),[3,18];case 17:return bt.sent(),this.context.logger.error("Error loading list-style-image "+lr),[3,18];case 18:return[3,20];case 19:T.listValue&&C.styles.listStyleType!==-1&&(ut=this.createFontStyle($)[0],this.ctx.font=ut,this.ctx.fillStyle=Qr($.color),this.ctx.textBaseline="middle",this.ctx.textAlign="right",yt=new z(C.bounds.left,C.bounds.top+_r(C.styles.paddingTop,C.bounds.width),C.bounds.width,Ya($.lineHeight,$.fontSize.number)/2+1),this.renderTextWithLetterSpacing(new pi(T.listValue,yt),$.letterSpacing,Ya($.lineHeight,$.fontSize.number)/2+2),this.ctx.textBaseline="bottom",this.ctx.textAlign="left"),bt.label=20;case 20:return[2]}})})},h.prototype.renderStackContent=function(T){return G(this,void 0,void 0,function(){var C,Q,$,ae,me,$,ge,Oe,$,Ne,ze,$,Ye,_t,$,ut,pt,$,Nt,yt,$;return D(this,function(Ct){switch(Ct.label){case 0:if(Mr(T.element.container.flags,16))debugger;return[4,this.renderNodeBackgroundAndBorders(T.element)];case 1:Ct.sent(),C=0,Q=T.negativeZIndex,Ct.label=2;case 2:return C<Q.length?($=Q[C],[4,this.renderStack($)]):[3,5];case 3:Ct.sent(),Ct.label=4;case 4:return C++,[3,2];case 5:return[4,this.renderNodeContent(T.element)];case 6:Ct.sent(),ae=0,me=T.nonInlineLevel,Ct.label=7;case 7:return ae<me.length?($=me[ae],[4,this.renderNode($)]):[3,10];case 8:Ct.sent(),Ct.label=9;case 9:return ae++,[3,7];case 10:ge=0,Oe=T.nonPositionedFloats,Ct.label=11;case 11:return ge<Oe.length?($=Oe[ge],[4,this.renderStack($)]):[3,14];case 12:Ct.sent(),Ct.label=13;case 13:return ge++,[3,11];case 14:Ne=0,ze=T.nonPositionedInlineLevel,Ct.label=15;case 15:return Ne<ze.length?($=ze[Ne],[4,this.renderStack($)]):[3,18];case 16:Ct.sent(),Ct.label=17;case 17:return Ne++,[3,15];case 18:Ye=0,_t=T.inlineLevel,Ct.label=19;case 19:return Ye<_t.length?($=_t[Ye],[4,this.renderNode($)]):[3,22];case 20:Ct.sent(),Ct.label=21;case 21:return Ye++,[3,19];case 22:ut=0,pt=T.zeroOrAutoZIndexOrTransformedOrOpacity,Ct.label=23;case 23:return ut<pt.length?($=pt[ut],[4,this.renderStack($)]):[3,26];case 24:Ct.sent(),Ct.label=25;case 25:return ut++,[3,23];case 26:Nt=0,yt=T.positiveZIndex,Ct.label=27;case 27:return Nt<yt.length?($=yt[Nt],[4,this.renderStack($)]):[3,30];case 28:Ct.sent(),Ct.label=29;case 29:return Nt++,[3,27];case 30:return[2]}})})},h.prototype.mask=function(T){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(T.slice(0).reverse()),this.ctx.closePath()},h.prototype.path=function(T){this.ctx.beginPath(),this.formatPath(T),this.ctx.closePath()},h.prototype.formatPath=function(T){var C=this;T.forEach(function(Q,$){var ae=pn(Q)?Q.start:Q;$===0?C.ctx.moveTo(ae.x,ae.y):C.ctx.lineTo(ae.x,ae.y),pn(Q)&&C.ctx.bezierCurveTo(Q.startControl.x,Q.startControl.y,Q.endControl.x,Q.endControl.y,Q.end.x,Q.end.y)})},h.prototype.renderRepeat=function(T,C,Q,$){this.path(T),this.ctx.fillStyle=C,this.ctx.translate(Q,$),this.ctx.fill(),this.ctx.translate(-Q,-$)},h.prototype.resizeImage=function(T,C,Q){var $;if(T.width===C&&T.height===Q)return T;var ae=($=this.canvas.ownerDocument)!==null&&$!==void 0?$:document,me=ae.createElement("canvas");me.width=Math.max(1,C),me.height=Math.max(1,Q);var ge=me.getContext("2d");return ge.drawImage(T,0,0,T.width,T.height,0,0,C,Q),me},h.prototype.renderBackgroundImage=function(T){return G(this,void 0,void 0,function(){var C,Q,$,ae,me,ge;return D(this,function(Oe){switch(Oe.label){case 0:C=T.styles.backgroundImage.length-1,Q=function(Ne){var ze,Ye,_t,ut,pt,Nt,yt,Ct,sr,qt,ut,pt,Nt,yt,Ct,lr,bt,Ar,ur,Zt,ln,rn,hn,Kr,sr,xn,ut,jn,Wn,yt,Ct,Gn,pt,Nt,Yn,Sn,Vn,Jn,$n,Un,Zn,Dn;return D(this,function(Ai){switch(Ai.label){case 0:if(!(Ne.type===0))return[3,5];ze=void 0,Ye=Ne.url,Ai.label=1;case 1:return Ai.trys.push([1,3,,4]),[4,$.context.cache.match(Ye)];case 2:return ze=Ai.sent(),[3,4];case 3:return Ai.sent(),$.context.logger.error("Error loading background-image "+Ye),[3,4];case 4:return ze&&(_t=Ca(T,C,[ze.width,ze.height,ze.width/ze.height]),ut=_t[0],pt=_t[1],Nt=_t[2],yt=_t[3],Ct=_t[4],sr=$.ctx.createPattern($.resizeImage(ze,yt,Ct),"repeat"),$.renderRepeat(ut,sr,pt,Nt)),[3,6];case 5:lo(Ne)?(qt=Ca(T,C,[null,null,null]),ut=qt[0],pt=qt[1],Nt=qt[2],yt=qt[3],Ct=qt[4],lr=io(Ne.angle,yt,Ct),bt=lr[0],Ar=lr[1],ur=lr[2],Zt=lr[3],ln=lr[4],rn=document.createElement("canvas"),rn.width=yt,rn.height=Ct,hn=rn.getContext("2d"),Kr=hn.createLinearGradient(Ar,Zt,ur,ln),Ma(Ne.stops,bt).forEach(function(yi){return Kr.addColorStop(yi.stop,Qr(yi.color))}),hn.fillStyle=Kr,hn.fillRect(0,0,yt,Ct),yt>0&&Ct>0&&(sr=$.ctx.createPattern(rn,"repeat"),$.renderRepeat(ut,sr,pt,Nt))):uo(Ne)&&(xn=Ca(T,C,[null,null,null]),ut=xn[0],jn=xn[1],Wn=xn[2],yt=xn[3],Ct=xn[4],Gn=Ne.position.length===0?[Ji]:Ne.position,pt=_r(Gn[0],yt),Nt=_r(Gn[Gn.length-1],Ct),Yn=ao(Ne,pt,Nt,yt,Ct),Sn=Yn[0],Vn=Yn[1],Sn>0&&Vn>0&&(Jn=$.ctx.createRadialGradient(jn+pt,Wn+Nt,0,jn+pt,Wn+Nt,Sn),Ma(Ne.stops,Sn*2).forEach(function(yi){return Jn.addColorStop(yi.stop,Qr(yi.color))}),$.path(ut),$.ctx.fillStyle=Jn,Sn!==Vn?($n=T.bounds.left+.5*T.bounds.width,Un=T.bounds.top+.5*T.bounds.height,Zn=Vn/Sn,Dn=1/Zn,$.ctx.save(),$.ctx.translate($n,Un),$.ctx.transform(1,0,0,Zn,0,0),$.ctx.translate(-$n,-Un),$.ctx.fillRect(jn,Dn*(Wn-Un)+Un,yt,Ct*Dn),$.ctx.restore()):$.ctx.fill())),Ai.label=6;case 6:return C--,[2]}})},$=this,ae=0,me=T.styles.backgroundImage.slice(0).reverse(),Oe.label=1;case 1:return ae<me.length?(ge=me[ae],[5,Q(ge)]):[3,4];case 2:Oe.sent(),Oe.label=3;case 3:return ae++,[3,1];case 4:return[2]}})})},h.prototype.renderSolidBorder=function(T,C,Q){return G(this,void 0,void 0,function(){return D(this,function($){return this.path(zs(Q,C)),this.ctx.fillStyle=Qr(T),this.ctx.fill(),[2]})})},h.prototype.renderDoubleBorder=function(T,C,Q,$){return G(this,void 0,void 0,function(){var ae,me;return D(this,function(ge){switch(ge.label){case 0:return C<3?[4,this.renderSolidBorder(T,Q,$)]:[3,2];case 1:return ge.sent(),[2];case 2:return ae=fu($,Q),this.path(ae),this.ctx.fillStyle=Qr(T),this.ctx.fill(),me=pu($,Q),this.path(me),this.ctx.fill(),[2]}})})},h.prototype.renderNodeBackgroundAndBorders=function(T){return G(this,void 0,void 0,function(){var C,Q,$,ae,me,ge,Oe,Ne,ze=this;return D(this,function(Ye){switch(Ye.label){case 0:return this.applyEffects(T.getEffects(2)),C=T.container.styles,Q=!kn(C.backgroundColor)||C.backgroundImage.length,$=[{style:C.borderTopStyle,color:C.borderTopColor,width:C.borderTopWidth},{style:C.borderRightStyle,color:C.borderRightColor,width:C.borderRightWidth},{style:C.borderBottomStyle,color:C.borderBottomColor,width:C.borderBottomWidth},{style:C.borderLeftStyle,color:C.borderLeftColor,width:C.borderLeftWidth}],ae=Bu(oi(C.backgroundClip,0),T.curves),Q||C.boxShadow.length?(this.ctx.save(),this.path(ae),this.ctx.clip(),kn(C.backgroundColor)||(this.ctx.fillStyle=Qr(C.backgroundColor),this.ctx.fill()),[4,this.renderBackgroundImage(T.container)]):[3,2];case 1:Ye.sent(),this.ctx.restore(),C.boxShadow.slice(0).reverse().forEach(function(_t){ze.ctx.save();var ut=Hi(T.curves),pt=_t.inset?0:wu,Nt=hu(ut,-pt+(_t.inset?1:-1)*_t.spread.number,(_t.inset?1:-1)*_t.spread.number,_t.spread.number*(_t.inset?-2:2),_t.spread.number*(_t.inset?-2:2));_t.inset?(ze.path(ut),ze.ctx.clip(),ze.mask(Nt)):(ze.mask(ut),ze.ctx.clip(),ze.path(Nt)),ze.ctx.shadowOffsetX=_t.offsetX.number+pt,ze.ctx.shadowOffsetY=_t.offsetY.number,ze.ctx.shadowColor=Qr(_t.color),ze.ctx.shadowBlur=_t.blur.number,ze.ctx.fillStyle=_t.inset?Qr(_t.color):"rgba(0,0,0,1)",ze.ctx.fill(),ze.ctx.restore()}),Ye.label=2;case 2:me=0,ge=0,Oe=$,Ye.label=3;case 3:return ge<Oe.length?(Ne=Oe[ge],Ne.style!==0&&!kn(Ne.color)&&Ne.width>0?Ne.style===2?[4,this.renderDashedDottedBorder(Ne.color,Ne.width,me,T.curves,2)]:[3,5]:[3,11]):[3,13];case 4:return Ye.sent(),[3,11];case 5:return Ne.style===3?[4,this.renderDashedDottedBorder(Ne.color,Ne.width,me,T.curves,3)]:[3,7];case 6:return Ye.sent(),[3,11];case 7:return Ne.style===4?[4,this.renderDoubleBorder(Ne.color,Ne.width,me,T.curves)]:[3,9];case 8:return Ye.sent(),[3,11];case 9:return[4,this.renderSolidBorder(Ne.color,me,T.curves)];case 10:Ye.sent(),Ye.label=11;case 11:me++,Ye.label=12;case 12:return ge++,[3,3];case 13:return[2]}})})},h.prototype.renderDashedDottedBorder=function(T,C,Q,$,ae){return G(this,void 0,void 0,function(){var me,ge,Oe,Ne,ze,Ye,_t,ut,pt,Nt,yt,Ct,sr,qt,lr,bt,lr,bt;return D(this,function(Ar){return this.ctx.save(),me=gu($,Q),ge=zs($,Q),ae===2&&(this.path(ge),this.ctx.clip()),pn(ge[0])?(Oe=ge[0].start.x,Ne=ge[0].start.y):(Oe=ge[0].x,Ne=ge[0].y),pn(ge[1])?(ze=ge[1].end.x,Ye=ge[1].end.y):(ze=ge[1].x,Ye=ge[1].y),Q===0||Q===2?_t=Math.abs(Oe-ze):_t=Math.abs(Ne-Ye),this.ctx.beginPath(),ae===3?this.formatPath(me):this.formatPath(ge.slice(0,2)),ut=C<3?C*3:C*2,pt=C<3?C*2:C,ae===3&&(ut=C,pt=C),Nt=!0,_t<=ut*2?Nt=!1:_t<=ut*2+pt?(yt=_t/(2*ut+pt),ut*=yt,pt*=yt):(Ct=Math.floor((_t+pt)/(ut+pt)),sr=(_t-Ct*ut)/(Ct-1),qt=(_t-(Ct+1)*ut)/Ct,pt=qt<=0||Math.abs(pt-sr)<Math.abs(pt-qt)?sr:qt),Nt&&(ae===3?this.ctx.setLineDash([0,ut+pt]):this.ctx.setLineDash([ut,pt])),ae===3?(this.ctx.lineCap="round",this.ctx.lineWidth=C):this.ctx.lineWidth=C*2+1.1,this.ctx.strokeStyle=Qr(T),this.ctx.stroke(),this.ctx.setLineDash([]),ae===2&&(pn(ge[0])&&(lr=ge[3],bt=ge[0],this.ctx.beginPath(),this.formatPath([new vt(lr.end.x,lr.end.y),new vt(bt.start.x,bt.start.y)]),this.ctx.stroke()),pn(ge[1])&&(lr=ge[1],bt=ge[2],this.ctx.beginPath(),this.formatPath([new vt(lr.end.x,lr.end.y),new vt(bt.start.x,bt.start.y)]),this.ctx.stroke())),this.ctx.restore(),[2]})})},h.prototype.render=function(T){return G(this,void 0,void 0,function(){var C;return D(this,function(Q){switch(Q.label){case 0:return this.options.backgroundColor&&(this.ctx.fillStyle=Qr(this.options.backgroundColor),this.ctx.fillRect(this.options.x,this.options.y,this.options.width,this.options.height)),C=du(T),[4,this.renderStack(C)];case 1:return Q.sent(),this.applyEffects([]),[2,this.canvas]}})})},h}(Js),Tu=function(E){return E instanceof Es||E instanceof ys?!0:E instanceof da&&E.type!==Di&&E.type!==Ui},Bu=function(E,h){switch(E){case 0:return Hi(h);case 2:return ou(h);case 1:default:return Qi(h)}},xu=function(E){switch(E){case 1:return"center";case 2:return"right";case 0:default:return"left"}},Su=["-apple-system","system-ui"],Iu=function(E){return/iPhone OS 15_(0|1)/.test(window.navigator.userAgent)?E.filter(function(h){return Su.indexOf(h)===-1}):E},Ru=function(E){X(h,E);function h(T,C){var Q=E.call(this,T,C)||this;return Q.canvas=C.canvas?C.canvas:document.createElement("canvas"),Q.ctx=Q.canvas.getContext("2d"),Q.options=C,Q.canvas.width=Math.floor(C.width*C.scale),Q.canvas.height=Math.floor(C.height*C.scale),Q.canvas.style.width=C.width+"px",Q.canvas.style.height=C.height+"px",Q.ctx.scale(Q.options.scale,Q.options.scale),Q.ctx.translate(-C.x,-C.y),Q.context.logger.debug("EXPERIMENTAL ForeignObject renderer initialized ("+C.width+"x"+C.height+" at "+C.x+","+C.y+") with scale "+C.scale),Q}return h.prototype.render=function(T){return G(this,void 0,void 0,function(){var C,Q;return D(this,function($){switch($.label){case 0:return C=ua(this.options.width*this.options.scale,this.options.height*this.options.scale,this.options.scale,this.options.scale,T),[4,Ou(C)];case 1:return Q=$.sent(),this.options.backgroundColor&&(this.ctx.fillStyle=Qr(this.options.backgroundColor),this.ctx.fillRect(0,0,this.options.width*this.options.scale,this.options.height*this.options.scale)),this.ctx.drawImage(Q,-this.options.x*this.options.scale,-this.options.y*this.options.scale),[2,this.canvas]}})})},h}(Js),Ou=function(E){return new Promise(function(h,T){var C=new Image;C.onload=function(){h(C)},C.onerror=T,C.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(new XMLSerializer().serializeToString(E))})},Lu=function(){function E(h){var T=h.id,C=h.enabled;this.id=T,this.enabled=C,this.start=Date.now()}return E.prototype.debug=function(){for(var h=[],T=0;T<arguments.length;T++)h[T]=arguments[T];this.enabled&&(typeof window!="undefined"&&window.console&&typeof console.debug=="function"?console.debug.apply(console,S([this.id,this.getTime()+"ms"],h)):this.info.apply(this,h))},E.prototype.getTime=function(){return Date.now()-this.start},E.prototype.info=function(){for(var h=[],T=0;T<arguments.length;T++)h[T]=arguments[T];this.enabled&&(typeof window!="undefined"&&window.console&&typeof console.info=="function"&&console.info.apply(console,S([this.id,this.getTime()+"ms"],h)))},E.prototype.warn=function(){for(var h=[],T=0;T<arguments.length;T++)h[T]=arguments[T];this.enabled&&(typeof window!="undefined"&&window.console&&typeof console.warn=="function"?console.warn.apply(console,S([this.id,this.getTime()+"ms"],h)):this.info.apply(this,h))},E.prototype.error=function(){for(var h=[],T=0;T<arguments.length;T++)h[T]=arguments[T];this.enabled&&(typeof window!="undefined"&&window.console&&typeof console.error=="function"?console.error.apply(console,S([this.id,this.getTime()+"ms"],h)):this.info.apply(this,h))},E.instances={},E}(),Uu=function(){function E(h,T){var C;this.windowBounds=T,this.instanceName="#"+E.instanceCount++,this.logger=new Lu({id:this.instanceName,enabled:h.logging}),this.cache=(C=h.cache)!==null&&C!==void 0?C:new ql(this,h)}return E.instanceCount=1,E}(),Du=function(E,h){return h===void 0&&(h={}),Fu(E,h)};typeof window!="undefined"&&Qs.setContext(window);var Fu=function(E,h){return G(void 0,void 0,void 0,function(){var T,C,Q,$,ae,me,ge,Oe,Ne,ze,Ye,_t,ut,pt,Nt,yt,Ct,sr,qt,lr,bt,Ar,bt,ur,Zt,ln,rn,hn,Kr,xn,jn,Wn,Gn,Yn,Sn,Vn,Jn,$n,Un,Zn;return D(this,function(Dn){switch(Dn.label){case 0:if(!E||typeof E!="object")return[2,Promise.reject("Invalid element provided as first argument")];if(T=E.ownerDocument,!T)throw new Error("Element is not attached to a Document");if(C=T.defaultView,!C)throw new Error("Document is not attached to a Window");return Q={allowTaint:(ur=h.allowTaint)!==null&&ur!==void 0?ur:!1,imageTimeout:(Zt=h.imageTimeout)!==null&&Zt!==void 0?Zt:15e3,proxy:h.proxy,useCORS:(ln=h.useCORS)!==null&&ln!==void 0?ln:!1},$=O({logging:(rn=h.logging)!==null&&rn!==void 0?rn:!0,cache:h.cache},Q),ae={windowWidth:(hn=h.windowWidth)!==null&&hn!==void 0?hn:C.innerWidth,windowHeight:(Kr=h.windowHeight)!==null&&Kr!==void 0?Kr:C.innerHeight,scrollX:(xn=h.scrollX)!==null&&xn!==void 0?xn:C.pageXOffset,scrollY:(jn=h.scrollY)!==null&&jn!==void 0?jn:C.pageYOffset},me=new z(ae.scrollX,ae.scrollY,ae.windowWidth,ae.windowHeight),ge=new Uu($,me),Oe=(Wn=h.foreignObjectRendering)!==null&&Wn!==void 0?Wn:!1,Ne={allowTaint:(Gn=h.allowTaint)!==null&&Gn!==void 0?Gn:!1,onclone:h.onclone,ignoreElements:h.ignoreElements,inlineImages:Oe,copyStyles:Oe},ge.logger.debug("Starting document clone with size "+me.width+"x"+me.height+" scrolled to "+-me.left+","+-me.top),ze=new ks(ge,E,Ne),Ye=ze.clonedReferenceElement,Ye?[4,ze.toIFrame(T,me)]:[2,Promise.reject("Unable to find element in cloned iframe")];case 1:return _t=Dn.sent(),ut=pa(Ye)||Pl(Ye)?U(Ye.ownerDocument):F(ge,Ye),pt=ut.width,Nt=ut.height,yt=ut.left,Ct=ut.top,sr=Pu(ge,Ye,h.backgroundColor),qt={canvas:h.canvas,backgroundColor:sr,scale:(Sn=(Yn=h.scale)!==null&&Yn!==void 0?Yn:C.devicePixelRatio)!==null&&Sn!==void 0?Sn:1,x:((Vn=h.x)!==null&&Vn!==void 0?Vn:0)+yt,y:((Jn=h.y)!==null&&Jn!==void 0?Jn:0)+Ct,width:($n=h.width)!==null&&$n!==void 0?$n:Math.ceil(pt),height:(Un=h.height)!==null&&Un!==void 0?Un:Math.ceil(Nt)},Oe?(ge.logger.debug("Document cloned, using foreign object rendering"),bt=new Ru(ge,qt),[4,bt.render(Ye)]):[3,3];case 2:return lr=Dn.sent(),[3,5];case 3:return ge.logger.debug("Document cloned, element located at "+yt+","+Ct+" with size "+pt+"x"+Nt+" using computed rendering"),ge.logger.debug("Starting DOM parsing"),Ar=ws(ge,Ye),sr===Ar.styles.backgroundColor&&(Ar.styles.backgroundColor=On.TRANSPARENT),ge.logger.debug("Starting renderer for element at "+qt.x+","+qt.y+" with size "+qt.width+"x"+qt.height),bt=new Cu(ge,qt),[4,bt.render(Ar)];case 4:lr=Dn.sent(),Dn.label=5;case 5:return((Zn=h.removeContainer)!==null&&Zn!==void 0?Zn:!0)&&(ks.destroy(_t)||ge.logger.error("Cannot detach cloned iframe as it is not in the DOM anymore")),ge.logger.debug("Finished rendering"),[2,lr]}})})},Pu=function(E,h,T){var C=h.ownerDocument,Q=C.documentElement?hi(E,getComputedStyle(C.documentElement).backgroundColor):On.TRANSPARENT,$=C.body?hi(E,getComputedStyle(C.body).backgroundColor):On.TRANSPARENT,ae=typeof T=="string"?hi(E,T):T===null?On.TRANSPARENT:4294967295;return h===C.documentElement?kn(Q)?kn($)?ae:$:Q:ae};return Du})},wRmb:function(mt,Ze,Z){"use strict";Z.d(Ze,"a",function(){return I});var ve=Z("rePB"),X=Z("KQm4"),O=Z("VTBJ"),G=Z("Ff2n"),D=Z("q1tI"),S=Z.n(D),z=Z("Kwbf"),F=Z("Zm9Q"),U=Z("hW8S");function I(n){return Object(F.a)(n).filter(function(s){return D.isValidElement(s)}).map(function(s){var i=s.key,t=s.props,r=t.children,A=Object(G.a)(t,["children"]),B=Object(O.a)({key:i},A);return r&&(B.children=I(r)),B})}function v(n){return n.reduce(function(s,i){var t=i.fixed,r=t===!0?"left":t,A=i.children;return A&&A.length>0?[].concat(Object(X.a)(s),Object(X.a)(v(A).map(function(B){return Object(O.a)({fixed:r},B)}))):[].concat(Object(X.a)(s),[Object(O.a)(Object(O.a)({},i),{},{fixed:r})])},[])}function b(n){for(var s=!0,i=0;i<n.length;i+=1){var t=n[i];if(s&&t.fixed!=="left")s=!1;else if(!s&&t.fixed==="left"){Object(z.a)(!1,"Index ".concat(i-1," of `columns` missing `fixed='left'` prop."));break}}for(var r=!0,A=n.length-1;A>=0;A-=1){var B=n[A];if(r&&B.fixed!=="right")r=!1;else if(!r&&B.fixed==="right"){Object(z.a)(!1,"Index ".concat(A+1," of `columns` missing `fixed='right'` prop."));break}}}function u(n){return n.map(function(s){var i=s.fixed,t=Object(G.a)(s,["fixed"]),r=i;return i==="left"?r="right":i==="right"&&(r="left"),Object(O.a)({fixed:r},t)})}function a(n,s){var i=n.prefixCls,t=n.columns,r=n.children,A=n.expandable,B=n.expandedKeys,w=n.getRowKey,_=n.onTriggerExpand,x=n.expandIcon,m=n.rowExpandable,c=n.expandIconColumnIndex,e=n.direction,o=n.expandRowByClick,l=D.useMemo(function(){return t||I(r)},[t,r]),y=D.useMemo(function(){if(A){var R,L=c||0,H=l[L],j=(R={},Object(ve.a)(R,U.a,{className:"".concat(i,"-expand-icon-col")}),Object(ve.a)(R,"title",""),Object(ve.a)(R,"fixed",H?H.fixed:null),Object(ve.a)(R,"className","".concat(i,"-row-expand-icon-cell")),Object(ve.a)(R,"render",function(Y,te,de){var fe=w(te,de),Le=B.has(fe),xe=m?m(te):!0,Ie=x({prefixCls:i,expanded:Le,expandable:xe,record:te,onExpand:_});return o?D.createElement("span",{onClick:function(Ue){return Ue.stopPropagation()}},Ie):Ie}),R),J=l.slice();return L>=0&&J.splice(L,0,j),J}return l},[A,l,w,B,x,e]),p=D.useMemo(function(){var R=y;return s&&(R=s(R)),R.length||(R=[{render:function(){return null}}]),R},[s,y,e]),f=D.useMemo(function(){return e==="rtl"?u(v(p)):v(p)},[p,e]);return[p,f]}Ze.b=a},"y0+3":function(mt,Ze,Z){"use strict";Z.d(Ze,"a",function(){return v}),Z.d(Ze,"b",function(){return u});var ve=/margin|padding|width|height|max|min|offset/,X={left:!0,top:!0},O={cssFloat:1,styleFloat:1,float:1};function G(a){return a.nodeType===1?a.ownerDocument.defaultView.getComputedStyle(a,null):{}}function D(a,n,s){if(n=n.toLowerCase(),s==="auto"){if(n==="height")return a.offsetHeight;if(n==="width")return a.offsetWidth}return n in X||(X[n]=ve.test(n)),X[n]?parseFloat(s)||0:s}function S(a,n){var s=arguments.length,i=G(a);return n=O[n]?"cssFloat"in a.style?"cssFloat":"styleFloat":n,s===1?i:D(a,n,i[n]||a.style[n])}function z(a,n,s){var i=arguments.length;if(n=O[n]?"cssFloat"in a.style?"cssFloat":"styleFloat":n,i===3)return typeof s=="number"&&ve.test(n)&&(s="".concat(s,"px")),a.style[n]=s,s;for(var t in n)n.hasOwnProperty(t)&&z(a,t,n[t]);return G(a)}function F(a){return a===document.body?document.documentElement.clientWidth:a.offsetWidth}function U(a){return a===document.body?window.innerHeight||document.documentElement.clientHeight:a.offsetHeight}function I(){var a=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth),n=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight);return{width:a,height:n}}function v(){var a=document.documentElement.clientWidth,n=window.innerHeight||document.documentElement.clientHeight;return{width:a,height:n}}function b(){return{scrollLeft:Math.max(document.documentElement.scrollLeft,document.body.scrollLeft),scrollTop:Math.max(document.documentElement.scrollTop,document.body.scrollTop)}}function u(a){var n=a.getBoundingClientRect(),s=document.documentElement;return{left:n.left+(window.pageXOffset||s.scrollLeft)-(s.clientLeft||document.body.clientLeft||0),top:n.top+(window.pageYOffset||s.scrollTop)-(s.clientTop||document.body.clientTop||0)}}}}]);