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.
497 lines
1.3 MiB
497 lines
1.3 MiB
(window.webpackJsonp=window.webpackJsonp||[]).push([[200,5,7,8,16,18],{"+M/w":function(wt,Be,G){wt.exports={flexRow:"flexRow___1Kwk7",flexColumn:"flexColumn___1x58l",action:"action___osaCD",setScore:"setScore___kmMlR",delete:"delete___XpFlx",content:"content___9Naj3",titleWrap:"titleWrap___32PZL",titleNumber:"titleNumber___3HPb0",score:"score___3zGYh",titleHtml:"titleHtml___2vgPo",answerWrap:"answerWrap___2vM8f",answer:"answer___1Q0Tc",answerText:"answerText___5UVSF"}},"+ua5":function(wt,Be,G){},"/cxE":function(wt,Be,G){"use strict";G.d(Be,"f",function(){return U}),G.d(Be,"g",function(){return V}),G.d(Be,"h",function(){return N}),G.d(Be,"e",function(){return $}),G.d(Be,"b",function(){return H}),G.d(Be,"c",function(){return e}),G.d(Be,"d",function(){return R}),G.d(Be,"a",function(){return u});class Ae{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(f){setTimeout(()=>{throw f.stack?new Error(f.message+`
|
|
|
|
`+f.stack):f},0)}}emit(f){this.listeners.forEach(l=>{l(f)})}onUnexpectedError(f){this.unexpectedErrorHandler(f),this.emit(f)}onUnexpectedExternalError(f){this.unexpectedErrorHandler(f)}}const z=new Ae;function U(f){$(f)||z.onUnexpectedError(f);return}function V(f){$(f)||z.onUnexpectedExternalError(f);return}function N(f){if(f instanceof Error){let{name:l,message:s}=f;const i=f.stacktrace||f.stack;return{$isError:!0,name:l,message:s,stack:i}}return f}const L="Canceled";function $(f){return f instanceof Error&&f.name===L&&f.message===L}function H(){const f=new Error(L);return f.name=f.message,f}function e(f){return f?new Error(`Illegal argument: ${f}`):new Error("Illegal argument")}function R(f){return f?new Error(`Illegal state: ${f}`):new Error("Illegal state")}class u extends Error{constructor(f){super("NotSupported");f&&(this.message=f)}}},"24hK":function(wt,Be,G){"use strict";G.d(Be,"a",function(){return z});class Ae{constructor(U){this.element=U,this.next=Ae.Undefined,this.prev=Ae.Undefined}}Ae.Undefined=new Ae(void 0);class z{constructor(){this._first=Ae.Undefined,this._last=Ae.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===Ae.Undefined}clear(){let U=this._first;for(;U!==Ae.Undefined;){const V=U.next;U.prev=Ae.Undefined,U.next=Ae.Undefined,U=V}this._first=Ae.Undefined,this._last=Ae.Undefined,this._size=0}unshift(U){return this._insert(U,!1)}push(U){return this._insert(U,!0)}_insert(U,V){const N=new Ae(U);if(this._first===Ae.Undefined)this._first=N,this._last=N;else if(V){const $=this._last;this._last=N,N.prev=$,$.next=N}else{const $=this._first;this._first=N,N.next=$,$.prev=N}this._size+=1;let L=!1;return()=>{L||(L=!0,this._remove(N))}}shift(){if(this._first===Ae.Undefined)return;{const U=this._first.element;return this._remove(this._first),U}}pop(){if(this._last===Ae.Undefined)return;{const U=this._last.element;return this._remove(this._last),U}}_remove(U){if(U.prev!==Ae.Undefined&&U.next!==Ae.Undefined){const V=U.prev;V.next=U.next,U.next.prev=V}else U.prev===Ae.Undefined&&U.next===Ae.Undefined?(this._first=Ae.Undefined,this._last=Ae.Undefined):U.next===Ae.Undefined?(this._last=this._last.prev,this._last.next=Ae.Undefined):U.prev===Ae.Undefined&&(this._first=this._first.next,this._first.prev=Ae.Undefined);this._size-=1}*[Symbol.iterator](){let U=this._first;for(;U!==Ae.Undefined;)yield U.element,U=U.next}}},"3/fG":function(wt,Be,G){"use strict";G.d(Be,"a",function(){return z});function Ae(U,V){let N;return V.length===0?N=U:N=U.replace(/\{(\d+)\}/g,function(L,$){const H=$[0];return typeof V[H]!="undefined"?V[H]:L}),N}function z(U,V,...N){return Ae(V,N)}},"3pxb":function(wt,Be,G){wt.exports=G.p+"static/refresh.c0b88523.png"},"49sm":function(wt,Be){var G={}.toString;wt.exports=Array.isArray||function(Ae){return G.call(Ae)=="[object Array]"}},"5VLF":function(wt,Be,G){"use strict";var Ae,z;function U(V,N,L){var $=function(H,e){return V.js_beautify(H,e)};return $.js=V.js_beautify,$.css=N.css_beautify,$.html=L.html_beautify,$.js_beautify=V.js_beautify,$.css_beautify=N.css_beautify,$.html_beautify=L.html_beautify,$}!(Ae=[G("6UM0"),G("TXwP"),G("psGv")],z=function(V,N,L){return U(V,N,L)}.apply(Be,Ae),z!==void 0&&(wt.exports=z))},"5Y4S":function(wt,Be,G){"use strict";G.d(Be,"a",function(){return U});var Ae=G("MNsG");const z=Ae.b.performance&&typeof Ae.b.performance.now=="function";class U{constructor(V){this._highResolution=z&&V,this._startTime=this._now(),this._stopTime=-1}static create(V=!0){return new U(V)}stop(){this._stopTime=this._now()}elapsed(){return this._stopTime!==-1?this._stopTime-this._startTime:this._now()-this._startTime}_now(){return this._highResolution?Ae.b.performance.now():Date.now()}}},"5jaM":function(wt,Be,G){wt.exports=G.p+"static/dui.b74348bd.svg"},"6+eU":function(wt,Be,G){"use strict";G.d(Be,"a",function(){return _});var Ae=G("wx14"),z=G("rePB"),U=G("VTBJ"),V=G("1OyB"),N=G("vuIU"),L=G("Ji7U"),$=G("LK+K"),H=G("q1tI"),e=G.n(H),R=G("TSYQ"),u=G.n(R),f=function(x){var h,d="".concat(x.rootPrefixCls,"-item"),A=u()(d,"".concat(d,"-").concat(x.page),(h={},Object(z.a)(h,"".concat(d,"-active"),x.active),Object(z.a)(h,x.className,!!x.className),Object(z.a)(h,"".concat(d,"-disabled"),!x.page),h)),c=function(){x.onClick(x.page)},w=function(g){x.onKeyPress(g,x.onClick,x.page)};return e.a.createElement("li",{title:x.showTitle?x.page:null,className:A,onClick:c,onKeyPress:w,tabIndex:"0"},x.itemRender(x.page,"page",e.a.createElement("a",{rel:"nofollow"},x.page)))},l=f,s={ZERO:48,NINE:57,NUMPAD_ZERO:96,NUMPAD_NINE:105,BACKSPACE:8,DELETE:46,ENTER:13,ARROW_UP:38,ARROW_DOWN:40},i=function(B){Object(L.a)(h,B);var x=Object($.a)(h);function h(){var d;Object(V.a)(this,h);for(var A=arguments.length,c=new Array(A),w=0;w<A;w++)c[w]=arguments[w];return d=x.call.apply(x,[this].concat(c)),d.state={goInputText:""},d.buildOptionText=function(m){return"".concat(m," ").concat(d.props.locale.items_per_page)},d.changeSize=function(m){d.props.changeSize(Number(m))},d.handleChange=function(m){d.setState({goInputText:m.target.value})},d.handleBlur=function(m){var g=d.props,F=g.goButton,k=g.quickGo,S=g.rootPrefixCls,Q=d.state.goInputText;if(F||Q==="")return;if(m.relatedTarget&&(m.relatedTarget.className.indexOf("".concat(S,"-prev"))>=0||m.relatedTarget.className.indexOf("".concat(S,"-next"))>=0))return;d.setState({goInputText:""}),k(d.getValidValue())},d.go=function(m){var g=d.state.goInputText;if(g==="")return;(m.keyCode===s.ENTER||m.type==="click")&&(d.setState({goInputText:""}),d.props.quickGo(d.getValidValue()))},d}return Object(N.a)(h,[{key:"getValidValue",value:function(){var A=this.state,c=A.goInputText,w=A.current;return!c||isNaN(c)?w:Number(c)}},{key:"getPageSizeOptions",value:function(){var A=this.props,c=A.pageSize,w=A.pageSizeOptions;return w.some(function(m){return m.toString()===c.toString()})?w:w.concat([c.toString()]).sort(function(m,g){var F=isNaN(Number(m))?0:Number(m),k=isNaN(Number(g))?0:Number(g);return F-k})}},{key:"render",value:function(){var A=this,c=this.props,w=c.pageSize,m=c.locale,g=c.rootPrefixCls,F=c.changeSize,k=c.quickGo,S=c.goButton,Q=c.selectComponentClass,X=c.buildOptionText,P=c.selectPrefixCls,q=c.disabled,ie=this.state.goInputText,be="".concat(g,"-options"),me=Q,Me=null,Ne=null,ke=null;if(!F&&!k)return null;var Ke=this.getPageSizeOptions();if(F&&me){var Ye=Ke.map(function(_e,Te){return e.a.createElement(me.Option,{key:Te,value:_e.toString()},(X||A.buildOptionText)(_e))});Me=e.a.createElement(me,{disabled:q,prefixCls:P,showSearch:!1,className:"".concat(be,"-size-changer"),optionLabelProp:"children",dropdownMatchSelectWidth:!1,value:(w||Ke[0]).toString(),onChange:this.changeSize,getPopupContainer:function(Te){return Te.parentNode}},Ye)}return k&&(S&&(ke=typeof S=="boolean"?e.a.createElement("button",{type:"button",onClick:this.go,onKeyUp:this.go,disabled:q,className:"".concat(be,"-quick-jumper-button")},m.jump_to_confirm):e.a.createElement("span",{onClick:this.go,onKeyUp:this.go},S)),Ne=e.a.createElement("div",{className:"".concat(be,"-quick-jumper")},m.jump_to,e.a.createElement("input",{disabled:q,type:"text",value:ie,onChange:this.handleChange,onKeyUp:this.go,onBlur:this.handleBlur}),m.page,ke)),e.a.createElement("li",{className:"".concat(be)},Me,Ne)}}]),h}(e.a.Component);i.defaultProps={pageSizeOptions:["10","20","50","100"]};var o=i,r=G("N2Kk");function a(){}function n(B){return typeof B=="number"&&isFinite(B)&&Math.floor(B)===B}function t(B,x,h){return h}function E(B,x,h){var d=typeof B=="undefined"?x.pageSize:B;return Math.floor((h.total-1)/d)+1}var b=function(B){Object(L.a)(h,B);var x=Object($.a)(h);function h(d){var A;Object(V.a)(this,h),A=x.call(this,d),A.getJumpPrevPage=function(){return Math.max(1,A.state.current-(A.props.showLessItems?3:5))},A.getJumpNextPage=function(){return Math.min(E(void 0,A.state,A.props),A.state.current+(A.props.showLessItems?3:5))},A.getItemIcon=function(F,k){var S=A.props.prefixCls,Q=F||e.a.createElement("button",{type:"button","aria-label":k,className:"".concat(S,"-item-link")});return typeof F=="function"&&(Q=e.a.createElement(F,Object(U.a)({},A.props))),Q},A.savePaginationNode=function(F){A.paginationNode=F},A.isValid=function(F){return n(F)&&F!==A.state.current},A.shouldDisplayQuickJumper=function(){var F=A.props,k=F.showQuickJumper,S=F.pageSize,Q=F.total;return Q<=S?!1:k},A.handleKeyDown=function(F){(F.keyCode===s.ARROW_UP||F.keyCode===s.ARROW_DOWN)&&F.preventDefault()},A.handleKeyUp=function(F){var k=A.getValidValue(F),S=A.state.currentInputValue;k!==S&&A.setState({currentInputValue:k}),F.keyCode===s.ENTER?A.handleChange(k):F.keyCode===s.ARROW_UP?A.handleChange(k-1):F.keyCode===s.ARROW_DOWN&&A.handleChange(k+1)},A.changePageSize=function(F){var k=A.state.current,S=E(F,A.state,A.props);k=k>S?S:k,S===0&&(k=A.state.current),typeof F=="number"&&("pageSize"in A.props||A.setState({pageSize:F}),"current"in A.props||A.setState({current:k,currentInputValue:k})),A.props.onShowSizeChange(k,F),"onChange"in A.props&&A.props.onChange&&A.props.onChange(k,F)},A.handleChange=function(F){var k=A.props.disabled,S=F;if(A.isValid(S)&&!k){var Q=E(void 0,A.state,A.props);S>Q?S=Q:S<1&&(S=1),"current"in A.props||A.setState({current:S,currentInputValue:S});var X=A.state.pageSize;return A.props.onChange(S,X),S}return A.state.current},A.prev=function(){A.hasPrev()&&A.handleChange(A.state.current-1)},A.next=function(){A.hasNext()&&A.handleChange(A.state.current+1)},A.jumpPrev=function(){A.handleChange(A.getJumpPrevPage())},A.jumpNext=function(){A.handleChange(A.getJumpNextPage())},A.hasPrev=function(){return A.state.current>1},A.hasNext=function(){return A.state.current<E(void 0,A.state,A.props)},A.runIfEnter=function(F,k){if(F.key==="Enter"||F.charCode===13){for(var S=arguments.length,Q=new Array(S>2?S-2:0),X=2;X<S;X++)Q[X-2]=arguments[X];k.apply(void 0,Q)}},A.runIfEnterPrev=function(F){A.runIfEnter(F,A.prev)},A.runIfEnterNext=function(F){A.runIfEnter(F,A.next)},A.runIfEnterJumpPrev=function(F){A.runIfEnter(F,A.jumpPrev)},A.runIfEnterJumpNext=function(F){A.runIfEnter(F,A.jumpNext)},A.handleGoTO=function(F){(F.keyCode===s.ENTER||F.type==="click")&&A.handleChange(A.state.currentInputValue)};var c=d.onChange!==a,w="current"in d;w&&!c&&console.warn("Warning: You provided a `current` prop to a Pagination component without an `onChange` handler. This will render a read-only component.");var m=d.defaultCurrent;"current"in d&&(m=d.current);var g=d.defaultPageSize;return"pageSize"in d&&(g=d.pageSize),m=Math.min(m,E(g,void 0,d)),A.state={current:m,currentInputValue:m,pageSize:g},A}return Object(N.a)(h,[{key:"componentDidUpdate",value:function(A,c){var w=this.props.prefixCls;if(c.current!==this.state.current&&this.paginationNode){var m=this.paginationNode.querySelector(".".concat(w,"-item-").concat(c.current));m&&document.activeElement===m&&m.blur()}}},{key:"getValidValue",value:function(A){var c=A.target.value,w=E(void 0,this.state,this.props),m=this.state.currentInputValue,g;return c===""?g=c:isNaN(Number(c))?g=m:c>=w?g=w:g=Number(c),g}},{key:"getShowSizeChanger",value:function(){var A=this.props,c=A.showSizeChanger,w=A.total,m=A.totalBoundaryShowSizeChanger;return typeof c!="undefined"?c:w>m}},{key:"renderPrev",value:function(A){var c=this.props,w=c.prevIcon,m=c.itemRender,g=m(A,"prev",this.getItemIcon(w,"prev page")),F=!this.hasPrev();return Object(H.isValidElement)(g)?Object(H.cloneElement)(g,{disabled:F}):g}},{key:"renderNext",value:function(A){var c=this.props,w=c.nextIcon,m=c.itemRender,g=m(A,"next",this.getItemIcon(w,"next page")),F=!this.hasNext();return Object(H.isValidElement)(g)?Object(H.cloneElement)(g,{disabled:F}):g}},{key:"render",value:function(){var A=this,c=this.props,w=c.prefixCls,m=c.className,g=c.style,F=c.disabled,k=c.hideOnSinglePage,S=c.total,Q=c.locale,X=c.showQuickJumper,P=c.showLessItems,q=c.showTitle,ie=c.showTotal,be=c.simple,me=c.itemRender,Me=c.showPrevNextJumpers,Ne=c.jumpPrevIcon,ke=c.jumpNextIcon,Ke=c.selectComponentClass,Ye=c.selectPrefixCls,_e=c.pageSizeOptions,Te=this.state,Pe=Te.current,bt=Te.pageSize,mt=Te.currentInputValue;if(k===!0&&S<=bt)return null;var dt=E(void 0,this.state,this.props),yt=[],le=null,Z=null,te=null,ee=null,ue=null,ye=X&&X.goButton,ve=P?1:2,Je=Pe-1>0?Pe-1:0,tt=Pe+1<dt?Pe+1:dt,it=Object.keys(this.props).reduce(function(oe,ce){return(ce.substr(0,5)==="data-"||ce.substr(0,5)==="aria-"||ce==="role")&&(oe[ce]=A.props[ce]),oe},{});if(be)return ye&&(typeof ye=="boolean"?ue=e.a.createElement("button",{type:"button",onClick:this.handleGoTO,onKeyUp:this.handleGoTO},Q.jump_to_confirm):ue=e.a.createElement("span",{onClick:this.handleGoTO,onKeyUp:this.handleGoTO},ye),ue=e.a.createElement("li",{title:q?"".concat(Q.jump_to).concat(Pe,"/").concat(dt):null,className:"".concat(w,"-simple-pager")},ue)),e.a.createElement("ul",Object(Ae.a)({className:u()(w,"".concat(w,"-simple"),Object(z.a)({},"".concat(w,"-disabled"),F),m),style:g,ref:this.savePaginationNode},it),e.a.createElement("li",{title:q?Q.prev_page:null,onClick:this.prev,tabIndex:this.hasPrev()?0:null,onKeyPress:this.runIfEnterPrev,className:u()("".concat(w,"-prev"),Object(z.a)({},"".concat(w,"-disabled"),!this.hasPrev())),"aria-disabled":!this.hasPrev()},this.renderPrev(Je)),e.a.createElement("li",{title:q?"".concat(Pe,"/").concat(dt):null,className:"".concat(w,"-simple-pager")},e.a.createElement("input",{type:"text",value:mt,disabled:F,onKeyDown:this.handleKeyDown,onKeyUp:this.handleKeyUp,onChange:this.handleKeyUp,size:"3"}),e.a.createElement("span",{className:"".concat(w,"-slash")},"/"),dt),e.a.createElement("li",{title:q?Q.next_page:null,onClick:this.next,tabIndex:this.hasPrev()?0:null,onKeyPress:this.runIfEnterNext,className:u()("".concat(w,"-next"),Object(z.a)({},"".concat(w,"-disabled"),!this.hasNext())),"aria-disabled":!this.hasNext()},this.renderNext(tt)),ue);if(dt<=3+ve*2){var st={locale:Q,rootPrefixCls:w,onClick:this.handleChange,onKeyPress:this.runIfEnter,showTitle:q,itemRender:me};dt||yt.push(e.a.createElement(l,Object(Ae.a)({},st,{key:"noPager",page:dt,className:"".concat(w,"-disabled")})));for(var ht=1;ht<=dt;ht+=1){var _t=Pe===ht;yt.push(e.a.createElement(l,Object(Ae.a)({},st,{key:ht,page:ht,active:_t})))}}else{var He=P?Q.prev_3:Q.prev_5,Xe=P?Q.next_3:Q.next_5;Me&&(le=e.a.createElement("li",{title:q?He:null,key:"prev",onClick:this.jumpPrev,tabIndex:"0",onKeyPress:this.runIfEnterJumpPrev,className:u()("".concat(w,"-jump-prev"),Object(z.a)({},"".concat(w,"-jump-prev-custom-icon"),!!Ne))},me(this.getJumpPrevPage(),"jump-prev",this.getItemIcon(Ne,"prev page"))),Z=e.a.createElement("li",{title:q?Xe:null,key:"next",tabIndex:"0",onClick:this.jumpNext,onKeyPress:this.runIfEnterJumpNext,className:u()("".concat(w,"-jump-next"),Object(z.a)({},"".concat(w,"-jump-next-custom-icon"),!!ke))},me(this.getJumpNextPage(),"jump-next",this.getItemIcon(ke,"next page")))),ee=e.a.createElement(l,{locale:Q,last:!0,rootPrefixCls:w,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:dt,page:dt,active:!1,showTitle:q,itemRender:me}),te=e.a.createElement(l,{locale:Q,rootPrefixCls:w,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:1,page:1,active:!1,showTitle:q,itemRender:me});var at=Math.max(1,Pe-ve),ut=Math.min(Pe+ve,dt);Pe-1<=ve&&(ut=1+ve*2),dt-Pe<=ve&&(at=dt-ve*2);for(var $e=at;$e<=ut;$e+=1){var qe=Pe===$e;yt.push(e.a.createElement(l,{locale:Q,rootPrefixCls:w,onClick:this.handleChange,onKeyPress:this.runIfEnter,key:$e,page:$e,active:qe,showTitle:q,itemRender:me}))}Pe-1>=ve*2&&Pe!==1+2&&(yt[0]=Object(H.cloneElement)(yt[0],{className:"".concat(w,"-item-after-jump-prev")}),yt.unshift(le)),dt-Pe>=ve*2&&Pe!==dt-2&&(yt[yt.length-1]=Object(H.cloneElement)(yt[yt.length-1],{className:"".concat(w,"-item-before-jump-next")}),yt.push(Z)),at!==1&&yt.unshift(te),ut!==dt&&yt.push(ee)}var De=null;ie&&(De=e.a.createElement("li",{className:"".concat(w,"-total-text")},ie(S,[S===0?0:(Pe-1)*bt+1,Pe*bt>S?S:Pe*bt])));var xe=!this.hasPrev()||!dt,Se=!this.hasNext()||!dt;return e.a.createElement("ul",Object(Ae.a)({className:u()(w,m,Object(z.a)({},"".concat(w,"-disabled"),F)),style:g,unselectable:"unselectable",ref:this.savePaginationNode},it),De,e.a.createElement("li",{title:q?Q.prev_page:null,onClick:this.prev,tabIndex:xe?null:0,onKeyPress:this.runIfEnterPrev,className:u()("".concat(w,"-prev"),Object(z.a)({},"".concat(w,"-disabled"),xe)),"aria-disabled":xe},this.renderPrev(Je)),yt,e.a.createElement("li",{title:q?Q.next_page:null,onClick:this.next,tabIndex:Se?null:0,onKeyPress:this.runIfEnterNext,className:u()("".concat(w,"-next"),Object(z.a)({},"".concat(w,"-disabled"),Se)),"aria-disabled":Se},this.renderNext(tt)),e.a.createElement(o,{disabled:F,locale:Q,rootPrefixCls:w,selectComponentClass:Ke,selectPrefixCls:Ye,changeSize:this.getShowSizeChanger()?this.changePageSize:null,current:Pe,pageSize:bt,pageSizeOptions:_e,quickGo:this.shouldDisplayQuickJumper()?this.handleChange:null,goButton:ye}))}}],[{key:"getDerivedStateFromProps",value:function(A,c){var w={};if("current"in A&&(w.current=A.current,A.current!==c.current&&(w.currentInputValue=w.current)),"pageSize"in A&&A.pageSize!==c.pageSize){var m=c.current,g=E(A.pageSize,c,A);m=m>g?g:m,"current"in A||(w.current=m,w.currentInputValue=m),w.pageSize=A.pageSize}return w}}]),h}(e.a.Component);b.defaultProps={defaultCurrent:1,total:0,defaultPageSize:10,onChange:a,className:"",selectPrefixCls:"rc-select",prefixCls:"rc-pagination",selectComponentClass:null,hideOnSinglePage:!1,showPrevNextJumpers:!0,showQuickJumper:!1,showLessItems:!1,showTitle:!0,onShowSizeChange:a,locale:r.a,style:{},itemRender:t,totalBoundaryShowSizeChanger:50};var _=b},"6K3P":function(wt,Be,G){wt.exports=G.p+"static/jinshi.9b74f304.svg"},"6RRn":function(wt,Be,G){"use strict";var Ae=G("wCXF"),z=G("n6Qo");G.d(Be,"b",function(){return z.a});var U=G("IBYe"),V=G("6eGT"),N=G("hW8S");G.d(Be,"a",function(){return N.a}),Be.c=Ae.b},"6UM0":function(wt,Be,G){var Ae,z;(function(){var U;(function(){"use strict";var N=[function(e,R,u){var f=u(1).Beautifier,l=u(5).Options;function s(i,o){var r=new f(i,o);return r.beautify()}e.exports=s,e.exports.defaultOptions=function(){return new l}},function(e,R,u){var f=u(2).Output,l=u(3).Token,s=u(4),i=u(5).Options,o=u(7).Tokenizer,r=u(7).line_starters,a=u(7).positionable_operators,n=u(7).TOKEN;function t(P,q){return q.indexOf(P)!==-1}function E(P){return P.replace(/^\s+/g,"")}function b(P){for(var q={},ie=0;ie<P.length;ie++)q[P[ie].replace(/-/g,"_")]=P[ie];return q}function _(P,q){return P&&P.type===n.RESERVED&&P.text===q}function B(P,q){return P&&P.type===n.RESERVED&&t(P.text,q)}var x=["case","return","do","if","throw","else","await","break","continue","async"],h=["before-newline","after-newline","preserve-newline"],d=b(h),A=[d.before_newline,d.preserve_newline],c={BlockStatement:"BlockStatement",Statement:"Statement",ObjectLiteral:"ObjectLiteral",ArrayLiteral:"ArrayLiteral",ForInitializer:"ForInitializer",Conditional:"Conditional",Expression:"Expression"};function w(P,q){if(q.multiline_frame||q.mode===c.ForInitializer||q.mode===c.Conditional)return;P.remove_indent(q.start_line_index)}function m(P){P=P.replace(s.allLineBreaks,`
|
|
`);for(var q=[],ie=P.indexOf(`
|
|
`);ie!==-1;)q.push(P.substring(0,ie)),P=P.substring(ie+1),ie=P.indexOf(`
|
|
`);return P.length&&q.push(P),q}function g(P){return P===c.ArrayLiteral}function F(P){return t(P,[c.Expression,c.ForInitializer,c.Conditional])}function k(P,q){for(var ie=0;ie<P.length;ie++){var be=P[ie].trim();if(be.charAt(0)!==q)return!1}return!0}function S(P,q){for(var ie=0,be=P.length,me;ie<be;ie++)if(me=P[ie],me&&me.indexOf(q)!==0)return!1;return!0}function Q(P,q){q=q||{},this._source_text=P||"",this._output=null,this._tokens=null,this._last_last_text=null,this._flags=null,this._previous_flags=null,this._flag_store=null,this._options=new i(q)}Q.prototype.create_flags=function(P,q){var ie=0;P&&(ie=P.indentation_level,!this._output.just_added_newline()&&P.line_indent_level>ie&&(ie=P.line_indent_level));var be={mode:q,parent:P,last_token:P?P.last_token:new l(n.START_BLOCK,""),last_word:P?P.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:ie,alignment:0,line_indent_level:P?P.line_indent_level:ie,start_line_index:this._output.get_line_number(),ternary_depth:0};return be},Q.prototype._reset=function(P){var q=P.match(/^[\t ]*/)[0];this._last_last_text="",this._output=new f(this._options,q),this._output.raw=this._options.test_output_raw,this._flag_store=[],this.set_mode(c.BlockStatement);var ie=new o(P,this._options);return this._tokens=ie.tokenize(),P},Q.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var P,q=this._reset(this._source_text),ie=this._options.eol;this._options.eol==="auto"&&(ie=`
|
|
`,q&&s.lineBreak.test(q||"")&&(ie=q.match(s.lineBreak)[0]));for(var be=this._tokens.next();be;)this.handle_token(be),this._last_last_text=this._flags.last_token.text,this._flags.last_token=be,be=this._tokens.next();return P=this._output.get_code(ie),P},Q.prototype.handle_token=function(P,q){P.type===n.START_EXPR?this.handle_start_expr(P):P.type===n.END_EXPR?this.handle_end_expr(P):P.type===n.START_BLOCK?this.handle_start_block(P):P.type===n.END_BLOCK?this.handle_end_block(P):P.type===n.WORD?this.handle_word(P):P.type===n.RESERVED?this.handle_word(P):P.type===n.SEMICOLON?this.handle_semicolon(P):P.type===n.STRING?this.handle_string(P):P.type===n.EQUALS?this.handle_equals(P):P.type===n.OPERATOR?this.handle_operator(P):P.type===n.COMMA?this.handle_comma(P):P.type===n.BLOCK_COMMENT?this.handle_block_comment(P,q):P.type===n.COMMENT?this.handle_comment(P,q):P.type===n.DOT?this.handle_dot(P):P.type===n.EOF?this.handle_eof(P):P.type===n.UNKNOWN?this.handle_unknown(P,q):this.handle_unknown(P,q)},Q.prototype.handle_whitespace_and_comments=function(P,q){var ie=P.newlines,be=this._options.keep_array_indentation&&g(this._flags.mode);if(P.comments_before)for(var me=P.comments_before.next();me;)this.handle_whitespace_and_comments(me,q),this.handle_token(me,q),me=P.comments_before.next();if(be)for(var Me=0;Me<ie;Me+=1)this.print_newline(Me>0,q);else if(this._options.max_preserve_newlines&&ie>this._options.max_preserve_newlines&&(ie=this._options.max_preserve_newlines),this._options.preserve_newlines&&ie>1){this.print_newline(!1,q);for(var Ne=1;Ne<ie;Ne+=1)this.print_newline(!0,q)}};var X=["async","break","continue","return","throw","yield"];Q.prototype.allow_wrap_or_preserved_newline=function(P,q){if(q=q===void 0?!1:q,this._output.just_added_newline())return;var ie=this._options.preserve_newlines&&P.newlines||q,be=t(this._flags.last_token.text,a)||t(P.text,a);if(be){var me=t(this._flags.last_token.text,a)&&t(this._options.operator_position,A)||t(P.text,a);ie=ie&&me}if(ie)this.print_newline(!1,!0);else if(this._options.wrap_line_length){if(B(this._flags.last_token,X))return;this._output.set_wrap_point()}},Q.prototype.print_newline=function(P,q){if(!q&&(this._flags.last_token.text!==";"&&this._flags.last_token.text!==","&&this._flags.last_token.text!=="="&&(this._flags.last_token.type!==n.OPERATOR||this._flags.last_token.text==="--"||this._flags.last_token.text==="++")))for(var ie=this._tokens.peek();this._flags.mode===c.Statement&&!(this._flags.if_block&&_(ie,"else"))&&!this._flags.do_block;)this.restore_mode();this._output.add_new_line(P)&&(this._flags.multiline_frame=!0)},Q.prototype.print_token_line_indentation=function(P){this._output.just_added_newline()&&(this._options.keep_array_indentation&&P.newlines&&(P.text==="["||g(this._flags.mode))?(this._output.current_line.set_indent(-1),this._output.current_line.push(P.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))},Q.prototype.print_token=function(P){if(this._output.raw){this._output.add_raw_token(P);return}if(this._options.comma_first&&P.previous&&P.previous.type===n.COMMA&&this._output.just_added_newline()&&this._output.previous_line.last()===","){var q=this._output.previous_line.pop();this._output.previous_line.is_empty()&&(this._output.previous_line.push(q),this._output.trim(!0),this._output.current_line.pop(),this._output.trim()),this.print_token_line_indentation(P),this._output.add_token(","),this._output.space_before_token=!0}this.print_token_line_indentation(P),this._output.non_breaking_space=!0,this._output.add_token(P.text),this._output.previous_token_wrapped&&(this._flags.multiline_frame=!0)},Q.prototype.indent=function(){this._flags.indentation_level+=1,this._output.set_indent(this._flags.indentation_level,this._flags.alignment)},Q.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))},Q.prototype.set_mode=function(P){this._flags?(this._flag_store.push(this._flags),this._previous_flags=this._flags):this._previous_flags=this.create_flags(null,P),this._flags=this.create_flags(this._previous_flags,P),this._output.set_indent(this._flags.indentation_level,this._flags.alignment)},Q.prototype.restore_mode=function(){this._flag_store.length>0&&(this._previous_flags=this._flags,this._flags=this._flag_store.pop(),this._previous_flags.mode===c.Statement&&w(this._output,this._previous_flags),this._output.set_indent(this._flags.indentation_level,this._flags.alignment))},Q.prototype.start_of_object_property=function(){return this._flags.parent.mode===c.ObjectLiteral&&this._flags.mode===c.Statement&&(this._flags.last_token.text===":"&&this._flags.ternary_depth===0||B(this._flags.last_token,["get","set"]))},Q.prototype.start_of_statement=function(P){var q=!1;return q=q||B(this._flags.last_token,["var","let","const"])&&P.type===n.WORD,q=q||_(this._flags.last_token,"do"),q=q||!(this._flags.parent.mode===c.ObjectLiteral&&this._flags.mode===c.Statement)&&B(this._flags.last_token,X)&&!P.newlines,q=q||_(this._flags.last_token,"else")&&!(_(P,"if")&&!P.comments_before),q=q||this._flags.last_token.type===n.END_EXPR&&(this._previous_flags.mode===c.ForInitializer||this._previous_flags.mode===c.Conditional),q=q||this._flags.last_token.type===n.WORD&&this._flags.mode===c.BlockStatement&&!this._flags.in_case&&!(P.text==="--"||P.text==="++")&&this._last_last_text!=="function"&&P.type!==n.WORD&&P.type!==n.RESERVED,q=q||this._flags.mode===c.ObjectLiteral&&(this._flags.last_token.text===":"&&this._flags.ternary_depth===0||B(this._flags.last_token,["get","set"])),q?(this.set_mode(c.Statement),this.indent(),this.handle_whitespace_and_comments(P,!0),this.start_of_object_property()||this.allow_wrap_or_preserved_newline(P,B(P,["do","for","if","while"])),!0):!1},Q.prototype.handle_start_expr=function(P){this.start_of_statement(P)||this.handle_whitespace_and_comments(P);var q=c.Expression;if(P.text==="["){if(this._flags.last_token.type===n.WORD||this._flags.last_token.text===")"){B(this._flags.last_token,r)&&(this._output.space_before_token=!0),this.print_token(P),this.set_mode(q),this.indent(),this._options.space_in_paren&&(this._output.space_before_token=!0);return}q=c.ArrayLiteral,g(this._flags.mode)&&((this._flags.last_token.text==="["||this._flags.last_token.text===","&&(this._last_last_text==="]"||this._last_last_text==="}"))&&(this._options.keep_array_indentation||this.print_newline())),t(this._flags.last_token.type,[n.START_EXPR,n.END_EXPR,n.WORD,n.OPERATOR,n.DOT])||(this._output.space_before_token=!0)}else{if(this._flags.last_token.type===n.RESERVED)this._flags.last_token.text==="for"?(this._output.space_before_token=this._options.space_before_conditional,q=c.ForInitializer):t(this._flags.last_token.text,["if","while","switch"])?(this._output.space_before_token=this._options.space_before_conditional,q=c.Conditional):t(this._flags.last_word,["await","async"])?this._output.space_before_token=!0:this._flags.last_token.text==="import"&&P.whitespace_before===""?this._output.space_before_token=!1:(t(this._flags.last_token.text,r)||this._flags.last_token.text==="catch")&&(this._output.space_before_token=!0);else if(this._flags.last_token.type===n.EQUALS||this._flags.last_token.type===n.OPERATOR)this.start_of_object_property()||this.allow_wrap_or_preserved_newline(P);else if(this._flags.last_token.type===n.WORD){this._output.space_before_token=!1;var ie=this._tokens.peek(-3);if(this._options.space_after_named_function&&ie){var be=this._tokens.peek(-4);B(ie,["async","function"])||ie.text==="*"&&B(be,["async","function"])?this._output.space_before_token=!0:this._flags.mode===c.ObjectLiteral?(ie.text==="{"||ie.text===","||ie.text==="*"&&(be.text==="{"||be.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(P);(this._flags.last_token.type===n.RESERVED&&(this._flags.last_word==="function"||this._flags.last_word==="typeof")||this._flags.last_token.text==="*"&&(t(this._last_last_text,["function","yield"])||this._flags.mode===c.ObjectLiteral&&t(this._last_last_text,["{",","])))&&(this._output.space_before_token=this._options.space_after_anon_function)}this._flags.last_token.text===";"||this._flags.last_token.type===n.START_BLOCK?this.print_newline():(this._flags.last_token.type===n.END_EXPR||this._flags.last_token.type===n.START_EXPR||this._flags.last_token.type===n.END_BLOCK||this._flags.last_token.text==="."||this._flags.last_token.type===n.COMMA)&&this.allow_wrap_or_preserved_newline(P,P.newlines),this.print_token(P),this.set_mode(q),this._options.space_in_paren&&(this._output.space_before_token=!0),this.indent()},Q.prototype.handle_end_expr=function(P){for(;this._flags.mode===c.Statement;)this.restore_mode();this.handle_whitespace_and_comments(P),this._flags.multiline_frame&&this.allow_wrap_or_preserved_newline(P,P.text==="]"&&g(this._flags.mode)&&!this._options.keep_array_indentation),this._options.space_in_paren&&(this._flags.last_token.type===n.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(P),this.restore_mode(),w(this._output,this._previous_flags),this._flags.do_while&&this._previous_flags.mode===c.Conditional&&(this._previous_flags.mode=c.Expression,this._flags.do_block=!1,this._flags.do_while=!1)},Q.prototype.handle_start_block=function(P){this.handle_whitespace_and_comments(P);var q=this._tokens.peek(),ie=this._tokens.peek(1);this._flags.last_word==="switch"&&this._flags.last_token.type===n.END_EXPR?(this.set_mode(c.BlockStatement),this._flags.in_case_statement=!0):this._flags.case_body?this.set_mode(c.BlockStatement):ie&&(t(ie.text,[":",","])&&t(q.type,[n.STRING,n.WORD,n.RESERVED])||t(q.text,["get","set","..."])&&t(ie.type,[n.WORD,n.RESERVED]))?t(this._last_last_text,["class","interface"])&&!t(ie.text,[":",","])?this.set_mode(c.BlockStatement):this.set_mode(c.ObjectLiteral):this._flags.last_token.type===n.OPERATOR&&this._flags.last_token.text==="=>"?this.set_mode(c.BlockStatement):t(this._flags.last_token.type,[n.EQUALS,n.START_EXPR,n.COMMA,n.OPERATOR])||B(this._flags.last_token,["return","throw","import","default"])?this.set_mode(c.ObjectLiteral):this.set_mode(c.BlockStatement),this._flags.last_token&&(B(this._flags.last_token.previous,["class","extends"])&&(this._flags.class_start_block=!0));var be=!q.comments_before&&q.text==="}",me=be&&this._flags.last_word==="function"&&this._flags.last_token.type===n.END_EXPR;if(this._options.brace_preserve_inline){var Me=0,Ne=null;this._flags.inline_frame=!0;do if(Me+=1,Ne=this._tokens.peek(Me-1),Ne.newlines){this._flags.inline_frame=!1;break}while(Ne.type!==n.EOF&&!(Ne.type===n.END_BLOCK&&Ne.opened===P))}(this._options.brace_style==="expand"||this._options.brace_style==="none"&&P.newlines)&&!this._flags.inline_frame?this._flags.last_token.type!==n.OPERATOR&&(me||this._flags.last_token.type===n.EQUALS||B(this._flags.last_token,x)&&this._flags.last_token.text!=="else")?this._output.space_before_token=!0:this.print_newline(!1,!0):(g(this._previous_flags.mode)&&(this._flags.last_token.type===n.START_EXPR||this._flags.last_token.type===n.COMMA)&&((this._flags.last_token.type===n.COMMA||this._options.space_in_paren)&&(this._output.space_before_token=!0),(this._flags.last_token.type===n.COMMA||this._flags.last_token.type===n.START_EXPR&&this._flags.inline_frame)&&(this.allow_wrap_or_preserved_newline(P),this._previous_flags.multiline_frame=this._previous_flags.multiline_frame||this._flags.multiline_frame,this._flags.multiline_frame=!1)),this._flags.last_token.type!==n.OPERATOR&&this._flags.last_token.type!==n.START_EXPR&&(this._flags.last_token.type===n.START_BLOCK&&!this._flags.inline_frame?this.print_newline():this._output.space_before_token=!0)),this.print_token(P),this.indent(),!be&&!(this._options.brace_preserve_inline&&this._flags.inline_frame)&&this.print_newline()},Q.prototype.handle_end_block=function(P){for(this.handle_whitespace_and_comments(P);this._flags.mode===c.Statement;)this.restore_mode();var q=this._flags.last_token.type===n.START_BLOCK;this._flags.inline_frame&&!q?this._output.space_before_token=!0:this._options.brace_style==="expand"?q||this.print_newline():q||(g(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(P)},Q.prototype.handle_word=function(P){if(P.type===n.RESERVED){if(t(P.text,["set","get"])&&this._flags.mode!==c.ObjectLiteral)P.type=n.WORD;else if(P.text==="import"&&t(this._tokens.peek().text,["(","."]))P.type=n.WORD;else if(t(P.text,["as","from"])&&!this._flags.import_block)P.type=n.WORD;else if(this._flags.mode===c.ObjectLiteral){var q=this._tokens.peek();q.text===":"&&(P.type=n.WORD)}}if(this.start_of_statement(P)?B(this._flags.last_token,["var","let","const"])&&P.type===n.WORD&&(this._flags.declaration_statement=!0):P.newlines&&!F(this._flags.mode)&&(this._flags.last_token.type!==n.OPERATOR||this._flags.last_token.text==="--"||this._flags.last_token.text==="++")&&this._flags.last_token.type!==n.EQUALS&&(this._options.preserve_newlines||!B(this._flags.last_token,["var","let","const","set","get"]))?(this.handle_whitespace_and_comments(P),this.print_newline()):this.handle_whitespace_and_comments(P),this._flags.do_block&&!this._flags.do_while)if(_(P,"while")){this._output.space_before_token=!0,this.print_token(P),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&&_(P,"else"))this._flags.else_block=!0;else{for(;this._flags.mode===c.Statement;)this.restore_mode();this._flags.if_block=!1,this._flags.else_block=!1}if(this._flags.in_case_statement&&B(P,["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(P),this._flags.in_case=!0;return}if((this._flags.last_token.type===n.COMMA||this._flags.last_token.type===n.START_EXPR||this._flags.last_token.type===n.EQUALS||this._flags.last_token.type===n.OPERATOR)&&(this.start_of_object_property()||this.allow_wrap_or_preserved_newline(P)),_(P,"function")){(t(this._flags.last_token.text,["}",";"])||this._output.just_added_newline()&&!(t(this._flags.last_token.text,["(","[","{",":","=",","])||this._flags.last_token.type===n.OPERATOR))&&(!this._output.just_added_blankline()&&!P.comments_before&&(this.print_newline(),this.print_newline(!0))),this._flags.last_token.type===n.RESERVED||this._flags.last_token.type===n.WORD?B(this._flags.last_token,["get","set","new","export"])||B(this._flags.last_token,X)?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===n.OPERATOR||this._flags.last_token.text==="="?this._output.space_before_token=!0:!this._flags.multiline_frame&&(F(this._flags.mode)||g(this._flags.mode))||this.print_newline(),this.print_token(P),this._flags.last_word=P.text;return}var ie="NONE";if(this._flags.last_token.type===n.END_BLOCK?this._previous_flags.inline_frame?ie="SPACE":B(P,["else","catch","finally","from"])?this._options.brace_style==="expand"||this._options.brace_style==="end-expand"||this._options.brace_style==="none"&&P.newlines?ie="NEWLINE":(ie="SPACE",this._output.space_before_token=!0):ie="NEWLINE":this._flags.last_token.type===n.SEMICOLON&&this._flags.mode===c.BlockStatement?ie="NEWLINE":this._flags.last_token.type===n.SEMICOLON&&F(this._flags.mode)?ie="SPACE":this._flags.last_token.type===n.STRING?ie="NEWLINE":this._flags.last_token.type===n.RESERVED||this._flags.last_token.type===n.WORD||this._flags.last_token.text==="*"&&(t(this._last_last_text,["function","yield"])||this._flags.mode===c.ObjectLiteral&&t(this._last_last_text,["{",","]))?ie="SPACE":this._flags.last_token.type===n.START_BLOCK?this._flags.inline_frame?ie="SPACE":ie="NEWLINE":this._flags.last_token.type===n.END_EXPR&&(this._output.space_before_token=!0,ie="NEWLINE"),B(P,r)&&this._flags.last_token.text!==")"&&(this._flags.inline_frame||this._flags.last_token.text==="else"||this._flags.last_token.text==="export"?ie="SPACE":ie="NEWLINE"),B(P,["else","catch","finally"]))if((!(this._flags.last_token.type===n.END_BLOCK&&this._previous_flags.mode===c.BlockStatement)||this._options.brace_style==="expand"||this._options.brace_style==="end-expand"||this._options.brace_style==="none"&&P.newlines)&&!this._flags.inline_frame)this.print_newline();else{this._output.trim(!0);var be=this._output.current_line;be.last()!=="}"&&this.print_newline(),this._output.space_before_token=!0}else ie==="NEWLINE"?B(this._flags.last_token,x)?this._output.space_before_token=!0:this._flags.last_token.text==="declare"&&B(P,["var","let","const"])?this._output.space_before_token=!0:this._flags.last_token.type!==n.END_EXPR?(this._flags.last_token.type!==n.START_EXPR||!B(P,["var","let","const"]))&&this._flags.last_token.text!==":"&&(_(P,"if")&&_(P.previous,"else")?this._output.space_before_token=!0:this.print_newline()):B(P,r)&&this._flags.last_token.text!==")"&&this.print_newline():this._flags.multiline_frame&&g(this._flags.mode)&&this._flags.last_token.text===","&&this._last_last_text==="}"?this.print_newline():ie==="SPACE"&&(this._output.space_before_token=!0);P.previous&&(P.previous.type===n.WORD||P.previous.type===n.RESERVED)&&(this._output.space_before_token=!0),this.print_token(P),this._flags.last_word=P.text,P.type===n.RESERVED&&(P.text==="do"?this._flags.do_block=!0:P.text==="if"?this._flags.if_block=!0:P.text==="import"?this._flags.import_block=!0:this._flags.import_block&&_(P,"from")&&(this._flags.import_block=!1))},Q.prototype.handle_semicolon=function(P){this.start_of_statement(P)?this._output.space_before_token=!1:this.handle_whitespace_and_comments(P);for(var q=this._tokens.peek();this._flags.mode===c.Statement&&!(this._flags.if_block&&_(q,"else"))&&!this._flags.do_block;)this.restore_mode();this._flags.import_block&&(this._flags.import_block=!1),this.print_token(P)},Q.prototype.handle_string=function(P){P.text.startsWith("`")&&P.newlines===0&&P.whitespace_before===""&&(P.previous.text===")"||this._flags.last_token.type===n.WORD)||(this.start_of_statement(P)?this._output.space_before_token=!0:(this.handle_whitespace_and_comments(P),this._flags.last_token.type===n.RESERVED||this._flags.last_token.type===n.WORD||this._flags.inline_frame?this._output.space_before_token=!0:this._flags.last_token.type===n.COMMA||this._flags.last_token.type===n.START_EXPR||this._flags.last_token.type===n.EQUALS||this._flags.last_token.type===n.OPERATOR?this.start_of_object_property()||this.allow_wrap_or_preserved_newline(P):P.text.startsWith("`")&&this._flags.last_token.type===n.END_EXPR&&(P.previous.text==="]"||P.previous.text===")")&&P.newlines===0?this._output.space_before_token=!0:this.print_newline())),this.print_token(P)},Q.prototype.handle_equals=function(P){this.start_of_statement(P)||this.handle_whitespace_and_comments(P),this._flags.declaration_statement&&(this._flags.declaration_assignment=!0),this._output.space_before_token=!0,this.print_token(P),this._output.space_before_token=!0},Q.prototype.handle_comma=function(P){this.handle_whitespace_and_comments(P,!0),this.print_token(P),this._output.space_before_token=!0,this._flags.declaration_statement?(F(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(P)):this._flags.mode===c.ObjectLiteral||this._flags.mode===c.Statement&&this._flags.parent.mode===c.ObjectLiteral?(this._flags.mode===c.Statement&&this.restore_mode(),this._flags.inline_frame||this.print_newline()):this._options.comma_first&&this.allow_wrap_or_preserved_newline(P)},Q.prototype.handle_operator=function(P){var q=P.text==="*"&&(B(this._flags.last_token,["function","yield"])||t(this._flags.last_token.type,[n.START_BLOCK,n.COMMA,n.END_BLOCK,n.SEMICOLON])),ie=t(P.text,["-","+"])&&(t(this._flags.last_token.type,[n.START_BLOCK,n.START_EXPR,n.EQUALS,n.OPERATOR])||t(this._flags.last_token.text,r)||this._flags.last_token.text===",");if(!this.start_of_statement(P)){var be=!q;this.handle_whitespace_and_comments(P,be)}if(P.text==="*"&&this._flags.last_token.type===n.DOT){this.print_token(P);return}if(P.text==="::"){this.print_token(P);return}if(this._flags.last_token.type===n.OPERATOR&&t(this._options.operator_position,A)&&this.allow_wrap_or_preserved_newline(P),P.text===":"&&this._flags.in_case){this.print_token(P),this._flags.in_case=!1,this._flags.case_body=!0,this._tokens.peek().type!==n.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 me=!0,Me=!0,Ne=!1;if(P.text===":"?this._flags.ternary_depth===0?me=!1:(this._flags.ternary_depth-=1,Ne=!0):P.text==="?"&&(this._flags.ternary_depth+=1),!ie&&!q&&this._options.preserve_newlines&&t(P.text,a)){var ke=P.text===":",Ke=ke&&Ne,Ye=ke&&!Ne;switch(this._options.operator_position){case d.before_newline:this._output.space_before_token=!Ye,this.print_token(P),(!ke||Ke)&&this.allow_wrap_or_preserved_newline(P),this._output.space_before_token=!0;return;case d.after_newline:this._output.space_before_token=!0,!ke||Ke?this._tokens.peek().newlines?this.print_newline(!1,!0):this.allow_wrap_or_preserved_newline(P):this._output.space_before_token=!1,this.print_token(P),this._output.space_before_token=!0;return;case d.preserve_newline:Ye||this.allow_wrap_or_preserved_newline(P),me=!(this._output.just_added_newline()||Ye),this._output.space_before_token=me,this.print_token(P),this._output.space_before_token=!0;return}}if(q){this.allow_wrap_or_preserved_newline(P),me=!1;var _e=this._tokens.peek();Me=_e&&t(_e.type,[n.WORD,n.RESERVED])}else if(P.text==="...")this.allow_wrap_or_preserved_newline(P),me=this._flags.last_token.type===n.START_BLOCK,Me=!1;else if(t(P.text,["--","++","!","~"])||ie){if((this._flags.last_token.type===n.COMMA||this._flags.last_token.type===n.START_EXPR)&&this.allow_wrap_or_preserved_newline(P),me=!1,Me=!1,P.newlines&&(P.text==="--"||P.text==="++"||P.text==="~")){var Te=B(this._flags.last_token,x)&&P.newlines;Te&&(this._previous_flags.if_block||this._previous_flags.else_block)&&this.restore_mode(),this.print_newline(Te,!0)}this._flags.last_token.text===";"&&F(this._flags.mode)&&(me=!0),this._flags.last_token.type===n.RESERVED?me=!0:this._flags.last_token.type===n.END_EXPR?me=!(this._flags.last_token.text==="]"&&(P.text==="--"||P.text==="++")):this._flags.last_token.type===n.OPERATOR&&(me=t(P.text,["--","-","++","+"])&&t(this._flags.last_token.text,["--","-","++","+"]),t(P.text,["+","-"])&&t(this._flags.last_token.text,["--","++"])&&(Me=!0)),(this._flags.mode===c.BlockStatement&&!this._flags.inline_frame||this._flags.mode===c.Statement)&&(this._flags.last_token.text==="{"||this._flags.last_token.text===";")&&this.print_newline()}this._output.space_before_token=this._output.space_before_token||me,this.print_token(P),this._output.space_before_token=Me},Q.prototype.handle_block_comment=function(P,q){if(this._output.raw){this._output.add_raw_token(P),P.directives&&P.directives.preserve==="end"&&(this._output.raw=this._options.test_output_raw);return}if(P.directives){this.print_newline(!1,q),this.print_token(P),P.directives.preserve==="start"&&(this._output.raw=!0),this.print_newline(!1,!0);return}if(!s.newline.test(P.text)&&!P.newlines){this._output.space_before_token=!0,this.print_token(P),this._output.space_before_token=!0;return}else this.print_block_commment(P,q)},Q.prototype.print_block_commment=function(P,q){var ie=m(P.text),be,me=!1,Me=!1,Ne=P.whitespace_before,ke=Ne.length;if(this.print_newline(!1,q),this.print_token_line_indentation(P),this._output.add_token(ie[0]),this.print_newline(!1,q),ie.length>1){for(ie=ie.slice(1),me=k(ie,"*"),Me=S(ie,Ne),me&&(this._flags.alignment=1),be=0;be<ie.length;be++)me?(this.print_token_line_indentation(P),this._output.add_token(E(ie[be]))):Me&&ie[be]?(this.print_token_line_indentation(P),this._output.add_token(ie[be].substring(ke))):(this._output.current_line.set_indent(-1),this._output.add_token(ie[be])),this.print_newline(!1,q);this._flags.alignment=0}},Q.prototype.handle_comment=function(P,q){P.newlines?this.print_newline(!1,q):this._output.trim(!0),this._output.space_before_token=!0,this.print_token(P),this.print_newline(!1,q)},Q.prototype.handle_dot=function(P){this.start_of_statement(P)||this.handle_whitespace_and_comments(P,!0),this._flags.last_token.text.match("^[0-9]+$")&&(this._output.space_before_token=!0),B(this._flags.last_token,x)?this._output.space_before_token=!1:this.allow_wrap_or_preserved_newline(P,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(P)},Q.prototype.handle_unknown=function(P,q){this.print_token(P),P.text[P.text.length-1]===`
|
|
`&&this.print_newline(!1,q)},Q.prototype.handle_eof=function(P){for(;this._flags.mode===c.Statement;)this.restore_mode();this.handle_whitespace_and_comments(P)},e.exports.Beautifier=Q},function(e){function R(l){this.__parent=l,this.__character_count=0,this.__indent_count=-1,this.__alignment_count=0,this.__wrap_point_index=0,this.__wrap_point_character_count=0,this.__wrap_point_indent_count=-1,this.__wrap_point_alignment_count=0,this.__items=[]}R.prototype.clone_empty=function(){var l=new R(this.__parent);return l.set_indent(this.__indent_count,this.__alignment_count),l},R.prototype.item=function(l){return l<0?this.__items[this.__items.length+l]:this.__items[l]},R.prototype.has_match=function(l){for(var s=this.__items.length-1;s>=0;s--)if(this.__items[s].match(l))return!0;return!1},R.prototype.set_indent=function(l,s){this.is_empty()&&(this.__indent_count=l||0,this.__alignment_count=s||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},R.prototype._set_wrap_point=function(){this.__parent.wrap_line_length&&(this.__wrap_point_index=this.__items.length,this.__wrap_point_character_count=this.__character_count,this.__wrap_point_indent_count=this.__parent.next_line.__indent_count,this.__wrap_point_alignment_count=this.__parent.next_line.__alignment_count)},R.prototype._should_wrap=function(){return this.__wrap_point_index&&this.__character_count>this.__parent.wrap_line_length&&this.__wrap_point_character_count>this.__parent.next_line.__character_count},R.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var l=this.__parent.current_line;return l.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),l.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),l.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,l.__items[0]===" "&&(l.__items.splice(0,1),l.__character_count-=1),!0}return!1},R.prototype.is_empty=function(){return this.__items.length===0},R.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},R.prototype.push=function(l){this.__items.push(l);var s=l.lastIndexOf(`
|
|
`);s!==-1?this.__character_count=l.length-s:this.__character_count+=l.length},R.prototype.pop=function(){var l=null;return this.is_empty()||(l=this.__items.pop(),this.__character_count-=l.length),l},R.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},R.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},R.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},R.prototype.toString=function(){var l="";return this.is_empty()?this.__parent.indent_empty_lines&&(l=this.__parent.get_indent_string(this.__indent_count)):(l=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),l+=this.__items.join("")),l};function u(l,s){this.__cache=[""],this.__indent_size=l.indent_size,this.__indent_string=l.indent_char,l.indent_with_tabs||(this.__indent_string=new Array(l.indent_size+1).join(l.indent_char)),s=s||"",l.indent_level>0&&(s=new Array(l.indent_level+1).join(this.__indent_string)),this.__base_string=s,this.__base_string_length=s.length}u.prototype.get_indent_size=function(l,s){var i=this.__base_string_length;return s=s||0,l<0&&(i=0),i+=l*this.__indent_size,i+=s,i},u.prototype.get_indent_string=function(l,s){var i=this.__base_string;return s=s||0,l<0&&(l=0,i=""),s+=l*this.__indent_size,this.__ensure_cache(s),i+=this.__cache[s],i},u.prototype.__ensure_cache=function(l){for(;l>=this.__cache.length;)this.__add_column()},u.prototype.__add_column=function(){var l=this.__cache.length,s=0,i="";this.__indent_size&&l>=this.__indent_size&&(s=Math.floor(l/this.__indent_size),l-=s*this.__indent_size,i=new Array(s+1).join(this.__indent_string)),l&&(i+=new Array(l+1).join(" ")),this.__cache.push(i)};function f(l,s){this.__indent_cache=new u(l,s),this.raw=!1,this._end_with_newline=l.end_with_newline,this.indent_size=l.indent_size,this.wrap_line_length=l.wrap_line_length,this.indent_empty_lines=l.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new R(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}f.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},f.prototype.get_line_number=function(){return this.__lines.length},f.prototype.get_indent_string=function(l,s){return this.__indent_cache.get_indent_string(l,s)},f.prototype.get_indent_size=function(l,s){return this.__indent_cache.get_indent_size(l,s)},f.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},f.prototype.add_new_line=function(l){return this.is_empty()||!l&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},f.prototype.get_code=function(l){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 l!==`
|
|
`&&(i=i.replace(/[\n]/g,l)),i},f.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},f.prototype.set_indent=function(l,s){return l=l||0,s=s||0,this.next_line.set_indent(l,s),this.__lines.length>1?(this.current_line.set_indent(l,s),!0):(this.current_line.set_indent(),!1)},f.prototype.add_raw_token=function(l){for(var s=0;s<l.newlines;s++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(l.whitespace_before),this.current_line.push(l.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},f.prototype.add_token=function(l){this.__add_space_before_token(),this.current_line.push(l),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=this.current_line._allow_wrap()},f.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(" "))},f.prototype.remove_indent=function(l){for(var s=this.__lines.length;l<s;)this.__lines[l]._remove_indent(),l++;this.current_line._remove_wrap_indent()},f.prototype.trim=function(l){for(l=l===void 0?!1:l,this.current_line.trim();l&&this.__lines.length>1&&this.current_line.is_empty();)this.__lines.pop(),this.current_line=this.__lines[this.__lines.length-1],this.current_line.trim();this.previous_line=this.__lines.length>1?this.__lines[this.__lines.length-2]:null},f.prototype.just_added_newline=function(){return this.current_line.is_empty()},f.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},f.prototype.ensure_empty_line_above=function(l,s){for(var i=this.__lines.length-2;i>=0;){var o=this.__lines[i];if(o.is_empty())break;if(o.item(0).indexOf(l)!==0&&o.item(-1)!==s){this.__lines.splice(i+1,0,new R(this)),this.previous_line=this.__lines[this.__lines.length-2];break}i--}},e.exports.Output=f},function(e){function R(u,f,l,s){this.type=u,this.text=f,this.comments_before=null,this.newlines=l||0,this.whitespace_before=s||"",this.parent=null,this.next=null,this.previous=null,this.opened=null,this.closed=null,this.directives=null}e.exports.Token=R},function(e,R){var u="\\x23\\x24\\x40\\x41-\\x5a\\x5f\\x61-\\x7a",f="\\x24\\x30-\\x39\\x41-\\x5a\\x5f\\x61-\\x7a",l="\\xaa\\xb5\\xba\\xc0-\\xd6\\xd8-\\xf6\\xf8-\\u02c1\\u02c6-\\u02d1\\u02e0-\\u02e4\\u02ec\\u02ee\\u0370-\\u0374\\u0376\\u0377\\u037a-\\u037d\\u0386\\u0388-\\u038a\\u038c\\u038e-\\u03a1\\u03a3-\\u03f5\\u03f7-\\u0481\\u048a-\\u0527\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u05d0-\\u05ea\\u05f0-\\u05f2\\u0620-\\u064a\\u066e\\u066f\\u0671-\\u06d3\\u06d5\\u06e5\\u06e6\\u06ee\\u06ef\\u06fa-\\u06fc\\u06ff\\u0710\\u0712-\\u072f\\u074d-\\u07a5\\u07b1\\u07ca-\\u07ea\\u07f4\\u07f5\\u07fa\\u0800-\\u0815\\u081a\\u0824\\u0828\\u0840-\\u0858\\u08a0\\u08a2-\\u08ac\\u0904-\\u0939\\u093d\\u0950\\u0958-\\u0961\\u0971-\\u0977\\u0979-\\u097f\\u0985-\\u098c\\u098f\\u0990\\u0993-\\u09a8\\u09aa-\\u09b0\\u09b2\\u09b6-\\u09b9\\u09bd\\u09ce\\u09dc\\u09dd\\u09df-\\u09e1\\u09f0\\u09f1\\u0a05-\\u0a0a\\u0a0f\\u0a10\\u0a13-\\u0a28\\u0a2a-\\u0a30\\u0a32\\u0a33\\u0a35\\u0a36\\u0a38\\u0a39\\u0a59-\\u0a5c\\u0a5e\\u0a72-\\u0a74\\u0a85-\\u0a8d\\u0a8f-\\u0a91\\u0a93-\\u0aa8\\u0aaa-\\u0ab0\\u0ab2\\u0ab3\\u0ab5-\\u0ab9\\u0abd\\u0ad0\\u0ae0\\u0ae1\\u0b05-\\u0b0c\\u0b0f\\u0b10\\u0b13-\\u0b28\\u0b2a-\\u0b30\\u0b32\\u0b33\\u0b35-\\u0b39\\u0b3d\\u0b5c\\u0b5d\\u0b5f-\\u0b61\\u0b71\\u0b83\\u0b85-\\u0b8a\\u0b8e-\\u0b90\\u0b92-\\u0b95\\u0b99\\u0b9a\\u0b9c\\u0b9e\\u0b9f\\u0ba3\\u0ba4\\u0ba8-\\u0baa\\u0bae-\\u0bb9\\u0bd0\\u0c05-\\u0c0c\\u0c0e-\\u0c10\\u0c12-\\u0c28\\u0c2a-\\u0c33\\u0c35-\\u0c39\\u0c3d\\u0c58\\u0c59\\u0c60\\u0c61\\u0c85-\\u0c8c\\u0c8e-\\u0c90\\u0c92-\\u0ca8\\u0caa-\\u0cb3\\u0cb5-\\u0cb9\\u0cbd\\u0cde\\u0ce0\\u0ce1\\u0cf1\\u0cf2\\u0d05-\\u0d0c\\u0d0e-\\u0d10\\u0d12-\\u0d3a\\u0d3d\\u0d4e\\u0d60\\u0d61\\u0d7a-\\u0d7f\\u0d85-\\u0d96\\u0d9a-\\u0db1\\u0db3-\\u0dbb\\u0dbd\\u0dc0-\\u0dc6\\u0e01-\\u0e30\\u0e32\\u0e33\\u0e40-\\u0e46\\u0e81\\u0e82\\u0e84\\u0e87\\u0e88\\u0e8a\\u0e8d\\u0e94-\\u0e97\\u0e99-\\u0e9f\\u0ea1-\\u0ea3\\u0ea5\\u0ea7\\u0eaa\\u0eab\\u0ead-\\u0eb0\\u0eb2\\u0eb3\\u0ebd\\u0ec0-\\u0ec4\\u0ec6\\u0edc-\\u0edf\\u0f00\\u0f40-\\u0f47\\u0f49-\\u0f6c\\u0f88-\\u0f8c\\u1000-\\u102a\\u103f\\u1050-\\u1055\\u105a-\\u105d\\u1061\\u1065\\u1066\\u106e-\\u1070\\u1075-\\u1081\\u108e\\u10a0-\\u10c5\\u10c7\\u10cd\\u10d0-\\u10fa\\u10fc-\\u1248\\u124a-\\u124d\\u1250-\\u1256\\u1258\\u125a-\\u125d\\u1260-\\u1288\\u128a-\\u128d\\u1290-\\u12b0\\u12b2-\\u12b5\\u12b8-\\u12be\\u12c0\\u12c2-\\u12c5\\u12c8-\\u12d6\\u12d8-\\u1310\\u1312-\\u1315\\u1318-\\u135a\\u1380-\\u138f\\u13a0-\\u13f4\\u1401-\\u166c\\u166f-\\u167f\\u1681-\\u169a\\u16a0-\\u16ea\\u16ee-\\u16f0\\u1700-\\u170c\\u170e-\\u1711\\u1720-\\u1731\\u1740-\\u1751\\u1760-\\u176c\\u176e-\\u1770\\u1780-\\u17b3\\u17d7\\u17dc\\u1820-\\u1877\\u1880-\\u18a8\\u18aa\\u18b0-\\u18f5\\u1900-\\u191c\\u1950-\\u196d\\u1970-\\u1974\\u1980-\\u19ab\\u19c1-\\u19c7\\u1a00-\\u1a16\\u1a20-\\u1a54\\u1aa7\\u1b05-\\u1b33\\u1b45-\\u1b4b\\u1b83-\\u1ba0\\u1bae\\u1baf\\u1bba-\\u1be5\\u1c00-\\u1c23\\u1c4d-\\u1c4f\\u1c5a-\\u1c7d\\u1ce9-\\u1cec\\u1cee-\\u1cf1\\u1cf5\\u1cf6\\u1d00-\\u1dbf\\u1e00-\\u1f15\\u1f18-\\u1f1d\\u1f20-\\u1f45\\u1f48-\\u1f4d\\u1f50-\\u1f57\\u1f59\\u1f5b\\u1f5d\\u1f5f-\\u1f7d\\u1f80-\\u1fb4\\u1fb6-\\u1fbc\\u1fbe\\u1fc2-\\u1fc4\\u1fc6-\\u1fcc\\u1fd0-\\u1fd3\\u1fd6-\\u1fdb\\u1fe0-\\u1fec\\u1ff2-\\u1ff4\\u1ff6-\\u1ffc\\u2071\\u207f\\u2090-\\u209c\\u2102\\u2107\\u210a-\\u2113\\u2115\\u2119-\\u211d\\u2124\\u2126\\u2128\\u212a-\\u212d\\u212f-\\u2139\\u213c-\\u213f\\u2145-\\u2149\\u214e\\u2160-\\u2188\\u2c00-\\u2c2e\\u2c30-\\u2c5e\\u2c60-\\u2ce4\\u2ceb-\\u2cee\\u2cf2\\u2cf3\\u2d00-\\u2d25\\u2d27\\u2d2d\\u2d30-\\u2d67\\u2d6f\\u2d80-\\u2d96\\u2da0-\\u2da6\\u2da8-\\u2dae\\u2db0-\\u2db6\\u2db8-\\u2dbe\\u2dc0-\\u2dc6\\u2dc8-\\u2dce\\u2dd0-\\u2dd6\\u2dd8-\\u2dde\\u2e2f\\u3005-\\u3007\\u3021-\\u3029\\u3031-\\u3035\\u3038-\\u303c\\u3041-\\u3096\\u309d-\\u309f\\u30a1-\\u30fa\\u30fc-\\u30ff\\u3105-\\u312d\\u3131-\\u318e\\u31a0-\\u31ba\\u31f0-\\u31ff\\u3400-\\u4db5\\u4e00-\\u9fcc\\ua000-\\ua48c\\ua4d0-\\ua4fd\\ua500-\\ua60c\\ua610-\\ua61f\\ua62a\\ua62b\\ua640-\\ua66e\\ua67f-\\ua697\\ua6a0-\\ua6ef\\ua717-\\ua71f\\ua722-\\ua788\\ua78b-\\ua78e\\ua790-\\ua793\\ua7a0-\\ua7aa\\ua7f8-\\ua801\\ua803-\\ua805\\ua807-\\ua80a\\ua80c-\\ua822\\ua840-\\ua873\\ua882-\\ua8b3\\ua8f2-\\ua8f7\\ua8fb\\ua90a-\\ua925\\ua930-\\ua946\\ua960-\\ua97c\\ua984-\\ua9b2\\ua9cf\\uaa00-\\uaa28\\uaa40-\\uaa42\\uaa44-\\uaa4b\\uaa60-\\uaa76\\uaa7a\\uaa80-\\uaaaf\\uaab1\\uaab5\\uaab6\\uaab9-\\uaabd\\uaac0\\uaac2\\uaadb-\\uaadd\\uaae0-\\uaaea\\uaaf2-\\uaaf4\\uab01-\\uab06\\uab09-\\uab0e\\uab11-\\uab16\\uab20-\\uab26\\uab28-\\uab2e\\uabc0-\\uabe2\\uac00-\\ud7a3\\ud7b0-\\ud7c6\\ud7cb-\\ud7fb\\uf900-\\ufa6d\\ufa70-\\ufad9\\ufb00-\\ufb06\\ufb13-\\ufb17\\ufb1d\\ufb1f-\\ufb28\\ufb2a-\\ufb36\\ufb38-\\ufb3c\\ufb3e\\ufb40\\ufb41\\ufb43\\ufb44\\ufb46-\\ufbb1\\ufbd3-\\ufd3d\\ufd50-\\ufd8f\\ufd92-\\ufdc7\\ufdf0-\\ufdfb\\ufe70-\\ufe74\\ufe76-\\ufefc\\uff21-\\uff3a\\uff41-\\uff5a\\uff66-\\uffbe\\uffc2-\\uffc7\\uffca-\\uffcf\\uffd2-\\uffd7\\uffda-\\uffdc",s="\\u0300-\\u036f\\u0483-\\u0487\\u0591-\\u05bd\\u05bf\\u05c1\\u05c2\\u05c4\\u05c5\\u05c7\\u0610-\\u061a\\u0620-\\u0649\\u0672-\\u06d3\\u06e7-\\u06e8\\u06fb-\\u06fc\\u0730-\\u074a\\u0800-\\u0814\\u081b-\\u0823\\u0825-\\u0827\\u0829-\\u082d\\u0840-\\u0857\\u08e4-\\u08fe\\u0900-\\u0903\\u093a-\\u093c\\u093e-\\u094f\\u0951-\\u0957\\u0962-\\u0963\\u0966-\\u096f\\u0981-\\u0983\\u09bc\\u09be-\\u09c4\\u09c7\\u09c8\\u09d7\\u09df-\\u09e0\\u0a01-\\u0a03\\u0a3c\\u0a3e-\\u0a42\\u0a47\\u0a48\\u0a4b-\\u0a4d\\u0a51\\u0a66-\\u0a71\\u0a75\\u0a81-\\u0a83\\u0abc\\u0abe-\\u0ac5\\u0ac7-\\u0ac9\\u0acb-\\u0acd\\u0ae2-\\u0ae3\\u0ae6-\\u0aef\\u0b01-\\u0b03\\u0b3c\\u0b3e-\\u0b44\\u0b47\\u0b48\\u0b4b-\\u0b4d\\u0b56\\u0b57\\u0b5f-\\u0b60\\u0b66-\\u0b6f\\u0b82\\u0bbe-\\u0bc2\\u0bc6-\\u0bc8\\u0bca-\\u0bcd\\u0bd7\\u0be6-\\u0bef\\u0c01-\\u0c03\\u0c46-\\u0c48\\u0c4a-\\u0c4d\\u0c55\\u0c56\\u0c62-\\u0c63\\u0c66-\\u0c6f\\u0c82\\u0c83\\u0cbc\\u0cbe-\\u0cc4\\u0cc6-\\u0cc8\\u0cca-\\u0ccd\\u0cd5\\u0cd6\\u0ce2-\\u0ce3\\u0ce6-\\u0cef\\u0d02\\u0d03\\u0d46-\\u0d48\\u0d57\\u0d62-\\u0d63\\u0d66-\\u0d6f\\u0d82\\u0d83\\u0dca\\u0dcf-\\u0dd4\\u0dd6\\u0dd8-\\u0ddf\\u0df2\\u0df3\\u0e34-\\u0e3a\\u0e40-\\u0e45\\u0e50-\\u0e59\\u0eb4-\\u0eb9\\u0ec8-\\u0ecd\\u0ed0-\\u0ed9\\u0f18\\u0f19\\u0f20-\\u0f29\\u0f35\\u0f37\\u0f39\\u0f41-\\u0f47\\u0f71-\\u0f84\\u0f86-\\u0f87\\u0f8d-\\u0f97\\u0f99-\\u0fbc\\u0fc6\\u1000-\\u1029\\u1040-\\u1049\\u1067-\\u106d\\u1071-\\u1074\\u1082-\\u108d\\u108f-\\u109d\\u135d-\\u135f\\u170e-\\u1710\\u1720-\\u1730\\u1740-\\u1750\\u1772\\u1773\\u1780-\\u17b2\\u17dd\\u17e0-\\u17e9\\u180b-\\u180d\\u1810-\\u1819\\u1920-\\u192b\\u1930-\\u193b\\u1951-\\u196d\\u19b0-\\u19c0\\u19c8-\\u19c9\\u19d0-\\u19d9\\u1a00-\\u1a15\\u1a20-\\u1a53\\u1a60-\\u1a7c\\u1a7f-\\u1a89\\u1a90-\\u1a99\\u1b46-\\u1b4b\\u1b50-\\u1b59\\u1b6b-\\u1b73\\u1bb0-\\u1bb9\\u1be6-\\u1bf3\\u1c00-\\u1c22\\u1c40-\\u1c49\\u1c5b-\\u1c7d\\u1cd0-\\u1cd2\\u1d00-\\u1dbe\\u1e01-\\u1f15\\u200c\\u200d\\u203f\\u2040\\u2054\\u20d0-\\u20dc\\u20e1\\u20e5-\\u20f0\\u2d81-\\u2d96\\u2de0-\\u2dff\\u3021-\\u3028\\u3099\\u309a\\ua640-\\ua66d\\ua674-\\ua67d\\ua69f\\ua6f0-\\ua6f1\\ua7f8-\\ua800\\ua806\\ua80b\\ua823-\\ua827\\ua880-\\ua881\\ua8b4-\\ua8c4\\ua8d0-\\ua8d9\\ua8f3-\\ua8f7\\ua900-\\ua909\\ua926-\\ua92d\\ua930-\\ua945\\ua980-\\ua983\\ua9b3-\\ua9c0\\uaa00-\\uaa27\\uaa40-\\uaa41\\uaa4c-\\uaa4d\\uaa50-\\uaa59\\uaa7b\\uaae0-\\uaae9\\uaaf2-\\uaaf3\\uabc0-\\uabe1\\uabec\\uabed\\uabf0-\\uabf9\\ufb20-\\ufb28\\ufe00-\\ufe0f\\ufe20-\\ufe26\\ufe33\\ufe34\\ufe4d-\\ufe4f\\uff10-\\uff19\\uff3f",i="(?:\\\\u[0-9a-fA-F]{4}|["+u+l+"])",o="(?:\\\\u[0-9a-fA-F]{4}|["+f+l+s+"])*";R.identifier=new RegExp(i+o,"g"),R.identifierStart=new RegExp(i),R.identifierMatch=new RegExp("(?:\\\\u[0-9a-fA-F]{4}|["+f+l+s+"])+");var r=/[\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff]/;R.newline=/[\n\r\u2028\u2029]/,R.lineBreak=new RegExp(`\r
|
|
|`+R.newline.source),R.allLineBreaks=new RegExp(R.lineBreak.source,"g")},function(e,R,u){var f=u(6).Options,l=["before-newline","after-newline","preserve-newline"];function s(i){f.call(this,i,"js");var o=this.raw_options.brace_style||null;o==="expand-strict"?this.raw_options.brace_style="expand":o==="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 r=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_preserve_inline=!1,this.brace_style="collapse";for(var a=0;a<r.length;a++)r[a]==="preserve-inline"?this.brace_preserve_inline=!0:this.brace_style=r[a];this.unindent_chained_methods=this._get_boolean("unindent_chained_methods"),this.break_chained_methods=this._get_boolean("break_chained_methods"),this.space_in_paren=this._get_boolean("space_in_paren"),this.space_in_empty_paren=this._get_boolean("space_in_empty_paren"),this.jslint_happy=this._get_boolean("jslint_happy"),this.space_after_anon_function=this._get_boolean("space_after_anon_function"),this.space_after_named_function=this._get_boolean("space_after_named_function"),this.keep_array_indentation=this._get_boolean("keep_array_indentation"),this.space_before_conditional=this._get_boolean("space_before_conditional",!0),this.unescape_strings=this._get_boolean("unescape_strings"),this.e4x=this._get_boolean("e4x"),this.comma_first=this._get_boolean("comma_first"),this.operator_position=this._get_selection("operator_position",l),this.test_output_raw=this._get_boolean("test_output_raw"),this.jslint_happy&&(this.space_after_anon_function=!0)}s.prototype=new f,e.exports.Options=s},function(e){function R(l,s){this.raw_options=u(l,s),this.disabled=this._get_boolean("disabled"),this.eol=this._get_characters("eol","auto"),this.end_with_newline=this._get_boolean("end_with_newline"),this.indent_size=this._get_number("indent_size",4),this.indent_char=this._get_characters("indent_char"," "),this.indent_level=this._get_number("indent_level"),this.preserve_newlines=this._get_boolean("preserve_newlines",!0),this.max_preserve_newlines=this._get_number("max_preserve_newlines",32786),this.preserve_newlines||(this.max_preserve_newlines=0),this.indent_with_tabs=this._get_boolean("indent_with_tabs",this.indent_char===" "),this.indent_with_tabs&&(this.indent_char=" ",this.indent_size===1&&(this.indent_size=4)),this.wrap_line_length=this._get_number("wrap_line_length",this._get_number("max_char")),this.indent_empty_lines=this._get_boolean("indent_empty_lines"),this.templating=this._get_selection_list("templating",["auto","none","django","erb","handlebars","php","smarty"],["auto"])}R.prototype._get_array=function(l,s){var i=this.raw_options[l],o=s||[];return typeof i=="object"?i!==null&&typeof i.concat=="function"&&(o=i.concat()):typeof i=="string"&&(o=i.split(/[^a-zA-Z0-9_\/\-]+/)),o},R.prototype._get_boolean=function(l,s){var i=this.raw_options[l],o=i===void 0?!!s:!!i;return o},R.prototype._get_characters=function(l,s){var i=this.raw_options[l],o=s||"";return typeof i=="string"&&(o=i.replace(/\\r/,"\r").replace(/\\n/,`
|
|
`).replace(/\\t/," ")),o},R.prototype._get_number=function(l,s){var i=this.raw_options[l];s=parseInt(s,10),isNaN(s)&&(s=0);var o=parseInt(i,10);return isNaN(o)&&(o=s),o},R.prototype._get_selection=function(l,s,i){var o=this._get_selection_list(l,s,i);if(o.length!==1)throw new Error("Invalid Option Value: The option '"+l+`' can only be one of the following values:
|
|
`+s+`
|
|
You passed in: '`+this.raw_options[l]+"'");return o[0]},R.prototype._get_selection_list=function(l,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 o=this._get_array(l,i);if(!this._is_valid_selection(o,s))throw new Error("Invalid Option Value: The option '"+l+`' can contain only the following values:
|
|
`+s+`
|
|
You passed in: '`+this.raw_options[l]+"'");return o},R.prototype._is_valid_selection=function(l,s){return l.length&&s.length&&!l.some(function(i){return s.indexOf(i)===-1})};function u(l,s){var i={};l=f(l);var o;for(o in l)o!==s&&(i[o]=l[o]);if(s&&l[s])for(o in l[s])i[o]=l[s][o];return i}function f(l){var s={},i;for(i in l){var o=i.replace(/-/g,"_");s[o]=l[i]}return s}e.exports.Options=R,e.exports.normalizeOpts=f,e.exports.mergeOpts=u},function(e,R,u){var f=u(8).InputScanner,l=u(9).Tokenizer,s=u(9).TOKEN,i=u(13).Directives,o=u(4),r=u(12).Pattern,a=u(14).TemplatablePattern;function n(k,S){return S.indexOf(k)!==-1}var t={START_EXPR:"TK_START_EXPR",END_EXPR:"TK_END_EXPR",START_BLOCK:"TK_START_BLOCK",END_BLOCK:"TK_END_BLOCK",WORD:"TK_WORD",RESERVED:"TK_RESERVED",SEMICOLON:"TK_SEMICOLON",STRING:"TK_STRING",EQUALS:"TK_EQUALS",OPERATOR:"TK_OPERATOR",COMMA:"TK_COMMA",BLOCK_COMMENT:"TK_BLOCK_COMMENT",COMMENT:"TK_COMMENT",DOT:"TK_DOT",UNKNOWN:"TK_UNKNOWN",START:s.START,RAW:s.RAW,EOF:s.EOF},E=new i(/\/\*/,/\*\//),b=/0[xX][0123456789abcdefABCDEF_]*n?|0[oO][01234567_]*n?|0[bB][01_]*n?|\d[\d_]*n|(?:\.\d[\d_]*|\d[\d_]*\.?[\d_]*)(?:[eE][+-]?[\d_]+)?/,_=/[0-9]/,B=/[^\d\.]/,x=">>> === !== &&= ??= ||= << && >= ** != == <= >> || ?? |> < / - + > : & % ? ^ | *".split(" "),h=">>>= ... >>= <<= === >>> !== **= &&= ??= ||= => ^= :: /= << <= == && -= >= >> != -- += ** || ?? ++ %= &= *= |= |> = ! ? > < : / ^ - + * & % ~ |";h=h.replace(/[-[\]{}()*+?.,\\^$|#]/g,"\\$&"),h="\\?\\.(?!\\d) "+h,h=h.replace(/ /g,"|");var d=new RegExp(h),A="continue,try,throw,return,var,let,const,if,switch,case,default,for,while,break,function,import,export".split(","),c=A.concat(["do","in","of","else","get","set","new","catch","finally","typeof","yield","async","await","from","as","class","extends"]),w=new RegExp("^(?:"+c.join("|")+")$"),m,g=function(k,S){l.call(this,k,S),this._patterns.whitespace=this._patterns.whitespace.matching(/\u00A0\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff/.source,/\u2028\u2029/.source);var Q=new r(this._input),X=new a(this._input).read_options(this._options);this.__patterns={template:X,identifier:X.starting_with(o.identifier).matching(o.identifierMatch),number:Q.matching(b),punct:Q.matching(d),comment:Q.starting_with(/\/\//).until(/[\n\r\u2028\u2029]/),block_comment:Q.starting_with(/\/\*/).until_after(/\*\//),html_comment_start:Q.matching(/<!--/),html_comment_end:Q.matching(/-->/),include:Q.starting_with(/#include/).until_after(o.lineBreak),shebang:Q.starting_with(/#!/).until_after(o.lineBreak),xml:Q.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:X.until(/['\\\n\r\u2028\u2029]/),double_quote:X.until(/["\\\n\r\u2028\u2029]/),template_text:X.until(/[`\\$]/),template_expression:X.until(/[`}\\]/)}};g.prototype=new l,g.prototype._is_comment=function(k){return k.type===t.COMMENT||k.type===t.BLOCK_COMMENT||k.type===t.UNKNOWN},g.prototype._is_opening=function(k){return k.type===t.START_BLOCK||k.type===t.START_EXPR},g.prototype._is_closing=function(k,S){return(k.type===t.END_BLOCK||k.type===t.END_EXPR)&&S&&(k.text==="]"&&S.text==="["||k.text===")"&&S.text==="("||k.text==="}"&&S.text==="{")},g.prototype._reset=function(){m=!1},g.prototype._get_next_token=function(k,S){var Q=null;this._readWhitespace();var X=this._input.peek();return X===null?this._create_token(t.EOF,""):(Q=Q||this._read_non_javascript(X),Q=Q||this._read_string(X),Q=Q||this._read_word(k),Q=Q||this._read_singles(X),Q=Q||this._read_comment(X),Q=Q||this._read_regexp(X,k),Q=Q||this._read_xml(X,k),Q=Q||this._read_punctuation(),Q=Q||this._create_token(t.UNKNOWN,this._input.next()),Q)},g.prototype._read_word=function(k){var S;if(S=this.__patterns.identifier.read(),S!=="")return S=S.replace(o.allLineBreaks,`
|
|
`),!(k.type===t.DOT||k.type===t.RESERVED&&(k.text==="set"||k.text==="get"))&&w.test(S)?(S==="in"||S==="of")&&(k.type===t.WORD||k.type===t.STRING)?this._create_token(t.OPERATOR,S):this._create_token(t.RESERVED,S):this._create_token(t.WORD,S);if(S=this.__patterns.number.read(),S!=="")return this._create_token(t.WORD,S)},g.prototype._read_singles=function(k){var S=null;return k==="("||k==="["?S=this._create_token(t.START_EXPR,k):k===")"||k==="]"?S=this._create_token(t.END_EXPR,k):k==="{"?S=this._create_token(t.START_BLOCK,k):k==="}"?S=this._create_token(t.END_BLOCK,k):k===";"?S=this._create_token(t.SEMICOLON,k):k==="."&&B.test(this._input.peek(1))?S=this._create_token(t.DOT,k):k===","&&(S=this._create_token(t.COMMA,k)),S&&this._input.next(),S},g.prototype._read_punctuation=function(){var k=this.__patterns.punct.read();if(k!=="")return k==="="?this._create_token(t.EQUALS,k):k==="?."?this._create_token(t.DOT,k):this._create_token(t.OPERATOR,k)},g.prototype._read_non_javascript=function(k){var S="";if(k==="#"){if(this._is_first_token()&&(S=this.__patterns.shebang.read(),S))return this._create_token(t.UNKNOWN,S.trim()+`
|
|
`);if(S=this.__patterns.include.read(),S)return this._create_token(t.UNKNOWN,S.trim()+`
|
|
`);k=this._input.next();var Q="#";if(this._input.hasNext()&&this._input.testChar(_)){do k=this._input.next(),Q+=k;while(this._input.hasNext()&&k!=="#"&&k!=="=");return k==="#"||(this._input.peek()==="["&&this._input.peek(1)==="]"?(Q+="[]",this._input.next(),this._input.next()):this._input.peek()==="{"&&this._input.peek(1)==="}"&&(Q+="{}",this._input.next(),this._input.next())),this._create_token(t.WORD,Q)}this._input.back()}else if(k==="<"&&this._is_first_token()){if(S=this.__patterns.html_comment_start.read(),S){for(;this._input.hasNext()&&!this._input.testChar(o.newline);)S+=this._input.next();return m=!0,this._create_token(t.COMMENT,S)}}else if(m&&k==="-"&&(S=this.__patterns.html_comment_end.read(),S))return m=!1,this._create_token(t.COMMENT,S);return null},g.prototype._read_comment=function(k){var S=null;if(k==="/"){var Q="";if(this._input.peek(1)==="*"){Q=this.__patterns.block_comment.read();var X=E.get_directives(Q);X&&X.ignore==="start"&&(Q+=E.readIgnored(this._input)),Q=Q.replace(o.allLineBreaks,`
|
|
`),S=this._create_token(t.BLOCK_COMMENT,Q),S.directives=X}else this._input.peek(1)==="/"&&(Q=this.__patterns.comment.read(),S=this._create_token(t.COMMENT,Q))}return S},g.prototype._read_string=function(k){if(k==="`"||k==="'"||k==='"'){var S=this._input.next();return this.has_char_escapes=!1,k==="`"?S+=this._read_string_recursive("`",!0,"${"):S+=this._read_string_recursive(k),this.has_char_escapes&&this._options.unescape_strings&&(S=F(S)),this._input.peek()===k&&(S+=this._input.next()),S=S.replace(o.allLineBreaks,`
|
|
`),this._create_token(t.STRING,S)}return null},g.prototype._allow_regexp_or_xml=function(k){return k.type===t.RESERVED&&n(k.text,["return","case","throw","else","do","typeof","yield"])||k.type===t.END_EXPR&&k.text===")"&&k.opened.previous.type===t.RESERVED&&n(k.opened.previous.text,["if","while","for"])||n(k.type,[t.COMMENT,t.START_EXPR,t.START_BLOCK,t.START,t.END_BLOCK,t.OPERATOR,t.EQUALS,t.EOF,t.SEMICOLON,t.COMMA])},g.prototype._read_regexp=function(k,S){if(k==="/"&&this._allow_regexp_or_xml(S)){for(var Q=this._input.next(),X=!1,P=!1;this._input.hasNext()&&(X||P||this._input.peek()!==k)&&!this._input.testChar(o.newline);)Q+=this._input.peek(),X?X=!1:(X=this._input.peek()==="\\",this._input.peek()==="["?P=!0:this._input.peek()==="]"&&(P=!1)),this._input.next();return this._input.peek()===k&&(Q+=this._input.next(),Q+=this._input.read(o.identifier)),this._create_token(t.STRING,Q)}return null},g.prototype._read_xml=function(k,S){if(this._options.e4x&&k==="<"&&this._allow_regexp_or_xml(S)){var Q="",X=this.__patterns.xml.read_match();if(X){for(var P=X[2].replace(/^{\s+/,"{").replace(/\s+}$/,"}"),q=P.indexOf("{")===0,ie=0;X;){var be=!!X[1],me=X[2],Me=!!X[X.length-1]||me.slice(0,8)==="![CDATA[";if(!Me&&(me===P||q&&me.replace(/^{\s+/,"{").replace(/\s+}$/,"}"))&&(be?--ie:++ie),Q+=X[0],ie<=0)break;X=this.__patterns.xml.read_match()}return X||(Q+=this._input.match(/[\s\S]*/g)[0]),Q=Q.replace(o.allLineBreaks,`
|
|
`),this._create_token(t.STRING,Q)}}return null};function F(k){for(var S="",Q=0,X=new f(k),P=null;X.hasNext();)if(P=X.match(/([\s]|[^\\]|\\\\)+/g),P&&(S+=P[0]),X.peek()==="\\"){if(X.next(),X.peek()==="x")P=X.match(/x([0-9A-Fa-f]{2})/g);else if(X.peek()==="u")P=X.match(/u([0-9A-Fa-f]{4})/g);else{S+="\\",X.hasNext()&&(S+=X.next());continue}if(!P)return k;if(Q=parseInt(P[1],16),Q>126&&Q<=255&&P[0].indexOf("x")===0)return k;if(Q>=0&&Q<32){S+="\\"+P[0];continue}else Q===34||Q===39||Q===92?S+="\\"+String.fromCharCode(Q):S+=String.fromCharCode(Q)}return S}g.prototype._read_string_recursive=function(k,S,Q){var X,P;k==="'"?P=this.__patterns.single_quote:k==='"'?P=this.__patterns.double_quote:k==="`"?P=this.__patterns.template_text:k==="}"&&(P=this.__patterns.template_expression);for(var q=P.read(),ie="";this._input.hasNext();){if(ie=this._input.next(),ie===k||!S&&o.newline.test(ie)){this._input.back();break}else ie==="\\"&&this._input.hasNext()?(X=this._input.peek(),X==="x"||X==="u"?this.has_char_escapes=!0:X==="\r"&&this._input.peek(1)===`
|
|
`&&this._input.next(),ie+=this._input.next()):Q&&(Q==="${"&&ie==="$"&&this._input.peek()==="{"&&(ie+=this._input.next()),Q===ie&&(k==="`"?ie+=this._read_string_recursive("}",S,"`"):ie+=this._read_string_recursive("`",S,"${"),this._input.hasNext()&&(ie+=this._input.next())));ie+=P.read(),q+=ie}return q},e.exports.Tokenizer=g,e.exports.TOKEN=t,e.exports.positionable_operators=x.slice(),e.exports.line_starters=A.slice()},function(e){var R=RegExp.prototype.hasOwnProperty("sticky");function u(f){this.__input=f||"",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 f=null;return this.hasNext()&&(f=this.__input.charAt(this.__position),this.__position+=1),f},u.prototype.peek=function(f){var l=null;return f=f||0,f+=this.__position,f>=0&&f<this.__input_length&&(l=this.__input.charAt(f)),l},u.prototype.__match=function(f,l){f.lastIndex=l;var s=f.exec(this.__input);return s&&!(R&&f.sticky)&&(s.index!==l&&(s=null)),s},u.prototype.test=function(f,l){return l=l||0,l+=this.__position,l>=0&&l<this.__input_length?!!this.__match(f,l):!1},u.prototype.testChar=function(f,l){var s=this.peek(l);return f.lastIndex=0,s!==null&&f.test(s)},u.prototype.match=function(f){var l=this.__match(f,this.__position);return l?this.__position+=l[0].length:l=null,l},u.prototype.read=function(f,l,s){var i="",o;return f&&(o=this.match(f),o&&(i+=o[0])),l&&(o||!f)&&(i+=this.readUntil(l,s)),i},u.prototype.readUntil=function(f,l){var s="",i=this.__position;f.lastIndex=this.__position;var o=f.exec(this.__input);return o?(i=o.index,l&&(i+=o[0].length)):i=this.__input_length,s=this.__input.substring(this.__position,i),this.__position=i,s},u.prototype.readUntilAfter=function(f){return this.readUntil(f,!0)},u.prototype.get_regexp=function(f,l){var s=null,i="g";return l&&R&&(i="y"),typeof f=="string"&&f!==""?s=new RegExp(f,i):f&&(s=new RegExp(f.source,i)),s},u.prototype.get_literal_regexp=function(f){return RegExp(f.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},u.prototype.peekUntilAfter=function(f){var l=this.__position,s=this.readUntilAfter(f);return this.__position=l,s},u.prototype.lookBack=function(f){var l=this.__position-1;return l>=f.length&&this.__input.substring(l-f.length,l).toLowerCase()===f},e.exports.InputScanner=u},function(e,R,u){var f=u(8).InputScanner,l=u(3).Token,s=u(10).TokenStream,i=u(11).WhitespacePattern,o={START:"TK_START",RAW:"TK_RAW",EOF:"TK_EOF"},r=function(a,n){this._input=new f(a),this._options=n||{},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,n=new l(o.START,""),t=null,E=[],b=new s;n.type!==o.EOF;){for(a=this._get_next_token(n,t);this._is_comment(a);)b.add(a),a=this._get_next_token(n,t);b.isEmpty()||(a.comments_before=b,b=new s),a.parent=t,this._is_opening(a)?(E.push(t),t=a):t&&this._is_closing(a,t)&&(a.opened=t,t.closed=a,t=E.pop(),a.parent=t),a.previous=n,n.next=a,this.__tokens.add(a),n=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,n){this._readWhitespace();var t=this._input.read(/.+/g);return t?this._create_token(o.RAW,t):this._create_token(o.EOF,"")},r.prototype._is_comment=function(a){return!1},r.prototype._is_opening=function(a){return!1},r.prototype._is_closing=function(a,n){return!1},r.prototype._create_token=function(a,n){var t=new l(a,n,this._patterns.whitespace.newline_count,this._patterns.whitespace.whitespace_before_token);return t},r.prototype._readWhitespace=function(){return this._patterns.whitespace.read()},e.exports.Tokenizer=r,e.exports.TOKEN=o},function(e){function R(u){this.__tokens=[],this.__tokens_length=this.__tokens.length,this.__position=0,this.__parent_token=u}R.prototype.restart=function(){this.__position=0},R.prototype.isEmpty=function(){return this.__tokens_length===0},R.prototype.hasNext=function(){return this.__position<this.__tokens_length},R.prototype.next=function(){var u=null;return this.hasNext()&&(u=this.__tokens[this.__position],this.__position+=1),u},R.prototype.peek=function(u){var f=null;return u=u||0,u+=this.__position,u>=0&&u<this.__tokens_length&&(f=this.__tokens[u]),f},R.prototype.add=function(u){this.__parent_token&&(u.parent=this.__parent_token),this.__tokens.push(u),this.__tokens_length+=1},e.exports.TokenStream=R},function(e,R,u){var f=u(12).Pattern;function l(s,i){f.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=""}l.prototype=new f,l.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+"]")},l.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},l.prototype.matching=function(s,i){var o=this._create();return o.__set_whitespace_patterns(s,i),o._update(),o},l.prototype._create=function(){return new l(this._input,this)},l.prototype.__split=function(s,i){s.lastIndex=0;for(var o=0,r=[],a=s.exec(i);a;)r.push(i.substring(o,a.index)),o=a.index+a[0].length,a=s.exec(i);return o<i.length?r.push(i.substring(o,i.length)):r.push(""),r},e.exports.WhitespacePattern=l},function(e){function R(u,f){this._input=u,this._starting_pattern=null,this._match_pattern=null,this._until_pattern=null,this._until_after=!1,f&&(this._starting_pattern=this._input.get_regexp(f._starting_pattern,!0),this._match_pattern=this._input.get_regexp(f._match_pattern,!0),this._until_pattern=this._input.get_regexp(f._until_pattern),this._until_after=f._until_after)}R.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},R.prototype.read_match=function(){return this._input.match(this._match_pattern)},R.prototype.until_after=function(u){var f=this._create();return f._until_after=!0,f._until_pattern=this._input.get_regexp(u),f._update(),f},R.prototype.until=function(u){var f=this._create();return f._until_after=!1,f._until_pattern=this._input.get_regexp(u),f._update(),f},R.prototype.starting_with=function(u){var f=this._create();return f._starting_pattern=this._input.get_regexp(u,!0),f._update(),f},R.prototype.matching=function(u){var f=this._create();return f._match_pattern=this._input.get_regexp(u,!0),f._update(),f},R.prototype._create=function(){return new R(this._input,this)},R.prototype._update=function(){},e.exports.Pattern=R},function(e){function R(u,f){u=typeof u=="string"?u:u.source,f=typeof f=="string"?f:f.source,this.__directives_block_pattern=new RegExp(u+/ beautify( \w+[:]\w+)+ /.source+f,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(u+/\sbeautify\signore:end\s/.source+f,"g")}R.prototype.get_directives=function(u){if(!u.match(this.__directives_block_pattern))return null;var f={};this.__directive_pattern.lastIndex=0;for(var l=this.__directive_pattern.exec(u);l;)f[l[1]]=l[2],l=this.__directive_pattern.exec(u);return f},R.prototype.readIgnored=function(u){return u.readUntilAfter(this.__directives_end_ignore_pattern)},e.exports.Directives=R},function(e,R,u){var f=u(12).Pattern,l={django:!1,erb:!1,handlebars:!1,php:!1,smarty:!1};function s(i,o){f.call(this,i,o),this.__template_pattern=null,this._disabled=Object.assign({},l),this._excluded=Object.assign({},l),o&&(this.__template_pattern=this._input.get_regexp(o.__template_pattern),this._excluded=Object.assign(this._excluded,o._excluded),this._disabled=Object.assign(this._disabled,o._disabled));var r=new f(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 f,s.prototype._create=function(){return new s(this._input,this)},s.prototype._update=function(){this.__set_templated_pattern()},s.prototype.disable=function(i){var o=this._create();return o._disabled[i]=!0,o._update(),o},s.prototype.read_options=function(i){var o=this._create();for(var r in l)o._disabled[r]=i.templating.indexOf(r)===-1;return o._update(),o},s.prototype.exclude=function(i){var o=this._create();return o._excluded[i]=!0,o._update(),o},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 o=this._read_template();o;)this._match_pattern?o+=this._input.read(this._match_pattern):o+=this._input.readUntil(this.__template_pattern),i+=o,o=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="",o=this._input.peek();if(o==="<"){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 o==="{"&&(!this._disabled.handlebars&&!this._excluded.handlebars&&(i=i||this.__patterns.handlebars_comment.read(),i=i||this.__patterns.handlebars_unescaped.read(),i=i||this.__patterns.handlebars.read()),this._disabled.django||(!this._excluded.django&&!this._excluded.handlebars&&(i=i||this.__patterns.django_value.read()),this._excluded.django||(i=i||this.__patterns.django_comment.read(),i=i||this.__patterns.django.read())),this._disabled.smarty||this._disabled.django&&this._disabled.handlebars&&(i=i||this.__patterns.smarty_comment.read(),i=i||this.__patterns.smarty_literal.read(),i=i||this.__patterns.smarty.read()));return i},e.exports.TemplatablePattern=s}],L={};function $(e){var R=L[e];if(R!==void 0)return R.exports;var u=L[e]={exports:{}};return N[e](u,u.exports,$),u.exports}var H=$(0);U=H})();var V=U;!(Ae=[],z=function(){return{js_beautify:V}}.apply(Be,Ae),z!==void 0&&(wt.exports=z))})()},"6eGT":function(wt,Be,G){"use strict";function Ae(z){return null}Be.a=Ae},"746U":function(wt,Be,G){"use strict";G.d(Be,"f",function(){return Ae}),G.d(Be,"l",function(){return z}),G.d(Be,"k",function(){return U}),G.d(Be,"j",function(){return V}),G.d(Be,"g",function(){return N}),G.d(Be,"m",function(){return L}),G.d(Be,"h",function(){return $}),G.d(Be,"n",function(){return H}),G.d(Be,"c",function(){return e}),G.d(Be,"a",function(){return R}),G.d(Be,"i",function(){return u}),G.d(Be,"o",function(){return f}),G.d(Be,"e",function(){return i}),G.d(Be,"d",function(){return o}),G.d(Be,"p",function(){return r}),G.d(Be,"b",function(){return a});function Ae(n){return Array.isArray(n)}function z(n){return typeof n=="string"}function U(n){return typeof n=="object"&&n!==null&&!Array.isArray(n)&&!(n instanceof RegExp)&&!(n instanceof Date)}function V(n){return typeof n=="number"&&!isNaN(n)}function N(n){return n===!0||n===!1}function L(n){return typeof n=="undefined"}function $(n){return!H(n)}function H(n){return L(n)||n===null}function e(n,t){if(!n)throw new Error(t?`Unexpected type, expected '${t}'`:"Unexpected type")}function R(n){if(H(n))throw new Error("Assertion Failed: argument is undefined or null");return n}function u(n){return typeof n=="function"}function f(n,t){const E=Math.min(n.length,t.length);for(let b=0;b<E;b++)l(n[b],t[b])}function l(n,t){if(z(t)){if(typeof n!==t)throw new Error(`argument does not match constraint: typeof ${t}`)}else if(u(t)){try{if(n instanceof t)return}catch(E){}if(!H(n)&&n.constructor===t)return;if(t.length===1&&t.call(void 0,n)===!0)return;throw new Error("argument does not match one of these constraints: arg instanceof constraint, arg.constructor === constraint, nor constraint(arg) === true")}}function s(n){let t=[],E=Object.getPrototypeOf(n);for(;Object.prototype!==E;)t=t.concat(Object.getOwnPropertyNames(E)),E=Object.getPrototypeOf(E);return t}function i(n){const t=[];for(const E of s(n))typeof n[E]=="function"&&t.push(E);return t}function o(n,t){const E=_=>function(){const B=Array.prototype.slice.call(arguments,0);return t(_,B)};let b={};for(const _ of n)b[_]=E(_);return b}function r(n){return n===null?void 0:n}function a(n,t="Unreachable"){throw new Error(t)}},"815F":function(wt,Be,G){"use strict";G.d(Be,"e",function(){return $}),G.d(Be,"c",function(){return e}),G.d(Be,"d",function(){return R}),G.d(Be,"a",function(){return f}),G.d(Be,"f",function(){return l}),G.d(Be,"b",function(){return s});var Ae=G("KQm4"),z=G("VTBJ"),U=G("Ff2n"),V=G("Zm9Q"),N=G("Kwbf"),L=G("OZM5");function $(i,o){return i!=null?i:o}function H(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],o=new Map;function r(a){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";(a||[]).forEach(function(t){var E=t.key,b=t.children;Object(N.a)(E!=null,"Tree node must have a certain key: [".concat(n).concat(E,"]"));var _=String(E);Object(N.a)(!o.has(_)||E===null||E===void 0,"Same 'key' exist in the Tree: ".concat(_)),o.set(_,!0),r(b,"".concat(n).concat(_," > "))})}r(i)}function e(i){function o(r){var a=Object(V.a)(r);return a.map(function(n){if(!Object(L.i)(n))return Object(N.a)(!n,"Tree/TreeNode can only accept TreeNode as children."),null;var t=n.key,E=n.props,b=E.children,_=Object(U.a)(E,["children"]),B=Object(z.a)({key:t},_),x=o(b);return x.length&&(B.children=x),B}).filter(function(n){return n})}return o(i)}function R(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],r=new Set(o===!0?[]:o),a=[];function n(t){var E=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return t.map(function(b,_){var B=Object(L.h)(E?E.pos:"0",_),x=$(b.key,B),h=Object(z.a)(Object(z.a)({},b),{},{parent:E,pos:B,children:null,data:b,isStart:[].concat(Object(Ae.a)(E?E.isStart:[]),[_===0]),isEnd:[].concat(Object(Ae.a)(E?E.isEnd:[]),[_===t.length-1])});return a.push(h),o===!0||r.has(x)?h.children=n(b.children||[],h):h.children=[],h})}return n(i),a}function u(i,o,r){var a;r?typeof r=="string"?a=function(E){return E[r]}:typeof r=="function"&&(a=function(E){return r(E)}):a=function(E,b){return $(E.key,b)};function n(t,E,b){var _=t?t.children:i,B=t?Object(L.h)(b.pos,E):"0";if(t){var x=a(t,B),h={node:t,index:E,pos:B,key:x,parentPos:b.node?b.pos:null,level:b.level+1};o(h)}_&&_.forEach(function(d,A){n(d,A,{node:t,pos:B,level:b?b.level+1:-1})})}n(null)}function f(i){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=o.initWrapper,a=o.processEntity,n=o.onProcessFinished,t=arguments.length>2?arguments[2]:void 0,E={},b={},_={posEntities:E,keyEntities:b};return r&&(_=r(_)||_),u(i,function(B){var x=B.node,h=B.index,d=B.pos,A=B.key,c=B.parentPos,w=B.level,m={node:x,index:h,key:A,pos:d,level:w},g=$(A,d);E[d]=m,b[g]=m,m.parent=E[c],m.parent&&(m.parent.children=m.parent.children||[],m.parent.children.push(m)),a&&a(m,_)},t),n&&n(_),_}function l(i,o){var r=o.expandedKeys,a=o.selectedKeys,n=o.loadedKeys,t=o.loadingKeys,E=o.checkedKeys,b=o.halfCheckedKeys,_=o.dragOverNodeKey,B=o.dropPosition,x=o.keyEntities,h=x[i],d={eventKey:i,expanded:r.indexOf(i)!==-1,selected:a.indexOf(i)!==-1,loaded:n.indexOf(i)!==-1,loading:t.indexOf(i)!==-1,checked:E.indexOf(i)!==-1,halfChecked:b.indexOf(i)!==-1,pos:String(h?h.pos:""),dragOver:_===i&&B===0,dragOverGapTop:_===i&&B===-1,dragOverGapBottom:_===i&&B===1};return d}function s(i){var o=i.data,r=i.expanded,a=i.selected,n=i.checked,t=i.loaded,E=i.loading,b=i.halfChecked,_=i.dragOver,B=i.dragOverGapTop,x=i.dragOverGapBottom,h=i.pos,d=i.active,A=Object(z.a)(Object(z.a)({},o),{},{expanded:r,selected:a,checked:n,loaded:t,loading:E,halfChecked:b,dragOver:_,dragOverGapTop:B,dragOverGapBottom:x,pos:h,active:d});return"props"in A||Object.defineProperty(A,"props",{get:function(){return Object(N.a)(!1,"Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`."),i}}),A}},"8HAY":function(wt,Be,G){"use strict";G.d(Be,"a",function(){return N}),G.d(Be,"b",function(){return L}),G.d(Be,"d",function(){return $}),G.d(Be,"e",function(){return H}),G.d(Be,"c",function(){return e});var Ae=G("MI8n"),z=G("pmY6"),U=G("3/fG"),V=function(R,u,f,l){function s(i){return i instanceof f?i:new f(function(o){o(i)})}return new(f||(f=Promise))(function(i,o){function r(t){try{n(l.next(t))}catch(E){o(E)}}function a(t){try{n(l.throw(t))}catch(E){o(E)}}function n(t){t.done?i(t.value):s(t.value).then(r,a)}n((l=l.apply(R,u||[])).next())})};class N extends z.a{constructor(R,u="",f="",l=!0,s){super();this._onDidChange=this._register(new Ae.b),this.onDidChange=this._onDidChange.event,this._enabled=!0,this._id=R,this._label=u,this._cssClass=f,this._enabled=l,this._actionCallback=s}get id(){return this._id}get label(){return this._label}set label(R){this._setLabel(R)}_setLabel(R){this._label!==R&&(this._label=R,this._onDidChange.fire({label:R}))}get tooltip(){return this._tooltip||""}set tooltip(R){this._setTooltip(R)}_setTooltip(R){this._tooltip!==R&&(this._tooltip=R,this._onDidChange.fire({tooltip:R}))}get class(){return this._cssClass}set class(R){this._setClass(R)}_setClass(R){this._cssClass!==R&&(this._cssClass=R,this._onDidChange.fire({class:R}))}get enabled(){return this._enabled}set enabled(R){this._setEnabled(R)}_setEnabled(R){this._enabled!==R&&(this._enabled=R,this._onDidChange.fire({enabled:R}))}get checked(){return this._checked}set checked(R){this._setChecked(R)}_setChecked(R){this._checked!==R&&(this._checked=R,this._onDidChange.fire({checked:R}))}run(R,u){return V(this,void 0,void 0,function*(){this._actionCallback&&(yield this._actionCallback(R))})}}class L extends z.a{constructor(){super(...arguments);this._onBeforeRun=this._register(new Ae.b),this.onBeforeRun=this._onBeforeRun.event,this._onDidRun=this._register(new Ae.b),this.onDidRun=this._onDidRun.event}run(R,u){return V(this,void 0,void 0,function*(){if(!R.enabled)return;this._onBeforeRun.fire({action:R});let f;try{yield this.runAction(R,u)}catch(l){f=l}this._onDidRun.fire({action:R,error:f})})}runAction(R,u){return V(this,void 0,void 0,function*(){yield R.run(u)})}}class $ extends N{constructor(R){super($.ID,R,R?"separator text":"separator");this.checked=!1,this.enabled=!1}}$.ID="vs.actions.separator";class H{constructor(R,u,f,l){this.tooltip="",this.enabled=!0,this.checked=!1,this.id=R,this.label=u,this.class=l,this._actions=f}get actions(){return this._actions}dispose(){}run(){return V(this,void 0,void 0,function*(){})}}class e extends N{constructor(){super(e.ID,U.a("submenu.empty","(empty)"),void 0,!1)}}e.ID="vs.actions.empty"},"8hTe":function(wt,Be,G){wt.exports={button:"button___1wy9m"}},"9Bee":function(wt,Be,G){"use strict";var Ae=G("DYRE"),z=G("zeV3"),U=G("+L6B"),V=G("2/Rp"),N=G("k1fw"),L=G("9og8"),$=G("tJVT"),H=G("WmNS"),e=G.n(H),R=G("q1tI"),u=G.n(R),f=G("vg9a"),l=G("DlQD"),s=G.n(l),i=G("rUJ1");function o(j,v){var C=j.match(/^(\s+)(?:```)/);if(C===null)return v;var K=C[1];return v.split(`
|
|
`).map(function(re){var W=re.match(/^\s+/);if(W===null)return re;var Ie=Object($.a)(W,1),rt=Ie[0];return rt.length>=K.length?re.slice(K.length):re}).join(`
|
|
`)}var r=[],a=["<ul>"],n=new s.a.Renderer,t=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function E(){r.length=0,a=["<ul>"]}var b={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function _(j,v,C,K){if(v>=j.length||j[v].level<=C)return v;var re=j[v];K.push("<li><a href='#"+re.anchor+"'>"+re.text+"</a>"),v++;var W=[];return v=_(j,v,re.level,W),W.length>0&&(K.push("<ul>"),W.forEach(function(Ie){K.push(Ie)}),K.push("</ul>")),K.push("</li>"),v=_(j,v,C,K),v}function B(){return _(r,0,0,a),a.push("</ul>"),a.join("")}var x={heading:function(v){var C=t.exec(v);if(C)return{type:"heading",raw:C[0],depth:C[1].length,text:C[2]}},fences:function(v){var C=this.rules.block.fences.exec(v);if(C){var K=C[0],re=o(K,C[3]||""),W=C[2]?C[2].trim():C[2];if(["latex","katex","math"].indexOf(W)>=0){var Ie=A(),rt=re;re=Ie,c[Ie]={type:"block",expression:rt}}return{type:"code",raw:K,lang:W,text:re}}}},h=/(?:\${2})([^\n`]+?)(?:\${2})/gi,d=0,A=function(){return"__special_katext_id_".concat(d++,"__")},c={};function w(){return c}function m(){d=0,c={}}function g(j){return j=j.replace(h,function(v,C){var K=A();return c[K]={type:"inline",expression:C},K}),j}var F=n.listitem;n.listitem=function(j){return F(g(j))};var k=n.paragraph;n.paragraph=function(j){return k(g(j))};var S=n.tablecell;n.tablecell=function(j,v){return S(g(j),v)},n.code=function(j,v,C){var K=(v||"").match(/\S*/)[0];return K?["latex","katex","math"].indexOf(K)>=0?"<p class='editormd-tex'>".concat(j,"</p>"):'<pre class="prettyprint linenums"><code class="language-'.concat(v,'">').concat(C?j:Object(i.escape)(j,!0),`</code></pre>
|
|
`):'<pre class="prettyprint linenums"><code>'+(C?j:Object(i.escape)(j,!0))+"</code></pre>"},n.heading=function(j,v,C){var K=this.options.headerPrefix+C.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return r.push({anchor:K,level:v,text:j}),"<h"+v+' id="'+K+'">'+j+"</h"+v+">"},s.a.setOptions({silent:!0,gfm:!0,pedantic:!1}),s.a.use({tokenizer:x,renderer:n});var Q=s.a,X=G("SJMd"),P=G("ulZh"),q=G.n(P),ie=G("m3rI"),be=G("Oy/b"),me=G("p5ED"),Me=G("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 Ne=function(j,v){return(Ne=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(C,K){C.__proto__=K}||function(C,K){for(var re in K)Object.prototype.hasOwnProperty.call(K,re)&&(C[re]=K[re])})(j,v)};function ke(j,v){function C(){this.constructor=j}Ne(j,v),j.prototype=v===null?Object.create(v):(C.prototype=v.prototype,new C)}function Ke(j,v,C,K){return new(C||(C=Promise))(function(re,W){function Ie(Ct){try{vt(K.next(Ct))}catch(ot){W(ot)}}function rt(Ct){try{vt(K.throw(Ct))}catch(ot){W(ot)}}function vt(Ct){var ot;Ct.done?re(Ct.value):(ot=Ct.value,ot instanceof C?ot:new C(function(Pt){Pt(ot)})).then(Ie,rt)}vt((K=K.apply(j,v||[])).next())})}function Ye(j,v){var C,K,re,W,Ie={label:0,sent:function(){if(1&re[0])throw re[1];return re[1]},trys:[],ops:[]};return W={next:rt(0),throw:rt(1),return:rt(2)},typeof Symbol=="function"&&(W[Symbol.iterator]=function(){return this}),W;function rt(vt){return function(Ct){return function(ot){if(C)throw new TypeError("Generator is already executing.");for(;Ie;)try{if(C=1,K&&(re=2&ot[0]?K.return:ot[0]?K.throw||((re=K.return)&&re.call(K),0):K.next)&&!(re=re.call(K,ot[1])).done)return re;switch(K=0,re&&(ot=[2&ot[0],re.value]),ot[0]){case 0:case 1:re=ot;break;case 4:return Ie.label++,{value:ot[1],done:!1};case 5:Ie.label++,K=ot[1],ot=[0];continue;case 7:ot=Ie.ops.pop(),Ie.trys.pop();continue;default:if(!(re=Ie.trys,(re=re.length>0&&re[re.length-1])||ot[0]!==6&&ot[0]!==2)){Ie=0;continue}if(ot[0]===3&&(!re||ot[1]>re[0]&&ot[1]<re[3])){Ie.label=ot[1];break}if(ot[0]===6&&Ie.label<re[1]){Ie.label=re[1],re=ot;break}if(re&&Ie.label<re[2]){Ie.label=re[2],Ie.ops.push(ot);break}re[2]&&Ie.ops.pop(),Ie.trys.pop();continue}ot=v.call(j,Ie)}catch(Pt){ot=[6,Pt],K=0}finally{C=re=0}if(5&ot[0])throw ot[1];return{value:ot[0]?ot[1]:void 0,done:!0}}([vt,Ct])}}}function _e(){for(var j=0,v=0,C=arguments.length;v<C;v++)j+=arguments[v].length;var K=Array(j),re=0;for(v=0;v<C;v++)for(var W=arguments[v],Ie=0,rt=W.length;Ie<rt;Ie++,re++)K[re]=W[Ie];return K}var Te=function(){function j(){}return j.createDefs=function(){return document.createElementNS("http://www.w3.org/2000/svg","defs")},j.setAttributes=function(v,C){for(var K=0,re=C;K<re.length;K++){var W=re[K],Ie=W[0],rt=W[1];v.setAttribute(Ie,rt)}},j.createRect=function(v,C,K){var re=document.createElementNS("http://www.w3.org/2000/svg","rect");return re.setAttribute("width",v.toString()),re.setAttribute("height",C.toString()),K&&j.setAttributes(re,K),re},j.createLine=function(v,C,K,re,W){var Ie=document.createElementNS("http://www.w3.org/2000/svg","line");return Ie.setAttribute("x1",v.toString()),Ie.setAttribute("y1",C.toString()),Ie.setAttribute("x2",K.toString()),Ie.setAttribute("y2",re.toString()),W&&j.setAttributes(Ie,W),Ie},j.createPolygon=function(v,C){var K=document.createElementNS("http://www.w3.org/2000/svg","polygon");return K.setAttribute("points",v),C&&j.setAttributes(K,C),K},j.createCircle=function(v,C){var K=document.createElementNS("http://www.w3.org/2000/svg","circle");return K.setAttribute("cx",(v/2).toString()),K.setAttribute("cy",(v/2).toString()),K.setAttribute("r",v.toString()),C&&j.setAttributes(K,C),K},j.createEllipse=function(v,C,K){var re=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return re.setAttribute("cx",(v/2).toString()),re.setAttribute("cy",(C/2).toString()),re.setAttribute("rx",(v/2).toString()),re.setAttribute("ry",(C/2).toString()),K&&j.setAttributes(re,K),re},j.createGroup=function(v){var C=document.createElementNS("http://www.w3.org/2000/svg","g");return v&&j.setAttributes(C,v),C},j.createTransform=function(){return document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGTransform()},j.createMarker=function(v,C,K,re,W,Ie,rt){var vt=document.createElementNS("http://www.w3.org/2000/svg","marker");return j.setAttributes(vt,[["id",v],["orient",C],["markerWidth",K.toString()],["markerHeight",re.toString()],["refX",W.toString()],["refY",Ie.toString()]]),vt.appendChild(rt),vt},j.createText=function(v){var C=document.createElementNS("http://www.w3.org/2000/svg","text");return C.setAttribute("x","0"),C.setAttribute("y","0"),v&&j.setAttributes(C,v),C},j.createTSpan=function(v,C){var K=document.createElementNS("http://www.w3.org/2000/svg","tspan");return K.textContent=v,C&&j.setAttributes(K,C),K},j.createImage=function(v){var C=document.createElementNS("http://www.w3.org/2000/svg","image");return v&&j.setAttributes(C,v),C},j.createPoint=function(v,C){var K=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return K.x=v,K.y=C,K},j.createPath=function(v,C){var K=document.createElementNS("http://www.w3.org/2000/svg","path");return K.setAttribute("d",v),C&&j.setAttributes(K,C),K},j}(),Pe=function(){function j(){}return j.addKey=function(v){j.key=v},Object.defineProperty(j,"isLicensed",{get:function(){return!!j.key&&new RegExp(/^MJS2-[A-Z][0-9]{3}-[A-Z][0-9]{3}-[0-9]{4}$/,"i").test(j.key)},enumerable:!1,configurable:!0}),j}(),bt=function(){function j(){this.naturalSize=!1,this.imageType="image/png",this.markersOnly=!1}return j.prototype.rasterize=function(v,C,K){var re=this;return new Promise(function(W){var Ie=K!==void 0?K:document.createElement("canvas");v===null&&(re.markersOnly=!0,re.naturalSize=!1);var rt=document.createElementNS("http://www.w3.org/2000/svg","svg");rt.setAttribute("xmlns","http://www.w3.org/2000/svg"),rt.setAttribute("width",C.width.baseVal.valueAsString),rt.setAttribute("height",C.height.baseVal.valueAsString),rt.setAttribute("viewBox","0 0 "+C.viewBox.baseVal.width.toString()+" "+C.viewBox.baseVal.height.toString()),rt.innerHTML=C.innerHTML,re.naturalSize===!0?(rt.width.baseVal.value=v.naturalWidth,rt.height.baseVal.value=v.naturalHeight):re.width!==void 0&&re.height!==void 0&&(rt.width.baseVal.value=re.width,rt.height.baseVal.value=re.height),Ie.width=rt.width.baseVal.value,Ie.height=rt.height.baseVal.value;var vt=rt.outerHTML,Ct=Ie.getContext("2d");re.markersOnly!==!0&&Ct.drawImage(v,0,0,Ie.width,Ie.height);var ot=window.URL,Pt=new Image(Ie.width,Ie.height);Pt.setAttribute("crossOrigin","anonymous");var Ot=new Blob([vt],{type:"image/svg+xml"}),Ht=ot.createObjectURL(Ot);Pt.onload=function(){Ct.drawImage(Pt,0,0),ot.revokeObjectURL(Ht);var er=Ie.toDataURL(re.imageType,re.imageQuality);W(er)},Pt.src=Ht})},j}(),mt=function(){},dt=function(){function j(v){this._classNamePrefixBase="__markerjs2_",this.classes=[],this.rules=[],this.settings=this.defaultSettings,this._classNamePrefix=this._classNamePrefixBase+"_"+v+"_"}return Object.defineProperty(j.prototype,"classNamePrefixBase",{get:function(){return this._classNamePrefixBase},enumerable:!1,configurable:!0}),Object.defineProperty(j.prototype,"classNamePrefix",{get:function(){return this._classNamePrefix},enumerable:!1,configurable:!0}),Object.defineProperty(j.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(j.prototype,"fadeInAnimationClassName",{get:function(){return this.classNamePrefix+"fade_in"},enumerable:!1,configurable:!0}),Object.defineProperty(j.prototype,"fadeOutAnimationClassName",{get:function(){return this.classNamePrefix+"fade_out"},enumerable:!1,configurable:!0}),j.prototype.addClass=function(v){return this.styleSheet===void 0&&this.addStyleSheet(),v.name=""+this.classNamePrefix+v.localName,this.classes.push(v),this.styleSheet.sheet.insertRule("."+v.name+" {"+v.style+"}",this.styleSheet.sheet.cssRules.length),v},j.prototype.addRule=function(v){this.styleSheet===void 0&&this.addStyleSheet(),this.rules.push(v),this.styleSheet.sheet.insertRule(v.selector+" {"+v.style+"}",this.styleSheet.sheet.cssRules.length)},j.prototype.addStyleSheet=function(){var v;this.styleSheet=document.createElement("style"),((v=this.styleSheetRoot)!==null&&v!==void 0?v:document.head).appendChild(this.styleSheet),this.addRule(new yt("."+this.classNamePrefix+" h3","font-family: sans-serif")),this.addRule(new yt("@keyframes "+this.classNamePrefix+"_fade_in_animation_frames",`
|
|
from {
|
|
opacity: 0;
|
|
}
|
|
to {
|
|
opacity: 1;
|
|
}
|
|
`)),this.addRule(new yt("@keyframes "+this.classNamePrefix+"_fade_out_animation_frames",`
|
|
from {
|
|
opacity: 1;
|
|
}
|
|
to {
|
|
opacity: 0;
|
|
}
|
|
`)),this.addClass(new le("fade_in",`
|
|
animation-duration: 0.3s;
|
|
animation-name: `+this.classNamePrefix+`_fade_in_animation_frames;
|
|
`)),this.addClass(new le("fade_out",`
|
|
animation-duration: 0.3s;
|
|
animation-name: `+this.classNamePrefix+`_fade_out_animation_frames;
|
|
`))},j.prototype.removeStyleSheet=function(){var v;this.styleSheet&&(((v=this.styleSheetRoot)!==null&&v!==void 0?v:document.head).removeChild(this.styleSheet),this.styleSheet=void 0)},j}(),yt=function(j,v){this.selector=j,this.style=v},le=function(j,v){this.localName=j,this.style=v},Z=function(){function j(v,C,K,re,W){this.buttons=[],this.markerButtons=[],this.buttonClickListeners=[],this.markerjsContainer=v,this.displayMode=C,this.markerItems=K,this.uiStyleSettings=re,this.styles=W,this.addStyles(),this.adjustLayout=this.adjustLayout.bind(this),this.overflowButtonClicked=this.overflowButtonClicked.bind(this),this.setCurrentMarker=this.setCurrentMarker.bind(this)}return j.prototype.show=function(v){var C=this;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=v,this.uiContainer.className=this.toolbarStyleClass.name+" "+this.styles.fadeInAnimationClassName+" "+(this.uiStyleSettings.toolbarStyleColorsClassName?this.uiStyleSettings.toolbarStyleColorsClassName:this.toolbarStyleColorsClass.name);var K=document.createElement("div");K.className=this.toolbarBlockStyleClass.name,K.style.whiteSpace="nowrap",this.uiContainer.appendChild(K),this.addActionButton(K,'<svg viewBox="0 0 24 24"><path d="M10.07 14.27a.997.997 0 011.33.48l2.3 4.99 1.8-.85-2.31-4.98c-.24-.5-.02-1.1.48-1.33l.28-.08 2.3-.45L8 5.12V15.9l1.82-1.47.25-.16m3.57 7.7a.99.99 0 01-1.33-.47l-2.18-4.74-2.51 2.02c-.17.14-.38.22-.62.22a1 1 0 01-1-1V3a1 1 0 011-1c.24 0 .47.09.64.23l.01-.01 11.49 9.64a1.001 1.001 0 01-.44 1.75l-3.16.62 2.2 4.73c.26.5.02 1.09-.48 1.32l-3.62 1.69z"/></svg>',"select"),this.addActionButton(K,'<svg viewBox="0 0 24 24"><path d="M9 3v1H4v2h1v13a2 2 0 002 2h10a2 2 0 002-2V6h1V4h-5V3H9M7 6h10v13H7V6m2 2v9h2V8H9m4 0v9h2V8h-2z"/></svg>',"delete"),this.uiStyleSettings.clearButtonVisible&&this.addActionButton(K,'<svg viewBox="0 0 24 24"><path d="M19.36 2.72l1.42 1.42-5.72 5.71c1.07 1.54 1.22 3.39.32 4.59L9.06 8.12c1.2-.9 3.05-.75 4.59.32l5.71-5.72M5.93 17.57c-2.01-2.01-3.24-4.41-3.58-6.65l4.88-2.09 7.44 7.44-2.09 4.88c-2.24-.34-4.64-1.57-6.65-3.58z"/></svg>',"clear"),this.uiStyleSettings.undoButtonVisible&&this.addActionButton(K,'<svg viewBox="0 0 24 24"><path d="M12.5 8c-2.65 0-5.05 1-6.9 2.6L2 7v9h9l-3.62-3.62c1.39-1.16 3.16-1.88 5.12-1.88 3.54 0 6.55 2.31 7.6 5.5l2.37-.78C21.08 11.03 17.15 8 12.5 8z"/></svg>',"undo"),this.uiStyleSettings.redoButtonVisible&&this.addActionButton(K,'<svg viewBox="0 0 24 24"><path d="M18.4 10.6C16.55 9 14.15 8 11.5 8c-4.65 0-8.58 3.03-9.96 7.22L3.9 16a8.002 8.002 0 017.6-5.5c1.95 0 3.73.72 5.12 1.88L13 16h9V7l-3.6 3.6z"/></svg>',"redo"),this.uiStyleSettings.zoomButtonVisible&&this.addActionButton(K,'<svg viewBox="0 0 24 24"><path d="M15.5 14l5 5-1.5 1.5-5-5v-.79l-.27-.28A6.471 6.471 0 019.5 16 6.5 6.5 0 013 9.5 6.5 6.5 0 019.5 3 6.5 6.5 0 0116 9.5c0 1.61-.59 3.09-1.57 4.23l.28.27h.79m-6 0C12 14 14 12 14 9.5S12 5 9.5 5 5 7 5 9.5 7 14 9.5 14m2.5-4h-2v2H9v-2H7V9h2V7h1v2h2v1z"/></svg>',"zoom"),this.uiStyleSettings.zoomButtonVisible&&this.uiStyleSettings.zoomOutButtonVisible&&this.addActionButton(K,'<svg viewBox="0 0 24 24"><path d="M15.5 14h-.79l-.28-.27A6.471 6.471 0 0016 9.5 6.5 6.5 0 009.5 3 6.5 6.5 0 003 9.5 6.5 6.5 0 009.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 5 1.5-1.5-5-5m-6 0C7 14 5 12 5 9.5S7 5 9.5 5 14 7 14 9.5 12 14 9.5 14M7 9h5v1H7V9z"/></svg>',"zoom-out"),this.uiStyleSettings.notesButtonVisible&&this.addActionButton(K,'<svg viewBox="0 0 24 24"><path d="M18.13 12l1.26-1.26c.44-.44 1-.68 1.61-.74V9l-6-6H5c-1.11 0-2 .89-2 2v14a2 2 0 002 2h6v-1.87l.13-.13H5V5h7v7h6.13M14 4.5l5.5 5.5H14V4.5m5.13 9.33l2.04 2.04L15.04 22H13v-2.04l6.13-6.13m3.72.36l-.98.98-2.04-2.04.98-.98c.19-.2.52-.2.72 0l1.32 1.32c.2.2.2.53 0 .72z"/></svg>',"notes"),this.markerButtonBlock=document.createElement("div"),this.markerButtonBlock.className=this.toolbarBlockStyleClass.name,this.markerButtonBlock.style.flexGrow="2",this.markerButtonBlock.style.textAlign="center",this.uiContainer.appendChild(this.markerButtonBlock),this.markerButtonOverflowBlock=document.createElement("div"),this.markerButtonOverflowBlock.className=this.toolbarOverflowBlockStyleClass.name+" "+(this.uiStyleSettings.toolbarOverflowBlockStyleColorsClassName?this.uiStyleSettings.toolbarOverflowBlockStyleColorsClassName:this.toolbarOverflowBlockStyleColorsClass.name),this.markerButtonOverflowBlock.style.display="none",this.uiContainer.appendChild(this.markerButtonOverflowBlock),this.markerItems&&(this.markerItems.forEach(function(W){var Ie=document.createElement("div");Ie.className=""+C.toolbarButtonStyleClass.name,Ie.setAttribute("data-type-name",W.typeName),Ie.innerHTML=W.icon,Ie.addEventListener("click",function(){C.markerToolbarButtonClicked(Ie,W)}),C.buttons.push(Ie),C.markerButtons.push(Ie)}),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 re=document.createElement("div");re.className=this.toolbarBlockStyleClass.name,re.style.whiteSpace="nowrap",re.style.display=this.uiStyleSettings.resultButtonBlockVisible!==!1?"":"none",this.uiContainer.appendChild(re),this.addActionButton(re,'<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(re,'<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()},j.prototype.addButtonClickListener=function(v){this.buttonClickListeners.push(v)},j.prototype.removeButtonClickListener=function(v){this.buttonClickListeners.indexOf(v)>-1&&this.buttonClickListeners.splice(this.buttonClickListeners.indexOf(v),1)},j.prototype.setSelectMode=function(){this.resetButtonStyles(),this.setActiveButton(this.buttons[0])},j.prototype.adjustLayout=function(){if(this.markerButtons&&this.markerButtons.length>0){var v=Math.floor(this.markerButtonBlock.clientWidth/this.uiStyleSettings.toolbarHeight)-1;this.markerButtonBlock.innerHTML="",this.markerButtonOverflowBlock.innerHTML="";for(var C=0;C<this.markerButtons.length;C++)C<v||C===v&&this.markerButtons.length-1===v?this.markerButtonBlock.appendChild(this.markerButtons[C]):(C===v&&this.markerButtonBlock.appendChild(this.overflowButton),this.markerButtonOverflowBlock.appendChild(this.markerButtons[C]))}},j.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")},j.prototype.resetButtonStyles=function(){var v=this;this.buttons.forEach(function(C){C.className=C.className.replace(v.uiStyleSettings.toolbarButtonStyleColorsClassName?v.uiStyleSettings.toolbarButtonStyleColorsClassName:v.toolbarButtonStyleColorsClass.name,"").trim(),C.className=C.className.replace(v.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?v.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:v.toolbarActiveButtonStyleColorsClass.name,"").trim(),C.className+=" "+(v.uiStyleSettings.toolbarButtonStyleColorsClassName?v.uiStyleSettings.toolbarButtonStyleColorsClassName:v.toolbarButtonStyleColorsClass.name)})},j.prototype.addActionButton=function(v,C,K){var re=this,W=document.createElement("div");switch(W.className=""+this.toolbarButtonStyleClass.name,W.innerHTML=C,W.setAttribute("data-action",K),W.addEventListener("click",function(){re.actionToolbarButtonClicked(W,K)}),K){case"select":W.style.fill=this.uiStyleSettings.selectButtonColor;break;case"delete":case"clear":W.style.fill=this.uiStyleSettings.deleteButtonColor;break;case"undo":case"redo":W.style.fill=this.uiStyleSettings.selectButtonColor;break;case"render":W.style.fill=this.uiStyleSettings.okButtonColor;break;case"close":W.style.fill=this.uiStyleSettings.closeButtonColor}v.appendChild(W),this.buttons.push(W)},j.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new le("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 le("toolbar_colors",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
box-shadow: 0px 3px rgba(33, 33, 33, 0.1);
|
|
`)),this.toolbarBlockStyleClass=this.styles.addClass(new le("toolbar-block",`
|
|
display: inline-block;
|
|
box-sizing: content-box;
|
|
`)),this.toolbarOverflowBlockStyleClass=this.styles.addClass(new le("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 le("toolbar-overflow-block_colors",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
`));var v=this.uiStyleSettings.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new le("toolbar_button",`
|
|
display: inline-block;
|
|
width: `+(this.uiStyleSettings.toolbarHeight-2*v)+`px;
|
|
height: `+(this.uiStyleSettings.toolbarHeight-2*v)+`px;
|
|
padding: `+v+`px;
|
|
box-sizing: content-box;
|
|
`)),this.toolbarButtonStyleColorsClass=this.styles.addClass(new le("toolbar_button_colors",`
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
`)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new le("toolbar_active_button",`
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
`)),this.styles.addRule(new yt("."+this.toolbarButtonStyleClass.name+" svg",`
|
|
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
|
|
`)),this.styles.addRule(new yt("."+this.toolbarButtonStyleColorsClass.name+":hover",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
`))},j.prototype.markerToolbarButtonClicked=function(v,C){this.setActiveButton(v),this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(K){return K("marker",C)}),this.markerButtonOverflowBlock.style.display="none"},j.prototype.actionToolbarButtonClicked=function(v,C){this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(K){return K("action",C)}),this.markerButtonOverflowBlock.style.display="none",this.setActiveButton(this.buttons[0])},j.prototype.setActiveButton=function(v){this.resetButtonStyles(),v.className=v.className.replace(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,"").trim(),v.className+=" "+(this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name)},j.prototype.setActiveMarkerButton=function(v){var C=this.markerButtons.find(function(K){return K.getAttribute("data-type-name")===v});C&&this.setActiveButton(C)},j.prototype.setCurrentMarker=function(v){var C=this;this.currentMarker=v,this.buttons.filter(function(K){return/delete|notes/.test(K.getAttribute("data-action"))}).forEach(function(K){C.currentMarker===void 0?(K.style.fillOpacity="0.4",K.style.pointerEvents="none"):(K.style.fillOpacity="1",K.style.pointerEvents="all")})},j}(),te=function(){function j(v,C,K,re){this.panels=[],this.panelButtons=[],this.markerjsContainer=v,this.displayMode=C,this.uiStyleSettings=K,this.styles=re,this.panelButtonClick=this.panelButtonClick.bind(this),this.addStyles()}return j.prototype.addStyles=function(){var v;this.toolboxStyleClass=this.styles.addClass(new le("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 le("toolbox_colors",`
|
|
color: `+this.uiStyleSettings.toolboxColor+`;
|
|
`));var C=this.uiStyleSettings.toolbarHeight/4;this.toolboxButtonRowStyleClass=this.styles.addClass(new le("toolbox-button-row",`
|
|
display: flex;
|
|
cursor: default;
|
|
box-sizing: content-box;
|
|
`)),this.toolboxButtonRowStyleColorsClass=this.styles.addClass(new le("toolbox-button-row_colors",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
`)),this.toolboxPanelRowStyleClass=this.styles.addClass(new le("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 le("toolbox-panel-row_colors",`
|
|
background-color: `+((v=this.uiStyleSettings.toolboxBackgroundColor)!==null&&v!==void 0?v:this.uiStyleSettings.toolbarBackgroundHoverColor)+`;
|
|
`)),this.toolboxButtonStyleClass=this.styles.addClass(new le("toolbox_button",`
|
|
display: inline-block;
|
|
width: `+(this.uiStyleSettings.toolbarHeight-2*C)+`px;
|
|
height: `+(this.uiStyleSettings.toolbarHeight-2*C)+`px;
|
|
padding: `+C+`px;
|
|
box-sizing: content-box;
|
|
`)),this.toolboxButtonStyleColorsClass=this.styles.addClass(new le("toolbox-button_colors",`
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
`)),this.toolboxActiveButtonStyleColorsClass=this.styles.addClass(new le("toolbox-active-button_colors",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`;
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
`)),this.styles.addRule(new yt("."+this.toolboxButtonStyleColorsClass.name+":hover",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
`)),this.styles.addRule(new yt("."+this.toolboxButtonStyleClass.name+" svg",`
|
|
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
|
|
`))},j.prototype.show=function(v){var C;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=v,this.uiContainer.className=this.toolboxStyleClass.name+" "+((C=this.uiStyleSettings.toolboxStyleColorsClassName)!==null&&C!==void 0?C:this.toolboxStyleColorsClass.name),this.markerjsContainer.appendChild(this.uiContainer)},j.prototype.setPanelButtons=function(v){var C,K,re=this;this.panels=v,this.uiContainer!==void 0&&(this.uiContainer.innerHTML="",this.panelRow=document.createElement("div"),this.panelRow.className=this.toolboxPanelRowStyleClass.name+" "+((C=this.uiStyleSettings.toolboxPanelRowStyleColorsClassName)!==null&&C!==void 0?C:this.toolboxPanelRowStyleColorsClass.name),this.uiContainer.appendChild(this.panelRow),this.buttonRow=document.createElement("div"),this.buttonRow.className=this.toolboxButtonRowStyleClass.name+" "+((K=this.uiStyleSettings.toolboxButtonRowStyleColorsClassName)!==null&&K!==void 0?K:this.toolboxButtonRowStyleColorsClass.name)+" ",this.uiContainer.appendChild(this.buttonRow),this.panelButtons.splice(0),this.panels.forEach(function(W){var Ie;W.uiStyleSettings=re.uiStyleSettings;var rt=document.createElement("div");rt.className=re.toolboxButtonStyleClass.name+" "+((Ie=re.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&Ie!==void 0?Ie:re.toolboxButtonStyleColorsClass.name),rt.innerHTML=W.icon,rt.title=W.title,rt.addEventListener("click",function(){re.panelButtonClick(W)}),re.panelButtons.push(rt),re.buttonRow.appendChild(rt)}),this.displayMode==="inline"?this.panelRow.style.display="none":this.panelRow.style.visibility="hidden")},j.prototype.panelButtonClick=function(v){var C=this,K=-1;if(v!==this.activePanel){K=this.panels.indexOf(v),this.panelRow.innerHTML="";var re=v.getUi();re.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.panelRow.appendChild(re),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=v}else this.activePanel=void 0,this.panelRow.className=this.panelRow.className.replace(this.styles.fadeInAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeOutAnimationClassName,setTimeout(function(){C.displayMode==="inline"?C.panelRow.style.display="none":C.panelRow.style.visibility="hidden"},200);this.panelButtons.forEach(function(W,Ie){var rt,vt;W.className=C.toolboxButtonStyleClass.name+" "+(Ie===K?""+((rt=C.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)!==null&&rt!==void 0?rt:C.toolboxActiveButtonStyleColorsClass.name):""+((vt=C.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&vt!==void 0?vt:C.toolboxButtonStyleColorsClass.name))})},j}(),ee=function(j,v){this.title=j,this.icon=v},ue=function(j){function v(C,K,re,W){var Ie=j.call(this,C,W||'<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 Ie.colors=[],Ie.addTransparent=!1,Ie.colorBoxes=[],Ie.colors=K,Ie.currentColor=re,Ie.setCurrentColor=Ie.setCurrentColor.bind(Ie),Ie.getColorBox=Ie.getColorBox.bind(Ie),Ie}return ke(v,j),v.prototype.getUi=function(){var C=this,K=document.createElement("div");return K.style.overflow="hidden",K.style.whiteSpace="nowrap",this.colors.forEach(function(re){var W=C.getColorBox(re);K.appendChild(W),C.colorBoxes.push(W)}),K},v.prototype.getColorBox=function(C){var K=this,re=this.uiStyleSettings.toolbarHeight/4,W=this.uiStyleSettings.toolbarHeight-re,Ie=document.createElement("div");Ie.style.display="inline-block",Ie.style.boxSizing="content-box",Ie.style.width=W-2+"px",Ie.style.height=W-2+"px",Ie.style.padding="1px",Ie.style.marginRight="2px",Ie.style.marginBottom="2px",Ie.style.borderWidth="2px",Ie.style.borderStyle="solid",Ie.style.borderRadius=(W+2)/2+"px",Ie.style.borderColor=C===this.currentColor?this.uiStyleSettings.toolboxAccentColor:"transparent",Ie.addEventListener("click",function(){K.setCurrentColor(C,Ie)});var rt=document.createElement("div");return rt.style.display="inline-block",rt.style.width=W-2+"px",rt.style.height=W-2+"px",rt.style.backgroundColor=C,rt.style.borderRadius=W/2+"px",C==="transparent"&&(rt.style.fill=this.uiStyleSettings.toolboxAccentColor,rt.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>`),Ie.appendChild(rt),Ie},v.prototype.setCurrentColor=function(C,K){var re=this;this.currentColor=C,this.colorBoxes.forEach(function(W){W.style.borderColor=W===K?re.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onColorChanged&&this.onColorChanged(C)},v}(ee),ye=function(){function j(v,C,K){this._state="new",this._isSelected=!1,this._container=v,this._overlayContainer=C,this.globalSettings=K,this.stateChanged=this.stateChanged.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this)}return Object.defineProperty(j.prototype,"typeName",{get:function(){return Object.getPrototypeOf(this).constructor.typeName},enumerable:!1,configurable:!0}),Object.defineProperty(j.prototype,"container",{get:function(){return this._container},enumerable:!1,configurable:!0}),Object.defineProperty(j.prototype,"overlayContainer",{get:function(){return this._overlayContainer},enumerable:!1,configurable:!0}),Object.defineProperty(j.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),Object.defineProperty(j.prototype,"toolboxPanels",{get:function(){return[]},enumerable:!1,configurable:!0}),j.prototype.ownsTarget=function(v){return!1},Object.defineProperty(j.prototype,"isSelected",{get:function(){return this._isSelected},enumerable:!1,configurable:!0}),j.prototype.select=function(){this.container.style.cursor="move",this._isSelected=!0,this.manipulationStartState=this.getState()},j.prototype.deselect=function(){this.container.style.cursor="default",this._isSelected=!1,this.stateChanged()},j.prototype.pointerDown=function(v,C){},j.prototype.dblClick=function(v,C){},j.prototype.manipulate=function(v){},j.prototype.pointerUp=function(v){this.stateChanged()},j.prototype.dispose=function(){},j.prototype.addMarkerVisualToContainer=function(v){this.container.childNodes.length>0?this.container.insertBefore(v,this.container.childNodes[0]):this.container.appendChild(v)},j.prototype.getState=function(){return{typeName:j.typeName,state:this.state,notes:this.notes}},j.prototype.restoreState=function(v){this._state=v.state,this.notes=v.notes},j.prototype.scale=function(v,C){},j.prototype.colorChanged=function(v){this.onColorChanged&&this.onColorChanged(v),this.stateChanged()},j.prototype.fillColorChanged=function(v){this.onFillColorChanged&&this.onFillColorChanged(v),this.stateChanged()},j.prototype.stateChanged=function(){if(this.onStateChanged&&this.state!=="creating"&&this.state!=="new"){var v=this.getState();this.manipulationStartState!==void 0&&(this.manipulationStartState.state="select"),v.state="select",JSON.stringify(this.manipulationStartState)!=JSON.stringify(v)&&this.onStateChanged(this)}},j.typeName="MarkerBase",j}(),ve=function(){function j(){this.findGripByVisual=this.findGripByVisual.bind(this)}return j.prototype.findGripByVisual=function(v){return this.topLeft.ownsTarget(v)?this.topLeft:this.topCenter.ownsTarget(v)?this.topCenter:this.topRight.ownsTarget(v)?this.topRight:this.centerLeft.ownsTarget(v)?this.centerLeft:this.centerRight.ownsTarget(v)?this.centerRight:this.bottomLeft.ownsTarget(v)?this.bottomLeft:this.bottomCenter.ownsTarget(v)?this.bottomCenter:this.bottomRight.ownsTarget(v)?this.bottomRight:void 0},j}(),Je=function(){function j(){this.GRIP_SIZE=10,this.visual=Te.createGroup(),this.visual.appendChild(Te.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(Te.createCircle(this.GRIP_SIZE,[["fill","#cccccc"],["fill-opacity","0.7"],["stroke","#333333"],["stroke-width","2"],["stroke-opacity","0.7"]]))}return j.prototype.ownsTarget=function(v){return v===this.visual||v===this.visual.childNodes[0]||v===this.visual.childNodes[1]},j}(),tt=function(){function j(){}return j.toITransformMatrix=function(v){return{a:v.a,b:v.b,c:v.c,d:v.d,e:v.e,f:v.f}},j.toSVGMatrix=function(v,C){return v.a=C.a,v.b=C.b,v.c=C.c,v.d=C.d,v.e=C.e,v.f=C.f,v},j}(),it=function(j){function v(C,K,re){var W=j.call(this,C,K,re)||this;return W.left=0,W.top=0,W.width=0,W.height=0,W.defaultSize={x:50,y:20},W.offsetX=0,W.offsetY=0,W.rotationAngle=0,W.CB_DISTANCE=10,W._suppressMarkerCreateEvent=!1,W.container.transform.baseVal.appendItem(Te.createTransform()),W.setupControlBox(),W}return ke(v,j),Object.defineProperty(v.prototype,"centerX",{get:function(){return this.left+this.width/2},enumerable:!1,configurable:!0}),Object.defineProperty(v.prototype,"centerY",{get:function(){return this.top+this.height/2},enumerable:!1,configurable:!0}),Object.defineProperty(v.prototype,"visual",{get:function(){return this._visual},set:function(C){this._visual=C;var K=Te.createTransform();this._visual.transform.baseVal.appendItem(K)},enumerable:!1,configurable:!0}),v.prototype.ownsTarget=function(C){return!!j.prototype.ownsTarget.call(this,C)||!!(this.controlGrips.findGripByVisual(C)!==void 0||this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(C))},v.prototype.pointerDown=function(C,K){j.prototype.pointerDown.call(this,C,K),this.state==="new"&&(this.left=C.x,this.top=C.y),this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.manipulationStartWidth=this.width,this.manipulationStartHeight=this.height;var re=this.unrotatePoint(C);if(this.manipulationStartX=re.x,this.manipulationStartY=re.y,this.offsetX=re.x-this.left,this.offsetY=re.y-this.top,this.state!=="new")if(this.select(),this.activeGrip=this.controlGrips.findGripByVisual(K),this.activeGrip!==void 0)this._state="resize";else if(this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(K)){this.activeGrip=this.rotatorGrip;var W=this.rotatePoint({x:this.centerX,y:this.centerY});this.left=W.x-this.width/2,this.top=W.y-this.height/2,this.moveVisual({x:this.left,y:this.top});var Ie=this.container.transform.baseVal.getItem(0);Ie.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(Ie,0),this.adjustControlBox(),this._state="rotate"}else this._state="move"},v.prototype.pointerUp=function(C){var K=this.state;j.prototype.pointerUp.call(this,C),this.state==="creating"&&this.width<10&&this.height<10?(this.width=this.defaultSize.x,this.height=this.defaultSize.y):this.manipulate(C),this._state="select",K==="creating"&&this.onMarkerCreated&&this._suppressMarkerCreateEvent===!1&&this.onMarkerCreated(this)},v.prototype.moveVisual=function(C){this.visual.style.transform="translate("+C.x+"px, "+C.y+"px)"},v.prototype.manipulate=function(C){var K=this.unrotatePoint(C);this.state==="creating"?this.resize(C):this.state==="move"?(this.left=this.manipulationStartLeft+(K.x-this.manipulationStartLeft)-this.offsetX,this.top=this.manipulationStartTop+(K.y-this.manipulationStartTop)-this.offsetY,this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()):this.state==="resize"?this.resize(K):this.state==="rotate"&&this.rotate(C)},v.prototype.resize=function(C){var K=this.manipulationStartLeft,re=this.manipulationStartWidth,W=this.manipulationStartTop,Ie=this.manipulationStartHeight;switch(this.activeGrip){case this.controlGrips.bottomLeft:case this.controlGrips.centerLeft:case this.controlGrips.topLeft:K=this.manipulationStartLeft+C.x-this.manipulationStartX,re=this.manipulationStartWidth+this.manipulationStartLeft-K;break;case this.controlGrips.bottomRight:case this.controlGrips.centerRight:case this.controlGrips.topRight:case void 0:re=this.manipulationStartWidth+C.x-this.manipulationStartX}switch(this.activeGrip){case this.controlGrips.topCenter:case this.controlGrips.topLeft:case this.controlGrips.topRight:W=this.manipulationStartTop+C.y-this.manipulationStartY,Ie=this.manipulationStartHeight+this.manipulationStartTop-W;break;case this.controlGrips.bottomCenter:case this.controlGrips.bottomLeft:case this.controlGrips.bottomRight:case void 0:Ie=this.manipulationStartHeight+C.y-this.manipulationStartY}re>=0?(this.left=K,this.width=re):(this.left=K+re,this.width=-re),Ie>=0?(this.top=W,this.height=Ie):(this.top=W+Ie,this.height=-Ie),this.setSize()},v.prototype.setSize=function(){this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()},v.prototype.rotate=function(C){if(Math.abs(C.x-this.centerX)>.1){var K=Math.sign(C.x-this.centerX);this.rotationAngle=180*Math.atan((C.y-this.centerY)/(C.x-this.centerX))/Math.PI+90*K,this.applyRotation()}},v.prototype.applyRotation=function(){var C=this.container.transform.baseVal.getItem(0);C.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(C,0)},v.prototype.rotatePoint=function(C){if(this.rotationAngle===0)return C;var K=this.container.getCTM(),re=Te.createPoint(C.x,C.y);return{x:(re=re.matrixTransform(K)).x,y:re.y}},v.prototype.unrotatePoint=function(C){if(this.rotationAngle===0)return C;var K=this.container.getCTM();K=K.inverse();var re=Te.createPoint(C.x,C.y);return{x:(re=re.matrixTransform(K)).x,y:re.y}},v.prototype.select=function(){j.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},v.prototype.deselect=function(){j.prototype.deselect.call(this),this.controlBox.style.display="none"},v.prototype.setupControlBox=function(){this.controlBox=Te.createGroup();var C=Te.createTransform();C.setTranslate(-this.CB_DISTANCE/2,-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.appendItem(C),this.container.appendChild(this.controlBox),this.controlRect=Te.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=Te.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 ve,this.addControlGrips(),this.controlBox.style.display="none"},v.prototype.adjustControlBox=function(){var C=this.controlBox.transform.baseVal.getItem(0);C.setTranslate(this.left-this.CB_DISTANCE/2,this.top-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.replaceItem(C,0),this.controlRect.setAttribute("width",(this.width+this.CB_DISTANCE).toString()),this.controlRect.setAttribute("height",(this.height+this.CB_DISTANCE).toString()),this.rotatorGripLine!==void 0&&(this.rotatorGripLine.setAttribute("x1",((this.width+this.CB_DISTANCE)/2).toString()),this.rotatorGripLine.setAttribute("y1",(-this.CB_DISTANCE/2).toString()),this.rotatorGripLine.setAttribute("x2",((this.width+this.CB_DISTANCE)/2).toString()),this.rotatorGripLine.setAttribute("y2",(3*-this.CB_DISTANCE).toString())),this.positionGrips()},v.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()},v.prototype.createGrip=function(){var C=new Je;return C.visual.transform.baseVal.appendItem(Te.createTransform()),this.controlBox.appendChild(C.visual),C},v.prototype.positionGrips=function(){var C=this.controlGrips.topLeft.GRIP_SIZE,K=-C/2,re=K,W=(this.width+this.CB_DISTANCE)/2-C/2,Ie=(this.height+this.CB_DISTANCE)/2-C/2,rt=this.height+this.CB_DISTANCE-C/2,vt=this.width+this.CB_DISTANCE-C/2;this.positionGrip(this.controlGrips.topLeft.visual,K,re),this.positionGrip(this.controlGrips.topCenter.visual,W,re),this.positionGrip(this.controlGrips.topRight.visual,vt,re),this.positionGrip(this.controlGrips.centerLeft.visual,K,Ie),this.positionGrip(this.controlGrips.centerRight.visual,vt,Ie),this.positionGrip(this.controlGrips.bottomLeft.visual,K,rt),this.positionGrip(this.controlGrips.bottomCenter.visual,W,rt),this.positionGrip(this.controlGrips.bottomRight.visual,vt,rt),this.rotatorGrip!==void 0&&this.positionGrip(this.rotatorGrip.visual,W,re-3*this.CB_DISTANCE)},v.prototype.positionGrip=function(C,K,re){var W=C.transform.baseVal.getItem(0);W.setTranslate(K,re),C.transform.baseVal.replaceItem(W,0)},v.prototype.hideControlBox=function(){this.controlBox.style.display="none"},v.prototype.showControlBox=function(){this.controlBox.style.display=""},v.prototype.getState=function(){return Object.assign({left:this.left,top:this.top,width:this.width,height:this.height,rotationAngle:this.rotationAngle,visualTransformMatrix:tt.toITransformMatrix(this.visual.transform.baseVal.getItem(0).matrix),containerTransformMatrix:tt.toITransformMatrix(this.container.transform.baseVal.getItem(0).matrix)},j.prototype.getState.call(this))},v.prototype.restoreState=function(C){j.prototype.restoreState.call(this,C);var K=C;this.left=K.left,this.top=K.top,this.width=K.width,this.height=K.height,this.rotationAngle=K.rotationAngle,this.visual.transform.baseVal.getItem(0).setMatrix(tt.toSVGMatrix(this.visual.transform.baseVal.getItem(0).matrix,K.visualTransformMatrix)),this.container.transform.baseVal.getItem(0).setMatrix(tt.toSVGMatrix(this.container.transform.baseVal.getItem(0).matrix,K.containerTransformMatrix))},v.prototype.scale=function(C,K){j.prototype.scale.call(this,C,K);var re=this.rotatePoint({x:this.left,y:this.top}),W=this.unrotatePoint({x:re.x*C,y:re.y*K});this.left=W.x,this.top=W.y,this.width=this.width*C,this.height=this.height*K,this.adjustControlBox()},v}(ye),st=function(j){function v(C,K,re){var W=j.call(this,C,K,re)||this;return W.fillColor="transparent",W.strokeColor="transparent",W.strokeWidth=0,W.strokeDasharray="",W.opacity=1,W.setStrokeColor=W.setStrokeColor.bind(W),W.setFillColor=W.setFillColor.bind(W),W.setStrokeWidth=W.setStrokeWidth.bind(W),W.setStrokeDasharray=W.setStrokeDasharray.bind(W),W.createVisual=W.createVisual.bind(W),W}return ke(v,j),v.prototype.ownsTarget=function(C){return!(!j.prototype.ownsTarget.call(this,C)&&C!==this.visual)},v.prototype.createVisual=function(){this.visual=Te.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)},v.prototype.pointerDown=function(C,K){j.prototype.pointerDown.call(this,C,K),this.state==="new"&&(this.createVisual(),this.moveVisual(C),this._state="creating")},v.prototype.manipulate=function(C){j.prototype.manipulate.call(this,C)},v.prototype.resize=function(C){j.prototype.resize.call(this,C),this.setSize()},v.prototype.setSize=function(){j.prototype.setSize.call(this),Te.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]])},v.prototype.pointerUp=function(C){j.prototype.pointerUp.call(this,C),this.setSize()},v.prototype.setStrokeColor=function(C){this.strokeColor=C,this.visual&&Te.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(C),this.stateChanged()},v.prototype.setFillColor=function(C){this.fillColor=C,this.visual&&Te.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},v.prototype.setStrokeWidth=function(C){this.strokeWidth=C,this.visual&&Te.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},v.prototype.setStrokeDasharray=function(C){this.strokeDasharray=C,this.visual&&Te.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},v.prototype.getState=function(){return Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},j.prototype.getState.call(this))},v.prototype.restoreState=function(C){var K=C;this.fillColor=K.fillColor,this.strokeColor=K.strokeColor,this.strokeWidth=K.strokeWidth,this.strokeDasharray=K.strokeDasharray,this.opacity=K.opacity,this.createVisual(),j.prototype.restoreState.call(this,C),this.setSize()},v.prototype.scale=function(C,K){j.prototype.scale.call(this,C,K),this.setSize()},v.title="Rectangle marker",v}(it),ht=function(j){function v(C,K,re,W){var Ie=j.call(this,C,W||'<svg viewBox="0 0 24 24"><path d="M3 17h18v-2H3v2m0 3h18v-1H3v1m0-7h18v-3H3v3m0-9v4h18V4H3z"/></svg>')||this;return Ie.widths=[],Ie.widthBoxes=[],Ie.widths=K,Ie.currentWidth=re,Ie.setCurrentWidth=Ie.setCurrentWidth.bind(Ie),Ie}return ke(v,j),v.prototype.getUi=function(){var C=this,K=document.createElement("div");return K.style.display="flex",K.style.overflow="hidden",K.style.flexGrow="2",this.widths.forEach(function(re){var W=document.createElement("div");W.style.display="flex",W.style.flexGrow="2",W.style.alignItems="center",W.style.justifyContent="space-between",W.style.padding="5px",W.style.borderWidth="2px",W.style.borderStyle="solid",W.style.borderColor=re===C.currentWidth?C.uiStyleSettings.toolboxAccentColor:"transparent",W.addEventListener("click",function(){C.setCurrentWidth(re,W)}),K.appendChild(W);var Ie=document.createElement("div");Ie.innerText=re.toString(),Ie.style.marginRight="5px",W.appendChild(Ie);var rt=document.createElement("div");rt.style.minHeight="20px",rt.style.flexGrow="2",rt.style.display="flex",rt.style.alignItems="center";var vt=document.createElement("hr");vt.style.minWidth="20px",vt.style.border="0px",vt.style.borderTop=re+"px solid "+C.uiStyleSettings.toolboxColor,vt.style.flexGrow="2",rt.appendChild(vt),W.appendChild(rt),C.widthBoxes.push(W)}),K},v.prototype.setCurrentWidth=function(C,K){var re=this;this.currentWidth=C,this.widthBoxes.forEach(function(W){W.style.borderColor=W===K?re.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},v}(ee),_t=function(j){function v(C,K,re,W){var Ie=j.call(this,C,W||'<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 Ie.styles=[],Ie.styleBoxes=[],Ie.styles=K,Ie.currentStyle=re,Ie.setCurrentStyle=Ie.setCurrentStyle.bind(Ie),Ie}return ke(v,j),v.prototype.getUi=function(){var C=this,K=document.createElement("div");return K.style.display="flex",K.style.overflow="hidden",K.style.flexGrow="2",this.styles.forEach(function(re){var W=document.createElement("div");W.style.display="flex",W.style.alignItems="center",W.style.justifyContent="space-between",W.style.padding="5px",W.style.borderWidth="2px",W.style.borderStyle="solid",W.style.overflow="hidden",W.style.maxWidth=100/C.styles.length-5+"%",W.style.borderColor=re===C.currentStyle?C.uiStyleSettings.toolboxAccentColor:"transparent",W.addEventListener("click",function(){C.setCurrentStyle(re,W)}),K.appendChild(W);var Ie=document.createElement("div");Ie.style.minHeight="20px",Ie.style.flexGrow="2",Ie.style.overflow="hidden";var rt=`<svg width="100" height="20">
|
|
<line x1="0" y1="10" x2="100" y2="10" stroke="`+C.uiStyleSettings.toolboxColor+'" stroke-width="3" '+(re!==""?'stroke-dasharray="'+re+'"':"")+` />
|
|
</svg>`;Ie.innerHTML=rt,W.appendChild(Ie),C.styleBoxes.push(W)}),K},v.prototype.setCurrentStyle=function(C,K){var re=this;this.currentStyle=C,this.styleBoxes.forEach(function(W){W.style.borderColor=W===K?re.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},v}(ee),He=function(j){function v(C,K,re){var W=j.call(this,C,K,re)||this;return W.strokeColor=re.defaultColor,W.strokeWidth=re.defaultStrokeWidth,W.strokeDasharray=re.defaultStrokeDasharray,W.strokePanel=new ue("Line color",re.defaultColorSet,re.defaultColor),W.strokePanel.onColorChanged=W.setStrokeColor,W.strokeWidthPanel=new ht("Line width",re.defaultStrokeWidths,re.defaultStrokeWidth),W.strokeWidthPanel.onWidthChanged=W.setStrokeWidth,W.strokeStylePanel=new _t("Line style",re.defaultStrokeDasharrays,re.defaultStrokeDasharray),W.strokeStylePanel.onStyleChanged=W.setStrokeDasharray,W}return ke(v,j),Object.defineProperty(v.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),v.prototype.getState=function(){var C=j.prototype.getState.call(this);return C.typeName=v.typeName,C},v.typeName="FrameMarker",v.title="Frame marker",v.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4m14 11H6V8h12v9z"/></svg>',v}(st),Xe=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},at=function(j){function v(C,K,re){var W=j.call(this,C,K,re)||this;return W.x1=0,W.y1=0,W.x2=0,W.y2=0,W.defaultLength=50,W.manipulationStartX=0,W.manipulationStartY=0,W.manipulationStartX1=0,W.manipulationStartY1=0,W.manipulationStartX2=0,W.manipulationStartY2=0,W.setupControlBox(),W}return ke(v,j),v.prototype.ownsTarget=function(C){return!!j.prototype.ownsTarget.call(this,C)||!(!this.grip1.ownsTarget(C)&&!this.grip2.ownsTarget(C))},v.prototype.pointerDown=function(C,K){j.prototype.pointerDown.call(this,C,K),this.manipulationStartX=C.x,this.manipulationStartY=C.y,this.state==="new"&&(this.x1=C.x,this.y1=C.y,this.x2=C.x,this.y2=C.y),this.manipulationStartX1=this.x1,this.manipulationStartY1=this.y1,this.manipulationStartX2=this.x2,this.manipulationStartY2=this.y2,this.state!=="new"&&(this.select(),this.grip1.ownsTarget(K)?this.activeGrip=this.grip1:this.grip2.ownsTarget(K)?this.activeGrip=this.grip2:this.activeGrip=void 0,this.activeGrip?this._state="resize":this._state="move")},v.prototype.pointerUp=function(C){var K=this.state;j.prototype.pointerUp.call(this,C),this.state==="creating"&&Math.abs(this.x1-this.x2)<10&&Math.abs(this.y1-this.y2)<10?(this.x2=this.x1+this.defaultLength,this.adjustVisual(),this.adjustControlBox()):this.manipulate(C),this._state="select",K==="creating"&&this.onMarkerCreated&&this.onMarkerCreated(this)},v.prototype.adjustVisual=function(){},v.prototype.manipulate=function(C){this.state==="creating"?this.resize(C):this.state==="move"?(this.x1=this.manipulationStartX1+C.x-this.manipulationStartX,this.y1=this.manipulationStartY1+C.y-this.manipulationStartY,this.x2=this.manipulationStartX2+C.x-this.manipulationStartX,this.y2=this.manipulationStartY2+C.y-this.manipulationStartY,this.adjustVisual(),this.adjustControlBox()):this.state==="resize"&&this.resize(C)},v.prototype.resize=function(C){switch(this.activeGrip){case this.grip1:this.x1=C.x,this.y1=C.y;break;case this.grip2:case void 0:this.x2=C.x,this.y2=C.y}this.adjustVisual(),this.adjustControlBox()},v.prototype.select=function(){j.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},v.prototype.deselect=function(){j.prototype.deselect.call(this),this.controlBox.style.display="none"},v.prototype.setupControlBox=function(){this.controlBox=Te.createGroup(),this.container.appendChild(this.controlBox),this.addControlGrips(),this.controlBox.style.display="none"},v.prototype.adjustControlBox=function(){this.positionGrips()},v.prototype.addControlGrips=function(){this.grip1=this.createGrip(),this.grip2=this.createGrip(),this.positionGrips()},v.prototype.createGrip=function(){var C=new Je;return C.visual.transform.baseVal.appendItem(Te.createTransform()),this.controlBox.appendChild(C.visual),C},v.prototype.positionGrips=function(){var C=this.grip1.GRIP_SIZE;this.positionGrip(this.grip1.visual,this.x1-C/2,this.y1-C/2),this.positionGrip(this.grip2.visual,this.x2-C/2,this.y2-C/2)},v.prototype.positionGrip=function(C,K,re){var W=C.transform.baseVal.getItem(0);W.setTranslate(K,re),C.transform.baseVal.replaceItem(W,0)},v.prototype.getState=function(){return Object.assign({x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2},j.prototype.getState.call(this))},v.prototype.restoreState=function(C){j.prototype.restoreState.call(this,C);var K=C;this.x1=K.x1,this.y1=K.y1,this.x2=K.x2,this.y2=K.y2},v.prototype.scale=function(C,K){j.prototype.scale.call(this,C,K),this.x1=this.x1*C,this.y1=this.y1*K,this.x2=this.x2*C,this.y2=this.y2*K,this.adjustVisual(),this.adjustControlBox()},v}(ye),ut=function(j){function v(C,K,re){var W=j.call(this,C,K,re)||this;return W.strokeColor="transparent",W.strokeWidth=0,W.strokeDasharray="",W.setStrokeColor=W.setStrokeColor.bind(W),W.setStrokeWidth=W.setStrokeWidth.bind(W),W.setStrokeDasharray=W.setStrokeDasharray.bind(W),W.strokeColor=re.defaultColor,W.strokeWidth=re.defaultStrokeWidth,W.strokeDasharray=re.defaultStrokeDasharray,W.strokePanel=new ue("Line color",re.defaultColorSet,re.defaultColor),W.strokePanel.onColorChanged=W.setStrokeColor,W.strokeWidthPanel=new ht("Line width",re.defaultStrokeWidths,re.defaultStrokeWidth),W.strokeWidthPanel.onWidthChanged=W.setStrokeWidth,W.strokeStylePanel=new _t("Line style",re.defaultStrokeDasharrays,re.defaultStrokeDasharray),W.strokeStylePanel.onStyleChanged=W.setStrokeDasharray,W}return ke(v,j),v.prototype.ownsTarget=function(C){return!(!j.prototype.ownsTarget.call(this,C)&&C!==this.visual&&C!==this.selectorLine&&C!==this.visibleLine)},v.prototype.createVisual=function(){this.visual=Te.createGroup(),this.selectorLine=Te.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()]]),this.visibleLine=Te.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)},v.prototype.pointerDown=function(C,K){j.prototype.pointerDown.call(this,C,K),this.state==="new"&&(this.createVisual(),this.adjustVisual(),this._state="creating")},v.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()),Te.setAttributes(this.visibleLine,[["stroke",this.strokeColor]]),Te.setAttributes(this.visibleLine,[["stroke-width",this.strokeWidth.toString()]]),Te.setAttributes(this.visibleLine,[["stroke-dasharray",this.strokeDasharray.toString()]]))},v.prototype.setStrokeColor=function(C){this.strokeColor=C,this.adjustVisual(),this.colorChanged(C)},v.prototype.setStrokeWidth=function(C){this.strokeWidth=C,this.adjustVisual()},v.prototype.setStrokeDasharray=function(C){this.strokeDasharray=C,this.adjustVisual(),this.stateChanged()},Object.defineProperty(v.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),v.prototype.getState=function(){var C=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray},j.prototype.getState.call(this));return C.typeName=v.typeName,C},v.prototype.restoreState=function(C){j.prototype.restoreState.call(this,C);var K=C;this.strokeColor=K.strokeColor,this.strokeWidth=K.strokeWidth,this.strokeDasharray=K.strokeDasharray,this.createVisual(),this.adjustVisual()},v.typeName="LineMarker",v.title="Line marker",v.icon='<svg viewBox="0 0 24 24"><path d="M19 13H5v-2h14v2z"/></svg>',v}(at),$e=function(j){function v(C,K,re,W){var Ie=j.call(this,C,W||'<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 Ie.fonts=[],Ie.fontBoxes=[],Ie.fonts=K,Ie.currentFont=re,Ie.setCurrentFont=Ie.setCurrentFont.bind(Ie),Ie}return ke(v,j),v.prototype.getUi=function(){var C=this,K=document.createElement("div");return K.style.overflow="hidden",K.style.flexGrow="2",this.fonts.forEach(function(re){var W=document.createElement("div");W.style.display="inline-block",W.style.alignItems="center",W.style.justifyContent="space-between",W.style.padding="5px",W.style.borderWidth="2px",W.style.borderStyle="solid",W.style.overflow="hidden",W.style.maxWidth=100/C.fonts.length-5+"%",W.style.borderColor=re===C.currentFont?C.uiStyleSettings.toolboxAccentColor:"transparent",W.addEventListener("click",function(){C.setCurrentFont(re,W)}),K.appendChild(W);var Ie=document.createElement("div");Ie.style.display="flex",Ie.style.minHeight="20px",Ie.style.flexGrow="2",Ie.style.fontFamily=re,Ie.style.overflow="hidden";var rt=document.createElement("div");rt.style.whiteSpace="nowrap",rt.style.overflow="hidden",rt.style.textOverflow="ellipsis",rt.innerHTML="The quick brown fox jumps over the lazy dog",Ie.appendChild(rt),W.appendChild(Ie),C.fontBoxes.push(W)}),K},v.prototype.setCurrentFont=function(C,K){var re=this;this.currentFont=C,this.fontBoxes.forEach(function(W){W.style.borderColor=W===K?re.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onFontChanged&&this.onFontChanged(this.currentFont)},v}(ee),qe=function(j){function v(C,K,re){var W=j.call(this,C,K,re)||this;return W.color="transparent",W.padding=5,W.DEFAULT_TEXT="your text here",W.text=W.DEFAULT_TEXT,W.isMoved=!1,W.color=re.defaultColor,W.fontFamily=re.defaultFontFamily,W.defaultSize={x:100,y:30},W.setColor=W.setColor.bind(W),W.setFont=W.setFont.bind(W),W.renderText=W.renderText.bind(W),W.sizeText=W.sizeText.bind(W),W.textEditDivClicked=W.textEditDivClicked.bind(W),W.showTextEditor=W.showTextEditor.bind(W),W.setSize=W.setSize.bind(W),W.positionTextEditor=W.positionTextEditor.bind(W),W.colorPanel=new ue("Color",re.defaultColorSet,re.defaultColor),W.colorPanel.onColorChanged=W.setColor,W.fontFamilyPanel=new $e("Font",re.defaultFontFamilies,re.defaultFontFamily),W.fontFamilyPanel.onFontChanged=W.setFont,W}return ke(v,j),v.prototype.ownsTarget=function(C){if(j.prototype.ownsTarget.call(this,C)||C===this.visual||C===this.textElement||C===this.bgRectangle)return!0;var K=!1;return this.textElement.childNodes.forEach(function(re){re===C&&(K=!0)}),K},v.prototype.createVisual=function(){this.visual=Te.createGroup(),this.bgRectangle=Te.createRect(1,1,[["fill","transparent"]]),this.visual.appendChild(this.bgRectangle),this.textElement=Te.createText([["fill",this.color],["font-family",this.fontFamily],["font-size","16px"],["x","0"],["y","0"]]),this.textElement.transform.baseVal.appendItem(Te.createTransform()),this.textElement.transform.baseVal.appendItem(Te.createTransform()),this.visual.appendChild(this.textElement),this.addMarkerVisualToContainer(this.visual),this.renderText()},v.prototype.pointerDown=function(C,K){j.prototype.pointerDown.call(this,C,K),this.isMoved=!1,this.pointerDownPoint=C,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(C),this._state="creating")},v.prototype.renderText=function(){var C=this;if(this.textElement){for(;this.textElement.lastChild;)this.textElement.removeChild(this.textElement.lastChild);this.text.split(/\r\n|[\n\v\f\r\x85\u2028\u2029]/).forEach(function(K){C.textElement.appendChild(Te.createTSpan(K.trim()===""?" ":K.trim(),[["x","0"],["dy","1.2em"]]))}),setTimeout(this.sizeText,10)}},v.prototype.getTextScale=function(){var C=this.textElement.getBBox(),K=1;if(C.width>0&&C.height>0){var re=(1*this.width-this.width*this.padding*2/100)/C.width,W=(1*this.height-this.height*this.padding*2/100)/C.height;K=Math.min(re,W)}return K},v.prototype.getTextPosition=function(C){var K=this.textElement.getBBox(),re=0,W=0;return K.width>0&&K.height>0&&(re=(this.width-K.width*C)/2,W=this.height/2-K.height*C/2),{x:re,y:W}},v.prototype.sizeText=function(){var C=this.textElement.getBBox(),K=this.getTextScale(),re=this.getTextPosition(K);re.y-=C.y*K,navigator.userAgent.indexOf("Edge/")>-1?this.textElement.style.transform="translate("+re.x+"px, "+re.y+"px) scale("+K+", "+K+")":(this.textElement.transform.baseVal.getItem(0).setTranslate(re.x,re.y),this.textElement.transform.baseVal.getItem(1).setScale(K,K))},v.prototype.manipulate=function(C){j.prototype.manipulate.call(this,C),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(C.x-this.pointerDownPoint.x)>5||Math.abs(C.y-this.pointerDownPoint.y)>5)},v.prototype.resize=function(C){j.prototype.resize.call(this,C),this.isMoved=!0,this.setSize(),this.sizeText()},v.prototype.setSize=function(){j.prototype.setSize.call(this),this.visual&&this.bgRectangle&&(Te.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),Te.setAttributes(this.bgRectangle,[["width",this.width.toString()],["height",this.height.toString()]]))},v.prototype.pointerUp=function(C){var K=this.state;K==="creating"&&(this._suppressMarkerCreateEvent=!0),j.prototype.pointerUp.call(this,C),this.setSize(),(K==="creating"||!this.isMoved&&Date.now()-this.pointerDownTimestamp>500)&&this.showTextEditor(),this.pointerDownPoint=void 0},v.prototype.showTextEditor=function(){var C=this;this._state="edit",this.overlayContainer.innerHTML="",this.textEditDiv=document.createElement("div"),this.textEditDiv.style.flexGrow="2",this.textEditDiv.style.alignItems="center",this.textEditDiv.style.justifyContent="center",this.textEditDiv.style.pointerEvents="auto",this.textEditDiv.style.overflow="hidden",this.textEditor=document.createElement("div"),this.textEditor.style.position="absolute",this.textEditor.style.fontFamily=this.fontFamily,this.textEditor.style.lineHeight="1em",this.textEditor.innerText=this.text,this.textEditor.contentEditable="true",this.textEditor.style.color=this.color,this.textEditor.style.whiteSpace="pre",this.positionTextEditor(),this.textEditor.addEventListener("pointerup",function(K){K.stopPropagation()}),this.textEditor.addEventListener("input",function(){for(var K=Number.parseFloat(C.textEditor.style.fontSize);C.textEditor.clientWidth>=Number.parseInt(C.textEditor.style.maxWidth)&&K>.9;)K-=.1,C.textEditor.style.fontSize=Math.max(K,.9)+"em"}),this.textEditor.addEventListener("keyup",function(K){K.cancelBubble=!0}),this.textEditor.addEventListener("paste",function(K){if(K.clipboardData){var re=K.clipboardData.getData("text"),W=window.getSelection();if(!W.rangeCount)return!1;W.deleteFromDocument(),W.getRangeAt(0).insertNode(document.createTextNode(re)),K.preventDefault()}}),this.textEditDiv.addEventListener("pointerup",function(){C.textEditDivClicked(C.textEditor.innerText)}),this.textEditDiv.appendChild(this.textEditor),this.overlayContainer.appendChild(this.textEditDiv),this.hideVisual(),this.textEditor.focus(),document.execCommand("selectAll")},v.prototype.positionTextEditor=function(){if(this.state==="edit")if(this.textEditor===void 0)this.showTextEditor();else{this.textElement.style.display="";var C=this.getTextScale(),K=this.rotatePoint({x:this.left+this.width/2,y:this.top+this.height/2}),re=this.textElement.getBBox(),W={x:re.width*C,y:re.height*C};K.x-=W.x/2,K.y-=W.y/2,this.textEditor.style.top=K.y+"px",this.textEditor.style.left=K.x+"px",this.textEditor.style.maxWidth=this.overlayContainer.offsetWidth-K.x+"px",this.textEditor.style.fontSize=Math.max(16*C,12)+"px",this.textElement.style.display="none"}},v.prototype.textEditDivClicked=function(C){this.text=C.trim(),this.overlayContainer.innerHTML="",this.renderText(),this.showVisual(),this._suppressMarkerCreateEvent&&(this._suppressMarkerCreateEvent=!1,this.onMarkerCreated&&this.onMarkerCreated(this)),this.stateChanged()},v.prototype.select=function(){j.prototype.select.call(this),this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText)},v.prototype.deselect=function(){this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText),j.prototype.deselect.call(this)},v.prototype.dblClick=function(C,K){j.prototype.dblClick.call(this,C,K),this.showTextEditor()},v.prototype.setColor=function(C){this.textElement&&Te.setAttributes(this.textElement,[["fill",C]]),this.color=C,this.textEditor&&(this.textEditor.style.color=this.color),this.colorChanged(C)},v.prototype.setFont=function(C){this.textElement&&Te.setAttributes(this.textElement,[["font-family",C]]),this.fontFamily=C,this.textEditor&&(this.textEditor.style.fontFamily=this.fontFamily),this.renderText(),this.stateChanged()},v.prototype.hideVisual=function(){this.textElement.style.display="none",this.hideControlBox()},v.prototype.showVisual=function(){this.state==="edit"&&(this._state="select"),this.textElement.style.display="",this.showControlBox()},Object.defineProperty(v.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),v.prototype.getState=function(){var C=Object.assign({color:this.color,fontFamily:this.fontFamily,padding:this.padding,text:this.text},j.prototype.getState.call(this));return C.typeName=v.typeName,C},v.prototype.restoreState=function(C){var K=C;this.color=K.color,this.fontFamily=K.fontFamily,this.padding=K.padding,this.text=K.text,this.createVisual(),j.prototype.restoreState.call(this,C),this.setSize()},v.prototype.scale=function(C,K){j.prototype.scale.call(this,C,K),this.setSize(),this.sizeText(),this.positionTextEditor()},v.typeName="TextMarker",v.title="Text marker",v.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>',v}(it),De=function(j){function v(C,K,re){var W=j.call(this,C,K,re)||this;return W.color="transparent",W.lineWidth=3,W.drawing=!1,W.pixelRatio=1,W.color=re.defaultColor,W.lineWidth=re.defaultStrokeWidth,W.pixelRatio=re.freehandPixelRatio,W.setColor=W.setColor.bind(W),W.addCanvas=W.addCanvas.bind(W),W.finishCreation=W.finishCreation.bind(W),W.setLineWidth=W.setLineWidth.bind(W),W.colorPanel=new ue("Color",re.defaultColorSet,re.defaultColor),W.colorPanel.onColorChanged=W.setColor,W.lineWidthPanel=new ht("Line width",re.defaultStrokeWidths,re.defaultStrokeWidth),W.lineWidthPanel.onWidthChanged=W.setLineWidth,W}return ke(v,j),v.prototype.ownsTarget=function(C){return!(!j.prototype.ownsTarget.call(this,C)&&C!==this.visual&&C!==this.drawingImage)},v.prototype.createVisual=function(){this.visual=Te.createGroup(),this.drawingImage=Te.createImage(),this.visual.appendChild(this.drawingImage);var C=Te.createTransform();this.visual.transform.baseVal.appendItem(C),this.addMarkerVisualToContainer(this.visual)},v.prototype.pointerDown=function(C,K){this.state==="new"&&(this.addCanvas(),this.createVisual(),this._state="creating"),this.state==="creating"?(this.canvasContext.strokeStyle=this.color,this.canvasContext.lineWidth=this.lineWidth,this.canvasContext.beginPath(),this.canvasContext.moveTo(C.x,C.y),this.drawing=!0):j.prototype.pointerDown.call(this,C,K)},v.prototype.manipulate=function(C){this.state==="creating"?this.drawing&&(this.canvasContext.lineTo(C.x,C.y),this.canvasContext.stroke()):j.prototype.manipulate.call(this,C)},v.prototype.resize=function(C){j.prototype.resize.call(this,C),Te.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),Te.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]])},v.prototype.pointerUp=function(C){this._state==="creating"?this.drawing&&(this.canvasContext.closePath(),this.drawing=!1,this.globalSettings.newFreehandMarkerOnPointerUp&&this.finishCreation()):j.prototype.pointerUp.call(this,C)},v.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)},v.prototype.select=function(){this.state==="creating"&&this.finishCreation(),j.prototype.select.call(this)},v.prototype.deselect=function(){this.state==="creating"&&this.finishCreation(),j.prototype.deselect.call(this)},v.prototype.finishCreation=function(){for(var C=this.canvasContext.getImageData(0,0,this.canvasElement.width,this.canvasElement.height),K=[this.canvasElement.width+1,this.canvasElement.height+1,-1,-1],re=K[0],W=K[1],Ie=K[2],rt=K[3],vt=!1,Ct=0;Ct<this.canvasElement.height;Ct++)for(var ot=0;ot<this.canvasElement.width;ot++)C.data[Ct*this.canvasElement.width*4+4*ot+3]>0&&(vt=!0,Ct<W&&(W=Ct),ot<re&&(re=ot),Ct>rt&&(rt=Ct),ot>Ie&&(Ie=ot));if(vt){this.left=re/this.pixelRatio,this.top=W/this.pixelRatio,this.width=(Ie-re)/this.pixelRatio,this.height=(rt-W)/this.pixelRatio;var Pt=document.createElement("canvas");Pt.width=Ie-re,Pt.height=rt-W,Pt.getContext("2d").putImageData(this.canvasContext.getImageData(re,W,Ie-re,rt-W),0,0),this.drawingImgUrl=Pt.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},v.prototype.setDrawingImage=function(){Te.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]]),Te.setAttributes(this.drawingImage,[["href",this.drawingImgUrl]]),this.moveVisual({x:this.left,y:this.top})},v.prototype.setColor=function(C){this.color=C,this.colorChanged(C)},v.prototype.setLineWidth=function(C){this.lineWidth=C},Object.defineProperty(v.prototype,"toolboxPanels",{get:function(){return this.state==="new"||this.state==="creating"?[this.colorPanel,this.lineWidthPanel]:[]},enumerable:!1,configurable:!0}),v.prototype.getState=function(){var C=Object.assign({drawingImgUrl:this.drawingImgUrl},j.prototype.getState.call(this));return C.typeName=v.typeName,C},v.prototype.restoreState=function(C){this.createVisual(),j.prototype.restoreState.call(this,C),this.drawingImgUrl=C.drawingImgUrl,this.setDrawingImage()},v.prototype.scale=function(C,K){j.prototype.scale.call(this,C,K),this.setDrawingImage()},v.typeName="FreehandMarker",v.title="Freehand marker",v.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>',v}(it),xe=function(j){function v(C,K,re){var W=j.call(this,C,re||'<svg viewBox="0 0 24 24"><path d="M8 14v4l-6-6 6-6v4h8V6l6 6-6 6v-4H8z"/></svg>')||this;return W.typeBoxes=[],W.currentType=K,W.setCurrentType=W.setCurrentType.bind(W),W}return ke(v,j),v.prototype.getUi=function(){var C=this,K=document.createElement("div");K.style.display="flex",K.style.overflow="hidden",K.style.flexGrow="2";for(var re=function(rt){var vt="both";switch(rt){case 0:vt="both";break;case 1:vt="start";break;case 2:vt="end";break;case 3:vt="none"}var Ct=document.createElement("div");if(Ct.style.display="flex",Ct.style.flexGrow="2",Ct.style.alignItems="center",Ct.style.justifyContent="space-between",Ct.style.padding="5px",Ct.style.borderWidth="2px",Ct.style.borderStyle="solid",Ct.style.borderColor=vt===W.currentType?W.uiStyleSettings.toolboxAccentColor:"transparent",Ct.addEventListener("click",function(){C.setCurrentType(vt,Ct)}),K.appendChild(Ct),vt==="both"||vt==="start"){var ot=document.createElement("div");ot.style.display="flex",ot.style.alignItems="center",ot.style.minHeight="20px",ot.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="`+(W.uiStyleSettings!==void 0?W.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
|
|
</svg>`,ot.style.marginLeft="5px",Ct.appendChild(ot)}var Pt=document.createElement("div");Pt.style.display="flex",Pt.style.alignItems="center",Pt.style.minHeight="20px",Pt.style.flexGrow="2";var Ot=document.createElement("hr");if(Ot.style.minWidth="20px",Ot.style.border="0px",Ot.style.borderTop="3px solid "+(W.uiStyleSettings!==void 0?W.uiStyleSettings.toolboxColor:"#eeeeee"),Ot.style.flexGrow="2",Pt.appendChild(Ot),Ct.appendChild(Pt),vt==="both"||vt==="end"){var Ht=document.createElement("div");Ht.style.display="flex",Ht.style.alignItems="center",Ht.style.minHeight="20px",Ht.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="`+(W.uiStyleSettings!==void 0?W.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
|
|
</svg>`,Ht.style.marginRight="5px",Ct.appendChild(Ht)}W.typeBoxes.push(Ct)},W=this,Ie=0;Ie<4;Ie++)re(Ie);return K},v.prototype.setCurrentType=function(C,K){var re=this;this.currentType=C,this.typeBoxes.forEach(function(W){W.style.borderColor=W===K?re.uiStyleSettings!==void 0?re.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"}),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},v}(ee),Se=function(j){function v(C,K,re){var W=j.call(this,C,K,re)||this;return W.arrowType="end",W.arrowBaseHeight=10,W.arrowBaseWidth=10,W.getArrowPoints=W.getArrowPoints.bind(W),W.setArrowType=W.setArrowType.bind(W),W.arrowTypePanel=new xe("Arrow type","end"),W.arrowTypePanel.onArrowTypeChanged=W.setArrowType,W}return ke(v,j),v.prototype.ownsTarget=function(C){return!(!j.prototype.ownsTarget.call(this,C)&&C!==this.arrow1&&C!==this.arrow2)},v.prototype.getArrowPoints=function(C,K){var re=this.arrowBaseWidth+2*this.strokeWidth,W=this.arrowBaseHeight+2*this.strokeWidth;return C-re/2+","+(K+W/2)+" "+C+","+(K-W/2)+" "+(C+re/2)+","+(K+W/2)},v.prototype.createTips=function(){this.arrow1=Te.createPolygon(this.getArrowPoints(this.x1,this.y1),[["fill",this.strokeColor]]),this.arrow1.transform.baseVal.appendItem(Te.createTransform()),this.visual.appendChild(this.arrow1),this.arrow2=Te.createPolygon(this.getArrowPoints(this.x2,this.y2),[["fill",this.strokeColor]]),this.arrow2.transform.baseVal.appendItem(Te.createTransform()),this.visual.appendChild(this.arrow2)},v.prototype.pointerDown=function(C,K){j.prototype.pointerDown.call(this,C,K),this.state==="creating"&&this.createTips()},v.prototype.adjustVisual=function(){if(j.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",Te.setAttributes(this.arrow1,[["points",this.getArrowPoints(this.x1,this.y1)],["fill",this.strokeColor]]),Te.setAttributes(this.arrow2,[["points",this.getArrowPoints(this.x2,this.y2)],["fill",this.strokeColor]]),Math.abs(this.x1-this.x2)>.1)){var C=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),K=this.arrow1.transform.baseVal.getItem(0);K.setRotate(C,this.x1,this.y1),this.arrow1.transform.baseVal.replaceItem(K,0);var re=this.arrow2.transform.baseVal.getItem(0);re.setRotate(C+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(re,0)}},v.prototype.setArrowType=function(C){this.arrowType=C,this.adjustVisual(),this.stateChanged()},Object.defineProperty(v.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel,this.arrowTypePanel]},enumerable:!1,configurable:!0}),v.prototype.getState=function(){var C=Object.assign({arrowType:this.arrowType},j.prototype.getState.call(this));return C.typeName=v.typeName,C},v.prototype.restoreState=function(C){j.prototype.restoreState.call(this,C);var K=C;this.arrowType=K.arrowType,this.createTips(),this.adjustVisual()},v.typeName="ArrowMarker",v.title="Arrow marker",v.icon='<svg viewBox="0 0 24 24"><path d="M19 6.41L17.59 5 7 15.59V9H5v10h10v-2H8.41L19 6.41z"/></svg>',v}(ut),oe=function(j){function v(C,K,re){var W=j.call(this,C,K,re)||this;return W.fillColor=re.defaultFillColor,W.strokeWidth=0,W.fillPanel=new ue("Color",re.defaultColorSet,re.defaultFillColor),W.fillPanel.onColorChanged=W.setFillColor,W}return ke(v,j),Object.defineProperty(v.prototype,"toolboxPanels",{get:function(){return[this.fillPanel]},enumerable:!1,configurable:!0}),v.prototype.getState=function(){var C=j.prototype.getState.call(this);return C.typeName=v.typeName,C},v.typeName="CoverMarker",v.title="Cover marker",v.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4z"/></svg>',v}(st),ce=function(j){function v(C,K,re,W){var Ie=j.call(this,C,W||'<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 Ie.opacities=[],Ie.opacityBoxes=[],Ie.opacities=K,Ie.currentOpacity=re,Ie.setCurrentOpacity=Ie.setCurrentOpacity.bind(Ie),Ie}return ke(v,j),v.prototype.getUi=function(){var C=this,K=document.createElement("div");return K.style.display="flex",K.style.overflow="hidden",K.style.flexGrow="2",K.style.justifyContent="space-between",this.opacities.forEach(function(re){var W=document.createElement("div");W.style.display="flex",W.style.alignItems="center",W.style.justifyContent="center",W.style.padding="5px",W.style.borderWidth="2px",W.style.borderStyle="solid",W.style.borderColor=re===C.currentOpacity?C.uiStyleSettings.toolboxAccentColor:"transparent",W.addEventListener("click",function(){C.setCurrentOpacity(re,W)}),K.appendChild(W);var Ie=document.createElement("div");Ie.innerText=100*re+"%",W.appendChild(Ie),C.opacityBoxes.push(W)}),K},v.prototype.setCurrentOpacity=function(C,K){var re=this;this.currentOpacity=C,this.opacityBoxes.forEach(function(W){W.style.borderColor=W===K?re.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},v}(ee),Ee=function(j){function v(C,K,re){var W=j.call(this,C,K,re)||this;return W.setOpacity=W.setOpacity.bind(W),W.fillColor=re.defaultHighlightColor,W.strokeWidth=0,W.opacity=re.defaultHighlightOpacity,W.fillPanel=new ue("Color",re.defaultColorSet,W.fillColor),W.fillPanel.onColorChanged=W.setFillColor,W.opacityPanel=new ce("Opacity",re.defaultOpacitySteps,W.opacity),W.opacityPanel.onOpacityChanged=W.setOpacity,W}return ke(v,j),v.prototype.setOpacity=function(C){this.opacity=C,this.visual&&Te.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(v.prototype,"toolboxPanels",{get:function(){return[this.fillPanel,this.opacityPanel]},enumerable:!1,configurable:!0}),v.prototype.getState=function(){var C=j.prototype.getState.call(this);return C.typeName=v.typeName,C},v.typeName="HighlightMarker",v.title="Highlight marker",v.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>',v}(oe),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>',Ge=function(j){function v(C,K,re){var W=j.call(this,C,K,re)||this;return W.bgColor="transparent",W.tipPosition={x:0,y:0},W.tipBase1Position={x:0,y:0},W.tipBase2Position={x:0,y:0},W.tipMoving=!1,W.color=re.defaultStrokeColor,W.bgColor=re.defaultFillColor,W.fontFamily=re.defaultFontFamily,W.defaultSize={x:100,y:30},W.setBgColor=W.setBgColor.bind(W),W.getTipPoints=W.getTipPoints.bind(W),W.positionTip=W.positionTip.bind(W),W.setTipPoints=W.setTipPoints.bind(W),W.colorPanel=new ue("Text color",re.defaultColorSet,W.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>'),W.colorPanel.onColorChanged=W.setColor,W.bgColorPanel=new ue("Fill color",re.defaultColorSet,W.bgColor,Ce),W.bgColorPanel.onColorChanged=W.setBgColor,W.fontFamilyPanel=new $e("Font",re.defaultFontFamilies,re.defaultFontFamily),W.fontFamilyPanel.onFontChanged=W.setFont,W.tipGrip=new Je,W.tipGrip.visual.transform.baseVal.appendItem(Te.createTransform()),W.controlBox.appendChild(W.tipGrip.visual),W}return ke(v,j),v.prototype.ownsTarget=function(C){return j.prototype.ownsTarget.call(this,C)||this.tipGrip.ownsTarget(C)||this.tip===C},v.prototype.createTip=function(){Te.setAttributes(this.bgRectangle,[["fill",this.bgColor],["rx","10px"]]),this.tip=Te.createPolygon(this.getTipPoints(),[["fill",this.bgColor]]),this.visual.appendChild(this.tip)},v.prototype.pointerDown=function(C,K){this.state==="new"&&j.prototype.pointerDown.call(this,C,K),this.state==="creating"?this.createTip():this.tipGrip.ownsTarget(K)?(this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.tipMoving=!0):j.prototype.pointerDown.call(this,C,K)},v.prototype.pointerUp=function(C){if(this.tipMoving)this.tipMoving=!1,this.isMoved=!0,j.prototype.pointerUp.call(this,C);else{var K=this.state==="creating";j.prototype.pointerUp.call(this,C),this.setTipPoints(K),this.positionTip()}},v.prototype.manipulate=function(C){if(this.tipMoving){var K=this.unrotatePoint(C);this.tipPosition={x:K.x-this.manipulationStartLeft,y:K.y-this.manipulationStartTop},this.positionTip()}else j.prototype.manipulate.call(this,C)},v.prototype.setBgColor=function(C){this.bgRectangle&&this.tip&&(Te.setAttributes(this.bgRectangle,[["fill",C]]),Te.setAttributes(this.tip,[["fill",C]])),this.bgColor=C,this.fillColorChanged(C)},v.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},v.prototype.setTipPoints=function(C){C===void 0&&(C=!1);var K=Math.min(this.height/2,15),re=this.height/5;C&&(this.tipPosition={x:K+re/2,y:this.height+20});var W=Math.atan(this.height/2/(this.width/2));this.tipPosition.x<this.width/2&&this.tipPosition.y<this.height/2?W<Math.atan((this.height/2-this.tipPosition.y)/(this.width/2-this.tipPosition.x))?(re=this.width/5,K=Math.min(this.width/2,15),this.tipBase1Position={x:K,y:0},this.tipBase2Position={x:K+re,y:0}):(this.tipBase1Position={x:0,y:K},this.tipBase2Position={x:0,y:K+re}):this.tipPosition.x>=this.width/2&&this.tipPosition.y<this.height/2?W<Math.atan((this.height/2-this.tipPosition.y)/(this.tipPosition.x-this.width/2))?(re=this.width/5,K=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-K-re,y:0},this.tipBase2Position={x:this.width-K,y:0}):(this.tipBase1Position={x:this.width,y:K},this.tipBase2Position={x:this.width,y:K+re}):this.tipPosition.x>=this.width/2&&this.tipPosition.y>=this.height/2?W<Math.atan((this.tipPosition.y-this.height/2)/(this.tipPosition.x-this.width/2))?(re=this.width/5,K=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-K-re,y:this.height},this.tipBase2Position={x:this.width-K,y:this.height}):(this.tipBase1Position={x:this.width,y:this.height-K-re},this.tipBase2Position={x:this.width,y:this.height-K}):W<Math.atan((this.tipPosition.y-this.height/2)/(this.width/2-this.tipPosition.x))?(re=this.width/5,K=Math.min(this.width/2,15),this.tipBase1Position={x:K,y:this.height},this.tipBase2Position={x:K+re,y:this.height}):(this.tipBase1Position={x:0,y:this.height-K},this.tipBase2Position={x:0,y:this.height-K-re})},v.prototype.resize=function(C){j.prototype.resize.call(this,C),this.positionTip()},v.prototype.positionTip=function(){Te.setAttributes(this.tip,[["points",this.getTipPoints()]]);var C=this.tipGrip.visual.transform.baseVal.getItem(0);C.setTranslate(this.tipPosition.x,this.tipPosition.y),this.tipGrip.visual.transform.baseVal.replaceItem(C,0)},Object.defineProperty(v.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.bgColorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),v.prototype.select=function(){this.positionTip(),j.prototype.select.call(this)},v.prototype.getState=function(){var C=Object.assign({bgColor:this.bgColor,tipPosition:this.tipPosition},j.prototype.getState.call(this));return C.typeName=v.typeName,C},v.prototype.restoreState=function(C){var K=C;this.bgColor=K.bgColor,this.tipPosition=K.tipPosition,j.prototype.restoreState.call(this,C),this.createTip(),this.setTipPoints()},v.prototype.scale=function(C,K){j.prototype.scale.call(this,C,K),this.tipPosition={x:this.tipPosition.x*C,y:this.tipPosition.y*K},this.positionTip()},v.typeName="CalloutMarker",v.title="Callout marker",v.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>',v}(qe),et=function(j){function v(C,K,re){var W=j.call(this,C,K,re)||this;return W.fillColor="transparent",W.strokeColor="transparent",W.strokeWidth=0,W.strokeDasharray="",W.opacity=1,W.strokeColor=re.defaultColor,W.strokeWidth=re.defaultStrokeWidth,W.strokeDasharray=re.defaultStrokeDasharray,W.fillColor=re.defaultFillColor,W.setStrokeColor=W.setStrokeColor.bind(W),W.setFillColor=W.setFillColor.bind(W),W.setStrokeWidth=W.setStrokeWidth.bind(W),W.setStrokeDasharray=W.setStrokeDasharray.bind(W),W.setOpacity=W.setOpacity.bind(W),W.createVisual=W.createVisual.bind(W),W.strokePanel=new ue("Line color",_e(re.defaultColorSet,["transparent"]),re.defaultColor),W.strokePanel.onColorChanged=W.setStrokeColor,W.fillPanel=new ue("Fill color",_e(re.defaultColorSet,["transparent"]),W.fillColor,Ce),W.fillPanel.onColorChanged=W.setFillColor,W.strokeWidthPanel=new ht("Line width",re.defaultStrokeWidths,re.defaultStrokeWidth),W.strokeWidthPanel.onWidthChanged=W.setStrokeWidth,W.strokeStylePanel=new _t("Line style",re.defaultStrokeDasharrays,re.defaultStrokeDasharray),W.strokeStylePanel.onStyleChanged=W.setStrokeDasharray,W.opacityPanel=new ce("Opacity",re.defaultOpacitySteps,W.opacity),W.opacityPanel.onOpacityChanged=W.setOpacity,W}return ke(v,j),v.prototype.ownsTarget=function(C){return!(!j.prototype.ownsTarget.call(this,C)&&C!==this.visual)},v.prototype.createVisual=function(){this.visual=Te.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)},v.prototype.pointerDown=function(C,K){j.prototype.pointerDown.call(this,C,K),this.state==="new"&&(this.createVisual(),this.moveVisual(C),this._state="creating")},v.prototype.manipulate=function(C){j.prototype.manipulate.call(this,C)},v.prototype.resize=function(C){j.prototype.resize.call(this,C),this.setSize()},v.prototype.setSize=function(){j.prototype.setSize.call(this),Te.setAttributes(this.visual,[["cx",(this.width/2).toString()],["cy",(this.height/2).toString()],["rx",(this.width/2).toString()],["ry",(this.height/2).toString()]])},v.prototype.pointerUp=function(C){j.prototype.pointerUp.call(this,C),this.setSize()},v.prototype.setStrokeColor=function(C){this.strokeColor=C,this.visual&&Te.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(C),this.stateChanged()},v.prototype.setFillColor=function(C){this.fillColor=C,this.visual&&Te.setAttributes(this.visual,[["fill",this.fillColor]]),this.fillColorChanged(C),this.stateChanged()},v.prototype.setStrokeWidth=function(C){this.strokeWidth=C,this.visual&&Te.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},v.prototype.setStrokeDasharray=function(C){this.strokeDasharray=C,this.visual&&Te.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},v.prototype.setOpacity=function(C){this.opacity=C,this.visual&&Te.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(v.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.opacityPanel]},enumerable:!1,configurable:!0}),v.prototype.getState=function(){var C=Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},j.prototype.getState.call(this));return C.typeName=v.typeName,C},v.prototype.restoreState=function(C){var K=C;this.fillColor=K.fillColor,this.strokeColor=K.strokeColor,this.strokeWidth=K.strokeWidth,this.strokeDasharray=K.strokeDasharray,this.opacity=K.opacity,this.createVisual(),j.prototype.restoreState.call(this,C),this.setSize()},v.prototype.scale=function(C,K){j.prototype.scale.call(this,C,K),this.setSize()},v.typeName="EllipseMarker",v.title="Ellipse marker",v.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>',v}(it),pt=function(j){function v(C,K,re){return j.call(this,C,K,re)||this}return ke(v,j),Object.defineProperty(v.prototype,"tipLength",{get:function(){return 10+3*this.strokeWidth},enumerable:!1,configurable:!0}),v.prototype.ownsTarget=function(C){return!(!j.prototype.ownsTarget.call(this,C)&&C!==this.tip1&&C!==this.tip2)},v.prototype.createTips=function(){this.tip1=Te.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(Te.createTransform()),this.visual.appendChild(this.tip1),this.tip2=Te.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(Te.createTransform()),this.visual.appendChild(this.tip2)},v.prototype.pointerDown=function(C,K){j.prototype.pointerDown.call(this,C,K),this.state==="creating"&&this.createTips()},v.prototype.adjustVisual=function(){if(j.prototype.adjustVisual.call(this),this.tip1&&this.tip2&&(Te.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()]]),Te.setAttributes(this.tip2,[["x1",(this.x2-this.tipLength/2).toString()],["y1",this.y2.toString()],["x2",(this.x2+this.tipLength/2).toString()],["y2",this.y2.toString()],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),Math.abs(this.x1-this.x2)>.1)){var C=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),K=this.tip1.transform.baseVal.getItem(0);K.setRotate(C,this.x1,this.y1),this.tip1.transform.baseVal.replaceItem(K,0);var re=this.tip2.transform.baseVal.getItem(0);re.setRotate(C+180,this.x2,this.y2),this.tip2.transform.baseVal.replaceItem(re,0)}},Object.defineProperty(v.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),v.prototype.getState=function(){var C=j.prototype.getState.call(this);return C.typeName=v.typeName,C},v.prototype.restoreState=function(C){j.prototype.restoreState.call(this,C),this.createTips(),this.adjustVisual()},v.typeName="MeasurementMarker",v.title="Measurement marker",v.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>',v}(ut),Bt=function(j){function v(C,K,re){var W=j.call(this,C,K,re)||this;return W.strokePanel.colors=re.defaultColorSet,W.fillColor="transparent",W}return ke(v,j),Object.defineProperty(v.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),v.prototype.getState=function(){var C=j.prototype.getState.call(this);return C.typeName=v.typeName,C},v.typeName="EllipseFrameMarker",v.title="Ellipse frame marker",v.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>',v}(et),Dt=function(){function j(){this.undoStack=[],this.redoStack=[]}return Object.defineProperty(j.prototype,"isUndoPossible",{get:function(){return this.undoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(j.prototype,"isRedoPossible",{get:function(){return this.redoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(j.prototype,"undoStepCount",{get:function(){return this.undoStack.length},enumerable:!1,configurable:!0}),Object.defineProperty(j.prototype,"redoStepCount",{get:function(){return this.redoStack.length},enumerable:!1,configurable:!0}),j.prototype.addUndoStep=function(v){this.undoStack.length!==0&&JSON.stringify(this.undoStack[this.undoStack.length-1])===JSON.stringify(v)||(this.undoStack.push(v),JSON.stringify(this.lastRedoStep)!==JSON.stringify(v)&&this.redoStack.splice(0,this.redoStack.length))},j.prototype.replaceLastUndoStep=function(v){this.undoStack.length>0&&(this.undoStack[this.undoStack.length-1]=v)},j.prototype.getLastUndoStep=function(){return this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0},j.prototype.undo=function(){if(this.undoStack.length>1){var v=this.undoStack.pop();return v!==void 0&&this.redoStack.push(v),this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0}},j.prototype.redo=function(){return this.lastRedoStep=this.redoStack.pop(),this.lastRedoStep},j}(),xt=function(j){function v(C,K,re){var W=j.call(this,C,K,re)||this;return W.strokeColor="transparent",W.strokeWidth=0,W.strokeDasharray="",W.curveX=0,W.curveY=0,W.manipulationStartCurveX=0,W.manipulationStartCurveY=0,W.setStrokeColor=W.setStrokeColor.bind(W),W.setStrokeWidth=W.setStrokeWidth.bind(W),W.setStrokeDasharray=W.setStrokeDasharray.bind(W),W.positionGrips=W.positionGrips.bind(W),W.addControlGrips=W.addControlGrips.bind(W),W.adjustVisual=W.adjustVisual.bind(W),W.setupControlBox=W.setupControlBox.bind(W),W.resize=W.resize.bind(W),W.strokeColor=re.defaultColor,W.strokeWidth=re.defaultStrokeWidth,W.strokeDasharray=re.defaultStrokeDasharray,W.strokePanel=new ue("Line color",re.defaultColorSet,re.defaultColor),W.strokePanel.onColorChanged=W.setStrokeColor,W.strokeWidthPanel=new ht("Line width",re.defaultStrokeWidths,re.defaultStrokeWidth),W.strokeWidthPanel.onWidthChanged=W.setStrokeWidth,W.strokeStylePanel=new _t("Line style",re.defaultStrokeDasharrays,re.defaultStrokeDasharray),W.strokeStylePanel.onStyleChanged=W.setStrokeDasharray,W}return ke(v,j),v.prototype.ownsTarget=function(C){return!(!j.prototype.ownsTarget.call(this,C)&&C!==this.visual&&C!==this.selectorCurve&&C!==this.visibleCurve&&!this.curveGrip.ownsTarget(C))},v.prototype.getPathD=function(){return"M "+this.x1+" "+this.y1+" Q "+this.curveX+" "+this.curveY+", "+this.x2+" "+this.y2},v.prototype.createVisual=function(){this.visual=Te.createGroup(),this.selectorCurve=Te.createPath(this.getPathD(),[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()],["fill","transparent"]]),this.visibleCurve=Te.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)},v.prototype.pointerDown=function(C,K){j.prototype.pointerDown.call(this,C,K),this.manipulationStartCurveX=this.curveX,this.manipulationStartCurveY=this.curveY,this.state==="new"&&(this.curveX=C.x,this.curveY=C.y),this.state==="new"?(this.createVisual(),this.adjustVisual(),this._state="creating"):this.curveGrip.ownsTarget(K)&&(this.activeGrip=this.curveGrip,this._state="resize")},v.prototype.adjustVisual=function(){this.selectorCurve&&this.visibleCurve&&(this.selectorCurve.setAttribute("d",this.getPathD()),this.visibleCurve.setAttribute("d",this.getPathD()),Te.setAttributes(this.visibleCurve,[["stroke",this.strokeColor]]),Te.setAttributes(this.visibleCurve,[["stroke-width",this.strokeWidth.toString()]]),Te.setAttributes(this.visibleCurve,[["stroke-dasharray",this.strokeDasharray.toString()]]))},v.prototype.setupControlBox=function(){j.prototype.setupControlBox.call(this),this.curveControlLine1=Te.createLine(this.x1,this.y1,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.curveControlLine2=Te.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)},v.prototype.addControlGrips=function(){this.curveGrip=this.createGrip(),this.curveX=0,this.curveY=0,j.prototype.addControlGrips.call(this)},v.prototype.positionGrips=function(){j.prototype.positionGrips.call(this);var C=this.curveGrip.GRIP_SIZE;this.positionGrip(this.curveGrip.visual,this.curveX-C/2,this.curveY-C/2),this.curveControlLine1&&this.curveControlLine2&&(this.curveControlLine1.setAttribute("x1",this.x1.toString()),this.curveControlLine1.setAttribute("y1",this.y1.toString()),this.curveControlLine1.setAttribute("x2",this.curveX.toString()),this.curveControlLine1.setAttribute("y2",this.curveY.toString()),this.curveControlLine2.setAttribute("x1",this.x2.toString()),this.curveControlLine2.setAttribute("y1",this.y2.toString()),this.curveControlLine2.setAttribute("x2",this.curveX.toString()),this.curveControlLine2.setAttribute("y2",this.curveY.toString()))},v.prototype.manipulate=function(C){this.state==="move"&&(this.curveX=this.manipulationStartCurveX+C.x-this.manipulationStartX,this.curveY=this.manipulationStartCurveY+C.y-this.manipulationStartY),j.prototype.manipulate.call(this,C)},v.prototype.resize=function(C){this.activeGrip===this.curveGrip&&(this.curveX=C.x,this.curveY=C.y),j.prototype.resize.call(this,C),this.state==="creating"&&(this.curveX=this.x1+(this.x2-this.x1)/2,this.curveY=this.y1+(this.y2-this.y1)/2)},v.prototype.setStrokeColor=function(C){this.strokeColor=C,this.adjustVisual(),this.colorChanged(C)},v.prototype.setStrokeWidth=function(C){this.strokeWidth=C,this.adjustVisual()},v.prototype.setStrokeDasharray=function(C){this.strokeDasharray=C,this.adjustVisual()},v.prototype.scale=function(C,K){this.curveX=this.curveX*C,this.curveY=this.curveY*K,j.prototype.scale.call(this,C,K)},Object.defineProperty(v.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),v.prototype.getState=function(){var C=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,curveX:this.curveX,curveY:this.curveY},j.prototype.getState.call(this));return C.typeName=v.typeName,C},v.prototype.restoreState=function(C){j.prototype.restoreState.call(this,C);var K=C;this.strokeColor=K.strokeColor,this.strokeWidth=K.strokeWidth,this.strokeDasharray=K.strokeDasharray,this.curveX=K.curveX,this.curveY=K.curveY,this.createVisual(),this.adjustVisual()},v.typeName="CurveMarker",v.title="Curve marker",v.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>',v}(at),tr=function(){function j(v,C){C===void 0&&(C=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=v,this.cancelable=C}return Object.defineProperty(j.prototype,"defaultPrevented",{get:function(){return this._defaultPrevented},enumerable:!1,configurable:!0}),j.prototype.preventDefault=function(){this._defaultPrevented=!0},j}(),Xt=function(j){function v(C,K,re){var W=j.call(this,C,!1)||this;return W.dataUrl=K,W.state=re,W}return ke(v,j),v}(tr),gt=function(j){function v(C,K,re){re===void 0&&(re=!1);var W=j.call(this,C,re)||this;return W.marker=K,W}return ke(v,j),v}(tr),Mt=function(){function j(){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 j.prototype.addEventListener=function(v,C){this[v].push(C)},j.prototype.removeEventListener=function(v,C){var K=this[v].indexOf(C);K>-1&&this[v].splice(K,1)},j}(),Jt=function(){function j(v){this.touchPoints=0,this._availableMarkerTypes=this.DEFAULT_MARKER_TYPES,this.mode="select",this.markers=[],this.isDragging=!1,this.renderEventListeners=[],this.closeEventListeners=[],this.settings=new Xe,this._isOpen=!1,this.undoRedoManager=new Dt,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 Mt,this._silentRenderMode=!1,this._isFocused=!1,this._instanceNo=j.instanceCounter++,this.styles=new dt(this.instanceNo),this.uiStyleSettings=this.styles.settings,this.target=v,this.targetRoot=document.body,this.width=v.clientWidth,this.height=v.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(j.prototype,"ALL_MARKER_TYPES",{get:function(){return[He,De,Se,qe,Bt,et,Ee,Ge,pt,oe,ut,xt]},enumerable:!1,configurable:!0}),Object.defineProperty(j.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[He,De,Se,qe,et,Ee,Ge]},enumerable:!1,configurable:!0}),Object.defineProperty(j.prototype,"BASIC_MARKER_TYPES",{get:function(){return[He,De,Se,qe,Ee]},enumerable:!1,configurable:!0}),Object.defineProperty(j.prototype,"availableMarkerTypes",{get:function(){return this._availableMarkerTypes},set:function(v){var C=this;this._availableMarkerTypes.splice(0),v.forEach(function(K){if(typeof K=="string"){var re=C.ALL_MARKER_TYPES.find(function(W){return W.typeName===K});re!==void 0&&C._availableMarkerTypes.push(re)}else C._availableMarkerTypes.push(K)})},enumerable:!1,configurable:!0}),Object.defineProperty(j.prototype,"currentMarker",{get:function(){return this._currentMarker},enumerable:!1,configurable:!0}),Object.defineProperty(j.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(j.prototype,"isUndoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isUndoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(j.prototype,"isRedoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isRedoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(j.prototype,"zoomLevel",{get:function(){return this._zoomLevel},set:function(v){this._zoomLevel=v,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(j.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),j.prototype.open=function(){this.setupResizeObserver(),this.setEditingTarget(),this.setTopLeft(),this.initMarkerCanvas(),this.initOverlay(),this.attachEvents(),this.settings.displayMode==="popup"&&this.onPopupTargetResize(),Pe.isLicensed||this.addLogo(),this._isOpen=!0,this._isFocused=!0},j.prototype.show=function(){var v=this;this.styles.styleSheetRoot===void 0&&mt.styleSheetRoot!==void 0&&(this.styles.styleSheetRoot=mt.styleSheetRoot),this.setWindowHeight(),this.showUI(),this.open(),this.eventListeners.show.forEach(function(C){return C(new tr(v))})},j.prototype.render=function(){return Ke(this,void 0,void 0,function(){var v;return Ye(this,function(C){switch(C.label){case 0:return this.setCurrentMarker(),(v=new bt).naturalSize=this.renderAtNaturalSize,v.imageType=this.renderImageType,v.imageQuality=this.renderImageQuality,v.markersOnly=this.renderMarkersOnly,v.width=this.renderWidth,v.height=this.renderHeight,[4,v.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 1:return C.sent(),[4,v.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 2:return[2,C.sent()]}})})},j.prototype.close=function(v){var C=this;if(v===void 0&&(v=!1),this.isOpen){var K=!1;v||this.eventListeners.beforeclose.forEach(function(re){var W=new tr(C,!0);re(W),W.defaultPrevented&&(K=!0)}),K||(this.coverDiv&&this.closeUI(),this.targetObserver&&this.targetObserver.unobserve(this.target),this.settings.displayMode==="popup"&&window.removeEventListener("resize",this.setWindowHeight),this.eventListeners.close.forEach(function(re){return re(new tr(C))}),this.detachEvents(),this._isOpen=!1)}},j.prototype.addMarkersToToolbar=function(){for(var v,C=[],K=0;K<arguments.length;K++)C[K]=arguments[K];(v=this._availableMarkerTypes).push.apply(v,C)},j.prototype.addRenderEventListener=function(v){this.addEventListener("render",function(C){v(C.dataUrl,C.state)})},j.prototype.removeRenderEventListener=function(v){},j.prototype.addCloseEventListener=function(v){this.addEventListener("close",function(){v()})},j.prototype.removeCloseEventListener=function(v){},j.prototype.setupResizeObserver=function(){var v=this;this.settings.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){v.resize(v.target.clientWidth,v.target.clientHeight)}),this.targetObserver.observe(this.target)):this.settings.displayMode==="popup"&&(window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){return v.onPopupTargetResize()}),this.targetObserver.observe(this.editorCanvas)),window.addEventListener("resize",this.setWindowHeight))},j.prototype.onPopupTargetResize=function(){var v=1*this.target.clientWidth/this.target.clientHeight,C=this.editorCanvas.clientWidth/v>this.editorCanvas.clientHeight?this.editorCanvas.clientHeight*v:this.editorCanvas.clientWidth,K=C<this.editorCanvas.clientWidth?this.editorCanvas.clientHeight:this.editorCanvas.clientWidth/v;this.resize(C,K)},j.prototype.setWindowHeight=function(){this.windowHeight=window.innerHeight},j.prototype.resize=function(v,C){this._isResizing=!0;var K=v/this.imageWidth,re=C/this.imageHeight;this.imageWidth=Math.round(v),this.imageHeight=Math.round(C),this.target instanceof HTMLImageElement&&this.editingTarget instanceof HTMLImageElement&&(this.editingTarget.src=this.target.src),this.editingTarget.width=this.imageWidth,this.editingTarget.height=this.imageHeight,this.editingTarget.style.width=this.imageWidth+"px",this.editingTarget.style.height=this.imageHeight+"px",this.markerImage.setAttribute("width",this.imageWidth.toString()),this.markerImage.setAttribute("height",this.imageHeight.toString()),this.markerImage.setAttribute("viewBox","0 0 "+this.imageWidth.toString()+" "+this.imageHeight.toString()),this.markerImageHolder.style.width=this.imageWidth+"px",this.markerImageHolder.style.height=this.imageHeight+"px",this.overlayContainer.style.width=this.imageWidth+"px",this.overlayContainer.style.height=this.imageHeight+"px",this.settings.displayMode!=="popup"?this.coverDiv.style.width=this.imageWidth.toString()+"px":(this.setTopLeft(),this.positionMarkerImage()),this.toolbar!==void 0&&this.toolbar.adjustLayout(),this.positionLogo(),this.scaleMarkers(K,re),this._isResizing=!1},j.prototype.scaleMarkers=function(v,C){var K,re=this;this._currentMarker&&this._currentMarker instanceof qe?this._currentMarker.scale(v,C):(K=this._currentMarker,this.setCurrentMarker()),this.markers.forEach(function(W){W!==re._currentMarker&&W.scale(v,C)}),K!==void 0&&this.setCurrentMarker(K)},j.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"},j.prototype.setTopLeft=function(){var v=this.editingTarget.getBoundingClientRect(),C=this.editorCanvas.getBoundingClientRect();this.left=v.left-C.left,this.top=v.top-C.top},j.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)},j.prototype.addDefs=function(){for(var v,C=[],K=0;K<arguments.length;K++)C[K]=arguments[K];this.defs=Te.createDefs(),this.addDefsToImage(),(v=this.defs).append.apply(v,C)},j.prototype.addDefsToImage=function(){this.defs&&this.markerImage.insertBefore(this.defs,this.markerImage.firstChild)},j.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)},j.prototype.positionMarkerImage=function(){this.markerImageHolder.style.top=this.top/this.zoomLevel+"px",this.markerImageHolder.style.left=this.left/this.zoomLevel+"px"},j.prototype.attachEvents=function(){this.markerImage.addEventListener("pointerdown",this.onPointerDown),this.markerImage.addEventListener("dblclick",this.onDblClick),this.attachWindowEvents()},j.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)},j.prototype.detachEvents=function(){this.markerImage.removeEventListener("pointerdown",this.onPointerDown),this.markerImage.removeEventListener("dblclick",this.onDblClick),this.detachWindowEvents()},j.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)},j.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 v=document.createElement("a");v.href="https://markerjs.com/",v.target="_blank",v.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>',v.title="Powered by marker.js",v.style.display="grid",v.style.alignItems="center",v.style.justifyItems="center",v.style.padding="3px",v.style.width="20px",v.style.height="20px",this.logoUI.appendChild(v),this.editorCanvas.appendChild(this.logoUI),this.logoUI.style.position="absolute",this.logoUI.style.pointerEvents="all",this.positionLogo()},j.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")},j.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"},j.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},j.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 v=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=v+"px",this.coverDiv.style.left=this.target.offsetLeft.toString()+"px",this.coverDiv.style.width=this.target.offsetWidth.toString()+"px",this.coverDiv.style.zIndex=this.uiStyleSettings.zIndex!==void 0?this.uiStyleSettings.zIndex:"5";break;case"popup":this.coverDiv.style.position="absolute",this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=window.innerHeight+"px",this.coverDiv.style.backgroundColor="rgba(0, 0, 0, 0.75)",this.coverDiv.style.zIndex=this.uiStyleSettings.zIndex!==void 0?this.uiStyleSettings.zIndex:"1000",this.coverDiv.style.display="flex"}this.targetRoot.appendChild(this.coverDiv),this.uiDiv=document.createElement("div"),this.uiDiv.style.display="flex",this.uiDiv.style.flexDirection="column",this.uiDiv.style.flexGrow="2",this.uiDiv.style.margin=this.settings.displayMode==="popup"?this.settings.popupMargin+"px":"0px",this.uiDiv.style.border="0px",this.coverDiv.appendChild(this.uiDiv),this.toolbar=new Z(this.uiDiv,this.settings.displayMode,this._availableMarkerTypes,this.uiStyleSettings,this.styles),this.toolbar.addButtonClickListener(this.toolbarButtonClicked),this.toolbar.show(this._silentRenderMode||this.uiStyleSettings.hideToolbar?"hidden":"visible"),this.contentDiv=document.createElement("div"),this.contentDiv.style.display="flex",this.contentDiv.style.flexDirection="row",this.contentDiv.style.flexGrow="2",this.contentDiv.style.flexShrink="1",this.settings.displayMode==="popup"&&(this.contentDiv.style.backgroundColor=this.uiStyleSettings.canvasBackgroundColor,this.contentDiv.style.maxHeight=this.windowHeight-2*this.settings.popupMargin-3.5*this.uiStyleSettings.toolbarHeight+"px",this.contentDiv.style.maxWidth="calc(100vw - "+2*this.settings.popupMargin+"px)"),this.contentDiv.style.overflow="auto",this.uiDiv.appendChild(this.contentDiv),this.editorCanvas=document.createElement("div"),this.editorCanvas.style.flexGrow="2",this.editorCanvas.style.flexShrink="1",this.editorCanvas.style.position="relative",this.editorCanvas.style.overflow="hidden",this.editorCanvas.style.display="flex",this.settings.displayMode==="popup"&&(this.editorCanvas.style.alignItems="center",this.editorCanvas.style.justifyContent="center"),this.editorCanvas.style.pointerEvents="none",this.editorCanvas.style.transformOrigin="left top",this.editorCanvas.style.transform="scale("+this.zoomLevel+")",this.contentDiv.appendChild(this.editorCanvas),this.editingTarget=this.target instanceof HTMLImageElement?document.createElement("img"):document.createElement("canvas"),this.target.getClientRects().item(0).y<this.styles.settings.toolbarHeight&&(this.editingTarget.style.marginTop=this.target.offsetTop-this.styles.settings.toolbarHeight+"px"),this.editorCanvas.appendChild(this.editingTarget),this.toolbox=new te(this.uiDiv,this.settings.displayMode,this.uiStyleSettings,this.styles),this.toolbox.show(this._silentRenderMode||this.uiStyleSettings.hideToolbox?"hidden":"visible")},j.prototype.closeUI=function(){this.settings.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},j.prototype.removeMarker=function(v){this.markerImage.removeChild(v.container),this.markers.indexOf(v)>-1&&this.markers.splice(this.markers.indexOf(v),1),v.dispose()},j.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())},j.prototype.toolbarButtonClicked=function(v,C){if(v==="marker"&&C!==void 0)this.createNewMarker(C);else if(v==="action")switch(C){case"select":this.switchToSelectMode(),this.switchToSelectMode();break;case"delete":this.deleteSelectedMarker();break;case"clear":this.clear();break;case"undo":this.undo();break;case"redo":this.redo();break;case"zoom":this.stepZoom();break;case"zoom-out":this.zoomLevel=1;break;case"notes":this.notesArea===void 0?(this.switchToSelectMode(),this.zoomLevel=1,this.showNotesEditor()):this.switchToSelectMode();break;case"close":this.close();break;case"render":this.switchToSelectMode(),this.startRenderAndClose()}},j.prototype.deleteSelectedMarker=function(){var v=this;if(this._currentMarker!==void 0){var C=!1;if(this.eventListeners.markerbeforedelete.forEach(function(re){var W=new gt(v,v._currentMarker,!0);re(W),W.defaultPrevented&&(C=!0)}),!C){var K=this._currentMarker;this._currentMarker.dispose(),this.markerImage.removeChild(this._currentMarker.container),this.markers.splice(this.markers.indexOf(this._currentMarker),1),this.setCurrentMarker(),this.addUndoStep(),this.eventListeners.markerdelete.forEach(function(re){return re(new gt(v,K))})}}},j.prototype.clear=function(){var v=this,C=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach(function(Ie){var rt=new gt(v,void 0,!0);Ie(rt),rt.defaultPrevented&&(C=!0)}),!C)){this.setCurrentMarker();for(var K=function(Ie){var rt=re.markers[Ie];re.setCurrentMarker(re.markers[Ie]),re._currentMarker.dispose(),re.markerImage.removeChild(re._currentMarker.container),re.markers.splice(re.markers.indexOf(re._currentMarker),1),re.eventListeners.markerdelete.forEach(function(vt){return vt(new gt(v,rt))})},re=this,W=this.markers.length-1;W>=0;W--)K(W);this.addUndoStep()}},Object.defineProperty(j.prototype,"isNotesAreaOpen",{get:function(){return this.notesArea!==void 0},enumerable:!1,configurable:!0}),j.prototype.showNotesEditor=function(){var v;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=(v=this._currentMarker.notes)!==null&&v!==void 0?v:"",this.overlayContainer.appendChild(this.notesArea))},j.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)},j.prototype.selectLastMarker=function(){this.markers.length>0?this.setCurrentMarker(this.markers[this.markers.length-1]):this.setCurrentMarker()},j.prototype.addUndoStep=function(){var v=this;if(this._currentMarker===void 0||this._currentMarker.state!=="edit"){var C=this.getState(),K=this.undoRedoManager.getLastUndoStep();if(!K||K.width===C.width&&K.height===C.height){var re=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep(C),re<this.undoRedoManager.undoStepCount&&this.eventListeners.statechange.forEach(function(W){return W(new tr(v))})}else this.undoRedoManager.replaceLastUndoStep(C),this.eventListeners.statechange.forEach(function(W){return W(new tr(v))})}},j.prototype.undo=function(){this.switchToSelectMode(),this.addUndoStep(),this.undoStep()},j.prototype.undoStep=function(){var v=this,C=this.undoRedoManager.undo();C!==void 0&&(this.restoreState(C),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(K){return K(new tr(v))}))},j.prototype.redo=function(){this.switchToSelectMode(),this.redoStep()},j.prototype.redoStep=function(){var v=this,C=this.undoRedoManager.redo();C!==void 0&&(this.restoreState(C),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(K){return K(new tr(v))}))},j.prototype.stepZoom=function(){var v=this.zoomSteps.indexOf(this.zoomLevel);this.zoomLevel=v<this.zoomSteps.length-1?this.zoomSteps[v+1]:this.zoomSteps[0]},j.prototype.panTo=function(v){this.contentDiv.scrollBy({left:this.prevPanPoint.x-v.x,top:this.prevPanPoint.y-v.y}),this.prevPanPoint=v},j.prototype.startRenderAndClose=function(){return Ke(this,void 0,void 0,function(){var v,C,K=this;return Ye(this,function(re){switch(re.label){case 0:return[4,this.render()];case 1:return v=re.sent(),C=this.getState(),this.eventListeners.render.forEach(function(W){return W(new Xt(K,v,C))}),this.close(!0),[2]}})})},j.prototype.getState=function(v){v===!0&&this.setCurrentMarker();var C={width:this.imageWidth,height:this.imageHeight,markers:[]};return this.markers.forEach(function(K){return C.markers.push(K.getState())}),C},j.prototype.restoreState=function(v){var C=this;for(this.markers.splice(0);this.markerImage.lastChild;)this.markerImage.removeChild(this.markerImage.lastChild);v.markers.forEach(function(K){var re=C._availableMarkerTypes.find(function(Ie){return Ie.typeName===K.typeName});if(re!==void 0){var W=C.addNewMarker(re);W.restoreState(K),C.markers.push(W)}}),v.width&&v.height&&(v.width!==this.imageWidth||v.height!==this.imageHeight)&&this.scaleMarkers(this.imageWidth/v.width,this.imageHeight/v.height),this.eventListeners.restorestate.forEach(function(K){return K(new tr(C))})},j.prototype.addNewMarker=function(v){var C=Te.createGroup();return this.markerImage.appendChild(C),new v(C,this.overlayContainer,this.settings)},j.prototype.createNewMarker=function(v){var C,K=this;(C=typeof v=="string"?this._availableMarkerTypes.find(function(re){return re.typeName===v}):v)&&(this.setCurrentMarker(),this.addUndoStep(),this._currentMarker=this.addNewMarker(C),this._currentMarker.onMarkerCreated=this.markerCreated,this._currentMarker.onColorChanged=this.colorChanged,this._currentMarker.onFillColorChanged=this.fillColorChanged,this._currentMarker.onStateChanged=this.markerStateChanged,this.markerImage.style.cursor="crosshair",this.toolbar.setActiveMarkerButton(C.typeName),this.toolbox.setPanelButtons(this._currentMarker.toolboxPanels),this.eventListeners.markercreating.forEach(function(re){return re(new gt(K,K._currentMarker))}))},j.prototype.markerCreated=function(v){var C=this;this.mode="select",this.markerImage.style.cursor="default",this.markers.push(v),this.setCurrentMarker(v),v instanceof De&&this.settings.newFreehandMarkerOnPointerUp?this.createNewMarker(De):this.toolbar.setSelectMode(),this.addUndoStep(),this.eventListeners.markercreate.forEach(function(K){return K(new gt(C,C._currentMarker))})},j.prototype.colorChanged=function(v){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultColor=v,this.settings.defaultStrokeColor=v)},j.prototype.fillColorChanged=function(v){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultFillColor=v)},j.prototype.markerStateChanged=function(v){var C=this;this.eventListeners.markerchange.forEach(function(K){return K(new gt(C,v))})},j.prototype.setCurrentMarker=function(v){var C=this;this._currentMarker!==v&&this._currentMarker!==void 0&&(this._currentMarker.deselect(),this.toolbar.setCurrentMarker(),this.toolbox.setPanelButtons([]),this._isResizing||this.eventListeners.markerdeselect.forEach(function(K){return K(new gt(C,C._currentMarker))})),this._currentMarker=v,this._currentMarker===void 0||this._currentMarker.isSelected||(this._currentMarker.state!=="new"&&this._currentMarker.select(),this.toolbar.setCurrentMarker(this._currentMarker),this.toolbox.setPanelButtons(this._currentMarker.toolboxPanels),this._isResizing||this.eventListeners.markerselect.forEach(function(K){return K(new gt(C,C._currentMarker))}))},j.prototype.onPointerDown=function(v){if(this._isFocused||this.focus(),this.touchPoints++,this.touchPoints===1||v.pointerType!=="touch")if(this._currentMarker===void 0||this._currentMarker.state!=="new"&&this._currentMarker.state!=="creating"){if(this.mode==="select"){var C=this.markers.find(function(K){return K.ownsTarget(v.target)});C!==void 0?(this.setCurrentMarker(C),this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(v.clientX,v.clientY),v.target)):(this.setCurrentMarker(),this.isDragging=!0,this.prevPanPoint={x:v.clientX,y:v.clientY})}}else this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(v.clientX,v.clientY))},j.prototype.onDblClick=function(v){if(this._isFocused||this.focus(),this.mode==="select"){var C=this.markers.find(function(K){return K.ownsTarget(v.target)});C!==void 0&&C!==this._currentMarker&&this.setCurrentMarker(C),this._currentMarker!==void 0?this._currentMarker.dblClick(this.clientToLocalCoordinates(v.clientX,v.clientY),v.target):this.setCurrentMarker()}},j.prototype.onPointerMove=function(v){this.touchPoints!==1&&v.pointerType==="touch"||(this._currentMarker!==void 0||this.isDragging)&&(this._currentMarker!==void 0&&this._currentMarker.state==="edit"||v.preventDefault(),this._currentMarker!==void 0?this._currentMarker.manipulate(this.clientToLocalCoordinates(v.clientX,v.clientY)):this.zoomLevel>1&&this.panTo({x:v.clientX,y:v.clientY}))},j.prototype.onPointerUp=function(v){this.touchPoints>0&&this.touchPoints--,this.touchPoints===0&&this.isDragging&&this._currentMarker!==void 0&&this._currentMarker.pointerUp(this.clientToLocalCoordinates(v.clientX,v.clientY)),this.isDragging=!1,this.addUndoStep()},j.prototype.onPointerOut=function(){this.touchPoints>0&&this.touchPoints--},j.prototype.onKeyUp=function(v){this._currentMarker===void 0||this.notesArea!==void 0||v.key!=="Delete"&&v.key!=="Backspace"||this.deleteSelectedMarker()},j.prototype.clientToLocalCoordinates=function(v,C){var K=this.markerImage.getBoundingClientRect();return{x:(v-K.left)/this.zoomLevel,y:(C-K.top)/this.zoomLevel}},j.prototype.onWindowResize=function(){this.positionUI()},j.prototype.positionUI=function(){switch(this.setTopLeft(),this.settings.displayMode){case"inline":var v=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=v+"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()},j.prototype.addLicenseKey=function(v){Pe.addKey(v)},j.prototype.addEventListener=function(v,C){this.eventListeners.addEventListener(v,C)},j.prototype.removeEventListener=function(v,C){this.eventListeners.removeEventListener(v,C)},j.prototype.renderState=function(v){this._silentRenderMode=!0,this.settings.displayMode="inline",this.isOpen||this.show(),this.restoreState(v),this.startRenderAndClose(),this._silentRenderMode=!1},Object.defineProperty(j.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),j.prototype.focus=function(){var v=this;this._isFocused||(this.attachWindowEvents(),this._isFocused=!0,this._previousCurrentMarker!==void 0&&this.setCurrentMarker(this._previousCurrentMarker),this.eventListeners.focus.forEach(function(C){return C(new tr(v))}))},j.prototype.blur=function(){var v=this;this._isFocused&&(this.detachWindowEvents(),this._isFocused=!1,this._previousCurrentMarker=this._currentMarker,this.setCurrentMarker(),this.eventListeners.blur.forEach(function(C){return C(new tr(v))}))},j.instanceCounter=0,j}();/* **********************************
|
|
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 Lt=function(j,v){return(Lt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(C,K){C.__proto__=K}||function(C,K){for(var re in K)Object.prototype.hasOwnProperty.call(K,re)&&(C[re]=K[re])})(j,v)};function ar(j,v){if(typeof v!="function"&&v!==null)throw new TypeError("Class extends value "+String(v)+" is not a constructor or null");function C(){this.constructor=j}Lt(j,v),j.prototype=v===null?Object.create(v):(C.prototype=v.prototype,new C)}function zt(j,v,C,K){return new(C||(C=Promise))(function(re,W){function Ie(Ct){try{vt(K.next(Ct))}catch(ot){W(ot)}}function rt(Ct){try{vt(K.throw(Ct))}catch(ot){W(ot)}}function vt(Ct){var ot;Ct.done?re(Ct.value):(ot=Ct.value,ot instanceof C?ot:new C(function(Pt){Pt(ot)})).then(Ie,rt)}vt((K=K.apply(j,v||[])).next())})}function nr(j,v){var C,K,re,W,Ie={label:0,sent:function(){if(1&re[0])throw re[1];return re[1]},trys:[],ops:[]};return W={next:rt(0),throw:rt(1),return:rt(2)},typeof Symbol=="function"&&(W[Symbol.iterator]=function(){return this}),W;function rt(vt){return function(Ct){return function(ot){if(C)throw new TypeError("Generator is already executing.");for(;Ie;)try{if(C=1,K&&(re=2&ot[0]?K.return:ot[0]?K.throw||((re=K.return)&&re.call(K),0):K.next)&&!(re=re.call(K,ot[1])).done)return re;switch(K=0,re&&(ot=[2&ot[0],re.value]),ot[0]){case 0:case 1:re=ot;break;case 4:return Ie.label++,{value:ot[1],done:!1};case 5:Ie.label++,K=ot[1],ot=[0];continue;case 7:ot=Ie.ops.pop(),Ie.trys.pop();continue;default:if(!(re=Ie.trys,(re=re.length>0&&re[re.length-1])||ot[0]!==6&&ot[0]!==2)){Ie=0;continue}if(ot[0]===3&&(!re||ot[1]>re[0]&&ot[1]<re[3])){Ie.label=ot[1];break}if(ot[0]===6&&Ie.label<re[1]){Ie.label=re[1],re=ot;break}if(re&&Ie.label<re[2]){Ie.label=re[2],Ie.ops.push(ot);break}re[2]&&Ie.ops.pop(),Ie.trys.pop();continue}ot=v.call(j,Ie)}catch(Pt){ot=[6,Pt],K=0}finally{C=re=0}if(5&ot[0])throw ot[1];return{value:ot[0]?ot[1]:void 0,done:!0}}([vt,Ct])}}}var ur=function(){function j(){}return j.addKey=function(v){j.key=v},Object.defineProperty(j,"isLicensed",{get:function(){return!!j.key&&new RegExp(/^CRPR-[A-Z][0-9]{3}-[A-Z][0-9]{3}-[0-9]{4}$/,"i").test(j.key)},enumerable:!1,configurable:!0}),j}(),Et=function(){function j(){}return j.createDefs=function(){return document.createElementNS("http://www.w3.org/2000/svg","defs")},j.setAttributes=function(v,C){for(var K=0,re=C;K<re.length;K++){var W=re[K],Ie=W[0],rt=W[1];v.setAttribute(Ie,rt)}},j.createRect=function(v,C,K){var re=document.createElementNS("http://www.w3.org/2000/svg","rect");return re.setAttribute("width",v.toString()),re.setAttribute("height",C.toString()),K&&j.setAttributes(re,K),re},j.createLine=function(v,C,K,re,W){var Ie=document.createElementNS("http://www.w3.org/2000/svg","line");return Ie.setAttribute("x1",v.toString()),Ie.setAttribute("y1",C.toString()),Ie.setAttribute("x2",K.toString()),Ie.setAttribute("y2",re.toString()),W&&j.setAttributes(Ie,W),Ie},j.createPolygon=function(v,C){var K=document.createElementNS("http://www.w3.org/2000/svg","polygon");return K.setAttribute("points",v),C&&j.setAttributes(K,C),K},j.createCircle=function(v,C){var K=document.createElementNS("http://www.w3.org/2000/svg","circle");return K.setAttribute("cx",(v/2).toString()),K.setAttribute("cy",(v/2).toString()),K.setAttribute("r",v.toString()),C&&j.setAttributes(K,C),K},j.createEllipse=function(v,C,K){var re=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return re.setAttribute("cx",(v/2).toString()),re.setAttribute("cy",(C/2).toString()),re.setAttribute("rx",(v/2).toString()),re.setAttribute("ry",(C/2).toString()),K&&j.setAttributes(re,K),re},j.createGroup=function(v){var C=document.createElementNS("http://www.w3.org/2000/svg","g");return v&&j.setAttributes(C,v),C},j.createTransform=function(){return document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGTransform()},j.createMarker=function(v,C,K,re,W,Ie,rt){var vt=document.createElementNS("http://www.w3.org/2000/svg","marker");return j.setAttributes(vt,[["id",v],["orient",C],["markerWidth",K.toString()],["markerHeight",re.toString()],["refX",W.toString()],["refY",Ie.toString()]]),vt.appendChild(rt),vt},j.createText=function(v){var C=document.createElementNS("http://www.w3.org/2000/svg","text");return C.setAttribute("x","0"),C.setAttribute("y","0"),v&&j.setAttributes(C,v),C},j.createTSpan=function(v,C){var K=document.createElementNS("http://www.w3.org/2000/svg","tspan");return K.textContent=v,C&&j.setAttributes(K,C),K},j.createImage=function(v){var C=document.createElementNS("http://www.w3.org/2000/svg","image");return v&&j.setAttributes(C,v),C},j.createPoint=function(v,C){var K=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return K.x=v,K.y=C,K},j.createPath=function(v,C){var K=document.createElementNS("http://www.w3.org/2000/svg","path");return K.setAttribute("d",v),C&&j.setAttributes(K,C),K},j.createElement=function(v,C){var K=document.createElementNS("http://www.w3.org/2000/svg",v);return C&&j.setAttributes(K,C),K},j.getHollowRectanglePath=function(v,C,K,re,W,Ie,rt,vt){return"M"+v+","+C+"V"+(C+re)+"H"+(v+K)+"V"+C+"H"+W+"V"+Ie+"H"+(W+rt)+"V"+(Ie+vt)+"H"+W+"V"+C+"Z"},j}(),_r=function(){function j(v){this._classNamePrefixBase="__cropro_",this.classes=[],this.rules=[],this.settings=this.defaultSettings,this._classNamePrefix=this._classNamePrefixBase+"_"+v+"_"}return Object.defineProperty(j.prototype,"classNamePrefixBase",{get:function(){return this._classNamePrefixBase},enumerable:!1,configurable:!0}),Object.defineProperty(j.prototype,"classNamePrefix",{get:function(){return this._classNamePrefix},enumerable:!1,configurable:!0}),Object.defineProperty(j.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(j.prototype,"fadeInAnimationClassName",{get:function(){return this.classNamePrefix+"_fade_in"},enumerable:!1,configurable:!0}),Object.defineProperty(j.prototype,"fadeOutAnimationClassName",{get:function(){return this.classNamePrefix+"_fade_out"},enumerable:!1,configurable:!0}),j.prototype.addClass=function(v){return this.styleSheet===void 0&&this.addStyleSheet(),v.name=""+this.classNamePrefix+v.localName,this.classes.push(v),this.styleSheet.sheet.insertRule("."+v.name+" {"+v.style+"}",this.styleSheet.sheet.cssRules.length),v},j.prototype.addRule=function(v){this.styleSheet===void 0&&this.addStyleSheet(),this.rules.push(v),this.styleSheet.sheet.insertRule(v.selector+" {"+v.style+"}",this.styleSheet.sheet.cssRules.length)},j.prototype.addStyleSheet=function(){var v;this.styleSheet=document.createElement("style"),((v=this.styleSheetRoot)!==null&&v!==void 0?v:document.head).appendChild(this.styleSheet),this.addRule(new kt("."+this.classNamePrefix+" h3","font-family: sans-serif")),this.addRule(new kt("@keyframes "+this.classNamePrefix+"_fade_in_animation_frames",`
|
|
from {
|
|
opacity: 0;
|
|
}
|
|
to {
|
|
opacity: 1;
|
|
}
|
|
`)),this.addRule(new kt("@keyframes "+this.classNamePrefix+"_fade_out_animation_frames",`
|
|
from {
|
|
opacity: 1;
|
|
}
|
|
to {
|
|
opacity: 0;
|
|
}
|
|
`)),this.addClass(new Ut("_fade_in",`
|
|
animation-duration: 0.3s;
|
|
animation-name: `+this.classNamePrefix+`_fade_in_animation_frames;
|
|
`)),this.addClass(new Ut("_fade_out",`
|
|
animation-duration: 0.3s;
|
|
animation-name: `+this.classNamePrefix+`_fade_out_animation_frames;
|
|
`))},j.prototype.removeStyleSheet=function(){var v;this.styleSheet&&(((v=this.styleSheetRoot)!==null&&v!==void 0?v:document.head).removeChild(this.styleSheet),this.styleSheet=void 0)},j}(),kt=function(j,v){this.selector=j,this.style=v},Ut=function(j,v){this.localName=j,this.style=v},$t=function(){function j(){this.blocks=[],this.display=""}return j.prototype.addButtonBlock=function(v){v.className=this.blockClassName,v.buttonClassName=this.buttonClassName,v.buttonColorsClassName=this.buttonColorsClassName,v.buttonActiveColorsClassName=this.buttonActiveColorsClassName,this.blocks.push(v)},j.prototype.addElementBlock=function(v){v.className===void 0&&(v.className=this.blockClassName),this.blocks.push(v)},j.prototype.getUI=function(){var v=document.createElement("div");return v.className=this.className+" "+this.colorsClassName+" "+this.fadeInClassName,v.style.display=this.display,this.blocks.forEach(function(C){return v.appendChild(C.getUI())}),v},j}(),vr=function(){function j(){}return j.prototype.getUI=function(){var v=document.createElement("div");if(v.className=this.className,this.minWidth!==void 0&&(v.style.minWidth=this.minWidth),this.contentAlign!==void 0)switch(this.contentAlign){case"start":v.style.justifyContent="flex-start";break;case"center":v.style.justifyContent="center";break;case"end":v.style.justifyContent="flex-end"}return v.style.whiteSpace="nowrap",v},j}(),Wr=function(j){function v(){var C=j!==null&&j.apply(this,arguments)||this;return C.buttons=[],C}return ar(v,j),v.prototype.addButton=function(C){C.className=this.buttonClassName,C.colorsClassName=this.buttonColorsClassName,C.activeColorsClassName=this.buttonActiveColorsClassName,this.buttons.push(C)},v.prototype.getUI=function(){var C=j.prototype.getUI.call(this);return this.buttons.forEach(function(K){return C.appendChild(K.getUI())}),C},v}(vr),Gr=function(){function j(v,C){this._isActive=!1,this._isHidden=!1,this._icon=v,this.title=C,this.uiContainer=document.createElement("div"),this.adjustClassName=this.adjustClassName.bind(this)}return Object.defineProperty(j.prototype,"icon",{get:function(){return this._icon},set:function(v){this._icon=v,this.buttonContainer.innerHTML=this._icon},enumerable:!1,configurable:!0}),Object.defineProperty(j.prototype,"isActive",{get:function(){return this._isActive},set:function(v){this._isActive=v,this.adjustClassName()},enumerable:!1,configurable:!0}),j.prototype.getUI=function(){var v=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 v.onClick()}),this.uiContainer.appendChild(this.buttonContainer),this.uiContainer.style.display=this._isHidden?"none":"inline-block",this.uiContainer},j.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,"")))},j.prototype.hide=function(){this._isHidden=!0},j}(),Hr=function(j){function v(){var C=j!==null&&j.apply(this,arguments)||this;return C.elements=[],C}return ar(v,j),v.prototype.addElement=function(C){this.elements.push(C)},v.prototype.getUI=function(){var C=j.prototype.getUI.call(this);return this.elements.forEach(function(K){return C.appendChild(K)}),C},v}(vr),Fr=function(){function j(v,C){this.horizontal=v,this.vertical=C}return Object.defineProperty(j.prototype,"ratio",{get:function(){return 1*this.horizontal/this.vertical},enumerable:!1,configurable:!0}),j.prototype.getVerticalLength=function(v){return v/this.ratio},j.prototype.getHorizontalLength=function(v){return v*this.ratio},j}(),dr=function(){function j(){}return j.getIcon=function(v,C){if(v>0&&C>0){var K=new Fr(v,C),re=K.ratio>=1?20:K.getHorizontalLength(20),W=K.ratio<1?20:K.getVerticalLength(20),Ie=document.createElementNS("http://www.w3.org/2000/svg","svg");Ie.setAttribute("xmlns","http://www.w3.org/2000/svg"),Ie.setAttribute("viewBox","0 0 24 24"),document.body.appendChild(Ie);var rt=Et.createDefs();Ie.appendChild(rt);var vt=Et.createElement("clipPath",[["id","text-bg-clip"]]);rt.appendChild(vt);var Ct=Et.createPath(Et.getHollowRectanglePath((24-re)/2,(24-W)/2,re,W,(24-re)/2+2,(24-W)/2+2,re-4,W-4));Ie.appendChild(Ct);var ot=Et.createText([["x","0"],["y","0"],["font-size","7px"],["font-family","monospace"]]);ot.appendChild(Et.createTSpan(v+":"+C)),Ie.appendChild(ot);var Pt=ot.getBBox();Et.setAttributes(ot,[["x",((24-Pt.width)/2).toString()],["y",((24-Pt.height)/2-Pt.y).toString()]]);var Ot=Et.createPath(Et.getHollowRectanglePath(0,0,24,24,(24-Math.ceil(Pt.width))/2,(24-Math.ceil(Pt.height))/2,Math.ceil(Pt.width),Math.ceil(Pt.height)));return vt.appendChild(Ot),Et.setAttributes(Ct,[["clip-path","url(#text-bg-clip)"]]),document.body.removeChild(Ie),Ie.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>'},j}(),Cr=function(j){function v(C,K,re){var W=j.call(this,C,K)||this;return W.isDropdownOpen=!1,W.onClick=W.dropdownButtonClicked,W.dropdownButtons=re,W}return ar(v,j),v.prototype.setupDropdown=function(){var C=this;this.dropdownBlock=document.createElement("div"),this.dropdownBlock.className=this.dropdownClassName+" "+this.dropdownColorsClassName,this.dropdownBlock.style.display="none",this.dropdownButtons.forEach(function(K){K.className=C.className,K.colorsClassName=C.colorsClassName,C.dropdownBlock.appendChild(K.getUI())}),this.uiContainer.appendChild(this.dropdownBlock)},v.prototype.positionDropdown=function(){this.dropdownBlock.style.left=this.uiContainer.clientLeft+"px",this.dropdownBlock.style.top=this.uiContainer.clientTop+this.uiContainer.clientHeight+"px"},v.prototype.dropdownButtonClicked=function(){this.dropdownBlock===void 0&&this.setupDropdown(),this.isDropdownOpen=!this.isDropdownOpen,this.toggleDropdown()},v.prototype.toggleDropdown=function(){this.positionDropdown(),this.dropdownBlock.style.display=this.isDropdownOpen?"inline-block":"none"},v.prototype.showDropdown=function(){this.isDropdownOpen=!0,this.toggleDropdown()},v.prototype.hideDropdown=function(){this.isDropdownOpen=!1,this.toggleDropdown()},v}(Gr),tn=function(){function j(v,C){this.GRIP_SIZE=10,this.color=v,this.fillColor=C,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 j.prototype.ownsTarget=function(v){return v===this.visual||v===this.visual.childNodes[0]||v===this.visual.childNodes[1]},j.prototype.setCenter=function(v,C){this.visual.childNodes.forEach(function(K){return Et.setAttributes(K,[["cx",v.toString()],["cy",C.toString()]])})},j}(),Br=function(){function j(v,C,K,re){this.isMoving=!1,this._isGridVisible=!0,this.numberOfGridLines=2,this.horizontalGridLines=[],this.verticalGridLines=[],this._zoomFactor=1,this.cropRectChanged=!1,this.canvasWidth=v,this.canvasHeight=C,this.margin=K,this.container=re,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(j.prototype,"aspectRatio",{get:function(){return this._aspectRatio},set:function(v){this._aspectRatio=v,this.adjustCropRect(),this.setCropRectangle(this.cropRect)},enumerable:!1,configurable:!0}),Object.defineProperty(j.prototype,"isGridVisible",{get:function(){return this._isGridVisible},set:function(v){this._isGridVisible=v,this.gridContainer&&Et.setAttributes(this.gridContainer,[["display",this._isGridVisible?"":"none"]])},enumerable:!1,configurable:!0}),Object.defineProperty(j.prototype,"zoomFactor",{get:function(){return this._zoomFactor},set:function(v){this._zoomFactor=v,this.setCropRectangle(this.cropRect)},enumerable:!1,configurable:!0}),j.prototype.open=function(){var v=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 C=0;C<this.numberOfGridLines;C++)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(K){return v.gridContainer.appendChild(K)}),this.verticalGridLines.forEach(function(K){return v.gridContainer.appendChild(K)}),this.cropRectElement=Et.createRect(0,0,[["stroke",this.cropFrameColor],["stroke-width","3"],["fill","transparent"]]),this.container.appendChild(this.cropRectElement),this.topLeftGrip=new tn(this.gripColor,this.gripFillColor),this.container.appendChild(this.topLeftGrip.visual),this.topRightGrip=new tn(this.gripColor,this.gripFillColor),this.container.appendChild(this.topRightGrip.visual),this.bottomLeftGrip=new tn(this.gripColor,this.gripFillColor),this.container.appendChild(this.bottomLeftGrip.visual),this.bottomRightGrip=new tn(this.gripColor,this.gripFillColor),this.container.appendChild(this.bottomRightGrip.visual),this.attachEvents()},j.prototype.setCropRectangle=function(v){this.cropRect=v;var C=Object.assign({},this.cropRect);this.zoomFactor!==1&&(C.width=this.cropRect.width*this.zoomFactor,C.height=this.cropRect.height*this.zoomFactor,C.x=this.cropRect.height/this.cropRect.width<this.canvasHeight/this.canvasWidth?this.margin:this.margin+this.canvasWidth/2-C.width/2,C.y=this.cropRect.height/this.cropRect.width>this.canvasHeight/this.canvasWidth?this.margin:this.margin+this.canvasHeight/2-C.height/2),Et.setAttributes(this.cropRectElement,[["x",C.x.toString()],["y",C.y.toString()],["width",C.width.toString()],["height",C.height.toString()]]);var K=C.height/(this.numberOfGridLines+1);this.horizontalGridLines.forEach(function(W,Ie){var rt=C.y+K*(Ie+1);Et.setAttributes(W,[["x1",""+C.x],["y1",""+rt],["x2",""+(C.x+C.width)],["y2",""+rt]])});var re=C.width/(this.numberOfGridLines+1);this.verticalGridLines.forEach(function(W,Ie){var rt=C.x+re*(Ie+1);Et.setAttributes(W,[["x1",""+rt],["y1",""+C.y],["x2",""+rt],["y2",""+(C.y+C.height)]])}),Et.setAttributes(this.cropShadeElement,[["d",Et.getHollowRectanglePath(0,0,this.canvasWidth+2*this.margin,this.canvasHeight+2*this.margin,C.x,C.y,C.width,C.height)]]),this.topLeftGrip.setCenter(C.x,C.y),this.topRightGrip.setCenter(C.x+C.width,C.y),this.bottomLeftGrip.setCenter(C.x,C.y+C.height),this.bottomRightGrip.setCenter(C.x+C.width,C.y+C.height),this.cropRectChanged&&this.onCropChange&&(this.cropRectChanged=!1,this.onCropChange(this.cropRect)),this.cropRectChanged=!1},j.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)},j.prototype.clientToLocalCoordinates=function(v,C){var K=this.container.getBoundingClientRect();return{x:v-K.left+this.margin,y:C-K.top+this.margin}},j.prototype.onPointerDown=function(v){this.container.setPointerCapture(v.pointerId),this.previousPoint=this.clientToLocalCoordinates(v.clientX,v.clientY),this.cropRectElement===v.target?this.isMoving=!0:this.topLeftGrip.ownsTarget(v.target)?this.activeGrip=this.topLeftGrip:this.bottomLeftGrip.ownsTarget(v.target)?this.activeGrip=this.bottomLeftGrip:this.topRightGrip.ownsTarget(v.target)?this.activeGrip=this.topRightGrip:this.bottomRightGrip.ownsTarget(v.target)&&(this.activeGrip=this.bottomRightGrip)},j.prototype.onPointerMove=function(v){if(this.isMoving)this.move(this.clientToLocalCoordinates(v.clientX,v.clientY));else if(this.activeGrip){var C=this.clientToLocalCoordinates(v.clientX,v.clientY);this.resize(C)}v.preventDefault()},j.prototype.onPointerUp=function(v){this.activeGrip=void 0,this.isMoving=!1,this.container.releasePointerCapture(v.pointerId)},j.prototype.move=function(v){var C=v.x-this.previousPoint.x,K=v.y-this.previousPoint.y;this.zoomFactor!==1&&(C=-C/this.zoomFactor,K=-K/this.zoomFactor),this.cropRect.x=Math.min(Math.max(this.margin,this.cropRect.x+C),this.canvasWidth-this.cropRect.width+this.margin),this.cropRect.y=Math.min(Math.max(this.margin,this.cropRect.y+K),this.canvasHeight-this.cropRect.height+this.margin),this.onCropChange?(this.cropRectChanged=!0,this.onCropChange(this.cropRect)):this.setCropRectangle(this.cropRect),this.previousPoint=v},j.prototype.resize=function(v){var C=Object.assign({},this.cropRect),K=v.x-this.previousPoint.x,re=v.y-this.previousPoint.y;switch(this.activeGrip){case this.bottomLeftGrip:case this.topLeftGrip:C.x+K<this.margin&&(K=this.margin-C.x),C.x+=K,C.width=this.cropRect.x+this.cropRect.width-C.x;break;case this.bottomRightGrip:case this.topRightGrip:C.width+K>this.canvasWidth*this.zoomFactor&&(K=this.canvasWidth*this.zoomFactor-C.width),C.width+=K}switch(this.activeGrip){case this.topLeftGrip:case this.topRightGrip:this.aspectRatio?(C.y=this.cropRect.y-(this.activeGrip===this.topLeftGrip?-1:1)*this.aspectRatio.getVerticalLength(K),C.height=this.aspectRatio.getVerticalLength(C.width)):(C.y+=re,C.height=this.cropRect.y+this.cropRect.height-C.y);break;case this.bottomLeftGrip:case this.bottomRightGrip:this.aspectRatio?C.height=this.aspectRatio.getVerticalLength(C.width):C.height+=re}C.width<10&&(C.x=this.cropRect.x,C.width=10),C.height<10&&(C.y=this.cropRect.y,C.height=10),this.previousPoint=v,C.x>=this.margin&&C.y>=this.margin&&C.x-this.margin+C.width<=this.canvasWidth&&C.y-this.margin+C.height<=this.canvasHeight&&(this.cropRect=C,this.onCropChange?(this.cropRectChanged=!0,this.onCropChange(this.cropRect)):this.setCropRectangle(this.cropRect))},j.prototype.adjustCropRect=function(){if(this.aspectRatio&&Math.round(this.cropRect.height)!==Math.round(this.aspectRatio.getVerticalLength(this.cropRect.width))){var v=this.cropRect.x+this.cropRect.width/2,C=this.cropRect.y+this.cropRect.height/2,K=this.aspectRatio.getHorizontalLength(this.cropRect.height),re=this.aspectRatio.getVerticalLength(this.cropRect.width);K/this.canvasWidth<re/this.canvasHeight?this.cropRect.width=K:this.cropRect.height=re,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=v-this.cropRect.width/2,this.cropRect.y=C-this.cropRect.height/2,this.cropRect.x+this.cropRect.width>this.margin+this.canvasWidth&&(this.cropRect.x=this.margin+this.canvasWidth-this.cropRect.width),this.cropRect.y+this.cropRect.height>this.margin+this.canvasHeight&&(this.cropRect.y=this.margin+this.canvasHeight-this.cropRect.height),this.cropRect.x=Math.max(this.cropRect.x,this.margin),this.cropRect.y=Math.max(this.cropRect.y,this.margin)}},j.prototype.getRescaledRect=function(v,C,K,re,W,Ie){var rt=K/v,vt=re/C;return{x:(W.x-Ie)*rt+Ie,y:(W.y-Ie)*vt+Ie,width:W.width*rt,height:W.height*vt}},j.prototype.scaleCanvas=function(v,C){var K=this.getRescaledRect(this.canvasWidth,this.canvasHeight,v,C,this.cropRect,this.margin);this.canvasWidth=v,this.canvasHeight=C,this.onCropChange&&this.onCropChange(K),this.setCropRectangle(K)},j}(),An=function(){function j(v){this._angle=0,this.isDragging=!1,this.width=401,this.height=24,this.title=v,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(j.prototype,"angle",{get:function(){return this._angle},set:function(v){this._angle=v,this.setAngleLabel(),this.positionScaleShape()},enumerable:!1,configurable:!0}),j.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},j.prototype.onPointerDown=function(v){this.controlContainer.setPointerCapture(v.pointerId),this.isDragging=!0,this.previousPoint={x:v.clientX,y:v.clientY}},j.prototype.onPointerMove=function(v){this.isDragging&&(this.onAngleChange&&this.onAngleChange((v.clientX-this.previousPoint.x)/5),this.previousPoint.x=v.clientX)},j.prototype.onPointerUp=function(v){this.isDragging&&this.onAngleChange&&this.onAngleChange((v.clientX-this.previousPoint.x)/5),this.isDragging=!1,this.controlContainer.releasePointerCapture(v.pointerId)},j.prototype.setAngleLabel=function(){if(this.angleLabelText){this.angleLabelText.innerHTML=""+Math.round(this._angle);var v=this.angleLabelText.getBBox();Et.setAttributes(this.angleLabelElement,[["x",((this.width-v.width)/2).toString()],["y",(this.height/2).toString()]])}},j.prototype.positionScaleShape=function(){if(this.scaleShape){var v=this.scaleShape.transform.baseVal.getItem(0);v.setTranslate(this._angle%5*5-25,0),this.scaleShape.transform.baseVal.replaceItem(v,0)}},j.prototype.getVisual=function(){var v=document.createElementNS("http://www.w3.org/2000/svg","svg");v.setAttribute("xmlns","http://www.w3.org/2000/svg"),v.setAttribute("width",this.width+"px"),v.setAttribute("height",this.height+"px"),v.setAttribute("viewBox","0 0 "+this.width+" "+this.height),v.style.flexShrink="0",document.body.appendChild(v);for(var C="M0,"+(this.height-1)+" v"+-this.height/3+"h1v"+this.height/3,K=1;K<=this.width/5+10;K++){var re=K%5==0?this.height/3:this.height/6;C+="h4v"+-re+"h1v"+re}C+="v1H0Z",this.scaleShape=Et.createPath(C);var W=Et.createTransform();this.scaleShape.transform.baseVal.appendItem(W),v.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 Ie=Et.createTSpan("");return Ie.innerHTML="°",this.angleLabelElement.appendChild(Ie),v.appendChild(this.angleLabelElement),document.body.removeChild(v),v},j}(),Sr=function(){function j(){this.naturalSize=!1,this.imageType="image/png"}return j.prototype.rasterize=function(v,C,K,re,W,Ie,rt){var vt=this;return new Promise(function(Ct){var ot=document.createElement("canvas");ot.width=v.width.baseVal.value-2*re,ot.height=v.height.baseVal.value-2*re;var Pt=1,Ot=1;vt.naturalSize===!0?(Pt=C.naturalWidth/(v.width.baseVal.value-2*re)/Ie,Ot=C.naturalHeight/(v.height.baseVal.value-2*re)/rt,ot.width=C.naturalWidth/Ie,ot.height=C.naturalHeight/rt):vt.width!==void 0&&vt.height!==void 0&&(Pt=vt.width/K.width,Ot=vt.height/K.height,ot.width*=Pt,ot.height*=Ot);var Ht=ot.getContext("2d");Ht.translate(ot.width/2,ot.height/2),Ht.rotate(W*Math.PI/180),Ht.scale(Ie,rt),Ht.translate(-ot.width/2,-ot.height/2),Ht.drawImage(C,0,0,ot.width,ot.height);var er=document.createElement("canvas");er.width=K.width*Pt,er.height=K.height*Ot,er.getContext("2d").putImageData(Ht.getImageData((K.x-re)*Pt,(K.y-re)*Ot,K.width*Pt,K.height*Ot),0,0),Ct(er.toDataURL(vt.imageType,vt.imageQuality))})},j}(),de=function(){function j(v){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=j.instanceCounter++,this.styles=new _r(this.instanceNo),this.target=v,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(j.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),Object.defineProperty(j.prototype,"zoomToCropEnabled",{get:function(){return this._zoomToCropEnabled},set:function(v){this._zoomToCropEnabled=v,v?this.zoomToCrop():this.unzoomFromCrop()},enumerable:!1,configurable:!0}),Object.defineProperty(j.prototype,"isGridVisible",{get:function(){return this._isGridVisible},set:function(v){this._isGridVisible=v,this.cropLayer&&(this.cropLayer.isGridVisible=this._isGridVisible)},enumerable:!1,configurable:!0}),Object.defineProperty(j.prototype,"gridLines",{get:function(){return this._gridLines},set:function(v){this._gridLines=v,this.cropLayer&&(this.cropLayer.numberOfGridLines=this._gridLines)},enumerable:!1,configurable:!0}),Object.defineProperty(j.prototype,"rotationAngle",{get:function(){return this._rotationAngle},set:function(v){this._rotationAngle=v,this.straightener&&(this.straightener.angle=this._rotationAngle)},enumerable:!1,configurable:!0}),Object.defineProperty(j.prototype,"paddedImageWidth",{get:function(){return this.imageWidth+2*this.CANVAS_MARGIN},enumerable:!1,configurable:!0}),Object.defineProperty(j.prototype,"paddedImageHeight",{get:function(){return this.imageHeight+2*this.CANVAS_MARGIN},enumerable:!1,configurable:!0}),Object.defineProperty(j.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(j.prototype,"aspectRatio",{get:function(){var v;return(v=this._aspectRatio)!==null&&v!==void 0?v:this.aspectRatios[0]},set:function(v){this._aspectRatio=v},enumerable:!1,configurable:!0}),j.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},j.prototype.show=function(){this.showUI(),this.open()},j.prototype.close=function(v){v===void 0&&(v=!1),this.isOpen&&(this.coverDiv&&this.closeUI(),this.targetObserver&&this.targetObserver.unobserve(this.target),this.displayMode==="popup"&&window.removeEventListener("resize",this.setWindowHeight),v||this.closeEventListeners.forEach(function(C){return C()}),this._isOpen=!1)},j.prototype.addRenderEventListener=function(v){this.renderEventListeners.push(v)},j.prototype.removeRenderEventListener=function(v){this.renderEventListeners.indexOf(v)>-1&&this.renderEventListeners.splice(this.renderEventListeners.indexOf(v),1)},j.prototype.addCloseEventListener=function(v){this.closeEventListeners.push(v)},j.prototype.removeCloseEventListener=function(v){this.closeEventListeners.indexOf(v)>-1&&this.closeEventListeners.splice(this.closeEventListeners.indexOf(v),1)},j.prototype.setupResizeObserver=function(){var v=this;this.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){v.resize(v.target.clientWidth,v.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))},j.prototype.onPopupResize=function(){if(this.contentDiv.clientWidth>0&&this.contentDiv.clientHeight>0){var v=1*this.target.clientWidth/this.target.clientHeight,C=this.contentDiv.clientWidth/v>this.contentDiv.clientHeight?(this.contentDiv.clientHeight-2*this.CANVAS_MARGIN)*v:this.contentDiv.clientWidth-2*this.CANVAS_MARGIN,K=C+2*this.CANVAS_MARGIN<this.contentDiv.clientWidth?this.contentDiv.clientHeight-2*this.CANVAS_MARGIN:(this.contentDiv.clientWidth-2*this.CANVAS_MARGIN)/v;this.resize(C,K)}},j.prototype.setWindowHeight=function(){this.windowHeight=window.innerHeight},j.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"},j.prototype.resize=function(v,C){this.imageWidth=Math.round(v),this.imageHeight=Math.round(C),this.setEditingTargetSize(),this.cropImage.setAttribute("width",this.paddedImageWidth.toString()),this.cropImage.setAttribute("height",this.paddedImageHeight.toString()),this.cropImage.setAttribute("viewBox","0 0 "+this.paddedImageWidth.toString()+" "+this.paddedImageHeight.toString()),this.cropImageHolder.style.width=this.paddedImageWidth+"px",this.cropImageHolder.style.height=this.paddedImageHeight+"px",this.displayMode!=="popup"?this.coverDiv.style.width=this.paddedImageWidth+"px":(this.setTopLeft(),this.positionCropImage()),this.cropLayer.scaleCanvas(this.imageWidth,this.imageHeight),this.applyRotation()},j.prototype.setEditingTarget=function(){var v=document.createElement("canvas");v.width=this.target.naturalWidth,v.height=this.target.naturalHeight,v.getContext("2d").drawImage(this.target,0,0,this.target.naturalWidth,this.target.naturalHeight);var C=v.toDataURL();Et.setAttributes(this.editingTarget,[["href",C]]),this.setEditingTargetSize()},j.prototype.setTopLeft=function(){var v=this.target.getBoundingClientRect(),C=this.editorCanvas.getBoundingClientRect();this.left=v.left-C.left-this.CANVAS_MARGIN,this.top=v.top-C.top-this.CANVAS_MARGIN},j.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 v=Et.createTransform();this.editingTargetRotationContainer.transform.baseVal.appendItem(v);var C=Et.createTransform();this.editingTargetRotationScaleContainer.transform.baseVal.appendItem(C),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)},j.prototype.positionCropImage=function(){this.cropImageHolder.style.top=this.top+"px",this.cropImageHolder.style.left=this.left+"px"},j.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 Br(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()},j.prototype.zoomToCrop=function(){if(this.cropRect){var v=this.cropRect.x-this.CANVAS_MARGIN+this.cropRect.width/2,C=this.cropRect.y-this.CANVAS_MARGIN+this.cropRect.height/2;this.zoomFactor=Math.min(this.imageWidth/this.cropRect.width,this.imageHeight/this.cropRect.height),this.editingTargetContainer&&this.cropLayer&&(this.editingTargetContainer.style.transformOrigin=v+"px "+C+"px",this.editingTargetContainer.style.transform="translate("+(this.imageWidth/2-v+this.CANVAS_MARGIN)+"px,"+(this.imageHeight/2-C+this.CANVAS_MARGIN)+"px) scale("+this.zoomFactor+")",this.cropLayer.zoomFactor=this.zoomFactor)}},j.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)},j.prototype.cropRectChanged=function(v){this.cropRect=v,this.zoomToCropEnabled?this.zoomToCrop():this.cropLayer.zoomFactor=1},j.prototype.attachEvents=function(){window.addEventListener("resize",this.onWindowResize)},j.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"},j.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},j.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 v=this.styles.settings.hideTopToolbar?0:this.toolbarHeight,C=this.target.offsetTop>v+this.CANVAS_MARGIN?this.target.offsetTop-(v+this.CANVAS_MARGIN):0;this.coverDiv.style.top=C+"px",this.coverDiv.style.left=(this.target.offsetLeft>this.CANVAS_MARGIN?this.target.offsetLeft-this.CANVAS_MARGIN:0)+"px",this.coverDiv.style.width=this.target.offsetWidth+this.CANVAS_MARGIN+"px",this.coverDiv.style.zIndex=this.styles.settings.zIndex!==void 0?this.styles.settings.zIndex:"5";break;case"popup":this.coverDiv.style.position="absolute",this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=window.innerHeight+"px",this.coverDiv.style.backgroundColor="rgba(0, 0, 0, 0.75)",this.coverDiv.style.zIndex=this.styles.settings.zIndex!==void 0?this.styles.settings.zIndex:"1000",this.coverDiv.style.display="flex"}this.targetRoot.appendChild(this.coverDiv),this.uiDiv=document.createElement("div"),this.uiDiv.style.display="flex",this.uiDiv.style.flexDirection="column",this.uiDiv.style.flexGrow="2",this.uiDiv.style.margin=this.displayMode==="popup"?this.popupMargin+"px":"0px",this.uiDiv.style.border="0px",this.coverDiv.appendChild(this.uiDiv),this.addToolbars(),this.uiDiv.appendChild(this.topToolbar.getUI()),this.contentDiv=document.createElement("div"),this.contentDiv.style.display="flex",this.contentDiv.style.alignItems="center",this.contentDiv.style.flexDirection="row",this.contentDiv.style.flexGrow="2",this.contentDiv.style.flexShrink="1",this.contentDiv.style.overflow="hidden",this.contentDiv.style.backgroundColor=this.styles.settings.canvasBackgroundColor,this.displayMode==="popup"&&(this.contentDiv.style.maxHeight="calc(100vh - "+(2*this.popupMargin+2*this.toolbarHeight)+"px)",this.contentDiv.style.maxWidth="calc(100vw - "+2*this.popupMargin+"px)"),this.uiDiv.appendChild(this.contentDiv),this.editorCanvas=document.createElement("div"),this.editorCanvas.style.flexGrow="2",this.editorCanvas.style.flexShrink="1",this.editorCanvas.style.position="relative",this.editorCanvas.style.overflow="hidden",this.editorCanvas.style.display="flex",this.displayMode==="popup"&&(this.editorCanvas.style.alignItems="center",this.editorCanvas.style.justifyContent="center"),this.editorCanvas.style.pointerEvents="none",this.contentDiv.appendChild(this.editorCanvas),this.uiDiv.appendChild(this.bottomToolbar.getUI()),this.straightener.angle=this.rotationAngle},j.prototype.addToolbars=function(){this.addTopToolbar(),this.addBottomToolbar()},j.prototype.addTopToolbar=function(){var v=this;this.topToolbar=new $t,this.topToolbar.display=this.styles.settings.hideTopToolbar?"none":"",this.topToolbar.className=this.toolbarStyleClass.name,this.topToolbar.colorsClassName=this.styles.settings.toolbarStyleColorsClassName?this.styles.settings.toolbarStyleColorsClassName:this.toolbarStyleColorsClass.name,this.topToolbar.fadeInClassName=this.styles.fadeInAnimationClassName,this.topToolbar.blockClassName=this.toolbarBlockStyleClass.name,this.topToolbar.buttonClassName=this.toolbarButtonStyleClass.name,this.topToolbar.buttonColorsClassName=this.styles.settings.toolbarButtonStyleColorsClassName?this.styles.settings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,this.topToolbar.buttonActiveColorsClassName=this.styles.settings.toolbarActiveButtonStyleColorsClassName?this.styles.settings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name;var C=new Wr;C.minWidth=3*this.toolbarHeight+"px",this.topToolbar.addButtonBlock(C);var K=[];this.aspectRatios.forEach(function(Ot){var Ht=new Gr(dr.getIcon(Ot.horizontal,Ot.vertical),Ot.horizontal===0&&Ot.vertical===0?"FREE":Ot.horizontal+":"+Ot.vertical);Ht.onClick=function(){return v.ratioButtonClicked(Ot)},K.push(Ht)}),this.aspectRatioButton=new Cr(dr.getIcon(0,0),"Aspect ratio",K),this.aspectRatioButton.dropdownClassName=this.toolbarDropdownStyleClass.name,this.aspectRatioButton.dropdownColorsClassName=this.styles.settings.toolbarDropdownStyleColorsClassName?this.styles.settings.toolbarDropdownStyleColorsClassName:this.toolbarDropdownStyleColorsClass.name,C.addButton(this.aspectRatioButton),this.aspectRatios.length<2&&this.aspectRatioButton.hide();var re=new Gr('<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");re.isActive=this.isGridVisible,re.onClick=function(){v.isGridVisible=!v.isGridVisible,re.isActive=v.isGridVisible},C.addButton(re);var W=new Gr('<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(W.isActive=this.zoomToCropEnabled,W.onClick=function(){v.zoomToCropEnabled=!v.zoomToCropEnabled,W.isActive=v.zoomToCropEnabled},C.addButton(W),!ur.isLicensed){var Ie=new Hr;this.topToolbar.addElementBlock(Ie);var rt=document.createElement("div");rt.className=this.topToolbar.buttonClassName+" "+this.topToolbar.buttonColorsClassName;var vt=document.createElement("a");vt.style.color="currentColor",vt.href="https://markerjs.com/products/cropro",vt.target="_blank",vt.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>',rt.appendChild(vt),Ie.addElement(rt)}var Ct=new Wr;Ct.minWidth=3*this.toolbarHeight+"px",Ct.contentAlign="end",this.topToolbar.addButtonBlock(Ct);var ot=new Gr('<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");ot.onClick=this.startRenderAndClose,Ct.addButton(ot),this.styles.settings.toolbarOkButtonStyleColorsClassName&&(ot.colorsClassName=this.styles.settings.toolbarOkButtonStyleColorsClassName);var Pt=new Gr('<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");Pt.onClick=this.close,Ct.addButton(Pt),this.styles.settings.toolbarCloseButtonStyleColorsClassName&&(Pt.colorsClassName=this.styles.settings.toolbarCloseButtonStyleColorsClassName)},j.prototype.addBottomToolbar=function(){var v=this;this.bottomToolbar=new $t,this.bottomToolbar.display=this.styles.settings.hideBottomToolbar?"none":"",this.bottomToolbar.className=this.toolbarStyleClass.name,this.bottomToolbar.colorsClassName=this.styles.settings.toolbarStyleColorsClassName?this.styles.settings.toolbarStyleColorsClassName:this.toolbarStyleColorsClass.name,this.bottomToolbar.fadeInClassName=this.styles.fadeInAnimationClassName,this.bottomToolbar.blockClassName=this.toolbarBlockStyleClass.name,this.bottomToolbar.buttonClassName=this.toolbarButtonStyleClass.name,this.bottomToolbar.buttonColorsClassName=this.styles.settings.toolbarButtonStyleColorsClassName?this.styles.settings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,this.bottomToolbar.buttonActiveColorsClassName=this.styles.settings.toolbarActiveButtonStyleColorsClassName?this.styles.settings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name;var C=new Wr;C.minWidth=2*this.toolbarHeight+"px",this.bottomToolbar.addButtonBlock(C);var K=new Gr('<svg viewBox="0 0 24 24"><path d="M13 4.07V1L8.45 5.55 13 10V6.09c2.84.48 5 2.94 5 5.91s-2.16 5.43-5 5.91v2.02c3.95-.49 7-3.85 7-7.93s-3.05-7.44-7-7.93M7.1 18.32c1.16.9 2.51 1.44 3.9 1.61V17.9c-.87-.15-1.71-.49-2.46-1.03L7.1 18.32M6.09 13H4.07c.17 1.39.72 2.73 1.62 3.89l1.41-1.42c-.52-.75-.87-1.59-1.01-2.47m1.02-4.47L5.7 7.11C4.8 8.27 4.24 9.61 4.07 11h2.02c.14-.87.49-1.72 1.02-2.47z"/></svg>',"Rotate left");K.onClick=this.rotateLeftButtonClicked,C.addButton(K);var re=new Gr('<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");re.onClick=this.rotateRightButtonClicked,C.addButton(re);var W=new Hr;W.className=this.toolbarStraightenerBlockStyleClass.name,this.bottomToolbar.addElementBlock(W),this.straightener=new An("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(Ct){v.rotateBy(Ct),v.straightener.angle=v.rotationAngle},W.addElement(this.straightener.getUI());var Ie=new Wr;Ie.minWidth=2*this.toolbarHeight+"px",Ie.contentAlign="end",this.bottomToolbar.addButtonBlock(Ie);var rt=new Gr('<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");rt.onClick=this.flipHorizontallyButtonClicked,Ie.addButton(rt);var vt=new Gr('<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");vt.onClick=this.flipVerticallyButtonClicked,Ie.addButton(vt)},j.prototype.ratioButtonClicked=function(v){this.aspectRatio=v,this.applyAspectRatio(),this.aspectRatioButton.hideDropdown()},j.prototype.applyAspectRatio=function(){this.setCropLayerAspectRatio(),this.aspectRatioButton.icon=dr.getIcon(this.aspectRatio.horizontal,this.aspectRatio.vertical)},j.prototype.setCropLayerAspectRatio=function(){this.cropLayer&&(this.aspectRatio&&this.aspectRatio.horizontal!==0&&this.aspectRatio.vertical!==0?this.cropLayer.aspectRatio=new Fr(this.aspectRatio.horizontal,this.aspectRatio.vertical):this.cropLayer.aspectRatio=void 0)},j.prototype.closeUI=function(){this.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},j.prototype.getState=function(){return{width:this.imageWidth,height:this.imageHeight,rotationAngle:this.rotationAngle,flippedHorizontally:this.flippedHorizontally,flippedVertically:this.flippedVertically,cropRect:Object.assign({},this.cropRect)}},j.prototype.restoreState=function(v){if(v){var C=this.cropLayer.getRescaledRect(v.width,v.height,this.imageWidth,this.imageHeight,v.cropRect,this.CANVAS_MARGIN);this.cropLayer.setCropRectangle(C),this.cropRectChanged(C),this.flippedHorizontally=v.flippedHorizontally,this.flippedVertically=v.flippedVertically,this.applyFlip(),this.rotationAngle=v.rotationAngle,this.applyRotation()}},j.prototype.clientToLocalCoordinates=function(v,C){var K=this.cropImage.getBoundingClientRect();return{x:v-K.left,y:C-K.top}},j.prototype.onWindowResize=function(){this.positionUI()},j.prototype.positionUI=function(){switch(this.setTopLeft(),this.displayMode){case"inline":var v=this.target.offsetTop>this.toolbarHeight?this.target.offsetTop-this.toolbarHeight:0;this.coverDiv.style.top=v+"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()},j.prototype.rotateLeftButtonClicked=function(){var v=this.rotationAngle-90;this.rotationAngle%90!=0&&(v+=this.rotationAngle>=0?90-this.rotationAngle%90:-this.rotationAngle%90),this.rotateTo(v)},j.prototype.rotateRightButtonClicked=function(){var v=this.rotationAngle+90;this.rotationAngle%90!=0&&(v-=this.rotationAngle>=0?this.rotationAngle%90:90+this.rotationAngle%90),this.rotateTo(v)},j.prototype.rotateTo=function(v){v=(v=v>180?v-360:v)<=-180?v+360:v,this.rotationAngle=v,this.applyRotation()},j.prototype.rotateBy=function(v){this.rotateTo((this.rotationAngle+v)%360)},j.prototype.applyRotation=function(){var v=this.zoomToCropEnabled;this.zoomToCropEnabled=!1,this.editingTargetRotationScaleContainer.style.transformOrigin=this.imageWidth/2+"px "+this.imageHeight/2+"px",this.editingTargetRotationScaleContainer.style.transform="scale(1)";var C=this.editingTargetRotationContainer.transform.baseVal.getItem(0);C.setRotate(this.rotationAngle,this.imageWidth/2,this.imageHeight/2),this.editingTargetRotationContainer.transform.baseVal.replaceItem(C,0);var K=this.editingTarget.getBoundingClientRect();this.scaleFactor=Math.min(this.imageWidth/K.width,this.imageHeight/K.height),this.editingTargetRotationScaleContainer.style.transform="scale("+this.scaleFactor+")",this.zoomToCropEnabled=v},j.prototype.flipHorizontallyButtonClicked=function(){this.flippedHorizontally=!this.flippedHorizontally,this.applyFlip()},j.prototype.flipVerticallyButtonClicked=function(){this.flippedVertically=!this.flippedVertically,this.applyFlip()},j.prototype.applyFlip=function(){this.editingTarget.style.transform="scale("+(this.flippedHorizontally?-1:1)+","+(this.flippedVertically?-1:1)+")"},j.prototype.startRenderAndClose=function(){return zt(this,void 0,void 0,function(){var v,C;return nr(this,function(K){switch(K.label){case 0:return[4,this.render()];case 1:return v=K.sent(),C=this.getState(),this.renderEventListeners.forEach(function(re){return re(v,C)}),this.close(!0),[2]}})})},j.prototype.render=function(){return zt(this,void 0,void 0,function(){var v;return nr(this,function(C){switch(C.label){case 0:return(v=new Sr).naturalSize=this.renderAtNaturalSize,v.imageType=this.renderImageType,v.imageQuality=this.renderImageQuality,v.width=this.renderWidth,v.height=this.renderHeight,this.unzoomFromCrop(),Et.setAttributes(this.cropLayerContainer,[["display","none"]]),[4,v.rasterize(this.cropImage,this.target,{x:this.cropRect.x,y:this.cropRect.y,width:this.cropRect.width,height:this.cropRect.height},this.CANVAS_MARGIN,this.rotationAngle,this.scaleFactor*(this.flippedHorizontally?-1:1),this.scaleFactor*(this.flippedVertically?-1:1))];case 1:return C.sent(),[4,v.rasterize(this.cropImage,this.target,{x:this.cropRect.x,y:this.cropRect.y,width:this.cropRect.width,height:this.cropRect.height},this.CANVAS_MARGIN,this.rotationAngle,this.scaleFactor*(this.flippedHorizontally?-1:1),this.scaleFactor*(this.flippedVertically?-1:1))];case 2:return[2,C.sent()]}})})},j.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new Ut("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 Ut("toolbar_colors",`
|
|
background-color: `+this.styles.settings.toolbarBackgroundColor+`;
|
|
`)),this.toolbarBlockStyleClass=this.styles.addClass(new Ut("toolbar-block",`
|
|
display: flex;
|
|
align-items: center;
|
|
box-sizing: content-box;
|
|
`));var v=this.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new Ut("toolbar_button",`
|
|
display: inline-block;
|
|
width: `+(this.toolbarHeight-2*v)+`px;
|
|
height: `+(this.toolbarHeight-2*v)+`px;
|
|
padding: `+v+`px;
|
|
cursor: default;
|
|
user-select: none;
|
|
box-sizing: content-box;
|
|
`)),this.toolbarButtonStyleColorsClass=this.styles.addClass(new Ut("toolbar_button_colors",`
|
|
color: `+this.styles.settings.toolbarColor+`;
|
|
fill: currentColor;
|
|
`)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new Ut("toolbar_active_button",`
|
|
color: `+this.styles.settings.toolbarColor+`;
|
|
fill: currentColor;
|
|
background-color: `+this.styles.settings.toolbarBackgroundActiveColor+`
|
|
`)),this.styles.addRule(new kt("."+this.toolbarButtonStyleClass.name+" svg",`
|
|
height: `+this.toolbarHeight/2+`px;
|
|
`)),this.styles.addRule(new kt("."+this.toolbarButtonStyleColorsClass.name+":hover",`
|
|
background-color: `+this.styles.settings.toolbarBackgroundHoverColor+`
|
|
`)),this.toolbarDropdownStyleClass=this.styles.addClass(new Ut("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 Ut("toolbar_dropdown_colors",`
|
|
background-color: `+this.styles.settings.toolbarBackgroundColor+`;
|
|
`)),this.toolbarStraightenerBlockStyleClass=this.styles.addClass(new Ut("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 Ut("toolbar_straightener",`
|
|
display: flex;
|
|
overflow: hidden;
|
|
justify-content: center;
|
|
height: `+(this.toolbarHeight-2*v)+`px;
|
|
padding: `+v+`px;
|
|
cursor: default;
|
|
user-select: none;
|
|
box-sizing: content-box;
|
|
`)),this.toolbarStraightenerStyleColorsClass=this.styles.addClass(new Ut("toolbar_straightener_colors",`
|
|
color: `+this.styles.settings.toolbarColor+`;
|
|
fill: currentColor;
|
|
`))},j.instanceCounter=0,j}(),he=G("8hTe"),we=G.n(he),Qe=/<pre[^>]*>/g;function lt(j){var v=document.createElement("div");return v.innerHTML=j,v.childNodes.length===0?"":v.childNodes[0].nodeValue}var ft=Be.a=function(j){var v=j.value,C=v===void 0?"":v,K=j.edit,re=K===void 0?!1:K,W=j.className,Ie=j.showTextOnly,rt=j.showLines,vt=j.replaces,Ct=j.zoomImg,ot=j.hasMask,Pt=j.style,Ot=Pt===void 0?{}:Pt,Ht=j.stylesPrev,er=Ht===void 0?{}:Ht,wr=String(C),sr=Object(R.useRef)(),hr=Object(R.useRef)(),Zt=Object(R.useState)(""),Qr=Object($.a)(Zt,2),Ir=Qr[0],fr=Qr[1],Kr=Object(R.useState)("office"),$r=Object($.a)(Kr,2),Zr=$r[0],jr=$r[1],Or=function(){var rr=new de(hr.current);rr.displayMode="popup",rr.addRenderEventListener(function(){var mr=Object(L.a)(e.a.mark(function Ar(zr){var br;return e.a.wrap(function(qr){for(;;)switch(qr.prev=qr.next){case 0:return sr.current.style.display="none",qr.next=3,Object(Me.a)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:"educoder.png",file:zr}});case 3:br=qr.sent,br!=null&&br.id&&vt(hr.current.getAttribute("src").replace(ie.a.API_SERVER,""),"/api/attachments/".concat(br==null?void 0:br.id,"?type=").concat(br.content_type));case 5:case"end":return qr.stop()}},Ar)}));return function(Ar){return mr.apply(this,arguments)}}()),rr.show()},Vr=function(){var rr=new Jt(hr.current);rr.settings.displayMode="popup",rr.addEventListener("render",function(){var mr=Object(L.a)(e.a.mark(function Ar(zr){var br;return e.a.wrap(function(qr){for(;;)switch(qr.prev=qr.next){case 0:if(sr.current.style.display="none",!hr.current){qr.next=6;break}return qr.next=4,Object(Me.a)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:"educoder.png",file:zr.dataUrl}});case 4:br=qr.sent,br!=null&&br.id&&vt(hr.current.getAttribute("src").replace(ie.a.API_SERVER,""),"/api/attachments/".concat(br==null?void 0:br.id,"?type=").concat(br.content_type));case 6:case"end":return qr.stop()}},Ar)}));return function(Ar){return mr.apply(this,arguments)}}()),rr.show(),window.markerArea=rr},Yr=Object(R.useMemo)(function(){sr.current&&(sr.current.style.zIndex=-1);try{var ir=/\(\s+\/api\/attachments\/|\(\/api\/attachments\/|\(\/attachments\/download\//g,rr=/\"\/api\/attachments\/|\"\/attachments\/download\//g,mr=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g;wr=wr.replace(ir,"("+ie.a.API_SERVER+"/api/attachments/").replace(rr,'"'+ie.a.API_SERVER+"/api/attachments/").replace(mr,'"'+ie.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(Rn){}var Ar=Q(wr),zr=w();if(wr.match(/\[TOC\]/)&&(Ar=Ar.replace("<p>[TOC]</p>",B()),E()),Ar=Ar.replace(/(__special_katext_id_\d+__)/g,function(Rn,qr){var Bn=zr[qr],Dn=Bn.type,Pn=Bn.expression;return Object(be.renderToString)(lt(Pn)||"",{displayMode:Dn==="block",throwOnError:!1,output:"html"})}),Ar=Ar.replace(/▁/g,"\u2581\u2581\u2581"),m(),Ie){var br=document.createElement("div");return br.innerHTML=Ar,br.innerText}return setTimeout(function(){return rn()},500),Ar},[wr]),Jr=Object(R.useRef)();b.WebkitLineClamp=rt,rt&&(Ot=Object(N.a)(Object(N.a)({},Ot),b));function sn(ir){var rr=ir.target;if(rr.tagName.toUpperCase()==="IMG"){if(Ct){var mr=rr.getAttribute("src");fr(mr),jr("image")}}else if(rr.tagName.toUpperCase()==="A"){var Ar=rr.getAttribute("href");if(Ar.indexOf("office")>-1)ir.preventDefault(),fr(Ar),jr("office");else if(Ar.indexOf("application/pdf")>-1)ir.preventDefault(),fr(Ar),jr("pdf");else if(Ar.indexOf("text/html")>-1)ir.preventDefault(),fr(Ar),jr("html");else if(Ar.startsWith("#")){ir.preventDefault();var zr=document.getElementById(Ar.replace("#",""));zr&&zr.scrollIntoView(!0)}}}var rn=function(){var rr,mr=(rr=Jr.current)===null||rr===void 0?void 0:rr.querySelectorAll("video");mr==null||mr.forEach(function(Ar){if(Ar.oncontextmenu=function(){return!1},Ar.src.indexOf(".m3u8")>-1&&!Ar.canPlayType("application/vnd.apple.mpegurl")){if(q.a.isSupported()){var zr=new q.a;zr.loadSource(Ar.src),zr.attachMedia(Ar)}}})};Object(R.useEffect)(function(){if(Jr.current&&Yr&&(Yr.match(Qe)&&window.PR.prettyPrint()),Jr.current)return Jr.current.addEventListener("click",sn),function(){Jr.current.removeEventListener("click",sn),m(),E()}},[Yr,Jr.current,sn]);var Dr=function(rr){if(!re)return;rr.target.nodeName==="IMG"?(sr.current.style.zIndex=1,sr.current.style.display="flex",sr.current.style.width=rr.target.clientWidth+"px",sr.current.style.height=rr.target.clientHeight+"px",sr.current.style.top=rr.target.offsetTop+"px",sr.current.style.left=rr.target.offsetLeft+"px",hr.current.src=rr.target.getAttribute("src")):sr.current.style.display="none"};return u.a.createElement("div",{style:{position:"relative"}},u.a.createElement("div",{ref:Jr,style:Object(N.a)({},Ot),className:"".concat(W||""," markdown-body ").concat(we.a.mdBody),onMouseOver:Dr,dangerouslySetInnerHTML:{__html:Yr}}),u.a.createElement("div",{ref:sr,className:we.a.button},u.a.createElement(z.a,null,u.a.createElement(V.a,{onClick:function(){return Or()}},"\u88C1\u526A"),u.a.createElement(V.a,{onClick:function(){return Vr()}},"\u7F16\u8F91"))),u.a.createElement("img",{ref:hr,src:"",alt:"sample",crossOrigin:"anonymous",style:{maxWidth:"90%",opacity:0,position:"absolute",zIndex:-1}}),u.a.createElement(me.a,{close:!0,data:Ir,type:Ir!=null&&Ir.length?Zr:"",style:Object(N.a)({},er),onClose:function(){return fr("")}}))}},"9ZNV":function(wt,Be,G){"use strict";G.d(Be,"a",function(){return R});var Ae=G("0Owb"),z=G("+L6B"),U=G("2/Rp"),V=G("q1tI"),N=G.n(V),L=G("UUDw"),$=G.n(L),H=G("TSYQ"),e=G.n(H),R=function(f){var l=f.cancelText,s=l===void 0?"\u53D6\u6D88":l,i=f.okText,o=i===void 0?"\u786E\u5B9A":i,r=f.loading,a=r===void 0?!1:r,n=f.hasOkBtn,t=n===void 0?!0:n,E=f.okButtonProps,b=E===void 0?{}:E,_=f.onCancel,B=_===void 0?function(){}:_,x=f.onOk,h=x===void 0?function(){}:x,d=f.className,A=d===void 0?"":d;return N.a.createElement("div",{className:e()($.a.buttonFixed,A)},N.a.createElement("div",{className:$.a.buttonWrap},N.a.createElement(U.a,{size:"large",className:"".concat($.a.button," mr20"),onClick:B},s),t&&N.a.createElement(U.a,Object(Ae.a)({size:"large",type:"primary",className:"".concat($.a.button," mr20"),loading:a,onClick:h},b),o)))}},"9z17":function(wt,Be,G){"use strict";G.d(Be,"b",function(){return _});var Ae=G("g9YV"),z=G("wCAj"),U=G("5NDa"),V=G("5rEg"),N=G("y8nQ"),L=G("Vl3Y"),$=G("2qtc"),H=G("kLXV"),e=G("7Kak"),R=G("9yH6"),u=G("9og8"),f=G("tJVT"),l=G("WmNS"),s=G.n(l),i=G("q1tI"),o=G.n(i),r=G("ie49"),a=G.n(r),n=G("HBuW"),t=function(d){var A=d.total,c=d.used,w=d.copy,m=d.canNotCopy,g=d.inPaper,F="";return w>0&&m>0?F="\u5176\u4E2D\u6709".concat(w,"\u4E2A\u5B9E\u8BAD\u53EF\u4EE5\u590D\u5236\uFF0C\u6709").concat(m,"\u4E2A\u5B9E\u8BAD\u672A\u5F00\u653E\u590D\u5236"):w>0&&m===0?F="\u5176\u4E2D\u6709".concat(w,"\u4E2A\u5B9E\u8BAD\u53EF\u4EE5\u590D\u5236"):w===0&&m>0&&(F="\u5176\u4E2D\u6709".concat(m,"\u4E2A\u5B9E\u8BAD\u672A\u5F00\u653E\u590D\u5236")),"\u5F53\u524D\u9009\u4E2D".concat(A,"\u4E2A\u5B9E\u8BAD\u4E2D\uFF0C\u6709").concat(c,"\u4E2A\u5B9E\u8BAD\u5DF2\u5728\u8BFE\u5802\u4E2D\u4F7F\u7528\uFF0C").concat(F).concat(g?"\uFF0C\u8BF7\u786E\u8BA4\u662F\u5426\u4F7F\u7528\u8BD5\u5377\uFF1F":"")},E=function(d){return d?{reproducible:"\u8BD5\u5377\u4E2D\u4E0B\u5217\u5B9E\u8BAD\u5DF2\u5728\u6559\u5B66\u8BFE\u5802\u4E2D\u4F7F\u7528\uFF0C\u8BF7\u9009\u62E9\u662F\u5426\u590D\u5236\u4E3A\u65B0\u7684\u5B9E\u8BAD\u53D1\u9001\u5230\u8BFE\u5802\uFF1F",irreproducible:"\u8BD5\u5377\u4E2D\u4E0B\u5217\u91CD\u590D\u4F7F\u7528\u7684\u5B9E\u8BAD\u672A\u5F00\u542F\u590D\u5236\u6743\u9650\uFF0C\u82E5\u7EE7\u7EED\u4F7F\u7528\u4F1A\u5BFC\u81F4\u6210\u7EE9\u76F8\u4E92\u5F71\u54CD"}:{reproducible:"\u5F53\u524D\u5B9E\u8BAD\u5DF2\u5728\u6559\u5B66\u8BFE\u5802\u4E2D\u4F7F\u7528\uFF0C\u8BF7\u9009\u62E9\u662F\u5426\u7EE7\u7EED\u4F7F\u7528\u548C\u662F\u5426\u590D\u5236\u4E3A\u65B0\u7684\u5B9E\u8BAD\u53D1\u9001\u5230\u8BFE\u5802\uFF1F",irreproducible:"\u540C\u4E00\u5B9E\u8BAD\u5728\u4E00\u4E2A\u8BFE\u5802\u4E2D\u91CD\u590D\u4F7F\u7528\u65F6\uFF0C\u4F1A\u5BFC\u81F4\u6210\u7EE9\u76F8\u4E92\u5F71\u54CD\uFF0C\u8BF7\u786E\u8BA4\u662F\u5426\u7EE7\u7EED\u4F7F\u7528\uFF1F"}},b=function(d){var A=d.onCancel,c=d.onOk,w=d.visible,m=d.inPaper,g=d.renderData,F=d.type,k=Object(i.useState)(1),S=Object(f.a)(k,2),Q=S[0],X=S[1],P=Object(i.useState)(!1),q=Object(f.a)(P,2),ie=q[0],be=q[1],me=Object(i.useMemo)(function(){return(g==null?void 0:g.total_num)===1&&(g==null?void 0:g.can_copy_num)===1},[g]);return o.a.createElement(o.a.Fragment,null,me?o.a.createElement(H.a,{centered:!0,closable:!0,visible:w,title:"\u63D0\u793A",width:600,confirmLoading:ie,onCancel:A,onOk:Object(u.a)(s.a.mark(function Me(){return s.a.wrap(function(ke){for(;;)switch(ke.prev=ke.next){case 0:return be(!0),ke.next=3,c(Q);case 3:be(!1);case 4:case"end":return ke.stop()}},Me)}))},o.a.createElement("div",{className:a.a.content,style:{marginBottom:20}},"\u5F53\u524D\u5B9E\u8BAD\u5DF2\u5728\u6559\u5B66\u8BFE\u5802\u4E2D\u4F7F\u7528\uFF0C\u8BF7\u95EE\u662F\u5426\u590D\u5236\u6210\u65B0\u5B9E\u8BAD\u53D1\u9001\u81F3\u6559\u5B66\u8BFE\u5802\u4E2D\uFF1F"),o.a.createElement(R.a.Group,{value:Q,onChange:function(Ne){return X(Ne.target.value)},className:a.a.content,style:{marginBottom:30}},o.a.createElement(R.a,{value:1,style:{color:"#464f66"}},"\u590D\u5236\u5B9E\u8BAD"),o.a.createElement(R.a,{value:0,style:{color:"#464f66"}},"\u4E0D\u590D\u5236\u5B9E\u8BAD")),o.a.createElement("div",{className:a.a.content,style:{marginBottom:10}},"\u8BF4\u660E\uFF1A"),o.a.createElement("div",{className:a.a.content},"\u590D\u5236\u5B9E\u8BAD\uFF1A\u590D\u5236\u4E00\u4EFD\u65B0\u7684\u5B9E\u8BAD\u8FDB\u5165\u8BFE\u5802\uFF0C\u539F\u5B9E\u8BAD\u7684\u8C03\u6574\u4E0D\u4F1A\u5F71\u54CD\u5230\u590D\u5236\u7684\u5B9E\u8BAD\u4E2D\u3002"),o.a.createElement("div",{className:a.a.content},"\u4E0D\u590D\u5236\u5B9E\u8BAD\uFF1A\u540C\u4E00\u5B9E\u8BAD\u5728\u4E00\u4E2A\u8BFE\u5802\u4E2D\u91CD\u590D\u4F7F\u7528\u65F6\uFF0C\u4F1A\u5BFC\u81F4\u6210\u7EE9\u76F8\u4E92\u5F71\u54CD\u3002")):o.a.createElement(H.a,{centered:!0,closable:!0,visible:w,title:"\u63D0\u793A",width:600,onCancel:A,onOk:Object(u.a)(s.a.mark(function Me(){return s.a.wrap(function(ke){for(;;)switch(ke.prev=ke.next){case 0:return be(!0),ke.next=3,c(0);case 3:be(!1);case 4:case"end":return ke.stop()}},Me)}))},o.a.createElement("div",{className:a.a.content},"\u5F53\u524D\u5B9E\u8BAD\u5DF2\u5728\u6559\u5B66\u8BFE\u5802\u4E2D\u4F7F\u7528\uFF0C\u540C\u4E00\u5B9E\u8BAD\u5728\u4E00\u4E2A\u8BFE\u5802\u4E2D\u91CD\u590D\u4F7F\u7528\u65F6\uFF0C\u4F1A\u5BFC\u81F4\u6210\u7EE9\u76F8\u4E92\u5F71\u54CD\uFF0C\u8BF7\u786E\u8BA4\u662F\u5426\u7EE7\u7EED\u4F7F\u7528\uFF1F")))},_=function(){var d=Object(i.useState)(!1),A=Object(f.a)(d,2),c=A[0],w=A[1],m=Object(i.useState)(),g=Object(f.a)(m,2),F=g[0],k=g[1],S=function(){return w(!1)},Q=function(){var X=Object(u.a)(s.a.mark(function P(q){var ie;return s.a.wrap(function(me){for(;;)switch(me.prev=me.next){case 0:return me.next=2,Object(n.p)(q);case 2:if(ie=me.sent,!("status"in ie)){me.next=5;break}return me.abrupt("return",!1);case 5:if(!(ie.repeat_shixun_num===0)){me.next=7;break}return me.abrupt("return",!1);case 7:return k(ie),w(!0),me.abrupt("return",!0);case 10:case"end":return me.stop()}},P)}));return function(q){return X.apply(this,arguments)}}();return[c,S,F,Q]},B=function(d){var A=L.a.useForm(),c=Object(f.a)(A,1),w=c[0],m=Object(i.useState)(!1),g=Object(f.a)(m,2),F=g[0],k=g[1],S=d.onCancel,Q=d.onOk,X=d.visible,P=d.inPaper,q=P===void 0?!1:P,ie=d.renderData,be=d.type,me=Object(i.useMemo)(function(){return q?[{title:"\u5B9E\u8BAD\u540D\u79F0",dataIndex:"name",width:424,align:"center",className:a.a.tableCell},{title:"\u662F\u5426\u590D\u5236",dataIndex:"is_copy",align:"center",render:function(Ye,_e){return o.a.createElement(o.a.Fragment,null,o.a.createElement(L.a.Item,{name:["".concat(be==="subject"?_e.stage_shixun_id:_e.id),"is_copy"],initialValue:1},o.a.createElement(R.a.Group,null,o.a.createElement(R.a,{value:1},"\u662F"),o.a.createElement(R.a,{value:0},"\u5426"))),o.a.createElement(L.a.Item,{name:["".concat(be==="subject"?_e==null?void 0:_e.stage_shixun_id:_e.id),"is_use"],hidden:!0,initialValue:1},o.a.createElement(V.a,{type:"hidden"})))}}]:[{title:"\u5B9E\u8BAD\u540D\u79F0",dataIndex:"name",width:424,align:"center",className:a.a.tableCell},{title:"\u662F\u5426\u4F7F\u7528",dataIndex:"is_use",align:"center",render:function(Ye,_e){return o.a.createElement(L.a.Item,{name:["".concat(be==="subject"?_e.stage_shixun_id:_e.id),"is_use"],initialValue:1},o.a.createElement(R.a.Group,null,o.a.createElement(R.a,{value:1},"\u662F"),o.a.createElement(R.a,{value:0},"\u5426")))}},{title:"\u662F\u5426\u590D\u5236",dataIndex:"is_copy",align:"center",render:function(Ye,_e){return o.a.createElement(L.a.Item,{name:["".concat(be==="subject"?_e.stage_shixun_id:_e.id),"is_copy"],initialValue:1},o.a.createElement(R.a.Group,null,o.a.createElement(R.a,{value:1},"\u662F"),o.a.createElement(R.a,{value:0},"\u5426")))}}]},[q]),Me=Object(i.useMemo)(function(){return q?[{title:"\u5B9E\u8BAD\u540D\u79F0",dataIndex:"name",width:424,className:a.a.tableCell,align:"center",render:function(Ye,_e){return o.a.createElement(o.a.Fragment,null,o.a.createElement("span",null,Ye),o.a.createElement(L.a.Item,{name:["".concat(be==="subject"?_e==null?void 0:_e.stage_shixun_id:_e.id),"is_copy"],hidden:!0,initialValue:0},o.a.createElement(V.a,{type:"hidden"})),o.a.createElement(L.a.Item,{name:["".concat(be==="subject"?_e==null?void 0:_e.stage_shixun_id:_e.id),"is_use"],hidden:!0,initialValue:1},o.a.createElement(V.a,{type:"hidden"})))}}]:[{title:"\u5B9E\u8BAD\u540D\u79F0",dataIndex:"name",width:424,className:a.a.tableCell,align:"center"},{title:"\u662F\u5426\u4F7F\u7528",dataIndex:"is_use",align:"center",render:function(Ye,_e){return o.a.createElement(o.a.Fragment,null,o.a.createElement(L.a.Item,{name:["".concat(be==="subject"?_e==null?void 0:_e.stage_shixun_id:_e.id),"is_use"],initialValue:0},o.a.createElement(R.a.Group,null,o.a.createElement(R.a,{value:1},"\u662F"),o.a.createElement(R.a,{value:0},"\u5426"))),o.a.createElement(L.a.Item,{name:["".concat(be==="subject"?_e==null?void 0:_e.stage_shixun_id:_e.id),"is_copy"],hidden:!0,initialValue:0},o.a.createElement(V.a,{type:"hidden"})))}}]},[q]),Ne=Object(i.useMemo)(function(){return t({total:ie==null?void 0:ie.total_num,used:ie==null?void 0:ie.repeat_shixun_num,copy:ie==null?void 0:ie.can_copy_num,canNotCopy:ie==null?void 0:ie.no_copy_num,inPaper:q})},[ie,q]),ke=Object(i.useMemo)(function(){return E(q)},[q]);return o.a.createElement(H.a,{title:"\u5B9E\u8BAD\u91CD\u590D\u4F7F\u7528\u63D0\u793A",centered:!0,visible:X,confirmLoading:F,onOk:Object(u.a)(s.a.mark(function Ke(){var Ye,_e;return s.a.wrap(function(Pe){for(;;)switch(Pe.prev=Pe.next){case 0:return k(!0),Ye=w.getFieldsValue(),_e=Object.keys(Ye).map(function(bt){return{id:parseInt(bt),is_use:Ye[bt].is_use,is_copy:Ye[bt].is_copy}}),Pe.next=5,Q(_e);case 5:k(!1);case 6:case"end":return Pe.stop()}},Ke)})),onCancel:S,width:800,okText:"\u786E\u8BA4",className:a.a.antdModal,destroyOnClose:!0},o.a.createElement(L.a,{form:w,preserve:!1},o.a.createElement("div",{className:a.a.brief},Ne),(ie==null?void 0:ie.can_copy_num)>0&&o.a.createElement("div",null,o.a.createElement("div",{className:a.a.contentTitle},"\u53EF\u590D\u5236\u5B9E\u8BAD"),o.a.createElement("div",{className:a.a.content},ke.reproducible),o.a.createElement("div",{className:a.a.tips},o.a.createElement("div",null,"\u590D\u5236\u5B9E\u8BAD\uFF1A\u590D\u5236\u4E00\u4EFD\u65B0\u7684\u5B9E\u8BAD\u8FDB\u5165\u8BFE\u5802\uFF0C\u539F\u5B9E\u8BAD\u7684\u8C03\u6574\u4E0D\u4F1A\u5F71\u54CD\u5230\u590D\u5236\u7684\u5B9E\u8BAD\u4E2D\u3002"),o.a.createElement("div",null,"\u4E0D\u590D\u5236\u5B9E\u8BAD\uFF1A\u540C\u4E00\u5B9E\u8BAD\u5728\u4E00\u4E2A\u8BFE\u5802\u4E2D\u91CD\u590D\u4F7F\u7528\u65F6\uFF0C\u4F1A\u5BFC\u81F4\u6210\u7EE9\u76F8\u4E92\u5F71\u54CD\u3002")),o.a.createElement(z.a,{columns:me,className:a.a.antdTable,dataSource:ie==null?void 0:ie.can_copy_list,rowKey:be==="subject"?"stage_shixun_id":"id",pagination:!1,scroll:{y:240},bordered:!0})),(ie==null?void 0:ie.no_copy_num)>0&&o.a.createElement("div",null,o.a.createElement("div",{className:a.a.contentTitle},"\u4E0D\u53EF\u590D\u5236\u5B9E\u8BAD"),o.a.createElement("div",{className:a.a.content},ke.irreproducible),o.a.createElement(z.a,{columns:Me,className:a.a.antdTable,dataSource:ie==null?void 0:ie.no_copy_list,rowKey:be==="subject"?"stage_shixun_id":"id",pagination:!1,scroll:{y:200},bordered:!0})),(ie==null?void 0:ie.no_use_list.length)>0&&(ie==null?void 0:ie.no_use_list.map(function(Ke){return o.a.createElement("div",{key:be==="subject"?Ke.stage_shixun_id:Ke.id},o.a.createElement(L.a.Item,{name:["".concat(be==="subject"?Ke==null?void 0:Ke.stage_shixun_id:Ke.id),"is_copy"],hidden:!0,initialValue:0},o.a.createElement(V.a,{type:"hidden"})),o.a.createElement(L.a.Item,{name:["".concat(be==="subject"?Ke==null?void 0:Ke.stage_shixun_id:Ke.id),"is_use"],hidden:!0,initialValue:1},o.a.createElement(V.a,{type:"hidden"})))}))))},x=function(d){var A=d.modalType;return A==="multiple"?o.a.createElement(B,d):o.a.createElement(b,d)};Be.a=x},BU3w:function(wt,Be,G){"use strict";G.d(Be,"a",function(){return L});var Ae=G("MNnm"),z="rc-util-key";function U($){if($.attachTo)return $.attachTo;var H=document.querySelector("head");return H||document.body}function V($){var H,e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!Object(Ae.a)())return null;var R=document.createElement("style");if((H=e.csp)===null||H===void 0?void 0:H.nonce){var u;R.nonce=(u=e.csp)===null||u===void 0?void 0:u.nonce}R.innerHTML=$;var f=U(e),l=f.firstChild;return e.prepend&&f.prepend?f.prepend(R):e.prepend&&l?f.insertBefore(R,l):f.appendChild(R),R}var N=new Map;function L($,H){var e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},R=U(e);if(!N.has(R)){var u=V("",e),f=u.parentNode;N.set(R,f),f.removeChild(u)}var l=Array.from(N.get(R).children).find(function(a){return a.tagName==="STYLE"&&a[z]===H});if(l){var s,i;if(((s=e.csp)===null||s===void 0?void 0:s.nonce)&&l.nonce!==((i=e.csp)===null||i===void 0?void 0:i.nonce)){var o;l.nonce=(o=e.csp)===null||o===void 0?void 0:o.nonce}return l.innerHTML!==$&&(l.innerHTML=$),l}var r=V($,e);return r[z]=H,r}},"C/vA":function(wt,Be,G){"use strict";G.d(Be,"a",function(){return Ae});function Ae(z){const U=this;let V=!1,N;return function(){return V||(V=!0,N=z.apply(U,arguments)),N}}},"Cg/j":function(wt,Be,G){"use strict";G.d(Be,"b",function(){return Ae}),G.d(Be,"a",function(){return z}),G.d(Be,"c",function(){return V}),G.d(Be,"d",function(){return N});var Ae;(function(L){L.serviceIds=new Map,L.DI_TARGET="$di$target",L.DI_DEPENDENCIES="$di$dependencies";function $(H){return H[L.DI_DEPENDENCIES]||[]}L.getServiceDependencies=$})(Ae||(Ae={}));const z=V("instantiationService");function U(L,$,H,e){$[Ae.DI_TARGET]===$?$[Ae.DI_DEPENDENCIES].push({id:L,index:H,optional:e}):($[Ae.DI_DEPENDENCIES]=[{id:L,index:H,optional:e}],$[Ae.DI_TARGET]=$)}function V(L){if(Ae.serviceIds.has(L))return Ae.serviceIds.get(L);const $=function(H,e,R){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");U($,H,R,!1)};return $.toString=()=>L,Ae.serviceIds.set(L,$),$}function N(L){return function($,H,e){if(arguments.length!==3)throw new Error("@optional-decorator can only be used to decorate a parameter");U(L,$,e,!0)}}},D3Jc:function(wt,Be,G){wt.exports={bg:"bg___2N4xV",wrap:"wrap___197Yw",title:"title___SRViJ",btnWrapper:"btnWrapper___1Clah",titleForExport:"titleForExport___1w_Fv",flexRow:"flexRow___2VcOb",flexColumn:"flexColumn___3sATC",flexJustifyBetween:"flexJustifyBetween___28Fc2",relative:"relative___1Z6Yd",questionNumber:"questionNumber___3JZ7u",score:"score___JiHU1",selectTopicButton:"selectTopicButton___2FHxM",line:"line___2fHJL",dragTip:"dragTip___3K-IA",typeActive:"typeActive___3Sew8",mouseTypeActive:"mouseTypeActive___2R64u",typeName:"typeName___1laV6",typeNumber:"typeNumber___slW4Y",typeAction:"typeAction___HFUjV",setScore:"setScore___3TxSu",delete:"delete___gIO9w",modal:"modal___2NK84"}},DlQD:function(wt,Be,G){(function(Ae,z){wt.exports=z()})(this,function(){"use strict";function Ae(De,xe){for(var Se=0;Se<xe.length;Se++){var oe=xe[Se];oe.enumerable=oe.enumerable||!1,oe.configurable=!0,"value"in oe&&(oe.writable=!0),Object.defineProperty(De,oe.key,oe)}}function z(De,xe,Se){return xe&&Ae(De.prototype,xe),Se&&Ae(De,Se),De}function U(De,xe){if(!De)return;if(typeof De=="string")return V(De,xe);var Se=Object.prototype.toString.call(De).slice(8,-1);if(Se==="Object"&&De.constructor&&(Se=De.constructor.name),Se==="Map"||Se==="Set")return Array.from(De);if(Se==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Se))return V(De,xe)}function V(De,xe){(xe==null||xe>De.length)&&(xe=De.length);for(var Se=0,oe=new Array(xe);Se<xe;Se++)oe[Se]=De[Se];return oe}function N(De,xe){var Se;if(typeof Symbol=="undefined"||De[Symbol.iterator]==null){if(Array.isArray(De)||(Se=U(De))||xe&&De&&typeof De.length=="number"){Se&&(De=Se);var oe=0;return function(){return oe>=De.length?{done:!0}:{done:!1,value:De[oe++]}}}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 Se=De[Symbol.iterator](),Se.next.bind(Se)}function L(De,xe){return xe={exports:{}},De(xe,xe.exports),xe.exports}var $=L(function(De){function xe(){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 Se(oe){De.exports.defaults=oe}De.exports={defaults:xe(),getDefaults:xe,changeDefaults:Se}}),H=$.defaults,e=$.getDefaults,R=$.changeDefaults,u=/[&<>"']/,f=/[&<>"']/g,l=/[<>"']|&(?!#?\w+;)/,s=/[<>"']|&(?!#?\w+;)/g,i={"&":"&","<":"<",">":">",'"':""","'":"'"},o=function(xe){return i[xe]};function r(De,xe){if(xe){if(u.test(De))return De.replace(f,o)}else if(l.test(De))return De.replace(s,o);return De}var a=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function n(De){return De.replace(a,function(xe,Se){return Se=Se.toLowerCase(),Se==="colon"?":":Se.charAt(0)==="#"?Se.charAt(1)==="x"?String.fromCharCode(parseInt(Se.substring(2),16)):String.fromCharCode(+Se.substring(1)):""})}var t=/(^|[^\[])\^/g;function E(De,xe){De=De.source||De,xe=xe||"";var Se={replace:function(ce,Ee){return Ee=Ee.source||Ee,Ee=Ee.replace(t,"$1"),De=De.replace(ce,Ee),Se},getRegex:function(){return new RegExp(De,xe)}};return Se}var b=/[^\w:]/g,_=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function B(De,xe,Se){if(De){var oe;try{oe=decodeURIComponent(n(Se)).replace(b,"").toLowerCase()}catch(ce){return null}if(oe.indexOf("javascript:")===0||oe.indexOf("vbscript:")===0||oe.indexOf("data:")===0)return null}xe&&!_.test(Se)&&(Se=c(xe,Se));try{Se=encodeURI(Se).replace(/%25/g,"%")}catch(ce){return null}return Se}var x={},h=/^[^:]+:\/*[^/]*$/,d=/^([^:]+:)[\s\S]*$/,A=/^([^:]+:\/*[^/]*)[\s\S]*$/;function c(De,xe){x[" "+De]||(h.test(De)?x[" "+De]=De+"/":x[" "+De]=F(De,"/",!0)),De=x[" "+De];var Se=De.indexOf(":")===-1;return xe.substring(0,2)==="//"?Se?xe:De.replace(d,"$1")+xe:xe.charAt(0)==="/"?Se?xe:De.replace(A,"$1")+xe:De+xe}var w={exec:function(){}};function m(De){for(var xe=1,Se,oe;xe<arguments.length;xe++){Se=arguments[xe];for(oe in Se)Object.prototype.hasOwnProperty.call(Se,oe)&&(De[oe]=Se[oe])}return De}function g(De,xe){var Se=De.replace(/\|/g,function(Ee,Ce,Ge){for(var et=!1,pt=Ce;--pt>=0&&Ge[pt]==="\\";)et=!et;return et?"|":" |"}),oe=Se.split(/ \|/),ce=0;if(oe.length>xe)oe.splice(xe);else for(;oe.length<xe;)oe.push("");for(;ce<oe.length;ce++)oe[ce]=oe[ce].trim().replace(/\\\|/g,"|");return oe}function F(De,xe,Se){var oe=De.length;if(oe===0)return"";for(var ce=0;ce<oe;){var Ee=De.charAt(oe-ce-1);if(Ee===xe&&!Se)ce++;else if(Ee!==xe&&Se)ce++;else break}return De.substr(0,oe-ce)}function k(De,xe){if(De.indexOf(xe[1])===-1)return-1;for(var Se=De.length,oe=0,ce=0;ce<Se;ce++)if(De[ce]==="\\")ce++;else if(De[ce]===xe[0])oe++;else if(De[ce]===xe[1]&&(oe--,oe<0))return ce;return-1}function S(De){De&&De.sanitize&&!De.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 Q={escape:r,unescape:n,edit:E,cleanUrl:B,resolveUrl:c,noopTest:w,merge:m,splitCells:g,rtrim:F,findClosingBracket:k,checkSanitizeDeprecation:S},X=$.defaults,P=Q.rtrim,q=Q.splitCells,ie=Q.escape,be=Q.findClosingBracket;function me(De,xe,Se){var oe=xe.href,ce=xe.title?ie(xe.title):null,Ee=De[1].replace(/\\([\[\]])/g,"$1");return De[0].charAt(0)!=="!"?{type:"link",raw:Se,href:oe,title:ce,text:Ee}:{type:"image",raw:Se,href:oe,title:ce,text:ie(Ee)}}function Me(De,xe){var Se=De.match(/^(\s+)(?:```)/);if(Se===null)return xe;var oe=Se[1];return xe.split(`
|
|
`).map(function(ce){var Ee=ce.match(/^\s+/);if(Ee===null)return ce;var Ce=Ee[0];return Ce.length>=oe.length?ce.slice(oe.length):ce}).join(`
|
|
`)}var Ne=function(){function De(Se){this.options=Se||X}var xe=De.prototype;return xe.space=function(oe){var ce=this.rules.block.newline.exec(oe);if(ce)return ce[0].length>1?{type:"space",raw:ce[0]}:{raw:`
|
|
`}},xe.code=function(oe,ce){var Ee=this.rules.block.code.exec(oe);if(Ee){var Ce=ce[ce.length-1];if(Ce&&Ce.type==="paragraph")return{raw:Ee[0],text:Ee[0].trimRight()};var Ge=Ee[0].replace(/^ {4}/gm,"");return{type:"code",raw:Ee[0],codeBlockStyle:"indented",text:this.options.pedantic?Ge:P(Ge,`
|
|
`)}}},xe.fences=function(oe){var ce=this.rules.block.fences.exec(oe);if(ce){var Ee=ce[0],Ce=Me(Ee,ce[3]||"");return{type:"code",raw:Ee,lang:ce[2]?ce[2].trim():ce[2],text:Ce}}},xe.heading=function(oe){var ce=this.rules.block.heading.exec(oe);if(ce)return{type:"heading",raw:ce[0],depth:ce[1].length,text:ce[2]}},xe.nptable=function(oe){var ce=this.rules.block.nptable.exec(oe);if(ce){var Ee={type:"table",header:q(ce[1].replace(/^ *| *\| *$/g,"")),align:ce[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:ce[3]?ce[3].replace(/\n$/,"").split(`
|
|
`):[],raw:ce[0]};if(Ee.header.length===Ee.align.length){var Ce=Ee.align.length,Ge;for(Ge=0;Ge<Ce;Ge++)/^ *-+: *$/.test(Ee.align[Ge])?Ee.align[Ge]="right":/^ *:-+: *$/.test(Ee.align[Ge])?Ee.align[Ge]="center":/^ *:-+ *$/.test(Ee.align[Ge])?Ee.align[Ge]="left":Ee.align[Ge]=null;for(Ce=Ee.cells.length,Ge=0;Ge<Ce;Ge++)Ee.cells[Ge]=q(Ee.cells[Ge],Ee.header.length);return Ee}}},xe.hr=function(oe){var ce=this.rules.block.hr.exec(oe);if(ce)return{type:"hr",raw:ce[0]}},xe.blockquote=function(oe){var ce=this.rules.block.blockquote.exec(oe);if(ce){var Ee=ce[0].replace(/^ *> ?/gm,"");return{type:"blockquote",raw:ce[0],text:Ee}}},xe.list=function(oe){var ce=this.rules.block.list.exec(oe);if(ce){for(var Ee=ce[0],Ce=ce[2],Ge=Ce.length>1,et=Ce[Ce.length-1]===")",pt={type:"list",raw:Ee,ordered:Ge,start:Ge?+Ce.slice(0,-1):"",loose:!1,items:[]},Bt=ce[0].match(this.rules.block.item),Dt=!1,xt,tr,Xt,gt,Mt,Jt,Lt,ar=Bt.length,zt=0;zt<ar;zt++)xt=Bt[zt],Ee=xt,tr=xt.length,xt=xt.replace(/^ *([*+-]|\d+[.)]) */,""),~xt.indexOf(`
|
|
`)&&(tr-=xt.length,xt=this.options.pedantic?xt.replace(/^ {1,4}/gm,""):xt.replace(new RegExp("^ {1,"+tr+"}","gm"),"")),zt!==ar-1&&(Xt=this.rules.block.bullet.exec(Bt[zt+1])[0],(Ge?Xt.length===1||!et&&Xt[Xt.length-1]===")":Xt.length>1||this.options.smartLists&&Xt!==Ce)&&(gt=Bt.slice(zt+1).join(`
|
|
`),pt.raw=pt.raw.substring(0,pt.raw.length-gt.length),zt=ar-1)),Mt=Dt||/\n\n(?!\s*$)/.test(xt),zt!==ar-1&&(Dt=xt.charAt(xt.length-1)===`
|
|
`,Mt||(Mt=Dt)),Mt&&(pt.loose=!0),Jt=/^\[[ xX]\] /.test(xt),Lt=void 0,Jt&&(Lt=xt[1]!==" ",xt=xt.replace(/^\[[ xX]\] +/,"")),pt.items.push({type:"list_item",raw:Ee,task:Jt,checked:Lt,loose:Mt,text:xt});return pt}},xe.html=function(oe){var ce=this.rules.block.html.exec(oe);if(ce)return{type:this.options.sanitize?"paragraph":"html",raw:ce[0],pre:!this.options.sanitizer&&(ce[1]==="pre"||ce[1]==="script"||ce[1]==="style"),text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(ce[0]):ie(ce[0]):ce[0]}},xe.def=function(oe){var ce=this.rules.block.def.exec(oe);if(ce){ce[3]&&(ce[3]=ce[3].substring(1,ce[3].length-1));var Ee=ce[1].toLowerCase().replace(/\s+/g," ");return{tag:Ee,raw:ce[0],href:ce[2],title:ce[3]}}},xe.table=function(oe){var ce=this.rules.block.table.exec(oe);if(ce){var Ee={type:"table",header:q(ce[1].replace(/^ *| *\| *$/g,"")),align:ce[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:ce[3]?ce[3].replace(/\n$/,"").split(`
|
|
`):[]};if(Ee.header.length===Ee.align.length){Ee.raw=ce[0];var Ce=Ee.align.length,Ge;for(Ge=0;Ge<Ce;Ge++)/^ *-+: *$/.test(Ee.align[Ge])?Ee.align[Ge]="right":/^ *:-+: *$/.test(Ee.align[Ge])?Ee.align[Ge]="center":/^ *:-+ *$/.test(Ee.align[Ge])?Ee.align[Ge]="left":Ee.align[Ge]=null;for(Ce=Ee.cells.length,Ge=0;Ge<Ce;Ge++)Ee.cells[Ge]=q(Ee.cells[Ge].replace(/^ *\| *| *\| *$/g,""),Ee.header.length);return Ee}}},xe.lheading=function(oe){var ce=this.rules.block.lheading.exec(oe);if(ce)return{type:"heading",raw:ce[0],depth:ce[2].charAt(0)==="="?1:2,text:ce[1]}},xe.paragraph=function(oe){var ce=this.rules.block.paragraph.exec(oe);if(ce)return{type:"paragraph",raw:ce[0],text:ce[1].charAt(ce[1].length-1)===`
|
|
`?ce[1].slice(0,-1):ce[1]}},xe.text=function(oe,ce){var Ee=this.rules.block.text.exec(oe);if(Ee){var Ce=ce[ce.length-1];return Ce&&Ce.type==="text"?{raw:Ee[0],text:Ee[0]}:{type:"text",raw:Ee[0],text:Ee[0]}}},xe.escape=function(oe){var ce=this.rules.inline.escape.exec(oe);if(ce)return{type:"escape",raw:ce[0],text:ie(ce[1])}},xe.tag=function(oe,ce,Ee){var Ce=this.rules.inline.tag.exec(oe);if(Ce)return!ce&&/^<a /i.test(Ce[0])?ce=!0:ce&&/^<\/a>/i.test(Ce[0])&&(ce=!1),!Ee&&/^<(pre|code|kbd|script)(\s|>)/i.test(Ce[0])?Ee=!0:Ee&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(Ce[0])&&(Ee=!1),{type:this.options.sanitize?"text":"html",raw:Ce[0],inLink:ce,inRawBlock:Ee,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(Ce[0]):ie(Ce[0]):Ce[0]}},xe.link=function(oe){var ce=this.rules.inline.link.exec(oe);if(ce){var Ee=be(ce[2],"()");if(Ee>-1){var Ce=ce[0].indexOf("!")===0?5:4,Ge=Ce+ce[1].length+Ee;ce[2]=ce[2].substring(0,Ee),ce[0]=ce[0].substring(0,Ge).trim(),ce[3]=""}var et=ce[2],pt="";if(this.options.pedantic){var Bt=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(et);Bt?(et=Bt[1],pt=Bt[3]):pt=""}else pt=ce[3]?ce[3].slice(1,-1):"";et=et.trim().replace(/^<([\s\S]*)>$/,"$1");var Dt=me(ce,{href:et&&et.replace(this.rules.inline._escapes,"$1"),title:pt&&pt.replace(this.rules.inline._escapes,"$1")},ce[0]);return Dt}},xe.reflink=function(oe,ce){var Ee;if((Ee=this.rules.inline.reflink.exec(oe))||(Ee=this.rules.inline.nolink.exec(oe))){var Ce=(Ee[2]||Ee[1]).replace(/\s+/g," ");if(Ce=ce[Ce.toLowerCase()],!Ce||!Ce.href){var Ge=Ee[0].charAt(0);return{type:"text",raw:Ge,text:Ge}}var et=me(Ee,Ce,Ee[0]);return et}},xe.strong=function(oe,ce,Ee){Ee===void 0&&(Ee="");var Ce=this.rules.inline.strong.start.exec(oe);if(Ce&&(!Ce[1]||Ce[1]&&(Ee===""||this.rules.inline.punctuation.exec(Ee)))){ce=ce.slice(-1*oe.length);var Ge=Ce[0]==="**"?this.rules.inline.strong.endAst:this.rules.inline.strong.endUnd;Ge.lastIndex=0;for(var et;(Ce=Ge.exec(ce))!=null;)if(et=this.rules.inline.strong.middle.exec(ce.slice(0,Ce.index+3)),et)return{type:"strong",raw:oe.slice(0,et[0].length),text:oe.slice(2,et[0].length-2)}}},xe.em=function(oe,ce,Ee){Ee===void 0&&(Ee="");var Ce=this.rules.inline.em.start.exec(oe);if(Ce&&(!Ce[1]||Ce[1]&&(Ee===""||this.rules.inline.punctuation.exec(Ee)))){ce=ce.slice(-1*oe.length);var Ge=Ce[0]==="*"?this.rules.inline.em.endAst:this.rules.inline.em.endUnd;Ge.lastIndex=0;for(var et;(Ce=Ge.exec(ce))!=null;)if(et=this.rules.inline.em.middle.exec(ce.slice(0,Ce.index+2)),et)return{type:"em",raw:oe.slice(0,et[0].length),text:oe.slice(1,et[0].length-1)}}},xe.codespan=function(oe){var ce=this.rules.inline.code.exec(oe);if(ce){var Ee=ce[2].replace(/\n/g," "),Ce=/[^ ]/.test(Ee),Ge=Ee.startsWith(" ")&&Ee.endsWith(" ");return Ce&&Ge&&(Ee=Ee.substring(1,Ee.length-1)),Ee=ie(Ee,!0),{type:"codespan",raw:ce[0],text:Ee}}},xe.br=function(oe){var ce=this.rules.inline.br.exec(oe);if(ce)return{type:"br",raw:ce[0]}},xe.del=function(oe){var ce=this.rules.inline.del.exec(oe);if(ce)return{type:"del",raw:ce[0],text:ce[1]}},xe.autolink=function(oe,ce){var Ee=this.rules.inline.autolink.exec(oe);if(Ee){var Ce,Ge;return Ee[2]==="@"?(Ce=ie(this.options.mangle?ce(Ee[1]):Ee[1]),Ge="mailto:"+Ce):(Ce=ie(Ee[1]),Ge=Ce),{type:"link",raw:Ee[0],text:Ce,href:Ge,tokens:[{type:"text",raw:Ce,text:Ce}]}}},xe.url=function(oe,ce){var Ee;if(Ee=this.rules.inline.url.exec(oe)){var Ce,Ge;if(Ee[2]==="@")Ce=ie(this.options.mangle?ce(Ee[0]):Ee[0]),Ge="mailto:"+Ce;else{var et;do et=Ee[0],Ee[0]=this.rules.inline._backpedal.exec(Ee[0])[0];while(et!==Ee[0]);Ce=ie(Ee[0]),Ee[1]==="www."?Ge="http://"+Ce:Ge=Ce}return{type:"link",raw:Ee[0],text:Ce,href:Ge,tokens:[{type:"text",raw:Ce,text:Ce}]}}},xe.inlineText=function(oe,ce,Ee){var Ce=this.rules.inline.text.exec(oe);if(Ce){var Ge;return ce?Ge=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(Ce[0]):ie(Ce[0]):Ce[0]:Ge=ie(this.options.smartypants?Ee(Ce[0]):Ce[0]),{type:"text",raw:Ce[0],text:Ge}}},De}(),ke=Q.noopTest,Ke=Q.edit,Ye=Q.merge,_e={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:ke,table:ke,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html)[^\n]+)*)/,text:/^[^\n]+/};_e._label=/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,_e._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,_e.def=Ke(_e.def).replace("label",_e._label).replace("title",_e._title).getRegex(),_e.bullet=/(?:[*+-]|\d{1,9}[.)])/,_e.item=/^( *)(bull) ?[^\n]*(?:\n(?!\1bull ?)[^\n]*)*/,_e.item=Ke(_e.item,"gm").replace(/bull/g,_e.bullet).getRegex(),_e.list=Ke(_e.list).replace(/bull/g,_e.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+_e.def.source+")").getRegex(),_e._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",_e._comment=/<!--(?!-?>)[\s\S]*?-->/,_e.html=Ke(_e.html,"i").replace("comment",_e._comment).replace("tag",_e._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),_e.paragraph=Ke(_e._paragraph).replace("hr",_e.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",_e._tag).getRegex(),_e.blockquote=Ke(_e.blockquote).replace("paragraph",_e.paragraph).getRegex(),_e.normal=Ye({},_e),_e.gfm=Ye({},_e.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*|$)"}),_e.gfm.nptable=Ke(_e.gfm.nptable).replace("hr",_e.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",_e._tag).getRegex(),_e.gfm.table=Ke(_e.gfm.table).replace("hr",_e.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",_e._tag).getRegex(),_e.pedantic=Ye({},_e.normal,{html:Ke(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",_e._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:ke,paragraph:Ke(_e.normal._paragraph).replace("hr",_e.hr).replace("heading",` *#{1,6} *[^
|
|
]`).replace("lheading",_e.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var Te={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:ke,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:ke,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\<!\[`*]|\b_|$)|[^ ](?= {2,}\n))|(?= {2,}\n))/,punctuation:/^([\s*punctuation])/};Te._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~",Te.punctuation=Ke(Te.punctuation).replace(/punctuation/g,Te._punctuation).getRegex(),Te._blockSkip="\\[[^\\]]*?\\]\\([^\\)]*?\\)|`[^`]*?`|<[^>]*?>",Te._overlapSkip="__[^_]*?__|\\*\\*\\[^\\*\\]*?\\*\\*",Te.em.start=Ke(Te.em.start).replace(/punctuation/g,Te._punctuation).getRegex(),Te.em.middle=Ke(Te.em.middle).replace(/punctuation/g,Te._punctuation).replace(/overlapSkip/g,Te._overlapSkip).getRegex(),Te.em.endAst=Ke(Te.em.endAst,"g").replace(/punctuation/g,Te._punctuation).getRegex(),Te.em.endUnd=Ke(Te.em.endUnd,"g").replace(/punctuation/g,Te._punctuation).getRegex(),Te.strong.start=Ke(Te.strong.start).replace(/punctuation/g,Te._punctuation).getRegex(),Te.strong.middle=Ke(Te.strong.middle).replace(/punctuation/g,Te._punctuation).replace(/blockSkip/g,Te._blockSkip).getRegex(),Te.strong.endAst=Ke(Te.strong.endAst,"g").replace(/punctuation/g,Te._punctuation).getRegex(),Te.strong.endUnd=Ke(Te.strong.endUnd,"g").replace(/punctuation/g,Te._punctuation).getRegex(),Te.blockSkip=Ke(Te._blockSkip,"g").getRegex(),Te.overlapSkip=Ke(Te._overlapSkip,"g").getRegex(),Te._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,Te._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,Te._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])?)+(?![-_])/,Te.autolink=Ke(Te.autolink).replace("scheme",Te._scheme).replace("email",Te._email).getRegex(),Te._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,Te.tag=Ke(Te.tag).replace("comment",_e._comment).replace("attribute",Te._attribute).getRegex(),Te._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,Te._href=/<(?:\\[<>]?|[^\s<>\\])*>|[^\s\x00-\x1f]*/,Te._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,Te.link=Ke(Te.link).replace("label",Te._label).replace("href",Te._href).replace("title",Te._title).getRegex(),Te.reflink=Ke(Te.reflink).replace("label",Te._label).getRegex(),Te.reflinkSearch=Ke(Te.reflinkSearch,"g").replace("reflink",Te.reflink).replace("nolink",Te.nolink).getRegex(),Te.normal=Ye({},Te),Te.pedantic=Ye({},Te.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:Ke(/^!?\[(label)\]\((.*?)\)/).replace("label",Te._label).getRegex(),reflink:Ke(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Te._label).getRegex()}),Te.gfm=Ye({},Te.normal,{escape:Ke(Te.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.!#$%&'*+\/=?_`{\|}~-]+@))/}),Te.gfm.url=Ke(Te.gfm.url,"i").replace("email",Te.gfm._extended_email).getRegex(),Te.breaks=Ye({},Te.gfm,{br:Ke(Te.br).replace("{2,}","*").getRegex(),text:Ke(Te.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()});var Pe={block:_e,inline:Te},bt=$.defaults,mt=Pe.block,dt=Pe.inline;function yt(De){return De.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 le(De){var xe="",Se,oe,ce=De.length;for(Se=0;Se<ce;Se++)oe=De.charCodeAt(Se),Math.random()>.5&&(oe="x"+oe.toString(16)),xe+="&#"+oe+";";return xe}var Z=function(){function De(Se){this.tokens=[],this.tokens.links=Object.create(null),this.options=Se||bt,this.options.tokenizer=this.options.tokenizer||new Ne,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;var oe={block:mt.normal,inline:dt.normal};this.options.pedantic?(oe.block=mt.pedantic,oe.inline=dt.pedantic):this.options.gfm&&(oe.block=mt.gfm,this.options.breaks?oe.inline=dt.breaks:oe.inline=dt.gfm),this.tokenizer.rules=oe}De.lex=function(oe,ce){var Ee=new De(ce);return Ee.lex(oe)};var xe=De.prototype;return xe.lex=function(oe){return oe=oe.replace(/\r\n|\r/g,`
|
|
`).replace(/\t/g," "),this.blockTokens(oe,this.tokens,!0),this.inline(this.tokens),this.tokens},xe.blockTokens=function(oe,ce,Ee){ce===void 0&&(ce=[]),Ee===void 0&&(Ee=!0),oe=oe.replace(/^ +$/gm,"");for(var Ce,Ge,et,pt;oe;){if(Ce=this.tokenizer.space(oe)){oe=oe.substring(Ce.raw.length),Ce.type&&ce.push(Ce);continue}if(Ce=this.tokenizer.code(oe,ce)){oe=oe.substring(Ce.raw.length),Ce.type?ce.push(Ce):(pt=ce[ce.length-1],pt.raw+=`
|
|
`+Ce.raw,pt.text+=`
|
|
`+Ce.text);continue}if(Ce=this.tokenizer.fences(oe)){oe=oe.substring(Ce.raw.length),ce.push(Ce);continue}if(Ce=this.tokenizer.heading(oe)){oe=oe.substring(Ce.raw.length),ce.push(Ce);continue}if(Ce=this.tokenizer.nptable(oe)){oe=oe.substring(Ce.raw.length),ce.push(Ce);continue}if(Ce=this.tokenizer.hr(oe)){oe=oe.substring(Ce.raw.length),ce.push(Ce);continue}if(Ce=this.tokenizer.blockquote(oe)){oe=oe.substring(Ce.raw.length),Ce.tokens=this.blockTokens(Ce.text,[],Ee),ce.push(Ce);continue}if(Ce=this.tokenizer.list(oe)){for(oe=oe.substring(Ce.raw.length),et=Ce.items.length,Ge=0;Ge<et;Ge++)Ce.items[Ge].tokens=this.blockTokens(Ce.items[Ge].text,[],!1);ce.push(Ce);continue}if(Ce=this.tokenizer.html(oe)){oe=oe.substring(Ce.raw.length),ce.push(Ce);continue}if(Ee&&(Ce=this.tokenizer.def(oe))){oe=oe.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(oe)){oe=oe.substring(Ce.raw.length),ce.push(Ce);continue}if(Ce=this.tokenizer.lheading(oe)){oe=oe.substring(Ce.raw.length),ce.push(Ce);continue}if(Ee&&(Ce=this.tokenizer.paragraph(oe))){oe=oe.substring(Ce.raw.length),ce.push(Ce);continue}if(Ce=this.tokenizer.text(oe,ce)){oe=oe.substring(Ce.raw.length),Ce.type?ce.push(Ce):(pt=ce[ce.length-1],pt.raw+=`
|
|
`+Ce.raw,pt.text+=`
|
|
`+Ce.text);continue}if(oe){var Bt="Infinite loop on byte: "+oe.charCodeAt(0);if(this.options.silent){console.error(Bt);break}else throw new Error(Bt)}}return ce},xe.inline=function(oe){var ce,Ee,Ce,Ge,et,pt,Bt=oe.length;for(ce=0;ce<Bt;ce++){pt=oe[ce];switch(pt.type){case"paragraph":case"text":case"heading":{pt.tokens=[],this.inlineTokens(pt.text,pt.tokens);break}case"table":{for(pt.tokens={header:[],cells:[]},Ge=pt.header.length,Ee=0;Ee<Ge;Ee++)pt.tokens.header[Ee]=[],this.inlineTokens(pt.header[Ee],pt.tokens.header[Ee]);for(Ge=pt.cells.length,Ee=0;Ee<Ge;Ee++)for(et=pt.cells[Ee],pt.tokens.cells[Ee]=[],Ce=0;Ce<et.length;Ce++)pt.tokens.cells[Ee][Ce]=[],this.inlineTokens(et[Ce],pt.tokens.cells[Ee][Ce]);break}case"blockquote":{this.inline(pt.tokens);break}case"list":{for(Ge=pt.items.length,Ee=0;Ee<Ge;Ee++)this.inline(pt.items[Ee].tokens);break}}}return oe},xe.inlineTokens=function(oe,ce,Ee,Ce,Ge){ce===void 0&&(ce=[]),Ee===void 0&&(Ee=!1),Ce===void 0&&(Ce=!1),Ge===void 0&&(Ge="");var et,pt=oe,Bt;if(this.tokens.links){var Dt=Object.keys(this.tokens.links);if(Dt.length>0)for(;(Bt=this.tokenizer.rules.inline.reflinkSearch.exec(pt))!=null;)Dt.includes(Bt[0].slice(Bt[0].lastIndexOf("[")+1,-1))&&(pt=pt.slice(0,Bt.index)+"["+"a".repeat(Bt[0].length-2)+"]"+pt.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(Bt=this.tokenizer.rules.inline.blockSkip.exec(pt))!=null;)pt=pt.slice(0,Bt.index)+"["+"a".repeat(Bt[0].length-2)+"]"+pt.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;oe;){if(et=this.tokenizer.escape(oe)){oe=oe.substring(et.raw.length),ce.push(et);continue}if(et=this.tokenizer.tag(oe,Ee,Ce)){oe=oe.substring(et.raw.length),Ee=et.inLink,Ce=et.inRawBlock,ce.push(et);continue}if(et=this.tokenizer.link(oe)){oe=oe.substring(et.raw.length),et.type==="link"&&(et.tokens=this.inlineTokens(et.text,[],!0,Ce)),ce.push(et);continue}if(et=this.tokenizer.reflink(oe,this.tokens.links)){oe=oe.substring(et.raw.length),et.type==="link"&&(et.tokens=this.inlineTokens(et.text,[],!0,Ce)),ce.push(et);continue}if(et=this.tokenizer.strong(oe,pt,Ge)){oe=oe.substring(et.raw.length),et.tokens=this.inlineTokens(et.text,[],Ee,Ce),ce.push(et);continue}if(et=this.tokenizer.em(oe,pt,Ge)){oe=oe.substring(et.raw.length),et.tokens=this.inlineTokens(et.text,[],Ee,Ce),ce.push(et);continue}if(et=this.tokenizer.codespan(oe)){oe=oe.substring(et.raw.length),ce.push(et);continue}if(et=this.tokenizer.br(oe)){oe=oe.substring(et.raw.length),ce.push(et);continue}if(et=this.tokenizer.del(oe)){oe=oe.substring(et.raw.length),et.tokens=this.inlineTokens(et.text,[],Ee,Ce),ce.push(et);continue}if(et=this.tokenizer.autolink(oe,le)){oe=oe.substring(et.raw.length),ce.push(et);continue}if(!Ee&&(et=this.tokenizer.url(oe,le))){oe=oe.substring(et.raw.length),ce.push(et);continue}if(et=this.tokenizer.inlineText(oe,Ce,yt)){oe=oe.substring(et.raw.length),Ge=et.raw.slice(-1),ce.push(et);continue}if(oe){var xt="Infinite loop on byte: "+oe.charCodeAt(0);if(this.options.silent){console.error(xt);break}else throw new Error(xt)}}return ce},z(De,null,[{key:"rules",get:function(){return{block:mt,inline:dt}}}]),De}(),te=$.defaults,ee=Q.cleanUrl,ue=Q.escape,ye=function(){function De(Se){this.options=Se||te}var xe=De.prototype;return xe.code=function(oe,ce,Ee){var Ce=(ce||"").match(/\S*/)[0];if(this.options.highlight){var Ge=this.options.highlight(oe,Ce);Ge!=null&&Ge!==oe&&(Ee=!0,oe=Ge)}return Ce?'<pre><code class="'+this.options.langPrefix+ue(Ce,!0)+'">'+(Ee?oe:ue(oe,!0))+`</code></pre>
|
|
`:"<pre><code>"+(Ee?oe:ue(oe,!0))+`</code></pre>
|
|
`},xe.blockquote=function(oe){return`<blockquote>
|
|
`+oe+`</blockquote>
|
|
`},xe.html=function(oe){return oe},xe.heading=function(oe,ce,Ee,Ce){return this.options.headerIds?"<h"+ce+' id="'+this.options.headerPrefix+Ce.slug(Ee)+'">'+oe+"</h"+ce+`>
|
|
`:"<h"+ce+">"+oe+"</h"+ce+`>
|
|
`},xe.hr=function(){return this.options.xhtml?`<hr/>
|
|
`:`<hr>
|
|
`},xe.list=function(oe,ce,Ee){var Ce=ce?"ol":"ul",Ge=ce&&Ee!==1?' start="'+Ee+'"':"";return"<"+Ce+Ge+`>
|
|
`+oe+"</"+Ce+`>
|
|
`},xe.listitem=function(oe){return"<li>"+oe+`</li>
|
|
`},xe.checkbox=function(oe){return"<input "+(oe?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "},xe.paragraph=function(oe){return"<p>"+oe+`</p>
|
|
`},xe.table=function(oe,ce){return ce&&(ce="<tbody>"+ce+"</tbody>"),`<table>
|
|
<thead>
|
|
`+oe+`</thead>
|
|
`+ce+`</table>
|
|
`},xe.tablerow=function(oe){return`<tr>
|
|
`+oe+`</tr>
|
|
`},xe.tablecell=function(oe,ce){var Ee=ce.header?"th":"td",Ce=ce.align?"<"+Ee+' align="'+ce.align+'">':"<"+Ee+">";return Ce+oe+"</"+Ee+`>
|
|
`},xe.strong=function(oe){return"<strong>"+oe+"</strong>"},xe.em=function(oe){return"<em>"+oe+"</em>"},xe.codespan=function(oe){return"<code>"+oe+"</code>"},xe.br=function(){return this.options.xhtml?"<br/>":"<br>"},xe.del=function(oe){return"<del>"+oe+"</del>"},xe.link=function(oe,ce,Ee){if(oe=ee(this.options.sanitize,this.options.baseUrl,oe),oe===null)return Ee;var Ce='<a href="'+ue(oe)+'"';return ce&&(Ce+=' title="'+ce+'"'),Ce+=">"+Ee+"</a>",Ce},xe.image=function(oe,ce,Ee){if(oe=ee(this.options.sanitize,this.options.baseUrl,oe),oe===null)return Ee;var Ce='<img src="'+oe+'" alt="'+Ee+'"';return ce&&(Ce+=' title="'+ce+'"'),Ce+=this.options.xhtml?"/>":">",Ce},xe.text=function(oe){return oe},De}(),ve=function(){function De(){}var xe=De.prototype;return xe.strong=function(oe){return oe},xe.em=function(oe){return oe},xe.codespan=function(oe){return oe},xe.del=function(oe){return oe},xe.html=function(oe){return oe},xe.text=function(oe){return oe},xe.link=function(oe,ce,Ee){return""+Ee},xe.image=function(oe,ce,Ee){return""+Ee},xe.br=function(){return""},De}(),Je=function(){function De(){this.seen={}}var xe=De.prototype;return xe.slug=function(oe){var ce=oe.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-");if(this.seen.hasOwnProperty(ce)){var Ee=ce;do this.seen[Ee]++,ce=Ee+"-"+this.seen[Ee];while(this.seen.hasOwnProperty(ce))}return this.seen[ce]=0,ce},De}(),tt=$.defaults,it=Q.unescape,st=function(){function De(Se){this.options=Se||tt,this.options.renderer=this.options.renderer||new ye,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new ve,this.slugger=new Je}De.parse=function(oe,ce){var Ee=new De(ce);return Ee.parse(oe)};var xe=De.prototype;return xe.parse=function(oe,ce){ce===void 0&&(ce=!0);var Ee="",Ce,Ge,et,pt,Bt,Dt,xt,tr,Xt,gt,Mt,Jt,Lt,ar,zt,nr,ur,Et,_r=oe.length;for(Ce=0;Ce<_r;Ce++){gt=oe[Ce];switch(gt.type){case"space":continue;case"hr":{Ee+=this.renderer.hr();continue}case"heading":{Ee+=this.renderer.heading(this.parseInline(gt.tokens),gt.depth,it(this.parseInline(gt.tokens,this.textRenderer)),this.slugger);continue}case"code":{Ee+=this.renderer.code(gt.text,gt.lang,gt.escaped);continue}case"table":{for(tr="",xt="",pt=gt.header.length,Ge=0;Ge<pt;Ge++)xt+=this.renderer.tablecell(this.parseInline(gt.tokens.header[Ge]),{header:!0,align:gt.align[Ge]});for(tr+=this.renderer.tablerow(xt),Xt="",pt=gt.cells.length,Ge=0;Ge<pt;Ge++){for(Dt=gt.tokens.cells[Ge],xt="",Bt=Dt.length,et=0;et<Bt;et++)xt+=this.renderer.tablecell(this.parseInline(Dt[et]),{header:!1,align:gt.align[et]});Xt+=this.renderer.tablerow(xt)}Ee+=this.renderer.table(tr,Xt);continue}case"blockquote":{Xt=this.parse(gt.tokens),Ee+=this.renderer.blockquote(Xt);continue}case"list":{for(Mt=gt.ordered,Jt=gt.start,Lt=gt.loose,pt=gt.items.length,Xt="",Ge=0;Ge<pt;Ge++)zt=gt.items[Ge],nr=zt.checked,ur=zt.task,ar="",zt.task&&(Et=this.renderer.checkbox(nr),Lt?zt.tokens.length>0&&zt.tokens[0].type==="text"?(zt.tokens[0].text=Et+" "+zt.tokens[0].text,zt.tokens[0].tokens&&zt.tokens[0].tokens.length>0&&zt.tokens[0].tokens[0].type==="text"&&(zt.tokens[0].tokens[0].text=Et+" "+zt.tokens[0].tokens[0].text)):zt.tokens.unshift({type:"text",text:Et}):ar+=Et),ar+=this.parse(zt.tokens,Lt),Xt+=this.renderer.listitem(ar,ur,nr);Ee+=this.renderer.list(Xt,Mt,Jt);continue}case"html":{Ee+=this.renderer.html(gt.text);continue}case"paragraph":{Ee+=this.renderer.paragraph(this.parseInline(gt.tokens));continue}case"text":{for(Xt=gt.tokens?this.parseInline(gt.tokens):gt.text;Ce+1<_r&&oe[Ce+1].type==="text";)gt=oe[++Ce],Xt+=`
|
|
`+(gt.tokens?this.parseInline(gt.tokens):gt.text);Ee+=ce?this.renderer.paragraph(Xt):Xt;continue}default:{var kt='Token with "'+gt.type+'" type was not found.';if(this.options.silent){console.error(kt);return}else throw new Error(kt)}}}return Ee},xe.parseInline=function(oe,ce){ce=ce||this.renderer;var Ee="",Ce,Ge,et=oe.length;for(Ce=0;Ce<et;Ce++){Ge=oe[Ce];switch(Ge.type){case"escape":{Ee+=ce.text(Ge.text);break}case"html":{Ee+=ce.html(Ge.text);break}case"link":{Ee+=ce.link(Ge.href,Ge.title,this.parseInline(Ge.tokens,ce));break}case"image":{Ee+=ce.image(Ge.href,Ge.title,Ge.text);break}case"strong":{Ee+=ce.strong(this.parseInline(Ge.tokens,ce));break}case"em":{Ee+=ce.em(this.parseInline(Ge.tokens,ce));break}case"codespan":{Ee+=ce.codespan(Ge.text);break}case"br":{Ee+=ce.br();break}case"del":{Ee+=ce.del(this.parseInline(Ge.tokens,ce));break}case"text":{Ee+=ce.text(Ge.text);break}default:{var pt='Token with "'+Ge.type+'" type was not found.';if(this.options.silent){console.error(pt);return}else throw new Error(pt)}}}return Ee},De}(),ht=Q.merge,_t=Q.checkSanitizeDeprecation,He=Q.escape,Xe=$.getDefaults,at=$.changeDefaults,ut=$.defaults;function $e(De,xe,Se){if(typeof De=="undefined"||De===null)throw new Error("marked(): input parameter is undefined or null");if(typeof De!="string")throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(De)+", string expected");if(typeof xe=="function"&&(Se=xe,xe=null),xe=ht({},$e.defaults,xe||{}),_t(xe),Se){var oe=xe.highlight,ce;try{ce=Z.lex(De,xe)}catch(et){return Se(et)}var Ee=function(pt){var Bt;if(!pt)try{Bt=st.parse(ce,xe)}catch(Dt){pt=Dt}return xe.highlight=oe,pt?Se(pt):Se(null,Bt)};if(!oe||oe.length<3)return Ee();if(delete xe.highlight,!ce.length)return Ee();var Ce=0;$e.walkTokens(ce,function(et){et.type==="code"&&(Ce++,setTimeout(function(){oe(et.text,et.lang,function(pt,Bt){if(pt)return Ee(pt);Bt!=null&&Bt!==et.text&&(et.text=Bt,et.escaped=!0),Ce--,Ce===0&&Ee()})},0))}),Ce===0&&Ee();return}try{var Ge=Z.lex(De,xe);return xe.walkTokens&&$e.walkTokens(Ge,xe.walkTokens),st.parse(Ge,xe)}catch(et){if(et.message+=`
|
|
Please report this to https://github.com/markedjs/marked.`,xe.silent)return"<p>An error occurred:</p><pre>"+He(et.message+"",!0)+"</pre>";throw et}}$e.options=$e.setOptions=function(De){return ht($e.defaults,De),at($e.defaults),$e},$e.getDefaults=Xe,$e.defaults=ut,$e.use=function(De){var xe=ht({},De);if(De.renderer&&function(){var oe=$e.defaults.renderer||new ye,ce=function(Ge){var et=oe[Ge];oe[Ge]=function(){for(var pt=arguments.length,Bt=new Array(pt),Dt=0;Dt<pt;Dt++)Bt[Dt]=arguments[Dt];var xt=De.renderer[Ge].apply(oe,Bt);return xt===!1&&(xt=et.apply(oe,Bt)),xt}};for(var Ee in De.renderer)ce(Ee);xe.renderer=oe}(),De.tokenizer&&function(){var oe=$e.defaults.tokenizer||new Ne,ce=function(Ge){var et=oe[Ge];oe[Ge]=function(){for(var pt=arguments.length,Bt=new Array(pt),Dt=0;Dt<pt;Dt++)Bt[Dt]=arguments[Dt];var xt=De.tokenizer[Ge].apply(oe,Bt);return xt===!1&&(xt=et.apply(oe,Bt)),xt}};for(var Ee in De.tokenizer)ce(Ee);xe.tokenizer=oe}(),De.walkTokens){var Se=$e.defaults.walkTokens;xe.walkTokens=function(oe){De.walkTokens(oe),Se&&Se(oe)}}$e.setOptions(xe)},$e.walkTokens=function(De,xe){for(var Se=N(De),oe;!(oe=Se()).done;){var ce=oe.value;xe(ce);switch(ce.type){case"table":{for(var Ee=N(ce.tokens.header),Ce;!(Ce=Ee()).done;){var Ge=Ce.value;$e.walkTokens(Ge,xe)}for(var et=N(ce.tokens.cells),pt;!(pt=et()).done;)for(var Bt=pt.value,Dt=N(Bt),xt;!(xt=Dt()).done;){var tr=xt.value;$e.walkTokens(tr,xe)}break}case"list":{$e.walkTokens(ce.items,xe);break}default:ce.tokens&&$e.walkTokens(ce.tokens,xe)}}},$e.Parser=st,$e.parser=st.parse,$e.Renderer=ye,$e.TextRenderer=ve,$e.Lexer=Z,$e.lexer=Z.lex,$e.Tokenizer=Ne,$e.Slugger=Je,$e.parse=$e;var qe=$e;return qe})},FWmy:function(wt,Be,G){"use strict";G.d(Be,"a",function(){return Ae});function Ae(z,U){if(!z)throw new Error(U?`Assertion failed (${U})`:"Assertion Failed")}},H7XF:function(wt,Be,G){"use strict";Be.byteLength=H,Be.toByteArray=R,Be.fromByteArray=l;for(var Ae=[],z=[],U=typeof Uint8Array!="undefined"?Uint8Array:Array,V="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",N=0,L=V.length;N<L;++N)Ae[N]=V[N],z[V.charCodeAt(N)]=N;z["-".charCodeAt(0)]=62,z["_".charCodeAt(0)]=63;function $(s){var i=s.length;if(i%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var o=s.indexOf("=");o===-1&&(o=i);var r=o===i?0:4-o%4;return[o,r]}function H(s){var i=$(s),o=i[0],r=i[1];return(o+r)*3/4-r}function e(s,i,o){return(i+o)*3/4-o}function R(s){var i,o=$(s),r=o[0],a=o[1],n=new U(e(s,r,a)),t=0,E=a>0?r-4:r,b;for(b=0;b<E;b+=4)i=z[s.charCodeAt(b)]<<18|z[s.charCodeAt(b+1)]<<12|z[s.charCodeAt(b+2)]<<6|z[s.charCodeAt(b+3)],n[t++]=i>>16&255,n[t++]=i>>8&255,n[t++]=i&255;return a===2&&(i=z[s.charCodeAt(b)]<<2|z[s.charCodeAt(b+1)]>>4,n[t++]=i&255),a===1&&(i=z[s.charCodeAt(b)]<<10|z[s.charCodeAt(b+1)]<<4|z[s.charCodeAt(b+2)]>>2,n[t++]=i>>8&255,n[t++]=i&255),n}function u(s){return Ae[s>>18&63]+Ae[s>>12&63]+Ae[s>>6&63]+Ae[s&63]}function f(s,i,o){for(var r,a=[],n=i;n<o;n+=3)r=(s[n]<<16&16711680)+(s[n+1]<<8&65280)+(s[n+2]&255),a.push(u(r));return a.join("")}function l(s){for(var i,o=s.length,r=o%3,a=[],n=16383,t=0,E=o-r;t<E;t+=n)a.push(f(s,t,t+n>E?E:t+n));return r===1?(i=s[o-1],a.push(Ae[i>>2]+Ae[i<<4&63]+"==")):r===2&&(i=(s[o-2]<<8)+s[o-1],a.push(Ae[i>>10]+Ae[i>>4&63]+Ae[i<<2&63]+"=")),a.join("")}},HDXh:function(wt,Be,G){"use strict";(function(Ae){/*!
|
|
* The buffer module from node.js, for the browser.
|
|
*
|
|
* @author Feross Aboukhadijeh <http://feross.org>
|
|
* @license MIT
|
|
*/var z=G("H7XF"),U=G("kVK+"),V=G("49sm");Be.Buffer=H,Be.SlowBuffer=a,Be.INSPECT_MAX_BYTES=50,H.TYPED_ARRAY_SUPPORT=Ae.TYPED_ARRAY_SUPPORT!==void 0?Ae.TYPED_ARRAY_SUPPORT:N(),Be.kMaxLength=L();function N(){try{var le=new Uint8Array(1);return le.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},le.foo()===42&&typeof le.subarray=="function"&&le.subarray(1,1).byteLength===0}catch(Z){return!1}}function L(){return H.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function $(le,Z){if(L()<Z)throw new RangeError("Invalid typed array length");return H.TYPED_ARRAY_SUPPORT?(le=new Uint8Array(Z),le.__proto__=H.prototype):(le===null&&(le=new H(Z)),le.length=Z),le}function H(le,Z,te){if(!H.TYPED_ARRAY_SUPPORT&&!(this instanceof H))return new H(le,Z,te);if(typeof le=="number"){if(typeof Z=="string")throw new Error("If encoding is specified then the first argument must be a string");return f(this,le)}return e(this,le,Z,te)}H.poolSize=8192,H._augment=function(le){return le.__proto__=H.prototype,le};function e(le,Z,te,ee){if(typeof Z=="number")throw new TypeError('"value" argument must not be a number');return typeof ArrayBuffer!="undefined"&&Z instanceof ArrayBuffer?i(le,Z,te,ee):typeof Z=="string"?l(le,Z,te):o(le,Z)}H.from=function(le,Z,te){return e(null,le,Z,te)},H.TYPED_ARRAY_SUPPORT&&(H.prototype.__proto__=Uint8Array.prototype,H.__proto__=Uint8Array,typeof Symbol!="undefined"&&Symbol.species&&H[Symbol.species]===H&&Object.defineProperty(H,Symbol.species,{value:null,configurable:!0}));function R(le){if(typeof le!="number")throw new TypeError('"size" argument must be a number');if(le<0)throw new RangeError('"size" argument must not be negative')}function u(le,Z,te,ee){return R(Z),Z<=0?$(le,Z):te!==void 0?typeof ee=="string"?$(le,Z).fill(te,ee):$(le,Z).fill(te):$(le,Z)}H.alloc=function(le,Z,te){return u(null,le,Z,te)};function f(le,Z){if(R(Z),le=$(le,Z<0?0:r(Z)|0),!H.TYPED_ARRAY_SUPPORT)for(var te=0;te<Z;++te)le[te]=0;return le}H.allocUnsafe=function(le){return f(null,le)},H.allocUnsafeSlow=function(le){return f(null,le)};function l(le,Z,te){if((typeof te!="string"||te==="")&&(te="utf8"),!H.isEncoding(te))throw new TypeError('"encoding" must be a valid string encoding');var ee=n(Z,te)|0;le=$(le,ee);var ue=le.write(Z,te);return ue!==ee&&(le=le.slice(0,ue)),le}function s(le,Z){var te=Z.length<0?0:r(Z.length)|0;le=$(le,te);for(var ee=0;ee<te;ee+=1)le[ee]=Z[ee]&255;return le}function i(le,Z,te,ee){if(Z.byteLength,te<0||Z.byteLength<te)throw new RangeError("'offset' is out of bounds");if(Z.byteLength<te+(ee||0))throw new RangeError("'length' is out of bounds");return te===void 0&&ee===void 0?Z=new Uint8Array(Z):ee===void 0?Z=new Uint8Array(Z,te):Z=new Uint8Array(Z,te,ee),H.TYPED_ARRAY_SUPPORT?(le=Z,le.__proto__=H.prototype):le=s(le,Z),le}function o(le,Z){if(H.isBuffer(Z)){var te=r(Z.length)|0;return le=$(le,te),le.length===0||Z.copy(le,0,0,te),le}if(Z){if(typeof ArrayBuffer!="undefined"&&Z.buffer instanceof ArrayBuffer||"length"in Z)return typeof Z.length!="number"||yt(Z.length)?$(le,0):s(le,Z);if(Z.type==="Buffer"&&V(Z.data))return s(le,Z.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function r(le){if(le>=L())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+L().toString(16)+" bytes");return le|0}function a(le){return+le!=le&&(le=0),H.alloc(+le)}H.isBuffer=function(Z){return!!(Z!=null&&Z._isBuffer)},H.compare=function(Z,te){if(!H.isBuffer(Z)||!H.isBuffer(te))throw new TypeError("Arguments must be Buffers");if(Z===te)return 0;for(var ee=Z.length,ue=te.length,ye=0,ve=Math.min(ee,ue);ye<ve;++ye)if(Z[ye]!==te[ye]){ee=Z[ye],ue=te[ye];break}return ee<ue?-1:ue<ee?1:0},H.isEncoding=function(Z){switch(String(Z).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},H.concat=function(Z,te){if(!V(Z))throw new TypeError('"list" argument must be an Array of Buffers');if(Z.length===0)return H.alloc(0);var ee;if(te===void 0)for(te=0,ee=0;ee<Z.length;++ee)te+=Z[ee].length;var ue=H.allocUnsafe(te),ye=0;for(ee=0;ee<Z.length;++ee){var ve=Z[ee];if(!H.isBuffer(ve))throw new TypeError('"list" argument must be an Array of Buffers');ve.copy(ue,ye),ye+=ve.length}return ue};function n(le,Z){if(H.isBuffer(le))return le.length;if(typeof ArrayBuffer!="undefined"&&typeof ArrayBuffer.isView=="function"&&(ArrayBuffer.isView(le)||le instanceof ArrayBuffer))return le.byteLength;typeof le!="string"&&(le=""+le);var te=le.length;if(te===0)return 0;for(var ee=!1;;)switch(Z){case"ascii":case"latin1":case"binary":return te;case"utf8":case"utf-8":case void 0:return Te(le).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return te*2;case"hex":return te>>>1;case"base64":return mt(le).length;default:if(ee)return Te(le).length;Z=(""+Z).toLowerCase(),ee=!0}}H.byteLength=n;function t(le,Z,te){var ee=!1;if((Z===void 0||Z<0)&&(Z=0),Z>this.length)return"";if((te===void 0||te>this.length)&&(te=this.length),te<=0)return"";if(te>>>=0,Z>>>=0,te<=Z)return"";for(le||(le="utf8");;)switch(le){case"hex":return Q(this,Z,te);case"utf8":case"utf-8":return m(this,Z,te);case"ascii":return k(this,Z,te);case"latin1":case"binary":return S(this,Z,te);case"base64":return w(this,Z,te);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return X(this,Z,te);default:if(ee)throw new TypeError("Unknown encoding: "+le);le=(le+"").toLowerCase(),ee=!0}}H.prototype._isBuffer=!0;function E(le,Z,te){var ee=le[Z];le[Z]=le[te],le[te]=ee}H.prototype.swap16=function(){var Z=this.length;if(Z%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var te=0;te<Z;te+=2)E(this,te,te+1);return this},H.prototype.swap32=function(){var Z=this.length;if(Z%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var te=0;te<Z;te+=4)E(this,te,te+3),E(this,te+1,te+2);return this},H.prototype.swap64=function(){var Z=this.length;if(Z%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var te=0;te<Z;te+=8)E(this,te,te+7),E(this,te+1,te+6),E(this,te+2,te+5),E(this,te+3,te+4);return this},H.prototype.toString=function(){var Z=this.length|0;return Z===0?"":arguments.length===0?m(this,0,Z):t.apply(this,arguments)},H.prototype.equals=function(Z){if(!H.isBuffer(Z))throw new TypeError("Argument must be a Buffer");return this===Z?!0:H.compare(this,Z)===0},H.prototype.inspect=function(){var Z="",te=Be.INSPECT_MAX_BYTES;return this.length>0&&(Z=this.toString("hex",0,te).match(/.{2}/g).join(" "),this.length>te&&(Z+=" ... ")),"<Buffer "+Z+">"},H.prototype.compare=function(Z,te,ee,ue,ye){if(!H.isBuffer(Z))throw new TypeError("Argument must be a Buffer");if(te===void 0&&(te=0),ee===void 0&&(ee=Z?Z.length:0),ue===void 0&&(ue=0),ye===void 0&&(ye=this.length),te<0||ee>Z.length||ue<0||ye>this.length)throw new RangeError("out of range index");if(ue>=ye&&te>=ee)return 0;if(ue>=ye)return-1;if(te>=ee)return 1;if(te>>>=0,ee>>>=0,ue>>>=0,ye>>>=0,this===Z)return 0;for(var ve=ye-ue,Je=ee-te,tt=Math.min(ve,Je),it=this.slice(ue,ye),st=Z.slice(te,ee),ht=0;ht<tt;++ht)if(it[ht]!==st[ht]){ve=it[ht],Je=st[ht];break}return ve<Je?-1:Je<ve?1:0};function b(le,Z,te,ee,ue){if(le.length===0)return-1;if(typeof te=="string"?(ee=te,te=0):te>2147483647?te=2147483647:te<-2147483648&&(te=-2147483648),te=+te,isNaN(te)&&(te=ue?0:le.length-1),te<0&&(te=le.length+te),te>=le.length){if(ue)return-1;te=le.length-1}else if(te<0)if(ue)te=0;else return-1;if(typeof Z=="string"&&(Z=H.from(Z,ee)),H.isBuffer(Z))return Z.length===0?-1:_(le,Z,te,ee,ue);if(typeof Z=="number")return Z=Z&255,H.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?ue?Uint8Array.prototype.indexOf.call(le,Z,te):Uint8Array.prototype.lastIndexOf.call(le,Z,te):_(le,[Z],te,ee,ue);throw new TypeError("val must be string, number or Buffer")}function _(le,Z,te,ee,ue){var ye=1,ve=le.length,Je=Z.length;if(ee!==void 0&&(ee=String(ee).toLowerCase(),ee==="ucs2"||ee==="ucs-2"||ee==="utf16le"||ee==="utf-16le")){if(le.length<2||Z.length<2)return-1;ye=2,ve/=2,Je/=2,te/=2}function tt(He,Xe){return ye===1?He[Xe]:He.readUInt16BE(Xe*ye)}var it;if(ue){var st=-1;for(it=te;it<ve;it++)if(tt(le,it)===tt(Z,st===-1?0:it-st)){if(st===-1&&(st=it),it-st+1===Je)return st*ye}else st!==-1&&(it-=it-st),st=-1}else for(te+Je>ve&&(te=ve-Je),it=te;it>=0;it--){for(var ht=!0,_t=0;_t<Je;_t++)if(tt(le,it+_t)!==tt(Z,_t)){ht=!1;break}if(ht)return it}return-1}H.prototype.includes=function(Z,te,ee){return this.indexOf(Z,te,ee)!==-1},H.prototype.indexOf=function(Z,te,ee){return b(this,Z,te,ee,!0)},H.prototype.lastIndexOf=function(Z,te,ee){return b(this,Z,te,ee,!1)};function B(le,Z,te,ee){te=Number(te)||0;var ue=le.length-te;ee?(ee=Number(ee),ee>ue&&(ee=ue)):ee=ue;var ye=Z.length;if(ye%2!==0)throw new TypeError("Invalid hex string");ee>ye/2&&(ee=ye/2);for(var ve=0;ve<ee;++ve){var Je=parseInt(Z.substr(ve*2,2),16);if(isNaN(Je))return ve;le[te+ve]=Je}return ve}function x(le,Z,te,ee){return dt(Te(Z,le.length-te),le,te,ee)}function h(le,Z,te,ee){return dt(Pe(Z),le,te,ee)}function d(le,Z,te,ee){return h(le,Z,te,ee)}function A(le,Z,te,ee){return dt(mt(Z),le,te,ee)}function c(le,Z,te,ee){return dt(bt(Z,le.length-te),le,te,ee)}H.prototype.write=function(Z,te,ee,ue){if(te===void 0)ue="utf8",ee=this.length,te=0;else if(ee===void 0&&typeof te=="string")ue=te,ee=this.length,te=0;else if(isFinite(te))te=te|0,isFinite(ee)?(ee=ee|0,ue===void 0&&(ue="utf8")):(ue=ee,ee=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var ye=this.length-te;if((ee===void 0||ee>ye)&&(ee=ye),Z.length>0&&(ee<0||te<0)||te>this.length)throw new RangeError("Attempt to write outside buffer bounds");ue||(ue="utf8");for(var ve=!1;;)switch(ue){case"hex":return B(this,Z,te,ee);case"utf8":case"utf-8":return x(this,Z,te,ee);case"ascii":return h(this,Z,te,ee);case"latin1":case"binary":return d(this,Z,te,ee);case"base64":return A(this,Z,te,ee);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return c(this,Z,te,ee);default:if(ve)throw new TypeError("Unknown encoding: "+ue);ue=(""+ue).toLowerCase(),ve=!0}},H.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function w(le,Z,te){return Z===0&&te===le.length?z.fromByteArray(le):z.fromByteArray(le.slice(Z,te))}function m(le,Z,te){te=Math.min(le.length,te);for(var ee=[],ue=Z;ue<te;){var ye=le[ue],ve=null,Je=ye>239?4:ye>223?3:ye>191?2:1;if(ue+Je<=te){var tt,it,st,ht;switch(Je){case 1:ye<128&&(ve=ye);break;case 2:tt=le[ue+1],(tt&192)===128&&(ht=(ye&31)<<6|tt&63,ht>127&&(ve=ht));break;case 3:tt=le[ue+1],it=le[ue+2],(tt&192)===128&&(it&192)===128&&(ht=(ye&15)<<12|(tt&63)<<6|it&63,ht>2047&&(ht<55296||ht>57343)&&(ve=ht));break;case 4:tt=le[ue+1],it=le[ue+2],st=le[ue+3],(tt&192)===128&&(it&192)===128&&(st&192)===128&&(ht=(ye&15)<<18|(tt&63)<<12|(it&63)<<6|st&63,ht>65535&&ht<1114112&&(ve=ht))}}ve===null?(ve=65533,Je=1):ve>65535&&(ve-=65536,ee.push(ve>>>10&1023|55296),ve=56320|ve&1023),ee.push(ve),ue+=Je}return F(ee)}var g=4096;function F(le){var Z=le.length;if(Z<=g)return String.fromCharCode.apply(String,le);for(var te="",ee=0;ee<Z;)te+=String.fromCharCode.apply(String,le.slice(ee,ee+=g));return te}function k(le,Z,te){var ee="";te=Math.min(le.length,te);for(var ue=Z;ue<te;++ue)ee+=String.fromCharCode(le[ue]&127);return ee}function S(le,Z,te){var ee="";te=Math.min(le.length,te);for(var ue=Z;ue<te;++ue)ee+=String.fromCharCode(le[ue]);return ee}function Q(le,Z,te){var ee=le.length;(!Z||Z<0)&&(Z=0),(!te||te<0||te>ee)&&(te=ee);for(var ue="",ye=Z;ye<te;++ye)ue+=_e(le[ye]);return ue}function X(le,Z,te){for(var ee=le.slice(Z,te),ue="",ye=0;ye<ee.length;ye+=2)ue+=String.fromCharCode(ee[ye]+ee[ye+1]*256);return ue}H.prototype.slice=function(Z,te){var ee=this.length;Z=~~Z,te=te===void 0?ee:~~te,Z<0?(Z+=ee,Z<0&&(Z=0)):Z>ee&&(Z=ee),te<0?(te+=ee,te<0&&(te=0)):te>ee&&(te=ee),te<Z&&(te=Z);var ue;if(H.TYPED_ARRAY_SUPPORT)ue=this.subarray(Z,te),ue.__proto__=H.prototype;else{var ye=te-Z;ue=new H(ye,void 0);for(var ve=0;ve<ye;++ve)ue[ve]=this[ve+Z]}return ue};function P(le,Z,te){if(le%1!==0||le<0)throw new RangeError("offset is not uint");if(le+Z>te)throw new RangeError("Trying to access beyond buffer length")}H.prototype.readUIntLE=function(Z,te,ee){Z=Z|0,te=te|0,ee||P(Z,te,this.length);for(var ue=this[Z],ye=1,ve=0;++ve<te&&(ye*=256);)ue+=this[Z+ve]*ye;return ue},H.prototype.readUIntBE=function(Z,te,ee){Z=Z|0,te=te|0,ee||P(Z,te,this.length);for(var ue=this[Z+--te],ye=1;te>0&&(ye*=256);)ue+=this[Z+--te]*ye;return ue},H.prototype.readUInt8=function(Z,te){return te||P(Z,1,this.length),this[Z]},H.prototype.readUInt16LE=function(Z,te){return te||P(Z,2,this.length),this[Z]|this[Z+1]<<8},H.prototype.readUInt16BE=function(Z,te){return te||P(Z,2,this.length),this[Z]<<8|this[Z+1]},H.prototype.readUInt32LE=function(Z,te){return te||P(Z,4,this.length),(this[Z]|this[Z+1]<<8|this[Z+2]<<16)+this[Z+3]*16777216},H.prototype.readUInt32BE=function(Z,te){return te||P(Z,4,this.length),this[Z]*16777216+(this[Z+1]<<16|this[Z+2]<<8|this[Z+3])},H.prototype.readIntLE=function(Z,te,ee){Z=Z|0,te=te|0,ee||P(Z,te,this.length);for(var ue=this[Z],ye=1,ve=0;++ve<te&&(ye*=256);)ue+=this[Z+ve]*ye;return ye*=128,ue>=ye&&(ue-=Math.pow(2,8*te)),ue},H.prototype.readIntBE=function(Z,te,ee){Z=Z|0,te=te|0,ee||P(Z,te,this.length);for(var ue=te,ye=1,ve=this[Z+--ue];ue>0&&(ye*=256);)ve+=this[Z+--ue]*ye;return ye*=128,ve>=ye&&(ve-=Math.pow(2,8*te)),ve},H.prototype.readInt8=function(Z,te){return te||P(Z,1,this.length),this[Z]&128?(255-this[Z]+1)*-1:this[Z]},H.prototype.readInt16LE=function(Z,te){te||P(Z,2,this.length);var ee=this[Z]|this[Z+1]<<8;return ee&32768?ee|4294901760:ee},H.prototype.readInt16BE=function(Z,te){te||P(Z,2,this.length);var ee=this[Z+1]|this[Z]<<8;return ee&32768?ee|4294901760:ee},H.prototype.readInt32LE=function(Z,te){return te||P(Z,4,this.length),this[Z]|this[Z+1]<<8|this[Z+2]<<16|this[Z+3]<<24},H.prototype.readInt32BE=function(Z,te){return te||P(Z,4,this.length),this[Z]<<24|this[Z+1]<<16|this[Z+2]<<8|this[Z+3]},H.prototype.readFloatLE=function(Z,te){return te||P(Z,4,this.length),U.read(this,Z,!0,23,4)},H.prototype.readFloatBE=function(Z,te){return te||P(Z,4,this.length),U.read(this,Z,!1,23,4)},H.prototype.readDoubleLE=function(Z,te){return te||P(Z,8,this.length),U.read(this,Z,!0,52,8)},H.prototype.readDoubleBE=function(Z,te){return te||P(Z,8,this.length),U.read(this,Z,!1,52,8)};function q(le,Z,te,ee,ue,ye){if(!H.isBuffer(le))throw new TypeError('"buffer" argument must be a Buffer instance');if(Z>ue||Z<ye)throw new RangeError('"value" argument is out of bounds');if(te+ee>le.length)throw new RangeError("Index out of range")}H.prototype.writeUIntLE=function(Z,te,ee,ue){if(Z=+Z,te=te|0,ee=ee|0,!ue){var ye=Math.pow(2,8*ee)-1;q(this,Z,te,ee,ye,0)}var ve=1,Je=0;for(this[te]=Z&255;++Je<ee&&(ve*=256);)this[te+Je]=Z/ve&255;return te+ee},H.prototype.writeUIntBE=function(Z,te,ee,ue){if(Z=+Z,te=te|0,ee=ee|0,!ue){var ye=Math.pow(2,8*ee)-1;q(this,Z,te,ee,ye,0)}var ve=ee-1,Je=1;for(this[te+ve]=Z&255;--ve>=0&&(Je*=256);)this[te+ve]=Z/Je&255;return te+ee},H.prototype.writeUInt8=function(Z,te,ee){return Z=+Z,te=te|0,ee||q(this,Z,te,1,255,0),H.TYPED_ARRAY_SUPPORT||(Z=Math.floor(Z)),this[te]=Z&255,te+1};function ie(le,Z,te,ee){Z<0&&(Z=65535+Z+1);for(var ue=0,ye=Math.min(le.length-te,2);ue<ye;++ue)le[te+ue]=(Z&255<<8*(ee?ue:1-ue))>>>(ee?ue:1-ue)*8}H.prototype.writeUInt16LE=function(Z,te,ee){return Z=+Z,te=te|0,ee||q(this,Z,te,2,65535,0),H.TYPED_ARRAY_SUPPORT?(this[te]=Z&255,this[te+1]=Z>>>8):ie(this,Z,te,!0),te+2},H.prototype.writeUInt16BE=function(Z,te,ee){return Z=+Z,te=te|0,ee||q(this,Z,te,2,65535,0),H.TYPED_ARRAY_SUPPORT?(this[te]=Z>>>8,this[te+1]=Z&255):ie(this,Z,te,!1),te+2};function be(le,Z,te,ee){Z<0&&(Z=4294967295+Z+1);for(var ue=0,ye=Math.min(le.length-te,4);ue<ye;++ue)le[te+ue]=Z>>>(ee?ue:3-ue)*8&255}H.prototype.writeUInt32LE=function(Z,te,ee){return Z=+Z,te=te|0,ee||q(this,Z,te,4,4294967295,0),H.TYPED_ARRAY_SUPPORT?(this[te+3]=Z>>>24,this[te+2]=Z>>>16,this[te+1]=Z>>>8,this[te]=Z&255):be(this,Z,te,!0),te+4},H.prototype.writeUInt32BE=function(Z,te,ee){return Z=+Z,te=te|0,ee||q(this,Z,te,4,4294967295,0),H.TYPED_ARRAY_SUPPORT?(this[te]=Z>>>24,this[te+1]=Z>>>16,this[te+2]=Z>>>8,this[te+3]=Z&255):be(this,Z,te,!1),te+4},H.prototype.writeIntLE=function(Z,te,ee,ue){if(Z=+Z,te=te|0,!ue){var ye=Math.pow(2,8*ee-1);q(this,Z,te,ee,ye-1,-ye)}var ve=0,Je=1,tt=0;for(this[te]=Z&255;++ve<ee&&(Je*=256);)Z<0&&tt===0&&this[te+ve-1]!==0&&(tt=1),this[te+ve]=(Z/Je>>0)-tt&255;return te+ee},H.prototype.writeIntBE=function(Z,te,ee,ue){if(Z=+Z,te=te|0,!ue){var ye=Math.pow(2,8*ee-1);q(this,Z,te,ee,ye-1,-ye)}var ve=ee-1,Je=1,tt=0;for(this[te+ve]=Z&255;--ve>=0&&(Je*=256);)Z<0&&tt===0&&this[te+ve+1]!==0&&(tt=1),this[te+ve]=(Z/Je>>0)-tt&255;return te+ee},H.prototype.writeInt8=function(Z,te,ee){return Z=+Z,te=te|0,ee||q(this,Z,te,1,127,-128),H.TYPED_ARRAY_SUPPORT||(Z=Math.floor(Z)),Z<0&&(Z=255+Z+1),this[te]=Z&255,te+1},H.prototype.writeInt16LE=function(Z,te,ee){return Z=+Z,te=te|0,ee||q(this,Z,te,2,32767,-32768),H.TYPED_ARRAY_SUPPORT?(this[te]=Z&255,this[te+1]=Z>>>8):ie(this,Z,te,!0),te+2},H.prototype.writeInt16BE=function(Z,te,ee){return Z=+Z,te=te|0,ee||q(this,Z,te,2,32767,-32768),H.TYPED_ARRAY_SUPPORT?(this[te]=Z>>>8,this[te+1]=Z&255):ie(this,Z,te,!1),te+2},H.prototype.writeInt32LE=function(Z,te,ee){return Z=+Z,te=te|0,ee||q(this,Z,te,4,2147483647,-2147483648),H.TYPED_ARRAY_SUPPORT?(this[te]=Z&255,this[te+1]=Z>>>8,this[te+2]=Z>>>16,this[te+3]=Z>>>24):be(this,Z,te,!0),te+4},H.prototype.writeInt32BE=function(Z,te,ee){return Z=+Z,te=te|0,ee||q(this,Z,te,4,2147483647,-2147483648),Z<0&&(Z=4294967295+Z+1),H.TYPED_ARRAY_SUPPORT?(this[te]=Z>>>24,this[te+1]=Z>>>16,this[te+2]=Z>>>8,this[te+3]=Z&255):be(this,Z,te,!1),te+4};function me(le,Z,te,ee,ue,ye){if(te+ee>le.length)throw new RangeError("Index out of range");if(te<0)throw new RangeError("Index out of range")}function Me(le,Z,te,ee,ue){return ue||me(le,Z,te,4,34028234663852886e22,-34028234663852886e22),U.write(le,Z,te,ee,23,4),te+4}H.prototype.writeFloatLE=function(Z,te,ee){return Me(this,Z,te,!0,ee)},H.prototype.writeFloatBE=function(Z,te,ee){return Me(this,Z,te,!1,ee)};function Ne(le,Z,te,ee,ue){return ue||me(le,Z,te,8,17976931348623157e292,-17976931348623157e292),U.write(le,Z,te,ee,52,8),te+8}H.prototype.writeDoubleLE=function(Z,te,ee){return Ne(this,Z,te,!0,ee)},H.prototype.writeDoubleBE=function(Z,te,ee){return Ne(this,Z,te,!1,ee)},H.prototype.copy=function(Z,te,ee,ue){if(ee||(ee=0),!ue&&ue!==0&&(ue=this.length),te>=Z.length&&(te=Z.length),te||(te=0),ue>0&&ue<ee&&(ue=ee),ue===ee)return 0;if(Z.length===0||this.length===0)return 0;if(te<0)throw new RangeError("targetStart out of bounds");if(ee<0||ee>=this.length)throw new RangeError("sourceStart out of bounds");if(ue<0)throw new RangeError("sourceEnd out of bounds");ue>this.length&&(ue=this.length),Z.length-te<ue-ee&&(ue=Z.length-te+ee);var ye=ue-ee,ve;if(this===Z&&ee<te&&te<ue)for(ve=ye-1;ve>=0;--ve)Z[ve+te]=this[ve+ee];else if(ye<1e3||!H.TYPED_ARRAY_SUPPORT)for(ve=0;ve<ye;++ve)Z[ve+te]=this[ve+ee];else Uint8Array.prototype.set.call(Z,this.subarray(ee,ee+ye),te);return ye},H.prototype.fill=function(Z,te,ee,ue){if(typeof Z=="string"){if(typeof te=="string"?(ue=te,te=0,ee=this.length):typeof ee=="string"&&(ue=ee,ee=this.length),Z.length===1){var ye=Z.charCodeAt(0);ye<256&&(Z=ye)}if(ue!==void 0&&typeof ue!="string")throw new TypeError("encoding must be a string");if(typeof ue=="string"&&!H.isEncoding(ue))throw new TypeError("Unknown encoding: "+ue)}else typeof Z=="number"&&(Z=Z&255);if(te<0||this.length<te||this.length<ee)throw new RangeError("Out of range index");if(ee<=te)return this;te=te>>>0,ee=ee===void 0?this.length:ee>>>0,Z||(Z=0);var ve;if(typeof Z=="number")for(ve=te;ve<ee;++ve)this[ve]=Z;else{var Je=H.isBuffer(Z)?Z:Te(new H(Z,ue).toString()),tt=Je.length;for(ve=0;ve<ee-te;++ve)this[ve+te]=Je[ve%tt]}return this};var ke=/[^+\/0-9A-Za-z-_]/g;function Ke(le){if(le=Ye(le).replace(ke,""),le.length<2)return"";for(;le.length%4!==0;)le=le+"=";return le}function Ye(le){return le.trim?le.trim():le.replace(/^\s+|\s+$/g,"")}function _e(le){return le<16?"0"+le.toString(16):le.toString(16)}function Te(le,Z){Z=Z||Infinity;for(var te,ee=le.length,ue=null,ye=[],ve=0;ve<ee;++ve){if(te=le.charCodeAt(ve),te>55295&&te<57344){if(!ue){if(te>56319){(Z-=3)>-1&&ye.push(239,191,189);continue}else if(ve+1===ee){(Z-=3)>-1&&ye.push(239,191,189);continue}ue=te;continue}if(te<56320){(Z-=3)>-1&&ye.push(239,191,189),ue=te;continue}te=(ue-55296<<10|te-56320)+65536}else ue&&((Z-=3)>-1&&ye.push(239,191,189));if(ue=null,te<128){if((Z-=1)<0)break;ye.push(te)}else if(te<2048){if((Z-=2)<0)break;ye.push(te>>6|192,te&63|128)}else if(te<65536){if((Z-=3)<0)break;ye.push(te>>12|224,te>>6&63|128,te&63|128)}else if(te<1114112){if((Z-=4)<0)break;ye.push(te>>18|240,te>>12&63|128,te>>6&63|128,te&63|128)}else throw new Error("Invalid code point")}return ye}function Pe(le){for(var Z=[],te=0;te<le.length;++te)Z.push(le.charCodeAt(te)&255);return Z}function bt(le,Z){for(var te,ee,ue,ye=[],ve=0;ve<le.length&&!((Z-=2)<0);++ve)te=le.charCodeAt(ve),ee=te>>8,ue=te%256,ye.push(ue),ye.push(ee);return ye}function mt(le){return z.toByteArray(Ke(le))}function dt(le,Z,te,ee){for(var ue=0;ue<ee&&!(ue+te>=Z.length||ue>=le.length);++ue)Z[ue+te]=le[ue];return ue}function yt(le){return le!==le}}).call(this,G("IyRk"))},IBYe:function(wt,Be,G){"use strict";function Ae(z){return null}Be.a=Ae},JYp7:function(wt,Be,G){"use strict";G.d(Be,"a",function(){return Ae});var Ae;(function(z){function U(t){return t&&typeof t=="object"&&typeof t[Symbol.iterator]=="function"}z.is=U;const V=Object.freeze([]);function N(){return V}z.empty=N;function*L(t){yield t}z.single=L;function $(t){return t||V}z.from=$;function H(t){return!t||t[Symbol.iterator]().next().done===!0}z.isEmpty=H;function e(t){return t[Symbol.iterator]().next().value}z.first=e;function R(t,E){for(const b of t)if(E(b))return!0;return!1}z.some=R;function u(t,E){for(const b of t)if(E(b))return b;return}z.find=u;function*f(t,E){for(const b of t)E(b)&&(yield b)}z.filter=f;function*l(t,E){let b=0;for(const _ of t)yield E(_,b++)}z.map=l;function*s(...t){for(const E of t)for(const b of E)yield b}z.concat=s;function*i(t){for(const E of t)for(const b of E)yield b}z.concatNested=i;function o(t,E,b){let _=b;for(const B of t)_=E(_,B);return _}z.reduce=o;function*r(t,E,b=t.length){for(E<0&&(E+=t.length),b<0?b+=t.length:b>t.length&&(b=t.length);E<b;E++)yield t[E]}z.slice=r;function a(t,E=Number.POSITIVE_INFINITY){const b=[];if(E===0)return[b,t];const _=t[Symbol.iterator]();for(let B=0;B<E;B++){const x=_.next();if(x.done)return[b,z.empty()];b.push(x.value)}return[b,{[Symbol.iterator](){return _}}]}z.consume=a;function n(t,E,b=(_,B)=>_===B){const _=t[Symbol.iterator](),B=E[Symbol.iterator]();for(;;){const x=_.next(),h=B.next();if(x.done!==h.done)return!1;if(x.done)return!0;if(!b(x.value,h.value))return!1}}z.equals=n})(Ae||(Ae={}))},LdHM:function(wt,Be,G){"use strict";G.d(Be,"b",function(){return t}),G.d(Be,"a",function(){return b});var Ae=G("1OyB"),z=G("vuIU"),U=G("Ji7U"),V=G("LK+K"),N=G("q1tI"),L=G("rePB"),$=G("Ff2n"),H=G("ODXe"),e=G("4IlW"),R=G("bX4T"),u=G("YrtM"),f=G("TSYQ"),l=G.n(f),s=G("+nKL"),i=G("8OUc"),o=function(q,ie){var be=q.prefixCls,me=q.id,Me=q.flattenOptions,Ne=q.childrenAsData,ke=q.values,Ke=q.searchValue,Ye=q.multiple,_e=q.defaultActiveFirstOption,Te=q.height,Pe=q.itemHeight,bt=q.notFoundContent,mt=q.open,dt=q.menuItemSelectedIcon,yt=q.virtual,le=q.onSelect,Z=q.onToggleOpen,te=q.onActiveValue,ee=q.onScroll,ue=q.onMouseEnter,ye="".concat(be,"-item"),ve=Object(u.a)(function(){return Me},[mt,Me],function(qe,De){return De[0]&&qe[1]!==De[1]}),Je=N.useRef(null),tt=function(De){De.preventDefault()},it=function(De){Je.current&&Je.current.scrollTo({index:De})},st=function(De){for(var xe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,Se=ve.length,oe=0;oe<Se;oe+=1){var ce=(De+oe*xe+Se)%Se,Ee=ve[ce],Ce=Ee.group,Ge=Ee.data;if(!Ce&&!Ge.disabled)return ce}return-1},ht=N.useState(function(){return st(0)}),_t=Object(H.a)(ht,2),He=_t[0],Xe=_t[1],at=function(De){Xe(De);var xe=ve[De];if(!xe){te(null,-1);return}te(xe.data.value,De)};N.useEffect(function(){at(_e!==!1?st(0):-1)},[ve.length,Ke]),N.useEffect(function(){var qe=setTimeout(function(){if(!Ye&&mt&&ke.size===1){var De=Array.from(ke)[0],xe=ve.findIndex(function(Se){var oe=Se.data;return oe.value===De});at(xe),it(xe)}});return function(){return clearTimeout(qe)}},[mt]);var ut=function(De){De!==void 0&&le(De,{selected:!ke.has(De)}),Ye||Z(!1)};if(N.useImperativeHandle(ie,function(){return{onKeyDown:function(De){var xe=De.which;switch(xe){case e.a.UP:case e.a.DOWN:{var Se=0;if(xe===e.a.UP?Se=-1:xe===e.a.DOWN&&(Se=1),Se!==0){var oe=st(He+Se,Se);it(oe),at(oe)}break}case e.a.ENTER:{var ce=ve[He];ce&&!ce.data.disabled?ut(ce.data.value):ut(void 0),mt&&De.preventDefault();break}case e.a.ESC:Z(!1)}},onKeyUp:function(){},scrollTo:function(De){it(De)}}}),ve.length===0)return N.createElement("div",{role:"listbox",id:"".concat(me,"_list"),className:"".concat(ye,"-empty"),onMouseDown:tt},bt);function $e(qe){var De=ve[qe];if(!De)return null;var xe=De.data||{},Se=xe.value,oe=xe.label,ce=xe.children,Ee=Object(R.a)(xe,!0),Ce=Ne?ce:oe;return De?N.createElement("div",Object.assign({"aria-label":typeof Ce=="string"?Ce:null},Ee,{key:qe,role:"option",id:"".concat(me,"_list_").concat(qe),"aria-selected":ke.has(Se)}),Se):null}return N.createElement(N.Fragment,null,N.createElement("div",{role:"listbox",id:"".concat(me,"_list"),style:{height:0,width:0,overflow:"hidden"}},$e(He-1),$e(He),$e(He+1)),N.createElement(s.a,{itemKey:"key",ref:Je,data:ve,height:Te,itemHeight:Pe,fullHeight:!1,onMouseDown:tt,onScroll:ee,virtual:yt,onMouseEnter:ue},function(qe,De){var xe,Se=qe.group,oe=qe.groupOption,ce=qe.data,Ee=ce.label,Ce=ce.key;if(Se)return N.createElement("div",{className:l()(ye,"".concat(ye,"-group"))},Ee!==void 0?Ee:Ce);var Ge=ce.disabled,et=ce.value,pt=ce.title,Bt=ce.children,Dt=ce.style,xt=ce.className,tr=Object($.a)(ce,["disabled","value","title","children","style","className"]),Xt=ke.has(et),gt="".concat(ye,"-option"),Mt=l()(ye,gt,xt,(xe={},Object(L.a)(xe,"".concat(gt,"-grouped"),oe),Object(L.a)(xe,"".concat(gt,"-active"),He===De&&!Ge),Object(L.a)(xe,"".concat(gt,"-disabled"),Ge),Object(L.a)(xe,"".concat(gt,"-selected"),Xt),xe)),Jt=Ne?Bt:Ee,Lt=!dt||typeof dt=="function"||Xt;return N.createElement("div",Object.assign({},tr,{"aria-selected":Xt,className:Mt,title:pt,onMouseMove:function(){if(He===De||Ge)return;at(De)},onClick:function(){Ge||ut(et)},style:Dt}),N.createElement("div",{className:"".concat(gt,"-content")},Jt||et),N.isValidElement(dt)||Xt,Lt&&N.createElement(i.a,{className:"".concat(ye,"-option-state"),customizeIcon:dt,customizeIconProps:{isSelected:Xt}},Xt?"\u2713":null))}))},r=N.forwardRef(o);r.displayName="OptionList";var a=r,n=function(){return null};n.isSelectOption=!0;var t=n,E=function(){return null};E.isSelectOptGroup=!0;var b=E,_=G("VTBJ"),B=G("Zm9Q");function x(P){var q=P.key,ie=P.props,be=ie.children,me=ie.value,Me=Object($.a)(ie,["children","value"]);return Object(_.a)({key:q,value:me!==void 0?me:q,children:be},Me)}function h(P){var q=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return Object(B.a)(P).map(function(ie,be){if(!N.isValidElement(ie)||!ie.type)return null;var me=ie.type.isSelectOptGroup,Me=ie.key,Ne=ie.props,ke=Ne.children,Ke=Object($.a)(Ne,["children"]);return q||!me?x(ie):Object(_.a)(Object(_.a)({key:"__RC_SELECT_GRP__".concat(Me===null?be:Me,"__"),label:Me},Ke),{},{options:h(ke)})}).filter(function(ie){return ie})}var d=G("2Qr1"),A=G("qNPg"),c=G("U8pU"),w=G("Kwbf"),m=G("WKfj");function g(P){var q=P.mode,ie=P.options,be=P.children,me=P.backfill,Me=P.allowClear,Ne=P.placeholder,ke=P.getInputElement,Ke=P.showSearch,Ye=P.onSearch,_e=P.defaultOpen,Te=P.autoFocus,Pe=P.labelInValue,bt=P.value,mt=P.inputValue,dt=P.optionLabelProp,yt=q==="multiple"||q==="tags",le=Ke!==void 0?Ke:yt||q==="combobox",Z=ie||h(be);if(Object(w.a)(q!=="tags"||Z.every(function(ye){return!ye.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),q==="tags"||q==="combobox"){var te=Z.some(function(ye){return ye.options?ye.options.some(function(ve){return typeof("value"in ve?ve.value:ve.key)=="number"}):typeof("value"in ye?ye.value:ye.key)=="number"});Object(w.a)(!te,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(Object(w.a)(q!=="combobox"||!dt,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),Object(w.a)(q==="combobox"||!me,"`backfill` only works with `combobox` mode."),Object(w.a)(q==="combobox"||!ke,"`getInputElement` only work with `combobox` mode."),Object(w.b)(q!=="combobox"||!ke||!Me||!Ne,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),Ye&&!le&&q!=="combobox"&&q!=="tags"&&Object(w.a)(!1,"`onSearch` should work with `showSearch` instead of use alone."),Object(w.b)(!_e||Te,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),bt!=null){var ee=Object(m.d)(bt);Object(w.a)(!Pe||ee.every(function(ye){return Object(c.a)(ye)==="object"&&("key"in ye||"value"in ye)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),Object(w.a)(!yt||Array.isArray(bt),"`value` should be array when `mode` is `multiple` or `tags`")}if(be){var ue=null;Object(B.a)(be).some(function(ye){if(!N.isValidElement(ye)||!ye.type)return!1;var ve=ye.type;if(ve.isSelectOption)return!1;if(ve.isSelectOptGroup){var Je=Object(B.a)(ye.props.children).every(function(tt){return!N.isValidElement(tt)||!ye.type||tt.type.isSelectOption?!0:(ue=tt.type,!1)});return!Je}return ue=ve,!0}),ue&&Object(w.a)(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(ue.displayName||ue.name||ue,"`.")),Object(w.a)(mt===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}var F=g,k=Object(A.a)({prefixCls:"rc-select",components:{optionList:a},convertChildrenToData:h,flattenOptions:d.d,getLabeledValue:d.e,filterOptions:d.b,isValueDisabled:d.g,findValueOption:d.c,warningProps:F,fillOptionsWithMissingValue:d.a}),S=function(P){Object(U.a)(ie,P);var q=Object(V.a)(ie);function ie(){var be;return Object(Ae.a)(this,ie),be=q.apply(this,arguments),be.selectRef=N.createRef(),be.focus=function(){be.selectRef.current.focus()},be.blur=function(){be.selectRef.current.blur()},be}return Object(z.a)(ie,[{key:"render",value:function(){return N.createElement(k,Object.assign({ref:this.selectRef},this.props))}}]),ie}(N.Component);S.Option=t,S.OptGroup=b;var Q=S,X=Be.c=Q},MI8n:function(wt,Be,G){"use strict";G.d(Be,"c",function(){return N}),G.d(Be,"b",function(){return e}),G.d(Be,"e",function(){return R}),G.d(Be,"a",function(){return u}),G.d(Be,"d",function(){return f}),G.d(Be,"f",function(){return l});var Ae=G("/cxE"),z=G("pmY6"),U=G("24hK"),V=G("5Y4S"),N;(function(s){s.None=()=>z.a.None;function i(g){return(F,k=null,S)=>{let Q=!1,X;return X=g(P=>Q?void 0:(X?X.dispose():Q=!0,F.call(k,P)),null,S),Q&&X.dispose(),X}}s.once=i;function o(g,F){return b((k,S=null,Q)=>g(X=>k.call(S,F(X)),null,Q))}s.map=o;function r(g,F){return b((k,S=null,Q)=>g(X=>{F(X),k.call(S,X)},null,Q))}s.forEach=r;function a(g,F){return b((k,S=null,Q)=>g(X=>F(X)&&k.call(S,X),null,Q))}s.filter=a;function n(g){return g}s.signal=n;function t(...g){return(F,k=null,S)=>Object(z.e)(...g.map(Q=>Q(X=>F.call(k,X),null,S)))}s.any=t;function E(g,F,k){let S=k;return o(g,Q=>(S=F(S,Q),S))}s.reduce=E;function b(g){let F;const k=new e({onFirstListenerAdd(){F=g(k.fire,k)},onLastListenerRemove(){F.dispose()}});return k.event}function _(g,F,k=100,S=!1,Q){let X,P,q,ie=0;const be=new e({leakWarningThreshold:Q,onFirstListenerAdd(){X=g(me=>{ie++,P=F(P,me),S&&!q&&(be.fire(P),P=void 0),clearTimeout(q),q=setTimeout(()=>{const Me=P;P=void 0,q=void 0,(!S||ie>1)&&be.fire(Me),ie=0},k)})},onLastListenerRemove(){X.dispose()}});return be.event}s.debounce=_;function B(g,F=(k,S)=>k===S){let k=!0,S;return a(g,Q=>{const X=k||!F(Q,S);return k=!1,S=Q,X})}s.latch=B;function x(g,F){return[s.filter(g,F),s.filter(g,k=>!F(k))]}s.split=x;function h(g,F=!1,k=[]){let S=k.slice(),Q=g(q=>{S?S.push(q):P.fire(q)});const X=()=>{S&&S.forEach(q=>P.fire(q)),S=null},P=new e({onFirstListenerAdd(){Q||(Q=g(q=>P.fire(q)))},onFirstListenerDidAdd(){S&&(F?setTimeout(X):X())},onLastListenerRemove(){Q&&Q.dispose(),Q=null}});return P.event}s.buffer=h;class d{constructor(g){this.event=g}map(g){return new d(o(this.event,g))}forEach(g){return new d(r(this.event,g))}filter(g){return new d(a(this.event,g))}reduce(g,F){return new d(E(this.event,g,F))}latch(){return new d(B(this.event))}debounce(g,F=100,k=!1,S){return new d(_(this.event,g,F,k,S))}on(g,F,k){return this.event(g,F,k)}once(g,F,k){return i(this.event)(g,F,k)}}function A(g){return new d(g)}s.chain=A;function c(g,F,k=S=>S){const S=(...q)=>P.fire(k(...q)),Q=()=>g.on(F,S),X=()=>g.removeListener(F,S),P=new e({onFirstListenerAdd:Q,onLastListenerRemove:X});return P.event}s.fromNodeEventEmitter=c;function w(g,F,k=S=>S){const S=(...q)=>P.fire(k(...q)),Q=()=>g.addEventListener(F,S),X=()=>g.removeEventListener(F,S),P=new e({onFirstListenerAdd:Q,onLastListenerRemove:X});return P.event}s.fromDOMEventEmitter=w;function m(g){return new Promise(F=>i(g)(F))}s.toPromise=m})(N||(N={}));class L{constructor(s){this._listenerCount=0,this._invocationCount=0,this._elapsedOverall=0,this._name=`${s}_${L._idPool++}`}start(s){this._stopWatch=new V.a(!0),this._listenerCount=s}stop(){if(this._stopWatch){const s=this._stopWatch.elapsed();this._elapsedOverall+=s,this._invocationCount+=1,console.info(`did FIRE ${this._name}: elapsed_ms: ${s.toFixed(5)}, listener: ${this._listenerCount} (elapsed_overall: ${this._elapsedOverall.toFixed(2)}, invocations: ${this._invocationCount})`),this._stopWatch=void 0}}}L._idPool=0;let $=-1;class H{constructor(s,i=Math.random().toString(18).slice(2,5)){this.customThreshold=s,this.name=i,this._warnCountdown=0}dispose(){this._stacks&&this._stacks.clear()}check(s){let i=$;if(typeof this.customThreshold=="number"&&(i=this.customThreshold),i<=0||s<i)return;this._stacks||(this._stacks=new Map);const o=new Error().stack.split(`
|
|
`).slice(3).join(`
|
|
`),r=this._stacks.get(o)||0;if(this._stacks.set(o,r+1),this._warnCountdown-=1,this._warnCountdown<=0){this._warnCountdown=i*.5;let a,n=0;for(const[t,E]of this._stacks)(!a||n<E)&&(a=t,n=E);console.warn(`[${this.name}] potential listener LEAK detected, having ${s} listeners already. MOST frequent listener (${n}):`),console.warn(a)}return()=>{const a=this._stacks.get(o)||0;this._stacks.set(o,a-1)}}}class e{constructor(s){var i;this._disposed=!1,this._options=s,this._leakageMon=$>0?new H(this._options&&this._options.leakWarningThreshold):void 0,this._perfMon=((i=this._options)===null||i===void 0?void 0:i._profName)?new L(this._options._profName):void 0}get event(){return this._event||(this._event=(s,i,o)=>{var r;this._listeners||(this._listeners=new U.a);const a=this._listeners.isEmpty();a&&this._options&&this._options.onFirstListenerAdd&&this._options.onFirstListenerAdd(this);const n=this._listeners.push(i?[s,i]:s);a&&this._options&&this._options.onFirstListenerDidAdd&&this._options.onFirstListenerDidAdd(this),this._options&&this._options.onListenerDidAdd&&this._options.onListenerDidAdd(this,s,i);const t=(r=this._leakageMon)===null||r===void 0?void 0:r.check(this._listeners.size),E=Object(z.i)(()=>{if(t&&t(),!this._disposed&&(n(),this._options&&this._options.onLastListenerRemove)){const b=this._listeners&&!this._listeners.isEmpty();b||this._options.onLastListenerRemove(this)}});return o instanceof z.b?o.add(E):Array.isArray(o)&&o.push(E),E}),this._event}fire(s){var i,o;if(this._listeners){this._deliveryQueue||(this._deliveryQueue=new U.a);for(let r of this._listeners)this._deliveryQueue.push([r,s]);for((i=this._perfMon)===null||i===void 0||i.start(this._deliveryQueue.size);this._deliveryQueue.size>0;){const[r,a]=this._deliveryQueue.shift();try{typeof r=="function"?r.call(void 0,a):r[0].call(r[1],a)}catch(n){Object(Ae.f)(n)}}(o=this._perfMon)===null||o===void 0||o.stop()}}dispose(){var s,i,o,r,a;this._disposed||(this._disposed=!0,(s=this._listeners)===null||s===void 0||s.clear(),(i=this._deliveryQueue)===null||i===void 0||i.clear(),(r=(o=this._options)===null||o===void 0?void 0:o.onLastListenerRemove)===null||r===void 0||r.call(o),(a=this._leakageMon)===null||a===void 0||a.dispose())}}class R extends e{constructor(s){super(s);this._isPaused=0,this._eventQueue=new U.a,this._mergeFn=s==null?void 0:s.merge}pause(){this._isPaused++}resume(){if(this._isPaused!==0&&--this._isPaused===0)if(this._mergeFn){const s=Array.from(this._eventQueue);this._eventQueue.clear(),super.fire(this._mergeFn(s))}else for(;!this._isPaused&&this._eventQueue.size!==0;)super.fire(this._eventQueue.shift())}fire(s){this._listeners&&(this._isPaused!==0?this._eventQueue.push(s):super.fire(s))}}class u extends R{constructor(s){var i;super(s);this._delay=(i=s.delay)!==null&&i!==void 0?i:100}fire(s){this._handle||(this.pause(),this._handle=setTimeout(()=>{this._handle=void 0,this.resume()},this._delay)),super.fire(s)}}class f{constructor(){this.buffers=[]}wrapEvent(s){return(i,o,r)=>s(a=>{const n=this.buffers[this.buffers.length-1];n?n.push(()=>i.call(o,a)):i.call(o,a)},void 0,r)}bufferEvents(s){const i=[];this.buffers.push(i);const o=s();return this.buffers.pop(),i.forEach(r=>r()),o}}class l{constructor(){this.listening=!1,this.inputEvent=N.None,this.inputEventListener=z.a.None,this.emitter=new e({onFirstListenerDidAdd:()=>{this.listening=!0,this.inputEventListener=this.inputEvent(this.emitter.fire,this.emitter)},onLastListenerRemove:()=>{this.listening=!1,this.inputEventListener.dispose()}}),this.event=this.emitter.event}set input(s){this.inputEvent=s,this.listening&&(this.inputEventListener.dispose(),this.inputEventListener=s(this.emitter.fire,this.emitter))}dispose(){this.inputEventListener.dispose(),this.emitter.dispose()}}},MNsG:function(wt,Be,G){"use strict";(function(Ae,z){G.d(Be,"b",function(){return o}),G.d(Be,"i",function(){return t}),G.d(Be,"f",function(){return E}),G.d(Be,"d",function(){return b}),G.d(Be,"g",function(){return _}),G.d(Be,"h",function(){return B}),G.d(Be,"c",function(){return x}),G.d(Be,"k",function(){return h}),G.d(Be,"j",function(){return d}),G.d(Be,"a",function(){return A}),G.d(Be,"e",function(){return m});var U;const V="en";let N=!1,L=!1,$=!1,H=!1,e=!1,R=!1,u=!1,f,l=V,s,i;const o=typeof self=="object"?self:typeof Ae=="object"?Ae:{};let r;typeof o.vscode!="undefined"&&typeof o.vscode.process!="undefined"?r=o.vscode.process:typeof z!="undefined"&&(r=z);const a=typeof((U=r==null?void 0:r.versions)===null||U===void 0?void 0:U.electron)=="string"&&r.type==="renderer";if(typeof navigator=="object"&&!a)i=navigator.userAgent,N=i.indexOf("Windows")>=0,L=i.indexOf("Macintosh")>=0,u=(i.indexOf("Macintosh")>=0||i.indexOf("iPad")>=0||i.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,$=i.indexOf("Linux")>=0,R=!0,f=navigator.language,l=f;else if(typeof r=="object"){N=r.platform==="win32",L=r.platform==="darwin",$=r.platform==="linux",H=$&&!!r.env.SNAP&&!!r.env.SNAP_REVISION,f=V,l=V;const g=r.env.VSCODE_NLS_CONFIG;if(g)try{const F=JSON.parse(g),k=F.availableLanguages["*"];f=F.locale,l=k||V,s=F._translationsConfigFile}catch(F){}e=!0}else console.error("Unable to resolve platform.");let n=0;L?n=1:N?n=3:$&&(n=2);const t=N,E=L,b=$,_=e,B=R,x=u,h=i,d=function(){if(o.setImmediate)return o.setImmediate.bind(o);if(typeof o.postMessage=="function"&&!o.importScripts){let k=[];o.addEventListener("message",Q=>{if(Q.data&&Q.data.vscodeSetImmediateId)for(let X=0,P=k.length;X<P;X++){const q=k[X];if(q.id===Q.data.vscodeSetImmediateId){k.splice(X,1),q.callback();return}}});let S=0;return Q=>{const X=++S;k.push({id:X,callback:Q}),o.postMessage({vscodeSetImmediateId:X},"*")}}if(typeof(r==null?void 0:r.nextTick)=="function")return r.nextTick.bind(r);const F=Promise.resolve();return k=>F.then(k)}(),A=L||u?2:N?1:3;let c=!0,w=!1;function m(){if(!w){w=!0;const g=new Uint8Array(2);g[0]=1,g[1]=2;const F=new Uint16Array(g.buffer);c=F[0]===(2<<8)+1}return c}}).call(this,G("IyRk"),G("Q2Ig"))},N0LK:function(wt,Be,G){"use strict";G.d(Be,"C",function(){return Ae}),G.d(Be,"v",function(){return U}),G.d(Be,"s",function(){return V}),G.d(Be,"t",function(){return N}),G.d(Be,"U",function(){return L}),G.d(Be,"J",function(){return $}),G.d(Be,"O",function(){return H}),G.d(Be,"p",function(){return e}),G.d(Be,"T",function(){return R}),G.d(Be,"q",function(){return u}),G.d(Be,"N",function(){return f}),G.d(Be,"M",function(){return l}),G.d(Be,"Q",function(){return s}),G.d(Be,"u",function(){return i}),G.d(Be,"x",function(){return o}),G.d(Be,"I",function(){return r}),G.d(Be,"f",function(){return a}),G.d(Be,"h",function(){return n}),G.d(Be,"g",function(){return t}),G.d(Be,"i",function(){return E}),G.d(Be,"G",function(){return b}),G.d(Be,"H",function(){return _}),G.d(Be,"r",function(){return B}),G.d(Be,"R",function(){return x}),G.d(Be,"d",function(){return h}),G.d(Be,"e",function(){return d}),G.d(Be,"E",function(){return A}),G.d(Be,"F",function(){return c}),G.d(Be,"j",function(){return w}),G.d(Be,"z",function(){return m}),G.d(Be,"K",function(){return F}),G.d(Be,"L",function(){return k}),G.d(Be,"m",function(){return Q}),G.d(Be,"k",function(){return P}),G.d(Be,"A",function(){return ie}),G.d(Be,"a",function(){return be}),G.d(Be,"n",function(){return me}),G.d(Be,"l",function(){return Me}),G.d(Be,"D",function(){return Ne}),G.d(Be,"B",function(){return ke}),G.d(Be,"b",function(){return Ke}),G.d(Be,"S",function(){return Ye}),G.d(Be,"o",function(){return _e}),G.d(Be,"P",function(){return Te}),G.d(Be,"w",function(){return Pe}),G.d(Be,"c",function(){return bt}),G.d(Be,"y",function(){return yt});function Ae(ee){return!ee||typeof ee!="string"?!0:ee.trim().length===0}const z=/{(\d+)}/g;function U(ee,...ue){return ue.length===0?ee:ee.replace(z,function(ye,ve){const Je=parseInt(ve,10);return isNaN(Je)||Je<0||Je>=ue.length?ye:ue[Je]})}function V(ee){return ee.replace(/[<>&]/g,function(ue){switch(ue){case"<":return"<";case">":return">";case"&":return"&";default:return ue}})}function N(ee){return ee.replace(/[\\\{\}\*\+\?\|\^\$\.\[\]\(\)]/g,"\\$&")}function L(ee,ue=" "){const ye=$(ee,ue);return H(ye,ue)}function $(ee,ue){if(!ee||!ue)return ee;const ye=ue.length;if(ye===0||ee.length===0)return ee;let ve=0;for(;ee.indexOf(ue,ve)===ve;)ve=ve+ye;return ee.substring(ve)}function H(ee,ue){if(!ee||!ue)return ee;const ye=ue.length,ve=ee.length;if(ye===0||ve===0)return ee;let Je=ve,tt=-1;for(;!(tt=ee.lastIndexOf(ue,Je-1),tt===-1||tt+ye!==Je);){if(tt===0)return"";Je=tt}return ee.substring(0,Je)}function e(ee){return ee.replace(/[\-\\\{\}\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&").replace(/[\*]/g,".*")}function R(ee){return ee.replace(/\*/g,"")}function u(ee,ue,ye={}){if(!ee)throw new Error("Cannot create regex from empty string");ue||(ee=N(ee)),ye.wholeWord&&(/\B/.test(ee.charAt(0))||(ee="\\b"+ee),/\B/.test(ee.charAt(ee.length-1))||(ee=ee+"\\b"));let ve="";return ye.global&&(ve+="g"),ye.matchCase||(ve+="i"),ye.multiline&&(ve+="m"),ye.unicode&&(ve+="u"),new RegExp(ee,ve)}function f(ee){if(ee.source==="^"||ee.source==="^$"||ee.source==="$"||ee.source==="^\\s*$")return!1;const ue=ee.exec("");return!!(ue&&ee.lastIndex===0)}function l(ee){return(ee.global?"g":"")+(ee.ignoreCase?"i":"")+(ee.multiline?"m":"")+(ee.unicode?"u":"")}function s(ee){return ee.split(/\r\n|\r|\n/)}function i(ee){for(let ue=0,ye=ee.length;ue<ye;ue++){const ve=ee.charCodeAt(ue);if(ve!==32&&ve!==9)return ue}return-1}function o(ee,ue=0,ye=ee.length){for(let ve=ue;ve<ye;ve++){const Je=ee.charCodeAt(ve);if(Je!==32&&Je!==9)return ee.substring(ue,ve)}return ee.substring(ue,ye)}function r(ee,ue=ee.length-1){for(let ye=ue;ye>=0;ye--){const ve=ee.charCodeAt(ye);if(ve!==32&&ve!==9)return ye}return-1}function a(ee,ue){return ee<ue?-1:ee>ue?1:0}function n(ee,ue,ye=0,ve=ee.length,Je=0,tt=ue.length){for(;ye<ve&&Je<tt;ye++,Je++){let ht=ee.charCodeAt(ye),_t=ue.charCodeAt(Je);if(ht<_t)return-1;if(ht>_t)return 1}const it=ve-ye,st=tt-Je;return it<st?-1:it>st?1:0}function t(ee,ue){return E(ee,ue,0,ee.length,0,ue.length)}function E(ee,ue,ye=0,ve=ee.length,Je=0,tt=ue.length){for(;ye<ve&&Je<tt;ye++,Je++){let ht=ee.charCodeAt(ye),_t=ue.charCodeAt(Je);if(ht===_t)continue;if(ht>=128||_t>=128)return n(ee.toLowerCase(),ue.toLowerCase(),ye,ve,Je,tt);b(ht)&&(ht-=32),b(_t)&&(_t-=32);const He=ht-_t;if(He===0)continue;return He}const it=ve-ye,st=tt-Je;return it<st?-1:it>st?1:0}function b(ee){return ee>=97&&ee<=122}function _(ee){return ee>=65&&ee<=90}function B(ee,ue){return ee.length===ue.length&&E(ee,ue)===0}function x(ee,ue){const ye=ue.length;return ue.length>ee.length?!1:E(ee,ue,0,ye)===0}function h(ee,ue){let ye,ve=Math.min(ee.length,ue.length);for(ye=0;ye<ve;ye++)if(ee.charCodeAt(ye)!==ue.charCodeAt(ye))return ye;return ve}function d(ee,ue){let ye,ve=Math.min(ee.length,ue.length);const Je=ee.length-1,tt=ue.length-1;for(ye=0;ye<ve;ye++)if(ee.charCodeAt(Je-ye)!==ue.charCodeAt(tt-ye))return ye;return ve}function A(ee){return 55296<=ee&&ee<=56319}function c(ee){return 56320<=ee&&ee<=57343}function w(ee,ue){return(ee-55296<<10)+(ue-56320)+65536}function m(ee,ue,ye){const ve=ee.charCodeAt(ye);if(A(ve)&&ye+1<ue){const Je=ee.charCodeAt(ye+1);if(c(Je))return w(ve,Je)}return ve}function g(ee,ue){const ye=ee.charCodeAt(ue-1);if(c(ye)&&ue>1){const ve=ee.charCodeAt(ue-2);if(A(ve))return w(ve,ye)}return ye}function F(ee,ue){const ye=mt.getInstance(),ve=ue,Je=ee.length,tt=m(ee,Je,ue);ue+=tt>=65536?2:1;let it=ye.getGraphemeBreakType(tt);for(;ue<Je;){const st=m(ee,Je,ue),ht=ye.getGraphemeBreakType(st);if(bt(it,ht))break;ue+=st>=65536?2:1,it=ht}return ue-ve}function k(ee,ue){const ye=mt.getInstance(),ve=ue,Je=g(ee,ue);ue-=Je>=65536?2:1;let tt=ye.getGraphemeBreakType(Je);for(;ue>0;){const it=g(ee,ue),st=ye.getGraphemeBreakType(it);if(bt(st,tt))break;ue-=it>=65536?2:1,tt=st}return ve-ue}const S=/(?:[\u05BE\u05C0\u05C3\u05C6\u05D0-\u05F4\u0608\u060B\u060D\u061B-\u064A\u066D-\u066F\u0671-\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u0710\u0712-\u072F\u074D-\u07A5\u07B1-\u07EA\u07F4\u07F5\u07FA-\u0815\u081A\u0824\u0828\u0830-\u0858\u085E-\u08BD\u200F\uFB1D\uFB1F-\uFB28\uFB2A-\uFD3D\uFD50-\uFDFC\uFE70-\uFEFC]|\uD802[\uDC00-\uDD1B\uDD20-\uDE00\uDE10-\uDE33\uDE40-\uDEE4\uDEEB-\uDF35\uDF40-\uDFFF]|\uD803[\uDC00-\uDCFF]|\uD83A[\uDC00-\uDCCF\uDD00-\uDD43\uDD50-\uDFFF]|\uD83B[\uDC00-\uDEBB])/;function Q(ee){return S.test(ee)}const X=/(?:[\u231A\u231B\u23F0\u23F3\u2600-\u27BF\u2B50\u2B55]|\uD83C[\uDDE6-\uDDFF\uDF00-\uDFFF]|\uD83D[\uDC00-\uDE4F\uDE80-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD00-\uDDFF\uDE70-\uDED6])/;function P(ee){return X.test(ee)}const q=/^[\t\n\r\x20-\x7E]*$/;function ie(ee){return q.test(ee)}const be=/[\u2028\u2029]/;function me(ee){return be.test(ee)}function Me(ee){for(let ue=0,ye=ee.length;ue<ye;ue++)if(Ne(ee.charCodeAt(ue)))return!0;return!1}function Ne(ee){return ee=+ee,ee>=11904&&ee<=55215||ee>=63744&&ee<=64255||ee>=65281&&ee<=65374}function ke(ee){return ee>=127462&&ee<=127487||ee===8986||ee===8987||ee===9200||ee===9203||ee>=9728&&ee<=10175||ee===11088||ee===11093||ee>=127744&&ee<=128591||ee>=128640&&ee<=128764||ee>=128992&&ee<=129003||ee>=129280&&ee<=129535||ee>=129648&&ee<=129750}const Ke=String.fromCharCode(65279);function Ye(ee){return!!(ee&&ee.length>0&&ee.charCodeAt(0)===65279)}function _e(ee,ue=!1){return ee?(ue&&(ee=ee.replace(/\\./g,"")),ee.toLowerCase()!==ee):!1}function Te(ee){const ue=90-65+1;return ee=ee%(2*ue),ee<ue?String.fromCharCode(97+ee):String.fromCharCode(65+ee-ue)}function Pe(ee){const ue=mt.getInstance();return ue.getGraphemeBreakType(ee)}function bt(ee,ue){return ee===0?ue!==5&&ue!==7:ee===2&&ue===3?!1:ee===4||ee===2||ee===3||(ue===4||ue===2||ue===3)?!0:ee===8&&(ue===8||ue===9||ue===11||ue===12)||((ee===11||ee===9)&&(ue===9||ue===10)||((ee===12||ee===10)&&ue===10||(ue===5||ue===13||(ue===7||(ee===1||ee===13&&ue===14)))))?!1:!(ee===6&&ue===6)}class mt{constructor(){this._data=dt()}static getInstance(){return mt._INSTANCE||(mt._INSTANCE=new mt),mt._INSTANCE}getGraphemeBreakType(ee){if(ee<32)return ee===10?3:ee===13?2:4;if(ee<127)return 0;const ue=this._data,ye=ue.length/3;let ve=1;for(;ve<=ye;)if(ee<ue[3*ve])ve=2*ve;else if(ee>ue[3*ve+1])ve=2*ve+1;else return ue[3*ve+2];return 0}}mt._INSTANCE=null;function dt(){return JSON.parse("[0,0,0,51592,51592,11,44424,44424,11,72251,72254,5,7150,7150,7,48008,48008,11,55176,55176,11,128420,128420,14,3276,3277,5,9979,9980,14,46216,46216,11,49800,49800,11,53384,53384,11,70726,70726,5,122915,122916,5,129320,129327,14,2558,2558,5,5906,5908,5,9762,9763,14,43360,43388,8,45320,45320,11,47112,47112,11,48904,48904,11,50696,50696,11,52488,52488,11,54280,54280,11,70082,70083,1,71350,71350,7,73111,73111,5,127892,127893,14,128726,128727,14,129473,129474,14,2027,2035,5,2901,2902,5,3784,3789,5,6754,6754,5,8418,8420,5,9877,9877,14,11088,11088,14,44008,44008,5,44872,44872,11,45768,45768,11,46664,46664,11,47560,47560,11,48456,48456,11,49352,49352,11,50248,50248,11,51144,51144,11,52040,52040,11,52936,52936,11,53832,53832,11,54728,54728,11,69811,69814,5,70459,70460,5,71096,71099,7,71998,71998,5,72874,72880,5,119149,119149,7,127374,127374,14,128335,128335,14,128482,128482,14,128765,128767,14,129399,129400,14,129680,129685,14,1476,1477,5,2377,2380,7,2759,2760,5,3137,3140,7,3458,3459,7,4153,4154,5,6432,6434,5,6978,6978,5,7675,7679,5,9723,9726,14,9823,9823,14,9919,9923,14,10035,10036,14,42736,42737,5,43596,43596,5,44200,44200,11,44648,44648,11,45096,45096,11,45544,45544,11,45992,45992,11,46440,46440,11,46888,46888,11,47336,47336,11,47784,47784,11,48232,48232,11,48680,48680,11,49128,49128,11,49576,49576,11,50024,50024,11,50472,50472,11,50920,50920,11,51368,51368,11,51816,51816,11,52264,52264,11,52712,52712,11,53160,53160,11,53608,53608,11,54056,54056,11,54504,54504,11,54952,54952,11,68108,68111,5,69933,69940,5,70197,70197,7,70498,70499,7,70845,70845,5,71229,71229,5,71727,71735,5,72154,72155,5,72344,72345,5,73023,73029,5,94095,94098,5,121403,121452,5,126981,127182,14,127538,127546,14,127990,127990,14,128391,128391,14,128445,128449,14,128500,128505,14,128752,128752,14,129160,129167,14,129356,129356,14,129432,129442,14,129648,129651,14,129751,131069,14,173,173,4,1757,1757,1,2274,2274,1,2494,2494,5,2641,2641,5,2876,2876,5,3014,3016,7,3262,3262,7,3393,3396,5,3570,3571,7,3968,3972,5,4228,4228,7,6086,6086,5,6679,6680,5,6912,6915,5,7080,7081,5,7380,7392,5,8252,8252,14,9096,9096,14,9748,9749,14,9784,9786,14,9833,9850,14,9890,9894,14,9938,9938,14,9999,9999,14,10085,10087,14,12349,12349,14,43136,43137,7,43454,43456,7,43755,43755,7,44088,44088,11,44312,44312,11,44536,44536,11,44760,44760,11,44984,44984,11,45208,45208,11,45432,45432,11,45656,45656,11,45880,45880,11,46104,46104,11,46328,46328,11,46552,46552,11,46776,46776,11,47000,47000,11,47224,47224,11,47448,47448,11,47672,47672,11,47896,47896,11,48120,48120,11,48344,48344,11,48568,48568,11,48792,48792,11,49016,49016,11,49240,49240,11,49464,49464,11,49688,49688,11,49912,49912,11,50136,50136,11,50360,50360,11,50584,50584,11,50808,50808,11,51032,51032,11,51256,51256,11,51480,51480,11,51704,51704,11,51928,51928,11,52152,52152,11,52376,52376,11,52600,52600,11,52824,52824,11,53048,53048,11,53272,53272,11,53496,53496,11,53720,53720,11,53944,53944,11,54168,54168,11,54392,54392,11,54616,54616,11,54840,54840,11,55064,55064,11,65438,65439,5,69633,69633,5,69837,69837,1,70018,70018,7,70188,70190,7,70368,70370,7,70465,70468,7,70712,70719,5,70835,70840,5,70850,70851,5,71132,71133,5,71340,71340,7,71458,71461,5,71985,71989,7,72002,72002,7,72193,72202,5,72281,72283,5,72766,72766,7,72885,72886,5,73104,73105,5,92912,92916,5,113824,113827,4,119173,119179,5,121505,121519,5,125136,125142,5,127279,127279,14,127489,127490,14,127570,127743,14,127900,127901,14,128254,128254,14,128369,128370,14,128400,128400,14,128425,128432,14,128468,128475,14,128489,128494,14,128715,128720,14,128745,128745,14,128759,128760,14,129004,129023,14,129296,129304,14,129340,129342,14,129388,129392,14,129404,129407,14,129454,129455,14,129485,129487,14,129659,129663,14,129719,129727,14,917536,917631,5,13,13,2,1160,1161,5,1564,1564,4,1807,1807,1,2085,2087,5,2363,2363,7,2402,2403,5,2507,2508,7,2622,2624,7,2691,2691,7,2786,2787,5,2881,2884,5,3006,3006,5,3072,3072,5,3170,3171,5,3267,3268,7,3330,3331,7,3406,3406,1,3538,3540,5,3655,3662,5,3897,3897,5,4038,4038,5,4184,4185,5,4352,4447,8,6068,6069,5,6155,6157,5,6448,6449,7,6742,6742,5,6783,6783,5,6966,6970,5,7042,7042,7,7143,7143,7,7212,7219,5,7412,7412,5,8206,8207,4,8294,8303,4,8596,8601,14,9410,9410,14,9742,9742,14,9757,9757,14,9770,9770,14,9794,9794,14,9828,9828,14,9855,9855,14,9882,9882,14,9900,9903,14,9929,9933,14,9963,9967,14,9987,9988,14,10006,10006,14,10062,10062,14,10175,10175,14,11744,11775,5,42607,42607,5,43043,43044,7,43263,43263,5,43444,43445,7,43569,43570,5,43698,43700,5,43766,43766,5,44032,44032,11,44144,44144,11,44256,44256,11,44368,44368,11,44480,44480,11,44592,44592,11,44704,44704,11,44816,44816,11,44928,44928,11,45040,45040,11,45152,45152,11,45264,45264,11,45376,45376,11,45488,45488,11,45600,45600,11,45712,45712,11,45824,45824,11,45936,45936,11,46048,46048,11,46160,46160,11,46272,46272,11,46384,46384,11,46496,46496,11,46608,46608,11,46720,46720,11,46832,46832,11,46944,46944,11,47056,47056,11,47168,47168,11,47280,47280,11,47392,47392,11,47504,47504,11,47616,47616,11,47728,47728,11,47840,47840,11,47952,47952,11,48064,48064,11,48176,48176,11,48288,48288,11,48400,48400,11,48512,48512,11,48624,48624,11,48736,48736,11,48848,48848,11,48960,48960,11,49072,49072,11,49184,49184,11,49296,49296,11,49408,49408,11,49520,49520,11,49632,49632,11,49744,49744,11,49856,49856,11,49968,49968,11,50080,50080,11,50192,50192,11,50304,50304,11,50416,50416,11,50528,50528,11,50640,50640,11,50752,50752,11,50864,50864,11,50976,50976,11,51088,51088,11,51200,51200,11,51312,51312,11,51424,51424,11,51536,51536,11,51648,51648,11,51760,51760,11,51872,51872,11,51984,51984,11,52096,52096,11,52208,52208,11,52320,52320,11,52432,52432,11,52544,52544,11,52656,52656,11,52768,52768,11,52880,52880,11,52992,52992,11,53104,53104,11,53216,53216,11,53328,53328,11,53440,53440,11,53552,53552,11,53664,53664,11,53776,53776,11,53888,53888,11,54000,54000,11,54112,54112,11,54224,54224,11,54336,54336,11,54448,54448,11,54560,54560,11,54672,54672,11,54784,54784,11,54896,54896,11,55008,55008,11,55120,55120,11,64286,64286,5,66272,66272,5,68900,68903,5,69762,69762,7,69817,69818,5,69927,69931,5,70003,70003,5,70070,70078,5,70094,70094,7,70194,70195,7,70206,70206,5,70400,70401,5,70463,70463,7,70475,70477,7,70512,70516,5,70722,70724,5,70832,70832,5,70842,70842,5,70847,70848,5,71088,71089,7,71102,71102,7,71219,71226,5,71231,71232,5,71342,71343,7,71453,71455,5,71463,71467,5,71737,71738,5,71995,71996,5,72000,72000,7,72145,72147,7,72160,72160,5,72249,72249,7,72273,72278,5,72330,72342,5,72752,72758,5,72850,72871,5,72882,72883,5,73018,73018,5,73031,73031,5,73109,73109,5,73461,73462,7,94031,94031,5,94192,94193,7,119142,119142,7,119155,119162,4,119362,119364,5,121476,121476,5,122888,122904,5,123184,123190,5,126976,126979,14,127184,127231,14,127344,127345,14,127405,127461,14,127514,127514,14,127561,127567,14,127778,127779,14,127896,127896,14,127985,127986,14,127995,127999,5,128326,128328,14,128360,128366,14,128378,128378,14,128394,128397,14,128405,128406,14,128422,128423,14,128435,128443,14,128453,128464,14,128479,128480,14,128484,128487,14,128496,128498,14,128640,128709,14,128723,128724,14,128736,128741,14,128747,128748,14,128755,128755,14,128762,128762,14,128981,128991,14,129096,129103,14,129292,129292,14,129311,129311,14,129329,129330,14,129344,129349,14,129360,129374,14,129394,129394,14,129402,129402,14,129413,129425,14,129445,129450,14,129466,129471,14,129483,129483,14,129511,129535,14,129653,129655,14,129667,129670,14,129705,129711,14,129731,129743,14,917505,917505,4,917760,917999,5,10,10,3,127,159,4,768,879,5,1471,1471,5,1536,1541,1,1648,1648,5,1767,1768,5,1840,1866,5,2070,2073,5,2137,2139,5,2307,2307,7,2366,2368,7,2382,2383,7,2434,2435,7,2497,2500,5,2519,2519,5,2563,2563,7,2631,2632,5,2677,2677,5,2750,2752,7,2763,2764,7,2817,2817,5,2879,2879,5,2891,2892,7,2914,2915,5,3008,3008,5,3021,3021,5,3076,3076,5,3146,3149,5,3202,3203,7,3264,3265,7,3271,3272,7,3298,3299,5,3390,3390,5,3402,3404,7,3426,3427,5,3535,3535,5,3544,3550,7,3635,3635,7,3763,3763,7,3893,3893,5,3953,3966,5,3981,3991,5,4145,4145,7,4157,4158,5,4209,4212,5,4237,4237,5,4520,4607,10,5970,5971,5,6071,6077,5,6089,6099,5,6277,6278,5,6439,6440,5,6451,6456,7,6683,6683,5,6744,6750,5,6765,6770,7,6846,6846,5,6964,6964,5,6972,6972,5,7019,7027,5,7074,7077,5,7083,7085,5,7146,7148,7,7154,7155,7,7222,7223,5,7394,7400,5,7416,7417,5,8204,8204,5,8233,8233,4,8288,8292,4,8413,8416,5,8482,8482,14,8986,8987,14,9193,9203,14,9654,9654,14,9733,9733,14,9745,9745,14,9752,9752,14,9760,9760,14,9766,9766,14,9774,9775,14,9792,9792,14,9800,9811,14,9825,9826,14,9831,9831,14,9852,9853,14,9872,9873,14,9880,9880,14,9885,9887,14,9896,9897,14,9906,9916,14,9926,9927,14,9936,9936,14,9941,9960,14,9974,9974,14,9982,9985,14,9992,9997,14,10002,10002,14,10017,10017,14,10055,10055,14,10071,10071,14,10145,10145,14,11013,11015,14,11503,11505,5,12334,12335,5,12951,12951,14,42612,42621,5,43014,43014,5,43047,43047,7,43204,43205,5,43335,43345,5,43395,43395,7,43450,43451,7,43561,43566,5,43573,43574,5,43644,43644,5,43710,43711,5,43758,43759,7,44005,44005,5,44012,44012,7,44060,44060,11,44116,44116,11,44172,44172,11,44228,44228,11,44284,44284,11,44340,44340,11,44396,44396,11,44452,44452,11,44508,44508,11,44564,44564,11,44620,44620,11,44676,44676,11,44732,44732,11,44788,44788,11,44844,44844,11,44900,44900,11,44956,44956,11,45012,45012,11,45068,45068,11,45124,45124,11,45180,45180,11,45236,45236,11,45292,45292,11,45348,45348,11,45404,45404,11,45460,45460,11,45516,45516,11,45572,45572,11,45628,45628,11,45684,45684,11,45740,45740,11,45796,45796,11,45852,45852,11,45908,45908,11,45964,45964,11,46020,46020,11,46076,46076,11,46132,46132,11,46188,46188,11,46244,46244,11,46300,46300,11,46356,46356,11,46412,46412,11,46468,46468,11,46524,46524,11,46580,46580,11,46636,46636,11,46692,46692,11,46748,46748,11,46804,46804,11,46860,46860,11,46916,46916,11,46972,46972,11,47028,47028,11,47084,47084,11,47140,47140,11,47196,47196,11,47252,47252,11,47308,47308,11,47364,47364,11,47420,47420,11,47476,47476,11,47532,47532,11,47588,47588,11,47644,47644,11,47700,47700,11,47756,47756,11,47812,47812,11,47868,47868,11,47924,47924,11,47980,47980,11,48036,48036,11,48092,48092,11,48148,48148,11,48204,48204,11,48260,48260,11,48316,48316,11,48372,48372,11,48428,48428,11,48484,48484,11,48540,48540,11,48596,48596,11,48652,48652,11,48708,48708,11,48764,48764,11,48820,48820,11,48876,48876,11,48932,48932,11,48988,48988,11,49044,49044,11,49100,49100,11,49156,49156,11,49212,49212,11,49268,49268,11,49324,49324,11,49380,49380,11,49436,49436,11,49492,49492,11,49548,49548,11,49604,49604,11,49660,49660,11,49716,49716,11,49772,49772,11,49828,49828,11,49884,49884,11,49940,49940,11,49996,49996,11,50052,50052,11,50108,50108,11,50164,50164,11,50220,50220,11,50276,50276,11,50332,50332,11,50388,50388,11,50444,50444,11,50500,50500,11,50556,50556,11,50612,50612,11,50668,50668,11,50724,50724,11,50780,50780,11,50836,50836,11,50892,50892,11,50948,50948,11,51004,51004,11,51060,51060,11,51116,51116,11,51172,51172,11,51228,51228,11,51284,51284,11,51340,51340,11,51396,51396,11,51452,51452,11,51508,51508,11,51564,51564,11,51620,51620,11,51676,51676,11,51732,51732,11,51788,51788,11,51844,51844,11,51900,51900,11,51956,51956,11,52012,52012,11,52068,52068,11,52124,52124,11,52180,52180,11,52236,52236,11,52292,52292,11,52348,52348,11,52404,52404,11,52460,52460,11,52516,52516,11,52572,52572,11,52628,52628,11,52684,52684,11,52740,52740,11,52796,52796,11,52852,52852,11,52908,52908,11,52964,52964,11,53020,53020,11,53076,53076,11,53132,53132,11,53188,53188,11,53244,53244,11,53300,53300,11,53356,53356,11,53412,53412,11,53468,53468,11,53524,53524,11,53580,53580,11,53636,53636,11,53692,53692,11,53748,53748,11,53804,53804,11,53860,53860,11,53916,53916,11,53972,53972,11,54028,54028,11,54084,54084,11,54140,54140,11,54196,54196,11,54252,54252,11,54308,54308,11,54364,54364,11,54420,54420,11,54476,54476,11,54532,54532,11,54588,54588,11,54644,54644,11,54700,54700,11,54756,54756,11,54812,54812,11,54868,54868,11,54924,54924,11,54980,54980,11,55036,55036,11,55092,55092,11,55148,55148,11,55216,55238,9,65056,65071,5,65529,65531,4,68097,68099,5,68159,68159,5,69446,69456,5,69688,69702,5,69808,69810,7,69815,69816,7,69821,69821,1,69888,69890,5,69932,69932,7,69957,69958,7,70016,70017,5,70067,70069,7,70079,70080,7,70089,70092,5,70095,70095,5,70191,70193,5,70196,70196,5,70198,70199,5,70367,70367,5,70371,70378,5,70402,70403,7,70462,70462,5,70464,70464,5,70471,70472,7,70487,70487,5,70502,70508,5,70709,70711,7,70720,70721,7,70725,70725,7,70750,70750,5,70833,70834,7,70841,70841,7,70843,70844,7,70846,70846,7,70849,70849,7,71087,71087,5,71090,71093,5,71100,71101,5,71103,71104,5,71216,71218,7,71227,71228,7,71230,71230,7,71339,71339,5,71341,71341,5,71344,71349,5,71351,71351,5,71456,71457,7,71462,71462,7,71724,71726,7,71736,71736,7,71984,71984,5,71991,71992,7,71997,71997,7,71999,71999,1,72001,72001,1,72003,72003,5,72148,72151,5,72156,72159,7,72164,72164,7,72243,72248,5,72250,72250,1,72263,72263,5,72279,72280,7,72324,72329,1,72343,72343,7,72751,72751,7,72760,72765,5,72767,72767,5,72873,72873,7,72881,72881,7,72884,72884,7,73009,73014,5,73020,73021,5,73030,73030,1,73098,73102,7,73107,73108,7,73110,73110,7,73459,73460,5,78896,78904,4,92976,92982,5,94033,94087,7,94180,94180,5,113821,113822,5,119141,119141,5,119143,119145,5,119150,119154,5,119163,119170,5,119210,119213,5,121344,121398,5,121461,121461,5,121499,121503,5,122880,122886,5,122907,122913,5,122918,122922,5,123628,123631,5,125252,125258,5,126980,126980,14,127183,127183,14,127245,127247,14,127340,127343,14,127358,127359,14,127377,127386,14,127462,127487,6,127491,127503,14,127535,127535,14,127548,127551,14,127568,127569,14,127744,127777,14,127780,127891,14,127894,127895,14,127897,127899,14,127902,127984,14,127987,127989,14,127991,127994,14,128000,128253,14,128255,128317,14,128329,128334,14,128336,128359,14,128367,128368,14,128371,128377,14,128379,128390,14,128392,128393,14,128398,128399,14,128401,128404,14,128407,128419,14,128421,128421,14,128424,128424,14,128433,128434,14,128444,128444,14,128450,128452,14,128465,128467,14,128476,128478,14,128481,128481,14,128483,128483,14,128488,128488,14,128495,128495,14,128499,128499,14,128506,128591,14,128710,128714,14,128721,128722,14,128725,128725,14,128728,128735,14,128742,128744,14,128746,128746,14,128749,128751,14,128753,128754,14,128756,128758,14,128761,128761,14,128763,128764,14,128884,128895,14,128992,129003,14,129036,129039,14,129114,129119,14,129198,129279,14,129293,129295,14,129305,129310,14,129312,129319,14,129328,129328,14,129331,129338,14,129343,129343,14,129351,129355,14,129357,129359,14,129375,129387,14,129393,129393,14,129395,129398,14,129401,129401,14,129403,129403,14,129408,129412,14,129426,129431,14,129443,129444,14,129451,129453,14,129456,129465,14,129472,129472,14,129475,129482,14,129484,129484,14,129488,129510,14,129536,129647,14,129652,129652,14,129656,129658,14,129664,129666,14,129671,129679,14,129686,129704,14,129712,129718,14,129728,129730,14,129744,129750,14,917504,917504,4,917506,917535,4,917632,917759,4,918000,921599,4,0,9,4,11,12,4,14,31,4,169,169,14,174,174,14,1155,1159,5,1425,1469,5,1473,1474,5,1479,1479,5,1552,1562,5,1611,1631,5,1750,1756,5,1759,1764,5,1770,1773,5,1809,1809,5,1958,1968,5,2045,2045,5,2075,2083,5,2089,2093,5,2259,2273,5,2275,2306,5,2362,2362,5,2364,2364,5,2369,2376,5,2381,2381,5,2385,2391,5,2433,2433,5,2492,2492,5,2495,2496,7,2503,2504,7,2509,2509,5,2530,2531,5,2561,2562,5,2620,2620,5,2625,2626,5,2635,2637,5,2672,2673,5,2689,2690,5,2748,2748,5,2753,2757,5,2761,2761,7,2765,2765,5,2810,2815,5,2818,2819,7,2878,2878,5,2880,2880,7,2887,2888,7,2893,2893,5,2903,2903,5,2946,2946,5,3007,3007,7,3009,3010,7,3018,3020,7,3031,3031,5,3073,3075,7,3134,3136,5,3142,3144,5,3157,3158,5,3201,3201,5,3260,3260,5,3263,3263,5,3266,3266,5,3270,3270,5,3274,3275,7,3285,3286,5,3328,3329,5,3387,3388,5,3391,3392,7,3398,3400,7,3405,3405,5,3415,3415,5,3457,3457,5,3530,3530,5,3536,3537,7,3542,3542,5,3551,3551,5,3633,3633,5,3636,3642,5,3761,3761,5,3764,3772,5,3864,3865,5,3895,3895,5,3902,3903,7,3967,3967,7,3974,3975,5,3993,4028,5,4141,4144,5,4146,4151,5,4155,4156,7,4182,4183,7,4190,4192,5,4226,4226,5,4229,4230,5,4253,4253,5,4448,4519,9,4957,4959,5,5938,5940,5,6002,6003,5,6070,6070,7,6078,6085,7,6087,6088,7,6109,6109,5,6158,6158,4,6313,6313,5,6435,6438,7,6441,6443,7,6450,6450,5,6457,6459,5,6681,6682,7,6741,6741,7,6743,6743,7,6752,6752,5,6757,6764,5,6771,6780,5,6832,6845,5,6847,6848,5,6916,6916,7,6965,6965,5,6971,6971,7,6973,6977,7,6979,6980,7,7040,7041,5,7073,7073,7,7078,7079,7,7082,7082,7,7142,7142,5,7144,7145,5,7149,7149,5,7151,7153,5,7204,7211,7,7220,7221,7,7376,7378,5,7393,7393,7,7405,7405,5,7415,7415,7,7616,7673,5,8203,8203,4,8205,8205,13,8232,8232,4,8234,8238,4,8265,8265,14,8293,8293,4,8400,8412,5,8417,8417,5,8421,8432,5,8505,8505,14,8617,8618,14,9000,9000,14,9167,9167,14,9208,9210,14,9642,9643,14,9664,9664,14,9728,9732,14,9735,9741,14,9743,9744,14,9746,9746,14,9750,9751,14,9753,9756,14,9758,9759,14,9761,9761,14,9764,9765,14,9767,9769,14,9771,9773,14,9776,9783,14,9787,9791,14,9793,9793,14,9795,9799,14,9812,9822,14,9824,9824,14,9827,9827,14,9829,9830,14,9832,9832,14,9851,9851,14,9854,9854,14,9856,9861,14,9874,9876,14,9878,9879,14,9881,9881,14,9883,9884,14,9888,9889,14,9895,9895,14,9898,9899,14,9904,9905,14,9917,9918,14,9924,9925,14,9928,9928,14,9934,9935,14,9937,9937,14,9939,9940,14,9961,9962,14,9968,9973,14,9975,9978,14,9981,9981,14,9986,9986,14,9989,9989,14,9998,9998,14,10000,10001,14,10004,10004,14,10013,10013,14,10024,10024,14,10052,10052,14,10060,10060,14,10067,10069,14,10083,10084,14,10133,10135,14,10160,10160,14,10548,10549,14,11035,11036,14,11093,11093,14,11647,11647,5,12330,12333,5,12336,12336,14,12441,12442,5,12953,12953,14,42608,42610,5,42654,42655,5,43010,43010,5,43019,43019,5,43045,43046,5,43052,43052,5,43188,43203,7,43232,43249,5,43302,43309,5,43346,43347,7,43392,43394,5,43443,43443,5,43446,43449,5,43452,43453,5,43493,43493,5,43567,43568,7,43571,43572,7,43587,43587,5,43597,43597,7,43696,43696,5,43703,43704,5,43713,43713,5,43756,43757,5,43765,43765,7,44003,44004,7,44006,44007,7,44009,44010,7,44013,44013,5,44033,44059,12,44061,44087,12,44089,44115,12,44117,44143,12,44145,44171,12,44173,44199,12,44201,44227,12,44229,44255,12,44257,44283,12,44285,44311,12,44313,44339,12,44341,44367,12,44369,44395,12,44397,44423,12,44425,44451,12,44453,44479,12,44481,44507,12,44509,44535,12,44537,44563,12,44565,44591,12,44593,44619,12,44621,44647,12,44649,44675,12,44677,44703,12,44705,44731,12,44733,44759,12,44761,44787,12,44789,44815,12,44817,44843,12,44845,44871,12,44873,44899,12,44901,44927,12,44929,44955,12,44957,44983,12,44985,45011,12,45013,45039,12,45041,45067,12,45069,45095,12,45097,45123,12,45125,45151,12,45153,45179,12,45181,45207,12,45209,45235,12,45237,45263,12,45265,45291,12,45293,45319,12,45321,45347,12,45349,45375,12,45377,45403,12,45405,45431,12,45433,45459,12,45461,45487,12,45489,45515,12,45517,45543,12,45545,45571,12,45573,45599,12,45601,45627,12,45629,45655,12,45657,45683,12,45685,45711,12,45713,45739,12,45741,45767,12,45769,45795,12,45797,45823,12,45825,45851,12,45853,45879,12,45881,45907,12,45909,45935,12,45937,45963,12,45965,45991,12,45993,46019,12,46021,46047,12,46049,46075,12,46077,46103,12,46105,46131,12,46133,46159,12,46161,46187,12,46189,46215,12,46217,46243,12,46245,46271,12,46273,46299,12,46301,46327,12,46329,46355,12,46357,46383,12,46385,46411,12,46413,46439,12,46441,46467,12,46469,46495,12,46497,46523,12,46525,46551,12,46553,46579,12,46581,46607,12,46609,46635,12,46637,46663,12,46665,46691,12,46693,46719,12,46721,46747,12,46749,46775,12,46777,46803,12,46805,46831,12,46833,46859,12,46861,46887,12,46889,46915,12,46917,46943,12,46945,46971,12,46973,46999,12,47001,47027,12,47029,47055,12,47057,47083,12,47085,47111,12,47113,47139,12,47141,47167,12,47169,47195,12,47197,47223,12,47225,47251,12,47253,47279,12,47281,47307,12,47309,47335,12,47337,47363,12,47365,47391,12,47393,47419,12,47421,47447,12,47449,47475,12,47477,47503,12,47505,47531,12,47533,47559,12,47561,47587,12,47589,47615,12,47617,47643,12,47645,47671,12,47673,47699,12,47701,47727,12,47729,47755,12,47757,47783,12,47785,47811,12,47813,47839,12,47841,47867,12,47869,47895,12,47897,47923,12,47925,47951,12,47953,47979,12,47981,48007,12,48009,48035,12,48037,48063,12,48065,48091,12,48093,48119,12,48121,48147,12,48149,48175,12,48177,48203,12,48205,48231,12,48233,48259,12,48261,48287,12,48289,48315,12,48317,48343,12,48345,48371,12,48373,48399,12,48401,48427,12,48429,48455,12,48457,48483,12,48485,48511,12,48513,48539,12,48541,48567,12,48569,48595,12,48597,48623,12,48625,48651,12,48653,48679,12,48681,48707,12,48709,48735,12,48737,48763,12,48765,48791,12,48793,48819,12,48821,48847,12,48849,48875,12,48877,48903,12,48905,48931,12,48933,48959,12,48961,48987,12,48989,49015,12,49017,49043,12,49045,49071,12,49073,49099,12,49101,49127,12,49129,49155,12,49157,49183,12,49185,49211,12,49213,49239,12,49241,49267,12,49269,49295,12,49297,49323,12,49325,49351,12,49353,49379,12,49381,49407,12,49409,49435,12,49437,49463,12,49465,49491,12,49493,49519,12,49521,49547,12,49549,49575,12,49577,49603,12,49605,49631,12,49633,49659,12,49661,49687,12,49689,49715,12,49717,49743,12,49745,49771,12,49773,49799,12,49801,49827,12,49829,49855,12,49857,49883,12,49885,49911,12,49913,49939,12,49941,49967,12,49969,49995,12,49997,50023,12,50025,50051,12,50053,50079,12,50081,50107,12,50109,50135,12,50137,50163,12,50165,50191,12,50193,50219,12,50221,50247,12,50249,50275,12,50277,50303,12,50305,50331,12,50333,50359,12,50361,50387,12,50389,50415,12,50417,50443,12,50445,50471,12,50473,50499,12,50501,50527,12,50529,50555,12,50557,50583,12,50585,50611,12,50613,50639,12,50641,50667,12,50669,50695,12,50697,50723,12,50725,50751,12,50753,50779,12,50781,50807,12,50809,50835,12,50837,50863,12,50865,50891,12,50893,50919,12,50921,50947,12,50949,50975,12,50977,51003,12,51005,51031,12,51033,51059,12,51061,51087,12,51089,51115,12,51117,51143,12,51145,51171,12,51173,51199,12,51201,51227,12,51229,51255,12,51257,51283,12,51285,51311,12,51313,51339,12,51341,51367,12,51369,51395,12,51397,51423,12,51425,51451,12,51453,51479,12,51481,51507,12,51509,51535,12,51537,51563,12,51565,51591,12,51593,51619,12,51621,51647,12,51649,51675,12,51677,51703,12,51705,51731,12,51733,51759,12,51761,51787,12,51789,51815,12,51817,51843,12,51845,51871,12,51873,51899,12,51901,51927,12,51929,51955,12,51957,51983,12,51985,52011,12,52013,52039,12,52041,52067,12,52069,52095,12,52097,52123,12,52125,52151,12,52153,52179,12,52181,52207,12,52209,52235,12,52237,52263,12,52265,52291,12,52293,52319,12,52321,52347,12,52349,52375,12,52377,52403,12,52405,52431,12,52433,52459,12,52461,52487,12,52489,52515,12,52517,52543,12,52545,52571,12,52573,52599,12,52601,52627,12,52629,52655,12,52657,52683,12,52685,52711,12,52713,52739,12,52741,52767,12,52769,52795,12,52797,52823,12,52825,52851,12,52853,52879,12,52881,52907,12,52909,52935,12,52937,52963,12,52965,52991,12,52993,53019,12,53021,53047,12,53049,53075,12,53077,53103,12,53105,53131,12,53133,53159,12,53161,53187,12,53189,53215,12,53217,53243,12,53245,53271,12,53273,53299,12,53301,53327,12,53329,53355,12,53357,53383,12,53385,53411,12,53413,53439,12,53441,53467,12,53469,53495,12,53497,53523,12,53525,53551,12,53553,53579,12,53581,53607,12,53609,53635,12,53637,53663,12,53665,53691,12,53693,53719,12,53721,53747,12,53749,53775,12,53777,53803,12,53805,53831,12,53833,53859,12,53861,53887,12,53889,53915,12,53917,53943,12,53945,53971,12,53973,53999,12,54001,54027,12,54029,54055,12,54057,54083,12,54085,54111,12,54113,54139,12,54141,54167,12,54169,54195,12,54197,54223,12,54225,54251,12,54253,54279,12,54281,54307,12,54309,54335,12,54337,54363,12,54365,54391,12,54393,54419,12,54421,54447,12,54449,54475,12,54477,54503,12,54505,54531,12,54533,54559,12,54561,54587,12,54589,54615,12,54617,54643,12,54645,54671,12,54673,54699,12,54701,54727,12,54729,54755,12,54757,54783,12,54785,54811,12,54813,54839,12,54841,54867,12,54869,54895,12,54897,54923,12,54925,54951,12,54953,54979,12,54981,55007,12,55009,55035,12,55037,55063,12,55065,55091,12,55093,55119,12,55121,55147,12,55149,55175,12,55177,55203,12,55243,55291,10,65024,65039,5,65279,65279,4,65520,65528,4,66045,66045,5,66422,66426,5,68101,68102,5,68152,68154,5,68325,68326,5,69291,69292,5,69632,69632,7,69634,69634,7,69759,69761,5]")}function yt(ee,ue){if(ee===0)return 0;const ye=le(ee,ue);if(ye!==void 0)return ye;const ve=g(ue,ee);return ee-=Z(ve),ee}function le(ee,ue){let ye=g(ue,ee);for(ee-=Z(ye);te(ye)||ye===65039||ye===8419;){if(ee===0)return;ye=g(ue,ee),ee-=Z(ye)}if(!ke(ye))return;if(ee>=0){const ve=g(ue,ee);ve===8205&&(ee-=Z(ve))}return ee}function Z(ee){return ee>=65536?2:1}function te(ee){return 127995<=ee&&ee<=127999}},NNiE:function(wt,Be,G){"use strict";var Ae=G("7Kak"),z=G("9yH6"),U=G("tJVT"),V=G("q1tI"),N=G.n(V),L=G("9Bee"),$=G("+M/w"),H=G.n($),e=["A\uFF0E","B\uFF0E","C\uFF0E","D\uFF0E","E\uFF0E","F\uFF0E","G\uFF0E","H\uFF0E","I\uFF0E","J\uFF0E","K\uFF0E","L\uFF0E","M\uFF0E","N\uFF0E","O\uFF0E","P\uFF0E","Q\uFF0E","R\uFF0E","S\uFF0E","T\uFF0E","U\uFF0E","V\uFF0E","W\uFF0E","X\uFF0E","Y\uFF0E","Z\uFF0E"],R=function(f){var l=f.index,s=f.typeName,i=f.type,o=f.data,r=o===void 0?{}:o,a=f.inMouseId,n=f.isshow,t=f.onSetScore,E=t===void 0?function(){}:t,b=f.onDelete,_=b===void 0?function(){}:b,B=f.onMouseEnter,x=B===void 0?function(){}:B,h=f.showAnswer,d=h===void 0?!1:h,A=Object(V.useState)(!1),c=Object(U.a)(A,2),w=c[0],m=c[1],g=function(){var me;return N.a.createElement("div",{className:H.a.answerWrap},r==null||((me=r.choices)===null||me===void 0)?void 0:me.map(function(Me,Ne){return N.a.createElement("div",{className:"".concat(H.a.flexRow," mt15"),key:Ne},N.a.createElement("div",{style:{lineHeight:"24px",flexShrink:0}},e[Ne]),N.a.createElement("div",{className:"".concat(H.a.answer," ml5")},N.a.createElement(L.a,{value:Me==null?void 0:Me.choice_text})))}),d&&N.a.createElement("div",{className:"mt10 ".concat(H.a.answerText)},"\u53C2\u8003\u7B54\u6848\uFF1A",r==null?void 0:r.standard_answer_show))},F=function(){var me;return N.a.createElement("div",{className:H.a.answerWrap},N.a.createElement("div",{className:"".concat(H.a.flexRow," mt15")},r==null||((me=r.choices)===null||me===void 0)?void 0:me.map(function(Me,Ne){return N.a.createElement(z.a,{disabled:!0,key:Ne},Me==null?void 0:Me.choice_text)})),d&&N.a.createElement("div",{className:"mt10 ".concat(H.a.answerText)},"\u53C2\u8003\u7B54\u6848\uFF1A",r==null?void 0:r.standard_answer_show))},k=function(){var me;return N.a.createElement("div",{className:H.a.answerWrap},N.a.createElement("div",{className:"".concat(H.a.flexRow," mt15")},N.a.createElement(L.a,{value:r==null||((me=r.program_attr)===null||me===void 0)?void 0:me.description})))},S=function(){var me;return N.a.createElement("div",{className:H.a.answerWrap},d&&N.a.createElement("div",{className:"".concat(H.a.flexColumn," mt15")},r==null||((me=r.standard_answer)===null||me===void 0)?void 0:me.map(function(Me,Ne){return N.a.createElement(L.a,{key:Ne,value:"\u53C2\u8003\u7B54\u6848\uFF08\u586B\u7A7A".concat(Me.position,"\uFF09\uFF1A").concat(Me.answer_text.join("\u3001"))})})))},Q=function(){var me;return N.a.createElement("div",{className:H.a.answerWrap},d&&N.a.createElement("div",{className:"mt15"},N.a.createElement("div",null,"\u53C2\u8003\u7B54\u6848\uFF1A"),N.a.createElement(L.a,{value:r==null||((me=r.answer_texts)===null||me===void 0)?void 0:me[0]})))},X=function(){var me;return N.a.createElement("div",{className:H.a.answerWrap},N.a.createElement("div",{className:"mt10"},"\u5173\u5361"),r==null||((me=r.shixun)===null||me===void 0)?void 0:me.map(function(Me,Ne){return N.a.createElement("div",{className:"mt10 font14",key:Ne},Ne+1,". ",Me==null?void 0:Me.challenge_name)}))},P=function(){var me;return N.a.createElement("div",{className:H.a.answerWrap,style:{display:w&&"none"}},r==null||((me=r.sub_questions)===null||me===void 0)?void 0:me.map(function(Me,Ne){var ke,Ke='<span style="margin-right: 10px">'.concat(l+1,".").concat(Ne+1,'</span><span>\uFF08\u5355\u9009\u9898\uFF09</span><span class="c-grey-999">\uFF08').concat(Me.score,"\u5206\uFF09</span>");return N.a.createElement(V.Fragment,{key:Me==null?void 0:Me.id},N.a.createElement("div",{className:H.a.titleWrap,style:{marginTop:16}},N.a.createElement(L.a,{className:H.a.titleHtml,value:Ke+Me.name})),Me==null||((ke=Me.choices)===null||ke===void 0)?void 0:ke.map(function(Ye,_e){return N.a.createElement("div",{className:"".concat(H.a.flexRow," mt15"),key:_e},N.a.createElement("div",{style:{lineHeight:"24px",flexShrink:0}},e[_e]),N.a.createElement("div",{className:"".concat(H.a.answer," ml5")},N.a.createElement(L.a,{value:Ye==null?void 0:Ye.choice_text})))}),d&&N.a.createElement("div",{className:"mt10 ".concat(H.a.answerText)},"\u53C2\u8003\u7B54\u6848\uFF1A",Me==null?void 0:Me.standard_answer_show))}))},q=function(){var me={SINGLE:g,MULTIPLE:g,JUDGMENT:F,PROGRAM:k,COMPLETION:S,SUBJECTIVE:Q,PRACTICAL:X,COMBINATION:P};return me[i]?me[i]():null},ie=function(me,Me){var Ne,ke='<span style="margin-right: -10px">'.concat(Me+1,'\u3001</span><span class="c-grey-999">\uFF08').concat((me==null?void 0:me.item_type)==="combination"?"\u5171".concat(me==null||((Ne=me.sub_questions)===null||Ne===void 0)?void 0:Ne.length,"\u5C0F\u9898\uFF0C"):"").concat(me.score,"\u5206\uFF09</span> ");return ke};return N.a.createElement("div",{onMouseEnter:function(){return x(r.id)}},a===r.id&&N.a.createElement("div",{className:H.a.action},N.a.createElement("div",{className:H.a.setScore,onClick:function(){return E(r.id,s,r==null?void 0:r.shixun,r.score,r)}},"\u8BBE\u7F6E\u5F97\u5206"),N.a.createElement("div",{className:H.a.delete,onClick:function(){return _(r.id)}},"\u5220\u9664")),N.a.createElement("div",{className:H.a.content},N.a.createElement("div",{className:H.a.titleWrap,style:{justifyContent:"space-between"}},N.a.createElement(L.a,{className:H.a.titleHtml,value:ie(r,l)+((r==null?void 0:r.item_type)==="combination"?"\uFF08\u9898\u5E72\uFF09":"")+(r.name||(r==null?void 0:r.shixun_name))}),(r==null?void 0:r.item_type)==="combination"&&!n&&N.a.createElement("span",{onClick:function(me){m(!w)},style:{textAlign:"end",flexShrink:0}},w?"\u5C55\u5F00":"\u6536\u8D77")),q()))};Be.a=R},NvD2:function(wt,Be,G){"use strict";G.d(Be,"a",function(){return L});var Ae=G("Kwbf");function z($,H){var e=new Set;return $.forEach(function(R){H.has(R)||e.add(R)}),e}function U($){var H=$||{},e=H.disabled,R=H.disableCheckbox,u=H.checkable;return!!(e||R)||u===!1}function V($,H,e,R){for(var u=new Set($),f=new Set,l=0;l<=e;l+=1){var s=H.get(l)||new Set;s.forEach(function(a){var n=a.key,t=a.node,E=a.children,b=E===void 0?[]:E;u.has(n)&&!R(t)&&b.filter(function(_){return!R(_.node)}).forEach(function(_){u.add(_.key)})})}for(var i=new Set,o=e;o>=0;o-=1){var r=H.get(o)||new Set;r.forEach(function(a){var n=a.parent,t=a.node;if(R(t)||!a.parent||i.has(a.parent.key))return;if(R(a.parent.node)){i.add(n.key);return}var E=!0,b=!1;(n.children||[]).filter(function(_){return!R(_.node)}).forEach(function(_){var B=_.key,x=u.has(B);E&&!x&&(E=!1),!b&&(x||f.has(B))&&(b=!0)}),E&&u.add(n.key),b&&f.add(n.key),i.add(n.key)})}return{checkedKeys:Array.from(u),halfCheckedKeys:Array.from(z(f,u))}}function N($,H,e,R,u){for(var f=new Set($),l=new Set(H),s=0;s<=R;s+=1){var i=e.get(s)||new Set;i.forEach(function(n){var t=n.key,E=n.node,b=n.children,_=b===void 0?[]:b;!f.has(t)&&!l.has(t)&&!u(E)&&_.filter(function(B){return!u(B.node)}).forEach(function(B){f.delete(B.key)})})}l=new Set;for(var o=new Set,r=R;r>=0;r-=1){var a=e.get(r)||new Set;a.forEach(function(n){var t=n.parent,E=n.node;if(u(E)||!n.parent||o.has(n.parent.key))return;if(u(n.parent.node)){o.add(t.key);return}var b=!0,_=!1;(t.children||[]).filter(function(B){return!u(B.node)}).forEach(function(B){var x=B.key,h=f.has(x);b&&!h&&(b=!1),!_&&(h||l.has(x))&&(_=!0)}),b||f.delete(t.key),_&&l.add(t.key),o.add(t.key)})}return{checkedKeys:Array.from(f),halfCheckedKeys:Array.from(z(l,f))}}function L($,H,e,R){var u=[],f;R?f=R:f=U;var l=new Set($.filter(function(r){var a=!!e[r];return a||u.push(r),a})),s=new Map,i=0;Object.keys(e).forEach(function(r){var a=e[r],n=a.level,t=s.get(n);t||(t=new Set,s.set(n,t)),t.add(a),i=Math.max(i,n)}),Object(Ae.a)(!u.length,"Tree missing follow keys: ".concat(u.slice(0,100).map(function(r){return"'".concat(r,"'")}).join(", ")));var o;return H===!0?o=V(l,s,i,f):o=N(l,H.halfCheckedKeys,s,i,f),o}},ORPY:function(wt,Be,G){wt.exports={sendToClass:"sendToClass___2FQ8x"}},OZM5:function(wt,Be,G){"use strict";G.d(Be,"b",function(){return R}),G.d(Be,"a",function(){return u}),G.d(Be,"k",function(){return f}),G.d(Be,"h",function(){return l}),G.d(Be,"i",function(){return s}),G.d(Be,"g",function(){return i}),G.d(Be,"c",function(){return o}),G.d(Be,"d",function(){return r}),G.d(Be,"j",function(){return t}),G.d(Be,"e",function(){return E}),G.d(Be,"f",function(){return b});var Ae=G("KQm4"),z=G("U8pU"),U=G("Ff2n"),V=G("q1tI"),N=G.n(V),L=G("Kwbf"),$=G("WaYH"),H=.25,e=2;function R(_,B){var x=_.slice(),h=x.indexOf(B);return h>=0&&x.splice(h,1),x}function u(_,B){var x=_.slice();return x.indexOf(B)===-1&&x.push(B),x}function f(_){return _.split("-")}function l(_,B){return"".concat(_,"-").concat(B)}function s(_){return _&&_.type&&_.type.isTreeNode}function i(_,B){var x=[_],h=B[_];function d(){var A=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];A.forEach(function(c){var w=c.key,m=c.children;x.push(w),d(m)})}return d(h.children),x}function o(_,B){var x=_.clientY,h=B.selectHandle.getBoundingClientRect(),d=h.top,A=h.bottom,c=h.height,w=Math.max(c*H,e);return x<=d+w?-1:x>=A-w?1:0}function r(_,B){if(!_)return;var x=B.multiple;return x?_.slice():_.length?[_[0]]:_}var a=function(B){return B};function n(_,B){if(!_)return[];var x=B||{},h=x.processProps,d=h===void 0?a:h,A=Array.isArray(_)?_:[_];return A.map(function(c){var w=c.children,m=Object(U.a)(c,["children"]),g=n(w,B);return N.a.createElement($.a,Object.assign({},d(m)),g)})}function t(_){if(!_)return null;var B;if(Array.isArray(_))B={checkedKeys:_,halfCheckedKeys:void 0};else if(Object(z.a)(_)==="object")B={checkedKeys:_.checked||void 0,halfCheckedKeys:_.halfChecked||void 0};else return Object(L.a)(!1,"`checkedKeys` is not an array or an object"),null;return B}function E(_,B){var x=new Set;function h(d){if(x.has(d))return;var A=B[d];if(!A)return;x.add(d);var c=A.parent,w=A.node;if(w.disabled)return;c&&h(c.key)}return(_||[]).forEach(function(d){h(d)}),Object(Ae.a)(x)}function b(_){var B={};return Object.keys(_).forEach(function(x){(x.startsWith("data-")||x.startsWith("aria-"))&&(B[x]=_[x])}),B}},PEfE:function(wt,Be,G){wt.exports={title:"title___316_5",radioWrap:"radioWrap___2b58p",row:"row___3Y_zu",radio:"radio___3wz7l",colorFF0000:"colorFF0000___3JfbP",pagination:"pagination___3UF9N",modalColumn:"modalColumn___2C76i",modalRow:"modalRow___3eIQ6",sup:"sup___1b5Qg"}},"SA+Z":function(wt,Be,G){var Ae=G("wTVA"),z=G("EbDI"),U=G("ZhPi"),V=G("wkBT");function N(L){return Ae(L)||z(L)||U(L)||V()}wt.exports=N,wt.exports.__esModule=!0,wt.exports.default=wt.exports},SJMd:function(wt,Be){/**
|
|
* @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 G,Ae,z,U=!1,V,N;window.PR_SHOULD_USE_CONTINUATION=!0;var L,$;(function(){var H=window,e=["break,continue,do,else,for,if,return,while"],R=[e,"auto,case,char,const,default,double,enum,extern,float,goto,inline,int,long,register,restrict,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"],u=[R,"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],f=[u,"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"],l=[u,"abstract,assert,boolean,byte,extends,finally,final,implements,import,instanceof,interface,null,native,package,strictfp,super,synchronized,throws,transient"],s=[u,"abstract,add,alias,as,ascending,async,await,base,bool,by,byte,checked,decimal,delegate,descending,dynamic,event,finally,fixed,foreach,from,get,global,group,implicit,in,interface,internal,into,is,join,let,lock,null,object,out,override,orderby,params,partial,readonly,ref,remove,sbyte,sealed,select,set,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,value,var,virtual,where,yield"],i="all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,throw,true,try,unless,until,when,while,yes",o=[u,"abstract,async,await,constructor,debugger,enum,eval,export,function,get,implements,instanceof,interface,let,null,set,undefined,var,with,yield,Infinity,NaN"],r="caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END",a=[e,"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"],n=[e,"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"],t=[e,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],E=[f,s,l,o,r,a,n,t],b=/^(DIR|FILE|array|vector|(de|priority_)?queue|(forward_)?list|stack|(const_)?(reverse_)?iterator|(unordered_)?(multi)?(set|map)|bitset|u?(int|float)\d*)\b/,_="str",B="kwd",x="com",h="typ",d="lit",A="pun",c="pln",w="tag",m="dec",g="src",F="atn",k="atv",S="nocode",Q="(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<<?=?|>>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";function X(le){for(var Z=0,te=!1,ee=!1,ue=0,ye=le.length;ue<ye;++ue){var ve=le[ue];if(ve.ignoreCase)ee=!0;else if(/[a-z]/i.test(ve.source.replace(/\\u[0-9a-f]{4}|\\x[0-9a-f]{2}|\\[^ux]/gi,""))){te=!0,ee=!1;break}}var Je={b:8,t:9,n:10,v:11,f:12,r:13};function tt(He){var Xe=He.charCodeAt(0);if(Xe!==92)return Xe;var at=He.charAt(1);return Xe=Je[at],Xe||("0"<=at&&at<="7"?parseInt(He.substring(1),8):at==="u"||at==="x"?parseInt(He.substring(2),16):He.charCodeAt(1))}function it(He){if(He<32)return(He<16?"\\x0":"\\x")+He.toString(16);var Xe=String.fromCharCode(He);return Xe==="\\"||Xe==="-"||Xe==="]"||Xe==="^"?"\\"+Xe:Xe}function st(He){var Xe=He.substring(1,He.length-1).match(new RegExp("\\\\u[0-9A-Fa-f]{4}|\\\\x[0-9A-Fa-f]{2}|\\\\[0-3][0-7]{0,2}|\\\\[0-7]{1,2}|\\\\[\\s\\S]|-|[^-\\\\]","g")),at=[],ut=Xe[0]==="^",$e=["["];ut&&$e.push("^");for(var qe=ut?1:0,De=Xe.length;qe<De;++qe){var xe=Xe[qe];if(/\\[bdsw]/i.test(xe))$e.push(xe);else{var Se=tt(xe),oe;qe+2<De&&Xe[qe+1]==="-"?(oe=tt(Xe[qe+2]),qe+=2):oe=Se,at.push([Se,oe]),oe<65||Se>122||(oe<65||Se>90||at.push([Math.max(65,Se)|32,Math.min(oe,90)|32]),oe<97||Se>122||at.push([Math.max(97,Se)&~32,Math.min(oe,122)&~32]))}}at.sort(function(Ge,et){return Ge[0]-et[0]||et[1]-Ge[1]});for(var ce=[],Ee=[],qe=0;qe<at.length;++qe){var Ce=at[qe];Ce[0]<=Ee[1]+1?Ee[1]=Math.max(Ee[1],Ce[1]):ce.push(Ee=Ce)}for(var qe=0;qe<ce.length;++qe){var Ce=ce[qe];$e.push(it(Ce[0])),Ce[1]>Ce[0]&&(Ce[1]+1>Ce[0]&&$e.push("-"),$e.push(it(Ce[1])))}return $e.push("]"),$e.join("")}function ht(He){for(var Xe=He.source.match(new RegExp("(?:\\[(?:[^\\x5C\\x5D]|\\\\[\\s\\S])*\\]|\\\\u[A-Fa-f0-9]{4}|\\\\x[A-Fa-f0-9]{2}|\\\\[0-9]+|\\\\[^ux0-9]|\\(\\?[:!=]|[\\(\\)\\^]|[^\\x5B\\x5C\\(\\)\\^]+)","g")),at=Xe.length,ut=[],$e=0,qe=0;$e<at;++$e){var De=Xe[$e];if(De==="(")++qe;else if(De.charAt(0)==="\\"){var xe=+De.substring(1);xe&&(xe<=qe?ut[xe]=-1:Xe[$e]=it(xe))}}for(var $e=1;$e<ut.length;++$e)ut[$e]===-1&&(ut[$e]=++Z);for(var $e=0,qe=0;$e<at;++$e){var De=Xe[$e];if(De==="(")++qe,ut[qe]||(Xe[$e]="(?:");else if(De.charAt(0)==="\\"){var xe=+De.substring(1);xe&&xe<=qe&&(Xe[$e]="\\"+ut[xe])}}for(var $e=0;$e<at;++$e)Xe[$e]==="^"&&Xe[$e+1]!=="^"&&(Xe[$e]="");if(He.ignoreCase&&te)for(var $e=0;$e<at;++$e){var De=Xe[$e],Se=De.charAt(0);De.length>=2&&Se==="["?Xe[$e]=st(De):Se!=="\\"&&(Xe[$e]=De.replace(/[a-zA-Z]/g,function(Ee){var Ce=Ee.charCodeAt(0);return"["+String.fromCharCode(Ce&~32,Ce|32)+"]"}))}return Xe.join("")}for(var _t=[],ue=0,ye=le.length;ue<ye;++ue){var ve=le[ue];if(ve.global||ve.multiline)throw new Error(""+ve);_t.push("(?:"+ht(ve)+")")}return new RegExp(_t.join("|"),ee?"gi":"g")}function P(le,Z){var te=/(?:^|\s)nocode(?:\s|$)/,ee=[],ue=0,ye=[],ve=0;function Je(tt){var it=tt.nodeType;if(it==1){if(te.test(tt.className))return;for(var st=tt.firstChild;st;st=st.nextSibling)Je(st);var ht=tt.nodeName.toLowerCase();(ht==="br"||ht==="li")&&(ee[ve]=`
|
|
`,ye[ve<<1]=ue++,ye[ve++<<1|1]=tt)}else if(it==3||it==4){var _t=tt.nodeValue;_t.length&&(Z?_t=_t.replace(/\r\n?/g,`
|
|
`):_t=_t.replace(/[ \t\r\n]+/g," "),ee[ve]=_t,ye[ve<<1]=ue,ue+=_t.length,ye[ve++<<1|1]=tt)}}return Je(le),{sourceCode:ee.join("").replace(/\n$/,""),spans:ye}}function q(le,Z,te,ee,ue){if(!te)return;var ye={sourceNode:le,pre:1,langExtension:null,numberLines:null,sourceCode:te,spans:null,basePos:Z,decorations:null};ee(ye),ue.push.apply(ue,ye.decorations)}var ie=/\S/;function be(le){for(var Z=void 0,te=le.firstChild;te;te=te.nextSibling){var ee=te.nodeType;Z=ee===1?Z?le:te:ee===3&&ie.test(te.nodeValue)?le:Z}return Z===le?void 0:Z}function me(le,Z){var te={},ee;(function(){for(var ve=le.concat(Z),Je=[],tt={},it=0,st=ve.length;it<st;++it){var ht=ve[it],_t=ht[3];if(_t)for(var He=_t.length;--He>=0;)te[_t.charAt(He)]=ht;var Xe=ht[1],at=""+Xe;tt.hasOwnProperty(at)||(Je.push(Xe),tt[at]=null)}Je.push(/[\0-\uffff]/),ee=X(Je)})();var ue=Z.length,ye=function(ve){for(var Je=ve.sourceCode,tt=ve.basePos,it=ve.sourceNode,st=[tt,c],ht=0,_t=Je.match(ee)||[],He={},Xe=0,at=_t.length;Xe<at;++Xe){var ut=_t[Xe],$e=He[ut],qe=void 0,De;if(typeof $e=="string")De=!1;else{var xe=te[ut.charAt(0)];if(xe)qe=ut.match(xe[1]),$e=xe[0];else{for(var Se=0;Se<ue;++Se)if(xe=Z[Se],qe=ut.match(xe[1]),qe){$e=xe[0];break}qe||($e=c)}De=$e.length>=5&&$e.substring(0,5)==="lang-",De&&!(qe&&typeof qe[1]=="string")&&(De=!1,$e=g),De||(He[ut]=$e)}var oe=ht;if(ht+=ut.length,!De)st.push(tt+oe,$e);else{var ce=qe[1],Ee=ut.indexOf(ce),Ce=Ee+ce.length;qe[2]&&(Ce=ut.length-qe[2].length,Ee=Ce-ce.length);var Ge=$e.substring(5);q(it,tt+oe,ut.substring(0,Ee),ye,st),q(it,tt+oe+Ee,ce,Te(Ge,ce),st),q(it,tt+oe+Ce,ut.substring(Ce),ye,st)}}ve.decorations=st};return ye}function Me(le){var Z=[],te=[];le.tripleQuotedStrings?Z.push([_,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,`'"`]):le.multiLineStrings?Z.push([_,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"]):Z.push([_,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,`"'`]),le.verbatimStrings&&te.push([_,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null]);var ee=le.hashComments;ee&&(le.cStyleComments?(ee>1?Z.push([x,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"]):Z.push([x,/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"]),te.push([_,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,null])):Z.push([x,/^#[^\r\n]*/,null,"#"])),le.cStyleComments&&(te.push([x,/^\/\/[^\r\n]*/,null]),te.push([x,/^\/\*[\s\S]*?(?:\*\/|$)/,null]));var ue=le.regexLiterals;if(ue){var ye=ue>1?"":`
|
|
\r`,ve=ye?".":"[\\S\\s]",Je="/(?=[^/*"+ye+"])(?:[^/\\x5B\\x5C"+ye+"]|\\x5C"+ve+"|\\x5B(?:[^\\x5C\\x5D"+ye+"]|\\x5C"+ve+")*(?:\\x5D|$))+/";te.push(["lang-regex",RegExp("^"+Q+"("+Je+")")])}var tt=le.types;tt&&te.push([h,tt]);var it=(""+le.keywords).replace(/^ | $/g,"");it.length&&te.push([B,new RegExp("^(?:"+it.replace(/[\s,]+/g,"|")+")\\b"),null]),Z.push([c,/^\s+/,null,` \r
|
|
\xA0`]);var st="^.[^\\s\\w.$@'\"`/\\\\]*";return le.regexLiterals&&(st+="(?!s*/)"),te.push([d,/^@[a-z_$][a-z_$@0-9]*/i,null],[h,/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],[c,/^[a-z_$][a-z_$@0-9]*/i,null],[d,new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*","i"),null,"0123456789"],[c,/^\\[\s\S]?/,null],[A,new RegExp(st),null]),me(Z,te)}var Ne=Me({keywords:E,hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0});function ke(le,Z,te){for(var ee=/(?:^|\s)nocode(?:\s|$)/,ue=/\r\n?|\n/,ye=le.ownerDocument,ve=ye.createElement("li");le.firstChild;)ve.appendChild(le.firstChild);var Je=[ve];function tt(Xe){var at=Xe.nodeType;if(at==1&&!ee.test(Xe.className))if(Xe.nodeName==="br")it(Xe),Xe.parentNode&&Xe.parentNode.removeChild(Xe);else for(var ut=Xe.firstChild;ut;ut=ut.nextSibling)tt(ut);else if((at==3||at==4)&&te){var $e=Xe.nodeValue,qe=$e.match(ue);if(qe){var De=$e.substring(0,qe.index);Xe.nodeValue=De;var xe=$e.substring(qe.index+qe[0].length);if(xe){var Se=Xe.parentNode;Se.insertBefore(ye.createTextNode(xe),Xe.nextSibling)}it(Xe),De||Xe.parentNode.removeChild(Xe)}}}function it(Xe){for(;!Xe.nextSibling;)if(Xe=Xe.parentNode,!Xe)return;function at(qe,De){var xe=De?qe.cloneNode(!1):qe,Se=qe.parentNode;if(Se){var oe=at(Se,1),ce=qe.nextSibling;oe.appendChild(xe);for(var Ee=ce;Ee;Ee=ce)ce=Ee.nextSibling,oe.appendChild(Ee)}return xe}for(var ut=at(Xe.nextSibling,0),$e;($e=ut.parentNode)&&$e.nodeType===1;)ut=$e;Je.push(ut)}for(var st=0;st<Je.length;++st)tt(Je[st]);Z===(Z|0)&&Je[0].setAttribute("value",Z);var ht=ye.createElement("ol");ht.className="linenums";for(var _t=Math.max(0,Z-1|0)||0,st=0,He=Je.length;st<He;++st)ve=Je[st],ve.className="L"+(st+_t)%10,ve.firstChild||ve.appendChild(ye.createTextNode("\xA0")),ht.appendChild(ve);le.appendChild(ht)}function Ke(le){var Z=/\bMSIE\s(\d+)/.exec(navigator.userAgent);Z=Z&&+Z[1]<=8;var te=/\n/g,ee=le.sourceCode,ue=ee.length,ye=0,ve=le.spans,Je=ve.length,tt=0,it=le.decorations,st=it.length,ht=0;it[st]=ue;var _t,He;for(He=_t=0;He<st;)it[He]!==it[He+2]?(it[_t++]=it[He++],it[_t++]=it[He++]):He+=2;for(st=_t,He=_t=0;He<st;){for(var Xe=it[He],at=it[He+1],ut=He+2;ut+2<=st&&it[ut+1]===at;)ut+=2;it[_t++]=Xe,it[_t++]=at,He=ut}st=it.length=_t;var $e=le.sourceNode,qe="";$e&&(qe=$e.style.display,$e.style.display="none");try{for(var De=null;tt<Je;){var xe=ve[tt],Se=ve[tt+2]||ue,oe=it[ht+2]||ue,ut=Math.min(Se,oe),ce=ve[tt+1],Ee;if(ce.nodeType!==1&&(Ee=ee.substring(ye,ut))){Z&&(Ee=Ee.replace(te,"\r")),ce.nodeValue=Ee;var Ce=ce.ownerDocument,Ge=Ce.createElement("span");Ge.className=it[ht+1];var et=ce.parentNode;et.replaceChild(Ge,ce),Ge.appendChild(ce),ye<Se&&(ve[tt+1]=ce=Ce.createTextNode(ee.substring(ut,Se)),et.insertBefore(ce,Ge.nextSibling))}ye=ut,ye>=Se&&(tt+=2),ye>=oe&&(ht+=2)}}finally{$e&&($e.style.display=qe)}}var Ye={};function _e(le,Z){for(var te=Z.length;--te>=0;){var ee=Z[te];Ye.hasOwnProperty(ee)?H.console&&console.warn("cannot override language handler %s",ee):Ye[ee]=le}}function Te(le,Z){return le&&Ye.hasOwnProperty(le)||(le=/^\s*</.test(Z)?"default-markup":"default-code"),Ye[le]}_e(Ne,["default-code"]),_e(me([],[[c,/^[^<?]+/],[m,/^<!\w[^>]*(?:>|$)/],[x,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[A,/^(?:<[%?]|[%?]>)/],["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"]),_e(me([[c,/^[\s]+/,null,` \r
|
|
`],[k,/^(?:\"[^\"]*\"?|\'[^\']*\'?)/,null,`"'`]],[[w,/^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],[F,/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],[A,/^[=<>\/]+/],["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"]),_e(me([],[[k,/^[\s\S]+/]]),["uq.val"]),_e(Me({keywords:f,hashComments:!0,cStyleComments:!0,types:b}),["c","cc","cpp","cxx","cyc","m"]),_e(Me({keywords:"null,true,false"}),["json"]),_e(Me({keywords:s,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:b}),["cs"]),_e(Me({keywords:l,cStyleComments:!0}),["java"]),_e(Me({keywords:t,hashComments:!0,multiLineStrings:!0}),["bash","bsh","csh","sh"]),_e(Me({keywords:a,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),["cv","py","python"]),_e(Me({keywords:r,hashComments:!0,multiLineStrings:!0,regexLiterals:2}),["perl","pl","pm"]),_e(Me({keywords:n,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb","ruby"]),_e(Me({keywords:o,cStyleComments:!0,regexLiterals:!0}),["javascript","js","ts","typescript"]),_e(Me({keywords:i,hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]),_e(me([],[[_,/^[\s\S]+/]]),["regex"]);function Pe(le){var Z=le.langExtension;try{var te=P(le.sourceNode,le.pre),ee=te.sourceCode;le.sourceCode=ee,le.spans=te.spans,le.basePos=0,Te(Z,ee)(le),Ke(le)}catch(ue){H.console&&console.log(ue&&ue.stack||ue)}}function bt(le,Z,te){var ee=te||!1,ue=Z||null,ye=document.createElement("div");ye.innerHTML="<pre>"+le+"</pre>",ye=ye.firstChild,ee&&ke(ye,ee,!0);var ve={langExtension:ue,numberLines:ee,sourceNode:ye,pre:1,sourceCode:null,basePos:null,spans:null,decorations:null};return Pe(ve),ye.innerHTML}function mt(le,Z){var te=Z||document.body,ee=te.ownerDocument||document;function ue(xe){return te.getElementsByTagName(xe)}for(var ye=[ue("pre"),ue("code"),ue("xmp")],ve=[],Je=0;Je<ye.length;++Je)for(var tt=0,it=ye[Je].length;tt<it;++tt)ve.push(ye[Je][tt]);ye=null;var st=Date;st.now||(st={now:function(){return+new Date}});var ht=0,_t=/\blang(?:uage)?-([\w.]+)(?!\S)/,He=/\bprettyprint\b/,Xe=/\bprettyprinted\b/,at=/pre|xmp/i,ut=/^code$/i,$e=/^(?:pre|code|xmp)$/i,qe={};function De(){for(var xe=H.PR_SHOULD_USE_CONTINUATION?st.now()+250:Infinity;ht<ve.length&&st.now()<xe;ht++){for(var Se=ve[ht],oe=qe,ce=Se;ce=ce.previousSibling;){var Ee=ce.nodeType,Ce=(Ee===7||Ee===8)&&ce.nodeValue;if(Ce?!/^\??prettify\b/.test(Ce):Ee!==3||/\S/.test(ce.nodeValue))break;if(Ce){oe={},Ce.replace(/\b(\w+)=([\w:.%+-]+)/g,function(ar,zt,nr){oe[zt]=nr});break}}var Ge=Se.className;if((oe!==qe||He.test(Ge))&&!Xe.test(Ge)){for(var et=!1,pt=Se.parentNode;pt;pt=pt.parentNode){var Bt=pt.tagName;if($e.test(Bt)&&pt.className&&He.test(pt.className)){et=!0;break}}if(!et){Se.className+=" prettyprinted";var Dt=oe.lang;if(!Dt){Dt=Ge.match(_t);var xt;!Dt&&(xt=be(Se))&&ut.test(xt.tagName)&&(Dt=xt.className.match(_t)),Dt&&(Dt=Dt[1])}var tr;if(at.test(Se.tagName))tr=1;else{var Xt=Se.currentStyle,gt=ee.defaultView,Mt=Xt?Xt.whiteSpace:gt&>.getComputedStyle?gt.getComputedStyle(Se,null).getPropertyValue("white-space"):0;tr=Mt&&Mt.substring(0,3)==="pre"}var Jt=oe.linenums;(Jt=Jt==="true"||+Jt)||(Jt=Ge.match(/\blinenums\b(?::(\d+))?/),Jt=Jt?Jt[1]&&Jt[1].length?+Jt[1]:!0:!1),Jt&&ke(Se,Jt,tr);var Lt={langExtension:Dt,sourceNode:Se,numberLines:Jt,pre:tr,sourceCode:null,basePos:null,spans:null,decorations:null};Pe(Lt)}}}ht<ve.length?H.setTimeout(De,250):typeof le=="function"&&le()}De()}var dt=H.PR={createSimpleLexer:me,registerLangHandler:_e,sourceDecorator:Me,PR_ATTRIB_NAME:F,PR_ATTRIB_VALUE:k,PR_COMMENT:x,PR_DECLARATION:m,PR_KEYWORD:B,PR_LITERAL:d,PR_NOCODE:S,PR_PLAIN:c,PR_PUNCTUATION:A,PR_SOURCE:g,PR_STRING:_,PR_TAG:w,PR_TYPE:h,prettyPrintOne:U?H.prettyPrintOne=bt:L=bt,prettyPrint:$=U?H.prettyPrint=mt:$=mt},yt=H.define;typeof yt=="function"&&yt.amd&&yt("google-code-prettify",[],function(){return dt})})()},T8No:function(wt,Be,G){"use strict";G.d(Be,"a",function(){return $}),G.d(Be,"e",function(){return H}),G.d(Be,"c",function(){return A}),G.d(Be,"b",function(){return c}),G.d(Be,"d",function(){return w}),G.d(Be,"f",function(){return F});var Ae=G("MNsG"),z=G("N0LK"),U=G("Cg/j");let V=Ae.k||"";const N=new Map;N.set("false",!1),N.set("true",!0),N.set("isMac",Ae.f),N.set("isLinux",Ae.d),N.set("isWindows",Ae.i),N.set("isWeb",Ae.h),N.set("isMacNative",Ae.f&&!Ae.h),N.set("isEdge",V.indexOf("Edg/")>=0),N.set("isFirefox",V.indexOf("Firefox")>=0),N.set("isChrome",V.indexOf("Chrome")>=0),N.set("isSafari",V.indexOf("Safari")>=0);const L=Object.prototype.hasOwnProperty;class ${static has(S){return f.create(S)}static equals(S,Q){return l.create(S,Q)}static regex(S,Q){return _.create(S,Q)}static not(S){return r.create(S)}static and(...S){return h.create(S,null)}static or(...S){return d.create(S,null,!0)}static deserialize(S,Q=!1){return S?this._deserializeOrExpression(S,Q):void 0}static _deserializeOrExpression(S,Q){let X=S.split("||");return d.create(X.map(P=>this._deserializeAndExpression(P,Q)),null,!0)}static _deserializeAndExpression(S,Q){let X=S.split("&&");return h.create(X.map(P=>this._deserializeOne(P,Q)),null)}static _deserializeOne(S,Q){if(S=S.trim(),S.indexOf("!=")>=0){let X=S.split("!=");return o.create(X[0].trim(),this._deserializeValue(X[1],Q))}if(S.indexOf("==")>=0){let X=S.split("==");return l.create(X[0].trim(),this._deserializeValue(X[1],Q))}if(S.indexOf("=~")>=0){let X=S.split("=~");return _.create(X[0].trim(),this._deserializeRegexValue(X[1],Q))}if(S.indexOf(" in ")>=0){let X=S.split(" in ");return s.create(X[0].trim(),X[1].trim())}if(/^[^<=>]+>=[^<=>]+$/.test(S)){const X=S.split(">=");return t.create(X[0].trim(),X[1].trim())}if(/^[^<=>]+>[^<=>]+$/.test(S)){const X=S.split(">");return n.create(X[0].trim(),X[1].trim())}if(/^[^<=>]+<=[^<=>]+$/.test(S)){const X=S.split("<=");return b.create(X[0].trim(),X[1].trim())}if(/^[^<=>]+<[^<=>]+$/.test(S)){const X=S.split("<");return E.create(X[0].trim(),X[1].trim())}return/^\!\s*/.test(S)?r.create(S.substr(1).trim()):f.create(S)}static _deserializeValue(S,Q){if(S=S.trim(),S==="true")return!0;if(S==="false")return!1;let X=/^'([^']*)'$/.exec(S);return X?X[1].trim():S}static _deserializeRegexValue(S,Q){if(Object(z.C)(S)){if(Q)throw new Error("missing regexp-value for =~-expression");return console.warn("missing regexp-value for =~-expression"),null}let X=S.indexOf("/"),P=S.lastIndexOf("/");if(X===P||X<0){if(Q)throw new Error(`bad regexp-value '${S}', missing /-enclosure`);return console.warn(`bad regexp-value '${S}', missing /-enclosure`),null}let q=S.slice(X+1,P),ie=S[P+1]==="i"?"i":"";try{return new RegExp(q,ie)}catch(be){if(Q)throw new Error(`bad regexp-value '${S}', parse error: ${be}`);return console.warn(`bad regexp-value '${S}', parse error: ${be}`),null}}}function H(S,Q){const X=S?S.substituteConstants():void 0,P=Q?Q.substituteConstants():void 0;return!X&&!P?!0:!X||!P?!1:X.equals(P)}function e(S,Q){return S.cmp(Q)}class R{constructor(){this.type=0}cmp(S){return this.type-S.type}equals(S){return S.type===this.type}substituteConstants(){return this}evaluate(S){return!1}serialize(){return"false"}keys(){return[]}negate(){return u.INSTANCE}}R.INSTANCE=new R;class u{constructor(){this.type=1}cmp(S){return this.type-S.type}equals(S){return S.type===this.type}substituteConstants(){return this}evaluate(S){return!0}serialize(){return"true"}keys(){return[]}negate(){return R.INSTANCE}}u.INSTANCE=new u;class f{constructor(S,Q){this.key=S,this.negated=Q,this.type=2}static create(S,Q=null){const X=N.get(S);return typeof X=="boolean"?X?u.INSTANCE:R.INSTANCE:new f(S,Q)}cmp(S){return S.type!==this.type?this.type-S.type:m(this.key,S.key)}equals(S){return S.type===this.type?this.key===S.key:!1}substituteConstants(){const S=N.get(this.key);return typeof S=="boolean"?S?u.INSTANCE:R.INSTANCE:this}evaluate(S){return!!S.getValue(this.key)}serialize(){return this.key}keys(){return[this.key]}negate(){return this.negated||(this.negated=r.create(this.key,this)),this.negated}}class l{constructor(S,Q,X){this.key=S,this.value=Q,this.negated=X,this.type=4}static create(S,Q,X=null){if(typeof Q=="boolean")return Q?f.create(S,X):r.create(S,X);const P=N.get(S);if(typeof P=="boolean"){const q=P?"true":"false";return Q===q?u.INSTANCE:R.INSTANCE}return new l(S,Q,X)}cmp(S){return S.type!==this.type?this.type-S.type:g(this.key,this.value,S.key,S.value)}equals(S){return S.type===this.type?this.key===S.key&&this.value===S.value:!1}substituteConstants(){const S=N.get(this.key);if(typeof S=="boolean"){const Q=S?"true":"false";return this.value===Q?u.INSTANCE:R.INSTANCE}return this}evaluate(S){return S.getValue(this.key)==this.value}serialize(){return`${this.key} == '${this.value}'`}keys(){return[this.key]}negate(){return this.negated||(this.negated=o.create(this.key,this.value,this)),this.negated}}class s{constructor(S,Q){this.key=S,this.valueKey=Q,this.type=10,this.negated=null}static create(S,Q){return new s(S,Q)}cmp(S){return S.type!==this.type?this.type-S.type:g(this.key,this.valueKey,S.key,S.valueKey)}equals(S){return S.type===this.type?this.key===S.key&&this.valueKey===S.valueKey:!1}substituteConstants(){return this}evaluate(S){const Q=S.getValue(this.valueKey),X=S.getValue(this.key);return Array.isArray(Q)?Q.indexOf(X)>=0:typeof X=="string"&&typeof Q=="object"&&Q!==null?L.call(Q,X):!1}serialize(){return`${this.key} in '${this.valueKey}'`}keys(){return[this.key,this.valueKey]}negate(){return this.negated||(this.negated=i.create(this)),this.negated}}class i{constructor(S){this._actual=S,this.type=11}static create(S){return new i(S)}cmp(S){return S.type!==this.type?this.type-S.type:this._actual.cmp(S._actual)}equals(S){return S.type===this.type?this._actual.equals(S._actual):!1}substituteConstants(){return this}evaluate(S){return!this._actual.evaluate(S)}serialize(){throw new Error("Method not implemented.")}keys(){return this._actual.keys()}negate(){return this._actual}}class o{constructor(S,Q,X){this.key=S,this.value=Q,this.negated=X,this.type=5}static create(S,Q,X=null){if(typeof Q=="boolean")return Q?r.create(S,X):f.create(S,X);const P=N.get(S);if(typeof P=="boolean"){const q=P?"true":"false";return Q===q?R.INSTANCE:u.INSTANCE}return new o(S,Q,X)}cmp(S){return S.type!==this.type?this.type-S.type:g(this.key,this.value,S.key,S.value)}equals(S){return S.type===this.type?this.key===S.key&&this.value===S.value:!1}substituteConstants(){const S=N.get(this.key);if(typeof S=="boolean"){const Q=S?"true":"false";return this.value===Q?R.INSTANCE:u.INSTANCE}return this}evaluate(S){return S.getValue(this.key)!=this.value}serialize(){return`${this.key} != '${this.value}'`}keys(){return[this.key]}negate(){return this.negated||(this.negated=l.create(this.key,this.value,this)),this.negated}}class r{constructor(S,Q){this.key=S,this.negated=Q,this.type=3}static create(S,Q=null){const X=N.get(S);return typeof X=="boolean"?X?R.INSTANCE:u.INSTANCE:new r(S,Q)}cmp(S){return S.type!==this.type?this.type-S.type:m(this.key,S.key)}equals(S){return S.type===this.type?this.key===S.key:!1}substituteConstants(){const S=N.get(this.key);return typeof S=="boolean"?S?R.INSTANCE:u.INSTANCE:this}evaluate(S){return!S.getValue(this.key)}serialize(){return`!${this.key}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=f.create(this.key,this)),this.negated}}function a(S,Q){if(typeof S=="string"){const X=parseFloat(S);isNaN(X)||(S=X)}return typeof S=="string"||typeof S=="number"?Q(S):R.INSTANCE}class n{constructor(S,Q,X){this.key=S,this.value=Q,this.negated=X,this.type=12}static create(S,Q,X=null){return a(Q,P=>new n(S,P,X))}cmp(S){return S.type!==this.type?this.type-S.type:g(this.key,this.value,S.key,S.value)}equals(S){return S.type===this.type?this.key===S.key&&this.value===S.value:!1}substituteConstants(){return this}evaluate(S){return typeof this.value=="string"?!1:parseFloat(S.getValue(this.key))>this.value}serialize(){return`${this.key} > ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=b.create(this.key,this.value,this)),this.negated}}class t{constructor(S,Q,X){this.key=S,this.value=Q,this.negated=X,this.type=13}static create(S,Q,X=null){return a(Q,P=>new t(S,P,X))}cmp(S){return S.type!==this.type?this.type-S.type:g(this.key,this.value,S.key,S.value)}equals(S){return S.type===this.type?this.key===S.key&&this.value===S.value:!1}substituteConstants(){return this}evaluate(S){return typeof this.value=="string"?!1:parseFloat(S.getValue(this.key))>=this.value}serialize(){return`${this.key} >= ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=E.create(this.key,this.value,this)),this.negated}}class E{constructor(S,Q,X){this.key=S,this.value=Q,this.negated=X,this.type=14}static create(S,Q,X=null){return a(Q,P=>new E(S,P,X))}cmp(S){return S.type!==this.type?this.type-S.type:g(this.key,this.value,S.key,S.value)}equals(S){return S.type===this.type?this.key===S.key&&this.value===S.value:!1}substituteConstants(){return this}evaluate(S){return typeof this.value=="string"?!1:parseFloat(S.getValue(this.key))<this.value}serialize(){return`${this.key} < ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=t.create(this.key,this.value,this)),this.negated}}class b{constructor(S,Q,X){this.key=S,this.value=Q,this.negated=X,this.type=15}static create(S,Q,X=null){return a(Q,P=>new b(S,P,X))}cmp(S){return S.type!==this.type?this.type-S.type:g(this.key,this.value,S.key,S.value)}equals(S){return S.type===this.type?this.key===S.key&&this.value===S.value:!1}substituteConstants(){return this}evaluate(S){return typeof this.value=="string"?!1:parseFloat(S.getValue(this.key))<=this.value}serialize(){return`${this.key} <= ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=n.create(this.key,this.value,this)),this.negated}}class _{constructor(S,Q){this.key=S,this.regexp=Q,this.type=7,this.negated=null}static create(S,Q){return new _(S,Q)}cmp(S){if(S.type!==this.type)return this.type-S.type;if(this.key<S.key)return-1;if(this.key>S.key)return 1;const Q=this.regexp?this.regexp.source:"",X=S.regexp?S.regexp.source:"";return Q<X?-1:Q>X?1:0}equals(S){if(S.type===this.type){const Q=this.regexp?this.regexp.source:"",X=S.regexp?S.regexp.source:"";return this.key===S.key&&Q===X}return!1}substituteConstants(){return this}evaluate(S){let Q=S.getValue(this.key);return this.regexp?this.regexp.test(Q):!1}serialize(){const S=this.regexp?`/${this.regexp.source}/${this.regexp.ignoreCase?"i":""}`:"/invalid/";return`${this.key} =~ ${S}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=B.create(this)),this.negated}}class B{constructor(S){this._actual=S,this.type=8}static create(S){return new B(S)}cmp(S){return S.type!==this.type?this.type-S.type:this._actual.cmp(S._actual)}equals(S){return S.type===this.type?this._actual.equals(S._actual):!1}substituteConstants(){return this}evaluate(S){return!this._actual.evaluate(S)}serialize(){throw new Error("Method not implemented.")}keys(){return this._actual.keys()}negate(){return this._actual}}function x(S){let Q=null;for(let X=0,P=S.length;X<P;X++){const q=S[X].substituteConstants();if(S[X]!==q&&Q===null){Q=[];for(let ie=0;ie<X;ie++)Q[ie]=S[ie]}Q!==null&&(Q[X]=q)}return Q===null?S:Q}class h{constructor(S,Q){this.expr=S,this.negated=Q,this.type=6}static create(S,Q){return h._normalizeArr(S,Q)}cmp(S){if(S.type!==this.type)return this.type-S.type;if(this.expr.length<S.expr.length)return-1;if(this.expr.length>S.expr.length)return 1;for(let Q=0,X=this.expr.length;Q<X;Q++){const P=e(this.expr[Q],S.expr[Q]);if(P!==0)return P}return 0}equals(S){if(S.type===this.type){if(this.expr.length!==S.expr.length)return!1;for(let Q=0,X=this.expr.length;Q<X;Q++)if(!this.expr[Q].equals(S.expr[Q]))return!1;return!0}return!1}substituteConstants(){const S=x(this.expr);return S===this.expr?this:h.create(S,this.negated)}evaluate(S){for(let Q=0,X=this.expr.length;Q<X;Q++)if(!this.expr[Q].evaluate(S))return!1;return!0}static _normalizeArr(S,Q){const X=[];let P=!1;for(const q of S){if(!q)continue;if(q.type===1){P=!0;continue}if(q.type===0)return R.INSTANCE;if(q.type===6){X.push(...q.expr);continue}X.push(q)}if(X.length===0&&P)return u.INSTANCE;if(X.length===0)return;if(X.length===1)return X[0];X.sort(e);for(let q=1;q<X.length;q++)X[q-1].equals(X[q])&&(X.splice(q,1),q--);if(X.length===1)return X[0];for(;X.length>1;){const q=X[X.length-1];if(q.type!==9)break;X.pop();const ie=X.pop(),be=X.length===0,me=d.create(q.expr.map(Me=>h.create([Me,ie],null)),null,be);me&&(X.push(me),X.sort(e))}return X.length===1?X[0]:new h(X,Q)}serialize(){return this.expr.map(S=>S.serialize()).join(" && ")}keys(){const S=[];for(let Q of this.expr)S.push(...Q.keys());return S}negate(){if(!this.negated){const S=[];for(let Q of this.expr)S.push(Q.negate());this.negated=d.create(S,this,!0)}return this.negated}}class d{constructor(S,Q){this.expr=S,this.negated=Q,this.type=9}static create(S,Q,X){return d._normalizeArr(S,Q,X)}cmp(S){if(S.type!==this.type)return this.type-S.type;if(this.expr.length<S.expr.length)return-1;if(this.expr.length>S.expr.length)return 1;for(let Q=0,X=this.expr.length;Q<X;Q++){const P=e(this.expr[Q],S.expr[Q]);if(P!==0)return P}return 0}equals(S){if(S.type===this.type){if(this.expr.length!==S.expr.length)return!1;for(let Q=0,X=this.expr.length;Q<X;Q++)if(!this.expr[Q].equals(S.expr[Q]))return!1;return!0}return!1}substituteConstants(){const S=x(this.expr);return S===this.expr?this:d.create(S,this.negated,!1)}evaluate(S){for(let Q=0,X=this.expr.length;Q<X;Q++)if(this.expr[Q].evaluate(S))return!0;return!1}static _normalizeArr(S,Q,X){let P=[],q=!1;if(S){for(let ie=0,be=S.length;ie<be;ie++){const me=S[ie];if(!me)continue;if(me.type===0){q=!0;continue}if(me.type===1)return u.INSTANCE;if(me.type===9){P=P.concat(me.expr);continue}P.push(me)}if(P.length===0&&q)return R.INSTANCE;P.sort(e)}if(P.length===0)return;if(P.length===1)return P[0];for(let ie=1;ie<P.length;ie++)P[ie-1].equals(P[ie])&&(P.splice(ie,1),ie--);if(P.length===1)return P[0];if(X){for(let ie=0;ie<P.length;ie++)for(let be=ie+1;be<P.length;be++)F(P[ie],P[be])&&(P.splice(be,1),be--);if(P.length===1)return P[0]}return new d(P,Q)}serialize(){return this.expr.map(S=>S.serialize()).join(" || ")}keys(){const S=[];for(let Q of this.expr)S.push(...Q.keys());return S}negate(){if(!this.negated){let S=[];for(let Q of this.expr)S.push(Q.negate());for(;S.length>1;){const Q=S.shift(),X=S.shift(),P=[];for(const ie of k(Q))for(const be of k(X))P.push(h.create([ie,be],null));const q=S.length===0;S.unshift(d.create(P,null,q))}this.negated=S[0]}return this.negated}}class A extends f{constructor(S,Q,X){super(S,null);this._defaultValue=Q,typeof X=="object"?A._info.push(Object.assign(Object.assign({},X),{key:S})):X!==!0&&A._info.push({key:S,description:X,type:Q!=null?typeof Q:void 0})}static all(){return A._info.values()}bindTo(S){return S.createKey(this.key,this._defaultValue)}getValue(S){return S.getContextKeyValue(this.key)}toNegated(){return this.negate()}isEqualTo(S){return l.create(this.key,S)}}A._info=[];const c=Object(U.c)("contextKeyService"),w="setContext";function m(S,Q){return S<Q?-1:S>Q?1:0}function g(S,Q,X,P){return S<X?-1:S>X?1:Q<P?-1:Q>P?1:0}function F(S,Q){if(Q.type===6&&S.type!==9&&S.type!==6){for(const q of Q.expr)if(S.equals(q))return!0}const X=S.negate(),P=k(X).concat(k(Q));P.sort(e);for(let q=0;q<P.length;q++){const ie=P[q],be=ie.negate();for(let me=q+1;me<P.length;me++){const Me=P[me];if(be.equals(Me))return!0}}return!1}function k(S){return S.type===9?S.expr:[S]}},TXwP:function(wt,Be,G){var Ae,z;(function(){var U;(function(){"use strict";var N=[,,function(e){function R(l){this.__parent=l,this.__character_count=0,this.__indent_count=-1,this.__alignment_count=0,this.__wrap_point_index=0,this.__wrap_point_character_count=0,this.__wrap_point_indent_count=-1,this.__wrap_point_alignment_count=0,this.__items=[]}R.prototype.clone_empty=function(){var l=new R(this.__parent);return l.set_indent(this.__indent_count,this.__alignment_count),l},R.prototype.item=function(l){return l<0?this.__items[this.__items.length+l]:this.__items[l]},R.prototype.has_match=function(l){for(var s=this.__items.length-1;s>=0;s--)if(this.__items[s].match(l))return!0;return!1},R.prototype.set_indent=function(l,s){this.is_empty()&&(this.__indent_count=l||0,this.__alignment_count=s||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},R.prototype._set_wrap_point=function(){this.__parent.wrap_line_length&&(this.__wrap_point_index=this.__items.length,this.__wrap_point_character_count=this.__character_count,this.__wrap_point_indent_count=this.__parent.next_line.__indent_count,this.__wrap_point_alignment_count=this.__parent.next_line.__alignment_count)},R.prototype._should_wrap=function(){return this.__wrap_point_index&&this.__character_count>this.__parent.wrap_line_length&&this.__wrap_point_character_count>this.__parent.next_line.__character_count},R.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var l=this.__parent.current_line;return l.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),l.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),l.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,l.__items[0]===" "&&(l.__items.splice(0,1),l.__character_count-=1),!0}return!1},R.prototype.is_empty=function(){return this.__items.length===0},R.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},R.prototype.push=function(l){this.__items.push(l);var s=l.lastIndexOf(`
|
|
`);s!==-1?this.__character_count=l.length-s:this.__character_count+=l.length},R.prototype.pop=function(){var l=null;return this.is_empty()||(l=this.__items.pop(),this.__character_count-=l.length),l},R.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},R.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},R.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},R.prototype.toString=function(){var l="";return this.is_empty()?this.__parent.indent_empty_lines&&(l=this.__parent.get_indent_string(this.__indent_count)):(l=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),l+=this.__items.join("")),l};function u(l,s){this.__cache=[""],this.__indent_size=l.indent_size,this.__indent_string=l.indent_char,l.indent_with_tabs||(this.__indent_string=new Array(l.indent_size+1).join(l.indent_char)),s=s||"",l.indent_level>0&&(s=new Array(l.indent_level+1).join(this.__indent_string)),this.__base_string=s,this.__base_string_length=s.length}u.prototype.get_indent_size=function(l,s){var i=this.__base_string_length;return s=s||0,l<0&&(i=0),i+=l*this.__indent_size,i+=s,i},u.prototype.get_indent_string=function(l,s){var i=this.__base_string;return s=s||0,l<0&&(l=0,i=""),s+=l*this.__indent_size,this.__ensure_cache(s),i+=this.__cache[s],i},u.prototype.__ensure_cache=function(l){for(;l>=this.__cache.length;)this.__add_column()},u.prototype.__add_column=function(){var l=this.__cache.length,s=0,i="";this.__indent_size&&l>=this.__indent_size&&(s=Math.floor(l/this.__indent_size),l-=s*this.__indent_size,i=new Array(s+1).join(this.__indent_string)),l&&(i+=new Array(l+1).join(" ")),this.__cache.push(i)};function f(l,s){this.__indent_cache=new u(l,s),this.raw=!1,this._end_with_newline=l.end_with_newline,this.indent_size=l.indent_size,this.wrap_line_length=l.wrap_line_length,this.indent_empty_lines=l.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new R(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}f.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},f.prototype.get_line_number=function(){return this.__lines.length},f.prototype.get_indent_string=function(l,s){return this.__indent_cache.get_indent_string(l,s)},f.prototype.get_indent_size=function(l,s){return this.__indent_cache.get_indent_size(l,s)},f.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},f.prototype.add_new_line=function(l){return this.is_empty()||!l&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},f.prototype.get_code=function(l){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 l!==`
|
|
`&&(i=i.replace(/[\n]/g,l)),i},f.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},f.prototype.set_indent=function(l,s){return l=l||0,s=s||0,this.next_line.set_indent(l,s),this.__lines.length>1?(this.current_line.set_indent(l,s),!0):(this.current_line.set_indent(),!1)},f.prototype.add_raw_token=function(l){for(var s=0;s<l.newlines;s++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(l.whitespace_before),this.current_line.push(l.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},f.prototype.add_token=function(l){this.__add_space_before_token(),this.current_line.push(l),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=this.current_line._allow_wrap()},f.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(" "))},f.prototype.remove_indent=function(l){for(var s=this.__lines.length;l<s;)this.__lines[l]._remove_indent(),l++;this.current_line._remove_wrap_indent()},f.prototype.trim=function(l){for(l=l===void 0?!1:l,this.current_line.trim();l&&this.__lines.length>1&&this.current_line.is_empty();)this.__lines.pop(),this.current_line=this.__lines[this.__lines.length-1],this.current_line.trim();this.previous_line=this.__lines.length>1?this.__lines[this.__lines.length-2]:null},f.prototype.just_added_newline=function(){return this.current_line.is_empty()},f.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},f.prototype.ensure_empty_line_above=function(l,s){for(var i=this.__lines.length-2;i>=0;){var o=this.__lines[i];if(o.is_empty())break;if(o.item(0).indexOf(l)!==0&&o.item(-1)!==s){this.__lines.splice(i+1,0,new R(this)),this.previous_line=this.__lines[this.__lines.length-2];break}i--}},e.exports.Output=f},,,,function(e){function R(l,s){this.raw_options=u(l,s),this.disabled=this._get_boolean("disabled"),this.eol=this._get_characters("eol","auto"),this.end_with_newline=this._get_boolean("end_with_newline"),this.indent_size=this._get_number("indent_size",4),this.indent_char=this._get_characters("indent_char"," "),this.indent_level=this._get_number("indent_level"),this.preserve_newlines=this._get_boolean("preserve_newlines",!0),this.max_preserve_newlines=this._get_number("max_preserve_newlines",32786),this.preserve_newlines||(this.max_preserve_newlines=0),this.indent_with_tabs=this._get_boolean("indent_with_tabs",this.indent_char===" "),this.indent_with_tabs&&(this.indent_char=" ",this.indent_size===1&&(this.indent_size=4)),this.wrap_line_length=this._get_number("wrap_line_length",this._get_number("max_char")),this.indent_empty_lines=this._get_boolean("indent_empty_lines"),this.templating=this._get_selection_list("templating",["auto","none","django","erb","handlebars","php","smarty"],["auto"])}R.prototype._get_array=function(l,s){var i=this.raw_options[l],o=s||[];return typeof i=="object"?i!==null&&typeof i.concat=="function"&&(o=i.concat()):typeof i=="string"&&(o=i.split(/[^a-zA-Z0-9_\/\-]+/)),o},R.prototype._get_boolean=function(l,s){var i=this.raw_options[l],o=i===void 0?!!s:!!i;return o},R.prototype._get_characters=function(l,s){var i=this.raw_options[l],o=s||"";return typeof i=="string"&&(o=i.replace(/\\r/,"\r").replace(/\\n/,`
|
|
`).replace(/\\t/," ")),o},R.prototype._get_number=function(l,s){var i=this.raw_options[l];s=parseInt(s,10),isNaN(s)&&(s=0);var o=parseInt(i,10);return isNaN(o)&&(o=s),o},R.prototype._get_selection=function(l,s,i){var o=this._get_selection_list(l,s,i);if(o.length!==1)throw new Error("Invalid Option Value: The option '"+l+`' can only be one of the following values:
|
|
`+s+`
|
|
You passed in: '`+this.raw_options[l]+"'");return o[0]},R.prototype._get_selection_list=function(l,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 o=this._get_array(l,i);if(!this._is_valid_selection(o,s))throw new Error("Invalid Option Value: The option '"+l+`' can contain only the following values:
|
|
`+s+`
|
|
You passed in: '`+this.raw_options[l]+"'");return o},R.prototype._is_valid_selection=function(l,s){return l.length&&s.length&&!l.some(function(i){return s.indexOf(i)===-1})};function u(l,s){var i={};l=f(l);var o;for(o in l)o!==s&&(i[o]=l[o]);if(s&&l[s])for(o in l[s])i[o]=l[s][o];return i}function f(l){var s={},i;for(i in l){var o=i.replace(/-/g,"_");s[o]=l[i]}return s}e.exports.Options=R,e.exports.normalizeOpts=f,e.exports.mergeOpts=u},,function(e){var R=RegExp.prototype.hasOwnProperty("sticky");function u(f){this.__input=f||"",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 f=null;return this.hasNext()&&(f=this.__input.charAt(this.__position),this.__position+=1),f},u.prototype.peek=function(f){var l=null;return f=f||0,f+=this.__position,f>=0&&f<this.__input_length&&(l=this.__input.charAt(f)),l},u.prototype.__match=function(f,l){f.lastIndex=l;var s=f.exec(this.__input);return s&&!(R&&f.sticky)&&(s.index!==l&&(s=null)),s},u.prototype.test=function(f,l){return l=l||0,l+=this.__position,l>=0&&l<this.__input_length?!!this.__match(f,l):!1},u.prototype.testChar=function(f,l){var s=this.peek(l);return f.lastIndex=0,s!==null&&f.test(s)},u.prototype.match=function(f){var l=this.__match(f,this.__position);return l?this.__position+=l[0].length:l=null,l},u.prototype.read=function(f,l,s){var i="",o;return f&&(o=this.match(f),o&&(i+=o[0])),l&&(o||!f)&&(i+=this.readUntil(l,s)),i},u.prototype.readUntil=function(f,l){var s="",i=this.__position;f.lastIndex=this.__position;var o=f.exec(this.__input);return o?(i=o.index,l&&(i+=o[0].length)):i=this.__input_length,s=this.__input.substring(this.__position,i),this.__position=i,s},u.prototype.readUntilAfter=function(f){return this.readUntil(f,!0)},u.prototype.get_regexp=function(f,l){var s=null,i="g";return l&&R&&(i="y"),typeof f=="string"&&f!==""?s=new RegExp(f,i):f&&(s=new RegExp(f.source,i)),s},u.prototype.get_literal_regexp=function(f){return RegExp(f.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},u.prototype.peekUntilAfter=function(f){var l=this.__position,s=this.readUntilAfter(f);return this.__position=l,s},u.prototype.lookBack=function(f){var l=this.__position-1;return l>=f.length&&this.__input.substring(l-f.length,l).toLowerCase()===f},e.exports.InputScanner=u},,,,,function(e){function R(u,f){u=typeof u=="string"?u:u.source,f=typeof f=="string"?f:f.source,this.__directives_block_pattern=new RegExp(u+/ beautify( \w+[:]\w+)+ /.source+f,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(u+/\sbeautify\signore:end\s/.source+f,"g")}R.prototype.get_directives=function(u){if(!u.match(this.__directives_block_pattern))return null;var f={};this.__directive_pattern.lastIndex=0;for(var l=this.__directive_pattern.exec(u);l;)f[l[1]]=l[2],l=this.__directive_pattern.exec(u);return f},R.prototype.readIgnored=function(u){return u.readUntilAfter(this.__directives_end_ignore_pattern)},e.exports.Directives=R},,function(e,R,u){var f=u(16).Beautifier,l=u(17).Options;function s(i,o){var r=new f(i,o);return r.beautify()}e.exports=s,e.exports.defaultOptions=function(){return new l}},function(e,R,u){var f=u(17).Options,l=u(2).Output,s=u(8).InputScanner,i=u(13).Directives,o=new i(/\/\*/,/\*\//),r=/\r\n|[\r\n]/,a=/\r\n|[\r\n]/g,n=/\s/,t=/(?:\s|\n)+/g,E=/\/\*(?:[\s\S]*?)((?:\*\/)|$)/g,b=/\/\/(?:[^\n\r\u2028\u2029]*)/g;function _(B,x){this._source_text=B||"",this._options=new f(x),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(B){var x="";for(this._ch=this._input.next();this._ch;){if(x+=this._ch,this._ch==="\\")x+=this._input.next();else if(B.indexOf(this._ch)!==-1||this._ch===`
|
|
`)break;this._ch=this._input.next()}return x},_.prototype.eatWhitespace=function(B){for(var x=n.test(this._input.peek()),h=0;n.test(this._input.peek());)this._ch=this._input.next(),B&&this._ch===`
|
|
`&&((h===0||h<this._options.max_preserve_newlines)&&(h++,this._output.add_new_line(!0)));return x},_.prototype.foundNestedPseudoClass=function(){for(var B=0,x=1,h=this._input.peek(x);h;){if(h==="{")return!0;if(h==="(")B+=1;else if(h===")"){if(B===0)return!1;B-=1}else if(h===";"||h==="}")return!1;x++,h=this._input.peek(x)}return!1},_.prototype.print_string=function(B){this._output.set_indent(this._indentLevel),this._output.non_breaking_space=!0,this._output.add_token(B)},_.prototype.preserveSingleSpace=function(B){B&&(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 B=this._source_text,x=this._options.eol;x==="auto"&&(x=`
|
|
`,B&&r.test(B||"")&&(x=B.match(r)[0])),B=B.replace(a,`
|
|
`);var h=B.match(/^[\t ]*/)[0];this._output=new l(this._options,h),this._input=new s(B),this._indentLevel=0,this._nestedLevel=0,this._ch=null;for(var d=0,A=!1,c=!1,w=!1,m=!1,g=!1,F=!1,k=this._ch,S=!1,Q,X,P;Q=this._input.read(t),X=Q!=="",P=k,this._ch=this._input.next(),this._ch==="\\"&&this._input.hasNext()&&(this._ch+=this._input.next()),k=this._ch,this._ch;)if(this._ch==="/"&&this._input.peek()==="*"){this._output.add_new_line(),this._input.back();var q=this._input.read(E),ie=o.get_directives(q);ie&&ie.ignore==="start"&&(q+=o.readIgnored(this._input)),this.print_string(q),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(b)),this.eatWhitespace(!0);else if(this._ch==="@"||this._ch==="$")if(this.preserveSingleSpace(X),this._input.peek()==="{")this.print_string(this._ch+this.eatString("}"));else{this.print_string(this._ch);var be=this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);be.match(/[ :]$/)&&(be=this.eatString(": ").replace(/\s$/,""),this.print_string(be),this._output.space_before_token=!0),be=be.replace(/\s$/,""),be==="extend"?m=!0:be==="import"&&(g=!0),be in this.NESTED_AT_RULE?(this._nestedLevel+=1,be in this.CONDITIONAL_GROUP_RULE&&(w=!0)):!A&&d===0&&be.indexOf(":")!==-1&&(c=!0,this.indent())}else if(this._ch==="#"&&this._input.peek()==="{")this.preserveSingleSpace(X),this.print_string(this._ch+this.eatString("}"));else if(this._ch==="{")c&&(c=!1,this.outdent()),w?(w=!1,A=this._indentLevel>=this._nestedLevel):A=this._indentLevel>=this._nestedLevel-1,this._options.newline_between_rules&&A&&(this._output.previous_line&&this._output.previous_line.item(-1)!=="{"&&this._output.ensure_empty_line_above("/",",")),this._output.space_before_token=!0,this._options.brace_style==="expand"?(this._output.add_new_line(),this.print_string(this._ch),this.indent(),this._output.set_indent(this._indentLevel)):(P==="("?this._output.space_before_token=!1:P!==","&&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(),P==="{"&&this._output.trim(!0),g=!1,m=!1,c&&(this.outdent(),c=!1),this.print_string(this._ch),A=!1,this._nestedLevel&&this._nestedLevel--,this.eatWhitespace(!0),this._output.add_new_line(),this._options.newline_between_rules&&!this._output.just_added_blankline()&&(this._input.peek()!=="}"&&this._output.add_new_line(!0)),this._input.peek()===")"&&(this._output.trim(!0),this._options.brace_style==="expand"&&this._output.add_new_line(!0));else if(this._ch===":"){for(var me=0;me<this.NON_SEMICOLON_NEWLINE_PROPERTY.length;me++)if(this._input.lookBack(this.NON_SEMICOLON_NEWLINE_PROPERTY[me])){S=!0;break}(A||w)&&!(this._input.lookBack("&")||this.foundNestedPseudoClass())&&!this._input.lookBack("(")&&!m&&d===0?(this.print_string(":"),c||(c=!0,this._output.space_before_token=!0,this.eatWhitespace(!0),this.indent())):(this._input.lookBack(" ")&&(this._output.space_before_token=!0),this._input.peek()===":"?(this._ch=this._input.next(),this.print_string("::")):this.print_string(":"))}else if(this._ch==='"'||this._ch==="'"){var Me=P==='"'||P==="'";this.preserveSingleSpace(Me||X),this.print_string(this._ch+this.eatString(this._ch)),this.eatWhitespace(!0)}else if(this._ch===";")S=!1,d===0?(c&&(this.outdent(),c=!1),m=!1,g=!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(),d++,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(")")),d&&(d--,this.outdent()));else{var Ne=!1;this._input.lookBack("with")&&(Ne=!0),this.preserveSingleSpace(X||Ne),this.print_string(this._ch),c&&P==="$"&&this._options.selector_separator_newline?(this._output.add_new_line(),F=!0):(this.eatWhitespace(),d++,this.indent())}else if(this._ch===")")d&&(d--,this.outdent()),F&&this._input.peek()===";"&&this._options.selector_separator_newline&&(F=!1,this.outdent(),this._output.add_new_line()),this.print_string(this._ch);else if(this._ch===",")this.print_string(this._ch),this.eatWhitespace(!0),this._options.selector_separator_newline&&(!c||F)&&d===0&&!g&&!m?this._output.add_new_line():this._output.space_before_token=!0;else if((this._ch===">"||this._ch==="+"||this._ch==="~")&&!c&&d===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&&n.test(this._ch)&&(this._ch=""));else if(this._ch==="]")this.print_string(this._ch);else if(this._ch==="[")this.preserveSingleSpace(X),this.print_string(this._ch);else if(this._ch==="=")this.eatWhitespace(),this.print_string("="),n.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 ke=P==='"'||P==="'";this.preserveSingleSpace(ke||X),this.print_string(this._ch),!this._output.just_added_newline()&&this._input.peek()===`
|
|
`&&S&&this._output.add_new_line()}var Ke=this._output.get_code(x);return Ke},e.exports.Beautifier=_},function(e,R,u){var f=u(6).Options;function l(s){f.call(this,s,"css"),this.selector_separator_newline=this._get_boolean("selector_separator_newline",!0),this.newline_between_rules=this._get_boolean("newline_between_rules",!0);var i=this._get_boolean("space_around_selector_separator");this.space_around_combinator=this._get_boolean("space_around_combinator")||i;var o=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_style="collapse";for(var r=0;r<o.length;r++)o[r]!=="expand"?this.brace_style="collapse":this.brace_style=o[r]}l.prototype=new f,e.exports.Options=l}],L={};function $(e){var R=L[e];if(R!==void 0)return R.exports;var u=L[e]={exports:{}};return N[e](u,u.exports,$),u.exports}var H=$(15);U=H})();var V=U;!(Ae=[],z=function(){return{css_beautify:V}}.apply(Be,Ae),z!==void 0&&(wt.exports=z))})()},UUDw:function(wt,Be,G){wt.exports={buttonFixed:"buttonFixed___2zLVJ",button:"button___-JgFH",buttonWrap:"buttonWrap___aZhhk"}},VN4U:function(wt,Be,G){"use strict";G.r(Be);var Ae=G("0Owb"),z=G("sPJy"),U=G("bE4q"),V=G("9og8"),N=G("tJVT"),L=G("PpiC"),$=G("WmNS"),H=G.n($),e=G("q1tI"),R=G.n(e),u=G("9kvl"),f=G("dF/Y"),l=G("ngQI"),s=G("NNiE"),i=G("9ZNV"),o=G("D3Jc"),r=G.n(o),a=G("kHHm"),n=G("1n7x"),t=G.n(n),E=G("xOOu"),b=G.n(E),_=function(){document.body.scrollIntoView()},B=function(){document.querySelectorAll("canvas").forEach(function(w){(!w.clientWidth||!w.clientHeight)&&w.remove()})},x=function(){var c=Object(V.a)(H.a.mark(function w(m,g){var F,k,S,Q,X;return H.a.wrap(function(q){for(;;)switch(q.prev=q.next){case 0:_(),B(),F={margin:1,html2canvas:{letterRendering:!0,useCORS:!0,allowTaint:!1,width:1210},jsPDF:{unit:"in",format:"letter",orientation:"portrait"}},k=t()(),S=H.a.mark(function ie(be){return H.a.wrap(function(Me){for(;;)switch(Me.prev=Me.next){case 0:return Me.next=2,k.set(F).from(m[be]).toContainer().toCanvas().toPdf().get("pdf").then(function(){var Ne=Object(V.a)(H.a.mark(function ke(Ke){return H.a.wrap(function(_e){for(;;)switch(_e.prev=_e.next){case 0:if(!(be<m.length-1)){_e.next=3;break}return _e.next=3,Ke.addPage();case 3:case"end":return _e.stop()}},ke)}));return function(ke){return Ne.apply(this,arguments)}}());case 2:case"end":return Me.stop()}},ie)}),Q=0;case 6:if(!(Q<m.length)){q.next=11;break}return q.delegateYield(S(Q),"t0",8);case 8:Q++,q.next=6;break;case 11:X=new b.a,X.file("".concat(g,".pdf"),k.output("blob"),{base64:!1}),X.generateAsync({type:"blob"}).then(function(ie){var be=document.createElement("a");be.href=window.URL.createObjectURL(ie),be.download="".concat(g,".zip"),document.body.appendChild(be);var me=new MouseEvent("click");be.dispatchEvent(me),document.body.removeChild(be)});case 14:case"end":return q.stop()}},w)}));return function(m,g){return c.apply(this,arguments)}}(),h=G("ZWs3"),d=function(w){var m,g,F,k,S,Q,X,P,q=w.paperlibrary,ie=w.user,be=w.globalSetting,me=w.loading,Me=w.dispatch,Ne=Object(L.a)(w,["paperlibrary","user","globalSetting","loading","dispatch"]),ke=Object(e.useState)(),Ke=Object(N.a)(ke,2),Ye=Ke[0],_e=Ke[1],Te=Object(e.useRef)();Object(e.useEffect)(function(){return Me({type:"globalSetting/footerToggle",payload:!1}),function(){Me({type:"globalSetting/footerToggle",payload:!0})}},[]),Object(e.useEffect)(function(){var ye,ve,Je,tt;Te.current=(ye=Ne.match)===null||ye===void 0||((ve=ye.params)===null||ve===void 0)?void 0:ve.id,_e((Je=Ne.location)===null||Je===void 0||((tt=Je.query)===null||tt===void 0)?void 0:tt.defaultActiveKey),Pe()},[]);var Pe=function(){Me({type:"paperlibrary/getPaperData",payload:{id:Te.current}})},bt=function(){var ye=Object(V.a)(H.a.mark(function ve(Je,tt){var it,st,ht;return H.a.wrap(function(He){for(;;)switch(He.prev=He.next){case 0:if(!(!Je.destination||!Je.source)){He.next=2;break}return He.abrupt("return");case 2:return it=tt.questions[Je.source.index].id,st=Je.destination.index+1,He.next=6,Me({type:"paperlibrary/adjustPosition",payload:{id:Te.current,itemId:it,position:st}});case 6:if(ht=He.sent,!(ht.status===-1)){He.next=9;break}return He.abrupt("return");case 9:Pe();case 10:case"end":return He.stop()}},ve)}));return function(Je,tt){return ye.apply(this,arguments)}}(),mt=function(){Me({type:"paperlibrary/setActionTabs",payload:{key:"Paperlibrary-SendToClass",params:{id:Te.current}}})},dt=Object(e.useRef)(),yt=Object(e.useState)(!1),le=Object(N.a)(yt,2),Z=le[0],te=le[1],ee=function(){var ye=Object(V.a)(H.a.mark(function ve(){return H.a.wrap(function(tt){for(;;)switch(tt.prev=tt.next){case 0:return te(!1),tt.next=3,x(dt.current.children,"\u5BFC\u51FA\u8BD5\u5377");case 3:case"end":return tt.stop()}},ve)}));return function(){return ye.apply(this,arguments)}}(),ue=function(){var ye=Object(V.a)(H.a.mark(function ve(){return H.a.wrap(function(tt){for(;;)switch(tt.prev=tt.next){case 0:return te(!0),tt.next=3,x(dt.current.children,"\u5BFC\u51FA\u8BD5\u5377");case 3:case"end":return tt.stop()}},ve)}));return function(){return ye.apply(this,arguments)}}();return R.a.createElement("section",{className:r.a.bg},R.a.createElement(U.a,{className:"mt30",separator:">"},R.a.createElement(U.a.Item,null,"\u8BD5\u5377\u5E93"),R.a.createElement(U.a.Item,{href:"/paperlibrary?defaultActiveKey=".concat(Ye)},Ye==="1"?"\u516C\u5F00\u8BD5\u5377\u5E93":"\u6211\u7684\u8BD5\u5377\u5E93"),R.a.createElement(U.a.Item,null,"\u8BD5\u5377\u67E5\u770B")),R.a.createElement("div",{className:r.a.title},R.a.createElement("div",{className:r.a.btnWrapper},R.a.createElement(h.a,{type:"primary",onClick:ue},R.a.createElement(f.a,null),"\u5BFC\u51FA\u7A7A\u767D\u8BD5\u5377+\u7B54\u6848"),R.a.createElement(h.a,{type:"primary",className:"ml10",onClick:ee},R.a.createElement(f.a,null),"\u5BFC\u51FA\u7A7A\u767D\u8BD5\u5377"))),R.a.createElement("div",{className:r.a.wrap,ref:dt},R.a.createElement("div",{className:"pt20 pb20"},R.a.createElement("div",{className:r.a.titleForExport},(m=q.paperData)===null||m===void 0||((g=m.exam)===null||g===void 0)?void 0:g.name),R.a.createElement("div",{className:"".concat(r.a.flexRow," ").concat(r.a.flexJustifyBetween)},R.a.createElement("div",null,R.a.createElement("span",{className:r.a.questionNumber},"\u9898\u6570\uFF1A",(F=q.paperData)===null||F===void 0||((k=F.exam)===null||k===void 0)?void 0:k.all_questions_count),R.a.createElement("span",{className:r.a.score},"\u603B\u5206\uFF1A",(S=q.paperData)===null||S===void 0||((Q=S.exam)===null||Q===void 0)?void 0:Q.all_score))),R.a.createElement("div",{className:r.a.line}),R.a.createElement("div",{className:r.a.dragTip},"\u5C0F\u9898\u4E4B\u95F4\u53EF\u4EE5\u62D6\u52A8\u6392\u5E8F"),(X=q.paperData)===null||X===void 0||((P=X.questionList)===null||P===void 0)?void 0:P.map(function(ye,ve){return R.a.createElement("div",{className:"".concat(r.a.relative," mt20 mb20"),key:ve},R.a.createElement("div",{className:r.a.typeActive},R.a.createElement("span",{className:r.a.typeName},ye.number,"\u3001",ye.name),R.a.createElement("span",{className:r.a.typeNumber},"\uFF08\u5171",ye.questions_count,"\u9898\uFF1B\u5171",ye.questions_score,"\u5206\uFF09")),R.a.createElement(l.a,{onDragEnd:function(tt){return bt(tt,ye)}},R.a.createElement(l.c,{droppableId:ve.toString()},function(Je,tt){var it;return R.a.createElement("div",Object(Ae.a)({className:"mt20",ref:Je.innerRef},Je.droppableProps,{onScroll:function(){}}),(it=ye.questions)===null||it===void 0?void 0:it.map(function(st,ht){return R.a.createElement(l.b,{draggableId:st.id.toString(),index:ht,key:st.id},function(_t){return R.a.createElement("div",Object(Ae.a)({ref:_t.innerRef},_t.draggableProps,_t.dragHandleProps),R.a.createElement(s.a,{index:ht,typeName:ye.name,type:ye.type,data:st,showAnswer:Z,isshow:!1}))})}))})))}))),R.a.createElement(i.a,{okText:"\u53D1\u9001\u8BFE\u5802",onCancel:function(){return u.d.replace("/paperlibrary")},onOk:mt}),R.a.createElement(a.a,null))},A=Be.default=Object(u.a)(function(c){var w=c.paperlibrary,m=c.user,g=c.loading,F=c.globalSetting;return{paperlibrary:w,user:m,globalSetting:F,loading:g.effects}})(d)},Vhoy:function(wt,Be,G){"use strict";G.d(Be,"d",function(){return V}),G.d(Be,"e",function(){return N}),G.d(Be,"c",function(){return L}),G.d(Be,"b",function(){return $}),G.d(Be,"a",function(){return H});var Ae=G("MI8n");class z{constructor(){this._icons=new Map,this._onDidRegister=new Ae.b}add(e){const R=this._icons.get(e.id);R?e.description?R.description=e.description:console.error(`Duplicate registration of codicon ${e.id}`):(this._icons.set(e.id,e),this._onDidRegister.fire(e))}get(e){return this._icons.get(e)}get all(){return this._icons.values()}get onDidRegister(){return this._onDidRegister.event}}const U=new z,V=U;function N(e,R){return new $(e,R)}function L(e){return e?e.replace(/\$\((.*?)\)/g,(R,u)=>` ${u} `).trim():""}class ${constructor(e,R,u){this.id=e,this.definition=R,this.description=u,U.add(this)}get classNames(){return"codicon codicon-"+this.id}get classNamesArray(){return["codicon","codicon-"+this.id]}get cssSelector(){return".codicon.codicon-"+this.id}}var H;(function(e){e.iconNameSegment="[A-Za-z0-9]+",e.iconNameExpression="[A-Za-z0-9\\-]+",e.iconModifierExpression="~[A-Za-z]+";const R=new RegExp(`^(${e.iconNameExpression})(${e.iconModifierExpression})?$`);function u(s){if(s instanceof $)return["codicon","codicon-"+s.id];const i=R.exec(s.id);if(!i)return u($.error);let[,o,r]=i;const a=["codicon","codicon-"+o];return r&&a.push("codicon-modifier-"+r.substr(1)),a}e.asClassNameArray=u;function f(s){return u(s).join(" ")}e.asClassName=f;function l(s){return"."+u(s).join(".")}e.asCSSSelector=l})(H||(H={})),function(e){e.add=new e("add",{fontCharacter:"\\ea60"}),e.plus=new e("plus",e.add.definition),e.gistNew=new e("gist-new",e.add.definition),e.repoCreate=new e("repo-create",e.add.definition),e.lightbulb=new e("lightbulb",{fontCharacter:"\\ea61"}),e.lightBulb=new e("light-bulb",{fontCharacter:"\\ea61"}),e.repo=new e("repo",{fontCharacter:"\\ea62"}),e.repoDelete=new e("repo-delete",{fontCharacter:"\\ea62"}),e.gistFork=new e("gist-fork",{fontCharacter:"\\ea63"}),e.repoForked=new e("repo-forked",{fontCharacter:"\\ea63"}),e.gitPullRequest=new e("git-pull-request",{fontCharacter:"\\ea64"}),e.gitPullRequestAbandoned=new e("git-pull-request-abandoned",{fontCharacter:"\\ea64"}),e.recordKeys=new e("record-keys",{fontCharacter:"\\ea65"}),e.keyboard=new e("keyboard",{fontCharacter:"\\ea65"}),e.tag=new e("tag",{fontCharacter:"\\ea66"}),e.tagAdd=new e("tag-add",{fontCharacter:"\\ea66"}),e.tagRemove=new e("tag-remove",{fontCharacter:"\\ea66"}),e.person=new e("person",{fontCharacter:"\\ea67"}),e.personFollow=new e("person-follow",{fontCharacter:"\\ea67"}),e.personOutline=new e("person-outline",{fontCharacter:"\\ea67"}),e.personFilled=new e("person-filled",{fontCharacter:"\\ea67"}),e.gitBranch=new e("git-branch",{fontCharacter:"\\ea68"}),e.gitBranchCreate=new e("git-branch-create",{fontCharacter:"\\ea68"}),e.gitBranchDelete=new e("git-branch-delete",{fontCharacter:"\\ea68"}),e.sourceControl=new e("source-control",{fontCharacter:"\\ea68"}),e.mirror=new e("mirror",{fontCharacter:"\\ea69"}),e.mirrorPublic=new e("mirror-public",{fontCharacter:"\\ea69"}),e.star=new e("star",{fontCharacter:"\\ea6a"}),e.starAdd=new e("star-add",{fontCharacter:"\\ea6a"}),e.starDelete=new e("star-delete",{fontCharacter:"\\ea6a"}),e.starEmpty=new e("star-empty",{fontCharacter:"\\ea6a"}),e.comment=new e("comment",{fontCharacter:"\\ea6b"}),e.commentAdd=new e("comment-add",{fontCharacter:"\\ea6b"}),e.alert=new e("alert",{fontCharacter:"\\ea6c"}),e.warning=new e("warning",{fontCharacter:"\\ea6c"}),e.search=new e("search",{fontCharacter:"\\ea6d"}),e.searchSave=new e("search-save",{fontCharacter:"\\ea6d"}),e.logOut=new e("log-out",{fontCharacter:"\\ea6e"}),e.signOut=new e("sign-out",{fontCharacter:"\\ea6e"}),e.logIn=new e("log-in",{fontCharacter:"\\ea6f"}),e.signIn=new e("sign-in",{fontCharacter:"\\ea6f"}),e.eye=new e("eye",{fontCharacter:"\\ea70"}),e.eyeUnwatch=new e("eye-unwatch",{fontCharacter:"\\ea70"}),e.eyeWatch=new e("eye-watch",{fontCharacter:"\\ea70"}),e.circleFilled=new e("circle-filled",{fontCharacter:"\\ea71"}),e.primitiveDot=new e("primitive-dot",{fontCharacter:"\\ea71"}),e.closeDirty=new e("close-dirty",{fontCharacter:"\\ea71"}),e.debugBreakpoint=new e("debug-breakpoint",{fontCharacter:"\\ea71"}),e.debugBreakpointDisabled=new e("debug-breakpoint-disabled",{fontCharacter:"\\ea71"}),e.debugHint=new e("debug-hint",{fontCharacter:"\\ea71"}),e.primitiveSquare=new e("primitive-square",{fontCharacter:"\\ea72"}),e.edit=new e("edit",{fontCharacter:"\\ea73"}),e.pencil=new e("pencil",{fontCharacter:"\\ea73"}),e.info=new e("info",{fontCharacter:"\\ea74"}),e.issueOpened=new e("issue-opened",{fontCharacter:"\\ea74"}),e.gistPrivate=new e("gist-private",{fontCharacter:"\\ea75"}),e.gitForkPrivate=new e("git-fork-private",{fontCharacter:"\\ea75"}),e.lock=new e("lock",{fontCharacter:"\\ea75"}),e.mirrorPrivate=new e("mirror-private",{fontCharacter:"\\ea75"}),e.close=new e("close",{fontCharacter:"\\ea76"}),e.removeClose=new e("remove-close",{fontCharacter:"\\ea76"}),e.x=new e("x",{fontCharacter:"\\ea76"}),e.repoSync=new e("repo-sync",{fontCharacter:"\\ea77"}),e.sync=new e("sync",{fontCharacter:"\\ea77"}),e.clone=new e("clone",{fontCharacter:"\\ea78"}),e.desktopDownload=new e("desktop-download",{fontCharacter:"\\ea78"}),e.beaker=new e("beaker",{fontCharacter:"\\ea79"}),e.microscope=new e("microscope",{fontCharacter:"\\ea79"}),e.vm=new e("vm",{fontCharacter:"\\ea7a"}),e.deviceDesktop=new e("device-desktop",{fontCharacter:"\\ea7a"}),e.file=new e("file",{fontCharacter:"\\ea7b"}),e.fileText=new e("file-text",{fontCharacter:"\\ea7b"}),e.more=new e("more",{fontCharacter:"\\ea7c"}),e.ellipsis=new e("ellipsis",{fontCharacter:"\\ea7c"}),e.kebabHorizontal=new e("kebab-horizontal",{fontCharacter:"\\ea7c"}),e.mailReply=new e("mail-reply",{fontCharacter:"\\ea7d"}),e.reply=new e("reply",{fontCharacter:"\\ea7d"}),e.organization=new e("organization",{fontCharacter:"\\ea7e"}),e.organizationFilled=new e("organization-filled",{fontCharacter:"\\ea7e"}),e.organizationOutline=new e("organization-outline",{fontCharacter:"\\ea7e"}),e.newFile=new e("new-file",{fontCharacter:"\\ea7f"}),e.fileAdd=new e("file-add",{fontCharacter:"\\ea7f"}),e.newFolder=new e("new-folder",{fontCharacter:"\\ea80"}),e.fileDirectoryCreate=new e("file-directory-create",{fontCharacter:"\\ea80"}),e.trash=new e("trash",{fontCharacter:"\\ea81"}),e.trashcan=new e("trashcan",{fontCharacter:"\\ea81"}),e.history=new e("history",{fontCharacter:"\\ea82"}),e.clock=new e("clock",{fontCharacter:"\\ea82"}),e.folder=new e("folder",{fontCharacter:"\\ea83"}),e.fileDirectory=new e("file-directory",{fontCharacter:"\\ea83"}),e.symbolFolder=new e("symbol-folder",{fontCharacter:"\\ea83"}),e.logoGithub=new e("logo-github",{fontCharacter:"\\ea84"}),e.markGithub=new e("mark-github",{fontCharacter:"\\ea84"}),e.github=new e("github",{fontCharacter:"\\ea84"}),e.terminal=new e("terminal",{fontCharacter:"\\ea85"}),e.console=new e("console",{fontCharacter:"\\ea85"}),e.repl=new e("repl",{fontCharacter:"\\ea85"}),e.zap=new e("zap",{fontCharacter:"\\ea86"}),e.symbolEvent=new e("symbol-event",{fontCharacter:"\\ea86"}),e.error=new e("error",{fontCharacter:"\\ea87"}),e.stop=new e("stop",{fontCharacter:"\\ea87"}),e.variable=new e("variable",{fontCharacter:"\\ea88"}),e.symbolVariable=new e("symbol-variable",{fontCharacter:"\\ea88"}),e.array=new e("array",{fontCharacter:"\\ea8a"}),e.symbolArray=new e("symbol-array",{fontCharacter:"\\ea8a"}),e.symbolModule=new e("symbol-module",{fontCharacter:"\\ea8b"}),e.symbolPackage=new e("symbol-package",{fontCharacter:"\\ea8b"}),e.symbolNamespace=new e("symbol-namespace",{fontCharacter:"\\ea8b"}),e.symbolObject=new e("symbol-object",{fontCharacter:"\\ea8b"}),e.symbolMethod=new e("symbol-method",{fontCharacter:"\\ea8c"}),e.symbolFunction=new e("symbol-function",{fontCharacter:"\\ea8c"}),e.symbolConstructor=new e("symbol-constructor",{fontCharacter:"\\ea8c"}),e.symbolBoolean=new e("symbol-boolean",{fontCharacter:"\\ea8f"}),e.symbolNull=new e("symbol-null",{fontCharacter:"\\ea8f"}),e.symbolNumeric=new e("symbol-numeric",{fontCharacter:"\\ea90"}),e.symbolNumber=new e("symbol-number",{fontCharacter:"\\ea90"}),e.symbolStructure=new e("symbol-structure",{fontCharacter:"\\ea91"}),e.symbolStruct=new e("symbol-struct",{fontCharacter:"\\ea91"}),e.symbolParameter=new e("symbol-parameter",{fontCharacter:"\\ea92"}),e.symbolTypeParameter=new e("symbol-type-parameter",{fontCharacter:"\\ea92"}),e.symbolKey=new e("symbol-key",{fontCharacter:"\\ea93"}),e.symbolText=new e("symbol-text",{fontCharacter:"\\ea93"}),e.symbolReference=new e("symbol-reference",{fontCharacter:"\\ea94"}),e.goToFile=new e("go-to-file",{fontCharacter:"\\ea94"}),e.symbolEnum=new e("symbol-enum",{fontCharacter:"\\ea95"}),e.symbolValue=new e("symbol-value",{fontCharacter:"\\ea95"}),e.symbolRuler=new e("symbol-ruler",{fontCharacter:"\\ea96"}),e.symbolUnit=new e("symbol-unit",{fontCharacter:"\\ea96"}),e.activateBreakpoints=new e("activate-breakpoints",{fontCharacter:"\\ea97"}),e.archive=new e("archive",{fontCharacter:"\\ea98"}),e.arrowBoth=new e("arrow-both",{fontCharacter:"\\ea99"}),e.arrowDown=new e("arrow-down",{fontCharacter:"\\ea9a"}),e.arrowLeft=new e("arrow-left",{fontCharacter:"\\ea9b"}),e.arrowRight=new e("arrow-right",{fontCharacter:"\\ea9c"}),e.arrowSmallDown=new e("arrow-small-down",{fontCharacter:"\\ea9d"}),e.arrowSmallLeft=new e("arrow-small-left",{fontCharacter:"\\ea9e"}),e.arrowSmallRight=new e("arrow-small-right",{fontCharacter:"\\ea9f"}),e.arrowSmallUp=new e("arrow-small-up",{fontCharacter:"\\eaa0"}),e.arrowUp=new e("arrow-up",{fontCharacter:"\\eaa1"}),e.bell=new e("bell",{fontCharacter:"\\eaa2"}),e.bold=new e("bold",{fontCharacter:"\\eaa3"}),e.book=new e("book",{fontCharacter:"\\eaa4"}),e.bookmark=new e("bookmark",{fontCharacter:"\\eaa5"}),e.debugBreakpointConditionalUnverified=new e("debug-breakpoint-conditional-unverified",{fontCharacter:"\\eaa6"}),e.debugBreakpointConditional=new e("debug-breakpoint-conditional",{fontCharacter:"\\eaa7"}),e.debugBreakpointConditionalDisabled=new e("debug-breakpoint-conditional-disabled",{fontCharacter:"\\eaa7"}),e.debugBreakpointDataUnverified=new e("debug-breakpoint-data-unverified",{fontCharacter:"\\eaa8"}),e.debugBreakpointData=new e("debug-breakpoint-data",{fontCharacter:"\\eaa9"}),e.debugBreakpointDataDisabled=new e("debug-breakpoint-data-disabled",{fontCharacter:"\\eaa9"}),e.debugBreakpointLogUnverified=new e("debug-breakpoint-log-unverified",{fontCharacter:"\\eaaa"}),e.debugBreakpointLog=new e("debug-breakpoint-log",{fontCharacter:"\\eaab"}),e.debugBreakpointLogDisabled=new e("debug-breakpoint-log-disabled",{fontCharacter:"\\eaab"}),e.briefcase=new e("briefcase",{fontCharacter:"\\eaac"}),e.broadcast=new e("broadcast",{fontCharacter:"\\eaad"}),e.browser=new e("browser",{fontCharacter:"\\eaae"}),e.bug=new e("bug",{fontCharacter:"\\eaaf"}),e.calendar=new e("calendar",{fontCharacter:"\\eab0"}),e.caseSensitive=new e("case-sensitive",{fontCharacter:"\\eab1"}),e.check=new e("check",{fontCharacter:"\\eab2"}),e.checklist=new e("checklist",{fontCharacter:"\\eab3"}),e.chevronDown=new e("chevron-down",{fontCharacter:"\\eab4"}),e.dropDownButton=new e("drop-down-button",e.chevronDown.definition),e.chevronLeft=new e("chevron-left",{fontCharacter:"\\eab5"}),e.chevronRight=new e("chevron-right",{fontCharacter:"\\eab6"}),e.chevronUp=new e("chevron-up",{fontCharacter:"\\eab7"}),e.chromeClose=new e("chrome-close",{fontCharacter:"\\eab8"}),e.chromeMaximize=new e("chrome-maximize",{fontCharacter:"\\eab9"}),e.chromeMinimize=new e("chrome-minimize",{fontCharacter:"\\eaba"}),e.chromeRestore=new e("chrome-restore",{fontCharacter:"\\eabb"}),e.circleOutline=new e("circle-outline",{fontCharacter:"\\eabc"}),e.debugBreakpointUnverified=new e("debug-breakpoint-unverified",{fontCharacter:"\\eabc"}),e.circleSlash=new e("circle-slash",{fontCharacter:"\\eabd"}),e.circuitBoard=new e("circuit-board",{fontCharacter:"\\eabe"}),e.clearAll=new e("clear-all",{fontCharacter:"\\eabf"}),e.clippy=new e("clippy",{fontCharacter:"\\eac0"}),e.closeAll=new e("close-all",{fontCharacter:"\\eac1"}),e.cloudDownload=new e("cloud-download",{fontCharacter:"\\eac2"}),e.cloudUpload=new e("cloud-upload",{fontCharacter:"\\eac3"}),e.code=new e("code",{fontCharacter:"\\eac4"}),e.collapseAll=new e("collapse-all",{fontCharacter:"\\eac5"}),e.colorMode=new e("color-mode",{fontCharacter:"\\eac6"}),e.commentDiscussion=new e("comment-discussion",{fontCharacter:"\\eac7"}),e.compareChanges=new e("compare-changes",{fontCharacter:"\\eafd"}),e.creditCard=new e("credit-card",{fontCharacter:"\\eac9"}),e.dash=new e("dash",{fontCharacter:"\\eacc"}),e.dashboard=new e("dashboard",{fontCharacter:"\\eacd"}),e.database=new e("database",{fontCharacter:"\\eace"}),e.debugContinue=new e("debug-continue",{fontCharacter:"\\eacf"}),e.debugDisconnect=new e("debug-disconnect",{fontCharacter:"\\ead0"}),e.debugPause=new e("debug-pause",{fontCharacter:"\\ead1"}),e.debugRestart=new e("debug-restart",{fontCharacter:"\\ead2"}),e.debugStart=new e("debug-start",{fontCharacter:"\\ead3"}),e.debugStepInto=new e("debug-step-into",{fontCharacter:"\\ead4"}),e.debugStepOut=new e("debug-step-out",{fontCharacter:"\\ead5"}),e.debugStepOver=new e("debug-step-over",{fontCharacter:"\\ead6"}),e.debugStop=new e("debug-stop",{fontCharacter:"\\ead7"}),e.debug=new e("debug",{fontCharacter:"\\ead8"}),e.deviceCameraVideo=new e("device-camera-video",{fontCharacter:"\\ead9"}),e.deviceCamera=new e("device-camera",{fontCharacter:"\\eada"}),e.deviceMobile=new e("device-mobile",{fontCharacter:"\\eadb"}),e.diffAdded=new e("diff-added",{fontCharacter:"\\eadc"}),e.diffIgnored=new e("diff-ignored",{fontCharacter:"\\eadd"}),e.diffModified=new e("diff-modified",{fontCharacter:"\\eade"}),e.diffRemoved=new e("diff-removed",{fontCharacter:"\\eadf"}),e.diffRenamed=new e("diff-renamed",{fontCharacter:"\\eae0"}),e.diff=new e("diff",{fontCharacter:"\\eae1"}),e.discard=new e("discard",{fontCharacter:"\\eae2"}),e.editorLayout=new e("editor-layout",{fontCharacter:"\\eae3"}),e.emptyWindow=new e("empty-window",{fontCharacter:"\\eae4"}),e.exclude=new e("exclude",{fontCharacter:"\\eae5"}),e.extensions=new e("extensions",{fontCharacter:"\\eae6"}),e.eyeClosed=new e("eye-closed",{fontCharacter:"\\eae7"}),e.fileBinary=new e("file-binary",{fontCharacter:"\\eae8"}),e.fileCode=new e("file-code",{fontCharacter:"\\eae9"}),e.fileMedia=new e("file-media",{fontCharacter:"\\eaea"}),e.filePdf=new e("file-pdf",{fontCharacter:"\\eaeb"}),e.fileSubmodule=new e("file-submodule",{fontCharacter:"\\eaec"}),e.fileSymlinkDirectory=new e("file-symlink-directory",{fontCharacter:"\\eaed"}),e.fileSymlinkFile=new e("file-symlink-file",{fontCharacter:"\\eaee"}),e.fileZip=new e("file-zip",{fontCharacter:"\\eaef"}),e.files=new e("files",{fontCharacter:"\\eaf0"}),e.filter=new e("filter",{fontCharacter:"\\eaf1"}),e.flame=new e("flame",{fontCharacter:"\\eaf2"}),e.foldDown=new e("fold-down",{fontCharacter:"\\eaf3"}),e.foldUp=new e("fold-up",{fontCharacter:"\\eaf4"}),e.fold=new e("fold",{fontCharacter:"\\eaf5"}),e.folderActive=new e("folder-active",{fontCharacter:"\\eaf6"}),e.folderOpened=new e("folder-opened",{fontCharacter:"\\eaf7"}),e.gear=new e("gear",{fontCharacter:"\\eaf8"}),e.gift=new e("gift",{fontCharacter:"\\eaf9"}),e.gistSecret=new e("gist-secret",{fontCharacter:"\\eafa"}),e.gist=new e("gist",{fontCharacter:"\\eafb"}),e.gitCommit=new e("git-commit",{fontCharacter:"\\eafc"}),e.gitCompare=new e("git-compare",{fontCharacter:"\\eafd"}),e.gitMerge=new e("git-merge",{fontCharacter:"\\eafe"}),e.githubAction=new e("github-action",{fontCharacter:"\\eaff"}),e.githubAlt=new e("github-alt",{fontCharacter:"\\eb00"}),e.globe=new e("globe",{fontCharacter:"\\eb01"}),e.grabber=new e("grabber",{fontCharacter:"\\eb02"}),e.graph=new e("graph",{fontCharacter:"\\eb03"}),e.gripper=new e("gripper",{fontCharacter:"\\eb04"}),e.heart=new e("heart",{fontCharacter:"\\eb05"}),e.home=new e("home",{fontCharacter:"\\eb06"}),e.horizontalRule=new e("horizontal-rule",{fontCharacter:"\\eb07"}),e.hubot=new e("hubot",{fontCharacter:"\\eb08"}),e.inbox=new e("inbox",{fontCharacter:"\\eb09"}),e.issueClosed=new e("issue-closed",{fontCharacter:"\\eba4"}),e.issueReopened=new e("issue-reopened",{fontCharacter:"\\eb0b"}),e.issues=new e("issues",{fontCharacter:"\\eb0c"}),e.italic=new e("italic",{fontCharacter:"\\eb0d"}),e.jersey=new e("jersey",{fontCharacter:"\\eb0e"}),e.json=new e("json",{fontCharacter:"\\eb0f"}),e.kebabVertical=new e("kebab-vertical",{fontCharacter:"\\eb10"}),e.key=new e("key",{fontCharacter:"\\eb11"}),e.law=new e("law",{fontCharacter:"\\eb12"}),e.lightbulbAutofix=new e("lightbulb-autofix",{fontCharacter:"\\eb13"}),e.linkExternal=new e("link-external",{fontCharacter:"\\eb14"}),e.link=new e("link",{fontCharacter:"\\eb15"}),e.listOrdered=new e("list-ordered",{fontCharacter:"\\eb16"}),e.listUnordered=new e("list-unordered",{fontCharacter:"\\eb17"}),e.liveShare=new e("live-share",{fontCharacter:"\\eb18"}),e.loading=new e("loading",{fontCharacter:"\\eb19"}),e.location=new e("location",{fontCharacter:"\\eb1a"}),e.mailRead=new e("mail-read",{fontCharacter:"\\eb1b"}),e.mail=new e("mail",{fontCharacter:"\\eb1c"}),e.markdown=new e("markdown",{fontCharacter:"\\eb1d"}),e.megaphone=new e("megaphone",{fontCharacter:"\\eb1e"}),e.mention=new e("mention",{fontCharacter:"\\eb1f"}),e.milestone=new e("milestone",{fontCharacter:"\\eb20"}),e.mortarBoard=new e("mortar-board",{fontCharacter:"\\eb21"}),e.move=new e("move",{fontCharacter:"\\eb22"}),e.multipleWindows=new e("multiple-windows",{fontCharacter:"\\eb23"}),e.mute=new e("mute",{fontCharacter:"\\eb24"}),e.noNewline=new e("no-newline",{fontCharacter:"\\eb25"}),e.note=new e("note",{fontCharacter:"\\eb26"}),e.octoface=new e("octoface",{fontCharacter:"\\eb27"}),e.openPreview=new e("open-preview",{fontCharacter:"\\eb28"}),e.package_=new e("package",{fontCharacter:"\\eb29"}),e.paintcan=new e("paintcan",{fontCharacter:"\\eb2a"}),e.pin=new e("pin",{fontCharacter:"\\eb2b"}),e.play=new e("play",{fontCharacter:"\\eb2c"}),e.run=new e("run",{fontCharacter:"\\eb2c"}),e.plug=new e("plug",{fontCharacter:"\\eb2d"}),e.preserveCase=new e("preserve-case",{fontCharacter:"\\eb2e"}),e.preview=new e("preview",{fontCharacter:"\\eb2f"}),e.project=new e("project",{fontCharacter:"\\eb30"}),e.pulse=new e("pulse",{fontCharacter:"\\eb31"}),e.question=new e("question",{fontCharacter:"\\eb32"}),e.quote=new e("quote",{fontCharacter:"\\eb33"}),e.radioTower=new e("radio-tower",{fontCharacter:"\\eb34"}),e.reactions=new e("reactions",{fontCharacter:"\\eb35"}),e.references=new e("references",{fontCharacter:"\\eb36"}),e.refresh=new e("refresh",{fontCharacter:"\\eb37"}),e.regex=new e("regex",{fontCharacter:"\\eb38"}),e.remoteExplorer=new e("remote-explorer",{fontCharacter:"\\eb39"}),e.remote=new e("remote",{fontCharacter:"\\eb3a"}),e.remove=new e("remove",{fontCharacter:"\\eb3b"}),e.replaceAll=new e("replace-all",{fontCharacter:"\\eb3c"}),e.replace=new e("replace",{fontCharacter:"\\eb3d"}),e.repoClone=new e("repo-clone",{fontCharacter:"\\eb3e"}),e.repoForcePush=new e("repo-force-push",{fontCharacter:"\\eb3f"}),e.repoPull=new e("repo-pull",{fontCharacter:"\\eb40"}),e.repoPush=new e("repo-push",{fontCharacter:"\\eb41"}),e.report=new e("report",{fontCharacter:"\\eb42"}),e.requestChanges=new e("request-changes",{fontCharacter:"\\eb43"}),e.rocket=new e("rocket",{fontCharacter:"\\eb44"}),e.rootFolderOpened=new e("root-folder-opened",{fontCharacter:"\\eb45"}),e.rootFolder=new e("root-folder",{fontCharacter:"\\eb46"}),e.rss=new e("rss",{fontCharacter:"\\eb47"}),e.ruby=new e("ruby",{fontCharacter:"\\eb48"}),e.saveAll=new e("save-all",{fontCharacter:"\\eb49"}),e.saveAs=new e("save-as",{fontCharacter:"\\eb4a"}),e.save=new e("save",{fontCharacter:"\\eb4b"}),e.screenFull=new e("screen-full",{fontCharacter:"\\eb4c"}),e.screenNormal=new e("screen-normal",{fontCharacter:"\\eb4d"}),e.searchStop=new e("search-stop",{fontCharacter:"\\eb4e"}),e.server=new e("server",{fontCharacter:"\\eb50"}),e.settingsGear=new e("settings-gear",{fontCharacter:"\\eb51"}),e.settings=new e("settings",{fontCharacter:"\\eb52"}),e.shield=new e("shield",{fontCharacter:"\\eb53"}),e.smiley=new e("smiley",{fontCharacter:"\\eb54"}),e.sortPrecedence=new e("sort-precedence",{fontCharacter:"\\eb55"}),e.splitHorizontal=new e("split-horizontal",{fontCharacter:"\\eb56"}),e.splitVertical=new e("split-vertical",{fontCharacter:"\\eb57"}),e.squirrel=new e("squirrel",{fontCharacter:"\\eb58"}),e.starFull=new e("star-full",{fontCharacter:"\\eb59"}),e.starHalf=new e("star-half",{fontCharacter:"\\eb5a"}),e.symbolClass=new e("symbol-class",{fontCharacter:"\\eb5b"}),e.symbolColor=new e("symbol-color",{fontCharacter:"\\eb5c"}),e.symbolConstant=new e("symbol-constant",{fontCharacter:"\\eb5d"}),e.symbolEnumMember=new e("symbol-enum-member",{fontCharacter:"\\eb5e"}),e.symbolField=new e("symbol-field",{fontCharacter:"\\eb5f"}),e.symbolFile=new e("symbol-file",{fontCharacter:"\\eb60"}),e.symbolInterface=new e("symbol-interface",{fontCharacter:"\\eb61"}),e.symbolKeyword=new e("symbol-keyword",{fontCharacter:"\\eb62"}),e.symbolMisc=new e("symbol-misc",{fontCharacter:"\\eb63"}),e.symbolOperator=new e("symbol-operator",{fontCharacter:"\\eb64"}),e.symbolProperty=new e("symbol-property",{fontCharacter:"\\eb65"}),e.wrench=new e("wrench",{fontCharacter:"\\eb65"}),e.wrenchSubaction=new e("wrench-subaction",{fontCharacter:"\\eb65"}),e.symbolSnippet=new e("symbol-snippet",{fontCharacter:"\\eb66"}),e.tasklist=new e("tasklist",{fontCharacter:"\\eb67"}),e.telescope=new e("telescope",{fontCharacter:"\\eb68"}),e.textSize=new e("text-size",{fontCharacter:"\\eb69"}),e.threeBars=new e("three-bars",{fontCharacter:"\\eb6a"}),e.thumbsdown=new e("thumbsdown",{fontCharacter:"\\eb6b"}),e.thumbsup=new e("thumbsup",{fontCharacter:"\\eb6c"}),e.tools=new e("tools",{fontCharacter:"\\eb6d"}),e.triangleDown=new e("triangle-down",{fontCharacter:"\\eb6e"}),e.triangleLeft=new e("triangle-left",{fontCharacter:"\\eb6f"}),e.triangleRight=new e("triangle-right",{fontCharacter:"\\eb70"}),e.triangleUp=new e("triangle-up",{fontCharacter:"\\eb71"}),e.twitter=new e("twitter",{fontCharacter:"\\eb72"}),e.unfold=new e("unfold",{fontCharacter:"\\eb73"}),e.unlock=new e("unlock",{fontCharacter:"\\eb74"}),e.unmute=new e("unmute",{fontCharacter:"\\eb75"}),e.unverified=new e("unverified",{fontCharacter:"\\eb76"}),e.verified=new e("verified",{fontCharacter:"\\eb77"}),e.versions=new e("versions",{fontCharacter:"\\eb78"}),e.vmActive=new e("vm-active",{fontCharacter:"\\eb79"}),e.vmOutline=new e("vm-outline",{fontCharacter:"\\eb7a"}),e.vmRunning=new e("vm-running",{fontCharacter:"\\eb7b"}),e.watch=new e("watch",{fontCharacter:"\\eb7c"}),e.whitespace=new e("whitespace",{fontCharacter:"\\eb7d"}),e.wholeWord=new e("whole-word",{fontCharacter:"\\eb7e"}),e.window=new e("window",{fontCharacter:"\\eb7f"}),e.wordWrap=new e("word-wrap",{fontCharacter:"\\eb80"}),e.zoomIn=new e("zoom-in",{fontCharacter:"\\eb81"}),e.zoomOut=new e("zoom-out",{fontCharacter:"\\eb82"}),e.listFilter=new e("list-filter",{fontCharacter:"\\eb83"}),e.listFlat=new e("list-flat",{fontCharacter:"\\eb84"}),e.listSelection=new e("list-selection",{fontCharacter:"\\eb85"}),e.selection=new e("selection",{fontCharacter:"\\eb85"}),e.listTree=new e("list-tree",{fontCharacter:"\\eb86"}),e.debugBreakpointFunctionUnverified=new e("debug-breakpoint-function-unverified",{fontCharacter:"\\eb87"}),e.debugBreakpointFunction=new e("debug-breakpoint-function",{fontCharacter:"\\eb88"}),e.debugBreakpointFunctionDisabled=new e("debug-breakpoint-function-disabled",{fontCharacter:"\\eb88"}),e.debugStackframeActive=new e("debug-stackframe-active",{fontCharacter:"\\eb89"}),e.debugStackframeDot=new e("debug-stackframe-dot",{fontCharacter:"\\eb8a"}),e.debugStackframe=new e("debug-stackframe",{fontCharacter:"\\eb8b"}),e.debugStackframeFocused=new e("debug-stackframe-focused",{fontCharacter:"\\eb8b"}),e.debugBreakpointUnsupported=new e("debug-breakpoint-unsupported",{fontCharacter:"\\eb8c"}),e.symbolString=new e("symbol-string",{fontCharacter:"\\eb8d"}),e.debugReverseContinue=new e("debug-reverse-continue",{fontCharacter:"\\eb8e"}),e.debugStepBack=new e("debug-step-back",{fontCharacter:"\\eb8f"}),e.debugRestartFrame=new e("debug-restart-frame",{fontCharacter:"\\eb90"}),e.callIncoming=new e("call-incoming",{fontCharacter:"\\eb92"}),e.callOutgoing=new e("call-outgoing",{fontCharacter:"\\eb93"}),e.menu=new e("menu",{fontCharacter:"\\eb94"}),e.expandAll=new e("expand-all",{fontCharacter:"\\eb95"}),e.feedback=new e("feedback",{fontCharacter:"\\eb96"}),e.groupByRefType=new e("group-by-ref-type",{fontCharacter:"\\eb97"}),e.ungroupByRefType=new e("ungroup-by-ref-type",{fontCharacter:"\\eb98"}),e.account=new e("account",{fontCharacter:"\\eb99"}),e.bellDot=new e("bell-dot",{fontCharacter:"\\eb9a"}),e.debugConsole=new e("debug-console",{fontCharacter:"\\eb9b"}),e.library=new e("library",{fontCharacter:"\\eb9c"}),e.output=new e("output",{fontCharacter:"\\eb9d"}),e.runAll=new e("run-all",{fontCharacter:"\\eb9e"}),e.syncIgnored=new e("sync-ignored",{fontCharacter:"\\eb9f"}),e.pinned=new e("pinned",{fontCharacter:"\\eba0"}),e.githubInverted=new e("github-inverted",{fontCharacter:"\\eba1"}),e.debugAlt=new e("debug-alt",{fontCharacter:"\\eb91"}),e.serverProcess=new e("server-process",{fontCharacter:"\\eba2"}),e.serverEnvironment=new e("server-environment",{fontCharacter:"\\eba3"}),e.pass=new e("pass",{fontCharacter:"\\eba4"}),e.stopCircle=new e("stop-circle",{fontCharacter:"\\eba5"}),e.playCircle=new e("play-circle",{fontCharacter:"\\eba6"}),e.record=new e("record",{fontCharacter:"\\eba7"}),e.debugAltSmall=new e("debug-alt-small",{fontCharacter:"\\eba8"}),e.vmConnect=new e("vm-connect",{fontCharacter:"\\eba9"}),e.cloud=new e("cloud",{fontCharacter:"\\ebaa"}),e.merge=new e("merge",{fontCharacter:"\\ebab"}),e.exportIcon=new e("export",{fontCharacter:"\\ebac"}),e.graphLeft=new e("graph-left",{fontCharacter:"\\ebad"}),e.magnet=new e("magnet",{fontCharacter:"\\ebae"}),e.notebook=new e("notebook",{fontCharacter:"\\ebaf"}),e.redo=new e("redo",{fontCharacter:"\\ebb0"}),e.checkAll=new e("check-all",{fontCharacter:"\\ebb1"}),e.pinnedDirty=new e("pinned-dirty",{fontCharacter:"\\ebb2"}),e.passFilled=new e("pass-filled",{fontCharacter:"\\ebb3"}),e.circleLargeFilled=new e("circle-large-filled",{fontCharacter:"\\ebb4"}),e.circleLargeOutline=new e("circle-large-outline",{fontCharacter:"\\ebb5"}),e.combine=new e("combine",{fontCharacter:"\\ebb6"}),e.gather=new e("gather",{fontCharacter:"\\ebb6"}),e.table=new e("table",{fontCharacter:"\\ebb7"}),e.variableGroup=new e("variable-group",{fontCharacter:"\\ebb8"}),e.typeHierarchy=new e("type-hierarchy",{fontCharacter:"\\ebb9"}),e.typeHierarchySub=new e("type-hierarchy-sub",{fontCharacter:"\\ebba"}),e.typeHierarchySuper=new e("type-hierarchy-super",{fontCharacter:"\\ebbb"}),e.gitPullRequestCreate=new e("git-pull-request-create",{fontCharacter:"\\ebbc"}),e.runAbove=new e("run-above",{fontCharacter:"\\ebbd"}),e.runBelow=new e("run-below",{fontCharacter:"\\ebbe"}),e.notebookTemplate=new e("notebook-template",{fontCharacter:"\\ebbf"}),e.debugRerun=new e("debug-rerun",{fontCharacter:"\\ebc0"}),e.workspaceTrusted=new e("workspace-trusted",{fontCharacter:"\\ebc1"}),e.workspaceUntrusted=new e("workspace-untrusted",{fontCharacter:"\\ebc2"}),e.workspaceUnspecified=new e("workspace-unspecified",{fontCharacter:"\\ebc3"}),e.terminalCmd=new e("terminal-cmd",{fontCharacter:"\\ebc4"}),e.terminalDebian=new e("terminal-debian",{fontCharacter:"\\ebc5"}),e.terminalLinux=new e("terminal-linux",{fontCharacter:"\\ebc6"}),e.terminalPowershell=new e("terminal-powershell",{fontCharacter:"\\ebc7"}),e.terminalTmux=new e("terminal-tmux",{fontCharacter:"\\ebc8"}),e.terminalUbuntu=new e("terminal-ubuntu",{fontCharacter:"\\ebc9"}),e.terminalBash=new e("terminal-bash",{fontCharacter:"\\ebca"}),e.arrowSwap=new e("arrow-swap",{fontCharacter:"\\ebcb"}),e.copy=new e("copy",{fontCharacter:"\\ebcc"}),e.personAdd=new e("person-add",{fontCharacter:"\\ebcd"}),e.filterFilled=new e("filter-filled",{fontCharacter:"\\ebce"}),e.wand=new e("wand",{fontCharacter:"\\ebcf"}),e.debugLineByLine=new e("debug-line-by-line",{fontCharacter:"\\ebd0"}),e.inspect=new e("inspect",{fontCharacter:"\\ebd1"}),e.layers=new e("layers",{fontCharacter:"\\ebd2"}),e.layersDot=new e("layers-dot",{fontCharacter:"\\ebd3"}),e.layersActive=new e("layers-active",{fontCharacter:"\\ebd4"}),e.compass=new e("compass",{fontCharacter:"\\ebd5"}),e.compassDot=new e("compass-dot",{fontCharacter:"\\ebd6"}),e.compassActive=new e("compass-active",{fontCharacter:"\\ebd7"}),e.azure=new e("azure",{fontCharacter:"\\ebd8"}),e.issueDraft=new e("issue-draft",{fontCharacter:"\\ebd9"}),e.gitPullRequestClosed=new e("git-pull-request-closed",{fontCharacter:"\\ebda"}),e.gitPullRequestDraft=new e("git-pull-request-draft",{fontCharacter:"\\ebdb"}),e.debugAll=new e("debug-all",{fontCharacter:"\\ebdc"}),e.debugCoverage=new e("debug-coverage",{fontCharacter:"\\ebdd"}),e.runErrors=new e("run-errors",{fontCharacter:"\\ebde"}),e.folderLibrary=new e("folder-library",{fontCharacter:"\\ebdf"}),e.debugContinueSmall=new e("debug-continue-small",{fontCharacter:"\\ebe0"}),e.beakerStop=new e("beaker-stop",{fontCharacter:"\\ebe1"}),e.graphLine=new e("graph-line",{fontCharacter:"\\ebe2"}),e.graphScatter=new e("graph-scatter",{fontCharacter:"\\ebe3"}),e.pieChart=new e("pie-chart",{fontCharacter:"\\ebe4"}),e.bracket=new e("bracket",e.json.definition),e.bracketDot=new e("bracket-dot",{fontCharacter:"\\ebe5"}),e.bracketError=new e("bracket-error",{fontCharacter:"\\ebe6"}),e.lockSmall=new e("lock-small",{fontCharacter:"\\ebe7"}),e.azureDevops=new e("azure-devops",{fontCharacter:"\\ebe8"}),e.verifiedFilled=new e("verified-filled",{fontCharacter:"\\ebe9"})}($||($={}))},WaYH:function(wt,Be,G){"use strict";var Ae=G("rePB"),z=G("Ff2n"),U=G("VTBJ"),V=G("1OyB"),N=G("vuIU"),L=G("JX7q"),$=G("Ji7U"),H=G("LK+K"),e=G("q1tI"),R=G("TSYQ"),u=G.n(R),f=G("sboe"),l=G("OZM5"),s=function(B){var x=B.prefixCls,h=B.level,d=B.isStart,A=B.isEnd;if(!h)return null;for(var c="".concat(x,"-indent-unit"),w=[],m=0;m<h;m+=1){var g;w.push(e.createElement("span",{key:m,className:u()(c,(g={},Object(Ae.a)(g,"".concat(c,"-start"),d[m+1]),Object(Ae.a)(g,"".concat(c,"-end"),A[m+1]),Object(Ae.a)(g,"".concat(c,"-end-first-level"),!m&&A[0]),g))}))}return e.createElement("span",{"aria-hidden":"true",className:"".concat(x,"-indent")},w)},i=s,o=G("815F"),r="open",a="close",n="---",t=function(_){Object($.a)(x,_);var B=Object(H.a)(x);function x(){var h;return Object(V.a)(this,x),h=B.apply(this,arguments),h.state={dragNodeHighlight:!1},h.onSelectorClick=function(d){var A=h.props.context.onNodeClick;A(d,Object(o.b)(h.props)),h.isSelectable()?h.onSelect(d):h.onCheck(d)},h.onSelectorDoubleClick=function(d){var A=h.props.context.onNodeDoubleClick;A(d,Object(o.b)(h.props))},h.onSelect=function(d){if(h.isDisabled())return;var A=h.props.context.onNodeSelect;d.preventDefault(),A(d,Object(o.b)(h.props))},h.onCheck=function(d){if(h.isDisabled())return;var A=h.props,c=A.disableCheckbox,w=A.checked,m=h.props.context.onNodeCheck;if(!h.isCheckable()||c)return;d.preventDefault();var g=!w;m(d,Object(o.b)(h.props),g)},h.onMouseEnter=function(d){var A=h.props.context.onNodeMouseEnter;A(d,Object(o.b)(h.props))},h.onMouseLeave=function(d){var A=h.props.context.onNodeMouseLeave;A(d,Object(o.b)(h.props))},h.onContextMenu=function(d){var A=h.props.context.onNodeContextMenu;A(d,Object(o.b)(h.props))},h.onDragStart=function(d){var A=h.props.context.onNodeDragStart;d.stopPropagation(),h.setState({dragNodeHighlight:!0}),A(d,Object(L.a)(h));try{d.dataTransfer.setData("text/plain","")}catch(c){}},h.onDragEnter=function(d){var A=h.props.context.onNodeDragEnter;d.preventDefault(),d.stopPropagation(),A(d,Object(L.a)(h))},h.onDragOver=function(d){var A=h.props.context.onNodeDragOver;d.preventDefault(),d.stopPropagation(),A(d,Object(L.a)(h))},h.onDragLeave=function(d){var A=h.props.context.onNodeDragLeave;d.stopPropagation(),A(d,Object(L.a)(h))},h.onDragEnd=function(d){var A=h.props.context.onNodeDragEnd;d.stopPropagation(),h.setState({dragNodeHighlight:!1}),A(d,Object(L.a)(h))},h.onDrop=function(d){var A=h.props.context.onNodeDrop;d.preventDefault(),d.stopPropagation(),h.setState({dragNodeHighlight:!1}),A(d,Object(L.a)(h))},h.onExpand=function(d){var A=h.props.context.onNodeExpand;A(d,Object(o.b)(h.props))},h.setSelectHandle=function(d){h.selectHandle=d},h.getNodeState=function(){var d=h.props.expanded;return h.isLeaf()?null:d?r:a},h.hasChildren=function(){var d=h.props.eventKey,A=h.props.context.keyEntities,c=A[d]||{},w=c.children;return!!(w||[]).length},h.isLeaf=function(){var d=h.props,A=d.isLeaf,c=d.loaded,w=h.props.context.loadData,m=h.hasChildren();return A===!1?!1:A||!w&&!m||w&&c&&!m},h.isDisabled=function(){var d=h.props.disabled,A=h.props.context.disabled;return!!(A||d)},h.isCheckable=function(){var d=h.props.checkable,A=h.props.context.checkable;return!A||d===!1?!1:A},h.syncLoadData=function(d){var A=d.expanded,c=d.loading,w=d.loaded,m=h.props.context,g=m.loadData,F=m.onNodeLoad;if(c)return;g&&A&&!h.isLeaf()&&(!h.hasChildren()&&!w&&F(Object(o.b)(h.props)))},h.renderSwitcher=function(){var d=h.props,A=d.expanded,c=d.switcherIcon,w=h.props.context,m=w.prefixCls,g=w.switcherIcon,F=c||g;if(h.isLeaf())return e.createElement("span",{className:u()("".concat(m,"-switcher"),"".concat(m,"-switcher-noop"))},typeof F=="function"?F(Object(U.a)(Object(U.a)({},h.props),{},{isLeaf:!0})):F);var k=u()("".concat(m,"-switcher"),"".concat(m,"-switcher_").concat(A?r:a));return e.createElement("span",{onClick:h.onExpand,className:k},typeof F=="function"?F(Object(U.a)(Object(U.a)({},h.props),{},{isLeaf:!1})):F)},h.renderCheckbox=function(){var d=h.props,A=d.checked,c=d.halfChecked,w=d.disableCheckbox,m=h.props.context.prefixCls,g=h.isDisabled(),F=h.isCheckable();if(!F)return null;var k=typeof F!="boolean"?F:null;return e.createElement("span",{className:u()("".concat(m,"-checkbox"),A&&"".concat(m,"-checkbox-checked"),!A&&c&&"".concat(m,"-checkbox-indeterminate"),(g||w)&&"".concat(m,"-checkbox-disabled")),onClick:h.onCheck},k)},h.renderIcon=function(){var d=h.props.loading,A=h.props.context.prefixCls;return e.createElement("span",{className:u()("".concat(A,"-iconEle"),"".concat(A,"-icon__").concat(h.getNodeState()||"docu"),d&&"".concat(A,"-icon_loading"))})},h.renderSelector=function(){var d=h.state.dragNodeHighlight,A=h.props,c=A.title,w=A.selected,m=A.icon,g=A.loading,F=A.data,k=h.props.context,S=k.prefixCls,Q=k.showIcon,X=k.icon,P=k.draggable,q=k.loadData,ie=k.titleRender,be=h.isDisabled(),me="".concat(S,"-node-content-wrapper"),Me;if(Q){var Ne=m||X;Me=Ne?e.createElement("span",{className:u()("".concat(S,"-iconEle"),"".concat(S,"-icon__customize"))},typeof Ne=="function"?Ne(h.props):Ne):h.renderIcon()}else q&&g&&(Me=h.renderIcon());var ke;typeof c=="function"?ke=c(F):ie?ke=ie(F):ke=c;var Ke=e.createElement("span",{className:"".concat(S,"-title")},ke);return e.createElement("span",{ref:h.setSelectHandle,title:typeof c=="string"?c:"",className:u()("".concat(me),"".concat(me,"-").concat(h.getNodeState()||"normal"),!be&&(w||d)&&"".concat(S,"-node-selected"),!be&&P&&"draggable"),draggable:!be&&P||void 0,"aria-grabbed":!be&&P||void 0,onMouseEnter:h.onMouseEnter,onMouseLeave:h.onMouseLeave,onContextMenu:h.onContextMenu,onClick:h.onSelectorClick,onDoubleClick:h.onSelectorDoubleClick,onDragStart:P?h.onDragStart:void 0},Me,Ke)},h}return Object(N.a)(x,[{key:"componentDidMount",value:function(){this.syncLoadData(this.props)}},{key:"componentDidUpdate",value:function(){this.syncLoadData(this.props)}},{key:"isSelectable",value:function(){var d=this.props.selectable,A=this.props.context.selectable;return typeof d=="boolean"?d:A}},{key:"render",value:function(){var d,A=this.props,c=A.eventKey,w=A.className,m=A.style,g=A.dragOver,F=A.dragOverGapTop,k=A.dragOverGapBottom,S=A.isLeaf,Q=A.isStart,X=A.isEnd,P=A.expanded,q=A.selected,ie=A.checked,be=A.halfChecked,me=A.loading,Me=A.domRef,Ne=A.active,ke=A.onMouseMove,Ke=Object(z.a)(A,["eventKey","className","style","dragOver","dragOverGapTop","dragOverGapBottom","isLeaf","isStart","isEnd","expanded","selected","checked","halfChecked","loading","domRef","active","onMouseMove"]),Ye=this.props.context,_e=Ye.prefixCls,Te=Ye.filterTreeNode,Pe=Ye.draggable,bt=Ye.keyEntities,mt=this.isDisabled(),dt=Object(l.f)(Ke),yt=bt[c]||{},le=yt.level,Z=X[X.length-1];return e.createElement("div",Object.assign({ref:Me,className:u()(w,"".concat(_e,"-treenode"),(d={},Object(Ae.a)(d,"".concat(_e,"-treenode-disabled"),mt),Object(Ae.a)(d,"".concat(_e,"-treenode-switcher-").concat(P?"open":"close"),!S),Object(Ae.a)(d,"".concat(_e,"-treenode-checkbox-checked"),ie),Object(Ae.a)(d,"".concat(_e,"-treenode-checkbox-indeterminate"),be),Object(Ae.a)(d,"".concat(_e,"-treenode-selected"),q),Object(Ae.a)(d,"".concat(_e,"-treenode-loading"),me),Object(Ae.a)(d,"".concat(_e,"-treenode-active"),Ne),Object(Ae.a)(d,"".concat(_e,"-treenode-leaf-last"),Z),Object(Ae.a)(d,"drag-over",!mt&&g),Object(Ae.a)(d,"drag-over-gap-top",!mt&&F),Object(Ae.a)(d,"drag-over-gap-bottom",!mt&&k),Object(Ae.a)(d,"filter-node",Te&&Te(Object(o.b)(this.props))),d)),style:m,onDragEnter:Pe?this.onDragEnter:void 0,onDragOver:Pe?this.onDragOver:void 0,onDragLeave:Pe?this.onDragLeave:void 0,onDrop:Pe?this.onDrop:void 0,onDragEnd:Pe?this.onDragEnd:void 0,onMouseMove:ke},dt),e.createElement(i,{prefixCls:_e,level:le,isStart:Q,isEnd:X}),this.renderSwitcher(),this.renderCheckbox(),this.renderSelector())}}]),x}(e.Component),E=function(B){return e.createElement(f.a.Consumer,null,function(x){return e.createElement(t,Object.assign({},B,{context:x}))})};E.displayName="TreeNode",E.defaultProps={title:n},E.isTreeNode=1;var b=Be.a=E},Y1PL:function(wt,Be,G){"use strict";G.r(Be),G.d(Be,"ResizableTextArea",function(){return be});var Ae=G("wx14"),z=G("1OyB"),U=G("vuIU"),V=G("Ji7U"),N=G("LK+K"),L=G("q1tI"),$=G("VTBJ"),H=G("rePB"),e=G("Zm9Q"),R=G("Kwbf"),u=G("c+Xe"),f=G("m+aA"),l=G("bdgK"),s=new Map;function i(Ne){Ne.forEach(function(ke){var Ke,Ye=ke.target;(Ke=s.get(Ye))===null||Ke===void 0||Ke.forEach(function(_e){return _e(Ye)})})}var o=new l.default(i),r=null,a=null;function n(Ne,ke){s.has(Ne)||(s.set(Ne,new Set),o.observe(Ne)),s.get(Ne).add(ke)}function t(Ne,ke){s.has(Ne)&&(s.get(Ne).delete(ke),s.get(Ne).size||(o.unobserve(Ne),s.delete(Ne)))}var E=function(Ne){Object(V.a)(Ke,Ne);var ke=Object(N.a)(Ke);function Ke(){return Object(z.a)(this,Ke),ke.apply(this,arguments)}return Object(U.a)(Ke,[{key:"render",value:function(){return this.props.children}}]),Ke}(L.Component),b=L.createContext(null);function _(Ne){var ke=Ne.children,Ke=Ne.onBatchResize,Ye=L.useRef(0),_e=L.useRef([]),Te=L.useContext(b),Pe=L.useCallback(function(bt,mt,dt){Ye.current+=1;var yt=Ye.current;_e.current.push({size:bt,element:mt,data:dt}),Promise.resolve().then(function(){yt===Ye.current&&(Ke==null||Ke(_e.current),_e.current=[])}),Te==null||Te(bt,mt,dt)},[Ke,Te]);return L.createElement(b.Provider,{value:Pe},ke)}function B(Ne){var ke=Ne.children,Ke=Ne.disabled,Ye=L.useRef(null),_e=L.useRef(null),Te=L.useContext(b),Pe=L.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),bt=L.isValidElement(ke)&&Object(u.c)(ke),mt=bt?ke.ref:null,dt=L.useMemo(function(){return Object(u.a)(mt,Ye)},[mt,Ye]),yt=L.useRef(Ne);yt.current=Ne;var le=L.useCallback(function(Z){var te=yt.current,ee=te.onResize,ue=te.data,ye=Z.getBoundingClientRect(),ve=ye.width,Je=ye.height,tt=Z.offsetWidth,it=Z.offsetHeight,st=Math.floor(ve),ht=Math.floor(Je);if(Pe.current.width!==st||Pe.current.height!==ht||Pe.current.offsetWidth!==tt||Pe.current.offsetHeight!==it){var _t={width:st,height:ht,offsetWidth:tt,offsetHeight:it};Pe.current=_t;var He=tt===Math.round(ve)?ve:tt,Xe=it===Math.round(Je)?Je:it,at=Object($.a)(Object($.a)({},_t),{},{offsetWidth:He,offsetHeight:Xe});Te==null||Te(at,Z,ue),ee&&Promise.resolve().then(function(){ee(at,Z)})}},[]);return L.useEffect(function(){var Z=Object(f.a)(Ye.current)||Object(f.a)(_e.current);return Z&&!Ke&&n(Z,le),function(){return t(Z,le)}},[Ye.current,Ke]),L.createElement(E,{ref:_e},bt?L.cloneElement(ke,{ref:dt}):ke)}var x="rc-observer-key";function h(Ne){var ke=Ne.children,Ke=Object(e.a)(ke);return Ke.map(function(Ye,_e){var Te=(Ye==null?void 0:Ye.key)||"".concat(x,"-").concat(_e);return L.createElement(B,Object(Ae.a)({},Ne,{key:Te}),Ye)})}h.Collection=_;var d=h,A=G("bT9E"),c=G("TSYQ"),w=G.n(c),m=`
|
|
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
|
|
`,g=["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"],F={},k;function S(Ne){var ke=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Ke=Ne.getAttribute("id")||Ne.getAttribute("data-reactid")||Ne.getAttribute("name");if(ke&&F[Ke])return F[Ke];var Ye=window.getComputedStyle(Ne),_e=Ye.getPropertyValue("box-sizing")||Ye.getPropertyValue("-moz-box-sizing")||Ye.getPropertyValue("-webkit-box-sizing"),Te=parseFloat(Ye.getPropertyValue("padding-bottom"))+parseFloat(Ye.getPropertyValue("padding-top")),Pe=parseFloat(Ye.getPropertyValue("border-bottom-width"))+parseFloat(Ye.getPropertyValue("border-top-width")),bt=g.map(function(dt){return"".concat(dt,":").concat(Ye.getPropertyValue(dt))}).join(";"),mt={sizingStyle:bt,paddingSize:Te,borderSize:Pe,boxSizing:_e};return ke&&Ke&&(F[Ke]=mt),mt}function Q(Ne){var ke=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Ke=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,Ye=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;k||(k=document.createElement("textarea"),k.setAttribute("tab-index","-1"),k.setAttribute("aria-hidden","true"),document.body.appendChild(k)),Ne.getAttribute("wrap")?k.setAttribute("wrap",Ne.getAttribute("wrap")):k.removeAttribute("wrap");var _e=S(Ne,ke),Te=_e.paddingSize,Pe=_e.borderSize,bt=_e.boxSizing,mt=_e.sizingStyle;k.setAttribute("style","".concat(mt,";").concat(m)),k.value=Ne.value||Ne.placeholder||"";var dt=Number.MIN_SAFE_INTEGER,yt=Number.MAX_SAFE_INTEGER,le=k.scrollHeight,Z;if(bt==="border-box"?le+=Pe:bt==="content-box"&&(le-=Te),Ke!==null||Ye!==null){k.value=" ";var te=k.scrollHeight-Te;Ke!==null&&(dt=te*Ke,bt==="border-box"&&(dt=dt+Te+Pe),le=Math.max(dt,le)),Ye!==null&&(yt=te*Ye,bt==="border-box"&&(yt=yt+Te+Pe),Z=le>yt?"":"hidden",le=Math.min(yt,le))}return{height:le,minHeight:dt,maxHeight:yt,overflowY:Z,resize:"none"}}var X=G("Gytx"),P=G.n(X),q;(function(Ne){Ne[Ne.NONE=0]="NONE",Ne[Ne.RESIZING=1]="RESIZING",Ne[Ne.RESIZED=2]="RESIZED"})(q||(q={}));var ie=function(Ne){Object(V.a)(Ke,Ne);var ke=Object(N.a)(Ke);function Ke(Ye){var _e;return Object(z.a)(this,Ke),_e=ke.call(this,Ye),_e.nextFrameActionId=void 0,_e.resizeFrameId=void 0,_e.textArea=void 0,_e.saveTextArea=function(Te){_e.textArea=Te},_e.handleResize=function(Te){var Pe=_e.state.resizeStatus,bt=_e.props,mt=bt.autoSize,dt=bt.onResize;if(Pe!==q.NONE)return;typeof dt=="function"&&dt(Te),mt&&_e.resizeOnNextFrame()},_e.resizeOnNextFrame=function(){cancelAnimationFrame(_e.nextFrameActionId),_e.nextFrameActionId=requestAnimationFrame(_e.resizeTextarea)},_e.resizeTextarea=function(){var Te=_e.props.autoSize;if(!Te||!_e.textArea)return;var Pe=Te.minRows,bt=Te.maxRows,mt=Q(_e.textArea,!1,Pe,bt);_e.setState({textareaStyles:mt,resizeStatus:q.RESIZING},function(){cancelAnimationFrame(_e.resizeFrameId),_e.resizeFrameId=requestAnimationFrame(function(){_e.setState({resizeStatus:q.RESIZED},function(){_e.resizeFrameId=requestAnimationFrame(function(){_e.setState({resizeStatus:q.NONE}),_e.fixFirefoxAutoScroll()})})})})},_e.renderTextArea=function(){var Te=_e.props,Pe=Te.prefixCls,bt=Pe===void 0?"rc-textarea":Pe,mt=Te.autoSize,dt=Te.onResize,yt=Te.className,le=Te.disabled,Z=_e.state,te=Z.textareaStyles,ee=Z.resizeStatus,ue=Object(A.a)(_e.props,["prefixCls","onPressEnter","autoSize","defaultValue","onResize"]),ye=w()(bt,yt,Object(H.a)({},"".concat(bt,"-disabled"),le));"value"in ue&&(ue.value=ue.value||"");var ve=Object($.a)(Object($.a)(Object($.a)({},_e.props.style),te),ee===q.RESIZING?{overflowX:"hidden",overflowY:"hidden"}:null);return L.createElement(d,{onResize:_e.handleResize,disabled:!(mt||dt)},L.createElement("textarea",Object(Ae.a)({},ue,{className:ye,style:ve,ref:_e.saveTextArea})))},_e.state={textareaStyles:{},resizeStatus:q.NONE},_e}return Object(U.a)(Ke,[{key:"componentDidUpdate",value:function(_e){(_e.value!==this.props.value||!P()(_e.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 _e=this.textArea.selectionStart,Te=this.textArea.selectionEnd;this.textArea.setSelectionRange(_e,Te)}}catch(Pe){}}},{key:"render",value:function(){return this.renderTextArea()}}]),Ke}(L.Component),be=ie,me=function(Ne){Object(V.a)(Ke,Ne);var ke=Object(N.a)(Ke);function Ke(Ye){var _e;Object(z.a)(this,Ke),_e=ke.call(this,Ye),_e.resizableTextArea=void 0,_e.focus=function(){_e.resizableTextArea.textArea.focus()},_e.saveTextArea=function(Pe){_e.resizableTextArea=Pe},_e.handleChange=function(Pe){var bt=_e.props.onChange;_e.setValue(Pe.target.value,function(){_e.resizableTextArea.resizeTextarea()}),bt&&bt(Pe)},_e.handleKeyDown=function(Pe){var bt=_e.props,mt=bt.onPressEnter,dt=bt.onKeyDown;Pe.keyCode===13&&mt&&mt(Pe),dt&&dt(Pe)};var Te=typeof Ye.value=="undefined"||Ye.value===null?Ye.defaultValue:Ye.value;return _e.state={value:Te},_e}return Object(U.a)(Ke,[{key:"setValue",value:function(_e,Te){"value"in this.props||this.setState({value:_e},Te)}},{key:"blur",value:function(){this.resizableTextArea.textArea.blur()}},{key:"render",value:function(){return L.createElement(be,Object(Ae.a)({},this.props,{value:this.state.value,onKeyDown:this.handleKeyDown,onChange:this.handleChange,ref:this.saveTextArea}))}}],[{key:"getDerivedStateFromProps",value:function(_e){return"value"in _e?{value:_e.value}:null}}]),Ke}(L.Component),Me=Be.default=me},ZW9T:function(wt,Be,G){"use strict";G.d(Be,"a",function(){return X});var Ae=G("k1fw"),z=G("oBTY"),U=G("miYZ"),V=G("tsqr"),N=G("rAM+"),L=G("tJVT"),$=G("PpiC"),H=G("q1tI"),e=G.n(H),R=G("bdgK"),u=G("9og8"),f=G("WmNS"),l=G.n(f),s={keywords:["print","auto","break","case","char","const","continue","default","do","double","else","enum","extern","float","for","goto","if","int","long","register","return","short","signed","sizeof","static","struct","switch","typedef","union","unsigned","void","volatile","while"]},i={quickKey:[{label:"main",content:["public static void main(String[] args) {"," $0","}"].join(`
|
|
`)},{label:"System.out.println",content:["System.out.println($0)"].join(`
|
|
`)},{label:"System.out.print",content:["System.out.print($0)"].join(`
|
|
`)}],keywords:["abstract","continue","for","new","switch","assert","default","goto","package","synchronized","boolean","do","if","private","this","break","double","implements","protected","throw","byte","else","import","public","throws","case","enum","instanceof","return","transient","catch","extends","int","short","try","char","final","interface","static","void","class","finally","long","strictfp","volatile","const","float","native","super","while","true","false"]},o={keywords:["abstract","amp","array","auto","bool","break","case","catch","char","class","const","constexpr","const_cast","continue","cpu","decltype","default","delegate","delete","do","double","dynamic_cast","each","else","enum","event","explicit","export","extern","false","final","finally","float","friend","gcnew","generic","goto","in","initonly","inline","int","interface","interior_ptr","internal","literal","long","mutable","namespace","new","noexcept","nullptr","__nullptr","operator","override","partial","pascal","pin_ptr","private","property","protected","public","ref","register","reinterpret_cast","restrict","return","safe_cast","sealed","short","signed","sizeof","static","static_assert","static_cast","struct","switch","template","this","thread_local","throw","tile_static","true","try","typedef","typeid","typename","union","unsigned","using","virtual","void","volatile","wchar_t","where","while","_asm","_based","_cdecl","_declspec","_fastcall","_if_exists","_if_not_exists","_inline","_multiple_inheritance","_pascal","_single_inheritance","_stdcall","_virtual_inheritance","_w64","__abstract","__alignof","__asm","__assume","__based","__box","__builtin_alignof","__cdecl","__clrcall","__declspec","__delegate","__event","__except","__fastcall","__finally","__forceinline","__gc","__hook","__identifier","__if_exists","__if_not_exists","__inline","__int128","__int16","__int32","__int64","__int8","__interface","__leave","__m128","__m128d","__m128i","__m256","__m256d","__m256i","__m64","__multiple_inheritance","__newslot","__nogc","__noop","__nounwind","__novtordisp","__pascal","__pin","__pragma","__property","__ptr32","__ptr64","__raise","__restrict","__resume","__sealed","__single_inheritance","__stdcall","__super","__thiscall","__try","__try_cast","__typeof","__unaligned","__unhook","__uuidof","__value","__virtual_inheritance","__w64","__wchar_t"],operators:["=",">","<","!","~","?",":","==","<=",">=","!=","&&","||","++","--","+","-","*","/","&","|","^","%","<<",">>",">>>","+=","-=","*=","/=","&=","|=","^=","%=","<<=",">>=",">>>="],quickKey:[{label:"ifelse",content:["if (${1:condition}) {"," $0","} else {"," ","}"].join(`
|
|
`)},{label:"include",content:"include<$0>"},{label:"printf",content:"printf($0)"},{label:"system",content:'system("$0")'},{label:"main",content:["int main () {"," $0","}"].join(`
|
|
`)},{label:"if",content:["if () {"," $0","}"].join(`
|
|
`)},{label:"for",content:["for(int j=0 ; j<10; j++){"," $0","}"].join(`
|
|
`)},{label:"trycatch",content:["try{"," $0","}catch(ExceptionName e){","}"].join(`
|
|
`)},{label:"using namespace std;",content:["using namespace std;"].join(`
|
|
`)},{label:"include <iostream>",content:["#include <iostream>"].join(`
|
|
`)},{label:"include <vector>",content:["#include <vector>"].join(`
|
|
`)},{label:"include <cstdio>",content:["#include <cstdio>"].join(`
|
|
`)},{label:"include <cstring>",content:["#include <cstring>"].join(`
|
|
`)},{label:"include <sstream>",content:["#include <sstream>"].join(`
|
|
`)},{label:"include <fstream>",content:["#include <fstream>"].join(`
|
|
`)},{label:"include <map>",content:["#include <map>"].join(`
|
|
`)},{label:"include <string>",content:["#include <string>"].join(`
|
|
`)},{label:"include <cmath>",content:["#include <cmath>"].join(`
|
|
`)}]},r={keywords:["and","as","assert","break","class","continue","def","del","elif","else","except","exec","finally","for","from","global","if","import","in","is","lambda","None","not","or","pass","raise","return","self","try","while","with","yield","int","float","long","complex","hex","abs","all","any","apply","basestring","bin","bool","buffer","bytearray","callable","chr","classmethod","cmp","coerce","compile","complex","delattr","dict","dir","divmod","enumerate","eval","execfile","file","filter","format","frozenset","getattr","globals","hasattr","hash","help","id","input","intern","isinstance","issubclass","iter","len","locals","list","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","reversed","range","raw_input","reduce","reload","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","unichr","unicode","vars","xrange","zip","True","False","__dict__","__methods__","__members__","__class__","__bases__","__name__","__mro__","__subclasses__","__init__","__import__"],quickKey:[{label:"print",content:["print($0)"].join(`
|
|
`)}]},a=G("5VLF"),n=G.n(a),t={languages:["c","abap","apex","azcli","bat","cameligo","clojure","coffee","cpp","csharp","csp","css","dockerfile","fsharp","go","graphql","handlebars","html","ini","java","javascript","json","kotlin","less","lua","markdown","mips","msdax","mysql","objective-c","pascal","pascaligo","perl","pgsql","php","postiats","powerquery","powershell","pug","python","r","razor","redis","redshift","restructuredtext","ruby","rust","sb","scheme","scss","shell","solidity","sophia","sql","st","swift","tcl","twig","vb","xml","yaml'"],tables:{users:["name","id","email","phone","password"],roles:["id","name","order","created_at","updated_at","deleted_at"]}},E=function(q,ie){return ie.map(function(be){return{label:be,kind:q.languages.CompletionItemKind.Keyword,insertText:be}})},b=function(q){return Object.keys(t.tables).map(function(ie){return{label:ie,kind:q.languages.CompletionItemKind.Variable,insertText:ie}})},_=function(q,ie){var be=t.tables[q];return be?be.map(function(me){return{label:me,kind:ie.languages.CompletionItemKind.Field,insertText:me}}):[]};function B(P,q,ie,be,me){var Me=q.getWordUntilPosition(ie),Ne={startLineNumber:ie.lineNumber,endLineNumber:ie.lineNumber,startColumn:Me.startColumn,endColumn:Me.endColumn},ke=be.map(function(Ke){return{label:Ke,kind:P.languages.CompletionItemKind.Keyword,insertText:Ke,insertTextRules:P.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Ne}});return me.map(function(Ke){ke.push(Object(Ae.a)(Object(Ae.a)({},Ke),{},{range:Ne}))}),ke}var x=function(P){t.languages.map(function(me){return P.languages.registerDocumentFormattingEditProvider(me,{provideDocumentFormattingEdits:function(Ne,ke,Ke){return Object(u.a)(l.a.mark(function Ye(){var _e;return l.a.wrap(function(Pe){for(;;)switch(Pe.prev=Pe.next){case 0:return _e=n()(Ne.getValue(),{indent_size:"2",indent_char:" ",max_preserve_newlines:"2",preserve_newlines:!0,keep_array_indentation:!0,break_chained_methods:!1,indent_scripts:"normal",brace_style:"collapse",space_before_conditional:!0,unescape_strings:!1,jslint_happy:!1,end_with_newline:!0,wrap_line_length:"0",indent_inner_html:!1,comma_first:!1,e4x:!1,indent_empty_lines:!1}),Pe.abrupt("return",[{range:Ne.getFullModelRange(),text:_e}]);case 2:case"end":return Pe.stop()}},Ye)}))()}}),me});var q=o.quickKey.map(function(me){return{label:me.label,kind:P.languages.CompletionItemKind.Method,insertText:me.content,insertTextRules:P.languages.CompletionItemInsertTextRule.InsertAsSnippet}}),ie=r.quickKey.map(function(me){return{label:me.label,kind:P.languages.CompletionItemKind.Method,insertText:me.content,insertTextRules:P.languages.CompletionItemInsertTextRule.InsertAsSnippet}}),be=i.quickKey.map(function(me){return{label:me.label,kind:P.languages.CompletionItemKind.Method,insertText:me.content,insertTextRules:P.languages.CompletionItemInsertTextRule.InsertAsSnippet}});P.languages.registerCompletionItemProvider("cpp",{provideCompletionItems:function(Me,Ne){var ke=Me.getWordUntilPosition(Ne),Ke={startLineNumber:Ne.lineNumber,endLineNumber:Ne.lineNumber,startColumn:ke.startColumn,endColumn:ke.endColumn},Ye=Me.getLineContent(Ne.lineNumber).substring(ke.startColumn-2,ke.endColumn);return{suggestions:[].concat(Object(z.a)(o.keywords.map(function(_e){return{label:_e,kind:P.languages.CompletionItemKind.Function,documentation:_e,insertText:_e,insertTextRules:P.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Ke}})),Object(z.a)(o.quickKey.map(function(_e){return{label:_e.label,kind:P.languages.CompletionItemKind.Function,documentation:_e.content,insertText:Ye.startsWith("#")?_e.content.replace(/#/,""):_e.content,insertTextRules:P.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Ke}})))}}}),P.languages.registerCompletionItemProvider("c",{provideCompletionItems:function(Me,Ne){var ke=Me.getWordUntilPosition(Ne),Ke={startLineNumber:Ne.lineNumber,endLineNumber:Ne.lineNumber,startColumn:ke.startColumn,endColumn:ke.endColumn};return{suggestions:Object(z.a)(s.keywords.map(function(Ye){return{label:Ye,kind:P.languages.CompletionItemKind.Function,documentation:Ye,insertText:Ye,insertTextRules:P.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Ke}}))}}}),P.languages.registerCompletionItemProvider("java",{provideCompletionItems:function(Me,Ne){var ke=Me.getWordUntilPosition(Ne),Ke={startLineNumber:Ne.lineNumber,endLineNumber:Ne.lineNumber,startColumn:ke.startColumn,endColumn:ke.endColumn},Ye=Me.getLineContent(Ne.lineNumber).substring(ke.startColumn-2,ke.endColumn);return{suggestions:[].concat(Object(z.a)(i.keywords.map(function(_e){return{label:_e,kind:P.languages.CompletionItemKind.Function,documentation:_e,insertText:_e,insertTextRules:P.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Ke}})),Object(z.a)(i.quickKey.map(function(_e){return{label:_e.label,kind:P.languages.CompletionItemKind.Function,documentation:_e.content,insertText:Ye.startsWith("#")?_e.content.replace(/#/,""):_e.content,insertTextRules:P.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Ke}})))}}}),P.languages.registerCompletionItemProvider("python",{provideCompletionItems:function(Me,Ne){var ke=Me.getWordUntilPosition(Ne),Ke={startLineNumber:Ne.lineNumber,endLineNumber:Ne.lineNumber,startColumn:ke.startColumn,endColumn:ke.endColumn},Ye=Me.getLineContent(Ne.lineNumber).substring(ke.startColumn-2,ke.endColumn);return{suggestions:[].concat(Object(z.a)(r.keywords.map(function(_e){return{label:_e,kind:P.languages.CompletionItemKind.Function,documentation:_e,insertText:_e,insertTextRules:P.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Ke}})),Object(z.a)(r.quickKey.map(function(_e){return{label:_e.label,kind:P.languages.CompletionItemKind.Function,documentation:_e.content,insertText:Ye.startsWith("#")?_e.content.replace(/#/,""):_e.content,insertTextRules:P.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Ke}})))}}})},h="\u8BE5\u4EFB\u52A1\u5173\u5361\u8BBE\u7F6E\u4E86\u7981\u6B62\u590D\u5236\u7C98\u8D34\uFF0C\u8BF7\u624B\u52A8\u8F93\u5165\u4EE3\u7801\u3002",d=G("fjLI"),A=G("LvDl"),c=G("+ua5");function w(P){return/^\d+$/.test(P)?"".concat(P,"px"):P}function m(){}var g=!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 k(){var P=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],q=P;if(Array.isArray(P)){for(var ie=0;ie<P.length;ie++){var be=F[P[ie]];if(be)return be}return q[0]}return F[q]||q}var S=null,Q=Be.b=function(P){var q=P.width,ie=q===void 0?"100%":q,be=P.height,me=be===void 0?"100%":be,Me=P.value,Ne=P.language,ke=Ne===void 0?"javascript":Ne,Ke=P.style,Ye=Ke===void 0?{}:Ke,_e=P.options,Te=_e===void 0?{}:_e,Pe=P.overrideServices,bt=Pe===void 0?{}:Pe,mt=P.theme,dt=mt===void 0?"vs-dark":mt,yt=P.onEditBlur,le=P.onSave,Z=P.autoHeight,te=Z===void 0?!1:Z,ee=P.forbidCopy,ue=ee===void 0?!1:ee,ye=P.onChange,ve=ye===void 0?m:ye,Je=P.editorDidMount,tt=Je===void 0?m:Je,it=P.onFocus,st=it===void 0?m:it,ht=P.filename,_t=ht===void 0?"educoder.txt":ht,He=P.errorLine,Xe=P.errorContent,at=Xe===void 0?"":Xe,ut=Object($.a)(P,["width","height","value","language","style","options","overrideServices","theme","onEditBlur","onSave","autoHeight","forbidCopy","onChange","editorDidMount","onFocus","filename","errorLine","errorContent"]),$e=Object(H.useRef)(),qe=Object(H.useRef)({}),De=Object(H.useRef)(),xe=Object(H.useRef)(),Se=Object(H.useRef)(!1),oe=Object(H.useRef)(),ce=Object(H.useState)(!1),Ee=Object(L.a)(ce,2),Ce=Ee[0],Ge=Ee[1];function et(){var kt;return $e.current&&(kt=new R.default(function(Ut){var $t=Object(N.a)(Ut),vr;try{for($t.s();!(vr=$t.n()).done;){var Wr=vr.value;(Wr.target.offsetHeight>0||Wr.target.offsetWidth>0)&&qe.current.instance.layout()}}catch(Gr){$t.e(Gr)}finally{$t.f()}}),kt.observe($e.current)),kt}function pt(){V.b.warn(decodeURIComponent(h))}var Bt=function(){var Ut=qe.current.instance;if(Me!=null&&Ut&&Ce){var $t=Ut.getModel();$t&&Me!==$t.getValue()&&(g=!0,$t.setValue(Me),Ut.layout(),g=!1)}};Object(H.useEffect)(function(){xe.current&&clearTimeout(xe.current),xe.current=setTimeout(function(){Bt()},500)},[Me,Ce,qe.current]),Object(H.useEffect)(function(){if(He&&qe.current&&qe.current.instance){var kt=qe.current.instance;kt.changeViewZones(function($t){var vr=document.createElement("div");vr.style.padding="10px 20px",vr.style.width="calc(100% - 20px)",vr.className="my-error-line-wrp",vr.innerHTML=at,$t.addZone({afterLineNumber:He||11,heightInLines:3,domNode:vr})});var Ut={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}};kt.addOverlayWidget(Ut),kt.revealPositionInCenter({lineNumber:20,column:1})}},[He,qe.current,Ce]);function Dt(){var kt=qe.current.instance;if(kt){var Ut=kt.getSelection(),$t=qe.current.pastePos||{},vr=new S.Range($t.startLineNumber||Ut.endLineNumber,$t.startColumn||Ut.endColumn,$t.endLineNumber||Ut.endLineNumber,$t.endColumn||Ut.endColumn);setTimeout(function(){kt.executeEdits("",[{range:vr,text:""}])},300)}}function xt(kt){(window.navigator.platform.match("Mac")?kt.metaKey:kt.ctrlKey)&&kt.keyCode==83&&(kt.preventDefault(),le())}var tr=function(){if(te&&qe.current.instance){var Ut=qe.current.instance.getContentHeight();Et(Ut<me?me:Ut)}else Et(me)};function Xt(kt){var Ut=document.createEvent("MouseEvents");Ut.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),kt.dispatchEvent(Ut)}function gt(kt,Ut){var $t=window.URL||window.webkitURL||window,vr=new Blob([Ut]),Wr=document.createElementNS("http://www.w3.org/1999/xhtml","a");Wr.href=$t.createObjectURL(vr),Wr.download=kt,Xt(Wr)}Object(H.useEffect)(function(){tr()},[tr]),Object(H.useEffect)(function(){$e.current&&!Ce&&Promise.all([G.e(16),G.e(28)]).then(G.t.bind(null,"M/lh",7)).then(function(kt){try{S=kt,qe.current.instance=S.editor.create($e.current,{value:Me,language:k(ke),theme:dt,requireConfig:{"vs/nls":{availableLanguages:{"*":"zh-cn"}}},wordWrap:!0,autoIndent:!0,contextmenu:!0,formatOnType:!0},bt);var Ut=qe.current.instance,$t=d.d._menuItems,vr=Object(z.a)($t).find(function(dr){return dr[0]._debugName=="EditorContext"}),Wr=vr[1],Gr=["editor.action.clipboardCopyWithSyntaxHighlightingAction","editor.action.quickCommand","editor.action.clipboardCopyAction","editor.action.clipboardPasteAction","editor.action.clipboardCutAction"],Hr=function(Cr,tn){var Br=Cr._first;do{var An,Sr,de=tn.includes((An=Br.element)===null||An===void 0||((Sr=An.command)===null||Sr===void 0)?void 0:Sr.id);de&&Cr._remove(Br)}while(Br=Br.next)};if(tt(Ut,S),setTimeout(function(){tr(),qe.current.instance.addAction({id:"d123123",label:"Download File",contextMenuGroupId:"9_cutcopypaste",run:function(){gt(_t||"educoder.txt",Ut.getValue())}}),Ut.getDomNode().addEventListener("input",function(){De.current.autoFormat&&Ut.getAction("editor.action.formatDocument").run()})},500),qe.current.subscription=Ut.onDidChangeModelContent(function(dr){Se.current?clearTimeout(oe.current):(tr(),ve(Ut.getValue(),dr)),oe.current=setTimeout(function(){Se.current=!1},500)}),window.Monaco||x(S,k(ke)),ue&&(Hr(Wr,Gr),$e.current.classList.add("noCopyPaste"),Ut.onKeyDown(function(dr){var Cr=dr.keyCode,tn=dr.ctrlKey,Br=dr.metaKey;(Cr===33||Cr===52)&&(Br||tn)&&(pt(),dr.preventDefault())})),window.Monaco=S,yt&&Ut.onDidBlurEditorWidget(function(){yt(Ut.getValue())}),st&&Ut.onDidFocusEditorText(function(){st(Ut.getValue())}),ue){Ut.addCommand(S.KeyMod.CtrlCmd|S.KeyCode.KEY_V,function(){return pt(),null}),Ut.onDidPaste(function(dr){qe.current.pastePos=dr});try{window.addEventListener("paste",Dt)}catch(dr){}}var Fr=et();return Ge(!0),function(){var dr=qe.current.instance;dr.dispose();var Cr=dr.getModel();Cr&&Cr.dispose(),qe.current.subscription&&qe.current.subscription.dispose(),ue&&window.removeEventListener("paste",Dt),Fr.unobserve($e.current)}}catch(dr){}})},[]),Object(H.useEffect)(function(){var kt=qe.current.instance;if(kt&&Ce)return document.addEventListener("keydown",xt,!1),function(){document.removeEventListener("keydown",xt)}},[le,Ce]),Object(H.useEffect)(function(){var kt=qe.current.instance;if(kt&&Ce){var Ut=k(ke);S.editor.setModelLanguage(kt.getModel(),Ut),console.log("language:",ke,kt.getModel(),Ut)}},[ke,Ce]),Object(H.useEffect)(function(){var kt=qe.current.instance;kt&&Ce&&S.editor.setTheme(dt)},[dt,Ce]),Object(H.useEffect)(function(){var kt=qe.current.instance;De.current=Te,kt&&Ce&&(kt.updateOptions(Object(Ae.a)({},Te)),setTimeout(function(){kt.getModel().updateOptions(Object(Ae.a)({},Te))},200))},[JSON.stringify(Te),Ce]),Object(H.useEffect)(function(){var kt=qe.current.instance;kt&&Ce&&kt.layout()},[ie,me,Ce]);var Mt=Object(H.useState)(w(ie)),Jt=Object(L.a)(Mt,2),Lt=Jt[0],ar=Jt[1],zt=Object(H.useState)(w(me)),nr=Object(L.a)(zt,2),ur=nr[0],Et=nr[1],_r=Object(Ae.a)(Object(Ae.a)({},Ye),{},{width:Lt,height:ur});return e.a.createElement("div",{className:"my-monaco-editor",ref:$e,style:_r})};function X(P){var q=P.width,ie=q===void 0?"100%":q,be=P.height,me=be===void 0?"100%":be,Me=P.original,Ne=P.modified,ke=P.language,Ke=P.options,Ye=Ke===void 0?{}:Ke,_e=Object(H.useRef)(),Te=Object(H.useState)(null),Pe=Object(L.a)(Te,2),bt=Pe[0],mt=Pe[1];function dt(te){var ee;return _e.current&&(ee=new R.default(function(ue){var ye=Object(N.a)(ue),ve;try{for(ye.s();!(ve=ye.n()).done;){var Je=ve.value;(Je.target.offsetHeight>0||Je.target.offsetWidth>0)&&te.layout()}}catch(tt){ye.e(tt)}finally{ye.f()}}),ee.observe(_e.current)),ee}Object(H.useEffect)(function(){_e.current&&Promise.all([G.e(16),G.e(28)]).then(G.t.bind(null,"M/lh",7)).then(function(te){S=te;var ee=S.editor.createDiffEditor(_e.current,Object(Ae.a)(Object(Ae.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},Ye),{},{wordWrap:!0}));mt(ee);var ue=dt(ee);return function(){ee.dispose();var ye=ee.getModel();ye&&ye.dispose(),ue.unobserve(_e.current)}})},[]),Object(H.useEffect)(function(){bt&&bt.setModel({original:S.editor.createModel(Me,ke),modified:S.editor.createModel(Ne,ke)})},[Me,Ne,ke,bt]);var yt=w(ie),le=w(me),Z={width:yt,height:le};return e.a.createElement("div",{className:"my-diff-editor",ref:_e,style:Z})}},ZWs3:function(wt,Be,G){"use strict";G.d(Be,"a",function(){return u});var Ae=G("+L6B"),z=G("2/Rp"),U=G("0Owb"),V=G("9og8"),N=G("tJVT"),L=G("PpiC"),$=G("WmNS"),H=G.n($),e=G("q1tI"),R=G.n(e),u=function(l){var s=l.children,i=Object(L.a)(l,["children"]),o=Object(e.useState)(!1),r=Object(N.a)(o,2),a=r[0],n=r[1];return R.a.createElement(z.a,Object(U.a)({},i,{loading:a,onClick:function(){var t=Object(V.a)(H.a.mark(function E(b){return H.a.wrap(function(B){for(;;)switch(B.prev=B.next){case 0:return B.prev=0,n(!0),B.next=4,i.onClick(b);case 4:n(!1),B.next=10;break;case 7:B.prev=7,B.t0=B.catch(0),n(!1);case 10:case"end":return B.stop()}},E,null,[[0,7]])}));return function(E){return t.apply(this,arguments)}}()}),s)}},ZpRC:function(wt,Be,G){"use strict";function Ae(u){return typeof u=="object"&&u!=null&&u.nodeType===1}function z(u,f){return(!f||u!=="hidden")&&u!=="visible"&&u!=="clip"}function U(u,f){if(u.clientHeight<u.scrollHeight||u.clientWidth<u.scrollWidth){var l=getComputedStyle(u,null);return z(l.overflowY,f)||z(l.overflowX,f)||function(s){var i=function(o){if(!o.ownerDocument||!o.ownerDocument.defaultView)return null;try{return o.ownerDocument.defaultView.frameElement}catch(r){return null}}(s);return!!i&&(i.clientHeight<s.scrollHeight||i.clientWidth<s.scrollWidth)}(u)}return!1}function V(u,f,l,s,i,o,r,a){return o<u&&r>f||o>u&&r<f?0:o<=u&&a<=l||r>=f&&a>=l?o-u-s:r>f&&a<l||o<u&&a>l?r-f+i:0}var N=function(u,f){var l=window,s=f.scrollMode,i=f.block,o=f.inline,r=f.boundary,a=f.skipOverflowHiddenElements,n=typeof r=="function"?r:function(te){return te!==r};if(!Ae(u))throw new TypeError("Invalid target");for(var t=document.scrollingElement||document.documentElement,E=[],b=u;Ae(b)&&n(b);){if((b=b.parentElement)===t){E.push(b);break}b!=null&&b===document.body&&U(b)&&!U(document.documentElement)||b!=null&&U(b,a)&&E.push(b)}for(var _=l.visualViewport?l.visualViewport.width:innerWidth,B=l.visualViewport?l.visualViewport.height:innerHeight,x=window.scrollX||pageXOffset,h=window.scrollY||pageYOffset,d=u.getBoundingClientRect(),A=d.height,c=d.width,w=d.top,m=d.right,g=d.bottom,F=d.left,k=i==="start"||i==="nearest"?w:i==="end"?g:w+A/2,S=o==="center"?F+c/2:o==="end"?m:F,Q=[],X=0;X<E.length;X++){var P=E[X],q=P.getBoundingClientRect(),ie=q.height,be=q.width,me=q.top,Me=q.right,Ne=q.bottom,ke=q.left;if(s==="if-needed"&&w>=0&&F>=0&&g<=B&&m<=_&&w>=me&&g<=Ne&&F>=ke&&m<=Me)return Q;var Ke=getComputedStyle(P),Ye=parseInt(Ke.borderLeftWidth,10),_e=parseInt(Ke.borderTopWidth,10),Te=parseInt(Ke.borderRightWidth,10),Pe=parseInt(Ke.borderBottomWidth,10),bt=0,mt=0,dt="offsetWidth"in P?P.offsetWidth-P.clientWidth-Ye-Te:0,yt="offsetHeight"in P?P.offsetHeight-P.clientHeight-_e-Pe:0;if(t===P)bt=i==="start"?k:i==="end"?k-B:i==="nearest"?V(h,h+B,B,_e,Pe,h+k,h+k+A,A):k-B/2,mt=o==="start"?S:o==="center"?S-_/2:o==="end"?S-_:V(x,x+_,_,Ye,Te,x+S,x+S+c,c),bt=Math.max(0,bt+h),mt=Math.max(0,mt+x);else{bt=i==="start"?k-me-_e:i==="end"?k-Ne+Pe+yt:i==="nearest"?V(me,Ne,ie,_e,Pe+yt,k,k+A,A):k-(me+ie/2)+yt/2,mt=o==="start"?S-ke-Ye:o==="center"?S-(ke+be/2)+dt/2:o==="end"?S-Me+Te+dt:V(ke,Me,be,Ye,Te+dt,S,S+c,c);var le=P.scrollLeft,Z=P.scrollTop;k+=Z-(bt=Math.max(0,Math.min(Z+bt,P.scrollHeight-ie+yt))),S+=le-(mt=Math.max(0,Math.min(le+mt,P.scrollWidth-be+dt)))}Q.push({el:P,top:bt,left:mt})}return Q};function L(u){return u===Object(u)&&Object.keys(u).length!==0}function $(u,f){f===void 0&&(f="auto");var l="scrollBehavior"in document.body.style;u.forEach(function(s){var i=s.el,o=s.top,r=s.left;i.scroll&&l?i.scroll({top:o,left:r,behavior:f}):(i.scrollTop=o,i.scrollLeft=r)})}function H(u){return u===!1?{block:"end",inline:"nearest"}:L(u)?u:{block:"start",inline:"nearest"}}function e(u,f){var l=!u.ownerDocument.documentElement.contains(u);if(L(f)&&typeof f.behavior=="function")return f.behavior(l?[]:N(u,f));if(l)return;var s=H(f);return $(N(u,s),s.behavior)}var R=Be.a=e},bT9E:function(wt,Be,G){"use strict";G.d(Be,"a",function(){return z});var Ae=G("VTBJ");function z(U,V){var N=Object(Ae.a)({},U);return Array.isArray(V)&&V.forEach(function(L){delete N[L]}),N}},biw7:function(wt,Be,G){"use strict";var Ae=G("q1tI"),z=G.n(Ae),U=Ae.createContext(null);Be.a=U},crp1:function(wt,Be,G){"use strict";G.d(Be,"b",function(){return Lt}),G.d(Be,"a",function(){return ur});var Ae={},z=function(de,he,we,Qe,lt){var ft=Ae[he]||(Ae[he]=URL.createObjectURL(new Blob([de],{type:"text/javascript"}))),j=new Worker(ft);return j.onerror=function(v){return lt(v.error,null)},j.onmessage=function(v){return lt(null,v.data)},j.postMessage(we,Qe),j},U=Uint8Array,V=Uint16Array,N=Uint32Array,L=new U([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]),$=new U([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]),H=new U([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),e=function(de,he){for(var we=new V(31),Qe=0;Qe<31;++Qe)we[Qe]=he+=1<<de[Qe-1];for(var lt=new N(we[30]),Qe=1;Qe<30;++Qe)for(var ft=we[Qe];ft<we[Qe+1];++ft)lt[ft]=ft-we[Qe]<<5|Qe;return[we,lt]},R=e(L,2),u=R[0],f=R[1];u[28]=258,f[258]=28;for(var l=e($,0),s=l[0],i=l[1],o=new V(32768),r=0;r<32768;++r){var a=(r&43690)>>>1|(r&21845)<<1;a=(a&52428)>>>2|(a&13107)<<2,a=(a&61680)>>>4|(a&3855)<<4,o[r]=((a&65280)>>>8|(a&255)<<8)>>>1}for(var n=function(de,he,we){for(var Qe=de.length,lt=0,ft=new V(he);lt<Qe;++lt)++ft[de[lt]-1];var j=new V(he);for(lt=0;lt<he;++lt)j[lt]=j[lt-1]+ft[lt-1]<<1;var v;if(we){v=new V(1<<he);var C=15-he;for(lt=0;lt<Qe;++lt)if(de[lt])for(var K=lt<<4|de[lt],re=he-de[lt],W=j[de[lt]-1]++<<re,Ie=W|(1<<re)-1;W<=Ie;++W)v[o[W]>>>C]=K}else for(v=new V(Qe),lt=0;lt<Qe;++lt)v[lt]=o[j[de[lt]-1]++]>>>15-de[lt];return v},t=new U(288),r=0;r<144;++r)t[r]=8;for(var r=144;r<256;++r)t[r]=9;for(var r=256;r<280;++r)t[r]=7;for(var r=280;r<288;++r)t[r]=8;for(var E=new U(32),r=0;r<32;++r)E[r]=5;var b=n(t,9,0),_=n(t,9,1),B=n(E,5,0),x=n(E,5,1),h=function(de){for(var he=de[0],we=1;we<de.length;++we)de[we]>he&&(he=de[we]);return he},d=function(de,he,we){var Qe=he/8>>0;return(de[Qe]|de[Qe+1]<<8)>>>(he&7)&we},A=function(de,he){var we=he/8>>0;return(de[we]|de[we+1]<<8|de[we+2]<<16)>>>(he&7)},c=function(de){return(de/8>>0)+(de&7&&1)},w=function(de,he,we){(he==null||he<0)&&(he=0),(we==null||we>de.length)&&(we=de.length);var Qe=new(de instanceof V?V:de instanceof N?N:U)(we-he);return Qe.set(de.subarray(he,we)),Qe},m=function(de,he,we){var Qe=de.length,lt=!he||we,ft=!we||we.i;we||(we={}),he||(he=new U(Qe*3));var j=function(Ar){var zr=he.length;if(Ar>zr){var br=new U(Math.max(zr*2,Ar));br.set(he),he=br}},v=we.f||0,C=we.p||0,K=we.b||0,re=we.l,W=we.d,Ie=we.m,rt=we.n,vt=Qe*8;do{if(!re){we.f=v=d(de,C,1);var Ct=d(de,C+1,3);if(C+=3,Ct)if(Ct==1)re=_,W=x,Ie=9,rt=5;else if(Ct==2){var Ht=d(de,C,31)+257,er=d(de,C+10,15)+4,wr=Ht+d(de,C+5,31)+1;C+=14;for(var sr=new U(wr),hr=new U(19),Zt=0;Zt<er;++Zt)hr[H[Zt]]=d(de,C+Zt*3,7);C+=er*3;var Qr=h(hr),Ir=(1<<Qr)-1;if(!ft&&C+wr*(Qr+7)>vt)break;for(var fr=n(hr,Qr,1),Zt=0;Zt<wr;){var Kr=fr[d(de,C,Ir)];C+=Kr&15;var ot=Kr>>>4;if(ot<16)sr[Zt++]=ot;else{var $r=0,Zr=0;for(ot==16?(Zr=3+d(de,C,3),C+=2,$r=sr[Zt-1]):ot==17?(Zr=3+d(de,C,7),C+=3):ot==18&&(Zr=11+d(de,C,127),C+=7);Zr--;)sr[Zt++]=$r}}var jr=sr.subarray(0,Ht),Or=sr.subarray(Ht);Ie=h(jr),rt=h(Or),re=n(jr,Ie,1),W=n(Or,rt,1)}else throw"invalid block type";else{var ot=c(C)+4,Pt=de[ot-4]|de[ot-3]<<8,Ot=ot+Pt;if(Ot>Qe){if(ft)throw"unexpected EOF";break}lt&&j(K+Pt),he.set(de.subarray(ot,Ot),K),we.b=K+=Pt,we.p=C=Ot*8;continue}if(C>vt)throw"unexpected EOF"}lt&&j(K+131072);for(var Vr=(1<<Ie)-1,Yr=(1<<rt)-1,Jr=Ie+rt+18;ft||C+Jr<vt;){var $r=re[A(de,C)&Vr],sn=$r>>>4;if(C+=$r&15,C>vt)throw"unexpected EOF";if(!$r)throw"invalid length/literal";if(sn<256)he[K++]=sn;else if(sn==256){re=null;break}else{var rn=sn-254;if(sn>264){var Zt=sn-257,Dr=L[Zt];rn=d(de,C,(1<<Dr)-1)+u[Zt],C+=Dr}var ir=W[A(de,C)&Yr],rr=ir>>>4;if(!ir)throw"invalid distance";C+=ir&15;var Or=s[rr];if(rr>3){var Dr=$[rr];Or+=A(de,C)&(1<<Dr)-1,C+=Dr}if(C>vt)throw"unexpected EOF";lt&&j(K+131072);for(var mr=K+rn;K<mr;K+=4)he[K]=he[K-Or],he[K+1]=he[K+1-Or],he[K+2]=he[K+2-Or],he[K+3]=he[K+3-Or];K=mr}}we.l=re,we.p=C,we.b=K,re&&(v=1,we.m=Ie,we.d=W,we.n=rt)}while(!v);return K==he.length?he:w(he,0,K)},g=function(de,he,we){we<<=he&7;var Qe=he/8>>0;de[Qe]|=we,de[Qe+1]|=we>>>8},F=function(de,he,we){we<<=he&7;var Qe=he/8>>0;de[Qe]|=we,de[Qe+1]|=we>>>8,de[Qe+2]|=we>>>16},k=function(de,he){for(var we=[],Qe=0;Qe<de.length;++Qe)de[Qe]&&we.push({s:Qe,f:de[Qe]});var lt=we.length,ft=we.slice();if(!lt)return[new U(0),0];if(lt==1){var j=new U(we[0].s+1);return j[we[0].s]=1,[j,1]}we.sort(function(wr,sr){return wr.f-sr.f}),we.push({s:-1,f:25001});var v=we[0],C=we[1],K=0,re=1,W=2;for(we[0]={s:-1,f:v.f+C.f,l:v,r:C};re!=lt-1;)v=we[we[K].f<we[W].f?K++:W++],C=we[K!=re&&we[K].f<we[W].f?K++:W++],we[re++]={s:-1,f:v.f+C.f,l:v,r:C};for(var Ie=ft[0].s,Qe=1;Qe<lt;++Qe)ft[Qe].s>Ie&&(Ie=ft[Qe].s);var rt=new V(Ie+1),vt=S(we[re-1],rt,0);if(vt>he){var Qe=0,Ct=0,ot=vt-he,Pt=1<<ot;for(ft.sort(function(sr,hr){return rt[hr.s]-rt[sr.s]||sr.f-hr.f});Qe<lt;++Qe){var Ot=ft[Qe].s;if(rt[Ot]>he)Ct+=Pt-(1<<vt-rt[Ot]),rt[Ot]=he;else break}for(Ct>>>=ot;Ct>0;){var Ht=ft[Qe].s;rt[Ht]<he?Ct-=1<<he-rt[Ht]++-1:++Qe}for(;Qe>=0&&Ct;--Qe){var er=ft[Qe].s;rt[er]==he&&(--rt[er],++Ct)}vt=he}return[new U(rt),vt]},S=function(de,he,we){return de.s==-1?Math.max(S(de.l,he,we+1),S(de.r,he,we+1)):he[de.s]=we},Q=function(de){for(var he=de.length;he&&!de[--he];);for(var we=new V(++he),Qe=0,lt=de[0],ft=1,j=function(C){we[Qe++]=C},v=1;v<=he;++v)if(de[v]==lt&&v!=he)++ft;else{if(!lt&&ft>2){for(;ft>138;ft-=138)j(32754);ft>2&&(j(ft>10?ft-11<<5|28690:ft-3<<5|12305),ft=0)}else if(ft>3){for(j(lt),--ft;ft>6;ft-=6)j(8304);ft>2&&(j(ft-3<<5|8208),ft=0)}for(;ft--;)j(lt);ft=1,lt=de[v]}return[we.subarray(0,Qe),he]},X=function(de,he){for(var we=0,Qe=0;Qe<he.length;++Qe)we+=de[Qe]*he[Qe];return we},P=function(de,he,we){var Qe=we.length,lt=c(he+2);de[lt]=Qe&255,de[lt+1]=Qe>>>8,de[lt+2]=de[lt]^255,de[lt+3]=de[lt+1]^255;for(var ft=0;ft<Qe;++ft)de[lt+ft+4]=we[ft];return(lt+4+Qe)*8},q=function(de,he,we,Qe,lt,ft,j,v,C,K,re){g(he,re++,we),++lt[256];for(var W=k(lt,15),Ie=W[0],rt=W[1],vt=k(ft,15),Ct=vt[0],ot=vt[1],Pt=Q(Ie),Ot=Pt[0],Ht=Pt[1],er=Q(Ct),wr=er[0],sr=er[1],hr=new V(19),Zt=0;Zt<Ot.length;++Zt)hr[Ot[Zt]&31]++;for(var Zt=0;Zt<wr.length;++Zt)hr[wr[Zt]&31]++;for(var Qr=k(hr,7),Ir=Qr[0],fr=Qr[1],Kr=19;Kr>4&&!Ir[H[Kr-1]];--Kr);var $r=K+5<<3,Zr=X(lt,t)+X(ft,E)+j,jr=X(lt,Ie)+X(ft,Ct)+j+14+3*Kr+X(hr,Ir)+(2*hr[16]+3*hr[17]+7*hr[18]);if($r<=Zr&&$r<=jr)return P(he,re,de.subarray(C,C+K));var Or,Vr,Yr,Jr;if(g(he,re,1+(jr<Zr)),re+=2,jr<Zr){Or=n(Ie,rt,0),Vr=Ie,Yr=n(Ct,ot,0),Jr=Ct;var sn=n(Ir,fr,0);g(he,re,Ht-257),g(he,re+5,sr-1),g(he,re+10,Kr-4),re+=14;for(var Zt=0;Zt<Kr;++Zt)g(he,re+3*Zt,Ir[H[Zt]]);re+=3*Kr;for(var rn=[Ot,wr],Dr=0;Dr<2;++Dr)for(var ir=rn[Dr],Zt=0;Zt<ir.length;++Zt){var rr=ir[Zt]&31;g(he,re,sn[rr]),re+=Ir[rr],rr>15&&(g(he,re,ir[Zt]>>>5&127),re+=ir[Zt]>>>12)}}else Or=b,Vr=t,Yr=B,Jr=E;for(var Zt=0;Zt<v;++Zt)if(Qe[Zt]>255){var rr=Qe[Zt]>>>18&31;F(he,re,Or[rr+257]),re+=Vr[rr+257],rr>7&&(g(he,re,Qe[Zt]>>>23&31),re+=L[rr]);var mr=Qe[Zt]&31;F(he,re,Yr[mr]),re+=Jr[mr],mr>3&&(F(he,re,Qe[Zt]>>>5&8191),re+=$[mr])}else F(he,re,Or[Qe[Zt]]),re+=Vr[Qe[Zt]];return F(he,re,Or[256]),re+Vr[256]},ie=new N([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),be=new U(0),me=function(de,he,we,Qe,lt,ft){var j=de.length,v=new U(Qe+j+5*(1+Math.floor(j/7e3))+lt),C=v.subarray(Qe,v.length-lt),K=0;if(!he||j<8)for(var re=0;re<=j;re+=65535){var W=re+65535;W<j?K=P(C,K,de.subarray(re,W)):(C[re]=ft,K=P(C,K,de.subarray(re,j)))}else{for(var Ie=ie[he-1],rt=Ie>>>13,vt=Ie&8191,Ct=(1<<we)-1,ot=new V(32768),Pt=new V(Ct+1),Ot=Math.ceil(we/3),Ht=2*Ot,er=function(Xr){return(de[Xr]^de[Xr+1]<<Ot^de[Xr+2]<<Ht)&Ct},wr=new N(25e3),sr=new V(288),hr=new V(32),Zt=0,Qr=0,re=0,Ir=0,fr=0,Kr=0;re<j;++re){var $r=er(re),Zr=re&32767,jr=Pt[$r];if(ot[Zr]=jr,Pt[$r]=Zr,fr<=re){var Or=j-re;if((Zt>7e3||Ir>24576)&&Or>423){K=q(de,C,0,wr,sr,hr,Qr,Ir,Kr,re-Kr,K),Ir=Zt=Qr=0,Kr=re;for(var Vr=0;Vr<286;++Vr)sr[Vr]=0;for(var Vr=0;Vr<30;++Vr)hr[Vr]=0}var Yr=2,Jr=0,sn=vt,rn=Zr-jr&32767;if(Or>2&&$r==er(re-rn))for(var Dr=Math.min(rt,Or)-1,ir=Math.min(32767,re),rr=Math.min(258,Or);rn<=ir&&--sn&&Zr!=jr;){if(de[re+Yr]==de[re+Yr-rn]){for(var mr=0;mr<rr&&de[re+mr]==de[re+mr-rn];++mr);if(mr>Yr){if(Yr=mr,Jr=rn,mr>Dr)break;for(var Ar=Math.min(rn,mr-2),zr=0,Vr=0;Vr<Ar;++Vr){var br=re-rn+Vr+32768&32767,Rn=ot[br],qr=br-Rn+32768&32767;qr>zr&&(zr=qr,jr=br)}}}Zr=jr,jr=ot[Zr],rn+=Zr-jr+32768&32767}if(Jr){wr[Ir++]=268435456|f[Yr]<<18|i[Jr];var Bn=f[Yr]&31,Dn=i[Jr]&31;Qr+=L[Bn]+$[Dn],++sr[257+Bn],++hr[Dn],fr=re+Yr,++Zt}else wr[Ir++]=de[re],++sr[de[re]]}}K=q(de,C,ft,wr,sr,hr,Qr,Ir,Kr,re-Kr,K),ft||(K=P(C,K,be))}return w(v,0,Qe+c(K)+lt)},Me=function(){for(var de=new N(256),he=0;he<256;++he){for(var we=he,Qe=9;--Qe;)we=(we&1&&3988292384)^we>>>1;de[he]=we}return de}(),Ne=function(){var de=4294967295;return{p:function(he){for(var we=de,Qe=0;Qe<he.length;++Qe)we=Me[we&255^he[Qe]]^we>>>8;de=we},d:function(){return de^4294967295}}},ke=function(){var de=1,he=0;return{p:function(we){for(var Qe=de,lt=he,ft=we.length,j=0;j!=ft;){for(var v=Math.min(j+5552,ft);j<v;++j)Qe+=we[j],lt+=Qe;Qe%=65521,lt%=65521}de=Qe,he=lt},d:function(){return(de>>>8<<16|(he&255)<<8|he>>>8)+((de&255)<<23)*2}}},Ke=function(de,he,we,Qe,lt){return me(de,he.level==null?6:he.level,he.mem==null?Math.ceil(Math.max(8,Math.min(13,Math.log(de.length)))*1.5):12+he.mem,we,Qe,!lt)},Ye=function(de,he){var we={};for(var Qe in de)we[Qe]=de[Qe];for(var Qe in he)we[Qe]=he[Qe];return we},_e=function(de,he,we){for(var Qe=de(),lt=de.toString(),ft=lt.slice(lt.indexOf("[")+1,lt.lastIndexOf("]")).replace(/ /g,"").split(","),j=0;j<Qe.length;++j){var v=Qe[j],C=ft[j];if(typeof v=="function"){he+=";"+C+"=";var K=v.toString();if(v.prototype)if(K.indexOf("[native code]")!=-1){var re=K.indexOf(" ",8)+1;he+=K.slice(re,K.indexOf("(",re))}else{he+=K;for(var W in v.prototype)he+=";"+C+".prototype."+W+"="+v.prototype[W].toString()}else he+=K}else we[C]=v}return[he,we]},Te=[],Pe=function(de){var he=[];for(var we in de)(de[we]instanceof U||de[we]instanceof V||de[we]instanceof N)&&he.push((de[we]=new de[we].constructor(de[we])).buffer);return he},bt=function(de,he,we,Qe){var lt;if(!Te[we]){for(var ft="",j={},v=de.length-1,C=0;C<v;++C)lt=_e(de[C],ft,j),ft=lt[0],j=lt[1];Te[we]=_e(de[v],ft,j)}var K=Ye({},Te[we][1]);return z(Te[we][0]+";onmessage=function(e){for(var k in e.data)self[k]=e.data[k];onmessage="+he.toString()+"}",we,K,Pe(K),Qe)},mt=function(){return[U,V,N,L,$,H,u,s,_,x,o,n,h,d,A,c,w,m,Ce,ee,ue]},dt=function(){return[U,V,N,L,$,H,f,i,b,t,B,E,o,ie,be,n,g,F,k,S,Q,X,P,q,c,w,me,Ke,Se,ee]},yt=function(){return[ht,Xe,st,Ne,Me]},le=function(){return[_t,He]},Z=function(){return[at,st,ke]},te=function(){return[ut]},ee=function(de){return postMessage(de,[de.buffer])},ue=function(de){return de&&de.size&&new U(de.size)},ye=function(de,he,we,Qe,lt,ft){var j=bt(we,Qe,lt,function(v,C){j.terminate(),ft(v,C)});return he.consume||(de=new U(de)),j.postMessage([de,he],[de.buffer]),function(){j.terminate()}},ve=function(de){return de.ondata=function(he,we){return postMessage([he,we],[he.buffer])},function(he){return de.push(he.data[0],he.data[1])}},Je=function(de,he,we,Qe,lt){var ft,j=bt(de,Qe,lt,function(v,C){v?(j.terminate(),he.ondata.call(he,v)):(C[1]&&j.terminate(),he.ondata.call(he,v,C[0],C[1]))});j.postMessage(we),he.push=function(v,C){if(ft)throw"stream finished";if(!he.ondata)throw"no stream handler";j.postMessage([v,ft=C],[v.buffer])},he.terminate=function(){j.terminate()}},tt=function(de,he){return de[he]|de[he+1]<<8},it=function(de,he){return(de[he]|de[he+1]<<8|de[he+2]<<16)+(de[he+3]<<23)*2},st=function(de,he,we){for(;we;++he)de[he]=we,we>>>=8},ht=function(de,he){var we=he.filename;if(de[0]=31,de[1]=139,de[2]=8,de[8]=he.level<2?4:he.level==9?2:0,de[9]=3,he.mtime!=0&&st(de,4,Math.floor(new Date(he.mtime||Date.now())/1e3)),we){de[3]=8;for(var Qe=0;Qe<=we.length;++Qe)de[Qe+10]=we.charCodeAt(Qe)}},_t=function(de){if(de[0]!=31||de[1]!=139||de[2]!=8)throw"invalid gzip data";var he=de[3],we=10;he&4&&(we+=de[10]|(de[11]<<8)+2);for(var Qe=(he>>3&1)+(he>>4&1);Qe>0;Qe-=!de[we++]);return we+(he&2)},He=function(de){var he=de.length;return(de[he-4]|de[he-3]<<8|de[he-2]<<16)+2*(de[he-1]<<23)},Xe=function(de){return 10+(de.filename&&de.filename.length+1||0)},at=function(de,he){var we=he.level,Qe=we==0?0:we<6?1:we==9?3:2;de[0]=120,de[1]=Qe<<6|(Qe?32-2*Qe:1)},ut=function(de){if((de[0]&15)!=8||de[0]>>>4>7||(de[0]<<8|de[1])%31)throw"invalid zlib data";if(de[1]&32)throw"invalid zlib data: preset dictionaries not supported"};function $e(de,he){return!he&&typeof de=="function"&&(he=de,de={}),this.ondata=he,de}var qe=function(){function de(he,we){!we&&typeof he=="function"&&(we=he,he={}),this.ondata=we,this.o=he||{}}return de.prototype.p=function(he,we){this.ondata(Ke(he,this.o,0,0,!we),we)},de.prototype.push=function(he,we){if(this.d)throw"stream finished";if(!this.ondata)throw"no stream handler";this.d=we,this.p(he,we||!1)},de}(),De=function(){function de(he,we){Je([dt,function(){return[ve,qe]}],this,$e.call(this,he,we),function(Qe){var lt=new qe(Qe.data);onmessage=ve(lt)},6)}return de}();function xe(de,he,we){if(we||(we=he,he={}),typeof we!="function")throw"no callback";return ye(de,he,[dt],function(Qe){return ee(Se(Qe.data[0],Qe.data[1]))},0,we)}function Se(de,he){return he===void 0&&(he={}),Ke(de,he,0,0)}var oe=function(){function de(he){this.s={},this.p=new U(0),this.ondata=he}return de.prototype.e=function(he){if(this.d)throw"stream finished";if(!this.ondata)throw"no stream handler";var we=this.p.length,Qe=new U(we+he.length);Qe.set(this.p),Qe.set(he,we),this.p=Qe},de.prototype.c=function(he){this.d=this.s.i=he||!1;var we=this.s.b,Qe=m(this.p,this.o,this.s);this.ondata(w(Qe,we,this.s.b),this.d),this.o=w(Qe,this.s.b-32768),this.s.b=this.o.length,this.p=w(this.p,this.s.p/8>>0),this.s.p&=7},de.prototype.push=function(he,we){this.e(he),this.c(we)},de}(),ce=function(){function de(he){this.ondata=he,Je([mt,function(){return[ve,oe]}],this,0,function(){var we=new oe;onmessage=ve(we)},7)}return de}();function Ee(de,he,we){if(we||(we=he,he={}),typeof we!="function")throw"no callback";return ye(de,he,[mt],function(Qe){return ee(Ce(Qe.data[0],ue(Qe.data[1])))},1,we)}function Ce(de,he){return m(de,he)}var Ge=function(){function de(he,we){this.c=Ne(),this.l=0,this.v=1,qe.call(this,he,we)}return de.prototype.push=function(he,we){qe.prototype.push.call(this,he,we)},de.prototype.p=function(he,we){this.c.p(he),this.l+=he.length;var Qe=Ke(he,this.o,this.v&&Xe(this.o),we&&8,!we);this.v&&(ht(Qe,this.o),this.v=0),we&&(st(Qe,Qe.length-8,this.c.d()),st(Qe,Qe.length-4,this.l)),this.ondata(Qe,we)},de}(),et=function(){function de(he,we){Je([dt,yt,function(){return[ve,qe,Ge]}],this,$e.call(this,he,we),function(Qe){var lt=new Ge(Qe.data);onmessage=ve(lt)},8)}return de}();function pt(de,he,we){if(we||(we=he,he={}),typeof we!="function")throw"no callback";return ye(de,he,[dt,yt,function(){return[Bt]}],function(Qe){return ee(Bt(Qe.data[0],Qe.data[1]))},2,we)}function Bt(de,he){he===void 0&&(he={});var we=Ne(),Qe=de.length;we.p(de);var lt=Ke(de,he,Xe(he),8),ft=lt.length;return ht(lt,he),st(lt,ft-8,we.d()),st(lt,ft-4,Qe),lt}var Dt=function(){function de(he){this.v=1,oe.call(this,he)}return de.prototype.push=function(he,we){if(oe.prototype.e.call(this,he),this.v){var Qe=_t(this.p);if(Qe>=this.p.length&&!we)return;this.p=this.p.subarray(Qe),this.v=0}if(we){if(this.p.length<8)throw"invalid gzip stream";this.p=this.p.subarray(0,-8)}oe.prototype.c.call(this,we)},de}(),xt=function(){function de(he){this.ondata=he,Je([mt,le,function(){return[ve,oe,Dt]}],this,0,function(){var we=new Dt;onmessage=ve(we)},9)}return de}();function tr(de,he,we){if(we||(we=he,he={}),typeof we!="function")throw"no callback";return ye(de,he,[mt,le,function(){return[Xt]}],function(Qe){return ee(Xt(Qe.data[0]))},3,we)}function Xt(de,he){return m(de.subarray(_t(de),-8),he||new U(He(de)))}var gt=function(){function de(he,we){this.c=ke(),this.v=1,qe.call(this,he,we)}return de.prototype.push=function(he,we){qe.prototype.push.call(this,he,we)},de.prototype.p=function(he,we){this.c.p(he);var Qe=Ke(he,this.o,this.v&&2,we&&4,!we);this.v&&(at(Qe,this.o),this.v=0),we&&st(Qe,Qe.length-4,this.c.d()),this.ondata(Qe,we)},de}(),Mt=function(){function de(he,we){Je([dt,Z,function(){return[ve,qe,gt]}],this,$e.call(this,he,we),function(Qe){var lt=new gt(Qe.data);onmessage=ve(lt)},10)}return de}();function Jt(de,he,we){if(we||(we=he,he={}),typeof we!="function")throw"no callback";return ye(de,he,[dt,Z,function(){return[Lt]}],function(Qe){return ee(Lt(Qe.data[0],Qe.data[1]))},4,we)}function Lt(de,he){he===void 0&&(he={});var we=ke();we.p(de);var Qe=Ke(de,he,2,4);return at(Qe,he),st(Qe,Qe.length-4,we.d()),Qe}var ar=function(){function de(he){this.v=1,oe.call(this,he)}return de.prototype.push=function(he,we){if(oe.prototype.e.call(this,he),this.v){if(this.p.length<2&&!we)return;this.p=this.p.subarray(2),this.v=0}if(we){if(this.p.length<4)throw"invalid zlib stream";this.p=this.p.subarray(0,-4)}oe.prototype.c.call(this,we)},de}(),zt=function(){function de(he){this.ondata=he,Je([mt,te,function(){return[ve,oe,ar]}],this,0,function(){var we=new ar;onmessage=ve(we)},11)}return de}();function nr(de,he,we){if(we||(we=he,he={}),typeof we!="function")throw"no callback";return ye(de,he,[mt,te,function(){return[ur]}],function(Qe){return ee(ur(Qe.data[0],ue(Qe.data[1])))},5,we)}function ur(de,he){return m((ut(de),de.subarray(2,-4)),he)}var Et=function(){function de(he){this.G=Dt,this.I=oe,this.Z=ar,this.ondata=he}return de.prototype.push=function(he,we){if(!this.ondata)throw"no stream handler";if(this.s)this.s.push(he,we);else{if(this.p&&this.p.length){var Qe=new U(this.p.length+he.length);Qe.set(this.p),Qe.set(he,this.p.length)}else this.p=he;if(this.p.length>2){var lt=this,ft=function(){lt.ondata.apply(lt,arguments)};this.s=this.p[0]==31&&this.p[1]==139&&this.p[2]==8?new this.G(ft):(this.p[0]&15)!=8||this.p[0]>>4>7||(this.p[0]<<8|this.p[1])%31?new this.I(ft):new this.Z(ft),this.s.push(this.p,we),this.p=null}}},de}(),_r=function(){function de(he){this.G=xt,this.I=ce,this.Z=zt,this.ondata=he}return de.prototype.push=function(he,we){Et.prototype.push.call(this,he,we)},de}();function kt(de,he,we){if(we||(we=he,he={}),typeof we!="function")throw"no callback";return de[0]==31&&de[1]==139&&de[2]==8?tr(de,he,we):(de[0]&15)!=8||de[0]>>4>7||(de[0]<<8|de[1])%31?Ee(de,he,we):nr(de,he,we)}function Ut(de,he){return de[0]==31&&de[1]==139&&de[2]==8?Xt(de,he):(de[0]&15)!=8||de[0]>>4>7||(de[0]<<8|de[1])%31?Ce(de,he):ur(de,he)}var $t=function(de,he,we,Qe){for(var lt in de){var ft=de[lt],j=he+lt;ft instanceof U?we[j]=[ft,Qe]:Array.isArray(ft)?we[j]=[ft[0],Ye(Qe,ft[1])]:$t(ft,j+"/",we,Qe)}};function vr(de,he){var we=de.length;if(!he&&typeof TextEncoder!="undefined")return new TextEncoder().encode(de);for(var Qe=new U(de.length+(de.length>>>1)),lt=0,ft=function(K){Qe[lt++]=K},j=0;j<we;++j){if(lt+5>Qe.length){var v=new U(lt+8+(we-j<<1));v.set(Qe),Qe=v}var C=de.charCodeAt(j);C<128||he?ft(C):C<2048?(ft(192|C>>>6),ft(128|C&63)):C>55295&&C<57344?(C=65536+(C&1023<<10)|de.charCodeAt(++j)&1023,ft(240|C>>>18),ft(128|C>>>12&63),ft(128|C>>>6&63),ft(128|C&63)):(ft(224|C>>>12),ft(128|C>>>6&63),ft(128|C&63))}return w(Qe,0,lt)}function Wr(de,he){var we="";if(!he&&typeof TextDecoder!="undefined")return new TextDecoder().decode(de);for(var Qe=0;Qe<de.length;){var lt=de[Qe++];lt<128||he?we+=String.fromCharCode(lt):lt<224?we+=String.fromCharCode((lt&31)<<6|de[Qe++]&63):lt<240?we+=String.fromCharCode((lt&15)<<12|(de[Qe++]&63)<<6|de[Qe++]&63):(lt=((lt&15)<<18|(de[Qe++]&63)<<12|(de[Qe++]&63)<<6|de[Qe++]&63)-65536,we+=String.fromCharCode(55296|lt>>10,56320|lt&1023))}return we}var Gr=function(de,he){return he+30+tt(de,he+26)+tt(de,he+28)},Hr=function(de,he,we){var Qe=tt(de,he+28),lt=Wr(de.subarray(he+46,he+46+Qe),!(tt(de,he+8)&2048)),ft=he+46+Qe,j=we?Fr(de,ft):[it(de,he+20),it(de,he+24),it(de,he+42)],v=j[0],C=j[1],K=j[2];return[tt(de,he+10),v,C,lt,ft+tt(de,he+30)+tt(de,he+32),K]},Fr=function(de,he){for(;tt(de,he)!=1;he+=4+tt(de,he+2));return[it(de,he+12),it(de,he+4),it(de,he+20)]},dr=function(de,he,we,Qe,lt,ft,j,v,C,K){var re=ft.length,W=Qe.length;st(de,he,C!=null?33639248:67324752),he+=4,C!=null&&(de[he]=20,he+=2),de[he]=20,he+=2,de[he++]=K==8&&(v.level==1?6:v.level<6?4:v.level==9?2:0),de[he++]=j&&8,de[he]=K,he+=2;var Ie=new Date(v.mtime||Date.now()),rt=Ie.getFullYear()-1980;if(rt<0||rt>119)throw"date not in range 1980-2099";st(de,he,(rt<<24)*2|Ie.getMonth()+1<<21|Ie.getDate()<<16|Ie.getHours()<<11|Ie.getMinutes()<<5|Ie.getSeconds()>>>1),he+=4,st(de,he,we),st(de,he+4,W),st(de,he+8,lt),st(de,he+12,re),he+=16,C!=null&&(st(de,he+=10,C),he+=4),de.set(ft,he),he+=re,C==null&&de.set(Qe,he)},Cr=function(de,he,we,Qe,lt){st(de,he,101010256),st(de,he+8,we),st(de,he+10,we),st(de,he+12,Qe),st(de,he+16,lt)};function tn(de,he,we){if(we||(we=he,he={}),typeof we!="function")throw"no callback";var Qe={};$t(de,"",Qe,he);var lt=Object.keys(Qe),ft=lt.length,j=0,v=0,C=ft,K=new Array(ft),re=[],W=function(){for(var Ct=0;Ct<re.length;++Ct)re[Ct]()},Ie=function(){var Ct=new U(v+22),ot=j,Pt=v-j;v=0;for(var Ot=0;Ot<C;++Ot){var Ht=K[Ot];try{dr(Ct,v,Ht.c,Ht.d,Ht.m,Ht.n,Ht.u,Ht.p,null,Ht.t),dr(Ct,j,Ht.c,Ht.d,Ht.m,Ht.n,Ht.u,Ht.p,v,Ht.t),j+=46+Ht.n.length,v+=30+Ht.n.length+Ht.d.length}catch(er){return we(er,null)}}Cr(Ct,j,K.length,Pt,ot),we(null,Ct)};ft||Ie();for(var rt=function(Ct){var ot=lt[Ct],Pt=Qe[ot],Ot=Pt[0],Ht=Pt[1],er=Ne(),wr=Ot.length;er.p(Ot);var sr=vr(ot),hr=sr.length,Zt=Ht.level==0?0:8,Qr=function(Ir,fr){if(Ir)W(),we(Ir,null);else{var Kr=fr.length;K[Ct]={t:Zt,d:fr,m:wr,c:er.d(),u:ot.length!=Kr,n:sr,p:Ht},j+=30+hr+Kr,v+=76+2*hr+Kr,--ft||Ie()}};if(sr.length>65535&&Qr("filename too long",null),!Zt)Qr(null,Ot);else if(wr<16e4)try{Qr(null,Se(Ot,Ht))}catch(Ir){Qr(Ir,null)}else re.push(xe(Ot,Ht,Qr))},vt=0;vt<C;++vt)rt(vt);return W}function Br(de,he){he===void 0&&(he={});var we={},Qe=[];$t(de,"",we,he);var lt=0,ft=0;for(var j in we){var v=we[j],C=v[0],K=v[1],re=K.level==0?0:8,W=vr(j),Ie=W.length;if(W.length>65535)throw"filename too long";var rt=re?Se(C,K):C,vt=rt.length,Ct=Ne();Ct.p(C),Qe.push({t:re,d:rt,m:C.length,c:Ct.d(),u:j.length!=Ie,n:W,o:lt,p:K}),lt+=30+Ie+vt,ft+=76+2*Ie+vt}for(var ot=new U(ft+22),Pt=lt,Ot=ft-lt,Ht=0;Ht<Qe.length;++Ht){var er=Qe[Ht];dr(ot,er.o,er.c,er.d,er.m,er.n,er.u,er.p,null,er.t),dr(ot,lt,er.c,er.d,er.m,er.n,er.u,er.p,er.o,er.t),lt+=46+er.n.length}return Cr(ot,lt,Qe.length,Ot,Pt),ot}function An(de,he){if(typeof he!="function")throw"no callback";for(var we=[],Qe=function(){for(var Ie=0;Ie<we.length;++Ie)we[Ie]()},lt={},ft=de.length-22;it(de,ft)!=101010256;--ft)if(!ft||de.length-ft>65558){he("invalid zip file",null);return}var j=tt(de,ft+8);j||he(null,{});var v=j,C=it(de,ft+16),K=C==4294967295;if(K){if(ft=it(de,ft-12),it(de,ft)!=101075792)throw"invalid zip file";v=j=it(de,ft+32),C=it(de,ft+48)}for(var re=function(Ie){var rt=Hr(de,C,K),vt=rt[0],Ct=rt[1],ot=rt[2],Pt=rt[3],Ot=rt[4],Ht=rt[5],er=Gr(de,Ht);C=Ot;var wr=function(hr,Zt){hr?(Qe(),he(hr,null)):(lt[Pt]=Zt,--j||he(null,lt))};if(!vt)wr(null,w(de,er,er+Ct));else if(vt==8){var sr=de.subarray(er,er+Ct);if(Ct<32e4)try{wr(null,Ce(sr,new U(ot)))}catch(hr){wr(hr,null)}else we.push(Ee(sr,{size:ot},wr))}else wr("unknown compression type "+vt,null)},W=0;W<v;++W)re(W);return Qe}function Sr(de){for(var he={},we=de.length-22;it(de,we)!=101010256;--we)if(!we||de.length-we>65558)throw"invalid zip file";var Qe=tt(de,we+8);if(!Qe)return{};var lt=it(de,we+16),ft=lt==4294967295;if(ft){if(we=it(de,we-12),it(de,we)!=101075792)throw"invalid zip file";Qe=it(de,we+32),lt=it(de,we+48)}for(var j=0;j<Qe;++j){var v=Hr(de,lt,ft),C=v[0],K=v[1],re=v[2],W=v[3],Ie=v[4],rt=v[5],vt=Gr(de,rt);if(lt=Ie,!C)he[W]=w(de,vt,vt+K);else if(C==8)he[W]=Ce(de.subarray(vt,vt+K),new U(re));else throw"unknown compression type "+C}return he}},dmUQ:function(wt,Be,G){"use strict";var Ae=G("Ff2n"),z=G("rePB"),U=G("1OyB"),V=G("vuIU"),N=G("Ji7U"),L=G("md7G"),$=G("foSv"),H=G("q1tI"),e=G.n(H),R=G("TSYQ"),u=G.n(R),f=G("4IlW");function l(A,c){var w=Object.keys(A);if(Object.getOwnPropertySymbols){var m=Object.getOwnPropertySymbols(A);c&&(m=m.filter(function(g){return Object.getOwnPropertyDescriptor(A,g).enumerable})),w.push.apply(w,m)}return w}function s(A){for(var c=1;c<arguments.length;c++){var w=arguments[c]!=null?arguments[c]:{};c%2?l(Object(w),!0).forEach(function(m){Object(z.a)(A,m,w[m])}):Object.getOwnPropertyDescriptors?Object.defineProperties(A,Object.getOwnPropertyDescriptors(w)):l(Object(w)).forEach(function(m){Object.defineProperty(A,m,Object.getOwnPropertyDescriptor(w,m))})}return A}function i(A){var c=o();return function(){var m=Object($.a)(A),g;if(c){var F=Object($.a)(this).constructor;g=Reflect.construct(m,arguments,F)}else g=m.apply(this,arguments);return Object(L.a)(this,g)}}function o(){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(A){return!1}}function r(){}function a(A){A.preventDefault()}var n=function(c){return c.replace(/[^\w.-]+/g,"")},t=200,E=600,b=Number.MAX_SAFE_INTEGER||Math.pow(2,53)-1,_=function(c){return c!=null},B=function(c,w){return w===c||typeof w=="number"&&typeof c=="number"&&isNaN(w)&&isNaN(c)},x=function(A){Object(N.a)(w,A);var c=i(w);function w(m){var g;Object(U.a)(this,w),g=c.call(this,m),g.onKeyDown=function(S){var Q=g.props,X=Q.onKeyDown,P=Q.onPressEnter;if(S.keyCode===f.a.UP){var q=g.getRatio(S);g.up(S,q,null),g.stop()}else if(S.keyCode===f.a.DOWN){var ie=g.getRatio(S);g.down(S,ie,null),g.stop()}else S.keyCode===f.a.ENTER&&P&&P(S);if(g.recordCursorPosition(),g.lastKeyCode=S.keyCode,X){for(var be=arguments.length,me=new Array(be>1?be-1:0),Me=1;Me<be;Me++)me[Me-1]=arguments[Me];X.apply(void 0,[S].concat(me))}},g.onKeyUp=function(S){var Q=g.props.onKeyUp;if(g.stop(),g.recordCursorPosition(),Q){for(var X=arguments.length,P=new Array(X>1?X-1:0),q=1;q<X;q++)P[q-1]=arguments[q];Q.apply(void 0,[S].concat(P))}},g.onChange=function(S){var Q=g.props.onChange;g.state.focused&&(g.inputting=!0),g.rawInput=g.props.parser(g.getValueFromEvent(S)),g.setState({inputValue:g.rawInput}),Q(g.toNumber(g.rawInput))},g.onMouseUp=function(){var S=g.props.onMouseUp;g.recordCursorPosition(),S&&S.apply(void 0,arguments)},g.onFocus=function(){var S;g.setState({focused:!0}),(S=g.props).onFocus.apply(S,arguments)},g.onBlur=function(){var S=g.props.onBlur;g.inputting=!1,g.setState({focused:!1});var Q=g.getCurrentValidValue(g.state.inputValue),X=g.setValue(Q,r);if(S){var P=g.input.value,q=g.getInputDisplayValue({focus:!1,value:X});g.input.value=q&&Number(q),S.apply(void 0,arguments),g.input.value=P}},g.getRatio=function(S){var Q=1;return S.metaKey||S.ctrlKey?Q=.1:S.shiftKey&&(Q=10),Q},g.getFullNum=function(S){return isNaN(S)?S:/e/i.test(String(S))?Number(S).toFixed(18).replace(/\.?0+$/,""):S},g.getPrecision=function(S){if(_(g.props.precision))return g.props.precision;var Q=String(S);if(Q.indexOf("e-")>=0)return parseInt(Q.slice(Q.indexOf("e-")+2),10);var X=0;return Q.indexOf(".")>=0&&(X=Q.length-Q.indexOf(".")-1),X},g.getInputDisplayValue=function(S){var Q=S||g.state,X=Q.focused,P=Q.inputValue,q=Q.value,ie;X?ie=P:ie=g.toPrecisionAsStep(q),ie==null&&(ie="");var be=g.formatWrapper(ie);return _(g.props.decimalSeparator)&&(be=be.toString().replace(".",g.props.decimalSeparator)),be},g.recordCursorPosition=function(){try{g.cursorStart=g.input.selectionStart,g.cursorEnd=g.input.selectionEnd,g.currentValue=g.input.value,g.cursorBefore=g.input.value.substring(0,g.cursorStart),g.cursorAfter=g.input.value.substring(g.cursorEnd)}catch(S){}},g.restoreByAfter=function(S){if(S===void 0)return!1;var Q=g.input.value,X=Q.lastIndexOf(S);if(X===-1)return!1;var P=g.cursorBefore.length;return g.lastKeyCode===f.a.DELETE&&g.cursorBefore.charAt(P-1)===S[0]?(g.fixCaret(P,P),!0):X+S.length===Q.length?(g.fixCaret(X,X),!0):!1},g.partRestoreByAfter=function(S){return S===void 0?!1:Array.prototype.some.call(S,function(Q,X){var P=S.substring(X);return g.restoreByAfter(P)})},g.isNotCompleteNumber=function(S){return isNaN(S)||S===""||S===null||S&&S.toString().indexOf(".")===S.toString().length-1},g.stop=function(){g.autoStepTimer&&clearTimeout(g.autoStepTimer)},g.down=function(S,Q,X){g.pressingUpOrDown=!0,g.step("down",S,Q,X)},g.up=function(S,Q,X){g.pressingUpOrDown=!0,g.step("up",S,Q,X)},g.saveInput=function(S){g.input=S};var F=m.value;F===void 0&&(F=m.defaultValue),g.state={focused:m.autoFocus};var k=g.getValidValue(g.toNumber(F));return g.state=s(s({},g.state),{},{inputValue:g.toPrecisionAsStep(k),value:k}),g}return Object(V.a)(w,[{key:"componentDidMount",value:function(){this.componentDidUpdate(null)}},{key:"componentDidUpdate",value:function(g){var F=this.props,k=F.value,S=F.onChange,Q=F.max,X=F.min,P=this.state.focused;if(g){if(!B(g.value,k)||!B(g.max,Q)||!B(g.min,X)){var q=P?k:this.getValidValue(k),ie;this.pressingUpOrDown?ie=q:this.inputting?ie=this.rawInput:ie=this.toPrecisionAsStep(q),this.setState({value:q,inputValue:ie})}var be="value"in this.props?k:this.state.value;"max"in this.props&&g.max!==Q&&typeof be=="number"&&be>Q&&S&&S(Q),"min"in this.props&&g.min!==X&&typeof be=="number"&&be<X&&S&&S(X)}try{if(this.cursorStart!==void 0&&this.state.focused){if(!this.partRestoreByAfter(this.cursorAfter)&&this.state.value!==this.props.value){var me=this.cursorStart+1;this.cursorAfter?this.lastKeyCode===f.a.BACKSPACE?me=this.cursorStart-1:this.lastKeyCode===f.a.DELETE&&(me=this.cursorStart):me=this.input.value.length,this.fixCaret(me,me)}else if(this.currentValue===this.input.value)switch(this.lastKeyCode){case f.a.BACKSPACE:this.fixCaret(this.cursorStart-1,this.cursorStart-1);break;case f.a.DELETE:this.fixCaret(this.cursorStart+1,this.cursorStart+1);break;default:}}}catch(Me){}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(g){var F=g;return F===""?F="":this.isNotCompleteNumber(parseFloat(F))?F=this.state.value:F=this.getValidValue(F),this.toNumber(F)}},{key:"getValueFromEvent",value:function(g){var F=g.target.value.trim().replace(/。/g,".");return _(this.props.decimalSeparator)&&(F=F.replace(this.props.decimalSeparator,".")),F}},{key:"getValidValue",value:function(g){var F=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.props.min,k=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.props.max,S=parseFloat(g);return isNaN(S)?g:(S<F&&(S=F),S>k&&(S=k),S)}},{key:"setValue",value:function(g,F){var k=this.props.precision,S=this.isNotCompleteNumber(parseFloat(g))?null:parseFloat(g),Q=this.state.value,X=Q===void 0?null:Q,P=this.state.inputValue,q=P===void 0?null:P,ie=typeof S=="number"?S.toFixed(k):"".concat(S),be=S!==X||ie!=="".concat(q);return"value"in this.props?(q=this.toPrecisionAsStep(this.state.value),this.setState({inputValue:q},F)):this.setState({value:S,inputValue:this.toPrecisionAsStep(g)},F),be&&this.props.onChange(S),S}},{key:"getMaxPrecision",value:function(g){var F=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,k=this.props,S=k.precision,Q=k.step;if(_(S))return S;var X=this.getPrecision(F),P=this.getPrecision(Q),q=this.getPrecision(g);return g?Math.max(q,X+P):X+P}},{key:"getPrecisionFactor",value:function(g){var F=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,k=this.getMaxPrecision(g,F);return Math.pow(10,k)}},{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(g){return this.props.formatter?this.props.formatter(g):g}},{key:"toPrecisionAsStep",value:function(g){if(this.isNotCompleteNumber(g)||g==="")return g;var F=Math.abs(this.getMaxPrecision(g));return isNaN(F)?g.toString():Number(g).toFixed(F)}},{key:"toNumber",value:function(g){var F=this.props.precision,k=this.state.focused,S=g&&g.length>16&&k;return this.isNotCompleteNumber(g)||S?g:_(F)?Math.round(g*Math.pow(10,F))/Math.pow(10,F):Number(g)}},{key:"upStep",value:function(g,F){var k=this.props.step,S=this.getPrecisionFactor(g,F),Q=Math.abs(this.getMaxPrecision(g,F)),X=((S*g+S*k*F)/S).toFixed(Q);return this.toNumber(X)}},{key:"downStep",value:function(g,F){var k=this.props.step,S=this.getPrecisionFactor(g,F),Q=Math.abs(this.getMaxPrecision(g,F)),X=((S*g-S*k*F)/S).toFixed(Q);return this.toNumber(X)}},{key:"step",value:function(g,F){var k=this,S=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,Q=arguments.length>3?arguments[3]:void 0;this.stop(),F&&(F.persist(),F.preventDefault());var X=this.props;if(X.disabled)return;var P=this.getCurrentValidValue(this.state.inputValue)||0;if(this.isNotCompleteNumber(P))return;var q=this["".concat(g,"Step")](P,S),ie=q>X.max||q<X.min;if(q>X.max?q=X.max:q<X.min&&(q=X.min),this.setValue(q,null),this.setState({focused:!0},function(){k.pressingUpOrDown=!1}),ie)return;this.autoStepTimer=setTimeout(function(){k[g](F,S,!0)},Q?t:E)}},{key:"fixCaret",value:function(g,F){if(g===void 0||F===void 0||!this.input||!this.input.value)return;try{var k=this.input.selectionStart,S=this.input.selectionEnd;(g!==k||F!==S)&&this.input.setSelectionRange(g,F)}catch(Q){}}},{key:"render",value:function(){var g,F=this.props,k=F.prefixCls,S=F.disabled,Q=F.readOnly,X=F.useTouch,P=F.autoComplete,q=F.upHandler,ie=F.downHandler,be=F.className,me=F.max,Me=F.min,Ne=F.style,ke=F.title,Ke=F.onMouseEnter,Ye=F.onMouseLeave,_e=F.onMouseOver,Te=F.onMouseOut,Pe=F.required,bt=F.onClick,mt=F.tabIndex,dt=F.type,yt=F.placeholder,le=F.id,Z=F.inputMode,te=F.pattern,ee=F.step,ue=F.maxLength,ye=F.autoFocus,ve=F.name,Je=F.onPaste,tt=F.onInput,it=Object(Ae.a)(F,["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"]),st=this.state,ht=st.value,_t=st.focused,He=u()(k,(g={},Object(z.a)(g,be,!!be),Object(z.a)(g,"".concat(k,"-disabled"),S),Object(z.a)(g,"".concat(k,"-focused"),_t),g)),Xe={};Object.keys(it).forEach(function(Ce){(Ce.substr(0,5)==="data-"||Ce.substr(0,5)==="aria-"||Ce==="role")&&(Xe[Ce]=it[Ce])});var at=!Q&&!S,ut=this.getInputDisplayValue(null),$e=(ht||ht===0)&&(isNaN(ht)||Number(ht)>=me),qe=(ht||ht===0)&&(isNaN(ht)||Number(ht)<=Me),De=$e||S||Q,xe=qe||S||Q,Se=u()("".concat(k,"-handler"),"".concat(k,"-handler-up"),Object(z.a)({},"".concat(k,"-handler-up-disabled"),De)),oe=u()("".concat(k,"-handler"),"".concat(k,"-handler-down"),Object(z.a)({},"".concat(k,"-handler-down-disabled"),xe)),ce=X?{onTouchStart:De?r:this.up,onTouchEnd:this.stop}:{onMouseDown:De?r:this.up,onMouseUp:this.stop,onMouseLeave:this.stop},Ee=X?{onTouchStart:xe?r:this.down,onTouchEnd:this.stop}:{onMouseDown:xe?r:this.down,onMouseUp:this.stop,onMouseLeave:this.stop};return e.a.createElement("div",{className:He,style:Ne,title:ke,onMouseEnter:Ke,onMouseLeave:Ye,onMouseOver:_e,onMouseOut:Te,onFocus:function(){return null},onBlur:function(){return null}},e.a.createElement("div",{className:"".concat(k,"-handler-wrap")},e.a.createElement("span",Object.assign({unselectable:"on"},ce,{role:"button","aria-label":"Increase Value","aria-disabled":De,className:Se}),q||e.a.createElement("span",{unselectable:"on",className:"".concat(k,"-handler-up-inner"),onClick:a})),e.a.createElement("span",Object.assign({unselectable:"on"},Ee,{role:"button","aria-label":"Decrease Value","aria-disabled":xe,className:oe}),ie||e.a.createElement("span",{unselectable:"on",className:"".concat(k,"-handler-down-inner"),onClick:a}))),e.a.createElement("div",{className:"".concat(k,"-input-wrap")},e.a.createElement("input",Object.assign({role:"spinbutton","aria-valuemin":Me,"aria-valuemax":me,"aria-valuenow":ht,required:Pe,type:dt,placeholder:yt,onPaste:Je,onClick:bt,onMouseUp:this.onMouseUp,className:"".concat(k,"-input"),tabIndex:mt,autoComplete:P,onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:at?this.onKeyDown:r,onKeyUp:at?this.onKeyUp:r,autoFocus:ye,maxLength:ue,readOnly:Q,disabled:S,max:me,min:Me,step:ee,name:ve,title:ke,id:le,onChange:this.onChange,ref:this.saveInput,value:this.getFullNum(ut),pattern:te,inputMode:Z,onInput:tt},Xe))))}}]),w}(e.a.Component);x.defaultProps={focusOnUpDown:!0,useTouch:!1,prefixCls:"rc-input-number",max:b,min:-b,step:1,style:{},onChange:r,onKeyDown:r,onPressEnter:r,onFocus:r,onBlur:r,parser:n,required:!1,autoComplete:"off"};var h=x,d=Be.a=h},fjLI:function(wt,Be,G){"use strict";G.d(Be,"f",function(){return l}),G.d(Be,"b",function(){return s}),G.d(Be,"a",function(){return i}),G.d(Be,"d",function(){return o}),G.d(Be,"e",function(){return r}),G.d(Be,"c",function(){return a});var Ae=G("8HAY"),z=G("Vhoy"),U=G("MI8n"),V=G("JYp7"),N=G("pmY6"),L=G("24hK"),$=G("nnTU"),H=G("T8No"),e=G("Cg/j"),R=G("t9D7"),u=function(n,t,E,b){var _=arguments.length,B=_<3?t:b===null?b=Object.getOwnPropertyDescriptor(t,E):b,x;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")B=Reflect.decorate(n,t,E,b);else for(var h=n.length-1;h>=0;h--)(x=n[h])&&(B=(_<3?x(B):_>3?x(t,E,B):x(t,E))||B);return _>3&&B&&Object.defineProperty(t,E,B),B},f=function(n,t){return function(E,b){t(E,b,n)}};function l(n){return n.command!==void 0}class s{constructor(n){this.id=s._idPool++,this._debugName=n}}s._idPool=0,s.CommandPalette=new s("CommandPalette"),s.EditorContext=new s("EditorContext"),s.SimpleEditorContext=new s("SimpleEditorContext"),s.EditorContextCopy=new s("EditorContextCopy"),s.EditorContextPeek=new s("EditorContextPeek"),s.MenubarEditMenu=new s("MenubarEditMenu"),s.MenubarCopy=new s("MenubarCopy"),s.MenubarGoMenu=new s("MenubarGoMenu"),s.MenubarSelectionMenu=new s("MenubarSelectionMenu"),s.InlineCompletionsActions=new s("InlineCompletionsActions");const i=Object(e.c)("menuService"),o=new class{constructor(){this._commands=new Map,this._menuItems=new Map,this._onDidChangeMenu=new U.b,this.onDidChangeMenu=this._onDidChangeMenu.event,this._commandPaletteChangeEvent={has:n=>n===s.CommandPalette}}addCommand(n){return this.addCommands(V.a.single(n))}addCommands(n){for(const t of n)this._commands.set(t.id,t);return this._onDidChangeMenu.fire(this._commandPaletteChangeEvent),Object(N.i)(()=>{let t=!1;for(const E of n)t=this._commands.delete(E.id)||t;t&&this._onDidChangeMenu.fire(this._commandPaletteChangeEvent)})}getCommand(n){return this._commands.get(n)}getCommands(){const n=new Map;return this._commands.forEach((t,E)=>n.set(E,t)),n}appendMenuItem(n,t){return this.appendMenuItems(V.a.single({id:n,item:t}))}appendMenuItems(n){const t=new Set,E=new L.a;for(const{id:b,item:_}of n){let B=this._menuItems.get(b);B||(B=new L.a,this._menuItems.set(b,B)),E.push(B.push(_)),t.add(b)}return this._onDidChangeMenu.fire(t),Object(N.i)(()=>{if(E.size>0){for(let b of E)b();this._onDidChangeMenu.fire(t),E.clear()}})}getMenuItems(n){let t;return this._menuItems.has(n)?t=[...this._menuItems.get(n)]:t=[],n===s.CommandPalette&&this._appendImplicitItems(t),t}_appendImplicitItems(n){const t=new Set;for(const E of n)l(E)&&(t.add(E.command.id),E.alt&&t.add(E.alt.id));this._commands.forEach((E,b)=>{t.has(b)||n.push({command:E})})}};class r extends Ae.e{constructor(n,t,E,b){super(`submenuitem.${n.submenu.id}`,typeof n.title=="string"?n.title:n.title.value,[],"submenu");this.item=n,this._menuService=t,this._contextKeyService=E,this._options=b}get actions(){const n=[],t=this._menuService.createMenu(this.item.submenu,this._contextKeyService),E=t.getActions(this._options);t.dispose();for(const[,b]of E)b.length>0&&(n.push(...b),n.push(new Ae.d));return n.length&&n.pop(),n}}let a=class n{constructor(t,E,b,_,B){var x,h;if(this._commandService=B,this.id=t.id,this.label=(b==null?void 0:b.renderShortTitle)&&t.shortTitle?typeof t.shortTitle=="string"?t.shortTitle:t.shortTitle.value:typeof t.title=="string"?t.title:t.title.value,this.tooltip=(h=typeof t.tooltip=="string"?t.tooltip:(x=t.tooltip)===null||x===void 0?void 0:x.value)!==null&&h!==void 0?h:"",this.enabled=!t.precondition||_.contextMatchesRules(t.precondition),this.checked=void 0,t.toggled){const d=t.toggled.condition?t.toggled:{condition:t.toggled};this.checked=_.contextMatchesRules(d.condition),this.checked&&d.tooltip&&(this.tooltip=typeof d.tooltip=="string"?d.tooltip:d.tooltip.value),d.title&&(this.label=typeof d.title=="string"?d.title:d.title.value)}this.item=t,this.alt=E?new n(E,void 0,b,_,B):void 0,this._options=b,R.d.isThemeIcon(t.icon)&&(this.class=z.a.asClassName(t.icon))}dispose(){}run(...t){var E,b;let _=[];return((E=this._options)===null||E===void 0?void 0:E.arg)&&(_=[..._,this._options.arg]),((b=this._options)===null||b===void 0?void 0:b.shouldForwardArgs)&&(_=[..._,...t]),this._commandService.executeCommand(this.id,..._)}};a=u([f(3,H.b),f(4,$.b)],a)},fyJ8:function(wt,Be,G){"use strict";var Ae=G("rePB"),z=G("VTBJ"),U=G("Ff2n"),V=G("U8pU"),N=G("q1tI"),L=G.n(N),$=G("TSYQ"),H=G.n($),e=G("c+Xe"),R=G("sR1s");function u(o){return o&&Object(V.a)(o)==="object"&&!Array.isArray(o)&&!N.isValidElement(o)}function f(o){return typeof o=="string"?!0:Object(e.c)(o)}function l(o,r){var a,n=o.prefixCls,t=o.className,E=o.record,b=o.index,_=o.dataIndex,B=o.render,x=o.children,h=o.component,d=h===void 0?"td":h,A=o.colSpan,c=o.rowSpan,w=o.fixLeft,m=o.fixRight,g=o.firstFixLeft,F=o.lastFixLeft,k=o.firstFixRight,S=o.lastFixRight,Q=o.appendNode,X=o.additionalProps,P=X===void 0?{}:X,q=o.ellipsis,ie=o.align,be=o.rowType,me=o.isSticky,Me="".concat(n,"-cell"),Ne,ke;if(x)ke=x;else{var Ke=Object(R.b)(E,_);if(ke=Ke,B){var Ye=B(Ke,E,b);u(Ye)?(ke=Ye.children,Ne=Ye.props):ke=Ye}}Object(V.a)(ke)==="object"&&!Array.isArray(ke)&&!N.isValidElement(ke)&&(ke=null),q&&(F||k)&&(ke=N.createElement("span",{className:"".concat(Me,"-content")},ke));var _e=Ne||{},Te=_e.colSpan,Pe=_e.rowSpan,bt=_e.style,mt=_e.className,dt=Object(U.a)(_e,["colSpan","rowSpan","style","className"]),yt=Te!==void 0?Te:A,le=Pe!==void 0?Pe:c;if(yt===0||le===0)return null;var Z={},te=typeof w=="number",ee=typeof m=="number";te&&(Z.position="sticky",Z.left=w),ee&&(Z.position="sticky",Z.right=m);var ue={};ie&&(ue.textAlign=ie);var ye,ve=q===!0?{showTitle:!0}:q;ve&&(ve.showTitle||be==="header")&&(typeof ke=="string"||typeof ke=="number"?ye=ke.toString():N.isValidElement(ke)&&typeof ke.props.children=="string"&&(ye=ke.props.children));var Je=Object(z.a)(Object(z.a)(Object(z.a)({title:ye},dt),P),{},{colSpan:yt&&yt!==1?yt:null,rowSpan:le&&le!==1?le:null,className:H()(Me,t,(a={},Object(Ae.a)(a,"".concat(Me,"-fix-left"),te),Object(Ae.a)(a,"".concat(Me,"-fix-left-first"),g),Object(Ae.a)(a,"".concat(Me,"-fix-left-last"),F),Object(Ae.a)(a,"".concat(Me,"-fix-right"),ee),Object(Ae.a)(a,"".concat(Me,"-fix-right-first"),k),Object(Ae.a)(a,"".concat(Me,"-fix-right-last"),S),Object(Ae.a)(a,"".concat(Me,"-ellipsis"),q),Object(Ae.a)(a,"".concat(Me,"-with-append"),Q),Object(Ae.a)(a,"".concat(Me,"-fix-sticky"),(te||ee)&&me),a),P.className,mt),style:Object(z.a)(Object(z.a)(Object(z.a)(Object(z.a)({},P.style),ue),Z),bt),ref:f(d)?r:null});return N.createElement(d,Object.assign({},Je),Q,ke)}var s=N.forwardRef(l);s.displayName="Cell";var i=N.memo(s,function(o,r){return r.shouldCellUpdate?!r.shouldCellUpdate(r.record,o.record):!1});Be.a=i},hW8S:function(wt,Be,G){"use strict";G.d(Be,"a",function(){return V}),G.d(Be,"c",function(){return N}),G.d(Be,"b",function(){return L});var Ae=G("VTBJ"),z=G("Ff2n"),U=G("Kwbf"),V="RC_TABLE_INTERNAL_COL_DEFINE";function N($){var H=$.expandable,e=Object(z.a)($,["expandable"]);return"expandable"in $?Object(Ae.a)(Object(Ae.a)({},e),H):e}function L($){return Object.keys($).reduce(function(H,e){return(e.substr(0,5)==="data-"||e.substr(0,5)==="aria-")&&(H[e]=$[e]),H},{})}},ic2d:function(wt,Be,G){"use strict";G.d(Be,"a",function(){return V});var Ae=G("FWmy"),z=G("746U");class U{constructor(){this.data=new Map}add(N,L){Ae.a(z.l(N)),Ae.a(z.k(L)),Ae.a(!this.data.has(N),"There is already an extension with this id"),this.data.set(N,L)}as(N){return this.data.get(N)||null}}const V=new U},ie49:function(wt,Be,G){wt.exports={brief:"brief___29L5W",contentTitle:"contentTitle___2wPLj",content:"content___2MAv3",tips:"tips___3qmPX",antdTable:"antdTable___o4ScH",tableCell:"tableCell___24I9Y",antdModal:"antdModal___1nRWw"}},kHHm:function(wt,Be,G){"use strict";var Ae=G("g9YV"),z=G("wCAj"),U=G("giR+"),V=G("fyUT"),N=G("2qtc"),L=G("kLXV"),$=G("miYZ"),H=G("tsqr"),e=G("9og8"),R=G("tJVT"),u=G("PpiC"),f=G("5NDa"),l=G("5rEg"),s=G("WmNS"),i=G.n(s),o=G("q1tI"),r=G.n(o),a=G("9kvl"),n=G("6K3P"),t=G.n(n),E=G("5jaM"),b=G.n(E),_=G("PEfE"),B=G.n(_),x=G("1vsH"),h=G("+L6B"),d=G("2/Rp"),A=G("ORPY"),c=G.n(A),w=G("rd/4"),m=G.n(w),g=G("3pxb"),F=G.n(g),k=function(me){var Me=me.createState,Ne=me.refreshLoading,ke=me.onRefresh,Ke=ke===void 0?function(){}:ke,Ye=me.onCreate,_e=Ye===void 0?function(){}:Ye;return r.a.createElement("div",{className:c.a.sendToClass},Me?r.a.createElement(r.a.Fragment,null,r.a.createElement("img",{src:m.a,alt:"\u7A7A"}),r.a.createElement("div",null,"\u60A8\u8FD8\u6CA1\u6709\u521B\u5EFA\u6559\u5B66\u8BFE\u5802\uFF0C\u65E0\u6CD5\u5C06\u8BD5\u5377\u53D1\u9001\u81F3\u6559\u5B66\u8BFE\u5802\u3002"),r.a.createElement(d.a,{onClick:_e,type:"primary",ghost:!0},"\u7ACB\u5373\u521B\u5EFA")):r.a.createElement(r.a.Fragment,null,r.a.createElement("img",{src:F.a,alt:"\u7A7A"}),r.a.createElement("div",null,"\u5DF2\u521B\u5EFA\u6559\u5B66\u8BFE\u5802\uFF1F\u8BF7\u5237\u65B0\u5217\u8868"),r.a.createElement(d.a,{loading:Ne,onClick:Ke,type:"primary",ghost:!0},"\u7ACB\u5373\u5237\u65B0")))},S=k,Q=G("9z17"),X=G("LvDl"),P=l.a.Search,q=function(me){var Me=me.paperlibrary,Ne=me.globalSetting,ke=me.loading,Ke=me.dispatch,Ye=Object(u.a)(me,["paperlibrary","globalSetting","loading","dispatch"]),_e=Object(o.useState)(""),Te=Object(R.a)(_e,2),Pe=Te[0],bt=Te[1],mt=Object(o.useState)([]),dt=Object(R.a)(mt,2),yt=dt[0],le=dt[1],Z=Object(o.useState)([]),te=Object(R.a)(Z,2),ee=te[0],ue=te[1],ye=Object(o.useState)(!1),ve=Object(R.a)(ye,2),Je=ve[0],tt=ve[1],it=Object(o.useState)(!0),st=Object(R.a)(it,2),ht=st[0],_t=st[1],He=Object(o.useState)(!0),Xe=Object(R.a)(He,2),at=Xe[0],ut=Xe[1],$e=Object(o.useState)(!1),qe=Object(R.a)($e,2),De=qe[0],xe=qe[1];Object(o.useEffect)(function(){oe()},[]);var Se=function(){ue([]),bt(""),oe(!0),Ke({type:"paperlibrary/setActionTabs",payload:{}})},oe=function(){var gt=Object(e.a)(i.a.mark(function Mt(Jt){var Lt;return i.a.wrap(function(zt){for(;;)switch(zt.prev=zt.next){case 0:return ut(!0),zt.next=3,Ke({type:"paperlibrary/getCourseList",payload:{search:Jt?"":Pe}});case 3:Lt=zt.sent,Lt&&(le((Lt==null?void 0:Lt.courses)||[]),_t(!0),xe(!1)),ut(!1);case 6:case"end":return zt.stop()}},Mt)}));return function(Jt){return gt.apply(this,arguments)}}(),ce=function(Mt){var Jt=parseInt(Mt);return Object(X.isNaN)(Jt)?"":Jt},Ee=function(){var gt=Object(e.a)(i.a.mark(function Mt(){var Jt,Lt,ar;return i.a.wrap(function(nr){for(;;)switch(nr.prev=nr.next){case 0:if(ee.length){nr.next=4;break}return H.b.info("\u60A8\u9700\u8981\u521B\u5EFA\u8BFE\u5802\uFF0C\u624D\u80FD\u53D1\u9001"),tt(!0),nr.abrupt("return");case 4:return nr.next=6,Xt({id:(Jt=Me.actionTabs)===null||Jt===void 0||((Lt=Jt.params)===null||Lt===void 0)?void 0:Lt.id,course_id:ee==null?void 0:ee[0],type:"examination_bank"});case 6:ar=nr.sent,ar||Ce([]);case 8:case"end":return nr.stop()}},Mt)}));return function(){return gt.apply(this,arguments)}}(),Ce=function(){var gt=Object(e.a)(i.a.mark(function Mt(Jt){var Lt,ar,zt,nr,ur,Et,_r,kt,Ut,$t,vr,Wr;return i.a.wrap(function(Hr){for(;;)switch(Hr.prev=Hr.next){case 0:if((Lt=Me.actionTabs)!==null&&Lt!==void 0&&(ar=Lt.params)!==null&&ar!==void 0&&(zt=ar.data)!==null&&zt!==void 0&&zt.is_random){Hr.next=7;break}return Hr.next=3,Ke({type:"paperlibrary/sendToClass",payload:{course_id:ee==null?void 0:ee[0],id:(nr=Me.actionTabs)===null||nr===void 0||((ur=nr.params)===null||ur===void 0)?void 0:ur.id,shixuns_info:Jt.map(function(Fr){return{shixun_id:Fr.id,is_copy:Fr.is_copy,is_use:Fr.is_use}})}});case 3:return Et=Hr.sent,Et&&Et.status===0&&(Ke({type:"paperlibrary/setActionTabs",payload:{}}),ue([]),Ut=Et==null||((_r=Et.first_category_url)===null||_r===void 0||((kt=_r.split("/"))===null||kt===void 0))?void 0:kt[2],Object(x.S)("/classrooms/".concat(Ut,"/exercise"))),xt(),Hr.abrupt("return");case 7:$t=yt.find(function(Fr){return Fr.course_id===(ee==null?void 0:ee[0])}),vr=1,Wr=L.a.confirm({icon:null,className:"custom-modal-divider",centered:!0,width:500,maskClosable:!1,keyboard:!1,cancelButtonProps:{disabled:!1},title:"\u914D\u7F6E\u51FA\u5377\u6570\u91CF",content:r.a.createElement("div",{className:B.a.modalColumn},r.a.createElement("div",{style:{color:"#676A6C",display:"flex"},className:"font14 mt20 mb10"},r.a.createElement("img",{style:{marginRight:5},src:t.a}),"\u968F\u673A\u7EC4\u5377\u7C7B\u578B\u7684\u8BD5\u5377\u6309\u7167\u51FA\u5377\u6570\u91CF\u5BF9\u6307\u5B9A\u8BFE\u5802\u751F\u6210\u4E0D\u91CD\u590D\u7684\u8BD5\u5377\u3002"),r.a.createElement("div",{style:{paddingLeft:18}},"\u8BFE\u5802\u540D\u79F0: ",$t==null?void 0:$t.course_name),r.a.createElement("div",{style:{paddingLeft:9},className:B.a.modalRow},r.a.createElement("sup",{className:B.a.sup},"*"),r.a.createElement("span",{style:{flexShrink:0}},"\u968F\u673A\u51FA\u5377\u6570\u91CF\uFF1A"),r.a.createElement(V.a,{parser:ce,style:{width:120},placeholder:"\u8BF7\u8F93\u5165\u8BD5\u5377\u6570\u91CF",min:1,defaultValue:vr,onChange:function(dr){vr=dr;var Cr=document.getElementById("model_error");vr<1||vr>50?Cr.style.display="block":Cr.style.display="none"}})),r.a.createElement("div",{style:{display:"none",marginLeft:115},id:"model_error",className:"c-red"},"\u8BF7\u8F93\u51651-50\u4E4B\u95F4\u7684\u6574\u6570")),okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onCancel:Se,onOk:function(){var Fr=Object(e.a)(i.a.mark(function Cr(){var tn,Br,An,Sr;return i.a.wrap(function(he){for(;;)switch(he.prev=he.next){case 0:if(!(vr<1||vr>50)){he.next=4;break}return An=document.getElementById("model_error"),An.style.display="block",he.abrupt("return",Promise.reject());case 4:return Wr.update({cancelButtonProps:{disabled:!0}}),he.next=7,Ke({type:"paperlibrary/sendToClass",payload:{course_id:ee==null?void 0:ee[0],id:(tn=Me.actionTabs)===null||tn===void 0||((Br=tn.params)===null||Br===void 0)?void 0:Br.id,num:vr,shixuns_info:Jt.map(function(we){return{shixun_id:we.id,is_copy:we.is_copy,is_use:we.is_use}})}});case 7:Sr=he.sent,Wr.update({cancelButtonProps:{disabled:!1}}),Sr&&Sr.status===0&&(L.a.destroyAll(),L.a.confirm({icon:null,className:"custom-modal-divider",centered:!0,width:500,title:"\u63D0\u793A",content:r.a.createElement("div",{className:B.a.modalColumn},r.a.createElement("div",{style:{color:"#676A6C",display:"flex"},className:"font14 mt20 mb10"},r.a.createElement("img",{style:{marginRight:5},src:b.a}),"\u751F\u6210\u8BD5\u5377\u6210\u529F\uFF0C\u524D\u5F80\u8BFE\u5802\u53BB\u67E5\u770B\u5427\uFF01")),okText:"\u524D\u5F80\u8BFE\u5802",cancelText:"\u8FD4\u56DE\u8BD5\u5377\u5E93",onCancel:Se,onOk:function(){var Qe,lt,ft=Sr==null||((Qe=Sr.first_category_url)===null||Qe===void 0||((lt=Qe.split("/"))===null||lt===void 0))?void 0:lt[2];Object(x.S)("/classrooms/".concat(ft,"/exercise"))}}));case 10:case"end":return he.stop()}},Cr)}));function dr(){return Fr.apply(this,arguments)}return dr}()});case 10:case"end":return Hr.stop()}},Mt)}));return function(Jt){return gt.apply(this,arguments)}}(),Ge=function(){var gt=Object(e.a)(i.a.mark(function Mt(){return i.a.wrap(function(Lt){for(;;)switch(Lt.prev=Lt.next){case 0:return xe(!0),Lt.next=3,oe();case 3:case"end":return Lt.stop()}},Mt)}));return function(){return gt.apply(this,arguments)}}(),et=[{title:"\u8BFE\u5802\u540D\u79F0",dataIndex:"course_name",ellipsis:!0},{title:"\u5206\u73ED\u6570\u91CF",dataIndex:"course_group_count",width:90,ellipsis:!0},{title:"\u5B66\u5458\u4EBA\u6570",dataIndex:"course_member_count",width:90,ellipsis:!0}],pt=Object(Q.b)(),Bt=Object(R.a)(pt,4),Dt=Bt[0],xt=Bt[1],tr=Bt[2],Xt=Bt[3];return r.a.createElement("div",null,r.a.createElement(L.a,{centered:!0,keyboard:!1,closable:!1,visible:Me.actionTabs.key==="Paperlibrary-SendToClass",title:"\u53D1\u9001\u81F3\u8BFE\u5802",maskClosable:!1,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",confirmLoading:ke["paperlibrary/sendToClass"],width:600,onOk:Ee,destroyOnClose:!0,onCancel:Se},r.a.createElement("div",{className:B.a.wrap},r.a.createElement("div",{className:B.a.title},r.a.createElement("img",{src:t.a}),"\u9009\u62E9\u7684\u8BD5\u5377\u5C06\u4F1A\u53D1\u9001\u5230\u6307\u5B9A\u8BFE\u5802\u5E76\u4E3A\u73ED\u7EA7\u5B66\u5458\u751F\u6210\u8003\u8BD5\u8BD5\u5377"),r.a.createElement("div",{className:"mb10"},r.a.createElement(P,{placeholder:"\u8F93\u5165\u8BFE\u5802\u540D\u79F0\u7684\u5173\u952E\u5B57\u8FDB\u884C\u641C\u7D22",value:Pe,onChange:function(Mt){bt(Mt.target.value),Mt.target.value||oe(!0)},onSearch:function(Mt){bt(Mt),oe(),ue([])}})),yt.length?r.a.createElement("div",{className:B.a.radioWrap},r.a.createElement(z.a,{rowClassName:B.a.row,bordered:!1,scroll:(yt==null?void 0:yt.length)<=7?{}:{y:350},loading:at,rowKey:"course_id",pagination:!1,dataSource:yt,columns:et,onRow:function(Mt){return{onClick:function(Lt){console.log([Mt==null?void 0:Mt.course_id]),ue([Mt==null?void 0:Mt.course_id])}}},rowSelection:{type:"radio",selectedRowKeys:ee,onChange:function(Mt){ue(Mt),tt(!1)}}})):!Pe&&!at&&r.a.createElement(S,{createState:ht,refreshLoading:De,onRefresh:Ge,onCreate:function(){_t(!1),Object(x.S)("/classrooms/new")}}),Je&&r.a.createElement("div",{className:B.a.colorFF0000},"\u8BF7\u5148\u9009\u62E9\u8BFE\u5802"))),r.a.createElement(Q.a,{visible:Dt,inPaper:!0,onOk:Ce,onCancel:xt,renderData:tr,modalType:"multiple",type:"examination_bank"}))},ie=Be.a=Object(a.a)(function(be){var me=be.paperlibrary,Me=be.loading,Ne=be.globalSetting;return{paperlibrary:me,globalSetting:Ne,loading:Me.effects}})(q)},"kVK+":function(wt,Be){/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */Be.read=function(G,Ae,z,U,V){var N,L,$=V*8-U-1,H=(1<<$)-1,e=H>>1,R=-7,u=z?V-1:0,f=z?-1:1,l=G[Ae+u];for(u+=f,N=l&(1<<-R)-1,l>>=-R,R+=$;R>0;N=N*256+G[Ae+u],u+=f,R-=8);for(L=N&(1<<-R)-1,N>>=-R,R+=U;R>0;L=L*256+G[Ae+u],u+=f,R-=8);if(N===0)N=1-e;else{if(N===H)return L?NaN:(l?-1:1)*Infinity;L=L+Math.pow(2,U),N=N-e}return(l?-1:1)*L*Math.pow(2,N-U)},Be.write=function(G,Ae,z,U,V,N){var L,$,H,e=N*8-V-1,R=(1<<e)-1,u=R>>1,f=V===23?Math.pow(2,-24)-Math.pow(2,-77):0,l=U?0:N-1,s=U?1:-1,i=Ae<0||Ae===0&&1/Ae<0?1:0;for(Ae=Math.abs(Ae),isNaN(Ae)||Ae===Infinity?($=isNaN(Ae)?1:0,L=R):(L=Math.floor(Math.log(Ae)/Math.LN2),Ae*(H=Math.pow(2,-L))<1&&(L--,H*=2),L+u>=1?Ae+=f/H:Ae+=f*Math.pow(2,1-u),Ae*H>=2&&(L++,H/=2),L+u>=R?($=0,L=R):L+u>=1?($=(Ae*H-1)*Math.pow(2,V),L=L+u):($=Ae*Math.pow(2,u-1)*Math.pow(2,V),L=0));V>=8;G[z+l]=$&255,l+=s,$/=256,V-=8);for(L=L<<V|$,e+=V;e>0;G[z+l]=L&255,l+=s,L/=256,e-=8);G[z+l-s]|=i*128}},n6Qo:function(wt,Be,G){"use strict";G.d(Be,"a",function(){return H});var Ae=G("q1tI"),z=G("biw7"),U=G("fyJ8");function V(e){var R=e.className,u=e.index,f=e.children,l=e.colSpan,s=e.rowSpan,i=Ae.useContext(z.a),o=i.prefixCls,r=i.fixedInfoList,a=r[u];return Ae.createElement(U.a,Object.assign({className:R,index:u,component:"td",prefixCls:o,record:null,dataIndex:null,render:function(){return{children:f,props:{colSpan:l,rowSpan:s}}}},a))}function N(e){return Ae.createElement("tr",Object.assign({},e))}function L(e){var R=e.children,u=Ae.useContext(z.a),f=u.prefixCls;return Ae.createElement("tfoot",{className:"".concat(f,"-summary")},R)}var $=Be.b=L,H={Cell:V,Row:N}},nEHx:function(wt,Be,G){"use strict";G.d(Be,"a",function(){return Ae});var Ae;(function(z){z.DARK="dark",z.LIGHT="light",z.HIGH_CONTRAST="hc"})(Ae||(Ae={}))},ngQI:function(wt,Be,G){"use strict";G.d(Be,"a",function(){return ss}),G.d(Be,"b",function(){return fs}),G.d(Be,"c",function(){return ms});var Ae=G("q1tI"),z=G.n(Ae),U=G("dI71"),V=G("wx14"),N=G("ANjH"),L=G("/MKj");function $(y,I){if(y.length!==I.length)return!1;for(var M=0;M<y.length;M++)if(y[M]!==I[M])return!1;return!0}function H(y,I){var M=Object(Ae.useState)(function(){return{inputs:I,result:y()}})[0],J=Object(Ae.useRef)(!0),se=Object(Ae.useRef)(M),ae=J.current||Boolean(I&&se.current.inputs&&$(I,se.current.inputs)),fe=ae?se.current:{inputs:I,result:y()};return Object(Ae.useEffect)(function(){J.current=!1,se.current=fe},[fe]),fe.result}function e(y,I){return H(function(){return y},I)}var R=H,u=e,f=G("9R94"),l=function(I){var M=I.top,J=I.right,se=I.bottom,ae=I.left,fe=J-ae,pe=se-M,Le={top:M,right:J,bottom:se,left:ae,width:fe,height:pe,x:ae,y:M,center:{x:(J+ae)/2,y:(se+M)/2}};return Le},s=function(I,M){return{top:I.top-M.top,left:I.left-M.left,bottom:I.bottom+M.bottom,right:I.right+M.right}},i=function(I,M){return{top:I.top+M.top,left:I.left+M.left,bottom:I.bottom-M.bottom,right:I.right-M.right}},o=function(I,M){return{top:I.top+M.y,left:I.left+M.x,bottom:I.bottom+M.y,right:I.right+M.x}},r={top:0,right:0,bottom:0,left:0},a=function(I){var M=I.borderBox,J=I.margin,se=J===void 0?r:J,ae=I.border,fe=ae===void 0?r:ae,pe=I.padding,Le=pe===void 0?r:pe,je=l(s(M,se)),We=l(i(M,fe)),Fe=l(i(We,Le));return{marginBox:je,borderBox:l(M),paddingBox:We,contentBox:Fe,margin:se,border:fe,padding:Le}},n=function(I){var M=I.slice(0,-2),J=I.slice(-2);if(J!=="px")return 0;var se=Number(M);return isNaN(se)&&Object(f.a)(!1),se},t=function(){return{x:window.pageXOffset,y:window.pageYOffset}},E=function(I,M){var J=I.borderBox,se=I.border,ae=I.margin,fe=I.padding,pe=o(J,M);return a({borderBox:pe,border:se,margin:ae,padding:fe})},b=function(I,M){return M===void 0&&(M=t()),E(I,M)},_=function(I,M){var J={top:n(M.marginTop),right:n(M.marginRight),bottom:n(M.marginBottom),left:n(M.marginLeft)},se={top:n(M.paddingTop),right:n(M.paddingRight),bottom:n(M.paddingBottom),left:n(M.paddingLeft)},ae={top:n(M.borderTopWidth),right:n(M.borderRightWidth),bottom:n(M.borderBottomWidth),left:n(M.borderLeftWidth)};return a({borderBox:I,margin:J,padding:se,border:ae})},B=function(I){var M=I.getBoundingClientRect(),J=window.getComputedStyle(I);return _(M,J)},x=Number.isNaN||function(I){return typeof I=="number"&&I!==I};function h(y,I){return y===I?!0:!!(x(y)&&x(I))}function d(y,I){if(y.length!==I.length)return!1;for(var M=0;M<y.length;M++)if(!h(y[M],I[M]))return!1;return!0}function A(y,I){I===void 0&&(I=d);var M,J=[],se,ae=!1;function fe(){for(var pe=[],Le=0;Le<arguments.length;Le++)pe[Le]=arguments[Le];return ae&&M===this&&I(pe,J)||(se=y.apply(this,pe),ae=!0,M=this,J=pe),se}return fe}var c=A,w=function(I){var M=[],J=null,se=function(){for(var fe=arguments.length,pe=new Array(fe),Le=0;Le<fe;Le++)pe[Le]=arguments[Le];if(M=pe,J)return;J=requestAnimationFrame(function(){J=null,I.apply(void 0,M)})};return se.cancel=function(){if(!J)return;cancelAnimationFrame(J),J=null},se},m=w,g=G("i8i4"),F=G.n(g),k=!0,S=/[ \t]{2,}/g,Q=/^[ \t]*/gm,X=function(I){return I.replace(S," ").replace(Q,"").trim()},P=function(I){return X(`
|
|
%creact-beautiful-dnd
|
|
|
|
%c`+X(I)+`
|
|
|
|
%c\u{1F477}\u200D This is a development only message. It will be removed in production builds.
|
|
`)},q=function(I){return[P(I),"color: #00C584; font-size: 1.2em; font-weight: bold;","line-height: 1.5","color: #723874;"]},ie="__react-beautiful-dnd-disable-dev-warnings";function be(y,I){var M;if(k)return;if(typeof window!="undefined"&&window[ie])return;(M=console)[y].apply(M,q(I))}var me=be.bind(null,"warn"),Me=be.bind(null,"error");function Ne(){}function ke(y,I){return Object(V.a)({},y,{},I)}function Ke(y,I,M){var J=I.map(function(se){var ae=ke(M,se.options);return y.addEventListener(se.eventName,se.fn,ae),function(){y.removeEventListener(se.eventName,se.fn,ae)}});return function(){J.forEach(function(ae){ae()})}}var Ye=!0,_e="Invariant failed";function Te(y){this.message=y}Te.prototype.toString=function(){return this.message};function Pe(y,I){if(y)return;throw Ye?new Te(_e):new Te(_e+": "+(I||""))}var bt=function(y){Object(U.a)(I,y);function I(){for(var J,se=arguments.length,ae=new Array(se),fe=0;fe<se;fe++)ae[fe]=arguments[fe];return J=y.call.apply(y,[this].concat(ae))||this,J.callbacks=null,J.unbind=Ne,J.onWindowError=function(pe){var Le=J.getCallbacks();Le.isDragging()&&Le.tryAbort();var je=pe.error;je instanceof Te&&pe.preventDefault()},J.getCallbacks=function(){if(!J.callbacks)throw new Error("Unable to find AppCallbacks in <ErrorBoundary/>");return J.callbacks},J.setCallbacks=function(pe){J.callbacks=pe},J}var M=I.prototype;return M.componentDidMount=function(){this.unbind=Ke(window,[{eventName:"error",fn:this.onWindowError}])},M.componentWillUnmount=function(){this.unbind()},M.componentDidCatch=function(se){if(se instanceof Te){this.setState({});return}throw se},M.render=function(){return this.props.children(this.setCallbacks)},I}(z.a.Component),mt=`
|
|
Press space bar to start a drag.
|
|
When dragging you can use the arrow keys to move the item around and escape to cancel.
|
|
Some screen readers may require you to be in focus mode or to use your pass through key
|
|
`,dt=function(I){return I+1},yt=function(I){return`
|
|
You have lifted an item in position `+dt(I.source.index)+`
|
|
`},le=function(I,M){var J=I.droppableId===M.droppableId,se=dt(I.index),ae=dt(M.index);return J?`
|
|
You have moved the item from position `+se+`
|
|
to position `+ae+`
|
|
`:`
|
|
You have moved the item from position `+se+`
|
|
in list `+I.droppableId+`
|
|
to list `+M.droppableId+`
|
|
in position `+ae+`
|
|
`},Z=function(I,M,J){var se=M.droppableId===J.droppableId;return se?`
|
|
The item `+I+`
|
|
has been combined with `+J.draggableId:`
|
|
The item `+I+`
|
|
in list `+M.droppableId+`
|
|
has been combined with `+J.draggableId+`
|
|
in list `+J.droppableId+`
|
|
`},te=function(I){var M=I.destination;if(M)return le(I.source,M);var J=I.combine;return J?Z(I.draggableId,I.source,J):"You are over an area that cannot be dropped on"},ee=function(I){return`
|
|
The item has returned to its starting position
|
|
of `+dt(I.index)+`
|
|
`},ue=function(I){if(I.reason==="CANCEL")return`
|
|
Movement cancelled.
|
|
`+ee(I.source)+`
|
|
`;var M=I.destination,J=I.combine;return M?`
|
|
You have dropped the item.
|
|
`+le(I.source,M)+`
|
|
`:J?`
|
|
You have dropped the item.
|
|
`+Z(I.draggableId,I.source,J)+`
|
|
`:`
|
|
The item has been dropped while not over a drop area.
|
|
`+ee(I.source)+`
|
|
`},ye={dragHandleUsageInstructions:mt,onDragStart:yt,onDragUpdate:te,onDragEnd:ue},ve={x:0,y:0},Je=function(I,M){return{x:I.x+M.x,y:I.y+M.y}},tt=function(I,M){return{x:I.x-M.x,y:I.y-M.y}},it=function(I,M){return I.x===M.x&&I.y===M.y},st=function(I){return{x:I.x!==0?-I.x:0,y:I.y!==0?-I.y:0}},ht=function(I,M,J){var se;return J===void 0&&(J=0),se={},se[I]=M,se[I==="x"?"y":"x"]=J,se},_t=function(I,M){return Math.sqrt(Math.pow(M.x-I.x,2)+Math.pow(M.y-I.y,2))},He=function(I,M){return Math.min.apply(Math,M.map(function(J){return _t(I,J)}))},Xe=function(I){return function(M){return{x:I(M.x),y:I(M.y)}}},at=function(y,I){var M=l({top:Math.max(I.top,y.top),right:Math.min(I.right,y.right),bottom:Math.min(I.bottom,y.bottom),left:Math.max(I.left,y.left)});return M.width<=0||M.height<=0?null:M},ut=function(I,M){return{top:I.top+M.y,left:I.left+M.x,bottom:I.bottom+M.y,right:I.right+M.x}},$e=function(I){return[{x:I.left,y:I.top},{x:I.right,y:I.top},{x:I.left,y:I.bottom},{x:I.right,y:I.bottom}]},qe={top:0,right:0,bottom:0,left:0},De=function(I,M){return M?ut(I,M.scroll.diff.displacement):I},xe=function(I,M,J){if(J&&J.increasedBy){var se;return Object(V.a)({},I,(se={},se[M.end]=I[M.end]+J.increasedBy[M.line],se))}return I},Se=function(I,M){return M&&M.shouldClipSubject?at(M.pageMarginBox,I):l(I)},oe=function(y){var I=y.page,M=y.withPlaceholder,J=y.axis,se=y.frame,ae=De(I.marginBox,se),fe=xe(ae,J,M),pe=Se(fe,se);return{page:I,withPlaceholder:M,active:pe}},ce=function(y,I){y.frame||Pe(!1);var M=y.frame,J=tt(I,M.scroll.initial),se=st(J),ae=Object(V.a)({},M,{scroll:{initial:M.scroll.initial,current:I,diff:{value:J,displacement:se},max:M.scroll.max}}),fe=oe({page:y.subject.page,withPlaceholder:y.subject.withPlaceholder,axis:y.axis,frame:ae}),pe=Object(V.a)({},y,{frame:ae,subject:fe});return pe};function Ee(y){return Number.isInteger?Number.isInteger(y):typeof y=="number"&&isFinite(y)&&Math.floor(y)===y}function Ce(y){return Object.values?Object.values(y):Object.keys(y).map(function(I){return y[I]})}function Ge(y,I){if(y.findIndex)return y.findIndex(I);for(var M=0;M<y.length;M++)if(I(y[M]))return M;return-1}function et(y,I){if(y.find)return y.find(I);var M=Ge(y,I);return M!==-1?y[M]:void 0}function pt(y){return Array.prototype.slice.call(y)}var Bt=c(function(y){return y.reduce(function(I,M){return I[M.descriptor.id]=M,I},{})}),Dt=c(function(y){return y.reduce(function(I,M){return I[M.descriptor.id]=M,I},{})}),xt=c(function(y){return Ce(y)}),tr=c(function(y){return Ce(y)}),Xt=c(function(y,I){var M=tr(I).filter(function(J){return y===J.descriptor.droppableId}).sort(function(J,se){return J.descriptor.index-se.descriptor.index});return M});function gt(y){return y.at&&y.at.type==="REORDER"?y.at.destination:null}function Mt(y){return y.at&&y.at.type==="COMBINE"?y.at.combine:null}var Jt=c(function(y,I){return I.filter(function(M){return M.descriptor.id!==y.descriptor.id})}),Lt=function(y){var I=y.isMovingForward,M=y.draggable,J=y.destination,se=y.insideDestination,ae=y.previousImpact;if(!J.isCombineEnabled)return null;var fe=gt(ae);if(!fe)return null;function pe(St){var Tt={type:"COMBINE",combine:{draggableId:St,droppableId:J.descriptor.id}};return Object(V.a)({},ae,{at:Tt})}var Le=ae.displaced.all,je=Le.length?Le[0]:null;if(I)return je?pe(je):null;var We=Jt(M,se);if(!je){if(!We.length)return null;var Fe=We[We.length-1];return pe(Fe.descriptor.id)}var Ue=Ge(We,function(St){return St.descriptor.id===je});Ue!==-1||Pe(!1);var Ve=Ue-1;if(Ve<0)return null;var nt=We[Ve];return pe(nt.descriptor.id)},ar=function(y,I){return y.descriptor.droppableId===I.descriptor.id},zt={point:ve,value:0},nr={invisible:{},visible:{},all:[]},ur={displaced:nr,displacedBy:zt,at:null},Et=function(y,I){return function(M){return y<=M&&M<=I}},_r=function(y){var I=Et(y.top,y.bottom),M=Et(y.left,y.right);return function(J){var se=I(J.top)&&I(J.bottom)&&M(J.left)&&M(J.right);if(se)return!0;var ae=I(J.top)||I(J.bottom),fe=M(J.left)||M(J.right),pe=ae&&fe;if(pe)return!0;var Le=J.top<y.top&&J.bottom>y.bottom,je=J.left<y.left&&J.right>y.right,We=Le&&je;if(We)return!0;var Fe=Le&&fe||je&&ae;return Fe}},kt=function(y){var I=Et(y.top,y.bottom),M=Et(y.left,y.right);return function(J){var se=I(J.top)&&I(J.bottom)&&M(J.left)&&M(J.right);return se}},Ut={direction:"vertical",line:"y",crossAxisLine:"x",start:"top",end:"bottom",size:"height",crossAxisStart:"left",crossAxisEnd:"right",crossAxisSize:"width"},$t={direction:"horizontal",line:"x",crossAxisLine:"y",start:"left",end:"right",size:"width",crossAxisStart:"top",crossAxisEnd:"bottom",crossAxisSize:"height"},vr=function(y){return function(I){var M=Et(I.top,I.bottom),J=Et(I.left,I.right);return function(se){return y===Ut?M(se.top)&&M(se.bottom):J(se.left)&&J(se.right)}}},Wr=function(I,M){var J=M.frame?M.frame.scroll.diff.displacement:ve;return ut(I,J)},Gr=function(I,M,J){return M.subject.active?J(M.subject.active)(I):!1},Hr=function(I,M,J){return J(M)(I)},Fr=function(I){var M=I.target,J=I.destination,se=I.viewport,ae=I.withDroppableDisplacement,fe=I.isVisibleThroughFrameFn,pe=ae?Wr(M,J):M;return Gr(pe,J,fe)&&Hr(pe,se,fe)},dr=function(I){return Fr(Object(V.a)({},I,{isVisibleThroughFrameFn:_r}))},Cr=function(I){return Fr(Object(V.a)({},I,{isVisibleThroughFrameFn:kt}))},tn=function(I){return Fr(Object(V.a)({},I,{isVisibleThroughFrameFn:vr(I.destination.axis)}))},Br=function(I,M,J){if(typeof J=="boolean")return J;if(!M)return!0;var se=M.invisible,ae=M.visible;if(se[I])return!1;var fe=ae[I];return fe?fe.shouldAnimate:!0};function An(y,I){var M=y.page.marginBox,J={top:I.point.y,right:0,bottom:0,left:I.point.x};return l(s(M,J))}function Sr(y){var I=y.afterDragging,M=y.destination,J=y.displacedBy,se=y.viewport,ae=y.forceShouldAnimate,fe=y.last;return I.reduce(function(Le,je){var We=An(je,J),Fe=je.descriptor.id;Le.all.push(Fe);var Ue=dr({target:We,destination:M,viewport:se,withDroppableDisplacement:!0});if(!Ue)return Le.invisible[je.descriptor.id]=!0,Le;var Ve=Br(Fe,fe,ae),nt={draggableId:Fe,shouldAnimate:Ve};return Le.visible[Fe]=nt,Le},{all:[],visible:{},invisible:{}})}function de(y,I){if(!y.length)return 0;var M=y[y.length-1].descriptor.index;return I.inHomeList?M:M+1}function he(y){var I=y.insideDestination,M=y.inHomeList,J=y.displacedBy,se=y.destination,ae=de(I,{inHomeList:M});return{displaced:nr,displacedBy:J,at:{type:"REORDER",destination:{droppableId:se.descriptor.id,index:ae}}}}function we(y){var I=y.draggable,M=y.insideDestination,J=y.destination,se=y.viewport,ae=y.displacedBy,fe=y.last,pe=y.index,Le=y.forceShouldAnimate,je=ar(I,J);if(pe==null)return he({insideDestination:M,inHomeList:je,displacedBy:ae,destination:J});var We=et(M,function(St){return St.descriptor.index===pe});if(!We)return he({insideDestination:M,inHomeList:je,displacedBy:ae,destination:J});var Fe=Jt(I,M),Ue=M.indexOf(We),Ve=Fe.slice(Ue),nt=Sr({afterDragging:Ve,destination:J,displacedBy:ae,last:fe,viewport:se.frame,forceShouldAnimate:Le});return{displaced:nt,displacedBy:ae,at:{type:"REORDER",destination:{droppableId:J.descriptor.id,index:pe}}}}function Qe(y,I){return Boolean(I.effected[y])}var lt=function(y){var I=y.isMovingForward,M=y.destination,J=y.draggables,se=y.combine,ae=y.afterCritical;if(!M.isCombineEnabled)return null;var fe=se.draggableId,pe=J[fe],Le=pe.descriptor.index,je=Qe(fe,ae);return je?I?Le:Le-1:I?Le+1:Le},ft=function(y){var I=y.isMovingForward,M=y.isInHomeList,J=y.insideDestination,se=y.location;if(!J.length)return null;var ae=se.index,fe=I?ae+1:ae-1,pe=J[0].descriptor.index,Le=J[J.length-1].descriptor.index,je=M?Le:Le+1;return fe<pe||fe>je?null:fe},j=function(y){var I=y.isMovingForward,M=y.isInHomeList,J=y.draggable,se=y.draggables,ae=y.destination,fe=y.insideDestination,pe=y.previousImpact,Le=y.viewport,je=y.afterCritical,We=pe.at;if(We||Pe(!1),We.type==="REORDER"){var Fe=ft({isMovingForward:I,isInHomeList:M,location:We.destination,insideDestination:fe});return Fe==null?null:we({draggable:J,insideDestination:fe,destination:ae,viewport:Le,last:pe.displaced,displacedBy:pe.displacedBy,index:Fe})}var Ue=lt({isMovingForward:I,destination:ae,displaced:pe.displaced,draggables:se,combine:We.combine,afterCritical:je});return Ue==null?null:we({draggable:J,insideDestination:fe,destination:ae,viewport:Le,last:pe.displaced,displacedBy:pe.displacedBy,index:Ue})},v=function(y){var I=y.displaced,M=y.afterCritical,J=y.combineWith,se=y.displacedBy,ae=Boolean(I.visible[J]||I.invisible[J]);return Qe(J,M)?ae?ve:st(se.point):ae?se.point:ve},C=function(y){var I=y.afterCritical,M=y.impact,J=y.draggables,se=Mt(M);se||Pe(!1);var ae=se.draggableId,fe=J[ae].page.borderBox.center,pe=v({displaced:M.displaced,afterCritical:I,combineWith:ae,displacedBy:M.displacedBy});return Je(fe,pe)},K=function(I,M){return M.margin[I.start]+M.borderBox[I.size]/2},re=function(I,M){return M.margin[I.end]+M.borderBox[I.size]/2},W=function(I,M,J){return M[I.crossAxisStart]+J.margin[I.crossAxisStart]+J.borderBox[I.crossAxisSize]/2},Ie=function(I){var M=I.axis,J=I.moveRelativeTo,se=I.isMoving;return ht(M.line,J.marginBox[M.end]+K(M,se),W(M,J.marginBox,se))},rt=function(I){var M=I.axis,J=I.moveRelativeTo,se=I.isMoving;return ht(M.line,J.marginBox[M.start]-re(M,se),W(M,J.marginBox,se))},vt=function(I){var M=I.axis,J=I.moveInto,se=I.isMoving;return ht(M.line,J.contentBox[M.start]+K(M,se),W(M,J.contentBox,se))},Ct=function(y){var I=y.impact,M=y.draggable,J=y.draggables,se=y.droppable,ae=y.afterCritical,fe=Xt(se.descriptor.id,J),pe=M.page,Le=se.axis;if(!fe.length)return vt({axis:Le,moveInto:se.page,isMoving:pe});var je=I.displaced,We=I.displacedBy,Fe=je.all[0];if(Fe){var Ue=J[Fe];if(Qe(Fe,ae))return rt({axis:Le,moveRelativeTo:Ue.page,isMoving:pe});var Ve=E(Ue.page,We.point);return rt({axis:Le,moveRelativeTo:Ve,isMoving:pe})}var nt=fe[fe.length-1];if(nt.descriptor.id===M.descriptor.id)return pe.borderBox.center;if(Qe(nt.descriptor.id,ae)){var St=E(nt.page,st(ae.displacedBy.point));return Ie({axis:Le,moveRelativeTo:St,isMoving:pe})}return Ie({axis:Le,moveRelativeTo:nt.page,isMoving:pe})},ot=function(y,I){var M=y.frame;return M?Je(I,M.scroll.diff.displacement):I},Pt=function(I){var M=I.impact,J=I.draggable,se=I.droppable,ae=I.draggables,fe=I.afterCritical,pe=J.page.borderBox.center,Le=M.at;return se&&Le?Le.type==="REORDER"?Ct({impact:M,draggable:J,draggables:ae,droppable:se,afterCritical:fe}):C({impact:M,draggables:ae,afterCritical:fe}):pe},Ot=function(y){var I=Pt(y),M=y.droppable,J=M?ot(M,I):I;return J},Ht=function(y,I){var M=tt(I,y.scroll.initial),J=st(M),se=l({top:I.y,bottom:I.y+y.frame.height,left:I.x,right:I.x+y.frame.width}),ae={frame:se,scroll:{initial:y.scroll.initial,max:y.scroll.max,current:I,diff:{value:M,displacement:J}}};return ae};function er(y,I){return y.map(function(M){return I[M]})}function wr(y,I){for(var M=0;M<I.length;M++){var J=I[M].visible[y];if(J)return J}return null}var sr=function(y){var I=y.impact,M=y.viewport,J=y.destination,se=y.draggables,ae=y.maxScrollChange,fe=Ht(M,Je(M.scroll.current,ae)),pe=J.frame?ce(J,Je(J.frame.scroll.current,ae)):J,Le=I.displaced,je=Sr({afterDragging:er(Le.all,se),destination:J,displacedBy:I.displacedBy,viewport:fe.frame,last:Le,forceShouldAnimate:!1}),We=Sr({afterDragging:er(Le.all,se),destination:pe,displacedBy:I.displacedBy,viewport:M.frame,last:Le,forceShouldAnimate:!1}),Fe={},Ue={},Ve=[Le,je,We];Le.all.forEach(function(St){var Tt=wr(St,Ve);if(Tt){Ue[St]=Tt;return}Fe[St]=!0});var nt=Object(V.a)({},I,{displaced:{all:Le.all,invisible:Fe,visible:Ue}});return nt},hr=function(y,I){return Je(y.scroll.diff.displacement,I)},Zt=function(y){var I=y.pageBorderBoxCenter,M=y.draggable,J=y.viewport,se=hr(J,I),ae=tt(se,M.page.borderBox.center);return Je(M.client.borderBox.center,ae)},Qr=function(y){var I=y.draggable,M=y.destination,J=y.newPageBorderBoxCenter,se=y.viewport,ae=y.withDroppableDisplacement,fe=y.onlyOnMainAxis,pe=fe===void 0?!1:fe,Le=tt(J,I.page.borderBox.center),je=ut(I.page.borderBox,Le),We={target:je,destination:M,withDroppableDisplacement:ae,viewport:se};return pe?tn(We):Cr(We)},Ir=function(y){var I=y.isMovingForward,M=y.draggable,J=y.destination,se=y.draggables,ae=y.previousImpact,fe=y.viewport,pe=y.previousPageBorderBoxCenter,Le=y.previousClientSelection,je=y.afterCritical;if(!J.isEnabled)return null;var We=Xt(J.descriptor.id,se),Fe=ar(M,J),Ue=Lt({isMovingForward:I,draggable:M,destination:J,insideDestination:We,previousImpact:ae})||j({isMovingForward:I,isInHomeList:Fe,draggable:M,draggables:se,destination:J,insideDestination:We,previousImpact:ae,viewport:fe,afterCritical:je});if(!Ue)return null;var Ve=Ot({impact:Ue,draggable:M,droppable:J,draggables:se,afterCritical:je}),nt=Qr({draggable:M,destination:J,newPageBorderBoxCenter:Ve,viewport:fe.frame,withDroppableDisplacement:!1,onlyOnMainAxis:!0});if(nt){var St=Zt({pageBorderBoxCenter:Ve,draggable:M,viewport:fe});return{clientSelection:St,impact:Ue,scrollJumpRequest:null}}var Tt=tt(Ve,pe),Rt=sr({impact:Ue,viewport:fe,destination:J,draggables:se,maxScrollChange:Tt});return{clientSelection:Le,impact:Rt,scrollJumpRequest:Tt}},fr=function(I){var M=I.subject.active;return M||Pe(!1),M},Kr=function(y){var I=y.isMovingForward,M=y.pageBorderBoxCenter,J=y.source,se=y.droppables,ae=y.viewport,fe=J.subject.active;if(!fe)return null;var pe=J.axis,Le=Et(fe[pe.start],fe[pe.end]),je=xt(se).filter(function(Fe){return Fe!==J}).filter(function(Fe){return Fe.isEnabled}).filter(function(Fe){return Boolean(Fe.subject.active)}).filter(function(Fe){return _r(ae.frame)(fr(Fe))}).filter(function(Fe){var Ue=fr(Fe);return I?fe[pe.crossAxisEnd]<Ue[pe.crossAxisEnd]:Ue[pe.crossAxisStart]<fe[pe.crossAxisStart]}).filter(function(Fe){var Ue=fr(Fe),Ve=Et(Ue[pe.start],Ue[pe.end]);return Le(Ue[pe.start])||Le(Ue[pe.end])||Ve(fe[pe.start])||Ve(fe[pe.end])}).sort(function(Fe,Ue){var Ve=fr(Fe)[pe.crossAxisStart],nt=fr(Ue)[pe.crossAxisStart];return I?Ve-nt:nt-Ve}).filter(function(Fe,Ue,Ve){return fr(Fe)[pe.crossAxisStart]===fr(Ve[0])[pe.crossAxisStart]});if(!je.length)return null;if(je.length===1)return je[0];var We=je.filter(function(Fe){var Ue=Et(fr(Fe)[pe.start],fr(Fe)[pe.end]);return Ue(M[pe.line])});return We.length===1?We[0]:We.length>1?We.sort(function(Fe,Ue){return fr(Fe)[pe.start]-fr(Ue)[pe.start]})[0]:je.sort(function(Fe,Ue){var Ve=He(M,$e(fr(Fe))),nt=He(M,$e(fr(Ue)));return Ve!==nt?Ve-nt:fr(Fe)[pe.start]-fr(Ue)[pe.start]})[0]},$r=function(I,M){var J=I.page.borderBox.center;return Qe(I.descriptor.id,M)?tt(J,M.displacedBy.point):J},Zr=function(I,M){var J=I.page.borderBox;return Qe(I.descriptor.id,M)?ut(J,st(M.displacedBy.point)):J},jr=function(y){var I=y.pageBorderBoxCenter,M=y.viewport,J=y.destination,se=y.insideDestination,ae=y.afterCritical,fe=se.filter(function(pe){return Cr({target:Zr(pe,ae),destination:J,viewport:M.frame,withDroppableDisplacement:!0})}).sort(function(pe,Le){var je=_t(I,ot(J,$r(pe,ae))),We=_t(I,ot(J,$r(Le,ae)));return je<We?-1:We<je?1:pe.descriptor.index-Le.descriptor.index});return fe[0]||null},Or=c(function(I,M){var J=M[I.line];return{value:J,point:ht(I.line,J)}}),Vr=function(I,M,J){var se=I.axis;if(I.descriptor.mode==="virtual")return ht(se.line,M[se.line]);var ae=I.subject.page.contentBox[se.size],fe=Xt(I.descriptor.id,J),pe=fe.reduce(function(We,Fe){return We+Fe.client.marginBox[se.size]},0),Le=pe+M[se.line],je=Le-ae;return je<=0?null:ht(se.line,je)},Yr=function(I,M){return Object(V.a)({},I,{scroll:Object(V.a)({},I.scroll,{max:M})})},Jr=function(I,M,J){var se=I.frame;ar(M,I)&&Pe(!1),I.subject.withPlaceholder&&Pe(!1);var ae=Or(I.axis,M.displaceBy).point,fe=Vr(I,ae,J),pe={placeholderSize:ae,increasedBy:fe,oldFrameMaxScroll:I.frame?I.frame.scroll.max:null};if(!se){var Le=oe({page:I.subject.page,withPlaceholder:pe,axis:I.axis,frame:I.frame});return Object(V.a)({},I,{subject:Le})}var je=fe?Je(se.scroll.max,fe):se.scroll.max,We=Yr(se,je),Fe=oe({page:I.subject.page,withPlaceholder:pe,axis:I.axis,frame:We});return Object(V.a)({},I,{subject:Fe,frame:We})},sn=function(I){var M=I.subject.withPlaceholder;M||Pe(!1);var J=I.frame;if(!J){var se=oe({page:I.subject.page,axis:I.axis,frame:null,withPlaceholder:null});return Object(V.a)({},I,{subject:se})}var ae=M.oldFrameMaxScroll;ae||Pe(!1);var fe=Yr(J,ae),pe=oe({page:I.subject.page,axis:I.axis,frame:fe,withPlaceholder:null});return Object(V.a)({},I,{subject:pe,frame:fe})},rn=function(y){var I=y.previousPageBorderBoxCenter,M=y.moveRelativeTo,J=y.insideDestination,se=y.draggable,ae=y.draggables,fe=y.destination,pe=y.viewport,Le=y.afterCritical;if(!M){if(J.length)return null;var je={displaced:nr,displacedBy:zt,at:{type:"REORDER",destination:{droppableId:fe.descriptor.id,index:0}}},We=Ot({impact:je,draggable:se,droppable:fe,draggables:ae,afterCritical:Le}),Fe=ar(se,fe)?fe:Jr(fe,se,ae),Ue=Qr({draggable:se,destination:Fe,newPageBorderBoxCenter:We,viewport:pe.frame,withDroppableDisplacement:!1,onlyOnMainAxis:!0});return Ue?je:null}var Ve=Boolean(I[fe.axis.line]<=M.page.borderBox.center[fe.axis.line]),nt=function(){var Tt=M.descriptor.index;return M.descriptor.id===se.descriptor.id||Ve?Tt:Tt+1}(),St=Or(fe.axis,se.displaceBy);return we({draggable:se,insideDestination:J,destination:fe,viewport:pe,displacedBy:St,last:nr,index:nt})},Dr=function(y){var I=y.isMovingForward,M=y.previousPageBorderBoxCenter,J=y.draggable,se=y.isOver,ae=y.draggables,fe=y.droppables,pe=y.viewport,Le=y.afterCritical,je=Kr({isMovingForward:I,pageBorderBoxCenter:M,source:se,droppables:fe,viewport:pe});if(!je)return null;var We=Xt(je.descriptor.id,ae),Fe=jr({pageBorderBoxCenter:M,viewport:pe,destination:je,insideDestination:We,afterCritical:Le}),Ue=rn({previousPageBorderBoxCenter:M,destination:je,draggable:J,draggables:ae,moveRelativeTo:Fe,insideDestination:We,viewport:pe,afterCritical:Le});if(!Ue)return null;var Ve=Ot({impact:Ue,draggable:J,droppable:je,draggables:ae,afterCritical:Le}),nt=Zt({pageBorderBoxCenter:Ve,draggable:J,viewport:pe});return{clientSelection:nt,impact:Ue,scrollJumpRequest:null}},ir=function(y){var I=y.at;return I?I.type==="REORDER"?I.destination.droppableId:I.combine.droppableId:null},rr=function(I,M){var J=ir(I);return J?M[J]:null},mr=function(y){var I=y.state,M=y.type,J=rr(I.impact,I.dimensions.droppables),se=Boolean(J),ae=I.dimensions.droppables[I.critical.droppable.id],fe=J||ae,pe=fe.axis.direction,Le=pe==="vertical"&&(M==="MOVE_UP"||M==="MOVE_DOWN")||pe==="horizontal"&&(M==="MOVE_LEFT"||M==="MOVE_RIGHT");if(Le&&!se)return null;var je=M==="MOVE_DOWN"||M==="MOVE_RIGHT",We=I.dimensions.draggables[I.critical.draggable.id],Fe=I.current.page.borderBoxCenter,Ue=I.dimensions,Ve=Ue.draggables,nt=Ue.droppables;return Le?Ir({isMovingForward:je,previousPageBorderBoxCenter:Fe,draggable:We,destination:fe,draggables:Ve,viewport:I.viewport,previousClientSelection:I.current.client.selection,previousImpact:I.impact,afterCritical:I.afterCritical}):Dr({isMovingForward:je,previousPageBorderBoxCenter:Fe,draggable:We,isOver:fe,draggables:Ve,droppables:nt,viewport:I.viewport,afterCritical:I.afterCritical})};function Ar(y){return y.phase==="DRAGGING"||y.phase==="COLLECTING"}function zr(y){var I=Et(y.top,y.bottom),M=Et(y.left,y.right);return function(se){return I(se.y)&&M(se.x)}}function br(y,I){return y.left<I.right&&y.right>I.left&&y.top<I.bottom&&y.bottom>I.top}function Rn(y){var I=y.pageBorderBox,M=y.draggable,J=y.candidates,se=M.page.borderBox.center,ae=J.map(function(fe){var pe=fe.axis,Le=ht(fe.axis.line,I.center[pe.line],fe.page.borderBox.center[pe.crossAxisLine]);return{id:fe.descriptor.id,distance:_t(se,Le)}}).sort(function(fe,pe){return pe.distance-fe.distance});return ae[0]?ae[0].id:null}function qr(y){var I=y.pageBorderBox,M=y.draggable,J=y.droppables,se=xt(J).filter(function(ae){if(!ae.isEnabled)return!1;var fe=ae.subject.active;if(!fe)return!1;if(!br(I,fe))return!1;if(zr(fe)(I.center))return!0;var pe=ae.axis,Le=fe.center[pe.crossAxisLine],je=I[pe.crossAxisStart],We=I[pe.crossAxisEnd],Fe=Et(fe[pe.crossAxisStart],fe[pe.crossAxisEnd]),Ue=Fe(je),Ve=Fe(We);return!Ue&&!Ve?!0:Ue?je<Le:We>Le});return se.length?se.length===1?se[0].descriptor.id:Rn({pageBorderBox:I,draggable:M,candidates:se}):null}var Bn=function(I,M){return l(ut(I,M))},Dn=function(y,I){var M=y.frame;return M?Bn(I,M.scroll.diff.value):I};function Pn(y){var I=y.displaced,M=y.id;return Boolean(I.visible[M]||I.invisible[M])}function Xr(y){var I=y.draggable,M=y.closest,J=y.inHomeList;return M?J&&M.descriptor.index>I.descriptor.index?M.descriptor.index-1:M.descriptor.index:null}var Zi=function(y){var I=y.pageBorderBoxWithDroppableScroll,M=y.draggable,J=y.destination,se=y.insideDestination,ae=y.last,fe=y.viewport,pe=y.afterCritical,Le=J.axis,je=Or(J.axis,M.displaceBy),We=je.value,Fe=I[Le.start],Ue=I[Le.end],Ve=Jt(M,se),nt=et(Ve,function(Tt){var Rt=Tt.descriptor.id,Ft=Tt.page.borderBox.center[Le.line],Yt=Qe(Rt,pe),qt=Pn({displaced:ae,id:Rt});return Yt?qt?Ue<=Ft:Fe<Ft-We:qt?Ue<=Ft+We:Fe<Ft}),St=Xr({draggable:M,closest:nt,inHomeList:ar(M,J)});return we({draggable:M,insideDestination:se,destination:J,viewport:fe,last:ae,displacedBy:je,index:St})},jn=4,qi=function(y){var I=y.draggable,M=y.pageBorderBoxWithDroppableScroll,J=y.previousImpact,se=y.destination,ae=y.insideDestination,fe=y.afterCritical;if(!se.isCombineEnabled)return null;var pe=se.axis,Le=Or(se.axis,I.displaceBy),je=Le.value,We=M[pe.start],Fe=M[pe.end],Ue=Jt(I,ae),Ve=et(Ue,function(St){var Tt=St.descriptor.id,Rt=St.page.borderBox,Ft=Rt[pe.size],Yt=Ft/jn,qt=Qe(Tt,fe),pr=Pn({displaced:J.displaced,id:Tt});return qt?pr?Fe>Rt[pe.start]+Yt&&Fe<Rt[pe.end]-Yt:We>Rt[pe.start]-je+Yt&&We<Rt[pe.end]-je-Yt:pr?Fe>Rt[pe.start]+je+Yt&&Fe<Rt[pe.end]+je-Yt:We>Rt[pe.start]+Yt&&We<Rt[pe.end]-Yt});if(!Ve)return null;var nt={displacedBy:Le,displaced:J.displaced,at:{type:"COMBINE",combine:{draggableId:Ve.descriptor.id,droppableId:se.descriptor.id}}};return nt},ea=function(y){var I=y.pageOffset,M=y.draggable,J=y.draggables,se=y.droppables,ae=y.previousImpact,fe=y.viewport,pe=y.afterCritical,Le=Bn(M.page.borderBox,I),je=qr({pageBorderBox:Le,draggable:M,droppables:se});if(!je)return ur;var We=se[je],Fe=Xt(We.descriptor.id,J),Ue=Dn(We,Le);return qi({pageBorderBoxWithDroppableScroll:Ue,draggable:M,previousImpact:ae,destination:We,insideDestination:Fe,afterCritical:pe})||Zi({pageBorderBoxWithDroppableScroll:Ue,draggable:M,destination:We,insideDestination:Fe,last:ae.displaced,viewport:fe,afterCritical:pe})},oi=function(y,I){var M;return Object(V.a)({},y,(M={},M[I.descriptor.id]=I,M))},wi=function(I){var M=I.previousImpact,J=I.impact,se=I.droppables,ae=ir(M),fe=ir(J);if(!ae)return se;if(ae===fe)return se;var pe=se[ae];if(!pe.subject.withPlaceholder)return se;var Le=sn(pe);return oi(se,Le)},Sn=function(y){var I=y.draggable,M=y.draggables,J=y.droppables,se=y.previousImpact,ae=y.impact,fe=wi({previousImpact:se,impact:ae,droppables:J}),pe=ir(ae);if(!pe)return fe;var Le=J[pe];if(ar(I,Le))return fe;if(Le.subject.withPlaceholder)return fe;var je=Jr(Le,I,M);return oi(fe,je)},Tn=function(y){var I=y.state,M=y.clientSelection,J=y.dimensions,se=y.viewport,ae=y.impact,fe=y.scrollJumpRequest,pe=se||I.viewport,Le=J||I.dimensions,je=M||I.current.client.selection,We=tt(je,I.initial.client.selection),Fe={offset:We,selection:je,borderBoxCenter:Je(I.initial.client.borderBoxCenter,We)},Ue={selection:Je(Fe.selection,pe.scroll.current),borderBoxCenter:Je(Fe.borderBoxCenter,pe.scroll.current),offset:Je(Fe.offset,pe.scroll.diff.value)},Ve={client:Fe,page:Ue};if(I.phase==="COLLECTING")return Object(V.a)({phase:"COLLECTING"},I,{dimensions:Le,viewport:pe,current:Ve});var nt=Le.draggables[I.critical.draggable.id],St=ae||ea({pageOffset:Ue.offset,draggable:nt,draggables:Le.draggables,droppables:Le.droppables,previousImpact:I.impact,viewport:pe,afterCritical:I.afterCritical}),Tt=Sn({draggable:nt,impact:St,previousImpact:I.impact,draggables:Le.draggables,droppables:Le.droppables}),Rt=Object(V.a)({},I,{current:Ve,dimensions:{draggables:Le.draggables,droppables:Tt},impact:St,viewport:pe,scrollJumpRequest:fe||null,forceShouldAnimate:fe?!1:null});return Rt};function ta(y,I){return y.map(function(M){return I[M]})}var Ci=function(y){var I=y.impact,M=y.viewport,J=y.draggables,se=y.destination,ae=y.forceShouldAnimate,fe=I.displaced,pe=ta(fe.all,J),Le=Sr({afterDragging:pe,destination:se,displacedBy:I.displacedBy,viewport:M.frame,forceShouldAnimate:ae,last:fe});return Object(V.a)({},I,{displaced:Le})},mn=function(y){var I=y.impact,M=y.draggable,J=y.droppable,se=y.draggables,ae=y.viewport,fe=y.afterCritical,pe=Ot({impact:I,draggable:M,draggables:se,droppable:J,afterCritical:fe});return Zt({pageBorderBoxCenter:pe,draggable:M,viewport:ae})},Mn=function(y){var I=y.state,M=y.dimensions,J=y.viewport;I.movementMode==="SNAP"||Pe(!1);var se=I.impact,ae=J||I.viewport,fe=M||I.dimensions,pe=fe.draggables,Le=fe.droppables,je=pe[I.critical.draggable.id],We=ir(se);We||Pe(!1);var Fe=Le[We],Ue=Ci({impact:se,viewport:ae,destination:Fe,draggables:pe}),Ve=mn({impact:Ue,draggable:je,droppable:Fe,draggables:pe,viewport:ae,afterCritical:I.afterCritical});return Tn({impact:Ue,clientSelection:Ve,state:I,dimensions:fe,viewport:ae})},qn=function(y){return{index:y.index,droppableId:y.droppableId}},ra=function(y){var I=y.draggable,M=y.home,J=y.draggables,se=y.viewport,ae=Or(M.axis,I.displaceBy),fe=Xt(M.descriptor.id,J),pe=fe.indexOf(I);pe!==-1||Pe(!1);var Le=fe.slice(pe+1),je=Le.reduce(function(Ve,nt){return Ve[nt.descriptor.id]=!0,Ve},{}),We={inVirtualList:M.descriptor.mode==="virtual",displacedBy:ae,effected:je},Fe=Sr({afterDragging:Le,destination:M,displacedBy:ae,last:null,viewport:se.frame,forceShouldAnimate:!1}),Ue={displaced:Fe,displacedBy:ae,at:{type:"REORDER",destination:qn(I.descriptor)}};return{impact:Ue,afterCritical:We}},na=function(y,I){return{draggables:y.draggables,droppables:oi(y.droppables,I)}},Wn=function(I){},Gn=function(I){},ia=function(y){var I=y.draggable,M=y.offset,J=y.initialWindowScroll,se=E(I.client,M),ae=b(se,J),fe=Object(V.a)({},I,{placeholder:Object(V.a)({},I.placeholder,{client:se}),client:se,page:ae});return fe},Ti=function(y){var I=y.frame;return I||Pe(!1),I},Fa=function(y){var I=y.additions,M=y.updatedDroppables,J=y.viewport,se=J.scroll.diff.value;return I.map(function(ae){var fe=ae.descriptor.droppableId,pe=M[fe],Le=Ti(pe),je=Le.scroll.diff.value,We=Je(se,je),Fe=ia({draggable:ae,offset:We,initialWindowScroll:J.scroll.initial});return Fe})},xi=function(y){var I=y.state,M=y.published;Wn();var J=M.modified.map(function(Yt){var qt=I.dimensions.droppables[Yt.droppableId],pr=ce(qt,Yt.scroll);return pr}),se=Object(V.a)({},I.dimensions.droppables,{},Bt(J)),ae=Dt(Fa({additions:M.additions,updatedDroppables:se,viewport:I.viewport})),fe=Object(V.a)({},I.dimensions.draggables,{},ae);M.removals.forEach(function(Yt){delete fe[Yt]});var pe={droppables:se,draggables:fe},Le=ir(I.impact),je=Le?pe.droppables[Le]:null,We=pe.draggables[I.critical.draggable.id],Fe=pe.droppables[I.critical.droppable.id],Ue=ra({draggable:We,home:Fe,draggables:fe,viewport:I.viewport}),Ve=Ue.impact,nt=Ue.afterCritical,St=je&&je.isCombineEnabled?I.impact:Ve,Tt=ea({pageOffset:I.current.page.offset,draggable:pe.draggables[I.critical.draggable.id],draggables:pe.draggables,droppables:pe.droppables,previousImpact:St,viewport:I.viewport,afterCritical:nt});Gn();var Rt=Object(V.a)({phase:"DRAGGING"},I,{phase:"DRAGGING",impact:Tt,onLiftImpact:Ve,dimensions:pe,afterCritical:nt,forceShouldAnimate:!1});if(I.phase==="COLLECTING")return Rt;var Ft=Object(V.a)({phase:"DROP_PENDING"},Rt,{phase:"DROP_PENDING",reason:I.reason,isWaiting:!1});return Ft},Bi=function(I){return I.movementMode==="SNAP"},Si=function(I,M,J){var se=na(I.dimensions,M);return!Bi(I)||J?Tn({state:I,dimensions:se}):Mn({state:I,dimensions:se})};function Ii(y){return y.isDragging&&y.movementMode==="SNAP"?Object(V.a)({phase:"DRAGGING"},y,{scrollJumpRequest:null}):y}var Er={phase:"IDLE",completed:null,shouldFlush:!1},yr=function(y,I){if(y===void 0&&(y=Er),I.type==="FLUSH")return Object(V.a)({},Er,{shouldFlush:!0});if(I.type==="INITIAL_PUBLISH"){y.phase==="IDLE"||Pe(!1);var M=I.payload,J=M.critical,se=M.clientSelection,ae=M.viewport,fe=M.dimensions,pe=M.movementMode,Le=fe.draggables[J.draggable.id],je=fe.droppables[J.droppable.id],We={selection:se,borderBoxCenter:Le.client.borderBox.center,offset:ve},Fe={client:We,page:{selection:Je(We.selection,ae.scroll.initial),borderBoxCenter:Je(We.selection,ae.scroll.initial),offset:Je(We.selection,ae.scroll.diff.value)}},Ue=xt(fe.droppables).every(function(No){return!No.isFixedOnPage}),Ve=ra({draggable:Le,home:je,draggables:fe.draggables,viewport:ae}),nt=Ve.impact,St=Ve.afterCritical,Tt={phase:"DRAGGING",isDragging:!0,critical:J,movementMode:pe,dimensions:fe,initial:Fe,current:Fe,isWindowScrollAllowed:Ue,impact:nt,afterCritical:St,onLiftImpact:nt,viewport:ae,scrollJumpRequest:null,forceShouldAnimate:null};return Tt}if(I.type==="COLLECTION_STARTING"){if(y.phase==="COLLECTING"||y.phase==="DROP_PENDING")return y;y.phase==="DRAGGING"||Pe(!1);var Rt=Object(V.a)({phase:"COLLECTING"},y,{phase:"COLLECTING"});return Rt}if(I.type==="PUBLISH_WHILE_DRAGGING")return y.phase==="COLLECTING"||y.phase==="DROP_PENDING"||Pe(!1),xi({state:y,published:I.payload});if(I.type==="MOVE"){if(y.phase==="DROP_PENDING")return y;Ar(y)||Pe(!1);var Ft=I.payload.client;return it(Ft,y.current.client.selection)?y:Tn({state:y,clientSelection:Ft,impact:Bi(y)?y.impact:null})}if(I.type==="UPDATE_DROPPABLE_SCROLL"){if(y.phase==="DROP_PENDING")return Ii(y);if(y.phase==="COLLECTING")return Ii(y);Ar(y)||Pe(!1);var Yt=I.payload,qt=Yt.id,pr=Yt.newScroll,lr=y.dimensions.droppables[qt];if(!lr)return y;var Mr=ce(lr,pr);return Si(y,Mr,!1)}if(I.type==="UPDATE_DROPPABLE_IS_ENABLED"){if(y.phase==="DROP_PENDING")return y;Ar(y)||Pe(!1);var dn=I.payload,Tr=dn.id,an=dn.isEnabled,fn=y.dimensions.droppables[Tr];fn||Pe(!1),fn.isEnabled!==an||Pe(!1);var yn=Object(V.a)({},fn,{isEnabled:an});return Si(y,yn,!0)}if(I.type==="UPDATE_DROPPABLE_IS_COMBINE_ENABLED"){if(y.phase==="DROP_PENDING")return y;Ar(y)||Pe(!1);var ii=I.payload,Kn=ii.id,vi=ii.isCombineEnabled,zi=y.dimensions.droppables[Kn];zi||Pe(!1),zi.isCombineEnabled!==vi||Pe(!1);var LA=Object(V.a)({},zi,{isCombineEnabled:vi});return Si(y,LA,!0)}if(I.type==="MOVE_BY_WINDOW_SCROLL"){if(y.phase==="DROP_PENDING"||y.phase==="DROP_ANIMATING")return y;Ar(y)||Pe(!1),y.isWindowScrollAllowed||Pe(!1);var Lo=I.payload.newScroll;if(it(y.viewport.scroll.current,Lo))return Ii(y);var Uo=Ht(y.viewport,Lo);return Bi(y)?Mn({state:y,viewport:Uo}):Tn({state:y,viewport:Uo})}if(I.type==="UPDATE_VIEWPORT_MAX_SCROLL"){if(!Ar(y))return y;var Ia=I.payload.maxScroll;if(it(Ia,y.viewport.scroll.max))return y;var UA=Object(V.a)({},y.viewport,{scroll:Object(V.a)({},y.viewport.scroll,{max:Ia})});return Object(V.a)({phase:"DRAGGING"},y,{viewport:UA})}if(I.type==="MOVE_UP"||I.type==="MOVE_DOWN"||I.type==="MOVE_LEFT"||I.type==="MOVE_RIGHT"){if(y.phase==="COLLECTING"||y.phase==="DROP_PENDING")return y;y.phase==="DRAGGING"||Pe(!1);var Oa=mr({state:y,type:I.type});return Oa?Tn({state:y,impact:Oa.impact,clientSelection:Oa.clientSelection,scrollJumpRequest:Oa.scrollJumpRequest}):y}if(I.type==="DROP_PENDING"){var FA=I.payload.reason;y.phase==="COLLECTING"||Pe(!1);var NA=Object(V.a)({phase:"DROP_PENDING"},y,{phase:"DROP_PENDING",isWaiting:!0,reason:FA});return NA}if(I.type==="DROP_ANIMATE"){var vs=I.payload,ys=vs.completed,bs=vs.dropDuration,Fo=vs.newHomeClientOffset;y.phase==="DRAGGING"||y.phase==="DROP_PENDING"||Pe(!1);var PA={phase:"DROP_ANIMATING",completed:ys,dropDuration:bs,newHomeClientOffset:Fo,dimensions:y.dimensions};return PA}if(I.type==="DROP_COMPLETE"){var MA=I.payload.completed;return{phase:"IDLE",completed:MA,shouldFlush:!1}}return y},on=function(I){return{type:"BEFORE_INITIAL_CAPTURE",payload:I}},vn=function(I){return{type:"LIFT",payload:I}},ei=function(I){return{type:"INITIAL_PUBLISH",payload:I}},aa=function(I){return{type:"PUBLISH_WHILE_DRAGGING",payload:I}},Oi=function(){return{type:"COLLECTION_STARTING",payload:null}},Na=function(I){return{type:"UPDATE_DROPPABLE_SCROLL",payload:I}},Pa=function(I){return{type:"UPDATE_DROPPABLE_IS_ENABLED",payload:I}},Wo=function(I){return{type:"UPDATE_DROPPABLE_IS_COMBINE_ENABLED",payload:I}},sa=function(I){return{type:"MOVE",payload:I}},_s=function(I){return{type:"MOVE_BY_WINDOW_SCROLL",payload:I}},ws=function(I){return{type:"UPDATE_VIEWPORT_MAX_SCROLL",payload:I}},Ri=function(){return{type:"MOVE_UP",payload:null}},li=function(){return{type:"MOVE_DOWN",payload:null}},Nr=function(){return{type:"MOVE_RIGHT",payload:null}},Go=function(){return{type:"MOVE_LEFT",payload:null}},Di=function(){return{type:"FLUSH",payload:null}},Cs=function(I){return{type:"DROP_ANIMATE",payload:I}},Vn=function(I){return{type:"DROP_COMPLETE",payload:I}},In=function(I){return{type:"DROP",payload:I}},Vo=function(I){return{type:"DROP_PENDING",payload:I}},kn=function(){return{type:"DROP_ANIMATION_FINISHED",payload:null}};function ln(y){if(y.length<=1)return;for(var I=y.map(function(pe){return pe.descriptor.index}),M={},J=1;J<I.length;J++){var se=I[J],ae=I[J-1];se!==ae+1&&(M[se]=!0)}if(!Object.keys(M).length)return;var fe=I.map(function(pe){var Le=Boolean(M[pe]);return Le?"[\u{1F525}"+pe+"]":""+pe}).join(", ")}function Ts(y,I){if(!1)var M}var hn=function(y){return function(I){var M=I.getState,J=I.dispatch;return function(se){return function(ae){if(ae.type!=="LIFT"){se(ae);return}var fe=ae.payload,pe=fe.id,Le=fe.clientSelection,je=fe.movementMode,We=M();We.phase==="DROP_ANIMATING"&&J(Vn({completed:We.completed})),M().phase==="IDLE"||Pe(!1),J(Di()),J(on({draggableId:pe,movementMode:je}));var Fe={shouldPublishImmediately:je==="SNAP"},Ue={draggableId:pe,scrollOptions:Fe},Ve=y.startPublishing(Ue),nt=Ve.critical,St=Ve.dimensions,Tt=Ve.viewport;Ts(nt,St),J(ei({critical:nt,dimensions:St,clientSelection:Le,movementMode:je,viewport:Tt}))}}}},Ma=function(y){return function(){return function(I){return function(M){M.type==="INITIAL_PUBLISH"&&y.dragging(),M.type==="DROP_ANIMATE"&&y.dropping(M.payload.completed.result.reason),(M.type==="FLUSH"||M.type==="DROP_COMPLETE")&&y.resting(),I(M)}}}},Ln={outOfTheWay:"cubic-bezier(0.2, 0, 0, 1)",drop:"cubic-bezier(.2,1,.1,1)"},Hn={opacity:{drop:0,combining:.7},scale:{drop:.75}},Pr={outOfTheWay:.2,minDropTime:.33,maxDropTime:.55},zn=Pr.outOfTheWay+"s "+Ln.outOfTheWay,Ai={fluid:"opacity "+zn,snap:"transform "+zn+", opacity "+zn,drop:function(I){var M=I+"s "+Ln.drop;return"transform "+M+", opacity "+M},outOfTheWay:"transform "+zn,placeholder:"height "+zn+", width "+zn+", margin "+zn},ka=function(I){return it(I,ve)?null:"translate("+I.x+"px, "+I.y+"px)"},oa={moveTo:ka,drop:function(I,M){var J=ka(I);return J?M?J+" scale("+Hn.scale.drop+")":J:null}},ui=Pr.minDropTime,Ha=Pr.maxDropTime,xs=Ha-ui,bn=1500,Xn=.6,Yn=function(y){var I=y.current,M=y.destination,J=y.reason,se=_t(I,M);if(se<=0)return ui;if(se>=bn)return Ha;var ae=se/bn,fe=ui+xs*ae,pe=J==="CANCEL"?fe*Xn:fe;return Number(pe.toFixed(2))},un=function(y){var I=y.impact,M=y.draggable,J=y.dimensions,se=y.viewport,ae=y.afterCritical,fe=J.draggables,pe=J.droppables,Le=ir(I),je=Le?pe[Le]:null,We=pe[M.descriptor.droppableId],Fe=mn({impact:I,draggable:M,draggables:fe,afterCritical:ae,droppable:je||We,viewport:se}),Ue=tt(Fe,M.client.borderBox.center);return Ue},Jn=function(y){var I=y.draggables,M=y.reason,J=y.lastImpact,se=y.home,ae=y.viewport,fe=y.onLiftImpact;if(!J.at||M!=="DROP"){var pe=Ci({draggables:I,impact:fe,destination:se,viewport:ae,forceShouldAnimate:!0});return{impact:pe,didDropInsideDroppable:!1}}if(J.at.type==="REORDER")return{impact:J,didDropInsideDroppable:!0};var Le=Object(V.a)({},J,{displaced:nr});return{impact:Le,didDropInsideDroppable:!0}},Bs=function(y){var I=y.getState,M=y.dispatch;return function(J){return function(se){if(se.type!=="DROP"){J(se);return}var ae=I(),fe=se.payload.reason;if(ae.phase==="COLLECTING"){M(Vo({reason:fe}));return}if(ae.phase==="IDLE")return;var pe=ae.phase==="DROP_PENDING"&&ae.isWaiting;pe&&Pe(!1),ae.phase==="DRAGGING"||ae.phase==="DROP_PENDING"||Pe(!1);var Le=ae.critical,je=ae.dimensions,We=je.draggables[ae.critical.draggable.id],Fe=Jn({reason:fe,lastImpact:ae.impact,afterCritical:ae.afterCritical,onLiftImpact:ae.onLiftImpact,home:ae.dimensions.droppables[ae.critical.droppable.id],viewport:ae.viewport,draggables:ae.dimensions.draggables}),Ue=Fe.impact,Ve=Fe.didDropInsideDroppable,nt=Ve?gt(Ue):null,St=Ve?Mt(Ue):null,Tt={index:Le.draggable.index,droppableId:Le.droppable.id},Rt={draggableId:We.descriptor.id,type:We.descriptor.type,source:Tt,reason:fe,mode:ae.movementMode,destination:nt,combine:St},Ft=un({impact:Ue,draggable:We,dimensions:je,viewport:ae.viewport,afterCritical:ae.afterCritical}),Yt={critical:ae.critical,afterCritical:ae.afterCritical,result:Rt,impact:Ue},qt=!it(ae.current.client.offset,Ft)||Boolean(Rt.combine);if(!qt){M(Vn({completed:Yt}));return}var pr=Yn({current:ae.current.client.offset,destination:Ft,reason:fe}),lr={newHomeClientOffset:Ft,dropDuration:pr,completed:Yt};M(Cs(lr))}}},Qa=function(){return{x:window.pageXOffset,y:window.pageYOffset}};function Ka(y){return{eventName:"scroll",options:{passive:!0,capture:!1},fn:function(M){if(M.target!==window&&M.target!==window.document)return;y()}}}function Ss(y){var I=y.onWindowScroll;function M(){I(Qa())}var J=m(M),se=Ka(J),ae=Ne;function fe(){return ae!==Ne}function pe(){fe()&&Pe(!1),ae=Ke(window,[se])}function Le(){fe()||Pe(!1),J.cancel(),ae(),ae=Ne}return{start:pe,stop:Le,isActive:fe}}var zo=function(I){return I.type==="DROP_COMPLETE"||I.type==="DROP_ANIMATE"||I.type==="FLUSH"},Li=function(y){var I=Ss({onWindowScroll:function(J){y.dispatch(_s({newScroll:J}))}});return function(M){return function(J){!I.isActive()&&J.type==="INITIAL_PUBLISH"&&I.start(),I.isActive()&&zo(J)&&I.stop(),M(J)}}},Qn=function(y){var I=!1,M=!1,J=setTimeout(function(){M=!0}),se=function(fe){if(I)return;if(M)return;I=!0,y(fe),clearTimeout(J)};return se.wasCalled=function(){return I},se},Xo=function(){var y=[],I=function(ae){var fe=Ge(y,function(je){return je.timerId===ae});fe!==-1||Pe(!1);var pe=y.splice(fe,1),Le=pe[0];Le.callback()},M=function(ae){var fe=setTimeout(function(){return I(fe)}),pe={timerId:fe,callback:ae};y.push(pe)},J=function(){if(!y.length)return;var ae=[].concat(y);y.length=0,ae.forEach(function(fe){clearTimeout(fe.timerId),fe.callback()})};return{add:M,flush:J}},Yo=function(I,M){return I==null&&M==null?!0:I==null||M==null?!1:I.droppableId===M.droppableId&&I.index===M.index},la=function(I,M){return I==null&&M==null?!0:I==null||M==null?!1:I.draggableId===M.draggableId&&I.droppableId===M.droppableId},Is=function(I,M){if(I===M)return!0;var J=I.draggable.id===M.draggable.id&&I.draggable.droppableId===M.draggable.droppableId&&I.draggable.type===M.draggable.type&&I.draggable.index===M.draggable.index,se=I.droppable.id===M.droppable.id&&I.droppable.type===M.droppable.type;return J&&se},Ui=function(I,M){Wn(),M(),Gn()},Aa=function(I,M){return{draggableId:I.draggable.id,type:I.droppable.type,source:{droppableId:I.droppable.id,index:I.draggable.index},mode:M}},En=function(I,M,J,se){if(!I){J(se(M));return}var ae=Qn(J),fe={announce:ae};I(M,fe),ae.wasCalled()||J(se(M))},Os=function(y,I){var M=Xo(),J=null,se=function(Ue,Ve){J&&Pe(!1),Ui("onBeforeCapture",function(){var nt=y().onBeforeCapture;if(nt){var St={draggableId:Ue,mode:Ve};nt(St)}})},ae=function(Ue,Ve){J&&Pe(!1),Ui("onBeforeDragStart",function(){var nt=y().onBeforeDragStart;nt&&nt(Aa(Ue,Ve))})},fe=function(Ue,Ve){J&&Pe(!1);var nt=Aa(Ue,Ve);J={mode:Ve,lastCritical:Ue,lastLocation:nt.source,lastCombine:null},M.add(function(){Ui("onDragStart",function(){return En(y().onDragStart,nt,I,ye.onDragStart)})})},pe=function(Ue,Ve){var nt=gt(Ve),St=Mt(Ve);J||Pe(!1);var Tt=!Is(Ue,J.lastCritical);Tt&&(J.lastCritical=Ue);var Rt=!Yo(J.lastLocation,nt);Rt&&(J.lastLocation=nt);var Ft=!la(J.lastCombine,St);if(Ft&&(J.lastCombine=St),!Tt&&!Rt&&!Ft)return;var Yt=Object(V.a)({},Aa(Ue,J.mode),{combine:St,destination:nt});M.add(function(){Ui("onDragUpdate",function(){return En(y().onDragUpdate,Yt,I,ye.onDragUpdate)})})},Le=function(){J||Pe(!1),M.flush()},je=function(Ue){J||Pe(!1),J=null,Ui("onDragEnd",function(){return En(y().onDragEnd,Ue,I,ye.onDragEnd)})},We=function(){if(!J)return;var Ue=Object(V.a)({},Aa(J.lastCritical,J.mode),{combine:null,destination:null,reason:"CANCEL"});je(Ue)};return{beforeCapture:se,beforeStart:ae,start:fe,update:pe,flush:Le,drop:je,abort:We}},Jo=function(y,I){var M=Os(y,I);return function(J){return function(se){return function(ae){if(ae.type==="BEFORE_INITIAL_CAPTURE"){M.beforeCapture(ae.payload.draggableId,ae.payload.movementMode);return}if(ae.type==="INITIAL_PUBLISH"){var fe=ae.payload.critical;M.beforeStart(fe,ae.payload.movementMode),se(ae),M.start(fe,ae.payload.movementMode);return}if(ae.type==="DROP_COMPLETE"){var pe=ae.payload.completed.result;M.flush(),se(ae),M.drop(pe);return}if(se(ae),ae.type==="FLUSH"){M.abort();return}var Le=J.getState();Le.phase==="DRAGGING"&&M.update(Le.critical,Le.impact)}}}},$o=function(y){return function(I){return function(M){if(M.type!=="DROP_ANIMATION_FINISHED"){I(M);return}var J=y.getState();J.phase==="DROP_ANIMATING"||Pe(!1),y.dispatch(Vn({completed:J.completed}))}}},ua=function(y){var I=null,M=null;function J(){M&&(cancelAnimationFrame(M),M=null),I&&(I(),I=null)}return function(se){return function(ae){if((ae.type==="FLUSH"||ae.type==="DROP_COMPLETE"||ae.type==="DROP_ANIMATION_FINISHED")&&J(),se(ae),ae.type!=="DROP_ANIMATE")return;var fe={eventName:"scroll",options:{capture:!0,passive:!1,once:!0},fn:function(){var Le=y.getState();Le.phase==="DROP_ANIMATING"&&y.dispatch(kn())}};M=requestAnimationFrame(function(){M=null,I=Ke(window,[fe])})}}},Zo=function(y){return function(){return function(I){return function(M){(M.type==="DROP_COMPLETE"||M.type==="FLUSH"||M.type==="DROP_ANIMATE")&&y.stopPublishing(),I(M)}}}},Rs=function(y){var I=!1;return function(){return function(M){return function(J){if(J.type==="INITIAL_PUBLISH"){I=!0,y.tryRecordFocus(J.payload.critical.draggable.id),M(J),y.tryRestoreFocusRecorded();return}if(M(J),!I)return;if(J.type==="FLUSH"){I=!1,y.tryRestoreFocusRecorded();return}if(J.type==="DROP_COMPLETE"){I=!1;var se=J.payload.completed.result;se.combine&&y.tryShiftRecord(se.draggableId,se.combine.draggableId),y.tryRestoreFocusRecorded()}}}}},Ds=function(I){return I.type==="DROP_COMPLETE"||I.type==="DROP_ANIMATE"||I.type==="FLUSH"},Ls=function(y){return function(I){return function(M){return function(J){if(Ds(J)){y.stop(),M(J);return}if(J.type==="INITIAL_PUBLISH"){M(J);var se=I.getState();se.phase==="DRAGGING"||Pe(!1),y.start(se);return}M(J),y.scroll(I.getState())}}}},Us=function(y){return function(I){return function(M){if(I(M),M.type!=="PUBLISH_WHILE_DRAGGING")return;var J=y.getState();if(J.phase!=="DROP_PENDING")return;if(J.isWaiting)return;y.dispatch(In({reason:J.reason}))}}},Fs=N.d,Ns=function(y){var I=y.dimensionMarshal,M=y.focusMarshal,J=y.styleMarshal,se=y.getResponders,ae=y.announce,fe=y.autoScroller;return Object(N.e)(yr,Fs(Object(N.a)(Ma(J),Zo(I),hn(I),Bs,$o,ua,Us,Ls(fe),Li,Rs(M),Jo(se,ae))))},ca=function(){return{additions:{},removals:{},modified:{}}};function Ps(y){var I=y.registry,M=y.callbacks,J=ca(),se=null,ae=function(){if(se)return;M.collectionStarting(),se=requestAnimationFrame(function(){se=null,Wn();var We=J,Fe=We.additions,Ue=We.removals,Ve=We.modified,nt=Object.keys(Fe).map(function(Rt){return I.draggable.getById(Rt).getDimension(ve)}).sort(function(Rt,Ft){return Rt.descriptor.index-Ft.descriptor.index}),St=Object.keys(Ve).map(function(Rt){var Ft=I.droppable.getById(Rt),Yt=Ft.callbacks.getScrollWhileDragging();return{droppableId:Rt,scroll:Yt}}),Tt={additions:nt,removals:Object.keys(Ue),modified:St};J=ca(),Gn(),M.publish(Tt)})},fe=function(We){var Fe=We.descriptor.id;J.additions[Fe]=We,J.modified[We.descriptor.droppableId]=!0,J.removals[Fe]&&delete J.removals[Fe],ae()},pe=function(We){var Fe=We.descriptor;J.removals[Fe.id]=!0,J.modified[Fe.droppableId]=!0,J.additions[Fe.id]&&delete J.additions[Fe.id],ae()},Le=function(){if(!se)return;cancelAnimationFrame(se),se=null,J=ca()};return{add:fe,remove:pe,stop:Le}}var Ms=function(y){var I=y.scrollHeight,M=y.scrollWidth,J=y.height,se=y.width,ae=tt({x:M,y:I},{x:se,y:J}),fe={x:Math.max(0,ae.x),y:Math.max(0,ae.y)};return fe},Fi=function(){var y=document.documentElement;return y||Pe(!1),y},ks=function(){var y=Fi(),I=Ms({scrollHeight:y.scrollHeight,scrollWidth:y.scrollWidth,width:y.clientWidth,height:y.clientHeight});return I},qo=function(){var y=Qa(),I=ks(),M=y.y,J=y.x,se=Fi(),ae=se.clientWidth,fe=se.clientHeight,pe=J+ae,Le=M+fe,je=l({top:M,left:J,right:pe,bottom:Le}),We={frame:je,scroll:{initial:y,current:y,max:I,diff:{value:ve,displacement:ve}}};return We},ja=function(y){var I=y.critical,M=y.scrollOptions,J=y.registry;Wn();var se=qo(),ae=se.scroll.current,fe=I.droppable,pe=J.droppable.getAllByType(fe.type).map(function(Fe){return Fe.callbacks.getDimensionAndWatchScroll(ae,M)}),Le=J.draggable.getAllByType(I.draggable.type).map(function(Fe){return Fe.getDimension(ae)}),je={draggables:Dt(Le),droppables:Bt(pe)};Gn();var We={dimensions:je,critical:I,viewport:se};return We};function Hs(y,I,M){if(M.descriptor.id===I.id)return!1;if(M.descriptor.type!==I.type)return!1;var J=y.droppable.getById(M.descriptor.droppableId);return!(J.descriptor.mode!=="virtual")}var Qs=function(y,I){var M=null,J=Ps({callbacks:{publish:I.publishWhileDragging,collectionStarting:I.collectionStarting},registry:y}),se=function(Ve,nt){if(y.droppable.exists(Ve)||Pe(!1),!M)return;I.updateDroppableIsEnabled({id:Ve,isEnabled:nt})},ae=function(Ve,nt){if(!M)return;y.droppable.exists(Ve)||Pe(!1),I.updateDroppableIsCombineEnabled({id:Ve,isCombineEnabled:nt})},fe=function(Ve,nt){if(!M)return;y.droppable.exists(Ve)||Pe(!1),I.updateDroppableScroll({id:Ve,newScroll:nt})},pe=function(Ve,nt){if(!M)return;y.droppable.getById(Ve).callbacks.scroll(nt)},Le=function(){if(!M)return;J.stop();var Ve=M.critical.droppable;y.droppable.getAllByType(Ve.type).forEach(function(nt){return nt.callbacks.dragStopped()}),M.unsubscribe(),M=null},je=function(Ve){M||Pe(!1);var nt=M.critical.draggable;Ve.type==="ADDITION"&&(Hs(y,nt,Ve.value)&&J.add(Ve.value)),Ve.type==="REMOVAL"&&(Hs(y,nt,Ve.value)&&J.remove(Ve.value))},We=function(Ve){M&&Pe(!1);var nt=y.draggable.getById(Ve.draggableId),St=y.droppable.getById(nt.descriptor.droppableId),Tt={draggable:nt.descriptor,droppable:St.descriptor},Rt=y.subscribe(je);return M={critical:Tt,unsubscribe:Rt},ja({critical:Tt,registry:y,scrollOptions:Ve.scrollOptions})},Fe={updateDroppableIsEnabled:se,updateDroppableIsCombineEnabled:ae,scrollDroppable:pe,updateDroppableScroll:fe,startPublishing:We,stopPublishing:Le};return Fe},Ks=function(y,I){return y.phase==="IDLE"?!0:y.phase!=="DROP_ANIMATING"||y.completed.result.draggableId===I?!1:y.completed.result.reason==="DROP"},el=function(y){window.scrollBy(y.x,y.y)},tl=c(function(y){return xt(y).filter(function(I){return I.isEnabled?!!I.frame:!1})}),rl=function(I,M){var J=et(tl(M),function(se){return se.frame||Pe(!1),zr(se.frame.pageMarginBox)(I)});return J},nl=function(y){var I=y.center,M=y.destination,J=y.droppables;if(M){var se=J[M];return se.frame?se:null}var ae=rl(I,J);return ae},_n={startFromPercentage:.25,maxScrollAtPercentage:.05,maxPixelScroll:28,ease:function(I){return Math.pow(I,2)},durationDampening:{stopDampeningAt:1200,accelerateAt:360}},il=function(y,I){var M=y[I.size]*_n.startFromPercentage,J=y[I.size]*_n.maxScrollAtPercentage,se={startScrollingFrom:M,maxScrollValueAt:J};return se},js=function(y){var I=y.startOfRange,M=y.endOfRange,J=y.current,se=M-I;if(se===0)return 0;var ae=J-I,fe=ae/se;return fe},ci=1,al=function(y,I){if(y>I.startScrollingFrom)return 0;if(y<=I.maxScrollValueAt)return _n.maxPixelScroll;if(y===I.startScrollingFrom)return ci;var M=js({startOfRange:I.maxScrollValueAt,endOfRange:I.startScrollingFrom,current:y}),J=1-M,se=_n.maxPixelScroll*_n.ease(J);return Math.ceil(se)},Ws=_n.durationDampening.accelerateAt,Gs=_n.durationDampening.stopDampeningAt,sl=function(y,I){var M=I,J=Gs,se=Date.now(),ae=se-M;if(ae>=Gs)return y;if(ae<Ws)return ci;var fe=js({startOfRange:Ws,endOfRange:J,current:ae}),pe=y*_n.ease(fe);return Math.ceil(pe)},Ni=function(y){var I=y.distanceToEdge,M=y.thresholds,J=y.dragStartTime,se=y.shouldUseTimeDampening,ae=al(I,M);return ae===0?0:se?Math.max(sl(ae,J),ci):ae},Vs=function(y){var I=y.container,M=y.distanceToEdges,J=y.dragStartTime,se=y.axis,ae=y.shouldUseTimeDampening,fe=il(I,se),pe=M[se.end]<M[se.start];return pe?Ni({distanceToEdge:M[se.end],thresholds:fe,dragStartTime:J,shouldUseTimeDampening:ae}):-1*Ni({distanceToEdge:M[se.start],thresholds:fe,dragStartTime:J,shouldUseTimeDampening:ae})},ol=function(y){var I=y.container,M=y.subject,J=y.proposedScroll,se=M.height>I.height,ae=M.width>I.width;return!ae&&!se?J:ae&&se?null:{x:ae?0:J.x,y:se?0:J.y}},ll=Xe(function(y){return y===0?0:y}),zs=function(y){var I=y.dragStartTime,M=y.container,J=y.subject,se=y.center,ae=y.shouldUseTimeDampening,fe={top:se.y-M.top,right:M.right-se.x,bottom:M.bottom-se.y,left:se.x-M.left},pe=Vs({container:M,distanceToEdges:fe,dragStartTime:I,axis:Ut,shouldUseTimeDampening:ae}),Le=Vs({container:M,distanceToEdges:fe,dragStartTime:I,axis:$t,shouldUseTimeDampening:ae}),je=ll({x:Le,y:pe});if(it(je,ve))return null;var We=ol({container:M,subject:J,proposedScroll:je});return We?it(We,ve)?null:We:null},da=Xe(function(y){return y===0?0:y>0?1:-1}),Wa=function(){var y=function(M,J){return M<0?M:M>J?M-J:0};return function(I){var M=I.current,J=I.max,se=I.change,ae=Je(M,se),fe={x:y(ae.x,J.x),y:y(ae.y,J.y)};return it(fe,ve)?null:fe}}(),Xs=function(I){var M=I.max,J=I.current,se=I.change,ae={x:Math.max(J.x,M.x),y:Math.max(J.y,M.y)},fe=da(se),pe=Wa({max:ae,current:J,change:fe});return pe?fe.x!==0&&pe.x===0?!0:fe.y!==0&&pe.y===0:!0},Ga=function(I,M){return Xs({current:I.scroll.current,max:I.scroll.max,change:M})},Al=function(I,M){if(!Ga(I,M))return null;var J=I.scroll.max,se=I.scroll.current;return Wa({current:se,max:J,change:M})},di=function(I,M){var J=I.frame;return J?Xs({current:J.scroll.current,max:J.scroll.max,change:M}):!1},ul=function(I,M){var J=I.frame;return J&&di(I,M)?Wa({current:J.scroll.current,max:J.scroll.max,change:M}):null},cl=function(y){var I=y.viewport,M=y.subject,J=y.center,se=y.dragStartTime,ae=y.shouldUseTimeDampening,fe=zs({dragStartTime:se,container:I.frame,subject:M,center:J,shouldUseTimeDampening:ae});return fe&&Ga(I,fe)?fe:null},dl=function(y){var I=y.droppable,M=y.subject,J=y.center,se=y.dragStartTime,ae=y.shouldUseTimeDampening,fe=I.frame;if(!fe)return null;var pe=zs({dragStartTime:se,container:fe.pageMarginBox,subject:M,center:J,shouldUseTimeDampening:ae});return pe&&di(I,pe)?pe:null},Ys=function(y){var I=y.state,M=y.dragStartTime,J=y.shouldUseTimeDampening,se=y.scrollWindow,ae=y.scrollDroppable,fe=I.current.page.borderBoxCenter,pe=I.dimensions.draggables[I.critical.draggable.id],Le=pe.page.marginBox;if(I.isWindowScrollAllowed){var je=I.viewport,We=cl({dragStartTime:M,viewport:je,subject:Le,center:fe,shouldUseTimeDampening:J});if(We){se(We);return}}var Fe=nl({center:fe,destination:ir(I.impact),droppables:I.dimensions.droppables});if(!Fe)return;var Ue=dl({dragStartTime:M,droppable:Fe,subject:Le,center:fe,shouldUseTimeDampening:J});Ue&&ae(Fe.descriptor.id,Ue)},hl=function(y){var I=y.scrollWindow,M=y.scrollDroppable,J=m(I),se=m(M),ae=null,fe=function(We){ae||Pe(!1);var Fe=ae,Ue=Fe.shouldUseTimeDampening,Ve=Fe.dragStartTime;Ys({state:We,scrollWindow:J,scrollDroppable:se,dragStartTime:Ve,shouldUseTimeDampening:Ue})},pe=function(We){Wn(),ae&&Pe(!1);var Fe=Date.now(),Ue=!1,Ve=function(){Ue=!0};Ys({state:We,dragStartTime:0,shouldUseTimeDampening:!1,scrollWindow:Ve,scrollDroppable:Ve}),ae={dragStartTime:Fe,shouldUseTimeDampening:Ue},Gn(),Ue&&fe(We)},Le=function(){if(!ae)return;J.cancel(),se.cancel(),ae=null};return{start:pe,stop:Le,scroll:fe}},fl=function(y){var I=y.move,M=y.scrollDroppable,J=y.scrollWindow,se=function(je,We){var Fe=Je(je.current.client.selection,We);I({client:Fe})},ae=function(je,We){if(!di(je,We))return We;var Fe=ul(je,We);if(!Fe)return M(je.descriptor.id,We),null;var Ue=tt(We,Fe);M(je.descriptor.id,Ue);var Ve=tt(We,Ue);return Ve},fe=function(je,We,Fe){if(!je)return Fe;if(!Ga(We,Fe))return Fe;var Ue=Al(We,Fe);if(!Ue)return J(Fe),null;var Ve=tt(Fe,Ue);J(Ve);var nt=tt(Fe,Ve);return nt},pe=function(je){var We=je.scrollJumpRequest;if(!We)return;var Fe=ir(je.impact);Fe||Pe(!1);var Ue=ae(je.dimensions.droppables[Fe],We);if(!Ue)return;var Ve=je.viewport,nt=fe(je.isWindowScrollAllowed,Ve,Ue);if(!nt)return;se(je,nt)};return pe},pl=function(y){var I=y.scrollDroppable,M=y.scrollWindow,J=y.move,se=hl({scrollWindow:M,scrollDroppable:I}),ae=fl({move:J,scrollWindow:M,scrollDroppable:I}),fe=function(je){if(je.phase!=="DRAGGING")return;if(je.movementMode==="FLUID"){se.scroll(je);return}if(!je.scrollJumpRequest)return;ae(je)},pe={scroll:fe,start:se.start,stop:se.stop};return pe},hi="data-rbd",fi=function(){var y=hi+"-drag-handle";return{base:y,draggableId:y+"-draggable-id",contextId:y+"-context-id"}}(),Va=function(){var y=hi+"-draggable";return{base:y,contextId:y+"-context-id",id:y+"-id"}}(),ha=function(){var y=hi+"-droppable";return{base:y,contextId:y+"-context-id",id:y+"-id"}}(),Js={contextId:hi+"-scroll-container-context-id"},gl=function(I){return function(M){return"["+M+'="'+I+'"]'}},pi=function(I,M){return I.map(function(J){var se=J.styles[M];return se?J.selector+" { "+se+" }":""}).join(" ")},ml="pointer-events: none;",vl=function(y){var I=gl(y),M=function(){var pe=`
|
|
cursor: -webkit-grab;
|
|
cursor: grab;
|
|
`;return{selector:I(fi.contextId),styles:{always:`
|
|
-webkit-touch-callout: none;
|
|
-webkit-tap-highlight-color: rgba(0,0,0,0);
|
|
touch-action: manipulation;
|
|
`,resting:pe,dragging:ml,dropAnimating:pe}}}(),J=function(){var pe=`
|
|
transition: `+Ai.outOfTheWay+`;
|
|
`;return{selector:I(Va.contextId),styles:{dragging:pe,dropAnimating:pe,userCancel:pe}}}(),se={selector:I(ha.contextId),styles:{always:"overflow-anchor: none;"}},ae={selector:"body",styles:{dragging:`
|
|
cursor: grabbing;
|
|
cursor: -webkit-grabbing;
|
|
user-select: none;
|
|
-webkit-user-select: none;
|
|
-moz-user-select: none;
|
|
-ms-user-select: none;
|
|
overflow-anchor: none;
|
|
`}},fe=[J,M,se,ae];return{always:pi(fe,"always"),resting:pi(fe,"resting"),dragging:pi(fe,"dragging"),dropAnimating:pi(fe,"dropAnimating"),userCancel:pi(fe,"userCancel")}},gn=typeof window!="undefined"&&typeof window.document!="undefined"&&typeof window.document.createElement!="undefined"?Ae.useLayoutEffect:Ae.useEffect,gi=function(){var I=document.querySelector("head");return I||Pe(!1),I},$s=function(I){var M=document.createElement("style");return I&&M.setAttribute("nonce",I),M.type="text/css",M};function yl(y,I){var M=R(function(){return vl(y)},[y]),J=Object(Ae.useRef)(null),se=Object(Ae.useRef)(null),ae=u(c(function(Fe){var Ue=se.current;Ue||Pe(!1),Ue.textContent=Fe}),[]),fe=u(function(Fe){var Ue=J.current;Ue||Pe(!1),Ue.textContent=Fe},[]);gn(function(){!J.current&&!se.current||Pe(!1);var Fe=$s(I),Ue=$s(I);return J.current=Fe,se.current=Ue,Fe.setAttribute(hi+"-always",y),Ue.setAttribute(hi+"-dynamic",y),gi().appendChild(Fe),gi().appendChild(Ue),fe(M.always),ae(M.resting),function(){var Ve=function(St){var Tt=St.current;Tt||Pe(!1),gi().removeChild(Tt),St.current=null};Ve(J),Ve(se)}},[I,fe,ae,M.always,M.resting,y]);var pe=u(function(){return ae(M.dragging)},[ae,M.dragging]),Le=u(function(Fe){if(Fe==="DROP"){ae(M.dropAnimating);return}ae(M.userCancel)},[ae,M.dropAnimating,M.userCancel]),je=u(function(){if(!se.current)return;ae(M.resting)},[ae,M.resting]),We=R(function(){return{dragging:pe,dropping:Le,resting:je}},[pe,Le,je]);return We}var Zs=function(y){return y&&y.ownerDocument?y.ownerDocument.defaultView:window};function Pi(y){return y instanceof Zs(y).HTMLElement}function qs(y,I){var M="["+fi.contextId+'="'+y+'"]',J=pt(document.querySelectorAll(M));if(!J.length)return null;var se=et(J,function(ae){return ae.getAttribute(fi.draggableId)===I});return se&&Pi(se)?se:null}function bl(y){var I=Object(Ae.useRef)({}),M=Object(Ae.useRef)(null),J=Object(Ae.useRef)(null),se=Object(Ae.useRef)(!1),ae=u(function(Ue,Ve){var nt={id:Ue,focus:Ve};return I.current[Ue]=nt,function(){var Tt=I.current,Rt=Tt[Ue];Rt!==nt&&delete Tt[Ue]}},[]),fe=u(function(Ue){var Ve=qs(y,Ue);Ve&&Ve!==document.activeElement&&Ve.focus()},[y]),pe=u(function(Ue,Ve){M.current===Ue&&(M.current=Ve)},[]),Le=u(function(){if(J.current)return;if(!se.current)return;J.current=requestAnimationFrame(function(){J.current=null;var Ue=M.current;Ue&&fe(Ue)})},[fe]),je=u(function(Ue){M.current=null;var Ve=document.activeElement;if(!Ve)return;if(Ve.getAttribute(fi.draggableId)!==Ue)return;M.current=Ue},[]);gn(function(){return se.current=!0,function(){se.current=!1;var Ue=J.current;Ue&&cancelAnimationFrame(Ue)}},[]);var We=R(function(){return{register:ae,tryRecordFocus:je,tryRestoreFocusRecorded:Le,tryShiftRecord:pe}},[ae,je,Le,pe]);return We}function fa(){var y={draggables:{},droppables:{}},I=[];function M(Fe){return I.push(Fe),function(){var Ve=I.indexOf(Fe);if(Ve===-1)return;I.splice(Ve,1)}}function J(Fe){I.length&&I.forEach(function(Ue){return Ue(Fe)})}function se(Fe){return y.draggables[Fe]||null}function ae(Fe){var Ue=se(Fe);return Ue||Pe(!1),Ue}var fe={register:function(Ue){y.draggables[Ue.descriptor.id]=Ue,J({type:"ADDITION",value:Ue})},update:function(Ue,Ve){var nt=y.draggables[Ve.descriptor.id];if(!nt)return;if(nt.uniqueId!==Ue.uniqueId)return;delete y.draggables[Ve.descriptor.id],y.draggables[Ue.descriptor.id]=Ue},unregister:function(Ue){var Ve=Ue.descriptor.id,nt=se(Ve);if(!nt)return;if(Ue.uniqueId!==nt.uniqueId)return;delete y.draggables[Ve],J({type:"REMOVAL",value:Ue})},getById:ae,findById:se,exists:function(Ue){return Boolean(se(Ue))},getAllByType:function(Ue){return Ce(y.draggables).filter(function(Ve){return Ve.descriptor.type===Ue})}};function pe(Fe){return y.droppables[Fe]||null}function Le(Fe){var Ue=pe(Fe);return Ue||Pe(!1),Ue}var je={register:function(Ue){y.droppables[Ue.descriptor.id]=Ue},unregister:function(Ue){var Ve=pe(Ue.descriptor.id);if(!Ve)return;if(Ue.uniqueId!==Ve.uniqueId)return;delete y.droppables[Ue.descriptor.id]},getById:Le,findById:pe,exists:function(Ue){return Boolean(pe(Ue))},getAllByType:function(Ue){return Ce(y.droppables).filter(function(Ve){return Ve.descriptor.type===Ue})}};function We(){y.draggables={},y.droppables={},I.length=0}return{draggable:fe,droppable:je,subscribe:M,clean:We}}function El(){var y=R(fa,[]);return Object(Ae.useEffect)(function(){return function(){requestAnimationFrame(y.clean)}},[y]),y}var za=z.a.createContext(null),Mi=function(){var y=document.body;return y||Pe(!1),y},_l={position:"absolute",width:"1px",height:"1px",margin:"-1px",border:"0",padding:"0",overflow:"hidden",clip:"rect(0 0 0 0)","clip-path":"inset(100%)"},wl=function(I){return"rbd-announcement-"+I};function Cl(y){var I=R(function(){return wl(y)},[y]),M=Object(Ae.useRef)(null);Object(Ae.useEffect)(function(){var ae=document.createElement("div");return M.current=ae,ae.id=I,ae.setAttribute("aria-live","assertive"),ae.setAttribute("aria-atomic","true"),Object(V.a)(ae.style,_l),Mi().appendChild(ae),function(){setTimeout(function(){var Le=Mi();Le.contains(ae)&&Le.removeChild(ae),ae===M.current&&(M.current=null)})}},[I]);var J=u(function(se){var ae=M.current;if(ae){ae.textContent=se;return}},[]);return J}var eo=0,Tl={separator:"::"};function xl(){eo=0}function Xa(y,I){return I===void 0&&(I=Tl),R(function(){return""+y+I.separator+eo++},[I.separator,y])}function Bl(y){var I=y.contextId,M=y.uniqueId;return"rbd-hidden-text-"+I+"-"+M}function Sl(y){var I=y.contextId,M=y.text,J=Xa("hidden-text",{separator:"-"}),se=R(function(){return Bl({contextId:I,uniqueId:J})},[J,I]);return Object(Ae.useEffect)(function(){var fe=document.createElement("div");return fe.id=se,fe.textContent=M,fe.style.display="none",Mi().appendChild(fe),function(){var Le=Mi();Le.contains(fe)&&Le.removeChild(fe)}},[se,M]),se}var ki=z.a.createContext(null),Il={react:"^16.8.5","react-dom":"^16.8.5"},Ol=/(\d+)\.(\d+)\.(\d+)/,to=function(I){var M=Ol.exec(I);M!=null||Pe(!1);var J=Number(M[1]),se=Number(M[2]),ae=Number(M[3]);return{major:J,minor:se,patch:ae,raw:I}},Hi=function(I,M){return M.major>I.major?!0:M.major<I.major?!1:M.minor>I.minor?!0:M.minor<I.minor?!1:M.patch>=I.patch},Rl=function(y,I){var M=to(y),J=to(I);if(Hi(M,J))return},jA=`
|
|
We expect a html5 doctype: <!doctype html>
|
|
This is to ensure consistent browser layout and measurement
|
|
|
|
More information: https://github.com/atlassian/react-beautiful-dnd/blob/master/docs/guides/doctype.md
|
|
`,ro=function(y){var I=y.doctype;if(!I)return;I.name.toLowerCase()!=="html",I.publicId!==""};function Ya(y){}function Qi(y,I){Ya(function(){Object(Ae.useEffect)(function(){try{y()}catch(M){Me(`
|
|
A setup problem was encountered.
|
|
|
|
> `+M.message+`
|
|
`)}},I)})}function Dl(){Qi(function(){Rl(Il.react,z.a.version),ro(document)},[])}function Ja(y){var I=Object(Ae.useRef)(y);return Object(Ae.useEffect)(function(){I.current=y}),I}function Ll(){var y=null;function I(){return Boolean(y)}function M(fe){return fe===y}function J(fe){y&&Pe(!1);var pe={abandon:fe};return y=pe,pe}function se(){y||Pe(!1),y=null}function ae(){y&&(y.abandon(),se())}return{isClaimed:I,isActive:M,claim:J,release:se,tryAbandon:ae}}var Ul=9,Fl=13,$a=27,nn=32,Nl=33,Pl=34,Ml=35,kl=36,Hl=37,no=38,Ql=39,Kl=40,pa,jl=(pa={},pa[Fl]=!0,pa[Ul]=!0,pa),io=function(y){jl[y.keyCode]&&y.preventDefault()},ga=function(){var y="visibilitychange";if(typeof document=="undefined")return y;var I=[y,"ms"+y,"webkit"+y,"moz"+y,"o"+y],M=et(I,function(J){return"on"+J in document});return M||y}(),Za=0,Qt=5;function Wl(y,I){return Math.abs(I.x-y.x)>=Qt||Math.abs(I.y-y.y)>=Qt}var ao={type:"IDLE"};function qa(y){var I=y.cancel,M=y.completed,J=y.getPhase,se=y.setPhase;return[{eventName:"mousemove",fn:function(fe){var pe=fe.button,Le=fe.clientX,je=fe.clientY;if(pe!==Za)return;var We={x:Le,y:je},Fe=J();if(Fe.type==="DRAGGING"){fe.preventDefault(),Fe.actions.move(We);return}Fe.type==="PENDING"||Pe(!1);var Ue=Fe.point;if(!Wl(Ue,We))return;fe.preventDefault();var Ve=Fe.actions.fluidLift(We);se({type:"DRAGGING",actions:Ve})}},{eventName:"mouseup",fn:function(fe){var pe=J();if(pe.type!=="DRAGGING"){I();return}fe.preventDefault(),pe.actions.drop({shouldBlockNextClick:!0}),M()}},{eventName:"mousedown",fn:function(fe){J().type==="DRAGGING"&&fe.preventDefault(),I()}},{eventName:"keydown",fn:function(fe){var pe=J();if(pe.type==="PENDING"){I();return}if(fe.keyCode===$a){fe.preventDefault(),I();return}io(fe)}},{eventName:"resize",fn:I},{eventName:"scroll",options:{passive:!0,capture:!1},fn:function(){J().type==="PENDING"&&I()}},{eventName:"webkitmouseforcedown",fn:function(fe){var pe=J();if(pe.type!=="IDLE"||Pe(!1),pe.actions.shouldRespectForcePress()){I();return}fe.preventDefault()}},{eventName:ga,fn:I}]}function Un(y){var I=Object(Ae.useRef)(ao),M=Object(Ae.useRef)(Ne),J=R(function(){return{eventName:"mousedown",fn:function(Fe){if(Fe.defaultPrevented)return;if(Fe.button!==Za)return;if(Fe.ctrlKey||Fe.metaKey||Fe.shiftKey||Fe.altKey)return;var Ue=y.findClosestDraggableId(Fe);if(!Ue)return;var Ve=y.tryGetLock(Ue,fe,{sourceEvent:Fe});if(!Ve)return;Fe.preventDefault();var nt={x:Fe.clientX,y:Fe.clientY};M.current(),je(Ve,nt)}}},[y]),se=R(function(){return{eventName:"webkitmouseforcewillbegin",fn:function(Fe){if(Fe.defaultPrevented)return;var Ue=y.findClosestDraggableId(Fe);if(!Ue)return;var Ve=y.findOptionsForDraggable(Ue);if(!Ve)return;if(Ve.shouldRespectForcePress)return;if(!y.canGetLock(Ue))return;Fe.preventDefault()}}},[y]),ae=u(function(){var Fe={passive:!1,capture:!0};M.current=Ke(window,[se,J],Fe)},[se,J]),fe=u(function(){var We=I.current;if(We.type==="IDLE")return;I.current=ao,M.current(),ae()},[ae]),pe=u(function(){var We=I.current;fe(),We.type==="DRAGGING"&&We.actions.cancel({shouldBlockNextClick:!0}),We.type==="PENDING"&&We.actions.abort()},[fe]),Le=u(function(){var Fe={capture:!0,passive:!1},Ue=qa({cancel:pe,completed:fe,getPhase:function(){return I.current},setPhase:function(nt){I.current=nt}});M.current=Ke(window,Ue,Fe)},[pe,fe]),je=u(function(Fe,Ue){I.current.type==="IDLE"||Pe(!1),I.current={type:"PENDING",point:Ue,actions:Fe},Le()},[Le]);gn(function(){return ae(),function(){M.current()}},[ae])}var mi;function so(){}var Ki=(mi={},mi[Pl]=!0,mi[Nl]=!0,mi[kl]=!0,mi[Ml]=!0,mi);function ma(y,I){function M(){I(),y.cancel()}function J(){I(),y.drop()}return[{eventName:"keydown",fn:function(ae){if(ae.keyCode===$a){ae.preventDefault(),M();return}if(ae.keyCode===nn){ae.preventDefault(),J();return}if(ae.keyCode===Kl){ae.preventDefault(),y.moveDown();return}if(ae.keyCode===no){ae.preventDefault(),y.moveUp();return}if(ae.keyCode===Ql){ae.preventDefault(),y.moveRight();return}if(ae.keyCode===Hl){ae.preventDefault(),y.moveLeft();return}if(Ki[ae.keyCode]){ae.preventDefault();return}io(ae)}},{eventName:"mousedown",fn:M},{eventName:"mouseup",fn:M},{eventName:"click",fn:M},{eventName:"touchstart",fn:M},{eventName:"resize",fn:M},{eventName:"wheel",fn:M,options:{passive:!0}},{eventName:ga,fn:M}]}function Gl(y){var I=Object(Ae.useRef)(so),M=R(function(){return{eventName:"keydown",fn:function(ae){if(ae.defaultPrevented)return;if(ae.keyCode!==nn)return;var fe=y.findClosestDraggableId(ae);if(!fe)return;var pe=y.tryGetLock(fe,We,{sourceEvent:ae});if(!pe)return;ae.preventDefault();var Le=!0,je=pe.snapLift();I.current();function We(){Le||Pe(!1),Le=!1,I.current(),J()}I.current=Ke(window,ma(je,We),{capture:!0,passive:!1})}}},[y]),J=u(function(){var ae={passive:!1,capture:!0};I.current=Ke(window,[M],ae)},[M]);gn(function(){return J(),function(){I.current()}},[J])}var es={type:"IDLE"},Vl=120,ti=.15;function ts(y){var I=y.cancel,M=y.getPhase;return[{eventName:"orientationchange",fn:I},{eventName:"resize",fn:I},{eventName:"contextmenu",fn:function(se){se.preventDefault()}},{eventName:"keydown",fn:function(se){if(M().type!=="DRAGGING"){I();return}se.keyCode===$a&&se.preventDefault(),I()}},{eventName:ga,fn:I}]}function rs(y){var I=y.cancel,M=y.completed,J=y.getPhase;return[{eventName:"touchmove",options:{capture:!1},fn:function(ae){var fe=J();if(fe.type!=="DRAGGING"){I();return}fe.hasMoved=!0;var pe=ae.touches[0],Le=pe.clientX,je=pe.clientY,We={x:Le,y:je};ae.preventDefault(),fe.actions.move(We)}},{eventName:"touchend",fn:function(ae){var fe=J();if(fe.type!=="DRAGGING"){I();return}ae.preventDefault(),fe.actions.drop({shouldBlockNextClick:!0}),M()}},{eventName:"touchcancel",fn:function(ae){if(J().type!=="DRAGGING"){I();return}ae.preventDefault(),I()}},{eventName:"touchforcechange",fn:function(ae){var fe=J();fe.type!=="IDLE"||Pe(!1);var pe=ae.touches[0];if(!pe)return;var Le=pe.force>=ti;if(!Le)return;var je=fe.actions.shouldRespectForcePress();if(fe.type==="PENDING"){je&&I();return}if(je){if(fe.hasMoved){ae.preventDefault();return}I();return}ae.preventDefault()}},{eventName:ga,fn:I}]}function zl(y){var I=Object(Ae.useRef)(es),M=Object(Ae.useRef)(Ne),J=u(function(){return I.current},[]),se=u(function(Ve){I.current=Ve},[]),ae=R(function(){return{eventName:"touchstart",fn:function(Ve){if(Ve.defaultPrevented)return;var nt=y.findClosestDraggableId(Ve);if(!nt)return;var St=y.tryGetLock(nt,pe,{sourceEvent:Ve});if(!St)return;var Tt=Ve.touches[0],Rt=Tt.clientX,Ft=Tt.clientY,Yt={x:Rt,y:Ft};M.current(),Fe(St,Yt)}}},[y]),fe=u(function(){var Ve={capture:!0,passive:!1};M.current=Ke(window,[ae],Ve)},[ae]),pe=u(function(){var Ue=I.current;if(Ue.type==="IDLE")return;Ue.type==="PENDING"&&clearTimeout(Ue.longPressTimerId),se(es),M.current(),fe()},[fe,se]),Le=u(function(){var Ue=I.current;pe(),Ue.type==="DRAGGING"&&Ue.actions.cancel({shouldBlockNextClick:!0}),Ue.type==="PENDING"&&Ue.actions.abort()},[pe]),je=u(function(){var Ve={capture:!0,passive:!1},nt={cancel:Le,completed:pe,getPhase:J},St=Ke(window,rs(nt),Ve),Tt=Ke(window,ts(nt),Ve);M.current=function(){St(),Tt()}},[Le,J,pe]),We=u(function(){var Ve=J();Ve.type==="PENDING"||Pe(!1);var nt=Ve.actions.fluidLift(Ve.point);se({type:"DRAGGING",actions:nt,hasMoved:!1})},[J,se]),Fe=u(function(Ve,nt){J().type==="IDLE"||Pe(!1);var St=setTimeout(We,Vl);se({type:"PENDING",point:nt,actions:Ve,longPressTimerId:St}),je()},[je,J,se,We]);gn(function(){return fe(),function(){M.current();var nt=J();nt.type==="PENDING"&&(clearTimeout(nt.longPressTimerId),se(es))}},[J,fe,se]),gn(function(){var Ve=Ke(window,[{eventName:"touchmove",fn:function(){},options:{capture:!1,passive:!1}}]);return Ve},[])}function oo(y){Ya(function(){var I=Ja(y);Qi(function(){I.current.length===y.length||Pe(!1)})})}var Xl={input:!0,button:!0,textarea:!0,select:!0,option:!0,optgroup:!0,video:!0,audio:!0};function va(y,I){if(I==null)return!1;var M=Boolean(Xl[I.tagName.toLowerCase()]);if(M)return!0;var J=I.getAttribute("contenteditable");return J==="true"||J===""?!0:I===y?!1:va(y,I.parentElement)}function Yl(y,I){var M=I.target;return Pi(M)?va(y,M):!1}var Jl=function(y){return l(y.getBoundingClientRect()).center};function $l(y){return y instanceof Zs(y).Element}var Zl=function(){var y="matches";if(typeof document=="undefined")return y;var I=[y,"msMatchesSelector","webkitMatchesSelector"],M=et(I,function(J){return J in Element.prototype});return M||y}();function lo(y,I){return y==null?null:y[Zl](I)?y:lo(y.parentElement,I)}function ql(y,I){return y.closest?y.closest(I):lo(y,I)}function eA(y){return"["+fi.contextId+'="'+y+'"]'}function tA(y,I){var M=I.target;if(!$l(M))return null;var J=eA(y),se=ql(M,J);return se&&Pi(se)?se:null}function Ao(y,I){var M=tA(y,I);return M?M.getAttribute(fi.draggableId):null}function rA(y,I){var M="["+Va.contextId+'="'+y+'"]',J=pt(document.querySelectorAll(M)),se=et(J,function(ae){return ae.getAttribute(Va.id)===I});return se&&Pi(se)?se:null}function nA(y){y.preventDefault()}function ya(y){var I=y.expected,M=y.phase,J=y.isLockActive,se=y.shouldWarn;return J()?!(I!==M):!1}function ns(y){var I=y.lockAPI,M=y.store,J=y.registry,se=y.draggableId;if(I.isClaimed())return!1;var ae=J.draggable.findById(se);return ae&&ae.options.isEnabled?!!Ks(M.getState(),se):!1}function iA(y){var I=y.lockAPI,M=y.contextId,J=y.store,se=y.registry,ae=y.draggableId,fe=y.forceSensorStop,pe=y.sourceEvent,Le=ns({lockAPI:I,store:J,registry:se,draggableId:ae});if(!Le)return null;var je=se.draggable.getById(ae),We=rA(M,je.descriptor.id);if(!We)return null;if(pe&&!je.options.canDragInteractiveElements&&Yl(We,pe))return null;var Fe=I.claim(fe||Ne),Ue="PRE_DRAG";function Ve(){return je.options.shouldRespectForcePress}function nt(){return I.isActive(Fe)}function St(lr,Mr){ya({expected:lr,phase:Ue,isLockActive:nt,shouldWarn:!0})&&J.dispatch(Mr())}var Tt=St.bind(null,"DRAGGING");function Rt(lr){function Mr(){I.release(),Ue="COMPLETED"}Ue!=="PRE_DRAG"&&(Mr(),Ue==="PRE_DRAG"||Pe(!1)),J.dispatch(vn(lr.liftActionArgs)),Ue="DRAGGING";function dn(Tr,an){if(an===void 0&&(an={shouldBlockNextClick:!1}),lr.cleanup(),an.shouldBlockNextClick){var fn=Ke(window,[{eventName:"click",fn:nA,options:{once:!0,passive:!1,capture:!0}}]);setTimeout(fn)}Mr(),J.dispatch(In({reason:Tr}))}return Object(V.a)({isActive:function(){return ya({expected:"DRAGGING",phase:Ue,isLockActive:nt,shouldWarn:!1})},shouldRespectForcePress:Ve,drop:function(an){return dn("DROP",an)},cancel:function(an){return dn("CANCEL",an)}},lr.actions)}function Ft(lr){var Mr=m(function(Tr){Tt(function(){return sa({client:Tr})})}),dn=Rt({liftActionArgs:{id:ae,clientSelection:lr,movementMode:"FLUID"},cleanup:function(){return Mr.cancel()},actions:{move:Mr}});return Object(V.a)({},dn,{move:Mr})}function Yt(){var lr={moveUp:function(){return Tt(Ri)},moveRight:function(){return Tt(Nr)},moveDown:function(){return Tt(li)},moveLeft:function(){return Tt(Go)}};return Rt({liftActionArgs:{id:ae,clientSelection:Jl(We),movementMode:"SNAP"},cleanup:Ne,actions:lr})}function qt(){var lr=ya({expected:"PRE_DRAG",phase:Ue,isLockActive:nt,shouldWarn:!0});lr&&I.release()}var pr={isActive:function(){return ya({expected:"PRE_DRAG",phase:Ue,isLockActive:nt,shouldWarn:!1})},shouldRespectForcePress:Ve,fluidLift:Ft,snapLift:Yt,abort:qt};return pr}var ba=[Un,Gl,zl];function aA(y){var I=y.contextId,M=y.store,J=y.registry,se=y.customSensors,ae=y.enableDefaultSensors,fe=[].concat(ae?ba:[],se||[]),pe=Object(Ae.useState)(function(){return Ll()})[0],Le=u(function(Ft,Yt){Ft.isDragging&&!Yt.isDragging&&pe.tryAbandon()},[pe]);gn(function(){var Ft=M.getState(),Yt=M.subscribe(function(){var qt=M.getState();Le(Ft,qt),Ft=qt});return Yt},[pe,M,Le]),gn(function(){return pe.tryAbandon},[pe.tryAbandon]);var je=u(function(Rt){return ns({lockAPI:pe,registry:J,store:M,draggableId:Rt})},[pe,J,M]),We=u(function(Rt,Ft,Yt){return iA({lockAPI:pe,registry:J,contextId:I,store:M,draggableId:Rt,forceSensorStop:Ft,sourceEvent:Yt&&Yt.sourceEvent?Yt.sourceEvent:null})},[I,pe,J,M]),Fe=u(function(Rt){return Ao(I,Rt)},[I]),Ue=u(function(Rt){var Ft=J.draggable.findById(Rt);return Ft?Ft.options:null},[J.draggable]),Ve=u(function(){if(!pe.isClaimed())return;pe.tryAbandon(),M.getState().phase!=="IDLE"&&M.dispatch(Di())},[pe,M]),nt=u(pe.isClaimed,[pe]),St=R(function(){return{canGetLock:je,tryGetLock:We,findClosestDraggableId:Fe,findOptionsForDraggable:Ue,tryReleaseLock:Ve,isLockClaimed:nt}},[je,We,Fe,Ue,Ve,nt]);oo(fe);for(var Tt=0;Tt<fe.length;Tt++)fe[Tt](St)}var is=function(I){return{onBeforeCapture:I.onBeforeCapture,onBeforeDragStart:I.onBeforeDragStart,onDragStart:I.onDragStart,onDragEnd:I.onDragEnd,onDragUpdate:I.onDragUpdate}};function ri(y){return y.current||Pe(!1),y.current}function uo(y){var I=y.contextId,M=y.setCallbacks,J=y.sensors,se=y.nonce,ae=y.dragHandleUsageInstructions,fe=Object(Ae.useRef)(null);Dl();var pe=Ja(y),Le=u(function(){return is(pe.current)},[pe]),je=Cl(I),We=Sl({contextId:I,text:ae}),Fe=yl(I,se),Ue=u(function(Tr){ri(fe).dispatch(Tr)},[]),Ve=R(function(){return Object(N.b)({publishWhileDragging:aa,updateDroppableScroll:Na,updateDroppableIsEnabled:Pa,updateDroppableIsCombineEnabled:Wo,collectionStarting:Oi},Ue)},[Ue]),nt=El(),St=R(function(){return Qs(nt,Ve)},[nt,Ve]),Tt=R(function(){return pl(Object(V.a)({scrollWindow:el,scrollDroppable:St.scrollDroppable},Object(N.b)({move:sa},Ue)))},[St.scrollDroppable,Ue]),Rt=bl(I),Ft=R(function(){return Ns({announce:je,autoScroller:Tt,dimensionMarshal:St,focusMarshal:Rt,getResponders:Le,styleMarshal:Fe})},[je,Tt,St,Rt,Le,Fe]);fe.current=Ft;var Yt=u(function(){var Tr=ri(fe),an=Tr.getState();an.phase!=="IDLE"&&Tr.dispatch(Di())},[]),qt=u(function(){var Tr=ri(fe).getState();return Tr.isDragging||Tr.phase==="DROP_ANIMATING"},[]),pr=R(function(){return{isDragging:qt,tryAbort:Yt}},[qt,Yt]);M(pr);var lr=u(function(Tr){return Ks(ri(fe).getState(),Tr)},[]),Mr=u(function(){return Ar(ri(fe).getState())},[]),dn=R(function(){return{marshal:St,focus:Rt,contextId:I,canLift:lr,isMovementAllowed:Mr,dragHandleUsageInstructionsId:We,registry:nt}},[I,St,We,Rt,lr,Mr,nt]);return aA({contextId:I,store:Ft,registry:nt,customSensors:J,enableDefaultSensors:y.enableDefaultSensors!==!1}),Object(Ae.useEffect)(function(){return Yt},[Yt]),z.a.createElement(ki.Provider,{value:dn},z.a.createElement(L.a,{context:za,store:Ft},y.children))}var as=0;function sA(){as=0}function co(){return R(function(){return""+as++},[])}function ho(){sA(),xl()}function ss(y){var I=co(),M=y.dragHandleUsageInstructions||ye.dragHandleUsageInstructions;return z.a.createElement(bt,null,function(J){return z.a.createElement(uo,{nonce:y.nonce,contextId:I,setCallbacks:J,dragHandleUsageInstructions:M,enableDefaultSensors:y.enableDefaultSensors,sensors:y.sensors,onBeforeCapture:y.onBeforeCapture,onBeforeDragStart:y.onBeforeDragStart,onDragStart:y.onDragStart,onDragUpdate:y.onDragUpdate,onDragEnd:y.onDragEnd},y.children)})}var Ea=function(I){return function(M){return I===M}},fo=Ea("scroll"),po=Ea("auto"),go=Ea("visible"),_a=function(I,M){return M(I.overflowX)||M(I.overflowY)},oA=function(I,M){return M(I.overflowX)&&M(I.overflowY)},mo=function(I){var M=window.getComputedStyle(I),J={overflowX:M.overflowX,overflowY:M.overflowY};return _a(J,fo)||_a(J,po)},lA=function(){return!1;var I,M;if(!mo(I))return!1;var J,se;if(oA(se,go))return!1},wn=function y(I){return I==null?null:I===document.body?lA()?I:null:I===document.documentElement?null:mo(I)?I:y(I.parentElement)},vo=function(y){if(!y)return;var I=wn(y.parentElement);if(!I)return},os=function(y){return{x:y.scrollLeft,y:y.scrollTop}},AA=function y(I){if(!I)return!1;var M=window.getComputedStyle(I);return M.position==="fixed"?!0:y(I.parentElement)},uA=function(y){var I=wn(y),M=AA(y);return{closestScrollable:I,isFixedOnPage:M}},cA=function(y){var I=y.descriptor,M=y.isEnabled,J=y.isCombineEnabled,se=y.isFixedOnPage,ae=y.direction,fe=y.client,pe=y.page,Le=y.closest,je=function(){if(!Le)return null;var Ve=Le.scrollSize,nt=Le.client,St=Ms({scrollHeight:Ve.scrollHeight,scrollWidth:Ve.scrollWidth,height:nt.paddingBox.height,width:nt.paddingBox.width});return{pageMarginBox:Le.page.marginBox,frameClient:nt,scrollSize:Ve,shouldClipSubject:Le.shouldClipSubject,scroll:{initial:Le.scroll,current:Le.scroll,max:St,diff:{value:ve,displacement:ve}}}}(),We=ae==="vertical"?Ut:$t,Fe=oe({page:pe,withPlaceholder:null,axis:We,frame:je}),Ue={descriptor:I,isCombineEnabled:J,isFixedOnPage:se,axis:We,isEnabled:M,client:fe,page:pe,frame:je,subject:Fe};return Ue},dA=function(I,M){var J=B(I);if(!M)return J;if(I!==M)return J;var se=J.paddingBox.top-M.scrollTop,ae=J.paddingBox.left-M.scrollLeft,fe=se+M.scrollHeight,pe=ae+M.scrollWidth,Le={top:se,right:pe,bottom:fe,left:ae},je=s(Le,J.border),We=a({borderBox:je,margin:J.margin,border:J.border,padding:J.padding});return We},hA=function(y){var I=y.ref,M=y.descriptor,J=y.env,se=y.windowScroll,ae=y.direction,fe=y.isDropDisabled,pe=y.isCombineEnabled,Le=y.shouldClipSubject,je=J.closestScrollable,We=dA(I,je),Fe=b(We,se),Ue=function(){if(!je)return null;var nt=B(je),St={scrollHeight:je.scrollHeight,scrollWidth:je.scrollWidth};return{client:nt,page:b(nt,se),scroll:os(je),scrollSize:St,shouldClipSubject:Le}}(),Ve=cA({descriptor:M,isEnabled:!fe,isCombineEnabled:pe,isFixedOnPage:J.isFixedOnPage,direction:ae,client:We,page:Fe,closest:Ue});return Ve},fA={passive:!1},pA={passive:!0},yo=function(y){return y.shouldPublishImmediately?fA:pA};function ji(y){var I=Object(Ae.useContext)(y);return I||Pe(!1),I}var wa=function(I){return I&&I.env.closestScrollable||null};function ls(y){var I=Object(Ae.useRef)(null),M=ji(ki),J=Xa("droppable"),se=M.registry,ae=M.marshal,fe=Ja(y),pe=R(function(){return{id:y.droppableId,type:y.type,mode:y.mode}},[y.droppableId,y.mode,y.type]),Le=Object(Ae.useRef)(pe),je=R(function(){return c(function(qt,pr){I.current||Pe(!1);var lr={x:qt,y:pr};ae.updateDroppableScroll(pe.id,lr)})},[pe.id,ae]),We=u(function(){var qt=I.current;return!qt||!qt.env.closestScrollable?ve:os(qt.env.closestScrollable)},[]),Fe=u(function(){var qt=We();je(qt.x,qt.y)},[We,je]),Ue=R(function(){return m(Fe)},[Fe]),Ve=u(function(){var qt=I.current,pr=wa(qt);qt&&pr||Pe(!1);var lr=qt.scrollOptions;if(lr.shouldPublishImmediately){Fe();return}Ue()},[Ue,Fe]),nt=u(function(qt,pr){I.current&&Pe(!1);var lr=fe.current,Mr=lr.getDroppableRef();Mr||Pe(!1);var dn=uA(Mr),Tr={ref:Mr,descriptor:pe,env:dn,scrollOptions:pr};I.current=Tr;var an=hA({ref:Mr,descriptor:pe,env:dn,windowScroll:qt,direction:lr.direction,isDropDisabled:lr.isDropDisabled,isCombineEnabled:lr.isCombineEnabled,shouldClipSubject:!lr.ignoreContainerClipping}),fn=dn.closestScrollable;return fn&&(fn.setAttribute(Js.contextId,M.contextId),fn.addEventListener("scroll",Ve,yo(Tr.scrollOptions))),an},[M.contextId,pe,Ve,fe]),St=u(function(){var qt=I.current,pr=wa(qt);return qt&&pr||Pe(!1),os(pr)},[]),Tt=u(function(){var qt=I.current;qt||Pe(!1);var pr=wa(qt);if(I.current=null,!pr)return;Ue.cancel(),pr.removeAttribute(Js.contextId),pr.removeEventListener("scroll",Ve,yo(qt.scrollOptions))},[Ve,Ue]),Rt=u(function(qt){var pr=I.current;pr||Pe(!1);var lr=wa(pr);lr||Pe(!1),lr.scrollTop+=qt.y,lr.scrollLeft+=qt.x},[]),Ft=R(function(){return{getDimensionAndWatchScroll:nt,getScrollWhileDragging:St,dragStopped:Tt,scroll:Rt}},[Tt,nt,St,Rt]),Yt=R(function(){return{uniqueId:J,descriptor:pe,callbacks:Ft}},[Ft,pe,J]);gn(function(){return Le.current=Yt.descriptor,se.droppable.register(Yt),function(){I.current&&Tt(),se.droppable.unregister(Yt)}},[Ft,pe,Tt,Yt,ae,se.droppable]),gn(function(){if(!I.current)return;ae.updateDroppableIsEnabled(Le.current.id,!y.isDropDisabled)},[y.isDropDisabled,ae]),gn(function(){if(!I.current)return;ae.updateDroppableIsCombineEnabled(Le.current.id,y.isCombineEnabled)},[y.isCombineEnabled,ae])}function Ca(){}var cn={width:0,height:0,margin:qe},Wi=function(I){var M=I.isAnimatingOpenOnMount,J=I.placeholder,se=I.animate;return M||se==="close"?cn:{height:J.client.borderBox.height,width:J.client.borderBox.width,margin:J.client.margin}},gA=function(I){var M=I.isAnimatingOpenOnMount,J=I.placeholder,se=I.animate,ae=Wi({isAnimatingOpenOnMount:M,placeholder:J,animate:se});return{display:J.display,boxSizing:"border-box",width:ae.width,height:ae.height,marginTop:ae.margin.top,marginRight:ae.margin.right,marginBottom:ae.margin.bottom,marginLeft:ae.margin.left,flexShrink:"0",flexGrow:"0",pointerEvents:"none",transition:se!=="none"?Ai.placeholder:null}};function mA(y){var I=Object(Ae.useRef)(null),M=u(function(){if(!I.current)return;clearTimeout(I.current),I.current=null},[]),J=y.animate,se=y.onTransitionEnd,ae=y.onClose,fe=y.contextId,pe=Object(Ae.useState)(y.animate==="open"),Le=pe[0],je=pe[1];Object(Ae.useEffect)(function(){return Le?J!=="open"?(M(),je(!1),Ca):I.current?Ca:(I.current=setTimeout(function(){I.current=null,je(!1)}),M):Ca},[J,Le,M]);var We=u(function(Ue){if(Ue.propertyName!=="height")return;se(),J==="close"&&ae()},[J,ae,se]),Fe=gA({isAnimatingOpenOnMount:Le,animate:y.animate,placeholder:y.placeholder});return z.a.createElement(y.placeholder.tagName,{style:Fe,"data-rbd-placeholder-context-id":fe,onTransitionEnd:We,ref:y.innerRef})}var bo=z.a.memo(mA),Gi=z.a.createContext(null);function Eo(y){y&&Pi(y)||Pe(!1)}function As(y){return typeof y=="boolean"}function us(y,I){I.forEach(function(M){return M(y)})}var vA=[function(I){var M=I.props;M.droppableId||Pe(!1),typeof M.droppableId=="string"||Pe(!1)},function(I){var M=I.props;As(M.isDropDisabled)||Pe(!1),As(M.isCombineEnabled)||Pe(!1),As(M.ignoreContainerClipping)||Pe(!1)},function(I){var M=I.getDroppableRef;Eo(M())}],yA=[function(I){var M=I.props,J=I.getPlaceholderRef;if(!M.placeholder)return;var se=J();if(se)return}],bA=[function(I){var M=I.props;M.renderClone||Pe(!1)},function(I){var M=I.getPlaceholderRef;M()&&Pe(!1)}];function EA(y){Qi(function(){us(y,vA),y.props.mode==="standard"&&us(y,yA),y.props.mode==="virtual"&&us(y,bA)})}var _A=function(y){Object(U.a)(I,y);function I(){for(var J,se=arguments.length,ae=new Array(se),fe=0;fe<se;fe++)ae[fe]=arguments[fe];return J=y.call.apply(y,[this].concat(ae))||this,J.state={isVisible:Boolean(J.props.on),data:J.props.on,animate:J.props.shouldAnimate&&J.props.on?"open":"none"},J.onClose=function(){if(J.state.animate!=="close")return;J.setState({isVisible:!1})},J}I.getDerivedStateFromProps=function(se,ae){return se.shouldAnimate?se.on?{isVisible:!0,data:se.on,animate:"open"}:ae.isVisible?{isVisible:!0,data:ae.data,animate:"close"}:{isVisible:!1,animate:"close",data:null}:{isVisible:Boolean(se.on),data:se.on,animate:"none"}};var M=I.prototype;return M.render=function(){if(!this.state.isVisible)return null;var se={onClose:this.onClose,data:this.state.data,animate:this.state.animate};return this.props.children(se)},I}(z.a.PureComponent),cs={dragging:5e3,dropAnimating:4500},_o=function(I,M){return M?Ai.drop(M.duration):I?Ai.snap:Ai.fluid},wo=function(I,M){return I?M?Hn.opacity.drop:Hn.opacity.combining:null},Co=function(I){return I.forceShouldAnimate!=null?I.forceShouldAnimate:I.mode==="SNAP"};function ds(y){var I=y.dimension,M=I.client,J=y.offset,se=y.combineWith,ae=y.dropping,fe=Boolean(se),pe=Co(y),Le=Boolean(ae),je=Le?oa.drop(J,fe):oa.moveTo(J),We={position:"fixed",top:M.marginBox.top,left:M.marginBox.left,boxSizing:"border-box",width:M.borderBox.width,height:M.borderBox.height,transition:_o(pe,ae),transform:je,opacity:wo(fe,Le),zIndex:Le?cs.dropAnimating:cs.dragging,pointerEvents:"none"};return We}function wA(y){return{transform:oa.moveTo(y.offset),transition:y.shouldAnimateDisplacement?null:"none"}}function CA(y){return y.type==="DRAGGING"?ds(y):wA(y)}function TA(y,I,M){M===void 0&&(M=ve);var J=window.getComputedStyle(I),se=I.getBoundingClientRect(),ae=_(se,J),fe=b(ae,M),pe={client:ae,tagName:I.tagName.toLowerCase(),display:J.display},Le={x:ae.marginBox.width,y:ae.marginBox.height},je={descriptor:y,placeholder:pe,displaceBy:Le,client:ae,page:fe};return je}function xA(y){var I=Xa("draggable"),M=y.descriptor,J=y.registry,se=y.getDraggableRef,ae=y.canDragInteractiveElements,fe=y.shouldRespectForcePress,pe=y.isEnabled,Le=R(function(){return{canDragInteractiveElements:ae,shouldRespectForcePress:fe,isEnabled:pe}},[ae,pe,fe]),je=u(function(Ve){var nt=se();return nt||Pe(!1),TA(M,nt,Ve)},[M,se]),We=R(function(){return{uniqueId:I,descriptor:M,options:Le,getDimension:je}},[M,je,Le,I]),Fe=Object(Ae.useRef)(We),Ue=Object(Ae.useRef)(!0);gn(function(){return J.draggable.register(Fe.current),function(){return J.draggable.unregister(Fe.current)}},[J.draggable]),gn(function(){if(Ue.current){Ue.current=!1;return}var Ve=Fe.current;Fe.current=We,J.draggable.update(We,Ve)},[We,J.draggable])}function Ta(y,I,M){Qi(function(){function J(ae){return"Draggable[id: "+ae+"]: "}var se=y.draggableId;if(se||Pe(!1),typeof se=="string"||Pe(!1),Ee(y.index)||Pe(!1),y.mapped.type==="DRAGGING")return;Eo(M()),y.isEnabled&&(qs(I,se)||Pe(!1))})}function xa(y){Ya(function(){var I=Object(Ae.useRef)(y);Qi(function(){y===I.current||Pe(!1)},[y])})}function BA(y){y.preventDefault()}function To(y){var I=Object(Ae.useRef)(null),M=u(function(Tr){I.current=Tr},[]),J=u(function(){return I.current},[]),se=ji(ki),ae=se.contextId,fe=se.dragHandleUsageInstructionsId,pe=se.registry,Le=ji(Gi),je=Le.type,We=Le.droppableId,Fe=R(function(){return{id:y.draggableId,index:y.index,type:je,droppableId:We}},[y.draggableId,y.index,je,We]),Ue=y.children,Ve=y.draggableId,nt=y.isEnabled,St=y.shouldRespectForcePress,Tt=y.canDragInteractiveElements,Rt=y.isClone,Ft=y.mapped,Yt=y.dropAnimationFinished;if(Ta(y,ae,J),xa(Rt),!Rt){var qt=R(function(){return{descriptor:Fe,registry:pe,getDraggableRef:J,canDragInteractiveElements:Tt,shouldRespectForcePress:St,isEnabled:nt}},[Fe,pe,J,Tt,St,nt]);xA(qt)}var pr=R(function(){return nt?{tabIndex:0,role:"button","aria-describedby":fe,"data-rbd-drag-handle-draggable-id":Ve,"data-rbd-drag-handle-context-id":ae,draggable:!1,onDragStart:BA}:null},[ae,fe,Ve,nt]),lr=u(function(Tr){if(Ft.type!=="DRAGGING")return;if(!Ft.dropping)return;if(Tr.propertyName!=="transform")return;Yt()},[Yt,Ft]),Mr=R(function(){var Tr=CA(Ft),an=Ft.type==="DRAGGING"&&Ft.dropping?lr:null,fn={innerRef:M,draggableProps:{"data-rbd-draggable-context-id":ae,"data-rbd-draggable-id":Ve,style:Tr,onTransitionEnd:an},dragHandleProps:pr};return fn},[ae,pr,Ve,Ft,lr,M]),dn=R(function(){return{draggableId:Fe.id,type:Fe.type,source:{index:Fe.index,droppableId:Fe.droppableId}}},[Fe.droppableId,Fe.id,Fe.index,Fe.type]);return Ue(Mr,Ft.snapshot,dn)}var Ba=function(y,I){return y===I},hs=function(y){var I=y.combine,M=y.destination;return M?M.droppableId:I?I.droppableId:null},xo=function(I){return I.combine?I.combine.draggableId:null},Bo=function(I){return I.at&&I.at.type==="COMBINE"?I.at.combine.draggableId:null};function SA(){var y=c(function(se,ae){return{x:se,y:ae}}),I=c(function(se,ae,fe,pe,Le){return{isDragging:!0,isClone:ae,isDropAnimating:Boolean(Le),dropAnimation:Le,mode:se,draggingOver:fe,combineWith:pe,combineTargetFor:null}}),M=c(function(se,ae,fe,pe,Le,je,We){return{mapped:{type:"DRAGGING",dropping:null,draggingOver:Le,combineWith:je,mode:ae,offset:se,dimension:fe,forceShouldAnimate:We,snapshot:I(ae,pe,Le,je,null)}}}),J=function(ae,fe){if(ae.isDragging){if(ae.critical.draggable.id!==fe.draggableId)return null;var pe=ae.current.client.offset,Le=ae.dimensions.draggables[fe.draggableId],je=ir(ae.impact),We=Bo(ae.impact),Fe=ae.forceShouldAnimate;return M(y(pe.x,pe.y),ae.movementMode,Le,fe.isClone,je,We,Fe)}if(ae.phase==="DROP_ANIMATING"){var Ue=ae.completed;if(Ue.result.draggableId!==fe.draggableId)return null;var Ve=fe.isClone,nt=ae.dimensions.draggables[fe.draggableId],St=Ue.result,Tt=St.mode,Rt=hs(St),Ft=xo(St),Yt=ae.dropDuration,qt={duration:Yt,curve:Ln.drop,moveTo:ae.newHomeClientOffset,opacity:Ft?Hn.opacity.drop:null,scale:Ft?Hn.scale.drop:null};return{mapped:{type:"DRAGGING",offset:ae.newHomeClientOffset,dimension:nt,dropping:qt,draggingOver:Rt,combineWith:Ft,mode:Tt,forceShouldAnimate:null,snapshot:I(Tt,Ve,Rt,Ft,qt)}}}return null};return J}function Vi(y){return{isDragging:!1,isDropAnimating:!1,isClone:!1,dropAnimation:null,mode:null,draggingOver:null,combineTargetFor:y,combineWith:null}}var So={mapped:{type:"SECONDARY",offset:ve,combineTargetFor:null,shouldAnimateDisplacement:!0,snapshot:Vi(null)}};function Io(){var y=c(function(fe,pe){return{x:fe,y:pe}}),I=c(Vi),M=c(function(fe,pe,Le){return pe===void 0&&(pe=null),{mapped:{type:"SECONDARY",offset:fe,combineTargetFor:pe,shouldAnimateDisplacement:Le,snapshot:I(pe)}}}),J=function(pe){return pe?M(ve,pe,!0):null},se=function(pe,Le,je,We){var Fe=je.displaced.visible[pe],Ue=Boolean(We.inVirtualList&&We.effected[pe]),Ve=Mt(je),nt=Ve&&Ve.draggableId===pe?Le:null;if(!Fe){if(!Ue)return J(nt);if(je.displaced.invisible[pe])return null;var St=st(We.displacedBy.point),Tt=y(St.x,St.y);return M(Tt,nt,!0)}if(Ue)return J(nt);var Rt=je.displacedBy.point,Ft=y(Rt.x,Rt.y);return M(Ft,nt,Fe.shouldAnimate)},ae=function(pe,Le){if(pe.isDragging)return pe.critical.draggable.id===Le.draggableId?null:se(Le.draggableId,pe.critical.draggable.id,pe.impact,pe.afterCritical);if(pe.phase==="DROP_ANIMATING"){var je=pe.completed;return je.result.draggableId===Le.draggableId?null:se(Le.draggableId,je.result.draggableId,je.impact,je.afterCritical)}return null};return ae}var IA=function(){var I=SA(),M=Io(),J=function(ae,fe){return I(ae,fe)||M(ae,fe)||So};return J},OA={dropAnimationFinished:kn},Oo=Object(L.c)(IA,OA,null,{context:za,pure:!0,areStatePropsEqual:Ba})(To);function ni(y){var I=ji(Gi),M=I.isUsingCloneFor;return M===y.draggableId&&!y.isClone?null:z.a.createElement(Oo,y)}function fs(y){var I=typeof y.isDragDisabled=="boolean"?!y.isDragDisabled:!0,M=Boolean(y.disableInteractiveElementBlocking),J=Boolean(y.shouldRespectForcePress);return z.a.createElement(ni,Object(V.a)({},y,{isClone:!1,isEnabled:I,canDragInteractiveElements:M,shouldRespectForcePress:J}))}function Sa(y){var I=Object(Ae.useContext)(ki);I||Pe(!1);var M=I.contextId,J=I.isMovementAllowed,se=Object(Ae.useRef)(null),ae=Object(Ae.useRef)(null),fe=y.children,pe=y.droppableId,Le=y.type,je=y.mode,We=y.direction,Fe=y.ignoreContainerClipping,Ue=y.isDropDisabled,Ve=y.isCombineEnabled,nt=y.snapshot,St=y.useClone,Tt=y.updateViewportMaxScroll,Rt=y.getContainerForClone,Ft=u(function(){return se.current},[]),Yt=u(function(yn){se.current=yn},[]),qt=u(function(){return ae.current},[]),pr=u(function(yn){ae.current=yn},[]);EA({props:y,getDroppableRef:Ft,getPlaceholderRef:qt});var lr=u(function(){J()&&Tt({maxScroll:ks()})},[J,Tt]);ls({droppableId:pe,type:Le,mode:je,direction:We,isDropDisabled:Ue,isCombineEnabled:Ve,ignoreContainerClipping:Fe,getDroppableRef:Ft});var Mr=z.a.createElement(_A,{on:y.placeholder,shouldAnimate:y.shouldAnimatePlaceholder},function(yn){var ii=yn.onClose,Kn=yn.data,vi=yn.animate;return z.a.createElement(bo,{placeholder:Kn,onClose:ii,innerRef:pr,animate:vi,contextId:M,onTransitionEnd:lr})}),dn=R(function(){return{innerRef:Yt,placeholder:Mr,droppableProps:{"data-rbd-droppable-id":pe,"data-rbd-droppable-context-id":M}}},[M,pe,Mr,Yt]),Tr=St?St.dragging.draggableId:null,an=R(function(){return{droppableId:pe,type:Le,isUsingCloneFor:Tr}},[pe,Tr,Le]);function fn(){if(!St)return null;var yn=St.dragging,ii=St.render,Kn=z.a.createElement(ni,{draggableId:yn.draggableId,index:yn.source.index,isClone:!0,isEnabled:!0,shouldRespectForcePress:!1,canDragInteractiveElements:!0},function(vi,zi){return ii(vi,zi,yn)});return F.a.createPortal(Kn,Rt())}return z.a.createElement(Gi.Provider,{value:an},fe(dn,nt),fn())}var ps=function(I,M){return I===M.droppable.type},Ro=function(I,M){return M.draggables[I.draggable.id]},RA=function(){var I={placeholder:null,shouldAnimatePlaceholder:!0,snapshot:{isDraggingOver:!1,draggingOverWith:null,draggingFromThisWith:null,isUsingPlaceholder:!1},useClone:null},M=Object(V.a)({},I,{shouldAnimatePlaceholder:!1}),J=c(function(fe){return{draggableId:fe.id,type:fe.type,source:{index:fe.index,droppableId:fe.droppableId}}}),se=c(function(fe,pe,Le,je,We,Fe){var Ue=We.descriptor.id,Ve=We.descriptor.droppableId===fe;if(Ve){var nt=Fe?{render:Fe,dragging:J(We.descriptor)}:null,St={isDraggingOver:Le,draggingOverWith:Le?Ue:null,draggingFromThisWith:Ue,isUsingPlaceholder:!0};return{placeholder:We.placeholder,shouldAnimatePlaceholder:!1,snapshot:St,useClone:nt}}if(!pe)return M;if(!je)return I;var Tt={isDraggingOver:Le,draggingOverWith:Ue,draggingFromThisWith:null,isUsingPlaceholder:!0};return{placeholder:We.placeholder,shouldAnimatePlaceholder:!0,snapshot:Tt,useClone:null}}),ae=function(pe,Le){var je=Le.droppableId,We=Le.type,Fe=!Le.isDropDisabled,Ue=Le.renderClone;if(pe.isDragging){var Ve=pe.critical;if(!ps(We,Ve))return M;var nt=Ro(Ve,pe.dimensions),St=ir(pe.impact)===je;return se(je,Fe,St,St,nt,Ue)}if(pe.phase==="DROP_ANIMATING"){var Tt=pe.completed;if(!ps(We,Tt.critical))return M;var Rt=Ro(Tt.critical,pe.dimensions);return se(je,Fe,hs(Tt.result)===je,ir(Tt.impact)===je,Rt,Ue)}if(pe.phase==="IDLE"&&pe.completed&&!pe.shouldFlush){var Ft=pe.completed;if(!ps(We,Ft.critical))return M;var Yt=ir(Ft.impact)===je,qt=Boolean(Ft.impact.at&&Ft.impact.at.type==="COMBINE"),pr=Ft.critical.droppable.id===je;return Yt?qt?I:M:pr?I:M}return M};return ae},DA={updateViewportMaxScroll:ws};function Do(){return document.body||Pe(!1),document.body}var gs={mode:"standard",type:"DEFAULT",direction:"vertical",isDropDisabled:!1,isCombineEnabled:!1,ignoreContainerClipping:!1,renderClone:null,getContainerForClone:Do},ms=Object(L.c)(RA,DA,null,{context:za,pure:!0,areStatePropsEqual:Ba})(Sa);ms.defaultProps=gs},nnTU:function(wt,Be,G){"use strict";G.d(Be,"b",function(){return $}),G.d(Be,"a",function(){return H});var Ae=G("MI8n"),z=G("JYp7"),U=G("pmY6"),V=G("24hK"),N=G("746U"),L=G("Cg/j");const $=Object(L.c)("commandService"),H=new class{constructor(){this._commands=new Map,this._onDidRegisterCommand=new Ae.b,this.onDidRegisterCommand=this._onDidRegisterCommand.event}registerCommand(e,R){if(!e)throw new Error("invalid command");if(typeof e=="string"){if(!R)throw new Error("invalid command");return this.registerCommand({id:e,handler:R})}if(e.description){const i=[];for(let r of e.description.args)i.push(r.constraint);const o=e.handler;e.handler=function(r,...a){return Object(N.o)(a,i),o(r,...a)}}const{id:u}=e;let f=this._commands.get(u);f||(f=new V.a,this._commands.set(u,f));let l=f.unshift(e),s=Object(U.i)(()=>{l();const i=this._commands.get(u);(i==null?void 0:i.isEmpty())&&this._commands.delete(u)});return this._onDidRegisterCommand.fire(u),s}registerCommandAlias(e,R){return H.registerCommand(e,(u,...f)=>u.get($).executeCommand(R,...f))}getCommand(e){const R=this._commands.get(e);return!R||R.isEmpty()?void 0:z.a.first(R)}getCommands(){const e=new Map;for(const R of this._commands.keys()){const u=this.getCommand(R);u&&e.set(R,u)}return e}};H.registerCommand("noop",()=>{})},p5ED:function(wt,Be,G){"use strict";var Ae=G("+L6B"),z=G("2/Rp"),U=G("5Dmo"),V=G("3S7+"),N=G("k1fw"),L=G("9og8"),$=G("tJVT"),H=G("WmNS"),e=G.n(H),R=G("q1tI"),u=G.n(R),f=G("vHTk"),l=G.n(f),s=G("yEEn"),i=G("ZW9T"),o=G("1vsH"),r=G("V0Rq"),a=G("m3rI");Be.a=function(n){var t,E,b,_,B,x,h,d=n.editOffice,A=d===void 0?"view":d,c=n.data,w=n.theme,m=n.type,g=n.filename,F=n.monacoEditor,k=n.className,S=n.style,Q=n.close,X=n.onClose,P=n.hasMask,q=n.disabledDownload,ie=Object(R.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),be=Object($.a)(ie,2),me=be[0],Me=be[1],Ne=Object(R.useState)(""),ke=Object($.a)(Ne,2),Ke=ke[0],Ye=ke[1],_e=Object(R.useState)(),Te=Object($.a)(_e,2),Pe=Te[0],bt=Te[1],mt=window.ENV==="build"?"/react/build":"",dt=a.a.PROXY_SERVER||location.origin,yt,le=1024*1024,Z=10*le,te=Object(R.useRef)();(t=c)!==null&&t!==void 0&&t.startsWith("/api")&&m!=="txt"&&(c=a.a.API_SERVER+c),m==="office"&&(yt=Object(o.T)(c).filesize,yt>Z&&(m="other")),g&&F&&(F.filename=g),Object(R.useEffect)(function(){var ve,Je,tt=(ve=document.cookie)===null||ve===void 0||((Je=ve.replace(/\s/g,""))===null||Je===void 0)?void 0:Je.split(";");tt==null||tt.map(function(it){var st=it.split("=");st[0]==="_educoder_session"&&Ye(st[1])})},[]),Object(R.useEffect)(function(){m==="office"&&ee()},[m,c]);var ee=function(){var ve=Object(L.a)(e.a.mark(function Je(){var tt,it,st;return e.a.wrap(function(_t){for(;;)switch(_t.prev=_t.next){case 0:return console.log("data:",c),tt=c,c.startsWith("http")||(tt=location.origin+tt),it=new URL(tt).pathname.split("/").pop(),_t.next=6,Object(r.W)({attachment_id:it});case 6:st=_t.sent,bt(st);case 8:case"end":return _t.stop()}},Je)}));return function(){return ve.apply(this,arguments)}}(),ue=function(){if(c.startsWith("http")||c.startsWith("blob:")){ye();return}Object(o.z)(g||"educoder",c,g)},ye=function(){Object(o.x)(g||"educoder",decodeURIComponent(c))};return u.a.createElement("div",{style:Object(N.a)({},S||{}),className:"".concat(P&&l.a.bgBlack," ").concat(m?l.a.wrp:"hide")},Q&&u.a.createElement("div",{className:l.a.close,ref:te},!q&&u.a.createElement(V.a,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:function(){return te.current}},u.a.createElement("span",{onClick:ye},u.a.createElement("i",{className:"icon-quxiaozhiding"}))),u.a.createElement(V.a,{title:"\u5173\u95ED",getPopupContainer:function(){return te.current}},u.a.createElement("span",{className:"",onClick:X},u.a.createElement("i",{className:"icon-guanbi1"})))),u.a.createElement("div",{className:"".concat(l.a[k]," ").concat(k," ").concat(l.a.monaco," ").concat(m==="txt"?"show":"hide")},m==="txt"&&u.a.createElement(i.b,F)),m==="audio"&&u.a.createElement("audio",{src:"".concat(((E=c)===null||E===void 0?void 0:E.indexOf("http://"))>-1||((b=c)===null||b===void 0?void 0:b.indexOf("https://"))>-1?"":"data:audio/mp3;base64,").concat(c),autoPlay:!0}),m==="video"&&u.a.createElement(u.a.Fragment,null,((_=c)===null||_===void 0?void 0:_.indexOf("http"))>-1?u.a.createElement("video",{controls:!0,src:"".concat(c),autoPlay:!0}):u.a.createElement("video",{controls:!0,src:"data:video/mp4;base64,".concat(c),autoPlay:!0})),m==="office"&&Pe&&u.a.createElement("iframe",{src:"".concat(mt,"/office.html?key=").concat(Pe.key,"&url=").concat(dt+Pe.url,"&callbackUrl=").concat(dt+Pe.callbackUrl,"&fileType=").concat(Pe.fileType,"&title=").concat(Pe.title,"&model=").concat(A,"&officeServer=").concat(a.a.OFFICE_SERVER,"&disabledDownload=").concat(!!q)}),m==="html"&&u.a.createElement("iframe",{src:c+"&disposition=inline"}),m==="pdf"&&u.a.createElement("iframe",{src:"".concat(mt,"/js/pdfview/index.html?url=").concat(c,"&disabledDownload=").concat(!!q)}),m==="image"&&u.a.createElement("img",{src:"".concat(((B=c)===null||B===void 0?void 0:B.indexOf("http://"))>-1||((x=c)===null||x===void 0?void 0:x.indexOf("https://"))>-1||(h=c)!==null&&h!==void 0&&h.startsWith("/api")?"":"data:image/png;base64,").concat(c)}),m==="other"&&u.a.createElement("div",null,u.a.createElement(z.a,{type:"primary",size:"large",onClick:ue},u.a.createElement(s.a,null),"\u70B9\u51FB\u4E0B\u8F7D")),m==="download"&&u.a.createElement(z.a,{type:"primary",size:"large",onClick:ue},u.a.createElement(s.a,null),"\u70B9\u51FB\u4E0B\u8F7D"))}},pmY6:function(wt,Be,G){"use strict";G.d(Be,"h",function(){return R}),G.d(Be,"g",function(){return f}),G.d(Be,"f",function(){return l}),G.d(Be,"e",function(){return s}),G.d(Be,"i",function(){return i}),G.d(Be,"b",function(){return o}),G.d(Be,"a",function(){return r}),G.d(Be,"d",function(){return a}),G.d(Be,"c",function(){return n});var Ae=G("C/vA"),z=G("JYp7");const U=!1;let V=null;function N(t){V=t}if(U){const t="__is_disposable_tracked__";N(new class{trackDisposable(E){const b=new Error("Potentially leaked disposable").stack;setTimeout(()=>{E[t]||console.log(b)},3e3)}setParent(E,b){if(E&&E!==r.None)try{E[t]=!0}catch(_){}}markAsDisposed(E){if(E&&E!==r.None)try{E[t]=!0}catch(b){}}markAsSingleton(E){}})}function L(t){return V==null||V.trackDisposable(t),t}function $(t){V==null||V.markAsDisposed(t)}function H(t,E){V==null||V.setParent(t,E)}function e(t,E){if(!V)return;for(const b of t)V.setParent(b,E)}function R(t){return V==null||V.markAsSingleton(t),t}class u extends Error{constructor(t){super(`Encountered errors while disposing of store. Errors: [${t.join(", ")}]`);this.errors=t}}function f(t){return typeof t.dispose=="function"&&t.dispose.length===0}function l(t){if(z.a.is(t)){let E=[];for(const b of t)if(b)try{b.dispose()}catch(_){E.push(_)}if(E.length===1)throw E[0];if(E.length>1)throw new u(E);return Array.isArray(t)?[]:t}else if(t)return t.dispose(),t}function s(...t){const E=i(()=>l(t));return e(t,E),E}function i(t){const E=L({dispose:Object(Ae.a)(()=>{$(E),t()})});return E}class o{constructor(){this._toDispose=new Set,this._isDisposed=!1,L(this)}dispose(){if(this._isDisposed)return;$(this),this._isDisposed=!0,this.clear()}clear(){try{l(this._toDispose.values())}finally{this._toDispose.clear()}}add(t){if(!t)return t;if(t===this)throw new Error("Cannot register a disposable on itself!");return H(t,this),this._isDisposed?o.DISABLE_DISPOSED_WARNING||console.warn(new Error("Trying to add a disposable to a DisposableStore that has already been disposed of. The added object will be leaked!").stack):this._toDispose.add(t),t}}o.DISABLE_DISPOSED_WARNING=!1;class r{constructor(){this._store=new o,L(this),H(this._store,this)}dispose(){$(this),this._store.dispose()}_register(t){if(t===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(t)}}r.None=Object.freeze({dispose(){}});class a{constructor(){this._isDisposed=!1,L(this)}get value(){return this._isDisposed?void 0:this._value}set value(t){var E;if(this._isDisposed||t===this._value)return;(E=this._value)===null||E===void 0||E.dispose(),t&&H(t,this),this._value=t}clear(){this.value=void 0}dispose(){var t;this._isDisposed=!0,$(this),(t=this._value)===null||t===void 0||t.dispose(),this._value=void 0}clearAndLeak(){const t=this._value;return this._value=void 0,t&&H(t,null),t}}class n{constructor(t){this.object=t}dispose(){}}},psGv:function(wt,Be,G){var Ae,z;(function(){var U;(function(){"use strict";var $=[,,function(u){function f(i){this.__parent=i,this.__character_count=0,this.__indent_count=-1,this.__alignment_count=0,this.__wrap_point_index=0,this.__wrap_point_character_count=0,this.__wrap_point_indent_count=-1,this.__wrap_point_alignment_count=0,this.__items=[]}f.prototype.clone_empty=function(){var i=new f(this.__parent);return i.set_indent(this.__indent_count,this.__alignment_count),i},f.prototype.item=function(i){return i<0?this.__items[this.__items.length+i]:this.__items[i]},f.prototype.has_match=function(i){for(var o=this.__items.length-1;o>=0;o--)if(this.__items[o].match(i))return!0;return!1},f.prototype.set_indent=function(i,o){this.is_empty()&&(this.__indent_count=i||0,this.__alignment_count=o||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},f.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)},f.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},f.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var i=this.__parent.current_line;return i.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),i.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),i.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,i.__items[0]===" "&&(i.__items.splice(0,1),i.__character_count-=1),!0}return!1},f.prototype.is_empty=function(){return this.__items.length===0},f.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},f.prototype.push=function(i){this.__items.push(i);var o=i.lastIndexOf(`
|
|
`);o!==-1?this.__character_count=i.length-o:this.__character_count+=i.length},f.prototype.pop=function(){var i=null;return this.is_empty()||(i=this.__items.pop(),this.__character_count-=i.length),i},f.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},f.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},f.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},f.prototype.toString=function(){var i="";return this.is_empty()?this.__parent.indent_empty_lines&&(i=this.__parent.get_indent_string(this.__indent_count)):(i=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),i+=this.__items.join("")),i};function l(i,o){this.__cache=[""],this.__indent_size=i.indent_size,this.__indent_string=i.indent_char,i.indent_with_tabs||(this.__indent_string=new Array(i.indent_size+1).join(i.indent_char)),o=o||"",i.indent_level>0&&(o=new Array(i.indent_level+1).join(this.__indent_string)),this.__base_string=o,this.__base_string_length=o.length}l.prototype.get_indent_size=function(i,o){var r=this.__base_string_length;return o=o||0,i<0&&(r=0),r+=i*this.__indent_size,r+=o,r},l.prototype.get_indent_string=function(i,o){var r=this.__base_string;return o=o||0,i<0&&(i=0,r=""),o+=i*this.__indent_size,this.__ensure_cache(o),r+=this.__cache[o],r},l.prototype.__ensure_cache=function(i){for(;i>=this.__cache.length;)this.__add_column()},l.prototype.__add_column=function(){var i=this.__cache.length,o=0,r="";this.__indent_size&&i>=this.__indent_size&&(o=Math.floor(i/this.__indent_size),i-=o*this.__indent_size,r=new Array(o+1).join(this.__indent_string)),i&&(r+=new Array(i+1).join(" ")),this.__cache.push(r)};function s(i,o){this.__indent_cache=new l(i,o),this.raw=!1,this._end_with_newline=i.end_with_newline,this.indent_size=i.indent_size,this.wrap_line_length=i.wrap_line_length,this.indent_empty_lines=i.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new f(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}s.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},s.prototype.get_line_number=function(){return this.__lines.length},s.prototype.get_indent_string=function(i,o){return this.__indent_cache.get_indent_string(i,o)},s.prototype.get_indent_size=function(i,o){return this.__indent_cache.get_indent_size(i,o)},s.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},s.prototype.add_new_line=function(i){return this.is_empty()||!i&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},s.prototype.get_code=function(i){this.trim(!0);var o=this.current_line.pop();o&&(o[o.length-1]===`
|
|
`&&(o=o.replace(/\n+$/g,"")),this.current_line.push(o)),this._end_with_newline&&this.__add_outputline();var r=this.__lines.join(`
|
|
`);return i!==`
|
|
`&&(r=r.replace(/[\n]/g,i)),r},s.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},s.prototype.set_indent=function(i,o){return i=i||0,o=o||0,this.next_line.set_indent(i,o),this.__lines.length>1?(this.current_line.set_indent(i,o),!0):(this.current_line.set_indent(),!1)},s.prototype.add_raw_token=function(i){for(var o=0;o<i.newlines;o++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(i.whitespace_before),this.current_line.push(i.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},s.prototype.add_token=function(i){this.__add_space_before_token(),this.current_line.push(i),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=this.current_line._allow_wrap()},s.prototype.__add_space_before_token=function(){this.space_before_token&&!this.just_added_newline()&&(this.non_breaking_space||this.set_wrap_point(),this.current_line.push(" "))},s.prototype.remove_indent=function(i){for(var o=this.__lines.length;i<o;)this.__lines[i]._remove_indent(),i++;this.current_line._remove_wrap_indent()},s.prototype.trim=function(i){for(i=i===void 0?!1:i,this.current_line.trim();i&&this.__lines.length>1&&this.current_line.is_empty();)this.__lines.pop(),this.current_line=this.__lines[this.__lines.length-1],this.current_line.trim();this.previous_line=this.__lines.length>1?this.__lines[this.__lines.length-2]:null},s.prototype.just_added_newline=function(){return this.current_line.is_empty()},s.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},s.prototype.ensure_empty_line_above=function(i,o){for(var r=this.__lines.length-2;r>=0;){var a=this.__lines[r];if(a.is_empty())break;if(a.item(0).indexOf(i)!==0&&a.item(-1)!==o){this.__lines.splice(r+1,0,new f(this)),this.previous_line=this.__lines[this.__lines.length-2];break}r--}},u.exports.Output=s},function(u){function f(l,s,i,o){this.type=l,this.text=s,this.comments_before=null,this.newlines=i||0,this.whitespace_before=o||"",this.parent=null,this.next=null,this.previous=null,this.opened=null,this.closed=null,this.directives=null}u.exports.Token=f},,,function(u){function f(i,o){this.raw_options=l(i,o),this.disabled=this._get_boolean("disabled"),this.eol=this._get_characters("eol","auto"),this.end_with_newline=this._get_boolean("end_with_newline"),this.indent_size=this._get_number("indent_size",4),this.indent_char=this._get_characters("indent_char"," "),this.indent_level=this._get_number("indent_level"),this.preserve_newlines=this._get_boolean("preserve_newlines",!0),this.max_preserve_newlines=this._get_number("max_preserve_newlines",32786),this.preserve_newlines||(this.max_preserve_newlines=0),this.indent_with_tabs=this._get_boolean("indent_with_tabs",this.indent_char===" "),this.indent_with_tabs&&(this.indent_char=" ",this.indent_size===1&&(this.indent_size=4)),this.wrap_line_length=this._get_number("wrap_line_length",this._get_number("max_char")),this.indent_empty_lines=this._get_boolean("indent_empty_lines"),this.templating=this._get_selection_list("templating",["auto","none","django","erb","handlebars","php","smarty"],["auto"])}f.prototype._get_array=function(i,o){var r=this.raw_options[i],a=o||[];return typeof r=="object"?r!==null&&typeof r.concat=="function"&&(a=r.concat()):typeof r=="string"&&(a=r.split(/[^a-zA-Z0-9_\/\-]+/)),a},f.prototype._get_boolean=function(i,o){var r=this.raw_options[i],a=r===void 0?!!o:!!r;return a},f.prototype._get_characters=function(i,o){var r=this.raw_options[i],a=o||"";return typeof r=="string"&&(a=r.replace(/\\r/,"\r").replace(/\\n/,`
|
|
`).replace(/\\t/," ")),a},f.prototype._get_number=function(i,o){var r=this.raw_options[i];o=parseInt(o,10),isNaN(o)&&(o=0);var a=parseInt(r,10);return isNaN(a)&&(a=o),a},f.prototype._get_selection=function(i,o,r){var a=this._get_selection_list(i,o,r);if(a.length!==1)throw new Error("Invalid Option Value: The option '"+i+`' can only be one of the following values:
|
|
`+o+`
|
|
You passed in: '`+this.raw_options[i]+"'");return a[0]},f.prototype._get_selection_list=function(i,o,r){if(!o||o.length===0)throw new Error("Selection list cannot be empty.");if(r=r||[o[0]],!this._is_valid_selection(r,o))throw new Error("Invalid Default Value!");var a=this._get_array(i,r);if(!this._is_valid_selection(a,o))throw new Error("Invalid Option Value: The option '"+i+`' can contain only the following values:
|
|
`+o+`
|
|
You passed in: '`+this.raw_options[i]+"'");return a},f.prototype._is_valid_selection=function(i,o){return i.length&&o.length&&!i.some(function(r){return o.indexOf(r)===-1})};function l(i,o){var r={};i=s(i);var a;for(a in i)a!==o&&(r[a]=i[a]);if(o&&i[o])for(a in i[o])r[a]=i[o][a];return r}function s(i){var o={},r;for(r in i){var a=r.replace(/-/g,"_");o[a]=i[r]}return o}u.exports.Options=f,u.exports.normalizeOpts=s,u.exports.mergeOpts=l},,function(u){var f=RegExp.prototype.hasOwnProperty("sticky");function l(s){this.__input=s||"",this.__input_length=this.__input.length,this.__position=0}l.prototype.restart=function(){this.__position=0},l.prototype.back=function(){this.__position>0&&(this.__position-=1)},l.prototype.hasNext=function(){return this.__position<this.__input_length},l.prototype.next=function(){var s=null;return this.hasNext()&&(s=this.__input.charAt(this.__position),this.__position+=1),s},l.prototype.peek=function(s){var i=null;return s=s||0,s+=this.__position,s>=0&&s<this.__input_length&&(i=this.__input.charAt(s)),i},l.prototype.__match=function(s,i){s.lastIndex=i;var o=s.exec(this.__input);return o&&!(f&&s.sticky)&&(o.index!==i&&(o=null)),o},l.prototype.test=function(s,i){return i=i||0,i+=this.__position,i>=0&&i<this.__input_length?!!this.__match(s,i):!1},l.prototype.testChar=function(s,i){var o=this.peek(i);return s.lastIndex=0,o!==null&&s.test(o)},l.prototype.match=function(s){var i=this.__match(s,this.__position);return i?this.__position+=i[0].length:i=null,i},l.prototype.read=function(s,i,o){var r="",a;return s&&(a=this.match(s),a&&(r+=a[0])),i&&(a||!s)&&(r+=this.readUntil(i,o)),r},l.prototype.readUntil=function(s,i){var o="",r=this.__position;s.lastIndex=this.__position;var a=s.exec(this.__input);return a?(r=a.index,i&&(r+=a[0].length)):r=this.__input_length,o=this.__input.substring(this.__position,r),this.__position=r,o},l.prototype.readUntilAfter=function(s){return this.readUntil(s,!0)},l.prototype.get_regexp=function(s,i){var o=null,r="g";return i&&f&&(r="y"),typeof s=="string"&&s!==""?o=new RegExp(s,r):s&&(o=new RegExp(s.source,r)),o},l.prototype.get_literal_regexp=function(s){return RegExp(s.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},l.prototype.peekUntilAfter=function(s){var i=this.__position,o=this.readUntilAfter(s);return this.__position=i,o},l.prototype.lookBack=function(s){var i=this.__position-1;return i>=s.length&&this.__input.substring(i-s.length,i).toLowerCase()===s},u.exports.InputScanner=l},function(u,f,l){var s=l(8).InputScanner,i=l(3).Token,o=l(10).TokenStream,r=l(11).WhitespacePattern,a={START:"TK_START",RAW:"TK_RAW",EOF:"TK_EOF"},n=function(t,E){this._input=new s(t),this._options=E||{},this.__tokens=null,this._patterns={},this._patterns.whitespace=new r(this._input)};n.prototype.tokenize=function(){this._input.restart(),this.__tokens=new o,this._reset();for(var t,E=new i(a.START,""),b=null,_=[],B=new o;E.type!==a.EOF;){for(t=this._get_next_token(E,b);this._is_comment(t);)B.add(t),t=this._get_next_token(E,b);B.isEmpty()||(t.comments_before=B,B=new o),t.parent=b,this._is_opening(t)?(_.push(b),b=t):b&&this._is_closing(t,b)&&(t.opened=b,b.closed=t,b=_.pop(),t.parent=b),t.previous=E,E.next=t,this.__tokens.add(t),E=t}return this.__tokens},n.prototype._is_first_token=function(){return this.__tokens.isEmpty()},n.prototype._reset=function(){},n.prototype._get_next_token=function(t,E){this._readWhitespace();var b=this._input.read(/.+/g);return b?this._create_token(a.RAW,b):this._create_token(a.EOF,"")},n.prototype._is_comment=function(t){return!1},n.prototype._is_opening=function(t){return!1},n.prototype._is_closing=function(t,E){return!1},n.prototype._create_token=function(t,E){var b=new i(t,E,this._patterns.whitespace.newline_count,this._patterns.whitespace.whitespace_before_token);return b},n.prototype._readWhitespace=function(){return this._patterns.whitespace.read()},u.exports.Tokenizer=n,u.exports.TOKEN=a},function(u){function f(l){this.__tokens=[],this.__tokens_length=this.__tokens.length,this.__position=0,this.__parent_token=l}f.prototype.restart=function(){this.__position=0},f.prototype.isEmpty=function(){return this.__tokens_length===0},f.prototype.hasNext=function(){return this.__position<this.__tokens_length},f.prototype.next=function(){var l=null;return this.hasNext()&&(l=this.__tokens[this.__position],this.__position+=1),l},f.prototype.peek=function(l){var s=null;return l=l||0,l+=this.__position,l>=0&&l<this.__tokens_length&&(s=this.__tokens[l]),s},f.prototype.add=function(l){this.__parent_token&&(l.parent=this.__parent_token),this.__tokens.push(l),this.__tokens_length+=1},u.exports.TokenStream=f},function(u,f,l){var s=l(12).Pattern;function i(o,r){s.call(this,o,r),r?this._line_regexp=this._input.get_regexp(r._line_regexp):this.__set_whitespace_patterns("",""),this.newline_count=0,this.whitespace_before_token=""}i.prototype=new s,i.prototype.__set_whitespace_patterns=function(o,r){o+="\\t ",r+="\\n\\r",this._match_pattern=this._input.get_regexp("["+o+r+"]+",!0),this._newline_regexp=this._input.get_regexp("\\r\\n|["+r+"]")},i.prototype.read=function(){this.newline_count=0,this.whitespace_before_token="";var o=this._input.read(this._match_pattern);if(o===" ")this.whitespace_before_token=" ";else if(o){var r=this.__split(this._newline_regexp,o);this.newline_count=r.length-1,this.whitespace_before_token=r[this.newline_count]}return o},i.prototype.matching=function(o,r){var a=this._create();return a.__set_whitespace_patterns(o,r),a._update(),a},i.prototype._create=function(){return new i(this._input,this)},i.prototype.__split=function(o,r){o.lastIndex=0;for(var a=0,n=[],t=o.exec(r);t;)n.push(r.substring(a,t.index)),a=t.index+t[0].length,t=o.exec(r);return a<r.length?n.push(r.substring(a,r.length)):n.push(""),n},u.exports.WhitespacePattern=i},function(u){function f(l,s){this._input=l,this._starting_pattern=null,this._match_pattern=null,this._until_pattern=null,this._until_after=!1,s&&(this._starting_pattern=this._input.get_regexp(s._starting_pattern,!0),this._match_pattern=this._input.get_regexp(s._match_pattern,!0),this._until_pattern=this._input.get_regexp(s._until_pattern),this._until_after=s._until_after)}f.prototype.read=function(){var l=this._input.read(this._starting_pattern);return(!this._starting_pattern||l)&&(l+=this._input.read(this._match_pattern,this._until_pattern,this._until_after)),l},f.prototype.read_match=function(){return this._input.match(this._match_pattern)},f.prototype.until_after=function(l){var s=this._create();return s._until_after=!0,s._until_pattern=this._input.get_regexp(l),s._update(),s},f.prototype.until=function(l){var s=this._create();return s._until_after=!1,s._until_pattern=this._input.get_regexp(l),s._update(),s},f.prototype.starting_with=function(l){var s=this._create();return s._starting_pattern=this._input.get_regexp(l,!0),s._update(),s},f.prototype.matching=function(l){var s=this._create();return s._match_pattern=this._input.get_regexp(l,!0),s._update(),s},f.prototype._create=function(){return new f(this._input,this)},f.prototype._update=function(){},u.exports.Pattern=f},function(u){function f(l,s){l=typeof l=="string"?l:l.source,s=typeof s=="string"?s:s.source,this.__directives_block_pattern=new RegExp(l+/ beautify( \w+[:]\w+)+ /.source+s,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(l+/\sbeautify\signore:end\s/.source+s,"g")}f.prototype.get_directives=function(l){if(!l.match(this.__directives_block_pattern))return null;var s={};this.__directive_pattern.lastIndex=0;for(var i=this.__directive_pattern.exec(l);i;)s[i[1]]=i[2],i=this.__directive_pattern.exec(l);return s},f.prototype.readIgnored=function(l){return l.readUntilAfter(this.__directives_end_ignore_pattern)},u.exports.Directives=f},function(u,f,l){var s=l(12).Pattern,i={django:!1,erb:!1,handlebars:!1,php:!1,smarty:!1};function o(r,a){s.call(this,r,a),this.__template_pattern=null,this._disabled=Object.assign({},i),this._excluded=Object.assign({},i),a&&(this.__template_pattern=this._input.get_regexp(a.__template_pattern),this._excluded=Object.assign(this._excluded,a._excluded),this._disabled=Object.assign(this._disabled,a._disabled));var n=new s(r);this.__patterns={handlebars_comment:n.starting_with(/{{!--/).until_after(/--}}/),handlebars_unescaped:n.starting_with(/{{{/).until_after(/}}}/),handlebars:n.starting_with(/{{/).until_after(/}}/),php:n.starting_with(/<\?(?:[= ]|php)/).until_after(/\?>/),erb:n.starting_with(/<%[^%]/).until_after(/[^%]%>/),django:n.starting_with(/{%/).until_after(/%}/),django_value:n.starting_with(/{{/).until_after(/}}/),django_comment:n.starting_with(/{#/).until_after(/#}/),smarty:n.starting_with(/{(?=[^}{\s\n])/).until_after(/[^\s\n]}/),smarty_comment:n.starting_with(/{\*/).until_after(/\*}/),smarty_literal:n.starting_with(/{literal}/).until_after(/{\/literal}/)}}o.prototype=new s,o.prototype._create=function(){return new o(this._input,this)},o.prototype._update=function(){this.__set_templated_pattern()},o.prototype.disable=function(r){var a=this._create();return a._disabled[r]=!0,a._update(),a},o.prototype.read_options=function(r){var a=this._create();for(var n in i)a._disabled[n]=r.templating.indexOf(n)===-1;return a._update(),a},o.prototype.exclude=function(r){var a=this._create();return a._excluded[r]=!0,a._update(),a},o.prototype.read=function(){var r="";this._match_pattern?r=this._input.read(this._starting_pattern):r=this._input.read(this._starting_pattern,this.__template_pattern);for(var a=this._read_template();a;)this._match_pattern?a+=this._input.read(this._match_pattern):a+=this._input.readUntil(this.__template_pattern),r+=a,a=this._read_template();return this._until_after&&(r+=this._input.readUntilAfter(this._until_pattern)),r},o.prototype.__set_templated_pattern=function(){var r=[];this._disabled.php||r.push(this.__patterns.php._starting_pattern.source),this._disabled.handlebars||r.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.erb||r.push(this.__patterns.erb._starting_pattern.source),this._disabled.django||(r.push(this.__patterns.django._starting_pattern.source),r.push(this.__patterns.django_value._starting_pattern.source),r.push(this.__patterns.django_comment._starting_pattern.source)),this._disabled.smarty||r.push(this.__patterns.smarty._starting_pattern.source),this._until_pattern&&r.push(this._until_pattern.source),this.__template_pattern=this._input.get_regexp("(?:"+r.join("|")+")")},o.prototype._read_template=function(){var r="",a=this._input.peek();if(a==="<"){var n=this._input.peek(1);!this._disabled.php&&!this._excluded.php&&n==="?"&&(r=r||this.__patterns.php.read()),!this._disabled.erb&&!this._excluded.erb&&n==="%"&&(r=r||this.__patterns.erb.read())}else a==="{"&&(!this._disabled.handlebars&&!this._excluded.handlebars&&(r=r||this.__patterns.handlebars_comment.read(),r=r||this.__patterns.handlebars_unescaped.read(),r=r||this.__patterns.handlebars.read()),this._disabled.django||(!this._excluded.django&&!this._excluded.handlebars&&(r=r||this.__patterns.django_value.read()),this._excluded.django||(r=r||this.__patterns.django_comment.read(),r=r||this.__patterns.django.read())),this._disabled.smarty||this._disabled.django&&this._disabled.handlebars&&(r=r||this.__patterns.smarty_comment.read(),r=r||this.__patterns.smarty_literal.read(),r=r||this.__patterns.smarty.read()));return r},u.exports.TemplatablePattern=o},,,,function(u,f,l){var s=l(19).Beautifier,i=l(20).Options;function o(r,a,n,t){var E=new s(r,a,n,t);return E.beautify()}u.exports=o,u.exports.defaultOptions=function(){return new i}},function(u,f,l){var s=l(20).Options,i=l(2).Output,o=l(21).Tokenizer,r=l(21).TOKEN,a=/\r\n|[\r\n]/,n=/\r\n|[\r\n]/g,t=function(w,m){this.indent_level=0,this.alignment_size=0,this.max_preserve_newlines=w.max_preserve_newlines,this.preserve_newlines=w.preserve_newlines,this._output=new i(w,m)};t.prototype.current_line_has_match=function(w){return this._output.current_line.has_match(w)},t.prototype.set_space_before_token=function(w,m){this._output.space_before_token=w,this._output.non_breaking_space=m},t.prototype.set_wrap_point=function(){this._output.set_indent(this.indent_level,this.alignment_size),this._output.set_wrap_point()},t.prototype.add_raw_token=function(w){this._output.add_raw_token(w)},t.prototype.print_preserved_newlines=function(w){var m=0;w.type!==r.TEXT&&w.previous.type!==r.TEXT&&(m=w.newlines?1:0),this.preserve_newlines&&(m=w.newlines<this.max_preserve_newlines+1?w.newlines:this.max_preserve_newlines+1);for(var g=0;g<m;g++)this.print_newline(g>0);return m!==0},t.prototype.traverse_whitespace=function(w){return w.whitespace_before||w.newlines?(this.print_preserved_newlines(w)||(this._output.space_before_token=!0),!0):!1},t.prototype.previous_token_wrapped=function(){return this._output.previous_token_wrapped},t.prototype.print_newline=function(w){this._output.add_new_line(w)},t.prototype.print_token=function(w){w.text&&(this._output.set_indent(this.indent_level,this.alignment_size),this._output.add_token(w.text))},t.prototype.indent=function(){this.indent_level++},t.prototype.get_full_indent=function(w){return w=this.indent_level+(w||0),w<1?"":this._output.get_indent_string(w)};var E=function(w){for(var m=null,g=w.next;g.type!==r.EOF&&w.closed!==g;){if(g.type===r.ATTRIBUTE&&g.text==="type"){g.next&&g.next.type===r.EQUALS&&g.next.next&&g.next.next.type===r.VALUE&&(m=g.next.next.text);break}g=g.next}return m},b=function(w,m){var g=null,F=null;return m.closed?(w==="script"?g="text/javascript":w==="style"&&(g="text/css"),g=E(m)||g,g.search("text/css")>-1?F="css":g.search(/module|((text|application|dojo)\/(x-)?(javascript|ecmascript|jscript|livescript|(ld\+)?json|method|aspect))/)>-1?F="javascript":g.search(/(text|application|dojo)\/(x-)?(html)/)>-1?F="html":g.search(/test\/null/)>-1&&(F="null"),F):null};function _(w,m){return m.indexOf(w)!==-1}function B(w,m,g){this.parent=w||null,this.tag=m?m.tag_name:"",this.indent_level=g||0,this.parser_token=m||null}function x(w){this._printer=w,this._current_frame=null}x.prototype.get_parser_token=function(){return this._current_frame?this._current_frame.parser_token:null},x.prototype.record_tag=function(w){var m=new B(this._current_frame,w,this._printer.indent_level);this._current_frame=m},x.prototype._try_pop_frame=function(w){var m=null;return w&&(m=w.parser_token,this._printer.indent_level=w.indent_level,this._current_frame=w.parent),m},x.prototype._get_frame=function(w,m){for(var g=this._current_frame;g&&!(w.indexOf(g.tag)!==-1);){if(m&&m.indexOf(g.tag)!==-1){g=null;break}g=g.parent}return g},x.prototype.try_pop=function(w,m){var g=this._get_frame([w],m);return this._try_pop_frame(g)},x.prototype.indent_to_tag=function(w){var m=this._get_frame(w);m&&(this._printer.indent_level=m.indent_level)};function h(w,m,g,F){this._source_text=w||"",m=m||{},this._js_beautify=g,this._css_beautify=F,this._tag_stack=null;var k=new s(m,"html");this._options=k,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"}h.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var w=this._source_text,m=this._options.eol;this._options.eol==="auto"&&(m=`
|
|
`,w&&a.test(w)&&(m=w.match(a)[0])),w=w.replace(n,`
|
|
`);var g=w.match(/^[\t ]*/)[0],F={text:"",type:""},k=new d,S=new t(this._options,g),Q=new o(w,this._options).tokenize();this._tag_stack=new x(S);for(var X=null,P=Q.next();P.type!==r.EOF;)P.type===r.TAG_OPEN||P.type===r.COMMENT?(X=this._handle_tag_open(S,P,k,F),k=X):P.type===r.ATTRIBUTE||P.type===r.EQUALS||P.type===r.VALUE||P.type===r.TEXT&&!k.tag_complete?X=this._handle_inside_tag(S,P,k,Q):P.type===r.TAG_CLOSE?X=this._handle_tag_close(S,P,k):P.type===r.TEXT?X=this._handle_text(S,P,k):S.add_raw_token(P),F=X,P=Q.next();var q=S._output.get_code(m);return q},h.prototype._handle_tag_close=function(w,m,g){var F={text:m.text,type:m.type};return w.alignment_size=0,g.tag_complete=!0,w.set_space_before_token(m.newlines||m.whitespace_before!=="",!0),g.is_unformatted?w.add_raw_token(m):(g.tag_start_char==="<"&&(w.set_space_before_token(m.text[0]==="/",!0),this._is_wrap_attributes_force_expand_multiline&&g.has_wrapped_attrs&&w.print_newline(!1)),w.print_token(m)),g.indent_content&&!(g.is_unformatted||g.is_content_unformatted)&&(w.indent(),g.indent_content=!1),!g.is_inline_element&&!(g.is_unformatted||g.is_content_unformatted)&&w.set_wrap_point(),F},h.prototype._handle_inside_tag=function(w,m,g,F){var k=g.has_wrapped_attrs,S={text:m.text,type:m.type};if(w.set_space_before_token(m.newlines||m.whitespace_before!=="",!0),g.is_unformatted)w.add_raw_token(m);else if(g.tag_start_char==="{"&&m.type===r.TEXT)w.print_preserved_newlines(m)?(m.newlines=0,w.add_raw_token(m)):w.print_token(m);else{if(m.type===r.ATTRIBUTE?(w.set_space_before_token(!0),g.attr_count+=1):(m.type===r.EQUALS||m.type===r.VALUE&&m.previous.type===r.EQUALS)&&w.set_space_before_token(!1),m.type===r.ATTRIBUTE&&g.tag_start_char==="<"&&((this._is_wrap_attributes_preserve||this._is_wrap_attributes_preserve_aligned)&&(w.traverse_whitespace(m),k=k||m.newlines!==0),this._is_wrap_attributes_force)){var Q=g.attr_count>1;if(this._is_wrap_attributes_force_expand_multiline&&g.attr_count===1){var X=!0,P=0,q;do{if(q=F.peek(P),q.type===r.ATTRIBUTE){X=!1;break}P+=1}while(P<4&&q.type!==r.EOF&&q.type!==r.TAG_CLOSE);Q=!X}Q&&(w.print_newline(!1),k=!0)}w.print_token(m),k=k||w.previous_token_wrapped(),g.has_wrapped_attrs=k}return S},h.prototype._handle_text=function(w,m,g){var F={text:m.text,type:"TK_CONTENT"};return g.custom_beautifier_name?this._print_custom_beatifier_text(w,m,g):g.is_unformatted||g.is_content_unformatted?w.add_raw_token(m):(w.traverse_whitespace(m),w.print_token(m)),F},h.prototype._print_custom_beatifier_text=function(w,m,g){var F=this;if(m.text!==""){var k=m.text,S,Q=1,X="",P="";g.custom_beautifier_name==="javascript"&&typeof this._js_beautify=="function"?S=this._js_beautify:g.custom_beautifier_name==="css"&&typeof this._css_beautify=="function"?S=this._css_beautify:g.custom_beautifier_name==="html"&&(S=function(Ne,ke){var Ke=new h(Ne,ke,F._js_beautify,F._css_beautify);return Ke.beautify()}),this._options.indent_scripts==="keep"?Q=0:this._options.indent_scripts==="separate"&&(Q=-w.indent_level);var q=w.get_full_indent(Q);if(k=k.replace(/\n[ \t]*$/,""),g.custom_beautifier_name!=="html"&&k[0]==="<"&&k.match(/^(<!--|<!\[CDATA\[)/)){var ie=/^(<!--[^\n]*|<!\[CDATA\[)(\n?)([ \t\n]*)([\s\S]*)(-->|]]>)$/.exec(k);if(!ie){w.add_raw_token(m);return}X=q+ie[1]+`
|
|
`,k=ie[4],ie[5]&&(P=q+ie[5]),k=k.replace(/\n[ \t]*$/,""),(ie[2]||ie[3].indexOf(`
|
|
`)!==-1)&&(ie=ie[3].match(/[ \t]+$/),ie&&(m.whitespace_before=ie[0]))}if(k)if(S){var be=function(){this.eol=`
|
|
`};be.prototype=this._options.raw_options;var me=new be;k=S(q+k,me)}else{var Me=m.whitespace_before;Me&&(k=k.replace(new RegExp(`
|
|
(`+Me+")?","g"),`
|
|
`)),k=q+k.replace(/\n/g,`
|
|
`+q)}X&&(k?k=X+k+`
|
|
`+P:k=X+P),w.print_newline(!1),k&&(m.text=k,m.whitespace_before="",m.newlines=0,w.add_raw_token(m),w.print_newline(!0))}},h.prototype._handle_tag_open=function(w,m,g,F){var k=this._get_tag_open_token(m);return(g.is_unformatted||g.is_content_unformatted)&&!g.is_empty_element&&m.type===r.TAG_OPEN&&m.text.indexOf("</")===0?(w.add_raw_token(m),k.start_tag_token=this._tag_stack.try_pop(k.tag_name)):(w.traverse_whitespace(m),this._set_tag_position(w,m,k,g,F),k.is_inline_element||w.set_wrap_point(),w.print_token(m)),(this._is_wrap_attributes_force_aligned||this._is_wrap_attributes_aligned_multiple||this._is_wrap_attributes_preserve_aligned)&&(k.alignment_size=m.text.length+1),!k.tag_complete&&!k.is_unformatted&&(w.alignment_size=k.alignment_size),k};var d=function(w,m){if(this.parent=w||null,this.text="",this.type="TK_TAG_OPEN",this.tag_name="",this.is_inline_element=!1,this.is_unformatted=!1,this.is_content_unformatted=!1,this.is_empty_element=!1,this.is_start_tag=!1,this.is_end_tag=!1,this.indent_content=!1,this.multiline_content=!1,this.custom_beautifier_name=null,this.start_tag_token=null,this.attr_count=0,this.has_wrapped_attrs=!1,this.alignment_size=0,this.tag_complete=!1,this.tag_start_char="",this.tag_check="",!m)this.tag_complete=!0;else{var g;this.tag_start_char=m.text[0],this.text=m.text,this.tag_start_char==="<"?(g=m.text.match(/^<([^\s>]*)/),this.tag_check=g?g[1]:""):(g=m.text.match(/^{{~?(?:[\^]|#\*?)?([^\s}]+)/),this.tag_check=g?g[1]:"",(m.text.startsWith("{{#>")||m.text.startsWith("{{~#>"))&&this.tag_check[0]===">"&&(this.tag_check===">"&&m.next!==null?this.tag_check=m.next.text.split(" ")[0]:this.tag_check=m.text.split(">")[1])),this.tag_check=this.tag_check.toLowerCase(),m.type===r.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||m.closed&&m.closed.text==="/>";var F=2;this.tag_start_char==="{"&&this.text.length>=3&&(this.text.charAt(2)==="~"&&(F=3)),this.is_end_tag=this.is_end_tag||this.tag_start_char==="{"&&(this.text.length<3||/[^#\^]/.test(this.text.charAt(F)))}};h.prototype._get_tag_open_token=function(w){var m=new d(this._tag_stack.get_parser_token(),w);return m.alignment_size=this._options.wrap_attributes_indent_size,m.is_end_tag=m.is_end_tag||_(m.tag_check,this._options.void_elements),m.is_empty_element=m.tag_complete||m.is_start_tag&&m.is_end_tag,m.is_unformatted=!m.tag_complete&&_(m.tag_check,this._options.unformatted),m.is_content_unformatted=!m.is_empty_element&&_(m.tag_check,this._options.content_unformatted),m.is_inline_element=_(m.tag_name,this._options.inline)||m.tag_name.includes("-")||m.tag_start_char==="{",m},h.prototype._set_tag_position=function(w,m,g,F,k){if(g.is_empty_element||(g.is_end_tag?g.start_tag_token=this._tag_stack.try_pop(g.tag_name):(this._do_optional_end_element(g)&&(g.is_inline_element||w.print_newline(!1)),this._tag_stack.record_tag(g),(g.tag_name==="script"||g.tag_name==="style")&&!(g.is_unformatted||g.is_content_unformatted)&&(g.custom_beautifier_name=b(g.tag_check,m)))),_(g.tag_check,this._options.extra_liners)&&(w.print_newline(!1),w._output.just_added_blankline()||w.print_newline(!0)),g.is_empty_element){if(g.tag_start_char==="{"&&g.tag_check==="else"){this._tag_stack.indent_to_tag(["if","unless","each"]),g.indent_content=!0;var S=w.current_line_has_match(/{{#if/);S||w.print_newline(!1)}g.tag_name==="!--"&&k.type===r.TAG_CLOSE&&F.is_end_tag&&g.text.indexOf(`
|
|
`)===-1||(g.is_inline_element||g.is_unformatted||w.print_newline(!1),this._calcluate_parent_multiline(w,g))}else if(g.is_end_tag){var Q=!1;Q=g.start_tag_token&&g.start_tag_token.multiline_content,Q=Q||!g.is_inline_element&&!(F.is_inline_element||F.is_unformatted)&&!(k.type===r.TAG_CLOSE&&g.start_tag_token===F)&&k.type!=="TK_CONTENT",(g.is_content_unformatted||g.is_unformatted)&&(Q=!1),Q&&w.print_newline(!1)}else g.indent_content=!g.custom_beautifier_name,g.tag_start_char==="<"&&(g.tag_name==="html"?g.indent_content=this._options.indent_inner_html:g.tag_name==="head"?g.indent_content=this._options.indent_head_inner_html:g.tag_name==="body"&&(g.indent_content=this._options.indent_body_inner_html)),!(g.is_inline_element||g.is_unformatted)&&(k.type!=="TK_CONTENT"||g.is_content_unformatted)&&w.print_newline(!1),this._calcluate_parent_multiline(w,g)},h.prototype._calcluate_parent_multiline=function(w,m){m.parent&&w._output.just_added_newline()&&!((m.is_inline_element||m.is_unformatted)&&m.parent.is_inline_element)&&(m.parent.multiline_content=!0)};var A=["address","article","aside","blockquote","details","div","dl","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hr","main","nav","ol","p","pre","section","table","ul"],c=["a","audio","del","ins","map","noscript","video"];h.prototype._do_optional_end_element=function(w){var m=null;if(w.is_empty_element||!w.is_start_tag||!w.parent)return;if(w.tag_name==="body")m=m||this._tag_stack.try_pop("head");else if(w.tag_name==="li")m=m||this._tag_stack.try_pop("li",["ol","ul"]);else if(w.tag_name==="dd"||w.tag_name==="dt")m=m||this._tag_stack.try_pop("dt",["dl"]),m=m||this._tag_stack.try_pop("dd",["dl"]);else if(w.parent.tag_name==="p"&&A.indexOf(w.tag_name)!==-1){var g=w.parent.parent;(!g||c.indexOf(g.tag_name)===-1)&&(m=m||this._tag_stack.try_pop("p"))}else w.tag_name==="rp"||w.tag_name==="rt"?(m=m||this._tag_stack.try_pop("rt",["ruby","rtc"]),m=m||this._tag_stack.try_pop("rp",["ruby","rtc"])):w.tag_name==="optgroup"?m=m||this._tag_stack.try_pop("optgroup",["select"]):w.tag_name==="option"?m=m||this._tag_stack.try_pop("option",["select","datalist","optgroup"]):w.tag_name==="colgroup"?m=m||this._tag_stack.try_pop("caption",["table"]):w.tag_name==="thead"?(m=m||this._tag_stack.try_pop("caption",["table"]),m=m||this._tag_stack.try_pop("colgroup",["table"])):w.tag_name==="tbody"||w.tag_name==="tfoot"?(m=m||this._tag_stack.try_pop("caption",["table"]),m=m||this._tag_stack.try_pop("colgroup",["table"]),m=m||this._tag_stack.try_pop("thead",["table"]),m=m||this._tag_stack.try_pop("tbody",["table"])):w.tag_name==="tr"?(m=m||this._tag_stack.try_pop("caption",["table"]),m=m||this._tag_stack.try_pop("colgroup",["table"]),m=m||this._tag_stack.try_pop("tr",["table","thead","tbody","tfoot"])):(w.tag_name==="th"||w.tag_name==="td")&&(m=m||this._tag_stack.try_pop("td",["table","thead","tbody","tfoot","tr"]),m=m||this._tag_stack.try_pop("th",["table","thead","tbody","tfoot","tr"]));return w.parent=this._tag_stack.get_parser_token(),m},u.exports.Beautifier=h},function(u,f,l){var s=l(6).Options;function i(o){s.call(this,o,"html"),this.templating.length===1&&this.templating[0]==="auto"&&(this.templating=["django","erb","handlebars","php"]),this.indent_inner_html=this._get_boolean("indent_inner_html"),this.indent_body_inner_html=this._get_boolean("indent_body_inner_html",!0),this.indent_head_inner_html=this._get_boolean("indent_head_inner_html",!0),this.indent_handlebars=this._get_boolean("indent_handlebars",!0),this.wrap_attributes=this._get_selection("wrap_attributes",["auto","force","force-aligned","force-expand-multiline","aligned-multiple","preserve","preserve-aligned"]),this.wrap_attributes_indent_size=this._get_number("wrap_attributes_indent_size",this.indent_size),this.extra_liners=this._get_array("extra_liners",["head","body","/html"]),this.inline=this._get_array("inline",["a","abbr","area","audio","b","bdi","bdo","br","button","canvas","cite","code","data","datalist","del","dfn","em","embed","i","iframe","img","input","ins","kbd","keygen","label","map","mark","math","meter","noscript","object","output","progress","q","ruby","s","samp","select","small","span","strong","sub","sup","svg","template","textarea","time","u","var","video","wbr","text","acronym","big","strike","tt"]),this.void_elements=this._get_array("void_elements",["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr","!doctype","?xml","basefont","isindex"]),this.unformatted=this._get_array("unformatted",[]),this.content_unformatted=this._get_array("content_unformatted",["pre","textarea"]),this.unformatted_content_delimiter=this._get_characters("unformatted_content_delimiter"),this.indent_scripts=this._get_selection("indent_scripts",["normal","keep","separate"])}i.prototype=new s,u.exports.Options=i},function(u,f,l){var s=l(9).Tokenizer,i=l(9).TOKEN,o=l(13).Directives,r=l(14).TemplatablePattern,a=l(12).Pattern,n={TAG_OPEN:"TK_TAG_OPEN",TAG_CLOSE:"TK_TAG_CLOSE",ATTRIBUTE:"TK_ATTRIBUTE",EQUALS:"TK_EQUALS",VALUE:"TK_VALUE",COMMENT:"TK_COMMENT",TEXT:"TK_TEXT",UNKNOWN:"TK_UNKNOWN",START:i.START,RAW:i.RAW,EOF:i.EOF},t=new o(/<\!--/,/-->/),E=function(b,_){s.call(this,b,_),this._current_tag_name="";var B=new r(this._input).read_options(this._options),x=new a(this._input);if(this.__patterns={word:B.until(/[\n\r\t <]/),single_quote:B.until_after(/'/),double_quote:B.until_after(/"/),attribute:B.until(/[\n\r\t =>]|\/>/),element_name:B.until(/[\n\r\t >\/]/),handlebars_comment:x.starting_with(/{{!--/).until_after(/--}}/),handlebars:x.starting_with(/{{/).until_after(/}}/),handlebars_open:x.until(/[\n\r\t }]/),handlebars_raw_close:x.until(/}}/),comment:x.starting_with(/<!--/).until_after(/-->/),cdata:x.starting_with(/<!\[CDATA\[/).until_after(/]]>/),conditional_comment:x.starting_with(/<!\[/).until_after(/]>/),processing:x.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 h=this._input.get_literal_regexp(this._options.unformatted_content_delimiter);this.__patterns.unformatted_content_delimiter=x.matching(h).until_after(h)}};E.prototype=new s,E.prototype._is_comment=function(b){return!1},E.prototype._is_opening=function(b){return b.type===n.TAG_OPEN},E.prototype._is_closing=function(b,_){return b.type===n.TAG_CLOSE&&_&&((b.text===">"||b.text==="/>")&&_.text[0]==="<"||b.text==="}}"&&_.text[0]==="{"&&_.text[1]==="{")},E.prototype._reset=function(){this._current_tag_name=""},E.prototype._get_next_token=function(b,_){var B=null;this._readWhitespace();var x=this._input.peek();return x===null?this._create_token(n.EOF,""):(B=B||this._read_open_handlebars(x,_),B=B||this._read_attribute(x,b,_),B=B||this._read_close(x,_),B=B||this._read_raw_content(x,b,_),B=B||this._read_content_word(x),B=B||this._read_comment_or_cdata(x),B=B||this._read_processing(x),B=B||this._read_open(x,_),B=B||this._create_token(n.UNKNOWN,this._input.next()),B)},E.prototype._read_comment_or_cdata=function(b){var _=null,B=null,x=null;if(b==="<"){var h=this._input.peek(1);h==="!"&&(B=this.__patterns.comment.read(),B?(x=t.get_directives(B),x&&x.ignore==="start"&&(B+=t.readIgnored(this._input))):B=this.__patterns.cdata.read()),B&&(_=this._create_token(n.COMMENT,B),_.directives=x)}return _},E.prototype._read_processing=function(b){var _=null,B=null,x=null;if(b==="<"){var h=this._input.peek(1);(h==="!"||h==="?")&&(B=this.__patterns.conditional_comment.read(),B=B||this.__patterns.processing.read()),B&&(_=this._create_token(n.COMMENT,B),_.directives=x)}return _},E.prototype._read_open=function(b,_){var B=null,x=null;return _||b==="<"&&(B=this._input.next(),this._input.peek()==="/"&&(B+=this._input.next()),B+=this.__patterns.element_name.read(),x=this._create_token(n.TAG_OPEN,B)),x},E.prototype._read_open_handlebars=function(b,_){var B=null,x=null;return _||this._options.indent_handlebars&&b==="{"&&this._input.peek(1)==="{"&&(this._input.peek(2)==="!"?(B=this.__patterns.handlebars_comment.read(),B=B||this.__patterns.handlebars.read(),x=this._create_token(n.COMMENT,B)):(B=this.__patterns.handlebars_open.read(),x=this._create_token(n.TAG_OPEN,B))),x},E.prototype._read_close=function(b,_){var B=null,x=null;return _&&(_.text[0]==="<"&&(b===">"||b==="/"&&this._input.peek(1)===">")?(B=this._input.next(),b==="/"&&(B+=this._input.next()),x=this._create_token(n.TAG_CLOSE,B)):_.text[0]==="{"&&b==="}"&&this._input.peek(1)==="}"&&(this._input.next(),this._input.next(),x=this._create_token(n.TAG_CLOSE,"}}"))),x},E.prototype._read_attribute=function(b,_,B){var x=null,h="";if(B&&B.text[0]==="<")if(b==="=")x=this._create_token(n.EQUALS,this._input.next());else if(b==='"'||b==="'"){var d=this._input.next();b==='"'?d+=this.__patterns.double_quote.read():d+=this.__patterns.single_quote.read(),x=this._create_token(n.VALUE,d)}else h=this.__patterns.attribute.read(),h&&(_.type===n.EQUALS?x=this._create_token(n.VALUE,h):x=this._create_token(n.ATTRIBUTE,h));return x},E.prototype._is_content_unformatted=function(b){return this._options.void_elements.indexOf(b)===-1&&(this._options.content_unformatted.indexOf(b)!==-1||this._options.unformatted.indexOf(b)!==-1)},E.prototype._read_raw_content=function(b,_,B){var x="";if(B&&B.text[0]==="{")x=this.__patterns.handlebars_raw_close.read();else if(_.type===n.TAG_CLOSE&&_.opened.text[0]==="<"&&_.text[0]!=="/"){var h=_.opened.text.substr(1).toLowerCase();if(h==="script"||h==="style"){var d=this._read_comment_or_cdata(b);if(d)return d.type=n.TEXT,d;x=this._input.readUntil(new RegExp("</"+h+"[\\n\\r\\t ]*?>","ig"))}else this._is_content_unformatted(h)&&(x=this._input.readUntil(new RegExp("</"+h+"[\\n\\r\\t ]*?>","ig")))}return x?this._create_token(n.TEXT,x):null},E.prototype._read_content_word=function(b){var _="";if(this._options.unformatted_content_delimiter&&(b===this._options.unformatted_content_delimiter[0]&&(_=this.__patterns.unformatted_content_delimiter.read())),_||(_=this.__patterns.word.read()),_)return this._create_token(n.TEXT,_)},u.exports.Tokenizer=E,u.exports.TOKEN=n}],H={};function e(u){var f=H[u];if(f!==void 0)return f.exports;var l=H[u]={exports:{}};return $[u](l,l.exports,e),l.exports}var R=e(18);U=R})();var V=U;if(!0)!(Ae=[G,G("6UM0"),G("TXwP")],z=function($){var H=G("6UM0"),e=G("TXwP");return{html_beautify:function(R,u){return V(R,u,H.js_beautify,e.css_beautify)}}}.apply(Be,Ae),z!==void 0&&(wt.exports=z));else var N,L})()},"rAM+":function(wt,Be,G){"use strict";G.d(Be,"a",function(){return z});var Ae=G("Qw5x");function z(U,V){var N;if(typeof Symbol=="undefined"||U[Symbol.iterator]==null){if(Array.isArray(U)||(N=Object(Ae.a)(U))||V&&U&&typeof U.length=="number"){N&&(U=N);var L=0,$=function(){};return{s:$,n:function(){return L>=U.length?{done:!0}:{done:!1,value:U[L++]}},e:function(f){throw f},f:$}}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 H=!0,e=!1,R;return{s:function(){N=U[Symbol.iterator]()},n:function(){var f=N.next();return H=f.done,f},e:function(f){e=!0,R=f},f:function(){try{!H&&N.return!=null&&N.return()}finally{if(e)throw R}}}}},rUJ1:function(wt,Be){const G=/[&<>"']/,Ae=/[&<>"']/g,z=/[<>"']|&(?!#?\w+;)/,U=/[<>"']|&(?!#?\w+;)/g,V={"&":"&","<":"<",">":">",'"':""","'":"'"},N=x=>V[x];function L(x,h){if(h){if(G.test(x))return x.replace(Ae,N)}else if(z.test(x))return x.replace(U,N);return x}const $=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function H(x){return x.replace($,(h,d)=>(d=d.toLowerCase(),d==="colon"?":":d.charAt(0)==="#"?d.charAt(1)==="x"?String.fromCharCode(parseInt(d.substring(2),16)):String.fromCharCode(+d.substring(1)):""))}const e=/(^|[^\[])\^/g;function R(x,h){x=x.source||x,h=h||"";const d={replace:(A,c)=>(c=c.source||c,c=c.replace(e,"$1"),x=x.replace(A,c),d),getRegex:()=>new RegExp(x,h)};return d}const u=/[^\w:]/g,f=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function l(x,h,d){if(x){let A;try{A=decodeURIComponent(H(d)).replace(u,"").toLowerCase()}catch(c){return null}if(A.indexOf("javascript:")===0||A.indexOf("vbscript:")===0||A.indexOf("data:")===0)return null}h&&!f.test(d)&&(d=a(h,d));try{d=encodeURI(d).replace(/%25/g,"%")}catch(A){return null}return d}const s={},i=/^[^:]+:\/*[^/]*$/,o=/^([^:]+:)[\s\S]*$/,r=/^([^:]+:\/*[^/]*)[\s\S]*$/;function a(x,h){s[" "+x]||(i.test(x)?s[" "+x]=x+"/":s[" "+x]=b(x,"/",!0)),x=s[" "+x];const d=x.indexOf(":")===-1;return h.substring(0,2)==="//"?d?h:x.replace(o,"$1")+h:h.charAt(0)==="/"?d?h:x.replace(r,"$1")+h:x+h}const n={exec:function(){}};function t(x){let h=1,d,A;for(;h<arguments.length;h++){d=arguments[h];for(A in d)Object.prototype.hasOwnProperty.call(d,A)&&(x[A]=d[A])}return x}function E(x,h){const d=x.replace(/\|/g,(w,m,g)=>{let F=!1,k=m;for(;--k>=0&&g[k]==="\\";)F=!F;return F?"|":" |"}),A=d.split(/ \|/);let c=0;if(A.length>h)A.splice(h);else for(;A.length<h;)A.push("");for(;c<A.length;c++)A[c]=A[c].trim().replace(/\\\|/g,"|");return A}function b(x,h,d){const A=x.length;if(A===0)return"";let c=0;for(;c<A;){const w=x.charAt(A-c-1);if(w===h&&!d)c++;else if(w!==h&&d)c++;else break}return x.substr(0,A-c)}function _(x,h){if(x.indexOf(h[1])===-1)return-1;const d=x.length;let A=0,c=0;for(;c<d;c++)if(x[c]==="\\")c++;else if(x[c]===h[0])A++;else if(x[c]===h[1]&&(A--,A<0))return c;return-1}function B(x){x&&x.sanitize&&!x.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")}wt.exports={escape:L,unescape:H,edit:R,cleanUrl:l,resolveUrl:a,noopTest:n,merge:t,splitCells:E,rtrim:b,findClosingBracket:_,checkSanitizeDeprecation:B}},"rd/4":function(wt,Be,G){wt.exports=G.p+"static/noData.dc777645.png"},sR1s:function(wt,Be,G){"use strict";G.d(Be,"b",function(){return V}),G.d(Be,"a",function(){return N}),G.d(Be,"c",function(){return L}),G.d(Be,"d",function(){return $});var Ae=G("U8pU"),z="RC_TABLE_KEY";function U(H){return H==null?[]:Array.isArray(H)?H:[H]}function V(H,e){if(!e&&typeof e!="number")return H;for(var R=U(e),u=H,f=0;f<R.length;f+=1){if(!u)return null;var l=R[f];u=u[l]}return u}function N(H){var e=[],R={};return H.forEach(function(u){for(var f=u||{},l=f.key,s=f.dataIndex,i=l||U(s).join("-")||z;R[i];)i="".concat(i,"_next");R[i]=!0,e.push(i)}),e}function L(){var H={};function e(l,s){s&&Object.keys(s).forEach(function(i){var o=s[i];o&&Object(Ae.a)(o)==="object"?(l[i]=l[i]||{},e(l[i],o)):l[i]=o})}for(var R=arguments.length,u=new Array(R),f=0;f<R;f++)u[f]=arguments[f];return u.forEach(function(l){e(H,l)}),H}function $(H){return H!=null}},sboe:function(wt,Be,G){"use strict";G.d(Be,"a",function(){return U});var Ae=G("q1tI"),z=G.n(Ae),U=Ae.createContext(null)},t23M:function(wt,Be,G){"use strict";var Ae=G("VTBJ"),z=G("1OyB"),U=G("vuIU"),V=G("Ji7U"),N=G("LK+K"),L=G("q1tI"),$=G.n(L),H=G("m+aA"),e=G("Zm9Q"),R=G("Kwbf"),u=G("c+Xe"),f=G("bdgK"),l="rc-observer-key",s=function(i){Object(V.a)(r,i);var o=Object(N.a)(r);function r(){var a;return Object(z.a)(this,r),a=o.apply(this,arguments),a.resizeObserver=null,a.childNode=null,a.currentElement=null,a.state={width:0,height:0,offsetHeight:0,offsetWidth:0},a.onResize=function(n){var t=a.props.onResize,E=n[0].target,b=E.getBoundingClientRect(),_=b.width,B=b.height,x=E.offsetWidth,h=E.offsetHeight,d=Math.floor(_),A=Math.floor(B);if(a.state.width!==d||a.state.height!==A||a.state.offsetWidth!==x||a.state.offsetHeight!==h){var c={width:d,height:A,offsetWidth:x,offsetHeight:h};a.setState(c),t&&Promise.resolve().then(function(){t(Object(Ae.a)(Object(Ae.a)({},c),{},{offsetWidth:x,offsetHeight:h}))})}},a.setChildNode=function(n){a.childNode=n},a}return Object(U.a)(r,[{key:"componentDidMount",value:function(){this.onComponentUpdated()}},{key:"componentDidUpdate",value:function(){this.onComponentUpdated()}},{key:"componentWillUnmount",value:function(){this.destroyObserver()}},{key:"onComponentUpdated",value:function(){var n=this.props.disabled;if(n){this.destroyObserver();return}var t=Object(H.a)(this.childNode||this),E=t!==this.currentElement;E&&(this.destroyObserver(),this.currentElement=t),!this.resizeObserver&&t&&(this.resizeObserver=new f.default(this.onResize),this.resizeObserver.observe(t))}},{key:"destroyObserver",value:function(){this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=null)}},{key:"render",value:function(){var n=this.props.children,t=Object(e.a)(n);if(t.length>1)Object(R.a)(!1,"Find more than one child node with `children` in ResizeObserver. Will only observe first one.");else if(t.length===0)return Object(R.a)(!1,"`children` of ResizeObserver is empty. Nothing is in observe."),null;var E=t[0];if(L.isValidElement(E)&&Object(u.c)(E)){var b=E.ref;t[0]=L.cloneElement(E,{ref:Object(u.a)(b,this.setChildNode)})}return t.length===1?t[0]:t.map(function(_,B){return!L.isValidElement(_)||"key"in _&&_.key!==null?_:L.cloneElement(_,{key:"".concat(l,"-").concat(B)})})}}]),r}(L.Component);s.displayName="ResizeObserver",Be.a=s},t9D7:function(wt,Be,G){"use strict";G.d(Be,"b",function(){return $}),G.d(Be,"g",function(){return e}),G.d(Be,"d",function(){return R}),G.d(Be,"e",function(){return u}),G.d(Be,"a",function(){return f}),G.d(Be,"f",function(){return i}),G.d(Be,"c",function(){return o});var Ae=G("Vhoy"),z=G("MI8n"),U=G("pmY6"),V=G("Cg/j"),N=G("ic2d"),L=G("nEHx");const $=Object(V.c)("themeService");var H;(function(r){function a(n){return n&&typeof n=="object"&&typeof n.id=="string"}r.isThemeColor=a})(H||(H={}));function e(r){return{id:r}}var R;(function(r){function a(B){return B&&typeof B=="object"&&typeof B.id=="string"&&(typeof B.color=="undefined"||H.isThemeColor(B.color))}r.isThemeIcon=a;const n=new RegExp(`^\\$\\((${Ae.a.iconNameExpression}(?:${Ae.a.iconModifierExpression})?)\\)$`);function t(B){const x=n.exec(B);if(!x)return;let[,h]=x;return{id:h}}r.fromString=t;function E(B,x){let h=B.id;const d=h.lastIndexOf("~");return d!==-1&&(h=h.substring(0,d)),x&&(h=`${h}~${x}`),{id:h}}r.modify=E;function b(B,x){var h,d;return B.id===x.id&&((h=B.color)===null||h===void 0?void 0:h.id)===((d=x.color)===null||d===void 0?void 0:d.id)}r.isEqual=b;function _(B,x){return{id:B.id,color:x?e(x):void 0}}r.asThemeIcon=_,r.asClassNameArray=Ae.a.asClassNameArray,r.asClassName=Ae.a.asClassName,r.asCSSSelector=Ae.a.asCSSSelector})(R||(R={}));function u(r){switch(r){case L.a.DARK:return"vs-dark";case L.a.HIGH_CONTRAST:return"hc-black";default:return"vs"}}const f={ThemingContribution:"base.contributions.theming"};class l{constructor(){this.themingParticipants=[],this.themingParticipants=[],this.onThemingParticipantAddedEmitter=new z.b}onColorThemeChange(r){return this.themingParticipants.push(r),this.onThemingParticipantAddedEmitter.fire(r),Object(U.i)(()=>{const a=this.themingParticipants.indexOf(r);this.themingParticipants.splice(a,1)})}getThemingParticipants(){return this.themingParticipants}}let s=new l;N.a.add(f.ThemingContribution,s);function i(r){return s.onColorThemeChange(r)}class o extends U.a{constructor(r){super();this.themeService=r,this.theme=r.getColorTheme(),this._register(this.themeService.onDidColorThemeChange(a=>this.onThemeChange(a)))}onThemeChange(r){this.theme=r,this.updateStyles()}updateStyles(){}}},ulZh:function(wt,Be,G){typeof window!="undefined"&&function(z,U){wt.exports=U()}(this,function(){return function(Ae){var z={};function U(V){if(z[V])return z[V].exports;var N=z[V]={i:V,l:!1,exports:{}};return Ae[V].call(N.exports,N,N.exports,U),N.l=!0,N.exports}return U.m=Ae,U.c=z,U.d=function(V,N,L){U.o(V,N)||Object.defineProperty(V,N,{enumerable:!0,get:L})},U.r=function(V){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(V,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(V,"__esModule",{value:!0})},U.t=function(V,N){if(N&1&&(V=U(V)),N&8)return V;if(N&4&&typeof V=="object"&&V&&V.__esModule)return V;var L=Object.create(null);if(U.r(L),Object.defineProperty(L,"default",{enumerable:!0,value:V}),N&2&&typeof V!="string")for(var $ in V)U.d(L,$,function(H){return V[H]}.bind(null,$));return L},U.n=function(V){var N=V&&V.__esModule?function(){return V.default}:function(){return V};return U.d(N,"a",N),N},U.o=function(V,N){return Object.prototype.hasOwnProperty.call(V,N)},U.p="/dist/",U(U.s="./src/hls.ts")}({"./node_modules/eventemitter3/index.js":function(Ae,z,U){"use strict";var V=Object.prototype.hasOwnProperty,N="~";function L(){}Object.create&&(L.prototype=Object.create(null),new L().__proto__||(N=!1));function $(u,f,l){this.fn=u,this.context=f,this.once=l||!1}function H(u,f,l,s,i){if(typeof l!="function")throw new TypeError("The listener must be a function");var o=new $(l,s||u,i),r=N?N+f:f;return u._events[r]?u._events[r].fn?u._events[r]=[u._events[r],o]:u._events[r].push(o):(u._events[r]=o,u._eventsCount++),u}function e(u,f){--u._eventsCount===0?u._events=new L:delete u._events[f]}function R(){this._events=new L,this._eventsCount=0}R.prototype.eventNames=function(){var f=[],l,s;if(this._eventsCount===0)return f;for(s in l=this._events)V.call(l,s)&&f.push(N?s.slice(1):s);return Object.getOwnPropertySymbols?f.concat(Object.getOwnPropertySymbols(l)):f},R.prototype.listeners=function(f){var l=N?N+f:f,s=this._events[l];if(!s)return[];if(s.fn)return[s.fn];for(var i=0,o=s.length,r=new Array(o);i<o;i++)r[i]=s[i].fn;return r},R.prototype.listenerCount=function(f){var l=N?N+f:f,s=this._events[l];return s?s.fn?1:s.length:0},R.prototype.emit=function(f,l,s,i,o,r){var a=N?N+f:f;if(!this._events[a])return!1;var n=this._events[a],t=arguments.length,E,b;if(n.fn){n.once&&this.removeListener(f,n.fn,void 0,!0);switch(t){case 1:return n.fn.call(n.context),!0;case 2:return n.fn.call(n.context,l),!0;case 3:return n.fn.call(n.context,l,s),!0;case 4:return n.fn.call(n.context,l,s,i),!0;case 5:return n.fn.call(n.context,l,s,i,o),!0;case 6:return n.fn.call(n.context,l,s,i,o,r),!0}for(b=1,E=new Array(t-1);b<t;b++)E[b-1]=arguments[b];n.fn.apply(n.context,E)}else{var _=n.length,B;for(b=0;b<_;b++){n[b].once&&this.removeListener(f,n[b].fn,void 0,!0);switch(t){case 1:n[b].fn.call(n[b].context);break;case 2:n[b].fn.call(n[b].context,l);break;case 3:n[b].fn.call(n[b].context,l,s);break;case 4:n[b].fn.call(n[b].context,l,s,i);break;default:if(!E)for(B=1,E=new Array(t-1);B<t;B++)E[B-1]=arguments[B];n[b].fn.apply(n[b].context,E)}}}return!0},R.prototype.on=function(f,l,s){return H(this,f,l,s,!1)},R.prototype.once=function(f,l,s){return H(this,f,l,s,!0)},R.prototype.removeListener=function(f,l,s,i){var o=N?N+f:f;if(!this._events[o])return this;if(!l)return e(this,o),this;var r=this._events[o];if(r.fn)r.fn===l&&(!i||r.once)&&(!s||r.context===s)&&e(this,o);else{for(var a=0,n=[],t=r.length;a<t;a++)(r[a].fn!==l||i&&!r[a].once||s&&r[a].context!==s)&&n.push(r[a]);n.length?this._events[o]=n.length===1?n[0]:n:e(this,o)}return this},R.prototype.removeAllListeners=function(f){var l;return f?(l=N?N+f:f,this._events[l]&&e(this,l)):(this._events=new L,this._eventsCount=0),this},R.prototype.off=R.prototype.removeListener,R.prototype.addListener=R.prototype.on,R.prefixed=N,R.EventEmitter=R,Ae.exports=R},"./node_modules/url-toolkit/src/url-toolkit.js":function(Ae,z,U){(function(V){var N=/^((?:[a-zA-Z0-9+\-.]+:)?)(\/\/[^\/?#]*)?((?:[^\/?#]*\/)*[^;?#]*)?(;[^?#]*)?(\?[^#]*)?(#[^]*)?$/,L=/^([^\/?#]*)([^]*)$/,$=/(?:\/|^)\.(?=\/)/g,H=/(?:\/|^)\.\.\/(?!\.\.\/)[^\/]*(?=\/)/g,e={buildAbsoluteURL:function(R,u,f){if(f=f||{},R=R.trim(),u=u.trim(),!u){if(!f.alwaysNormalize)return R;var l=e.parseURL(R);if(!l)throw new Error("Error trying to parse base URL.");return l.path=e.normalizePath(l.path),e.buildURLFromParts(l)}var s=e.parseURL(u);if(!s)throw new Error("Error trying to parse relative URL.");if(s.scheme)return f.alwaysNormalize?(s.path=e.normalizePath(s.path),e.buildURLFromParts(s)):u;var i=e.parseURL(R);if(!i)throw new Error("Error trying to parse base URL.");if(!i.netLoc&&i.path&&i.path[0]!=="/"){var o=L.exec(i.path);i.netLoc=o[1],i.path=o[2]}i.netLoc&&!i.path&&(i.path="/");var r={scheme:i.scheme,netLoc:s.netLoc,path:null,params:s.params,query:s.query,fragment:s.fragment};if(!s.netLoc&&(r.netLoc=i.netLoc,s.path[0]!=="/"))if(!s.path)r.path=i.path,s.params||(r.params=i.params,s.query||(r.query=i.query));else{var a=i.path,n=a.substring(0,a.lastIndexOf("/")+1)+s.path;r.path=e.normalizePath(n)}return r.path===null&&(r.path=f.alwaysNormalize?e.normalizePath(s.path):s.path),e.buildURLFromParts(r)},parseURL:function(R){var u=N.exec(R);return u?{scheme:u[1]||"",netLoc:u[2]||"",path:u[3]||"",params:u[4]||"",query:u[5]||"",fragment:u[6]||""}:null},normalizePath:function(R){for(R=R.split("").reverse().join("").replace($,"");R.length!==(R=R.replace(H,"")).length;);return R.split("").reverse().join("")},buildURLFromParts:function(R){return R.scheme+R.netLoc+R.path+R.params+R.query+R.fragment}};Ae.exports=e})(this)},"./node_modules/webworkify-webpack/index.js":function(Ae,z,U){function V(f){var l={};function s(o){if(l[o])return l[o].exports;var r=l[o]={i:o,l:!1,exports:{}};return f[o].call(r.exports,r,r.exports,s),r.l=!0,r.exports}s.m=f,s.c=l,s.i=function(o){return o},s.d=function(o,r,a){s.o(o,r)||Object.defineProperty(o,r,{configurable:!1,enumerable:!0,get:a})},s.r=function(o){Object.defineProperty(o,"__esModule",{value:!0})},s.n=function(o){var r=o&&o.__esModule?function(){return o.default}:function(){return o};return s.d(r,"a",r),r},s.o=function(o,r){return Object.prototype.hasOwnProperty.call(o,r)},s.p="/",s.oe=function(o){throw console.error(o),o};var i=s(s.s=ENTRY_MODULE);return i.default||i}var N="[\\.|\\-|\\+|\\w|/|@]+",L="\\(\\s*(/\\*.*?\\*/)?\\s*.*?("+N+").*?\\)";function $(f){return(f+"").replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}function H(f){return!isNaN(1*f)}function e(f,l,s){var i={};i[s]=[];var o=l.toString(),r=o.match(/^function\s?\w*\(\w+,\s*\w+,\s*(\w+)\)/);if(!r)return i;for(var a=r[1],n=new RegExp("(\\\\n|\\W)"+$(a)+L,"g"),t;t=n.exec(o);){if(t[3]==="dll-reference")continue;i[s].push(t[3])}for(n=new RegExp("\\("+$(a)+'\\("(dll-reference\\s('+N+'))"\\)\\)'+L,"g");t=n.exec(o);)f[t[2]]||(i[s].push(t[1]),f[t[2]]=U(t[1]).m),i[t[2]]=i[t[2]]||[],i[t[2]].push(t[4]);for(var E=Object.keys(i),b=0;b<E.length;b++)for(var _=0;_<i[E[b]].length;_++)H(i[E[b]][_])&&(i[E[b]][_]=1*i[E[b]][_]);return i}function R(f){var l=Object.keys(f);return l.reduce(function(s,i){return s||f[i].length>0},!1)}function u(f,l){for(var s={main:[l]},i={main:[]},o={main:{}};R(s);)for(var r=Object.keys(s),a=0;a<r.length;a++){var n=r[a],t=s[n],E=t.pop();if(o[n]=o[n]||{},o[n][E]||!f[n][E])continue;o[n][E]=!0,i[n]=i[n]||[],i[n].push(E);for(var b=e(f,f[n][E],n),_=Object.keys(b),B=0;B<_.length;B++)s[_[B]]=s[_[B]]||[],s[_[B]]=s[_[B]].concat(b[_[B]])}return i}Ae.exports=function(f,l){l=l||{};var s={main:U.m},i=l.all?{main:Object.keys(s.main)}:u(s,f),o="";Object.keys(i).filter(function(E){return E!=="main"}).forEach(function(E){for(var b=0;i[E][b];)b++;i[E].push(b),s[E][b]="(function(module, exports, __webpack_require__) { module.exports = __webpack_require__; })",o=o+"var "+E+" = ("+V.toString().replace("ENTRY_MODULE",JSON.stringify(b))+")({"+i[E].map(function(_){return""+JSON.stringify(_)+": "+s[E][_].toString()}).join(",")+`});
|
|
`}),o=o+"new (("+V.toString().replace("ENTRY_MODULE",JSON.stringify(f))+")({"+i.main.map(function(E){return""+JSON.stringify(E)+": "+s.main[E].toString()}).join(",")+"}))(self);";var r=new window.Blob([o],{type:"text/javascript"});if(l.bare)return r;var a=window.URL||window.webkitURL||window.mozURL||window.msURL,n=a.createObjectURL(r),t=new window.Worker(n);return t.objectURL=n,t}},"./src/config.ts":function(Ae,z,U){"use strict";U.r(z),U.d(z,"hlsDefaultConfig",function(){return B}),U.d(z,"mergeConfig",function(){return h}),U.d(z,"enableStreamingMode",function(){return d});var V=U("./src/controller/abr-controller.ts"),N=U("./src/controller/audio-stream-controller.ts"),L=U("./src/controller/audio-track-controller.ts"),$=U("./src/controller/subtitle-stream-controller.ts"),H=U("./src/controller/subtitle-track-controller.ts"),e=U("./src/controller/buffer-controller.ts"),R=U("./src/controller/timeline-controller.ts"),u=U("./src/controller/cap-level-controller.ts"),f=U("./src/controller/fps-controller.ts"),l=U("./src/controller/eme-controller.ts"),s=U("./src/controller/cmcd-controller.ts"),i=U("./src/utils/xhr-loader.ts"),o=U("./src/utils/fetch-loader.ts"),r=U("./src/utils/cues.ts"),a=U("./src/utils/mediakeys-helper.ts"),n=U("./src/utils/logger.ts");function t(){return t=Object.assign||function(A){for(var c=1;c<arguments.length;c++){var w=arguments[c];for(var m in w)Object.prototype.hasOwnProperty.call(w,m)&&(A[m]=w[m])}return A},t.apply(this,arguments)}function E(A,c){var w=Object.keys(A);if(Object.getOwnPropertySymbols){var m=Object.getOwnPropertySymbols(A);c&&(m=m.filter(function(g){return Object.getOwnPropertyDescriptor(A,g).enumerable})),w.push.apply(w,m)}return w}function b(A){for(var c=1;c<arguments.length;c++){var w=arguments[c]!=null?arguments[c]:{};c%2?E(Object(w),!0).forEach(function(m){_(A,m,w[m])}):Object.getOwnPropertyDescriptors?Object.defineProperties(A,Object.getOwnPropertyDescriptors(w)):E(Object(w)).forEach(function(m){Object.defineProperty(A,m,Object.getOwnPropertyDescriptor(w,m))})}return A}function _(A,c,w){return c in A?Object.defineProperty(A,c,{value:w,enumerable:!0,configurable:!0,writable:!0}):A[c]=w,A}var B=b(b({autoStartLoad:!0,startPosition:-1,defaultAudioCodec:void 0,debug:!1,capLevelOnFPSDrop:!1,capLevelToPlayerSize:!1,initialLiveManifestSize:1,maxBufferLength:30,backBufferLength:Infinity,maxBufferSize:60*1e3*1e3,maxBufferHole:.1,highBufferWatchdogPeriod:2,nudgeOffset:.1,nudgeMaxRetry:3,maxFragLookUpTolerance:.25,liveSyncDurationCount:3,liveMaxLatencyDurationCount:Infinity,liveSyncDuration:void 0,liveMaxLatencyDuration:void 0,maxLiveSyncPlaybackRate:1,liveDurationInfinity:!1,liveBackBufferLength:null,maxMaxBufferLength:600,enableWorker:!0,enableSoftwareAES:!0,manifestLoadingTimeOut:1e4,manifestLoadingMaxRetry:1,manifestLoadingRetryDelay:1e3,manifestLoadingMaxRetryTimeout:64e3,startLevel:void 0,levelLoadingTimeOut:1e4,levelLoadingMaxRetry:4,levelLoadingRetryDelay:1e3,levelLoadingMaxRetryTimeout:64e3,fragLoadingTimeOut:2e4,fragLoadingMaxRetry:6,fragLoadingRetryDelay:1e3,fragLoadingMaxRetryTimeout:64e3,startFragPrefetch:!1,fpsDroppedMonitoringPeriod:5e3,fpsDroppedMonitoringThreshold:.2,appendErrorMaxRetry:3,loader:i.default,fLoader:void 0,pLoader:void 0,xhrSetup:void 0,licenseXhrSetup:void 0,licenseResponseCallback:void 0,abrController:V.default,bufferController:e.default,capLevelController:u.default,fpsController:f.default,stretchShortVideoTrack:!1,maxAudioFramesDrift:1,forceKeyFrameOnDiscontinuity:!0,abrEwmaFastLive:3,abrEwmaSlowLive:9,abrEwmaFastVoD:3,abrEwmaSlowVoD:9,abrEwmaDefaultEstimate:5e5,abrBandWidthFactor:.95,abrBandWidthUpFactor:.7,abrMaxWithRealBitrate:!1,maxStarvationDelay:4,maxLoadingDelay:4,minAutoBitrate:0,emeEnabled:!1,widevineLicenseUrl:void 0,drmSystemOptions:{},requestMediaKeySystemAccessFunc:a.requestMediaKeySystemAccess,testBandwidth:!0,progressive:!1,lowLatencyMode:!0,cmcd:void 0},x()),{},{subtitleStreamController:$.SubtitleStreamController,subtitleTrackController:H.default,timelineController:R.TimelineController,audioStreamController:N.default,audioTrackController:L.default,emeController:l.default,cmcdController:s.default});function x(){return{cueHandler:r.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 h(A,c){if((c.liveSyncDurationCount||c.liveMaxLatencyDurationCount)&&(c.liveSyncDuration||c.liveMaxLatencyDuration))throw new Error("Illegal hls.js config: don't mix up liveSyncDurationCount/liveMaxLatencyDurationCount and liveSyncDuration/liveMaxLatencyDuration");if(c.liveMaxLatencyDurationCount!==void 0&&(c.liveSyncDurationCount===void 0||c.liveMaxLatencyDurationCount<=c.liveSyncDurationCount))throw new Error('Illegal hls.js config: "liveMaxLatencyDurationCount" must be greater than "liveSyncDurationCount"');if(c.liveMaxLatencyDuration!==void 0&&(c.liveSyncDuration===void 0||c.liveMaxLatencyDuration<=c.liveSyncDuration))throw new Error('Illegal hls.js config: "liveMaxLatencyDuration" must be greater than "liveSyncDuration"');return t({},A,c)}function d(A){var c=A.loader;if(c!==o.default&&c!==i.default)n.logger.log("[config]: Custom loader detected, cannot enable progressive streaming"),A.progressive=!1;else{var w=Object(o.fetchSupported)();w&&(A.loader=o.default,A.progressive=!0,A.enableSoftwareAES=!0,n.logger.log("[config]: Progressive streaming enabled, using FetchLoader"))}}},"./src/controller/abr-controller.ts":function(Ae,z,U){"use strict";U.r(z);var V=U("./src/polyfills/number.ts"),N=U("./src/utils/ewma-bandwidth-estimator.ts"),L=U("./src/events.ts"),$=U("./src/utils/buffer-helper.ts"),H=U("./src/errors.ts"),e=U("./src/types/loader.ts"),R=U("./src/utils/logger.ts");function u(s,i){for(var o=0;o<i.length;o++){var r=i[o];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(s,r.key,r)}}function f(s,i,o){return i&&u(s.prototype,i),o&&u(s,o),s}var l=function(){function s(o){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=o;var r=o.config;this.bwEstimator=new N.default(r.abrEwmaSlowVoD,r.abrEwmaFastVoD,r.abrEwmaDefaultEstimate),this.registerListeners()}var i=s.prototype;return i.registerListeners=function(){var r=this.hls;r.on(L.Events.FRAG_LOADING,this.onFragLoading,this),r.on(L.Events.FRAG_LOADED,this.onFragLoaded,this),r.on(L.Events.FRAG_BUFFERED,this.onFragBuffered,this),r.on(L.Events.LEVEL_LOADED,this.onLevelLoaded,this),r.on(L.Events.ERROR,this.onError,this)},i.unregisterListeners=function(){var r=this.hls;r.off(L.Events.FRAG_LOADING,this.onFragLoading,this),r.off(L.Events.FRAG_LOADED,this.onFragLoaded,this),r.off(L.Events.FRAG_BUFFERED,this.onFragBuffered,this),r.off(L.Events.LEVEL_LOADED,this.onLevelLoaded,this),r.off(L.Events.ERROR,this.onError,this)},i.destroy=function(){this.unregisterListeners(),this.clearTimer(),this.hls=this.onCheck=null,this.fragCurrent=this.partCurrent=null},i.onFragLoading=function(r,a){var n=a.frag;if(n.type===e.PlaylistLevelType.MAIN&&!this.timer){var t;this.fragCurrent=n,this.partCurrent=(t=a.part)!=null?t:null,this.timer=self.setInterval(this.onCheck,100)}},i.onLevelLoaded=function(r,a){var n=this.hls.config;a.details.live?this.bwEstimator.update(n.abrEwmaSlowLive,n.abrEwmaFastLive):this.bwEstimator.update(n.abrEwmaSlowVoD,n.abrEwmaFastVoD)},i._abandonRulesCheck=function(){var r=this.fragCurrent,a=this.partCurrent,n=this.hls,t=n.autoLevelEnabled,E=n.config,b=n.media;if(!r||!b)return;var _=a?a.stats:r.stats,B=a?a.duration:r.duration;if(_.aborted){R.logger.warn("frag loader destroy or aborted, disarm abandonRules"),this.clearTimer(),this._nextAutoLevel=-1;return}if(!t||b.paused||!b.playbackRate||!b.readyState)return;var x=performance.now()-_.loading.start,h=Math.abs(b.playbackRate);if(x<=500*B/h)return;var d=n.levels,A=n.minAutoLevel,c=d[r.level],w=_.total||Math.max(_.loaded,Math.round(B*c.maxBitrate/8)),m=Math.max(1,_.bwEstimate?_.bwEstimate/8:_.loaded*1e3/x),g=(w-_.loaded)/m,F=b.currentTime,k=($.BufferHelper.bufferInfo(b,F,E.maxBufferHole).end-F)/h;if(k>=2*B/h||g<=k)return;var S=Number.POSITIVE_INFINITY,Q;for(Q=r.level-1;Q>A;Q--){var X=d[Q].maxBitrate;if(S=B*X/(8*.8*m),S<k)break}if(S>=g)return;var P=this.bwEstimator.getEstimate();R.logger.warn("Fragment "+r.sn+(a?" part "+a.index:"")+" of level "+r.level+" is loading too slowly and will cause an underbuffer; aborting and switching to level "+Q+`
|
|
Current BW estimate: `+(Object(V.isFiniteNumber)(P)?(P/1024).toFixed(3):"Unknown")+` Kb/s
|
|
Estimated load time for current fragment: `+g.toFixed(3)+` s
|
|
Estimated load time for the next fragment: `+S.toFixed(3)+` s
|
|
Time to underbuffer: `+k.toFixed(3)+" s"),n.nextLoadLevel=Q,this.bwEstimator.sample(x,_.loaded),this.clearTimer(),r.loader&&(this.fragCurrent=this.partCurrent=null,r.loader.abort()),n.trigger(L.Events.FRAG_LOAD_EMERGENCY_ABORTED,{frag:r,part:a,stats:_})},i.onFragLoaded=function(r,a){var n=a.frag,t=a.part;if(n.type===e.PlaylistLevelType.MAIN&&Object(V.isFiniteNumber)(n.sn)){var E=t?t.stats:n.stats,b=t?t.duration:n.duration;if(this.clearTimer(),this.lastLoadedFragLevel=n.level,this._nextAutoLevel=-1,this.hls.config.abrMaxWithRealBitrate){var _=this.hls.levels[n.level],B=(_.loaded?_.loaded.bytes:0)+E.loaded,x=(_.loaded?_.loaded.duration:0)+b;_.loaded={bytes:B,duration:x},_.realBitrate=Math.round(8*B/x)}if(n.bitrateTest){var h={stats:E,frag:n,part:t,id:n.type};this.onFragBuffered(L.Events.FRAG_BUFFERED,h),n.bitrateTest=!1}}},i.onFragBuffered=function(r,a){var n=a.frag,t=a.part,E=t?t.stats:n.stats;if(E.aborted)return;if(n.type!==e.PlaylistLevelType.MAIN||n.sn==="initSegment")return;var b=E.parsing.end-E.loading.start;this.bwEstimator.sample(b,E.loaded),E.bwEstimate=this.bwEstimator.getEstimate(),n.bitrateTest?this.bitrateTestDelay=b/1e3:this.bitrateTestDelay=0},i.onError=function(r,a){switch(a.details){case H.ErrorDetails.FRAG_LOAD_ERROR:case H.ErrorDetails.FRAG_LOAD_TIMEOUT:this.clearTimer();break;default:break}},i.clearTimer=function(){self.clearInterval(this.timer),this.timer=void 0},i.getNextABRAutoLevel=function(){var r=this.fragCurrent,a=this.partCurrent,n=this.hls,t=n.maxAutoLevel,E=n.config,b=n.minAutoLevel,_=n.media,B=a?a.duration:r?r.duration:0,x=_?_.currentTime:0,h=_&&_.playbackRate!==0?Math.abs(_.playbackRate):1,d=this.bwEstimator?this.bwEstimator.getEstimate():E.abrEwmaDefaultEstimate,A=($.BufferHelper.bufferInfo(_,x,E.maxBufferHole).end-x)/h,c=this.findBestLevel(d,b,t,A,E.abrBandWidthFactor,E.abrBandWidthUpFactor);if(c>=0)return c;R.logger.trace((A?"rebuffering expected":"buffer is empty")+", finding optimal quality level");var w=B?Math.min(B,E.maxStarvationDelay):E.maxStarvationDelay,m=E.abrBandWidthFactor,g=E.abrBandWidthUpFactor;if(!A){var F=this.bitrateTestDelay;if(F){var k=B?Math.min(B,E.maxLoadingDelay):E.maxLoadingDelay;w=k-F,R.logger.trace("bitrate test took "+Math.round(1e3*F)+"ms, set first fragment max fetchDuration to "+Math.round(1e3*w)+" ms"),m=g=1}}return c=this.findBestLevel(d,b,t,A+w,m,g),Math.max(c,0)},i.findBestLevel=function(r,a,n,t,E,b){for(var _,B=this.fragCurrent,x=this.partCurrent,h=this.lastLoadedFragLevel,d=this.hls.levels,A=d[h],c=!!(A!=null&&(_=A.details)!==null&&_!==void 0&&_.live),w=A==null?void 0:A.codecSet,m=x?x.duration:B?B.duration:0,g=n;g>=a;g--){var F=d[g];if(!F||w&&F.codecSet!==w)continue;var k=F.details,S=(x?k==null?void 0:k.partTarget:k==null?void 0:k.averagetargetduration)||m,Q=void 0;g<=h?Q=E*r:Q=b*r;var X=d[g].maxBitrate,P=X*S/Q;if(R.logger.trace("level/adjustedbw/bitrate/avgDuration/maxFetchDuration/fetchDuration: "+g+"/"+Math.round(Q)+"/"+X+"/"+S+"/"+t+"/"+P),Q>X&&(!P||c&&!this.bitrateTestDelay||P<t))return g}return-1},f(s,[{key:"nextAutoLevel",get:function(){var r=this._nextAutoLevel,a=this.bwEstimator;if(r!==-1&&(!a||!a.canEstimate()))return r;var n=this.getNextABRAutoLevel();return r!==-1&&(n=Math.min(r,n)),n},set:function(r){this._nextAutoLevel=r}}]),s}();z.default=l},"./src/controller/audio-stream-controller.ts":function(Ae,z,U){"use strict";U.r(z);var V=U("./src/polyfills/number.ts"),N=U("./src/controller/base-stream-controller.ts"),L=U("./src/events.ts"),$=U("./src/utils/buffer-helper.ts"),H=U("./src/controller/fragment-tracker.ts"),e=U("./src/types/level.ts"),R=U("./src/types/loader.ts"),u=U("./src/loader/fragment.ts"),f=U("./src/demux/chunk-cache.ts"),l=U("./src/demux/transmuxer-interface.ts"),s=U("./src/types/transmuxer.ts"),i=U("./src/controller/fragment-finders.ts"),o=U("./src/utils/discontinuities.ts"),r=U("./src/errors.ts"),a=U("./src/utils/logger.ts");function n(){return n=Object.assign||function(B){for(var x=1;x<arguments.length;x++){var h=arguments[x];for(var d in h)Object.prototype.hasOwnProperty.call(h,d)&&(B[d]=h[d])}return B},n.apply(this,arguments)}function t(B,x){B.prototype=Object.create(x.prototype),B.prototype.constructor=B,E(B,x)}function E(B,x){return E=Object.setPrototypeOf||function(d,A){return d.__proto__=A,d},E(B,x)}var b=100,_=function(B){t(x,B);function x(d,A){var c;return c=B.call(this,d,A,"[audio-stream-controller]")||this,c.videoBuffer=null,c.videoTrackCC=-1,c.waitingVideoCC=-1,c.audioSwitch=!1,c.trackId=-1,c.waitingData=null,c.mainDetails=null,c.bufferFlushed=!1,c._registerListeners(),c}var h=x.prototype;return h.onHandlerDestroying=function(){this._unregisterListeners(),this.mainDetails=null},h._registerListeners=function(){var A=this.hls;A.on(L.Events.MEDIA_ATTACHED,this.onMediaAttached,this),A.on(L.Events.MEDIA_DETACHING,this.onMediaDetaching,this),A.on(L.Events.MANIFEST_LOADING,this.onManifestLoading,this),A.on(L.Events.LEVEL_LOADED,this.onLevelLoaded,this),A.on(L.Events.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),A.on(L.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),A.on(L.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),A.on(L.Events.ERROR,this.onError,this),A.on(L.Events.BUFFER_RESET,this.onBufferReset,this),A.on(L.Events.BUFFER_CREATED,this.onBufferCreated,this),A.on(L.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),A.on(L.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),A.on(L.Events.FRAG_BUFFERED,this.onFragBuffered,this)},h._unregisterListeners=function(){var A=this.hls;A.off(L.Events.MEDIA_ATTACHED,this.onMediaAttached,this),A.off(L.Events.MEDIA_DETACHING,this.onMediaDetaching,this),A.off(L.Events.MANIFEST_LOADING,this.onManifestLoading,this),A.off(L.Events.LEVEL_LOADED,this.onLevelLoaded,this),A.off(L.Events.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),A.off(L.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),A.off(L.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),A.off(L.Events.ERROR,this.onError,this),A.off(L.Events.BUFFER_RESET,this.onBufferReset,this),A.off(L.Events.BUFFER_CREATED,this.onBufferCreated,this),A.off(L.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),A.off(L.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),A.off(L.Events.FRAG_BUFFERED,this.onFragBuffered,this)},h.onInitPtsFound=function(A,c){var w=c.frag,m=c.id,g=c.initPTS;if(m==="main"){var F=w.cc;this.initPTS[w.cc]=g,this.log("InitPTS for cc: "+F+" found from main: "+g),this.videoTrackCC=F,this.state===N.State.WAITING_INIT_PTS&&this.tick()}},h.startLoad=function(A){if(!this.levels){this.startPosition=A,this.state=N.State.STOPPED;return}var c=this.lastCurrentTime;this.stopLoad(),this.setInterval(b),this.fragLoadError=0,c>0&&A===-1?(this.log("Override startPosition with lastCurrentTime @"+c.toFixed(3)),this.state=N.State.IDLE):(this.loadedmetadata=!1,this.state=N.State.WAITING_TRACK),this.nextLoadPosition=this.startPosition=this.lastCurrentTime=A,this.tick()},h.doTick=function(){switch(this.state){case N.State.IDLE:this.doTickIdle();break;case N.State.WAITING_TRACK:{var A,c=this.levels,w=this.trackId,m=c==null||((A=c[w])===null||A===void 0)?void 0:A.details;if(m){if(this.waitForCdnTuneIn(m))break;this.state=N.State.WAITING_INIT_PTS}break}case N.State.FRAG_LOADING_WAITING_RETRY:{var g,F=performance.now(),k=this.retryDate;(!k||F>=k||(g=this.media)!==null&&g!==void 0&&g.seeking)&&(this.log("RetryDate reached, switch back to IDLE state"),this.state=N.State.IDLE);break}case N.State.WAITING_INIT_PTS:{var S=this.waitingData;if(S){var Q=S.frag,X=S.part,P=S.cache,q=S.complete;if(this.initPTS[Q.cc]!==void 0){this.waitingData=null,this.waitingVideoCC=-1,this.state=N.State.FRAG_LOADING;var ie=P.flush(),be={frag:Q,part:X,payload:ie,networkDetails:null};this._handleFragmentLoadProgress(be),q&&B.prototype._handleFragmentLoadComplete.call(this,be)}else if(this.videoTrackCC!==this.waitingVideoCC)a.logger.log("Waiting fragment cc ("+Q.cc+") cancelled because video is at cc "+this.videoTrackCC),this.clearWaitingFragment();else{var me=this.getLoadPosition(),Me=$.BufferHelper.bufferInfo(this.mediaBuffer,me,this.config.maxBufferHole),Ne=Object(i.fragmentWithinToleranceTest)(Me.end,this.config.maxFragLookUpTolerance,Q);Ne<0&&(a.logger.log("Waiting fragment cc ("+Q.cc+") @ "+Q.start+" cancelled because another fragment at "+Me.end+" is needed"),this.clearWaitingFragment())}}else this.state=N.State.IDLE}}this.onTickEnd()},h.clearWaitingFragment=function(){var A=this.waitingData;A&&(this.fragmentTracker.removeFragment(A.frag),this.waitingData=null,this.waitingVideoCC=-1,this.state=N.State.IDLE)},h.onTickEnd=function(){var A=this.media;if(!A||!A.readyState)return;var c=this.mediaBuffer?this.mediaBuffer:A,w=c.buffered;!this.loadedmetadata&&w.length&&(this.loadedmetadata=!0),this.lastCurrentTime=A.currentTime},h.doTickIdle=function(){var A,c,w=this.hls,m=this.levels,g=this.media,F=this.trackId,k=w.config;if(!m||!m[F])return;if(!g&&(this.startFragRequested||!k.startFragPrefetch))return;var S=m[F],Q=S.details;if(!Q||Q.live&&this.levelLastLoaded!==F||this.waitForCdnTuneIn(Q)){this.state=N.State.WAITING_TRACK;return}this.bufferFlushed&&(this.bufferFlushed=!1,this.afterBufferFlushed(this.mediaBuffer?this.mediaBuffer:this.media,u.ElementaryStreamTypes.AUDIO,R.PlaylistLevelType.AUDIO));var X=this.getFwdBufferInfo(this.mediaBuffer?this.mediaBuffer:this.media,R.PlaylistLevelType.AUDIO);if(X===null)return;var P=X.len,q=this.getMaxBufferLength(),ie=this.audioSwitch;if(P>=q&&!ie)return;if(!ie&&this._streamEnded(X,Q)){w.trigger(L.Events.BUFFER_EOS,{type:"audio"}),this.state=N.State.ENDED;return}var be=Q.fragments,me=be[0].start,Me=X.end;if(ie){var Ne=this.getLoadPosition();Me=Ne,Q.PTSKnown&&Ne<me&&((X.end>me||X.nextStart)&&(this.log("Alt audio track ahead of main track, seek to start of alt audio track"),g.currentTime=me+.05))}var ke=this.getNextFragment(Me,Q);if(!ke){this.bufferFlushed=!0;return}((A=ke.decryptdata)===null||A===void 0?void 0:A.keyFormat)==="identity"&&!((c=ke.decryptdata)!==null&&c!==void 0&&c.key)?this.loadKey(ke,Q):this.loadFragment(ke,Q,Me)},h.getMaxBufferLength=function(){var A=B.prototype.getMaxBufferLength.call(this),c=this.getFwdBufferInfo(this.videoBuffer?this.videoBuffer:this.media,R.PlaylistLevelType.MAIN);return c===null?A:Math.max(A,c.len)},h.onMediaDetaching=function(){this.videoBuffer=null,B.prototype.onMediaDetaching.call(this)},h.onAudioTracksUpdated=function(A,c){var w=c.audioTracks;this.resetTransmuxer(),this.levels=w.map(function(m){return new e.Level(m)})},h.onAudioTrackSwitching=function(A,c){var w=!!c.url;this.trackId=c.id;var m=this.fragCurrent;m!=null&&m.loader&&m.loader.abort(),this.fragCurrent=null,this.clearWaitingFragment(),w?this.setInterval(b):this.resetTransmuxer(),w?(this.audioSwitch=!0,this.state=N.State.IDLE):this.state=N.State.STOPPED,this.tick()},h.onManifestLoading=function(){this.mainDetails=null,this.fragmentTracker.removeAllFragments(),this.startPosition=this.lastCurrentTime=0,this.bufferFlushed=!1},h.onLevelLoaded=function(A,c){this.mainDetails=c.details},h.onAudioTrackLoaded=function(A,c){var w,m=this.levels,g=c.details,F=c.id;if(!m){this.warn("Audio tracks were reset while loading level "+F);return}this.log("Track "+F+" loaded ["+g.startSN+","+g.endSN+"],duration:"+g.totalduration);var k=m[F],S=0;if(g.live||(w=k.details)!==null&&w!==void 0&&w.live){var Q=this.mainDetails;if(g.fragments[0]||(g.deltaUpdateFailed=!0),g.deltaUpdateFailed||!Q)return;!k.details&&g.hasProgramDateTime&&Q.hasProgramDateTime?(Object(o.alignMediaPlaylistByPDT)(g,Q),S=g.fragments[0].start):S=this.alignPlaylists(g,k.details)}k.details=g,this.levelLastLoaded=F,!this.startFragRequested&&(this.mainDetails||!g.live)&&this.setStartPosition(k.details,S),this.state===N.State.WAITING_TRACK&&!this.waitForCdnTuneIn(g)&&(this.state=N.State.IDLE),this.tick()},h._handleFragmentLoadProgress=function(A){var c,w=A.frag,m=A.part,g=A.payload,F=this.config,k=this.trackId,S=this.levels;if(!S){this.warn("Audio tracks were reset while fragment load was in progress. Fragment "+w.sn+" of level "+w.level+" will not be buffered");return}var Q=S[k];console.assert(Q,"Audio track is defined on fragment load progress");var X=Q.details;console.assert(X,"Audio track details are defined on fragment load progress");var P=F.defaultAudioCodec||Q.audioCodec||"mp4a.40.2",q=this.transmuxer;q||(q=this.transmuxer=new l.default(this.hls,R.PlaylistLevelType.AUDIO,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)));var ie=this.initPTS[w.cc],be=(c=w.initSegment)===null||c===void 0?void 0:c.data;if(ie!==void 0){var me=!1,Me=m?m.index:-1,Ne=Me!==-1,ke=new s.ChunkMetadata(w.level,w.sn,w.stats.chunkCount,g.byteLength,Me,Ne);q.push(g,be,P,"",w,m,X.totalduration,me,ke,ie)}else{a.logger.log("Unknown video PTS for cc "+w.cc+", waiting for video PTS before demuxing audio frag "+w.sn+" of ["+X.startSN+" ,"+X.endSN+"],track "+k);var Ke=this.waitingData=this.waitingData||{frag:w,part:m,cache:new f.default,complete:!1},Ye=Ke.cache;Ye.push(new Uint8Array(g)),this.waitingVideoCC=this.videoTrackCC,this.state=N.State.WAITING_INIT_PTS}},h._handleFragmentLoadComplete=function(A){if(this.waitingData){this.waitingData.complete=!0;return}B.prototype._handleFragmentLoadComplete.call(this,A)},h.onBufferReset=function(){this.mediaBuffer=this.videoBuffer=null,this.loadedmetadata=!1},h.onBufferCreated=function(A,c){var w=c.tracks.audio;w&&(this.mediaBuffer=w.buffer),c.tracks.video&&(this.videoBuffer=c.tracks.video.buffer)},h.onFragBuffered=function(A,c){var w=c.frag,m=c.part;if(w.type!==R.PlaylistLevelType.AUDIO)return;if(this.fragContextChanged(w)){this.warn("Fragment "+w.sn+(m?" p: "+m.index:"")+" of level "+w.level+" finished buffering, but was aborted. state: "+this.state+", audioSwitch: "+this.audioSwitch);return}w.sn!=="initSegment"&&(this.fragPrevious=w,this.audioSwitch&&(this.audioSwitch=!1,this.hls.trigger(L.Events.AUDIO_TRACK_SWITCHED,{id:this.trackId}))),this.fragBufferedComplete(w,m)},h.onError=function(A,c){switch(c.details){case r.ErrorDetails.FRAG_LOAD_ERROR:case r.ErrorDetails.FRAG_LOAD_TIMEOUT:case r.ErrorDetails.KEY_LOAD_ERROR:case r.ErrorDetails.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(R.PlaylistLevelType.AUDIO,c);break;case r.ErrorDetails.AUDIO_TRACK_LOAD_ERROR:case r.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:this.state!==N.State.ERROR&&this.state!==N.State.STOPPED&&(this.state=c.fatal?N.State.ERROR:N.State.IDLE,this.warn(c.details+" while loading frag, switching to "+this.state+" state"));break;case r.ErrorDetails.BUFFER_FULL_ERROR:if(c.parent==="audio"&&(this.state===N.State.PARSING||this.state===N.State.PARSED)){var w=!0,m=this.getFwdBufferInfo(this.mediaBuffer,R.PlaylistLevelType.AUDIO);m&&m.len>.5&&(w=!this.reduceMaxBufferLength(m.len)),w&&(this.warn("Buffer full error also media.currentTime is not buffered, flush audio buffer"),this.fragCurrent=null,B.prototype.flushMainBuffer.call(this,0,Number.POSITIVE_INFINITY,"audio")),this.resetLoadingState()}break;default:break}},h.onBufferFlushed=function(A,c){var w=c.type;w===u.ElementaryStreamTypes.AUDIO&&(this.bufferFlushed=!0)},h._handleTransmuxComplete=function(A){var c,w="audio",m=this.hls,g=A.remuxResult,F=A.chunkMeta,k=this.getCurrentContext(F);if(!k){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 S=k.frag,Q=k.part,X=g.audio,P=g.text,q=g.id3,ie=g.initSegment;if(this.fragContextChanged(S))return;if(this.state=N.State.PARSING,this.audioSwitch&&X&&this.completeAudioSwitch(),ie!=null&&ie.tracks&&(this._bufferInitSegment(ie.tracks,S,F),m.trigger(L.Events.FRAG_PARSING_INIT_SEGMENT,{frag:S,id:w,tracks:ie.tracks})),X){var be=X.startPTS,me=X.endPTS,Me=X.startDTS,Ne=X.endDTS;Q&&(Q.elementaryStreams[u.ElementaryStreamTypes.AUDIO]={startPTS:be,endPTS:me,startDTS:Me,endDTS:Ne}),S.setElementaryStreamInfo(u.ElementaryStreamTypes.AUDIO,be,me,Me,Ne),this.bufferFragmentData(X,S,Q,F)}if(q!=null&&(c=q.samples)!==null&&c!==void 0&&c.length){var ke=n({frag:S,id:w},q);m.trigger(L.Events.FRAG_PARSING_METADATA,ke)}if(P){var Ke=n({frag:S,id:w},P);m.trigger(L.Events.FRAG_PARSING_USERDATA,Ke)}},h._bufferInitSegment=function(A,c,w){if(this.state!==N.State.PARSING)return;A.video&&delete A.video;var m=A.audio;if(!m)return;m.levelCodec=m.codec,m.id="audio",this.log("Init audio buffer, container:"+m.container+", codecs[parsed]=["+m.codec+"]"),this.hls.trigger(L.Events.BUFFER_CODECS,A);var g=m.initSegment;if(g!=null&&g.byteLength){var F={type:"audio",frag:c,part:null,chunkMeta:w,parent:c.type,data:g};this.hls.trigger(L.Events.BUFFER_APPENDING,F)}this.tick()},h.loadFragment=function(A,c,w){var m=this.fragmentTracker.getState(A);this.fragCurrent=A,(this.audioSwitch||m===H.FragmentState.NOT_LOADED||m===H.FragmentState.PARTIAL)&&(A.sn==="initSegment"?this._loadInitSegment(A):c.live&&!Object(V.isFiniteNumber)(this.initPTS[A.cc])?(this.log("Waiting for video PTS in continuity counter "+A.cc+" of live stream before loading audio fragment "+A.sn+" of level "+this.trackId),this.state=N.State.WAITING_INIT_PTS):(this.startFragRequested=!0,B.prototype.loadFragment.call(this,A,c,w)))},h.completeAudioSwitch=function(){var A=this.hls,c=this.media,w=this.trackId;c&&(this.log("Switching audio track : flushing all audio"),B.prototype.flushMainBuffer.call(this,0,Number.POSITIVE_INFINITY,"audio")),this.audioSwitch=!1,A.trigger(L.Events.AUDIO_TRACK_SWITCHED,{id:w})},x}(N.default);z.default=_},"./src/controller/audio-track-controller.ts":function(Ae,z,U){"use strict";U.r(z);var V=U("./src/events.ts"),N=U("./src/errors.ts"),L=U("./src/controller/base-playlist-controller.ts"),$=U("./src/types/loader.ts");function H(l,s){for(var i=0;i<s.length;i++){var o=s[i];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(l,o.key,o)}}function e(l,s,i){return s&&H(l.prototype,s),i&&H(l,i),l}function R(l,s){l.prototype=Object.create(s.prototype),l.prototype.constructor=l,u(l,s)}function u(l,s){return u=Object.setPrototypeOf||function(o,r){return o.__proto__=r,o},u(l,s)}var f=function(l){R(s,l);function s(o){var r;return r=l.call(this,o,"[audio-track-controller]")||this,r.tracks=[],r.groupId=null,r.tracksInGroup=[],r.trackId=-1,r.trackName="",r.selectDefaultTrack=!0,r.registerListeners(),r}var i=s.prototype;return i.registerListeners=function(){var r=this.hls;r.on(V.Events.MANIFEST_LOADING,this.onManifestLoading,this),r.on(V.Events.MANIFEST_PARSED,this.onManifestParsed,this),r.on(V.Events.LEVEL_LOADING,this.onLevelLoading,this),r.on(V.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),r.on(V.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),r.on(V.Events.ERROR,this.onError,this)},i.unregisterListeners=function(){var r=this.hls;r.off(V.Events.MANIFEST_LOADING,this.onManifestLoading,this),r.off(V.Events.MANIFEST_PARSED,this.onManifestParsed,this),r.off(V.Events.LEVEL_LOADING,this.onLevelLoading,this),r.off(V.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),r.off(V.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),r.off(V.Events.ERROR,this.onError,this)},i.destroy=function(){this.unregisterListeners(),this.tracks.length=0,this.tracksInGroup.length=0,l.prototype.destroy.call(this)},i.onManifestLoading=function(){this.tracks=[],this.groupId=null,this.tracksInGroup=[],this.trackId=-1,this.trackName="",this.selectDefaultTrack=!0},i.onManifestParsed=function(r,a){this.tracks=a.audioTracks||[]},i.onAudioTrackLoaded=function(r,a){var n=a.id,t=a.details,E=this.tracksInGroup[n];if(!E){this.warn("Invalid audio track id "+n);return}var b=E.details;E.details=a.details,this.log("audioTrack "+n+" loaded ["+t.startSN+"-"+t.endSN+"]"),n===this.trackId&&(this.retryCount=0,this.playlistLoaded(n,a,b))},i.onLevelLoading=function(r,a){this.switchLevel(a.level)},i.onLevelSwitching=function(r,a){this.switchLevel(a.level)},i.switchLevel=function(r){var a=this.hls.levels[r];if(!(a!=null&&a.audioGroupIds))return;var n=a.audioGroupIds[a.urlId];if(this.groupId!==n){this.groupId=n;var t=this.tracks.filter(function(b){return!n||b.groupId===n});this.selectDefaultTrack&&!t.some(function(b){return b.default})&&(this.selectDefaultTrack=!1),this.tracksInGroup=t;var E={audioTracks:t};this.log("Updating audio tracks, "+t.length+' track(s) found in "'+n+'" group-id'),this.hls.trigger(V.Events.AUDIO_TRACKS_UPDATED,E),this.selectInitialTrack()}},i.onError=function(r,a){if(l.prototype.onError.call(this,r,a),a.fatal||!a.context)return;a.context.type===$.PlaylistContextType.AUDIO_TRACK&&a.context.id===this.trackId&&a.context.groupId===this.groupId&&this.retryLoadingOrFail(a)},i.setAudioTrack=function(r){var a=this.tracksInGroup;if(r<0||r>=a.length){this.warn("Invalid id passed to audio-track controller");return}this.clearTimer();var n=a[this.trackId];this.log("Now switching to audio-track index "+r);var t=a[r],E=t.id,b=t.groupId,_=b===void 0?"":b,B=t.name,x=t.type,h=t.url;if(this.trackId=r,this.trackName=B,this.selectDefaultTrack=!1,this.hls.trigger(V.Events.AUDIO_TRACK_SWITCHING,{id:E,groupId:_,name:B,type:x,url:h}),t.details&&!t.details.live)return;var d=this.switchParams(t.url,n==null?void 0:n.details);this.loadPlaylist(d)},i.selectInitialTrack=function(){var r=this.tracksInGroup;console.assert(r.length,"Initial audio track should be selected when tracks are known");var a=this.trackName,n=this.findTrackId(a)||this.findTrackId();n!==-1?this.setAudioTrack(n):(this.warn("No track found for running audio group-ID: "+this.groupId),this.hls.trigger(V.Events.ERROR,{type:N.ErrorTypes.MEDIA_ERROR,details:N.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,fatal:!0}))},i.findTrackId=function(r){for(var a=this.tracksInGroup,n=0;n<a.length;n++){var t=a[n];if((!this.selectDefaultTrack||t.default)&&(!r||r===t.name))return t.id}return-1},i.loadPlaylist=function(r){var a=this.tracksInGroup[this.trackId];if(this.shouldLoadTrack(a)){var n=a.id,t=a.groupId,E=a.url;if(r)try{E=r.addDirectives(E)}catch(b){this.warn("Could not construct new URL with HLS Delivery Directives: "+b)}this.log("loading audio-track playlist for id: "+n),this.clearTimer(),this.hls.trigger(V.Events.AUDIO_TRACK_LOADING,{url:E,id:n,groupId:t,deliveryDirectives:r||null})}},e(s,[{key:"audioTracks",get:function(){return this.tracksInGroup}},{key:"audioTrack",get:function(){return this.trackId},set:function(r){this.selectDefaultTrack=!1,this.setAudioTrack(r)}}]),s}(L.default);z.default=f},"./src/controller/base-playlist-controller.ts":function(Ae,z,U){"use strict";U.r(z),U.d(z,"default",function(){return e});var V=U("./src/polyfills/number.ts"),N=U("./src/types/level.ts"),L=U("./src/controller/level-helper.ts"),$=U("./src/utils/logger.ts"),H=U("./src/errors.ts"),e=function(){function R(f,l){this.hls=void 0,this.timer=-1,this.canLoad=!1,this.retryCount=0,this.log=void 0,this.warn=void 0,this.log=$.logger.log.bind($.logger,l+":"),this.warn=$.logger.warn.bind($.logger,l+":"),this.hls=f}var u=R.prototype;return u.destroy=function(){this.clearTimer(),this.hls=this.log=this.warn=null},u.onError=function(l,s){s.fatal&&s.type===H.ErrorTypes.NETWORK_ERROR&&this.clearTimer()},u.clearTimer=function(){clearTimeout(this.timer),this.timer=-1},u.startLoad=function(){this.canLoad=!0,this.retryCount=0,this.loadPlaylist()},u.stopLoad=function(){this.canLoad=!1,this.clearTimer()},u.switchParams=function(l,s){var i=s==null?void 0:s.renditionReports;if(i)for(var o=0;o<i.length;o++){var r=i[o],a=""+r.URI;if(a===l.substr(-a.length)){var n=parseInt(r["LAST-MSN"]),t=parseInt(r["LAST-PART"]);if(s&&this.hls.config.lowLatencyMode){var E=Math.min(s.age-s.partTarget,s.targetduration);t!==void 0&&E>s.partTarget&&(t+=1)}if(Object(V.isFiniteNumber)(n))return new N.HlsUrlParameters(n,Object(V.isFiniteNumber)(t)?t:void 0,N.HlsSkip.No)}}},u.loadPlaylist=function(l){},u.shouldLoadTrack=function(l){return this.canLoad&&l&&!!l.url&&(!l.details||l.details.live)},u.playlistLoaded=function(l,s,i){var o=this,r=s.details,a=s.stats,n=a.loading.end?Math.max(0,self.performance.now()-a.loading.end):0;if(r.advancedDateTime=Date.now()-n,r.live||i!=null&&i.live){if(r.reloaded(i),i&&this.log("live playlist "+l+" "+(r.advanced?"REFRESHED "+r.lastPartSn+"-"+r.lastPartIndex:"MISSED")),i&&r.fragments.length>0&&Object(L.mergeDetails)(i,r),!this.canLoad||!r.live)return;var t,E=void 0,b=void 0;if(r.canBlockReload&&r.endSN&&r.advanced){var _=this.hls.config.lowLatencyMode,B=r.lastPartSn,x=r.endSN,h=r.lastPartIndex,d=h!==-1,A=B===x,c=_?0:h;d?(E=A?x+1:B,b=A?c:h+1):E=x+1;var w=r.age,m=w+r.ageHeader,g=Math.min(m-r.partTarget,r.targetduration*1.5);if(g>0){if(i&&g>i.tuneInGoal)this.warn("CDN Tune-in goal increased from: "+i.tuneInGoal+" to: "+g+" with playlist age: "+r.age),g=0;else{var F=Math.floor(g/r.targetduration);if(E+=F,b!==void 0){var k=Math.round(g%r.targetduration/r.partTarget);b+=k}this.log("CDN Tune-in age: "+r.ageHeader+"s last advanced "+w.toFixed(2)+"s goal: "+g+" skip sn "+F+" to part "+b)}r.tuneInGoal=g}if(t=this.getDeliveryDirectives(r,s.deliveryDirectives,E,b),_||!A){this.loadPlaylist(t);return}}else t=this.getDeliveryDirectives(r,s.deliveryDirectives,E,b);var S=Object(L.computeReloadInterval)(r,a);E!==void 0&&r.canBlockReload&&(S-=r.partTarget||1),this.log("reload live playlist "+l+" in "+Math.round(S)+" ms"),this.timer=self.setTimeout(function(){return o.loadPlaylist(t)},S)}else this.clearTimer()},u.getDeliveryDirectives=function(l,s,i,o){var r=Object(N.getSkipValue)(l,i);return s!=null&&s.skip&&l.deltaUpdateFailed&&(i=s.msn,o=s.part,r=N.HlsSkip.No),new N.HlsUrlParameters(i,o,r)},u.retryLoadingOrFail=function(l){var s=this,i=this.hls.config,o=this.retryCount<i.levelLoadingMaxRetry;if(o){var r;if(this.retryCount++,l.details.indexOf("LoadTimeOut")>-1&&(r=l.context)!==null&&r!==void 0&&r.deliveryDirectives)this.warn("retry playlist loading #"+this.retryCount+' after "'+l.details+'"'),this.loadPlaylist();else{var a=Math.min(Math.pow(2,this.retryCount)*i.levelLoadingRetryDelay,i.levelLoadingMaxRetryTimeout);this.timer=self.setTimeout(function(){return s.loadPlaylist()},a),this.warn("retry playlist loading #"+this.retryCount+" in "+a+' ms after "'+l.details+'"')}}else this.warn('cannot recover from error "'+l.details+'"'),this.clearTimer(),l.fatal=!0;return o},R}()},"./src/controller/base-stream-controller.ts":function(Ae,z,U){"use strict";U.r(z),U.d(z,"State",function(){return x}),U.d(z,"default",function(){return h});var V=U("./src/polyfills/number.ts"),N=U("./src/task-loop.ts"),L=U("./src/controller/fragment-tracker.ts"),$=U("./src/utils/buffer-helper.ts"),H=U("./src/utils/logger.ts"),e=U("./src/events.ts"),R=U("./src/errors.ts"),u=U("./src/types/transmuxer.ts"),f=U("./src/utils/mp4-tools.ts"),l=U("./src/utils/discontinuities.ts"),s=U("./src/controller/fragment-finders.ts"),i=U("./src/controller/level-helper.ts"),o=U("./src/loader/fragment-loader.ts"),r=U("./src/crypt/decrypter.ts"),a=U("./src/utils/time-ranges.ts"),n=U("./src/types/loader.ts");function t(d,A){for(var c=0;c<A.length;c++){var w=A[c];w.enumerable=w.enumerable||!1,w.configurable=!0,"value"in w&&(w.writable=!0),Object.defineProperty(d,w.key,w)}}function E(d,A,c){return A&&t(d.prototype,A),c&&t(d,c),d}function b(d){if(d===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return d}function _(d,A){d.prototype=Object.create(A.prototype),d.prototype.constructor=d,B(d,A)}function B(d,A){return B=Object.setPrototypeOf||function(w,m){return w.__proto__=m,w},B(d,A)}var x={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"},h=function(d){_(A,d);function A(w,m,g){var F;return F=d.call(this)||this,F.hls=void 0,F.fragPrevious=null,F.fragCurrent=null,F.fragmentTracker=void 0,F.transmuxer=null,F._state=x.STOPPED,F.media=void 0,F.mediaBuffer=void 0,F.config=void 0,F.bitrateTest=!1,F.lastCurrentTime=0,F.nextLoadPosition=0,F.startPosition=0,F.loadedmetadata=!1,F.fragLoadError=0,F.retryDate=0,F.levels=null,F.fragmentLoader=void 0,F.levelLastLoaded=null,F.startFragRequested=!1,F.decrypter=void 0,F.initPTS=[],F.onvseeking=null,F.onvended=null,F.logPrefix="",F.log=void 0,F.warn=void 0,F.logPrefix=g,F.log=H.logger.log.bind(H.logger,g+":"),F.warn=H.logger.warn.bind(H.logger,g+":"),F.hls=w,F.fragmentLoader=new o.default(w.config),F.fragmentTracker=m,F.config=w.config,F.decrypter=new r.default(w,w.config),w.on(e.Events.KEY_LOADED,F.onKeyLoaded,b(F)),F}var c=A.prototype;return c.doTick=function(){this.onTickEnd()},c.onTickEnd=function(){},c.startLoad=function(m){},c.stopLoad=function(){this.fragmentLoader.abort();var m=this.fragCurrent;m&&this.fragmentTracker.removeFragment(m),this.resetTransmuxer(),this.fragCurrent=null,this.fragPrevious=null,this.clearInterval(),this.clearNextTick(),this.state=x.STOPPED},c._streamEnded=function(m,g){var F=this.fragCurrent,k=this.fragmentTracker;if(!g.live&&F&&F.sn===g.endSN&&!m.nextStart){var S=k.getState(F);return S===L.FragmentState.PARTIAL||S===L.FragmentState.OK}return!1},c.onMediaAttached=function(m,g){var F=this.media=this.mediaBuffer=g.media;this.onvseeking=this.onMediaSeeking.bind(this),this.onvended=this.onMediaEnded.bind(this),F.addEventListener("seeking",this.onvseeking),F.addEventListener("ended",this.onvended);var k=this.config;this.levels&&k.autoStartLoad&&this.state===x.STOPPED&&this.startLoad(k.startPosition)},c.onMediaDetaching=function(){var m=this.media;m!=null&&m.ended&&(this.log("MSE detaching and video ended, reset startPosition"),this.startPosition=this.lastCurrentTime=0),m&&(m.removeEventListener("seeking",this.onvseeking),m.removeEventListener("ended",this.onvended),this.onvseeking=this.onvended=null),this.media=this.mediaBuffer=null,this.loadedmetadata=!1,this.fragmentTracker.removeAllFragments(),this.stopLoad()},c.onMediaSeeking=function(){var m=this.config,g=this.fragCurrent,F=this.media,k=this.mediaBuffer,S=this.state,Q=F?F.currentTime:0,X=$.BufferHelper.bufferInfo(k||F,Q,m.maxBufferHole);if(this.log("media seeking to "+(Object(V.isFiniteNumber)(Q)?Q.toFixed(3):Q)+", state: "+S),S===x.ENDED)this.resetLoadingState();else if(g&&!X.len){var P=m.maxFragLookUpTolerance,q=g.start-P,ie=g.start+g.duration+P,be=Q>ie;(Q<q||be)&&(be&&g.loader&&(this.log("seeking outside of buffer while fragment load in progress, cancel fragment load"),g.loader.abort()),this.resetLoadingState())}F&&(this.lastCurrentTime=Q),!this.loadedmetadata&&!X.len&&(this.nextLoadPosition=this.startPosition=Q),this.tickImmediate()},c.onMediaEnded=function(){this.startPosition=this.lastCurrentTime=0},c.onKeyLoaded=function(m,g){if(this.state!==x.KEY_LOADING||g.frag!==this.fragCurrent||!this.levels)return;this.state=x.IDLE;var F=this.levels[g.frag.level].details;F&&this.loadFragment(g.frag,F,g.frag.start)},c.onHandlerDestroying=function(){this.stopLoad(),d.prototype.onHandlerDestroying.call(this)},c.onHandlerDestroyed=function(){this.state=x.STOPPED,this.hls.off(e.Events.KEY_LOADED,this.onKeyLoaded,this),this.fragmentLoader&&this.fragmentLoader.destroy(),this.decrypter&&this.decrypter.destroy(),this.hls=this.log=this.warn=this.decrypter=this.fragmentLoader=this.fragmentTracker=null,d.prototype.onHandlerDestroyed.call(this)},c.loadKey=function(m,g){this.log("Loading key for "+m.sn+" of ["+g.startSN+"-"+g.endSN+"], "+(this.logPrefix==="[stream-controller]"?"level":"track")+" "+m.level),this.state=x.KEY_LOADING,this.fragCurrent=m,this.hls.trigger(e.Events.KEY_LOADING,{frag:m})},c.loadFragment=function(m,g,F){this._loadFragForPlayback(m,g,F)},c._loadFragForPlayback=function(m,g,F){var k=this,S=function(X){if(k.fragContextChanged(m)){k.warn("Fragment "+m.sn+(X.part?" p: "+X.part.index:"")+" of level "+m.level+" was dropped during download."),k.fragmentTracker.removeFragment(m);return}m.stats.chunkCount++,k._handleFragmentLoadProgress(X)};this._doFragLoad(m,g,F,S).then(function(Q){if(!Q)return;k.fragLoadError=0;var X=k.state;if(k.fragContextChanged(m)){(X===x.FRAG_LOADING||X===x.BACKTRACKING||!k.fragCurrent&&X===x.PARSING)&&(k.fragmentTracker.removeFragment(m),k.state=x.IDLE);return}if("payload"in Q&&(k.log("Loaded fragment "+m.sn+" of level "+m.level),k.hls.trigger(e.Events.FRAG_LOADED,Q),k.state===x.BACKTRACKING)){k.fragmentTracker.backtrack(m,Q),k.resetFragmentLoading(m);return}k._handleFragmentLoadComplete(Q)}).catch(function(Q){k.warn(Q),k.resetFragmentLoading(m)})},c.flushMainBuffer=function(m,g,F){if(F===void 0&&(F=null),!(m-g))return;var k={startOffset:m,endOffset:g,type:F};this.fragLoadError=0,this.hls.trigger(e.Events.BUFFER_FLUSHING,k)},c._loadInitSegment=function(m){var g=this;this._doFragLoad(m).then(function(F){if(!F||g.fragContextChanged(m)||!g.levels)throw new Error("init load aborted");return F}).then(function(F){var k=g.hls,S=F.payload,Q=m.decryptdata;if(S&&S.byteLength>0&&Q&&Q.key&&Q.iv&&Q.method==="AES-128"){var X=self.performance.now();return g.decrypter.webCryptoDecrypt(new Uint8Array(S),Q.key.buffer,Q.iv.buffer).then(function(P){var q=self.performance.now();return k.trigger(e.Events.FRAG_DECRYPTED,{frag:m,payload:P,stats:{tstart:X,tdecrypt:q}}),F.payload=P,F})}return F}).then(function(F){var k=g.fragCurrent,S=g.hls,Q=g.levels;if(!Q)throw new Error("init load aborted, missing levels");var X=Q[m.level].details;console.assert(X,"Level details are defined when init segment is loaded");var P=m.stats;g.state=x.IDLE,g.fragLoadError=0,m.data=new Uint8Array(F.payload),P.parsing.start=P.buffering.start=self.performance.now(),P.parsing.end=P.buffering.end=self.performance.now(),F.frag===k&&S.trigger(e.Events.FRAG_BUFFERED,{stats:P,frag:k,part:null,id:m.type}),g.tick()}).catch(function(F){g.warn(F),g.resetFragmentLoading(m)})},c.fragContextChanged=function(m){var g=this.fragCurrent;return!m||!g||m.level!==g.level||m.sn!==g.sn||m.urlId!==g.urlId},c.fragBufferedComplete=function(m,g){var F=this.mediaBuffer?this.mediaBuffer:this.media;this.log("Buffered "+m.type+" sn: "+m.sn+(g?" part: "+g.index:"")+" of "+(this.logPrefix==="[stream-controller]"?"level":"track")+" "+m.level+" "+a.default.toString($.BufferHelper.getBuffered(F))),this.state=x.IDLE,this.tick()},c._handleFragmentLoadComplete=function(m){var g=this.transmuxer;if(!g)return;var F=m.frag,k=m.part,S=m.partsLoaded,Q=!S||S.length===0||S.some(function(P){return!P}),X=new u.ChunkMetadata(F.level,F.sn,F.stats.chunkCount+1,0,k?k.index:-1,!Q);g.flush(X)},c._handleFragmentLoadProgress=function(m){},c._doFragLoad=function(m,g,F,k){var S=this;if(F===void 0&&(F=null),!this.levels)throw new Error("frag load aborted, missing levels");if(F=Math.max(m.start,F||0),this.config.lowLatencyMode&&g){var Q=g.partList;if(Q&&k){F>m.end&&g.fragmentHint&&(m=g.fragmentHint);var X=this.getNextPart(Q,m,F);if(X>-1){var P=Q[X];return this.log("Loading part sn: "+m.sn+" p: "+P.index+" cc: "+m.cc+" of playlist ["+g.startSN+"-"+g.endSN+"] parts [0-"+X+"-"+(Q.length-1)+"] "+(this.logPrefix==="[stream-controller]"?"level":"track")+": "+m.level+", target: "+parseFloat(F.toFixed(3))),this.nextLoadPosition=P.start+P.duration,this.state=x.FRAG_LOADING,this.hls.trigger(e.Events.FRAG_LOADING,{frag:m,part:Q[X],targetBufferTime:F}),this.doFragPartsLoad(m,Q,X,k).catch(function(q){return S.handleFragLoadError(q)})}else if(!m.url||this.loadedEndOfParts(Q,F))return Promise.resolve(null)}}return this.log("Loading fragment "+m.sn+" cc: "+m.cc+" "+(g?"of ["+g.startSN+"-"+g.endSN+"] ":"")+(this.logPrefix==="[stream-controller]"?"level":"track")+": "+m.level+", target: "+parseFloat(F.toFixed(3))),Object(V.isFiniteNumber)(m.sn)&&!this.bitrateTest&&(this.nextLoadPosition=m.start+m.duration),this.state=x.FRAG_LOADING,this.hls.trigger(e.Events.FRAG_LOADING,{frag:m,targetBufferTime:F}),this.fragmentLoader.load(m,k).catch(function(q){return S.handleFragLoadError(q)})},c.doFragPartsLoad=function(m,g,F,k){var S=this;return new Promise(function(Q,X){var P=[],q=function ie(be){var me=g[be];S.fragmentLoader.loadPart(m,me,k).then(function(Me){P[me.index]=Me;var Ne=Me.part;S.hls.trigger(e.Events.FRAG_LOADED,Me);var ke=g[be+1];if(ke&&ke.fragment===m)ie(be+1);else return Q({frag:m,part:Ne,partsLoaded:P})}).catch(X)};q(F)})},c.handleFragLoadError=function(m){var g=m.data;return g&&g.details===R.ErrorDetails.INTERNAL_ABORTED?this.handleFragLoadAborted(g.frag,g.part):this.hls.trigger(e.Events.ERROR,g),null},c._handleTransmuxerFlush=function(m){var g=this.getCurrentContext(m);if(!g||this.state!==x.PARSING){this.fragCurrent||(this.state=x.IDLE);return}var F=g.frag,k=g.part,S=g.level,Q=self.performance.now();F.stats.parsing.end=Q,k&&(k.stats.parsing.end=Q),this.updateLevelTiming(F,k,S,m.partial)},c.getCurrentContext=function(m){var g=this.levels,F=m.level,k=m.sn,S=m.part;if(!g||!g[F])return this.warn("Levels object was unset while buffering fragment "+k+" of level "+F+". The current chunk will not be buffered."),null;var Q=g[F],X=S>-1?Object(i.getPartWith)(Q,k,S):null,P=X?X.fragment:Object(i.getFragmentWithSN)(Q,k,this.fragCurrent);return P?{frag:P,part:X,level:Q}:null},c.bufferFragmentData=function(m,g,F,k){if(!m||this.state!==x.PARSING)return;var S=m.data1,Q=m.data2,X=S;if(S&&Q&&(X=Object(f.appendUint8Array)(S,Q)),!X||!X.length)return;var P={type:m.type,frag:g,part:F,chunkMeta:k,parent:g.type,data:X};this.hls.trigger(e.Events.BUFFER_APPENDING,P),m.dropped&&m.independent&&!F&&this.flushBufferGap(g)},c.flushBufferGap=function(m){var g=this.media;if(!g)return;if(!$.BufferHelper.isBuffered(g,g.currentTime)){this.flushMainBuffer(0,m.start);return}var F=g.currentTime,k=$.BufferHelper.bufferInfo(g,F,0),S=m.duration,Q=Math.min(this.config.maxFragLookUpTolerance*2,S*.25),X=Math.max(Math.min(m.start-Q,k.end-Q),F+Q);m.start-X>Q&&this.flushMainBuffer(X,m.start)},c.getFwdBufferInfo=function(m,g){var F=this.config,k=this.getLoadPosition();if(!Object(V.isFiniteNumber)(k))return null;var S=$.BufferHelper.bufferInfo(m,k,F.maxBufferHole);if(S.len===0&&S.nextStart!==void 0){var Q=this.fragmentTracker.getBufferedFrag(k,g);if(Q&&S.nextStart<Q.end)return $.BufferHelper.bufferInfo(m,k,Math.max(S.nextStart,F.maxBufferHole))}return S},c.getMaxBufferLength=function(m){var g=this.config,F;return m?F=Math.max(8*g.maxBufferSize/m,g.maxBufferLength):F=g.maxBufferLength,Math.min(F,g.maxMaxBufferLength)},c.reduceMaxBufferLength=function(m){var g=this.config,F=m||g.maxBufferLength;return g.maxMaxBufferLength>=F?(g.maxMaxBufferLength/=2,this.warn("Reduce max buffer length to "+g.maxMaxBufferLength+"s"),!0):!1},c.getNextFragment=function(m,g){var F,k,S=g.fragments,Q=S.length;if(!Q)return null;var X=this.config,P=S[0].start,q;if(g.live){var ie=X.initialLiveManifestSize;if(Q<ie)return this.warn("Not enough fragments to start playback (have: "+Q+", need: "+ie+")"),null;!g.PTSKnown&&!this.startFragRequested&&this.startPosition===-1&&(q=this.getInitialLiveFragment(g,S),this.startPosition=q?this.hls.liveSyncPosition||q.start:m)}else m<=P&&(q=S[0]);if(!q){var be=X.lowLatencyMode?g.partEnd:g.fragmentEnd;q=this.getFragmentAtPosition(m,be,g)}return(F=q)!==null&&F!==void 0&&F.initSegment&&!((k=q)!==null&&k!==void 0&&k.initSegment.data)&&!this.bitrateTest&&(q=q.initSegment),q},c.getNextPart=function(m,g,F){for(var k=-1,S=!1,Q=!0,X=0,P=m.length;X<P;X++){var q=m[X];if(Q=Q&&!q.independent,k>-1&&F<q.start)break;var ie=q.loaded;!ie&&(S||q.independent||Q)&&q.fragment===g&&(k=X),S=ie}return k},c.loadedEndOfParts=function(m,g){var F=m[m.length-1];return F&&g>F.start&&F.loaded},c.getInitialLiveFragment=function(m,g){var F=this.fragPrevious,k=null;if(F){if(m.hasProgramDateTime&&(this.log("Live playlist, switching playlist, load frag with same PDT: "+F.programDateTime),k=Object(s.findFragmentByPDT)(g,F.endProgramDateTime,this.config.maxFragLookUpTolerance)),!k){var S=F.sn+1;if(S>=m.startSN&&S<=m.endSN){var Q=g[S-m.startSN];F.cc===Q.cc&&(k=Q,this.log("Live playlist, switching playlist, load frag with next SN: "+k.sn))}k||(k=Object(s.findFragWithCC)(g,F.cc),k&&this.log("Live playlist, switching playlist, load frag with same CC: "+k.sn))}}else{var X=this.hls.liveSyncPosition;X!==null&&(k=this.getFragmentAtPosition(X,this.bitrateTest?m.fragmentEnd:m.edge,m))}return k},c.getFragmentAtPosition=function(m,g,F){var k=this.config,S=this.fragPrevious,Q=F.fragments,X=F.endSN,P=F.fragmentHint,q=k.maxFragLookUpTolerance,ie=!!(k.lowLatencyMode&&F.partList&&P);ie&&P&&!this.bitrateTest&&(Q=Q.concat(P),X=P.sn);var be;if(m<g){var me=m>g-q?0:q;be=Object(s.findFragmentByPTS)(S,Q,m,me)}else be=Q[Q.length-1];if(be){var Me=be.sn-F.startSN,Ne=S&&be.level===S.level,ke=Q[Me+1],Ke=this.fragmentTracker.getState(be);if(Ke===L.FragmentState.BACKTRACKED){be=null;for(var Ye=Me;Q[Ye]&&this.fragmentTracker.getState(Q[Ye])===L.FragmentState.BACKTRACKED;)S?be=Q[Ye--]:be=Q[--Ye];be||(be=ke)}else S&&be.sn===S.sn&&!ie&&(Ne&&(be.sn<X&&this.fragmentTracker.getState(ke)!==L.FragmentState.OK?(this.log("SN "+be.sn+" just loaded, load next one: "+ke.sn),be=ke):be=null))}return be},c.synchronizeToLiveEdge=function(m){var g=this.config,F=this.media;if(!F)return;var k=this.hls.liveSyncPosition,S=F.currentTime,Q=m.fragments[0].start,X=m.edge,P=S>=Q-g.maxFragLookUpTolerance&&S<=X;if(k!==null&&F.duration>k&&(S<k||!P)){var q=g.liveMaxLatencyDuration!==void 0?g.liveMaxLatencyDuration:g.liveMaxLatencyDurationCount*m.targetduration;(!P&&F.readyState<4||S<X-q)&&(this.loadedmetadata||(this.nextLoadPosition=k),F.readyState&&(this.warn("Playback: "+S.toFixed(3)+" is located too far from the end of live sliding playlist: "+X+", reset currentTime to : "+k.toFixed(3)),F.currentTime=k))}},c.alignPlaylists=function(m,g){var F=this.levels,k=this.levelLastLoaded,S=this.fragPrevious,Q=k!==null?F[k]:null,X=m.fragments.length;if(!X)return this.warn("No fragments in live playlist"),0;var P=m.fragments[0].start,q=!g,ie=m.alignedSliding&&Object(V.isFiniteNumber)(P);if(q||!ie&&!P){Object(l.alignStream)(S,Q,m);var be=m.fragments[0].start;return this.log("Live playlist sliding: "+be.toFixed(2)+" start-sn: "+(g?g.startSN:"na")+"->"+m.startSN+" prev-sn: "+(S?S.sn:"na")+" fragments: "+X),be}return P},c.waitForCdnTuneIn=function(m){var g=3;return m.live&&m.canBlockReload&&m.tuneInGoal>Math.max(m.partHoldBack,m.partTarget*g)},c.setStartPosition=function(m,g){var F=this.startPosition;if(F<g&&(F=-1),F===-1||this.lastCurrentTime===-1){var k=m.startTimeOffset;Object(V.isFiniteNumber)(k)?(F=g+k,k<0&&(F+=m.totalduration),F=Math.min(Math.max(g,F),g+m.totalduration),this.log("Start time offset "+k+" found in playlist, adjust startPosition to "+F),this.startPosition=F):m.live?F=this.hls.liveSyncPosition||g:this.startPosition=F=0,this.lastCurrentTime=F}this.nextLoadPosition=F},c.getLoadPosition=function(){var m=this.media,g=0;return this.loadedmetadata&&m?g=m.currentTime:this.nextLoadPosition&&(g=this.nextLoadPosition),g},c.handleFragLoadAborted=function(m,g){this.transmuxer&&m.sn!=="initSegment"&&m.stats.aborted&&(this.warn("Fragment "+m.sn+(g?" part"+g.index:"")+" of level "+m.level+" was aborted"),this.resetFragmentLoading(m))},c.resetFragmentLoading=function(m){(!this.fragCurrent||!this.fragContextChanged(m))&&(this.state=x.IDLE)},c.onFragmentOrKeyLoadError=function(m,g){if(g.fatal)return;var F=g.frag;if(!F||F.type!==m)return;var k=this.fragCurrent;console.assert(k&&F.sn===k.sn&&F.level===k.level&&F.urlId===k.urlId,"Frag load error must match current frag to retry");var S=this.config;if(this.fragLoadError+1<=S.fragLoadingMaxRetry){if(this.resetLiveStartWhenNotLoaded(F.level))return;var Q=Math.min(Math.pow(2,this.fragLoadError)*S.fragLoadingRetryDelay,S.fragLoadingMaxRetryTimeout);this.warn("Fragment "+F.sn+" of "+m+" "+F.level+" failed to load, retrying in "+Q+"ms"),this.retryDate=self.performance.now()+Q,this.fragLoadError++,this.state=x.FRAG_LOADING_WAITING_RETRY}else g.levelRetry?(m===n.PlaylistLevelType.AUDIO&&(this.fragCurrent=null),this.fragLoadError=0,this.state=x.IDLE):(H.logger.error(g.details+" reaches max retry, redispatch as fatal ..."),g.fatal=!0,this.hls.stopLoad(),this.state=x.ERROR)},c.afterBufferFlushed=function(m,g,F){if(!m)return;var k=$.BufferHelper.getBuffered(m);this.fragmentTracker.detectEvictedFragments(g,k,F),this.state===x.ENDED&&this.resetLoadingState()},c.resetLoadingState=function(){this.fragCurrent=null,this.fragPrevious=null,this.state=x.IDLE},c.resetLiveStartWhenNotLoaded=function(m){if(!this.loadedmetadata){this.startFragRequested=!1;var g=this.levels?this.levels[m].details:null;if(g!=null&&g.live)return this.startPosition=-1,this.setStartPosition(g,0),this.resetLoadingState(),!0;this.nextLoadPosition=this.startPosition}return!1},c.updateLevelTiming=function(m,g,F,k){var S=this,Q=F.details;console.assert(!!Q,"level.details must be defined");var X=Object.keys(m.elementaryStreams).reduce(function(P,q){var ie=m.elementaryStreams[q];if(ie){var be=ie.endPTS-ie.startPTS;if(be<=0)return S.warn("Could not parse fragment "+m.sn+" "+q+" duration reliably ("+be+") resetting transmuxer to fallback to playlist timing"),S.resetTransmuxer(),P||!1;var me=k?0:Object(i.updateFragPTSDTS)(Q,m,ie.startPTS,ie.endPTS,ie.startDTS,ie.endDTS);return S.hls.trigger(e.Events.LEVEL_PTS_UPDATED,{details:Q,level:F,drift:me,type:q,frag:m,start:ie.startPTS,end:ie.endPTS}),!0}return P},!1);X?(this.state=x.PARSED,this.hls.trigger(e.Events.FRAG_PARSED,{frag:m,part:g})):this.resetLoadingState()},c.resetTransmuxer=function(){this.transmuxer&&(this.transmuxer.destroy(),this.transmuxer=null)},E(A,[{key:"state",get:function(){return this._state},set:function(m){var g=this._state;g!==m&&(this._state=m,this.log(g+"->"+m))}}]),A}(N.default)},"./src/controller/buffer-controller.ts":function(Ae,z,U){"use strict";U.r(z),U.d(z,"default",function(){return s});var V=U("./src/polyfills/number.ts"),N=U("./src/events.ts"),L=U("./src/utils/logger.ts"),$=U("./src/errors.ts"),H=U("./src/utils/buffer-helper.ts"),e=U("./src/utils/mediasource-helper.ts"),R=U("./src/loader/fragment.ts"),u=U("./src/controller/buffer-operation-queue.ts"),f=Object(e.getMediaSource)(),l=/([ha]vc.)(?:\.[^.,]+)+/,s=function(){function i(r){var a=this;this.details=null,this._objectUrl=null,this.operationQueue=void 0,this.listeners=void 0,this.hls=void 0,this.bufferCodecEventsExpected=0,this._bufferCodecEventsTotal=0,this.media=null,this.mediaSource=null,this.appendError=0,this.tracks={},this.pendingTracks={},this.sourceBuffer=void 0,this._onMediaSourceOpen=function(){var n=a.hls,t=a.media,E=a.mediaSource;L.logger.log("[buffer-controller]: Media source opened"),t&&(a.updateMediaElementDuration(),n.trigger(N.Events.MEDIA_ATTACHED,{media:t})),E&&E.removeEventListener("sourceopen",a._onMediaSourceOpen),a.checkPendingTracks()},this._onMediaSourceClose=function(){L.logger.log("[buffer-controller]: Media source closed")},this._onMediaSourceEnded=function(){L.logger.log("[buffer-controller]: Media source ended")},this.hls=r,this._initSourceBuffer(),this.registerListeners()}var o=i.prototype;return o.hasSourceTypes=function(){return this.getSourceBufferTypes().length>0||Object.keys(this.pendingTracks).length>0},o.destroy=function(){this.unregisterListeners(),this.details=null},o.registerListeners=function(){var a=this.hls;a.on(N.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),a.on(N.Events.MEDIA_DETACHING,this.onMediaDetaching,this),a.on(N.Events.MANIFEST_PARSED,this.onManifestParsed,this),a.on(N.Events.BUFFER_RESET,this.onBufferReset,this),a.on(N.Events.BUFFER_APPENDING,this.onBufferAppending,this),a.on(N.Events.BUFFER_CODECS,this.onBufferCodecs,this),a.on(N.Events.BUFFER_EOS,this.onBufferEos,this),a.on(N.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),a.on(N.Events.LEVEL_UPDATED,this.onLevelUpdated,this),a.on(N.Events.FRAG_PARSED,this.onFragParsed,this),a.on(N.Events.FRAG_CHANGED,this.onFragChanged,this)},o.unregisterListeners=function(){var a=this.hls;a.off(N.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),a.off(N.Events.MEDIA_DETACHING,this.onMediaDetaching,this),a.off(N.Events.MANIFEST_PARSED,this.onManifestParsed,this),a.off(N.Events.BUFFER_RESET,this.onBufferReset,this),a.off(N.Events.BUFFER_APPENDING,this.onBufferAppending,this),a.off(N.Events.BUFFER_CODECS,this.onBufferCodecs,this),a.off(N.Events.BUFFER_EOS,this.onBufferEos,this),a.off(N.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),a.off(N.Events.LEVEL_UPDATED,this.onLevelUpdated,this),a.off(N.Events.FRAG_PARSED,this.onFragParsed,this),a.off(N.Events.FRAG_CHANGED,this.onFragChanged,this)},o._initSourceBuffer=function(){this.sourceBuffer={},this.operationQueue=new u.default(this.sourceBuffer),this.listeners={audio:[],video:[],audiovideo:[]}},o.onManifestParsed=function(a,n){var t=2;(n.audio&&!n.video||!n.altAudio)&&(t=1),this.bufferCodecEventsExpected=this._bufferCodecEventsTotal=t,this.details=null,L.logger.log(this.bufferCodecEventsExpected+" bufferCodec event(s) expected")},o.onMediaAttaching=function(a,n){var t=this.media=n.media;if(t&&f){var E=this.mediaSource=new f;E.addEventListener("sourceopen",this._onMediaSourceOpen),E.addEventListener("sourceended",this._onMediaSourceEnded),E.addEventListener("sourceclose",this._onMediaSourceClose),t.src=self.URL.createObjectURL(E),this._objectUrl=t.src}},o.onMediaDetaching=function(){var a=this.media,n=this.mediaSource,t=this._objectUrl;if(n){if(L.logger.log("[buffer-controller]: media source detaching"),n.readyState==="open")try{n.endOfStream()}catch(E){L.logger.warn("[buffer-controller]: onMediaDetaching: "+E.message+" while calling endOfStream")}this.onBufferReset(),n.removeEventListener("sourceopen",this._onMediaSourceOpen),n.removeEventListener("sourceended",this._onMediaSourceEnded),n.removeEventListener("sourceclose",this._onMediaSourceClose),a&&(t&&self.URL.revokeObjectURL(t),a.src===t?(a.removeAttribute("src"),a.load()):L.logger.warn("[buffer-controller]: media.src was changed by a third party - skip cleanup")),this.mediaSource=null,this.media=null,this._objectUrl=null,this.bufferCodecEventsExpected=this._bufferCodecEventsTotal,this.pendingTracks={},this.tracks={}}this.hls.trigger(N.Events.MEDIA_DETACHED,void 0)},o.onBufferReset=function(){var a=this;this.getSourceBufferTypes().forEach(function(n){var t=a.sourceBuffer[n];try{t&&(a.removeBufferListeners(n),a.mediaSource&&a.mediaSource.removeSourceBuffer(t),a.sourceBuffer[n]=void 0)}catch(E){L.logger.warn("[buffer-controller]: Failed to reset the "+n+" buffer",E)}}),this._initSourceBuffer()},o.onBufferCodecs=function(a,n){var t=this,E=this.getSourceBufferTypes().length;if(Object.keys(n).forEach(function(b){if(E){var _=t.tracks[b];if(_&&typeof _.buffer.changeType=="function"){var B=n[b],x=B.codec,h=B.levelCodec,d=B.container,A=(_.levelCodec||_.codec).replace(l,"$1"),c=(h||x).replace(l,"$1");if(A!==c){var w=d+";codecs="+(h||x);t.appendChangeType(b,w)}}}else t.pendingTracks[b]=n[b]}),E)return;this.bufferCodecEventsExpected=Math.max(this.bufferCodecEventsExpected-1,0),this.mediaSource&&this.mediaSource.readyState==="open"&&this.checkPendingTracks()},o.appendChangeType=function(a,n){var t=this,E=this.operationQueue,b={execute:function(){var B=t.sourceBuffer[a];B&&(L.logger.log("[buffer-controller]: changing "+a+" sourceBuffer type to "+n),B.changeType(n)),E.shiftAndExecuteNext(a)},onStart:function(){},onComplete:function(){},onError:function(B){L.logger.warn("[buffer-controller]: Failed to change "+a+" SourceBuffer type",B)}};E.append(b,a)},o.onBufferAppending=function(a,n){var t=this,E=this.hls,b=this.operationQueue,_=this.tracks,B=n.data,x=n.type,h=n.frag,d=n.part,A=n.chunkMeta,c=A.buffering[x],w=self.performance.now();c.start=w;var m=h.stats.buffering,g=d?d.stats.buffering:null;m.start===0&&(m.start=w),g&&g.start===0&&(g.start=w);var F=_.audio,k=x==="audio"&&A.id===1&&(F==null?void 0:F.container)==="audio/mpeg",S={execute:function(){if(c.executeStart=self.performance.now(),k){var X=t.sourceBuffer[x];if(X){var P=h.start-X.timestampOffset;Math.abs(P)>=.1&&(L.logger.log("[buffer-controller]: Updating audio SourceBuffer timestampOffset to "+h.start+" (delta: "+P+") sn: "+h.sn+")"),X.timestampOffset=h.start)}}t.appendExecutor(B,x)},onStart:function(){},onComplete:function(){var X=self.performance.now();c.executeEnd=c.end=X,m.first===0&&(m.first=X),g&&g.first===0&&(g.first=X);var P=t.sourceBuffer,q={};for(var ie in P)q[ie]=H.BufferHelper.getBuffered(P[ie]);t.appendError=0,t.hls.trigger(N.Events.BUFFER_APPENDED,{type:x,frag:h,part:d,chunkMeta:A,parent:h.type,timeRanges:q})},onError:function(X){L.logger.error("[buffer-controller]: Error encountered while trying to append to the "+x+" SourceBuffer",X);var P={type:$.ErrorTypes.MEDIA_ERROR,parent:h.type,details:$.ErrorDetails.BUFFER_APPEND_ERROR,err:X,fatal:!1};X.code===DOMException.QUOTA_EXCEEDED_ERR?P.details=$.ErrorDetails.BUFFER_FULL_ERROR:(t.appendError++,P.details=$.ErrorDetails.BUFFER_APPEND_ERROR,t.appendError>E.config.appendErrorMaxRetry&&(L.logger.error("[buffer-controller]: Failed "+E.config.appendErrorMaxRetry+" times to append segment in sourceBuffer"),P.fatal=!0)),E.trigger(N.Events.ERROR,P)}};b.append(S,x)},o.onBufferFlushing=function(a,n){var t=this,E=this.operationQueue,b=function(B){return{execute:t.removeExecutor.bind(t,B,n.startOffset,n.endOffset),onStart:function(){},onComplete:function(){t.hls.trigger(N.Events.BUFFER_FLUSHED,{type:B})},onError:function(h){L.logger.warn("[buffer-controller]: Failed to remove from "+B+" SourceBuffer",h)}}};n.type?E.append(b(n.type),n.type):this.getSourceBufferTypes().forEach(function(_){E.append(b(_),_)})},o.onFragParsed=function(a,n){var t=this,E=n.frag,b=n.part,_=[],B=b?b.elementaryStreams:E.elementaryStreams;B[R.ElementaryStreamTypes.AUDIOVIDEO]?_.push("audiovideo"):(B[R.ElementaryStreamTypes.AUDIO]&&_.push("audio"),B[R.ElementaryStreamTypes.VIDEO]&&_.push("video"));var x=function(){var d=self.performance.now();E.stats.buffering.end=d,b&&(b.stats.buffering.end=d);var A=b?b.stats:E.stats;t.hls.trigger(N.Events.FRAG_BUFFERED,{frag:E,part:b,stats:A,id:E.type})};_.length===0&&L.logger.warn("Fragments must have at least one ElementaryStreamType set. type: "+E.type+" level: "+E.level+" sn: "+E.sn),this.blockBuffers(x,_)},o.onFragChanged=function(a,n){this.flushBackBuffer()},o.onBufferEos=function(a,n){var t=this,E=this.getSourceBufferTypes().reduce(function(b,_){var B=t.sourceBuffer[_];return(!n.type||n.type===_)&&(B&&!B.ended&&(B.ended=!0,L.logger.log("[buffer-controller]: "+_+" sourceBuffer now EOS"))),b&&!!(!B||B.ended)},!0);E&&this.blockBuffers(function(){var b=t.mediaSource;if(!b||b.readyState!=="open")return;b.endOfStream()})},o.onLevelUpdated=function(a,n){var t=n.details;if(!t.fragments.length)return;this.details=t,this.getSourceBufferTypes().length?this.blockBuffers(this.updateMediaElementDuration.bind(this)):this.updateMediaElementDuration()},o.flushBackBuffer=function(){var a=this.hls,n=this.details,t=this.media,E=this.sourceBuffer;if(!t||n===null)return;var b=this.getSourceBufferTypes();if(!b.length)return;var _=n.live&&a.config.liveBackBufferLength!==null?a.config.liveBackBufferLength:a.config.backBufferLength;if(!Object(V.isFiniteNumber)(_)||_<0)return;var B=t.currentTime,x=n.levelTargetDuration,h=Math.max(_,x),d=Math.floor(B/x)*x-h;b.forEach(function(A){var c=E[A];if(c){var w=H.BufferHelper.getBuffered(c);w.length>0&&d>w.start(0)&&(a.trigger(N.Events.BACK_BUFFER_REACHED,{bufferEnd:d}),n.live&&a.trigger(N.Events.LIVE_BACK_BUFFER_REACHED,{bufferEnd:d}),a.trigger(N.Events.BUFFER_FLUSHING,{startOffset:0,endOffset:d,type:A}))}})},o.updateMediaElementDuration=function(){if(!this.details||!this.media||!this.mediaSource||this.mediaSource.readyState!=="open")return;var a=this.details,n=this.hls,t=this.media,E=this.mediaSource,b=a.fragments[0].start+a.totalduration,_=t.duration,B=Object(V.isFiniteNumber)(E.duration)?E.duration:0;a.live&&n.config.liveDurationInfinity?(L.logger.log("[buffer-controller]: Media Source duration is set to Infinity"),E.duration=Infinity,this.updateSeekableRange(a)):(b>B&&b>_||!Object(V.isFiniteNumber)(_))&&(L.logger.log("[buffer-controller]: Updating Media Source duration to "+b.toFixed(3)),E.duration=b)},o.updateSeekableRange=function(a){var n=this.mediaSource,t=a.fragments,E=t.length;if(E&&a.live&&n!==null&&n!==void 0&&n.setLiveSeekableRange){var b=Math.max(0,t[0].start),_=Math.max(b,b+a.totalduration);n.setLiveSeekableRange(b,_)}},o.checkPendingTracks=function(){var a=this.bufferCodecEventsExpected,n=this.operationQueue,t=this.pendingTracks,E=Object.keys(t).length;if(E&&!a||E===2){this.createSourceBuffers(t),this.pendingTracks={};var b=this.getSourceBufferTypes();if(b.length===0){this.hls.trigger(N.Events.ERROR,{type:$.ErrorTypes.MEDIA_ERROR,details:$.ErrorDetails.BUFFER_INCOMPATIBLE_CODECS_ERROR,fatal:!0,reason:"could not create source buffer for media codec(s)"});return}b.forEach(function(_){n.executeNext(_)})}},o.createSourceBuffers=function(a){var n=this.sourceBuffer,t=this.mediaSource;if(!t)throw Error("createSourceBuffers called when mediaSource was null");var E=0;for(var b in a)if(!n[b]){var _=a[b];if(!_)throw Error("source buffer exists for track "+b+", however track does not");var B=_.levelCodec||_.codec,x=_.container+";codecs="+B;L.logger.log("[buffer-controller]: creating sourceBuffer("+x+")");try{var h=n[b]=t.addSourceBuffer(x),d=b;this.addBufferListener(d,"updatestart",this._onSBUpdateStart),this.addBufferListener(d,"updateend",this._onSBUpdateEnd),this.addBufferListener(d,"error",this._onSBUpdateError),this.tracks[b]={buffer:h,codec:B,container:_.container,levelCodec:_.levelCodec,id:_.id},E++}catch(A){L.logger.error("[buffer-controller]: error while trying to add sourceBuffer: "+A.message),this.hls.trigger(N.Events.ERROR,{type:$.ErrorTypes.MEDIA_ERROR,details:$.ErrorDetails.BUFFER_ADD_CODEC_ERROR,fatal:!1,error:A,mimeType:x})}}E&&this.hls.trigger(N.Events.BUFFER_CREATED,{tracks:this.tracks})},o._onSBUpdateStart=function(a){var n=this.operationQueue,t=n.current(a);t.onStart()},o._onSBUpdateEnd=function(a){var n=this.operationQueue,t=n.current(a);t.onComplete(),n.shiftAndExecuteNext(a)},o._onSBUpdateError=function(a,n){L.logger.error("[buffer-controller]: "+a+" SourceBuffer error",n),this.hls.trigger(N.Events.ERROR,{type:$.ErrorTypes.MEDIA_ERROR,details:$.ErrorDetails.BUFFER_APPENDING_ERROR,fatal:!1});var t=this.operationQueue.current(a);t&&t.onError(n)},o.removeExecutor=function(a,n,t){var E=this.media,b=this.mediaSource,_=this.operationQueue,B=this.sourceBuffer,x=B[a];if(!E||!b||!x){L.logger.warn("[buffer-controller]: Attempting to remove from the "+a+" SourceBuffer, but it does not exist"),_.shiftAndExecuteNext(a);return}var h=Object(V.isFiniteNumber)(E.duration)?E.duration:Infinity,d=Object(V.isFiniteNumber)(b.duration)?b.duration:Infinity,A=Math.max(0,n),c=Math.min(t,h,d);c>A?(L.logger.log("[buffer-controller]: Removing ["+A+","+c+"] from the "+a+" SourceBuffer"),console.assert(!x.updating,a+" sourceBuffer must not be updating"),x.remove(A,c)):_.shiftAndExecuteNext(a)},o.appendExecutor=function(a,n){var t=this.operationQueue,E=this.sourceBuffer,b=E[n];if(!b){L.logger.warn("[buffer-controller]: Attempting to append to the "+n+" SourceBuffer, but it does not exist"),t.shiftAndExecuteNext(n);return}b.ended=!1,console.assert(!b.updating,n+" sourceBuffer must not be updating"),b.appendBuffer(a)},o.blockBuffers=function(a,n){var t=this;if(n===void 0&&(n=this.getSourceBufferTypes()),!n.length){L.logger.log("[buffer-controller]: Blocking operation requested, but no SourceBuffers exist"),Promise.resolve(a);return}var E=this.operationQueue,b=n.map(function(_){return E.appendBlocker(_)});Promise.all(b).then(function(){a(),n.forEach(function(_){var B=t.sourceBuffer[_];(!B||!B.updating)&&E.shiftAndExecuteNext(_)})})},o.getSourceBufferTypes=function(){return Object.keys(this.sourceBuffer)},o.addBufferListener=function(a,n,t){var E=this.sourceBuffer[a];if(!E)return;var b=t.bind(this,a);this.listeners[a].push({event:n,listener:b}),E.addEventListener(n,b)},o.removeBufferListeners=function(a){var n=this.sourceBuffer[a];if(!n)return;this.listeners[a].forEach(function(t){n.removeEventListener(t.event,t.listener)})},i}()},"./src/controller/buffer-operation-queue.ts":function(Ae,z,U){"use strict";U.r(z),U.d(z,"default",function(){return N});var V=U("./src/utils/logger.ts"),N=function(){function L(H){this.buffers=void 0,this.queues={video:[],audio:[],audiovideo:[]},this.buffers=H}var $=L.prototype;return $.append=function(e,R){var u=this.queues[R];u.push(e),u.length===1&&this.buffers[R]&&this.executeNext(R)},$.insertAbort=function(e,R){var u=this.queues[R];u.unshift(e),this.executeNext(R)},$.appendBlocker=function(e){var R,u=new Promise(function(l){R=l}),f={execute:R,onStart:function(){},onComplete:function(){},onError:function(){}};return this.append(f,e),u},$.executeNext=function(e){var R=this.buffers,u=this.queues,f=R[e],l=u[e];if(l.length){var s=l[0];try{s.execute()}catch(i){V.logger.warn("[buffer-operation-queue]: Unhandled exception executing the current operation"),s.onError(i),(!f||!f.updating)&&(l.shift(),this.executeNext(e))}}},$.shiftAndExecuteNext=function(e){this.queues[e].shift(),this.executeNext(e)},$.current=function(e){return this.queues[e][0]},L}()},"./src/controller/cap-level-controller.ts":function(Ae,z,U){"use strict";U.r(z);var V=U("./src/events.ts");function N(H,e){for(var R=0;R<e.length;R++){var u=e[R];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(H,u.key,u)}}function L(H,e,R){return e&&N(H.prototype,e),R&&N(H,R),H}var $=function(){function H(R){this.autoLevelCapping=void 0,this.firstLevel=void 0,this.media=void 0,this.restrictedLevels=void 0,this.timer=void 0,this.hls=void 0,this.streamController=void 0,this.clientRect=void 0,this.hls=R,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.firstLevel=-1,this.media=null,this.restrictedLevels=[],this.timer=void 0,this.clientRect=null,this.registerListeners()}var e=H.prototype;return e.setStreamController=function(u){this.streamController=u},e.destroy=function(){this.unregisterListener(),this.hls.config.capLevelToPlayerSize&&this.stopCapping(),this.media=null,this.clientRect=null,this.hls=this.streamController=null},e.registerListeners=function(){var u=this.hls;u.on(V.Events.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),u.on(V.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),u.on(V.Events.MANIFEST_PARSED,this.onManifestParsed,this),u.on(V.Events.BUFFER_CODECS,this.onBufferCodecs,this),u.on(V.Events.MEDIA_DETACHING,this.onMediaDetaching,this)},e.unregisterListener=function(){var u=this.hls;u.off(V.Events.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),u.off(V.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),u.off(V.Events.MANIFEST_PARSED,this.onManifestParsed,this),u.off(V.Events.BUFFER_CODECS,this.onBufferCodecs,this),u.off(V.Events.MEDIA_DETACHING,this.onMediaDetaching,this)},e.onFpsDropLevelCapping=function(u,f){H.isLevelAllowed(f.droppedLevel,this.restrictedLevels)&&this.restrictedLevels.push(f.droppedLevel)},e.onMediaAttaching=function(u,f){this.media=f.media instanceof HTMLVideoElement?f.media:null},e.onManifestParsed=function(u,f){var l=this.hls;this.restrictedLevels=[],this.firstLevel=f.firstLevel,l.config.capLevelToPlayerSize&&f.video&&this.startCapping()},e.onBufferCodecs=function(u,f){var l=this.hls;l.config.capLevelToPlayerSize&&f.video&&this.startCapping()},e.onMediaDetaching=function(){this.stopCapping()},e.detectPlayerSize=function(){if(this.media&&this.mediaHeight>0&&this.mediaWidth>0){var u=this.hls.levels;if(u.length){var f=this.hls;f.autoLevelCapping=this.getMaxLevel(u.length-1),f.autoLevelCapping>this.autoLevelCapping&&this.streamController&&this.streamController.nextLevelSwitch(),this.autoLevelCapping=f.autoLevelCapping}}},e.getMaxLevel=function(u){var f=this,l=this.hls.levels;if(!l.length)return-1;var s=l.filter(function(i,o){return H.isLevelAllowed(o,f.restrictedLevels)&&o<=u});return this.clientRect=null,H.getMaxLevelByMediaSize(s,this.mediaWidth,this.mediaHeight)},e.startCapping=function(){if(this.timer)return;this.autoLevelCapping=Number.POSITIVE_INFINITY,this.hls.firstLevel=this.getMaxLevel(this.firstLevel),self.clearInterval(this.timer),this.timer=self.setInterval(this.detectPlayerSize.bind(this),1e3),this.detectPlayerSize()},e.stopCapping=function(){this.restrictedLevels=[],this.firstLevel=-1,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.timer&&(self.clearInterval(this.timer),this.timer=void 0)},e.getDimensions=function(){if(this.clientRect)return this.clientRect;var u=this.media,f={width:0,height:0};if(u){var l=u.getBoundingClientRect();f.width=l.width,f.height=l.height,!f.width&&!f.height&&(f.width=l.right-l.left||u.width||0,f.height=l.bottom-l.top||u.height||0)}return this.clientRect=f,f},H.isLevelAllowed=function(u,f){return f===void 0&&(f=[]),f.indexOf(u)===-1},H.getMaxLevelByMediaSize=function(u,f,l){if(!u||!u.length)return-1;for(var s=function(n,t){return t?n.width!==t.width||n.height!==t.height:!0},i=u.length-1,o=0;o<u.length;o+=1){var r=u[o];if((r.width>=f||r.height>=l)&&s(r,u[o+1])){i=o;break}}return i},L(H,[{key:"mediaWidth",get:function(){return this.getDimensions().width*H.contentScaleFactor}},{key:"mediaHeight",get:function(){return this.getDimensions().height*H.contentScaleFactor}}],[{key:"contentScaleFactor",get:function(){var u=1;try{u=self.devicePixelRatio}catch(f){}return u}}]),H}();z.default=$},"./src/controller/cmcd-controller.ts":function(Ae,z,U){"use strict";U.r(z),U.d(z,"default",function(){return s});var V=U("./src/events.ts"),N=U("./src/types/cmcd.ts"),L=U("./src/utils/buffer-helper.ts"),$=U("./src/utils/logger.ts");function H(i,o){for(var r=0;r<o.length;r++){var a=o[r];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(i,a.key,a)}}function e(i,o,r){return o&&H(i.prototype,o),r&&H(i,r),i}function R(i,o){var r=typeof Symbol!="undefined"&&i[Symbol.iterator]||i["@@iterator"];if(r)return(r=r.call(i)).next.bind(r);if(Array.isArray(i)||(r=u(i))||o&&i&&typeof i.length=="number"){r&&(i=r);var a=0;return function(){return a>=i.length?{done:!0}:{done:!1,value:i[a++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function u(i,o){if(!i)return;if(typeof i=="string")return f(i,o);var r=Object.prototype.toString.call(i).slice(8,-1);if(r==="Object"&&i.constructor&&(r=i.constructor.name),r==="Map"||r==="Set")return Array.from(i);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return f(i,o)}function f(i,o){(o==null||o>i.length)&&(o=i.length);for(var r=0,a=new Array(o);r<o;r++)a[r]=i[r];return a}function l(){return l=Object.assign||function(i){for(var o=1;o<arguments.length;o++){var r=arguments[o];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(i[a]=r[a])}return i},l.apply(this,arguments)}var s=function(){function i(r){var a=this;this.hls=void 0,this.config=void 0,this.media=void 0,this.sid=void 0,this.cid=void 0,this.useHeaders=!1,this.initialized=!1,this.starved=!1,this.buffering=!0,this.audioBuffer=void 0,this.videoBuffer=void 0,this.onWaiting=function(){a.initialized&&(a.starved=!0),a.buffering=!0},this.onPlaying=function(){a.initialized||(a.initialized=!0),a.buffering=!1},this.applyPlaylistData=function(E){try{a.apply(E,{ot:N.CMCDObjectType.MANIFEST,su:!a.initialized})}catch(b){$.logger.warn("Could not generate manifest CMCD data.",b)}},this.applyFragmentData=function(E){try{var b=E.frag,_=a.hls.levels[b.level],B=a.getObjectType(b),x={d:b.duration*1e3,ot:B};(B===N.CMCDObjectType.VIDEO||B===N.CMCDObjectType.AUDIO||B==N.CMCDObjectType.MUXED)&&(x.br=_.bitrate/1e3,x.tb=a.getTopBandwidth(B),x.bl=a.getBufferLength(B)),a.apply(E,x)}catch(h){$.logger.warn("Could not generate segment CMCD data.",h)}},this.hls=r;var n=this.config=r.config,t=n.cmcd;t!=null&&(n.pLoader=this.createPlaylistLoader(),n.fLoader=this.createFragmentLoader(),this.sid=t.sessionId||i.uuid(),this.cid=t.contentId,this.useHeaders=t.useHeaders===!0,this.registerListeners())}var o=i.prototype;return o.registerListeners=function(){var a=this.hls;a.on(V.Events.MEDIA_ATTACHED,this.onMediaAttached,this),a.on(V.Events.MEDIA_DETACHED,this.onMediaDetached,this),a.on(V.Events.BUFFER_CREATED,this.onBufferCreated,this)},o.unregisterListeners=function(){var a=this.hls;a.off(V.Events.MEDIA_ATTACHED,this.onMediaAttached,this),a.off(V.Events.MEDIA_DETACHED,this.onMediaDetached,this),a.off(V.Events.BUFFER_CREATED,this.onBufferCreated,this),this.onMediaDetached()},o.destroy=function(){this.unregisterListeners(),this.hls=this.config=this.audioBuffer=this.videoBuffer=null},o.onMediaAttached=function(a,n){this.media=n.media,this.media.addEventListener("waiting",this.onWaiting),this.media.addEventListener("playing",this.onPlaying)},o.onMediaDetached=function(){if(!this.media)return;this.media.removeEventListener("waiting",this.onWaiting),this.media.removeEventListener("playing",this.onPlaying),this.media=null},o.onBufferCreated=function(a,n){var t,E;this.audioBuffer=(t=n.tracks.audio)===null||t===void 0?void 0:t.buffer,this.videoBuffer=(E=n.tracks.video)===null||E===void 0?void 0:E.buffer},o.createData=function(){var a;return{v:N.CMCDVersion,sf:N.CMCDStreamingFormat.HLS,sid:this.sid,cid:this.cid,pr:(a=this.media)===null||a===void 0?void 0:a.playbackRate,mtp:this.hls.bandwidthEstimate/1e3}},o.apply=function(a,n){n===void 0&&(n={}),l(n,this.createData());var t=n.ot===N.CMCDObjectType.INIT||n.ot===N.CMCDObjectType.VIDEO||n.ot===N.CMCDObjectType.MUXED;if(this.starved&&t&&(n.bs=!0,n.su=!0,this.starved=!1),n.su==null&&(n.su=this.buffering),this.useHeaders){var E=i.toHeaders(n);if(!Object.keys(E).length)return;a.headers||(a.headers={}),l(a.headers,E)}else{var b=i.toQuery(n);if(!b)return;a.url=i.appendQueryToUri(a.url,b)}},o.getObjectType=function(a){var n=a.type;return n==="subtitle"?N.CMCDObjectType.TIMED_TEXT:a.sn==="initSegment"?N.CMCDObjectType.INIT:n==="audio"?N.CMCDObjectType.AUDIO:n==="main"?this.hls.audioTracks.length?N.CMCDObjectType.VIDEO:N.CMCDObjectType.MUXED:void 0},o.getTopBandwidth=function(a){for(var n=0,t=a===N.CMCDObjectType.AUDIO?this.hls.audioTracks:this.hls.levels,E=R(t),b;!(b=E()).done;){var _=b.value;_.bitrate>n&&(n=_.bitrate)}return n>0?n:NaN},o.getBufferLength=function(a){var n=this.hls.media,t=a===N.CMCDObjectType.AUDIO?this.audioBuffer:this.videoBuffer;if(!t||!n)return NaN;var E=L.BufferHelper.bufferInfo(t,n.currentTime,this.config.maxBufferHole);return E.len*1e3},o.createPlaylistLoader=function(){var a=this.config.pLoader,n=this.applyPlaylistData,t=a||this.config.loader;return function(){function E(_){this.loader=void 0,this.loader=new t(_)}var b=E.prototype;return b.destroy=function(){this.loader.destroy()},b.abort=function(){this.loader.abort()},b.load=function(B,x,h){n(B),this.loader.load(B,x,h)},e(E,[{key:"stats",get:function(){return this.loader.stats}},{key:"context",get:function(){return this.loader.context}}]),E}()},o.createFragmentLoader=function(){var a=this.config.fLoader,n=this.applyFragmentData,t=a||this.config.loader;return function(){function E(_){this.loader=void 0,this.loader=new t(_)}var b=E.prototype;return b.destroy=function(){this.loader.destroy()},b.abort=function(){this.loader.abort()},b.load=function(B,x,h){n(B),this.loader.load(B,x,h)},e(E,[{key:"stats",get:function(){return this.loader.stats}},{key:"context",get:function(){return this.loader.context}}]),E}()},i.uuid=function(){var a=URL.createObjectURL(new Blob),n=a.toString();return URL.revokeObjectURL(a),n.substr(n.lastIndexOf("/")+1)},i.serialize=function(a){for(var n=[],t=function(k){return!Number.isNaN(k)&&k!=null&&k!==""&&k!==!1},E=function(k){return Math.round(k)},b=function(k){return E(k/100)*100},_=function(k){return encodeURIComponent(k)},B={br:E,d:E,bl:b,dl:b,mtp:b,nor:_,rtp:b,tb:E},x=Object.keys(a||{}).sort(),h=R(x),d;!(d=h()).done;){var A=d.value,c=a[A];if(!t(c))continue;if(A==="v"&&c===1)continue;if(A=="pr"&&c===1)continue;var w=B[A];w&&(c=w(c));var m=typeof c,g=void 0;A==="ot"||A==="sf"||A==="st"?g=A+"="+c:m==="boolean"?g=A:m==="number"?g=A+"="+c:g=A+"="+JSON.stringify(c),n.push(g)}return n.join(",")},i.toHeaders=function(a){for(var n=Object.keys(a),t={},E=["Object","Request","Session","Status"],b=[{},{},{},{}],_={br:0,d:0,ot:0,tb:0,bl:1,dl:1,mtp:1,nor:1,nrr:1,su:1,cid:2,pr:2,sf:2,sid:2,st:2,v:2,bs:3,rtp:3},B=0,x=n;B<x.length;B++){var h=x[B],d=_[h]!=null?_[h]:1;b[d][h]=a[h]}for(var A=0;A<b.length;A++){var c=i.serialize(b[A]);c&&(t["CMCD-"+E[A]]=c)}return t},i.toQuery=function(a){return"CMCD="+encodeURIComponent(i.serialize(a))},i.appendQueryToUri=function(a,n){if(!n)return a;var t=a.includes("?")?"&":"?";return""+a+t+n},i}()},"./src/controller/eme-controller.ts":function(Ae,z,U){"use strict";U.r(z);var V=U("./src/events.ts"),N=U("./src/errors.ts"),L=U("./src/utils/logger.ts"),$=U("./src/utils/mediakeys-helper.ts");function H(s,i){for(var o=0;o<i.length;o++){var r=i[o];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(s,r.key,r)}}function e(s,i,o){return i&&H(s.prototype,i),o&&H(s,o),s}var R=3,u=function(i,o,r){var a={audioCapabilities:[],videoCapabilities:[]};return i.forEach(function(n){a.audioCapabilities.push({contentType:'audio/mp4; codecs="'+n+'"',robustness:r.audioRobustness||""})}),o.forEach(function(n){a.videoCapabilities.push({contentType:'video/mp4; codecs="'+n+'"',robustness:r.videoRobustness||""})}),[a]},f=function(i,o,r,a){switch(i){case $.KeySystems.WIDEVINE:return u(o,r,a);default:throw new Error("Unknown key-system: "+i)}},l=function(){function s(o){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=o,this._config=o.config,this._widevineLicenseUrl=this._config.widevineLicenseUrl,this._licenseXhrSetup=this._config.licenseXhrSetup,this._licenseResponseCallback=this._config.licenseResponseCallback,this._emeEnabled=this._config.emeEnabled,this._requestMediaKeySystemAccess=this._config.requestMediaKeySystemAccessFunc,this._drmSystemOptions=this._config.drmSystemOptions,this._registerListeners()}var i=s.prototype;return i.destroy=function(){this._unregisterListeners(),this.hls=this._onMediaEncrypted=null,this._requestMediaKeySystemAccess=null},i._registerListeners=function(){this.hls.on(V.Events.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.on(V.Events.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.on(V.Events.MANIFEST_PARSED,this.onManifestParsed,this)},i._unregisterListeners=function(){this.hls.off(V.Events.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.off(V.Events.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.off(V.Events.MANIFEST_PARSED,this.onManifestParsed,this)},i.getLicenseServerUrl=function(r){switch(r){case $.KeySystems.WIDEVINE:if(!this._widevineLicenseUrl)break;return this._widevineLicenseUrl}throw new Error('no license server URL configured for key-system "'+r+'"')},i._attemptKeySystemAccess=function(r,a,n){var t=this,E=f(r,a,n,this._drmSystemOptions);L.logger.log("Requesting encrypted media key-system access");var b=this.requestMediaKeySystemAccess(r,E);this.mediaKeysPromise=b.then(function(_){return t._onMediaKeySystemAccessObtained(r,_)}),b.catch(function(_){L.logger.error('Failed to obtain key-system "'+r+'" access:',_)})},i._onMediaKeySystemAccessObtained=function(r,a){var n=this;L.logger.log('Access for key-system "'+r+'" obtained');var t={mediaKeysSessionInitialized:!1,mediaKeySystemAccess:a,mediaKeySystemDomain:r};this._mediaKeysList.push(t);var E=Promise.resolve().then(function(){return a.createMediaKeys()}).then(function(b){return t.mediaKeys=b,L.logger.log('Media-keys created for key-system "'+r+'"'),n._onMediaKeysCreated(),b});return E.catch(function(b){L.logger.error("Failed to create media-keys:",b)}),E},i._onMediaKeysCreated=function(){var r=this;this._mediaKeysList.forEach(function(a){a.mediaKeysSession||(a.mediaKeysSession=a.mediaKeys.createSession(),r._onNewMediaKeySession(a.mediaKeysSession))})},i._onNewMediaKeySession=function(r){var a=this;L.logger.log("New key-system session "+r.sessionId),r.addEventListener("message",function(n){a._onKeySessionMessage(r,n.message)},!1)},i._onKeySessionMessage=function(r,a){L.logger.log("Got EME message event, creating license request"),this._requestLicense(a,function(n){L.logger.log("Received license data (length: "+(n&&n.byteLength)+"), updating key-session"),r.update(n)})},i.onMediaEncrypted=function(r){var a=this;if(L.logger.log('Media is encrypted using "'+r.initDataType+'" init data type'),!this.mediaKeysPromise){L.logger.error("Fatal: Media is encrypted but no CDM access or no keys have been requested"),this.hls.trigger(V.Events.ERROR,{type:N.ErrorTypes.KEY_SYSTEM_ERROR,details:N.ErrorDetails.KEY_SYSTEM_NO_KEYS,fatal:!0});return}var n=function(E){if(!a._media)return;a._attemptSetMediaKeys(E),a._generateRequestWithPreferredKeySession(r.initDataType,r.initData)};this.mediaKeysPromise.then(n).catch(n)},i._attemptSetMediaKeys=function(r){if(!this._media)throw new Error("Attempted to set mediaKeys without first attaching a media element");if(!this._hasSetMediaKeys){var a=this._mediaKeysList[0];if(!a||!a.mediaKeys){L.logger.error("Fatal: Media is encrypted but no CDM access or no keys have been obtained yet"),this.hls.trigger(V.Events.ERROR,{type:N.ErrorTypes.KEY_SYSTEM_ERROR,details:N.ErrorDetails.KEY_SYSTEM_NO_KEYS,fatal:!0});return}L.logger.log("Setting keys for encrypted media"),this._media.setMediaKeys(a.mediaKeys),this._hasSetMediaKeys=!0}},i._generateRequestWithPreferredKeySession=function(r,a){var n=this,t=this._mediaKeysList[0];if(!t){L.logger.error("Fatal: Media is encrypted but not any key-system access has been obtained yet"),this.hls.trigger(V.Events.ERROR,{type:N.ErrorTypes.KEY_SYSTEM_ERROR,details:N.ErrorDetails.KEY_SYSTEM_NO_ACCESS,fatal:!0});return}if(t.mediaKeysSessionInitialized){L.logger.warn("Key-Session already initialized but requested again");return}var E=t.mediaKeysSession;if(!E){L.logger.error("Fatal: Media is encrypted but no key-session existing"),this.hls.trigger(V.Events.ERROR,{type:N.ErrorTypes.KEY_SYSTEM_ERROR,details:N.ErrorDetails.KEY_SYSTEM_NO_SESSION,fatal:!0});return}if(!a){L.logger.warn("Fatal: initData required for generating a key session is null"),this.hls.trigger(V.Events.ERROR,{type:N.ErrorTypes.KEY_SYSTEM_ERROR,details:N.ErrorDetails.KEY_SYSTEM_NO_INIT_DATA,fatal:!0});return}L.logger.log('Generating key-session request for "'+r+'" init data type'),t.mediaKeysSessionInitialized=!0,E.generateRequest(r,a).then(function(){L.logger.debug("Key-session generation succeeded")}).catch(function(b){L.logger.error("Error generating key-session request:",b),n.hls.trigger(V.Events.ERROR,{type:N.ErrorTypes.KEY_SYSTEM_ERROR,details:N.ErrorDetails.KEY_SYSTEM_NO_SESSION,fatal:!1})})},i._createLicenseXhr=function(r,a,n){var t=new XMLHttpRequest;t.responseType="arraybuffer",t.onreadystatechange=this._onLicenseRequestReadyStageChange.bind(this,t,r,a,n);var E=this._licenseXhrSetup;if(E)try{E.call(this.hls,t,r),E=void 0}catch(b){L.logger.error(b)}try{t.readyState||t.open("POST",r,!0),E&&E.call(this.hls,t,r)}catch(b){throw new Error("issue setting up KeySystem license XHR "+b)}return t},i._onLicenseRequestReadyStageChange=function(r,a,n,t){switch(r.readyState){case 4:if(r.status===200){this._requestLicenseFailureCount=0,L.logger.log("License request succeeded");var E=r.response,b=this._licenseResponseCallback;if(b)try{E=b.call(this.hls,r,a)}catch(B){L.logger.error(B)}t(E)}else{if(L.logger.error("License Request XHR failed ("+a+"). Status: "+r.status+" ("+r.statusText+")"),this._requestLicenseFailureCount++,this._requestLicenseFailureCount>R){this.hls.trigger(V.Events.ERROR,{type:N.ErrorTypes.KEY_SYSTEM_ERROR,details:N.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0});return}var _=R-this._requestLicenseFailureCount+1;L.logger.warn("Retrying license request, "+_+" attempts left"),this._requestLicense(n,t)}break}},i._generateLicenseRequestChallenge=function(r,a){switch(r.mediaKeySystemDomain){case $.KeySystems.WIDEVINE:return a}throw new Error("unsupported key-system: "+r.mediaKeySystemDomain)},i._requestLicense=function(r,a){L.logger.log("Requesting content license for key-system");var n=this._mediaKeysList[0];if(!n){L.logger.error("Fatal error: Media is encrypted but no key-system access has been obtained yet"),this.hls.trigger(V.Events.ERROR,{type:N.ErrorTypes.KEY_SYSTEM_ERROR,details:N.ErrorDetails.KEY_SYSTEM_NO_ACCESS,fatal:!0});return}try{var t=this.getLicenseServerUrl(n.mediaKeySystemDomain),E=this._createLicenseXhr(t,r,a);L.logger.log("Sending license request to URL: "+t);var b=this._generateLicenseRequestChallenge(n,r);E.send(b)}catch(_){L.logger.error("Failure requesting DRM license: "+_),this.hls.trigger(V.Events.ERROR,{type:N.ErrorTypes.KEY_SYSTEM_ERROR,details:N.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0})}},i.onMediaAttached=function(r,a){if(!this._emeEnabled)return;var n=a.media;this._media=n,n.addEventListener("encrypted",this._onMediaEncrypted)},i.onMediaDetached=function(){var r=this._media,a=this._mediaKeysList;if(!r)return;r.removeEventListener("encrypted",this._onMediaEncrypted),this._media=null,this._mediaKeysList=[],Promise.all(a.map(function(n){if(n.mediaKeysSession)return n.mediaKeysSession.close().catch(function(){})})).then(function(){return r.setMediaKeys(null)}).catch(function(){})},i.onManifestParsed=function(r,a){if(!this._emeEnabled)return;var n=a.levels.map(function(E){return E.audioCodec}).filter(function(E){return!!E}),t=a.levels.map(function(E){return E.videoCodec}).filter(function(E){return!!E});this._attemptKeySystemAccess($.KeySystems.WIDEVINE,n,t)},e(s,[{key:"requestMediaKeySystemAccess",get:function(){if(!this._requestMediaKeySystemAccess)throw new Error("No requestMediaKeySystemAccess function configured");return this._requestMediaKeySystemAccess}}]),s}();z.default=l},"./src/controller/fps-controller.ts":function(Ae,z,U){"use strict";U.r(z);var V=U("./src/events.ts"),N=U("./src/utils/logger.ts"),L=function(){function $(e){this.hls=void 0,this.isVideoPlaybackQualityAvailable=!1,this.timer=void 0,this.media=null,this.lastTime=void 0,this.lastDroppedFrames=0,this.lastDecodedFrames=0,this.streamController=void 0,this.hls=e,this.registerListeners()}var H=$.prototype;return H.setStreamController=function(R){this.streamController=R},H.registerListeners=function(){this.hls.on(V.Events.MEDIA_ATTACHING,this.onMediaAttaching,this)},H.unregisterListeners=function(){this.hls.off(V.Events.MEDIA_ATTACHING,this.onMediaAttaching)},H.destroy=function(){this.timer&&clearInterval(this.timer),this.unregisterListeners(),this.isVideoPlaybackQualityAvailable=!1,this.media=null},H.onMediaAttaching=function(R,u){var f=this.hls.config;if(f.capLevelOnFPSDrop){var l=u.media instanceof self.HTMLVideoElement?u.media:null;this.media=l,l&&typeof l.getVideoPlaybackQuality=="function"&&(this.isVideoPlaybackQualityAvailable=!0),self.clearInterval(this.timer),this.timer=self.setInterval(this.checkFPSInterval.bind(this),f.fpsDroppedMonitoringPeriod)}},H.checkFPS=function(R,u,f){var l=performance.now();if(u){if(this.lastTime){var s=l-this.lastTime,i=f-this.lastDroppedFrames,o=u-this.lastDecodedFrames,r=1e3*i/s,a=this.hls;if(a.trigger(V.Events.FPS_DROP,{currentDropped:i,currentDecoded:o,totalDroppedFrames:f}),r>0&&i>a.config.fpsDroppedMonitoringThreshold*o){var n=a.currentLevel;N.logger.warn("drop FPS ratio greater than max allowed value for currentLevel: "+n),n>0&&(a.autoLevelCapping===-1||a.autoLevelCapping>=n)&&(n=n-1,a.trigger(V.Events.FPS_DROP_LEVEL_CAPPING,{level:n,droppedLevel:a.currentLevel}),a.autoLevelCapping=n,this.streamController.nextLevelSwitch())}}this.lastTime=l,this.lastDroppedFrames=f,this.lastDecodedFrames=u}},H.checkFPSInterval=function(){var R=this.media;if(R)if(this.isVideoPlaybackQualityAvailable){var u=R.getVideoPlaybackQuality();this.checkFPS(R,u.totalVideoFrames,u.droppedVideoFrames)}else this.checkFPS(R,R.webkitDecodedFrameCount,R.webkitDroppedFrameCount)},$}();z.default=L},"./src/controller/fragment-finders.ts":function(Ae,z,U){"use strict";U.r(z),U.d(z,"findFragmentByPDT",function(){return L}),U.d(z,"findFragmentByPTS",function(){return $}),U.d(z,"fragmentWithinToleranceTest",function(){return H}),U.d(z,"pdtWithinToleranceTest",function(){return e}),U.d(z,"findFragWithCC",function(){return R});var V=U("./src/polyfills/number.ts"),N=U("./src/utils/binary-search.ts");function L(u,f,l){if(f===null||!Array.isArray(u)||!u.length||!Object(V.isFiniteNumber)(f))return null;var s=u[0].programDateTime;if(f<(s||0))return null;var i=u[u.length-1].endProgramDateTime;if(f>=(i||0))return null;l=l||0;for(var o=0;o<u.length;++o){var r=u[o];if(e(f,l,r))return r}return null}function $(u,f,l,s){l===void 0&&(l=0),s===void 0&&(s=0);var i=null;if(u?i=f[u.sn-f[0].sn+1]||null:l===0&&f[0].start===0&&(i=f[0]),i&&H(l,s,i)===0)return i;var o=N.default.search(f,H.bind(null,l,s));return o||i}function H(u,f,l){u===void 0&&(u=0),f===void 0&&(f=0);var s=Math.min(f,l.duration+(l.deltaPTS?l.deltaPTS:0));return l.start+l.duration-s<=u?1:l.start-s>u&&l.start?-1:0}function e(u,f,l){var s=Math.min(f,l.duration+(l.deltaPTS?l.deltaPTS:0))*1e3,i=l.endProgramDateTime||0;return i-s>u}function R(u,f){return N.default.search(u,function(l){return l.cc<f?1:l.cc>f?-1:0})}},"./src/controller/fragment-tracker.ts":function(Ae,z,U){"use strict";U.r(z),U.d(z,"FragmentState",function(){return L}),U.d(z,"FragmentTracker",function(){return $});var V=U("./src/events.ts"),N=U("./src/types/loader.ts"),L;(function(R){R.NOT_LOADED="NOT_LOADED",R.BACKTRACKED="BACKTRACKED",R.APPENDING="APPENDING",R.PARTIAL="PARTIAL",R.OK="OK"})(L||(L={}));var $=function(){function R(f){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=f,this._registerListeners()}var u=R.prototype;return u._registerListeners=function(){var l=this.hls;l.on(V.Events.BUFFER_APPENDED,this.onBufferAppended,this),l.on(V.Events.FRAG_BUFFERED,this.onFragBuffered,this),l.on(V.Events.FRAG_LOADED,this.onFragLoaded,this)},u._unregisterListeners=function(){var l=this.hls;l.off(V.Events.BUFFER_APPENDED,this.onBufferAppended,this),l.off(V.Events.FRAG_BUFFERED,this.onFragBuffered,this),l.off(V.Events.FRAG_LOADED,this.onFragLoaded,this)},u.destroy=function(){this._unregisterListeners(),this.fragments=this.timeRanges=null},u.getAppendedFrag=function(l,s){if(s===N.PlaylistLevelType.MAIN){var i=this.activeFragment,o=this.activeParts;if(!i)return null;if(o)for(var r=o.length;r--;){var a=o[r],n=a?a.end:i.appendedPTS;if(a.start<=l&&n!==void 0&&l<=n)return r>9&&(this.activeParts=o.slice(r-9)),a}else if(i.start<=l&&i.appendedPTS!==void 0&&l<=i.appendedPTS)return i}return this.getBufferedFrag(l,s)},u.getBufferedFrag=function(l,s){for(var i=this.fragments,o=Object.keys(i),r=o.length;r--;){var a=i[o[r]];if((a==null?void 0:a.body.type)===s&&a.buffered){var n=a.body;if(n.start<=l&&l<=n.end)return n}}return null},u.detectEvictedFragments=function(l,s,i){var o=this;Object.keys(this.fragments).forEach(function(r){var a=o.fragments[r];if(!a)return;if(!a.buffered){a.body.type===i&&o.removeFragment(a.body);return}var n=a.range[l];if(!n)return;n.time.some(function(t){var E=!o.isTimeBuffered(t.startPTS,t.endPTS,s);return E&&o.removeFragment(a.body),E})})},u.detectPartialFragments=function(l){var s=this,i=this.timeRanges,o=l.frag,r=l.part;if(!i||o.sn==="initSegment")return;var a=e(o),n=this.fragments[a];if(!n)return;Object.keys(i).forEach(function(t){var E=o.elementaryStreams[t];if(!E)return;var b=i[t],_=r!==null||E.partial===!0;n.range[t]=s.getBufferedTimes(o,r,_,b)}),n.backtrack=n.loaded=null,Object.keys(n.range).length?n.buffered=!0:this.removeFragment(n.body)},u.fragBuffered=function(l){var s=e(l),i=this.fragments[s];i&&(i.backtrack=i.loaded=null,i.buffered=!0)},u.getBufferedTimes=function(l,s,i,o){for(var r={time:[],partial:i},a=s?s.start:l.start,n=s?s.end:l.end,t=l.minEndPTS||n,E=l.maxStartPTS||a,b=0;b<o.length;b++){var _=o.start(b)-this.bufferPadding,B=o.end(b)+this.bufferPadding;if(E>=_&&t<=B){r.time.push({startPTS:Math.max(a,o.start(b)),endPTS:Math.min(n,o.end(b))});break}else if(a<B&&n>_)r.partial=!0,r.time.push({startPTS:Math.max(a,o.start(b)),endPTS:Math.min(n,o.end(b))});else if(n<=_)break}return r},u.getPartialFragment=function(l){var s=null,i,o,r,a=0,n=this.bufferPadding,t=this.fragments;return Object.keys(t).forEach(function(E){var b=t[E];if(!b)return;H(b)&&(o=b.body.start-n,r=b.body.end+n,l>=o&&l<=r&&(i=Math.min(l-o,r-l),a<=i&&(s=b.body,a=i)))}),s},u.getState=function(l){var s=e(l),i=this.fragments[s];return i?i.buffered?H(i)?L.PARTIAL:L.OK:i.backtrack?L.BACKTRACKED:L.APPENDING:L.NOT_LOADED},u.backtrack=function(l,s){var i=e(l),o=this.fragments[i];if(!o||o.backtrack)return null;var r=o.backtrack=s||o.loaded;return o.loaded=null,r},u.getBacktrackData=function(l){var s=e(l),i=this.fragments[s];if(i){var o,r=i.backtrack;if(r!=null&&(o=r.payload)!==null&&o!==void 0&&o.byteLength)return r;this.removeFragment(l)}return null},u.isTimeBuffered=function(l,s,i){for(var o,r,a=0;a<i.length;a++){if(o=i.start(a)-this.bufferPadding,r=i.end(a)+this.bufferPadding,l>=o&&s<=r)return!0;if(s<=o)return!1}return!1},u.onFragLoaded=function(l,s){var i=s.frag,o=s.part;if(i.sn==="initSegment"||i.bitrateTest||o)return;var r=e(i);this.fragments[r]={body:i,loaded:s,backtrack:null,buffered:!1,range:Object.create(null)}},u.onBufferAppended=function(l,s){var i=this,o=s.frag,r=s.part,a=s.timeRanges;if(o.type===N.PlaylistLevelType.MAIN)if(this.activeFragment=o,r){var n=this.activeParts;n||(this.activeParts=n=[]),n.push(r)}else this.activeParts=null;this.timeRanges=a,Object.keys(a).forEach(function(t){var E=a[t];if(i.detectEvictedFragments(t,E),!r)for(var b=0;b<E.length;b++)o.appendedPTS=Math.max(E.end(b),o.appendedPTS||0)})},u.onFragBuffered=function(l,s){this.detectPartialFragments(s)},u.hasFragment=function(l){var s=e(l);return!!this.fragments[s]},u.removeFragmentsInRange=function(l,s,i){var o=this;Object.keys(this.fragments).forEach(function(r){var a=o.fragments[r];if(!a)return;if(a.buffered){var n=a.body;n.type===i&&n.start<s&&n.end>l&&o.removeFragment(n)}})},u.removeFragment=function(l){var s=e(l);l.stats.loaded=0,l.clearElementaryStreamInfo(),delete this.fragments[s]},u.removeAllFragments=function(){this.fragments=Object.create(null),this.activeFragment=null,this.activeParts=null},R}();function H(R){var u,f;return R.buffered&&(((u=R.range.video)===null||u===void 0?void 0:u.partial)||((f=R.range.audio)===null||f===void 0?void 0:f.partial))}function e(R){return R.type+"_"+R.level+"_"+R.urlId+"_"+R.sn}},"./src/controller/gap-controller.ts":function(Ae,z,U){"use strict";U.r(z),U.d(z,"STALL_MINIMUM_DURATION_MS",function(){return H}),U.d(z,"MAX_START_GAP_JUMP",function(){return e}),U.d(z,"SKIP_BUFFER_HOLE_STEP_SECONDS",function(){return R}),U.d(z,"SKIP_BUFFER_RANGE_START",function(){return u}),U.d(z,"default",function(){return f});var V=U("./src/utils/buffer-helper.ts"),N=U("./src/errors.ts"),L=U("./src/events.ts"),$=U("./src/utils/logger.ts"),H=250,e=2,R=.1,u=.05,f=function(){function l(i,o,r,a){this.config=void 0,this.media=void 0,this.fragmentTracker=void 0,this.hls=void 0,this.nudgeRetry=0,this.stallReported=!1,this.stalled=null,this.moved=!1,this.seeking=!1,this.config=i,this.media=o,this.fragmentTracker=r,this.hls=a}var s=l.prototype;return s.destroy=function(){this.hls=this.fragmentTracker=this.media=null},s.poll=function(o){var r=this.config,a=this.media,n=this.stalled,t=a.currentTime,E=a.seeking,b=this.seeking&&!E,_=!this.seeking&&E;if(this.seeking=E,t!==o){if(this.moved=!0,n!==null){if(this.stallReported){var B=self.performance.now()-n;$.logger.warn("playback not stuck anymore @"+t+", after "+Math.round(B)+"ms"),this.stallReported=!1}this.stalled=null,this.nudgeRetry=0}return}if((_||b)&&(this.stalled=null),a.paused||a.ended||a.playbackRate===0||!V.BufferHelper.getBuffered(a).length)return;var x=V.BufferHelper.bufferInfo(a,t,0),h=x.len>0,d=x.nextStart||0;if(!h&&!d)return;if(E){var A=x.len>e,c=!d||d-t>e&&!this.fragmentTracker.getPartialFragment(t);if(A||c)return;this.moved=!1}if(!this.moved&&this.stalled!==null){var w,m=Math.max(d,x.start||0)-t,g=this.hls.levels?this.hls.levels[this.hls.currentLevel]:null,F=g==null||((w=g.details)===null||w===void 0)?void 0:w.live,k=F?g.details.targetduration*2:e;if(m>0&&m<=k){this._trySkipBufferHole(null);return}}var S=self.performance.now();if(n===null){this.stalled=S;return}var Q=S-n;!E&&Q>=H&&this._reportStall(x.len);var X=V.BufferHelper.bufferInfo(a,t,r.maxBufferHole);this._tryFixBufferStall(X,Q)},s._tryFixBufferStall=function(o,r){var a=this.config,n=this.fragmentTracker,t=this.media,E=t.currentTime,b=n.getPartialFragment(E);if(b){var _=this._trySkipBufferHole(b);if(_)return}o.len>a.maxBufferHole&&r>a.highBufferWatchdogPeriod*1e3&&($.logger.warn("Trying to nudge playhead over buffer-hole"),this.stalled=null,this._tryNudgeBuffer())},s._reportStall=function(o){var r=this.hls,a=this.media,n=this.stallReported;n||(this.stallReported=!0,$.logger.warn("Playback stalling at @"+a.currentTime+" due to low buffer (buffer="+o+")"),r.trigger(L.Events.ERROR,{type:N.ErrorTypes.MEDIA_ERROR,details:N.ErrorDetails.BUFFER_STALLED_ERROR,fatal:!1,buffer:o}))},s._trySkipBufferHole=function(o){for(var r=this.config,a=this.hls,n=this.media,t=n.currentTime,E=0,b=V.BufferHelper.getBuffered(n),_=0;_<b.length;_++){var B=b.start(_);if(t+r.maxBufferHole>=E&&t<B){var x=Math.max(B+u,n.currentTime+R);return $.logger.warn("skipping hole, adjusting currentTime from "+t+" to "+x),this.moved=!0,this.stalled=null,n.currentTime=x,o&&a.trigger(L.Events.ERROR,{type:N.ErrorTypes.MEDIA_ERROR,details:N.ErrorDetails.BUFFER_SEEK_OVER_HOLE,fatal:!1,reason:"fragment loaded with buffer holes, seeking from "+t+" to "+x,frag:o}),x}E=b.end(_)}return 0},s._tryNudgeBuffer=function(){var o=this.config,r=this.hls,a=this.media,n=a.currentTime,t=(this.nudgeRetry||0)+1;if(this.nudgeRetry=t,t<o.nudgeMaxRetry){var E=n+t*o.nudgeOffset;$.logger.warn("Nudging 'currentTime' from "+n+" to "+E),a.currentTime=E,r.trigger(L.Events.ERROR,{type:N.ErrorTypes.MEDIA_ERROR,details:N.ErrorDetails.BUFFER_NUDGE_ON_STALL,fatal:!1})}else $.logger.error("Playhead still not moving while enough data buffered @"+n+" after "+o.nudgeMaxRetry+" nudges"),r.trigger(L.Events.ERROR,{type:N.ErrorTypes.MEDIA_ERROR,details:N.ErrorDetails.BUFFER_STALLED_ERROR,fatal:!0})},l}()},"./src/controller/id3-track-controller.ts":function(Ae,z,U){"use strict";U.r(z);var V=U("./src/events.ts"),N=U("./src/utils/texttrack-utils.ts"),L=U("./src/demux/id3.ts"),$=.25,H=function(){function e(u){this.hls=void 0,this.id3Track=null,this.media=null,this.hls=u,this._registerListeners()}var R=e.prototype;return R.destroy=function(){this._unregisterListeners()},R._registerListeners=function(){var f=this.hls;f.on(V.Events.MEDIA_ATTACHED,this.onMediaAttached,this),f.on(V.Events.MEDIA_DETACHING,this.onMediaDetaching,this),f.on(V.Events.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),f.on(V.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},R._unregisterListeners=function(){var f=this.hls;f.off(V.Events.MEDIA_ATTACHED,this.onMediaAttached,this),f.off(V.Events.MEDIA_DETACHING,this.onMediaDetaching,this),f.off(V.Events.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),f.off(V.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},R.onMediaAttached=function(f,l){this.media=l.media},R.onMediaDetaching=function(){if(!this.id3Track)return;Object(N.clearCurrentCues)(this.id3Track),this.id3Track=null,this.media=null},R.getID3Track=function(f){if(!this.media)return;for(var l=0;l<f.length;l++){var s=f[l];if(s.kind==="metadata"&&s.label==="id3")return Object(N.sendAddTrackEvent)(s,this.media),s}return this.media.addTextTrack("metadata","id3")},R.onFragParsingMetadata=function(f,l){if(!this.media)return;var s=l.frag,i=l.samples;this.id3Track||(this.id3Track=this.getID3Track(this.media.textTracks),this.id3Track.mode="hidden");for(var o=self.WebKitDataCue||self.VTTCue||self.TextTrackCue,r=0;r<i.length;r++){var a=L.getID3Frames(i[r].data);if(a){var n=i[r].pts,t=r<i.length-1?i[r+1].pts:s.end,E=t-n;E<=0&&(t=n+$);for(var b=0;b<a.length;b++){var _=a[b];if(!L.isTimeStampFrame(_)){var B=new o(n,t,"");B.value=_,this.id3Track.addCue(B)}}}}},R.onBufferFlushing=function(f,l){var s=l.startOffset,i=l.endOffset,o=l.type;if(!o||o==="audio"){var r=this.id3Track;r&&Object(N.removeCuesInRange)(r,s,i)}},e}();z.default=H},"./src/controller/latency-controller.ts":function(Ae,z,U){"use strict";U.r(z),U.d(z,"default",function(){return e});var V=U("./src/errors.ts"),N=U("./src/events.ts"),L=U("./src/utils/logger.ts");function $(R,u){for(var f=0;f<u.length;f++){var l=u[f];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(R,l.key,l)}}function H(R,u,f){return u&&$(R.prototype,u),f&&$(R,f),R}var e=function(){function R(f){var l=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 l.timeupdate()},this.hls=f,this.config=f.config,this.registerListeners()}var u=R.prototype;return u.destroy=function(){this.unregisterListeners(),this.onMediaDetaching(),this.levelDetails=null,this.hls=this.timeupdateHandler=null},u.registerListeners=function(){this.hls.on(N.Events.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.on(N.Events.MEDIA_DETACHING,this.onMediaDetaching,this),this.hls.on(N.Events.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.on(N.Events.LEVEL_UPDATED,this.onLevelUpdated,this),this.hls.on(N.Events.ERROR,this.onError,this)},u.unregisterListeners=function(){this.hls.off(N.Events.MEDIA_ATTACHED,this.onMediaAttached),this.hls.off(N.Events.MEDIA_DETACHING,this.onMediaDetaching),this.hls.off(N.Events.MANIFEST_LOADING,this.onManifestLoading),this.hls.off(N.Events.LEVEL_UPDATED,this.onLevelUpdated),this.hls.off(N.Events.ERROR,this.onError)},u.onMediaAttached=function(l,s){this.media=s.media,this.media.addEventListener("timeupdate",this.timeupdateHandler)},u.onMediaDetaching=function(){this.media&&(this.media.removeEventListener("timeupdate",this.timeupdateHandler),this.media=null)},u.onManifestLoading=function(){this.levelDetails=null,this._latency=null,this.stallCount=0},u.onLevelUpdated=function(l,s){var i=s.details;this.levelDetails=i,i.advanced&&this.timeupdate(),!i.live&&this.media&&this.media.removeEventListener("timeupdate",this.timeupdateHandler)},u.onError=function(l,s){if(s.details!==V.ErrorDetails.BUFFER_STALLED_ERROR)return;this.stallCount++,L.logger.warn("[playback-rate-controller]: Stall detected, adjusting target latency")},u.timeupdate=function(){var l=this.media,s=this.levelDetails;if(!l||!s)return;this.currentTime=l.currentTime;var i=this.computeLatency();if(i===null)return;this._latency=i;var o=this.config,r=o.lowLatencyMode,a=o.maxLiveSyncPlaybackRate;if(!r||a===1)return;var n=this.targetLatency;if(n===null)return;var t=i-n,E=Math.min(this.maxLatency,n+s.targetduration),b=t<E;if(s.live&&b&&t>.05&&this.forwardBufferLength>1){var _=Math.min(2,Math.max(1,a)),B=Math.round(2/(1+Math.exp(-.75*t-this.edgeStalled))*20)/20;l.playbackRate=Math.min(_,Math.max(1,B))}else l.playbackRate!==1&&l.playbackRate!==0&&(l.playbackRate=1)},u.estimateLiveEdge=function(){var l=this.levelDetails;return l===null?null:l.edge+l.age},u.computeLatency=function(){var l=this.estimateLiveEdge();return l===null?null:l-this.currentTime},H(R,[{key:"latency",get:function(){return this._latency||0}},{key:"maxLatency",get:function(){var l=this.config,s=this.levelDetails;return l.liveMaxLatencyDuration!==void 0?l.liveMaxLatencyDuration:s?l.liveMaxLatencyDurationCount*s.targetduration:0}},{key:"targetLatency",get:function(){var l=this.levelDetails;if(l===null)return null;var s=l.holdBack,i=l.partHoldBack,o=l.targetduration,r=this.config,a=r.liveSyncDuration,n=r.liveSyncDurationCount,t=r.lowLatencyMode,E=this.hls.userConfig,b=t&&i||s;(E.liveSyncDuration||E.liveSyncDurationCount||b===0)&&(b=a!==void 0?a:n*o);var _=o,B=1;return b+Math.min(this.stallCount*B,_)}},{key:"liveSyncPosition",get:function(){var l=this.estimateLiveEdge(),s=this.targetLatency,i=this.levelDetails;if(l===null||s===null||i===null)return null;var o=i.edge,r=l-s-this.edgeStalled,a=o-i.totalduration,n=o-(this.config.lowLatencyMode&&i.partTarget||i.targetduration);return Math.min(Math.max(a,r),n)}},{key:"drift",get:function(){var l=this.levelDetails;return l===null?1:l.drift}},{key:"edgeStalled",get:function(){var l=this.levelDetails;if(l===null)return 0;var s=(this.config.lowLatencyMode&&l.partTarget||l.targetduration)*3;return Math.max(l.age-s,0)}},{key:"forwardBufferLength",get:function(){var l=this.media,s=this.levelDetails;if(!l||!s)return 0;var i=l.buffered.length;return i?l.buffered.end(i-1):s.edge-this.currentTime}}]),R}()},"./src/controller/level-controller.ts":function(Ae,z,U){"use strict";U.r(z),U.d(z,"default",function(){return r});var V=U("./src/types/level.ts"),N=U("./src/events.ts"),L=U("./src/errors.ts"),$=U("./src/utils/codecs.ts"),H=U("./src/controller/level-helper.ts"),e=U("./src/controller/base-playlist-controller.ts"),R=U("./src/types/loader.ts");function u(){return u=Object.assign||function(a){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var E in t)Object.prototype.hasOwnProperty.call(t,E)&&(a[E]=t[E])}return a},u.apply(this,arguments)}function f(a,n){for(var t=0;t<n.length;t++){var E=n[t];E.enumerable=E.enumerable||!1,E.configurable=!0,"value"in E&&(E.writable=!0),Object.defineProperty(a,E.key,E)}}function l(a,n,t){return n&&f(a.prototype,n),t&&f(a,t),a}function s(a,n){a.prototype=Object.create(n.prototype),a.prototype.constructor=a,i(a,n)}function i(a,n){return i=Object.setPrototypeOf||function(E,b){return E.__proto__=b,E},i(a,n)}var o=/chrome|firefox/.test(navigator.userAgent.toLowerCase()),r=function(a){s(n,a);function n(E){var b;return b=a.call(this,E,"[level-controller]")||this,b._levels=[],b._firstLevel=-1,b._startLevel=void 0,b.currentLevelIndex=-1,b.manualLevelIndex=-1,b.onParsedComplete=void 0,b._registerListeners(),b}var t=n.prototype;return t._registerListeners=function(){var b=this.hls;b.on(N.Events.MANIFEST_LOADED,this.onManifestLoaded,this),b.on(N.Events.LEVEL_LOADED,this.onLevelLoaded,this),b.on(N.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),b.on(N.Events.FRAG_LOADED,this.onFragLoaded,this),b.on(N.Events.ERROR,this.onError,this)},t._unregisterListeners=function(){var b=this.hls;b.off(N.Events.MANIFEST_LOADED,this.onManifestLoaded,this),b.off(N.Events.LEVEL_LOADED,this.onLevelLoaded,this),b.off(N.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),b.off(N.Events.FRAG_LOADED,this.onFragLoaded,this),b.off(N.Events.ERROR,this.onError,this)},t.destroy=function(){this._unregisterListeners(),this.manualLevelIndex=-1,this._levels.length=0,a.prototype.destroy.call(this)},t.startLoad=function(){var b=this._levels;b.forEach(function(_){_.loadError=0}),a.prototype.startLoad.call(this)},t.onManifestLoaded=function(b,_){var B=[],x=[],h=[],d,A={},c,w=!1,m=!1,g=!1;if(_.levels.forEach(function(Q){var X=Q.attrs;w=w||!!(Q.width&&Q.height),m=m||!!Q.videoCodec,g=g||!!Q.audioCodec,o&&Q.audioCodec&&Q.audioCodec.indexOf("mp4a.40.34")!==-1&&(Q.audioCodec=void 0);var P=Q.bitrate+"-"+Q.attrs.RESOLUTION+"-"+Q.attrs.CODECS;c=A[P],c?c.url.push(Q.url):(c=new V.Level(Q),A[P]=c,B.push(c)),X&&(X.AUDIO&&Object(H.addGroupId)(c,"audio",X.AUDIO),X.SUBTITLES&&Object(H.addGroupId)(c,"text",X.SUBTITLES))}),(w||m)&&g&&(B=B.filter(function(Q){var X=Q.videoCodec,P=Q.width,q=Q.height;return!!X||!!(P&&q)})),B=B.filter(function(Q){var X=Q.audioCodec,P=Q.videoCodec;return(!X||Object($.isCodecSupportedInMp4)(X,"audio"))&&(!P||Object($.isCodecSupportedInMp4)(P,"video"))}),_.audioTracks&&(x=_.audioTracks.filter(function(Q){return!Q.audioCodec||Object($.isCodecSupportedInMp4)(Q.audioCodec,"audio")}),Object(H.assignTrackIdsByGroup)(x)),_.subtitles&&(h=_.subtitles,Object(H.assignTrackIdsByGroup)(h)),B.length>0){d=B[0].bitrate,B.sort(function(Q,X){return Q.bitrate-X.bitrate}),this._levels=B;for(var F=0;F<B.length;F++)if(B[F].bitrate===d){this._firstLevel=F,this.log("manifest loaded, "+B.length+" level(s) found, first bitrate: "+d);break}var k=g&&!m,S={levels:B,audioTracks:x,subtitleTracks:h,firstLevel:this._firstLevel,stats:_.stats,audio:g,video:m,altAudio:!k&&x.some(function(Q){return!!Q.url})};this.hls.trigger(N.Events.MANIFEST_PARSED,S),(this.hls.config.autoStartLoad||this.hls.forceStartLoad)&&this.hls.startLoad(this.hls.config.startPosition)}else this.hls.trigger(N.Events.ERROR,{type:L.ErrorTypes.MEDIA_ERROR,details:L.ErrorDetails.MANIFEST_INCOMPATIBLE_CODECS_ERROR,fatal:!0,url:_.url,reason:"no level with compatible codecs found in manifest"})},t.onError=function(b,_){if(a.prototype.onError.call(this,b,_),_.fatal)return;var B=_.context,x=this._levels[this.currentLevelIndex];if(B&&(B.type===R.PlaylistContextType.AUDIO_TRACK&&x.audioGroupIds&&B.groupId===x.audioGroupIds[x.urlId]||B.type===R.PlaylistContextType.SUBTITLE_TRACK&&x.textGroupIds&&B.groupId===x.textGroupIds[x.urlId])){this.redundantFailover(this.currentLevelIndex);return}var h=!1,d=!0,A;switch(_.details){case L.ErrorDetails.FRAG_LOAD_ERROR:case L.ErrorDetails.FRAG_LOAD_TIMEOUT:case L.ErrorDetails.KEY_LOAD_ERROR:case L.ErrorDetails.KEY_LOAD_TIMEOUT:if(_.frag){var c=this._levels[_.frag.level];c?(c.fragmentError++,c.fragmentError>this.hls.config.fragLoadingMaxRetry&&(A=_.frag.level)):A=_.frag.level}break;case L.ErrorDetails.LEVEL_LOAD_ERROR:case L.ErrorDetails.LEVEL_LOAD_TIMEOUT:B&&(B.deliveryDirectives&&(d=!1),A=B.level),h=!0;break;case L.ErrorDetails.REMUX_ALLOC_ERROR:A=_.level,h=!0;break}A!==void 0&&this.recoverLevel(_,A,h,d)},t.recoverLevel=function(b,_,B,x){var h=b.details,d=this._levels[_];if(d.loadError++,B){var A=this.retryLoadingOrFail(b);if(A)b.levelRetry=!0;else{this.currentLevelIndex=-1;return}}if(x){var c=d.url.length;if(c>1&&d.loadError<c)b.levelRetry=!0,this.redundantFailover(_);else if(this.manualLevelIndex===-1){var w=_===0?this._levels.length-1:_-1;this.currentLevelIndex!==w&&this._levels[w].loadError===0&&(this.warn(h+": switch to "+w),b.levelRetry=!0,this.hls.nextAutoLevel=w)}}},t.redundantFailover=function(b){var _=this._levels[b],B=_.url.length;if(B>1){var x=(_.urlId+1)%B;this.warn("Switching to redundant URL-id "+x),this._levels.forEach(function(h){h.urlId=x}),this.level=b}},t.onFragLoaded=function(b,_){var B=_.frag;if(B!==void 0&&B.type===R.PlaylistLevelType.MAIN){var x=this._levels[B.level];x!==void 0&&(x.fragmentError=0,x.loadError=0)}},t.onLevelLoaded=function(b,_){var B,x=_.level,h=_.details,d=this._levels[x];if(!d){var A;this.warn("Invalid level index "+x),(A=_.deliveryDirectives)!==null&&A!==void 0&&A.skip&&(h.deltaUpdateFailed=!0);return}x===this.currentLevelIndex?(d.fragmentError===0&&(d.loadError=0,this.retryCount=0),this.playlistLoaded(x,_,d.details)):(B=_.deliveryDirectives)!==null&&B!==void 0&&B.skip&&(h.deltaUpdateFailed=!0)},t.onAudioTrackSwitched=function(b,_){var B=this.hls.levels[this.currentLevelIndex];if(!B)return;if(B.audioGroupIds){for(var x=-1,h=this.hls.audioTracks[_.id].groupId,d=0;d<B.audioGroupIds.length;d++)if(B.audioGroupIds[d]===h){x=d;break}x!==B.urlId&&(B.urlId=x,this.startLoad())}},t.loadPlaylist=function(b){var _=this.currentLevelIndex,B=this._levels[_];if(this.canLoad&&B&&B.url.length>0){var x=B.urlId,h=B.url[x];if(b)try{h=b.addDirectives(h)}catch(d){this.warn("Could not construct new URL with HLS Delivery Directives: "+d)}this.log("Attempt loading level index "+_+(b?" at sn "+b.msn+" part "+b.part:"")+" with URL-id "+x+" "+h),this.clearTimer(),this.hls.trigger(N.Events.LEVEL_LOADING,{url:h,level:_,id:x,deliveryDirectives:b||null})}},t.removeLevel=function(b,_){var B=function(d,A){return A!==_},x=this._levels.filter(function(h,d){return d!==b?!0:h.url.length>1&&_!==void 0?(h.url=h.url.filter(B),h.audioGroupIds&&(h.audioGroupIds=h.audioGroupIds.filter(B)),h.textGroupIds&&(h.textGroupIds=h.textGroupIds.filter(B)),h.urlId=0,!0):!1}).map(function(h,d){var A=h.details;return A!=null&&A.fragments&&A.fragments.forEach(function(c){c.level=d}),h});this._levels=x,this.hls.trigger(N.Events.LEVELS_UPDATED,{levels:x})},l(n,[{key:"levels",get:function(){return this._levels.length===0?null:this._levels}},{key:"level",get:function(){return this.currentLevelIndex},set:function(b){var _,B=this._levels;if(B.length===0)return;if(this.currentLevelIndex===b&&(_=B[b])!==null&&_!==void 0&&_.details)return;if(b<0||b>=B.length){var x=b<0;if(this.hls.trigger(N.Events.ERROR,{type:L.ErrorTypes.OTHER_ERROR,details:L.ErrorDetails.LEVEL_SWITCH_ERROR,level:b,fatal:x,reason:"invalid level idx"}),x)return;b=Math.min(b,B.length-1)}this.clearTimer();var h=this.currentLevelIndex,d=B[h],A=B[b];this.log("switching to level "+b+" from "+h),this.currentLevelIndex=b;var c=u({},A,{level:b,maxBitrate:A.maxBitrate,uri:A.uri,urlId:A.urlId});delete c._urlId,this.hls.trigger(N.Events.LEVEL_SWITCHING,c);var w=A.details;if(!w||w.live){var m=this.switchParams(A.uri,d==null?void 0:d.details);this.loadPlaylist(m)}}},{key:"manualLevel",get:function(){return this.manualLevelIndex},set:function(b){this.manualLevelIndex=b,this._startLevel===void 0&&(this._startLevel=b),b!==-1&&(this.level=b)}},{key:"firstLevel",get:function(){return this._firstLevel},set:function(b){this._firstLevel=b}},{key:"startLevel",get:function(){if(this._startLevel===void 0){var b=this.hls.config.startLevel;return b!==void 0?b:this._firstLevel}else return this._startLevel},set:function(b){this._startLevel=b}},{key:"nextLoadLevel",get:function(){return this.manualLevelIndex!==-1?this.manualLevelIndex:this.hls.nextAutoLevel},set:function(b){this.level=b,this.manualLevelIndex===-1&&(this.hls.nextAutoLevel=b)}}]),n}(e.default)},"./src/controller/level-helper.ts":function(Ae,z,U){"use strict";U.r(z),U.d(z,"addGroupId",function(){return L}),U.d(z,"assignTrackIdsByGroup",function(){return $}),U.d(z,"updatePTS",function(){return H}),U.d(z,"updateFragPTSDTS",function(){return R}),U.d(z,"mergeDetails",function(){return u}),U.d(z,"mapPartIntersection",function(){return f}),U.d(z,"mapFragmentIntersection",function(){return l}),U.d(z,"adjustSliding",function(){return s}),U.d(z,"addSliding",function(){return i}),U.d(z,"computeReloadInterval",function(){return o}),U.d(z,"getFragmentWithSN",function(){return r}),U.d(z,"getPartWith",function(){return a});var V=U("./src/polyfills/number.ts"),N=U("./src/utils/logger.ts");function L(n,t,E){switch(t){case"audio":n.audioGroupIds||(n.audioGroupIds=[]),n.audioGroupIds.push(E);break;case"text":n.textGroupIds||(n.textGroupIds=[]),n.textGroupIds.push(E);break}}function $(n){var t={};n.forEach(function(E){var b=E.groupId||"";E.id=t[b]=t[b]||0,t[b]++})}function H(n,t,E){var b=n[t],_=n[E];e(b,_)}function e(n,t){var E=t.startPTS;if(Object(V.isFiniteNumber)(E)){var b=0,_;t.sn>n.sn?(b=E-n.start,_=n):(b=n.start-E,_=t),_.duration!==b&&(_.duration=b)}else if(t.sn>n.sn){var B=n.cc===t.cc;B&&n.minEndPTS?t.start=n.start+(n.minEndPTS-n.start):t.start=n.start+n.duration}else t.start=Math.max(n.start-t.duration,0)}function R(n,t,E,b,_,B){var x=b-E;x<=0&&(N.logger.warn("Fragment should have a positive duration",t),b=E+t.duration,B=_+t.duration);var h=E,d=b,A=t.startPTS,c=t.endPTS;if(Object(V.isFiniteNumber)(A)){var w=Math.abs(A-E);Object(V.isFiniteNumber)(t.deltaPTS)?t.deltaPTS=Math.max(w,t.deltaPTS):t.deltaPTS=w,h=Math.max(E,A),E=Math.min(E,A),_=Math.min(_,t.startDTS),d=Math.min(b,c),b=Math.max(b,c),B=Math.max(B,t.endDTS)}t.duration=b-E;var m=E-t.start;t.appendedPTS=b,t.start=t.startPTS=E,t.maxStartPTS=h,t.startDTS=_,t.endPTS=b,t.minEndPTS=d,t.endDTS=B;var g=t.sn;if(!n||g<n.startSN||g>n.endSN)return 0;var F,k=g-n.startSN,S=n.fragments;for(S[k]=t,F=k;F>0;F--)e(S[F],S[F-1]);for(F=k;F<S.length-1;F++)e(S[F],S[F+1]);return n.fragmentHint&&e(S[S.length-1],n.fragmentHint),n.PTSKnown=n.alignedSliding=!0,m}function u(n,t){for(var E=null,b=n.fragments,_=b.length-1;_>=0;_--){var B=b[_].initSegment;if(B){E=B;break}}n.fragmentHint&&delete n.fragmentHint.endPTS;var x=0,h;if(l(n,t,function(F,k){F.relurl&&(x=F.cc-k.cc),Object(V.isFiniteNumber)(F.startPTS)&&Object(V.isFiniteNumber)(F.endPTS)&&(k.start=k.startPTS=F.startPTS,k.startDTS=F.startDTS,k.appendedPTS=F.appendedPTS,k.maxStartPTS=F.maxStartPTS,k.endPTS=F.endPTS,k.endDTS=F.endDTS,k.minEndPTS=F.minEndPTS,k.duration=F.endPTS-F.startPTS,k.duration&&(h=k),t.PTSKnown=t.alignedSliding=!0),k.elementaryStreams=F.elementaryStreams,k.loader=F.loader,k.stats=F.stats,k.urlId=F.urlId,F.initSegment&&(k.initSegment=F.initSegment,E=F.initSegment)}),E){var d=t.fragmentHint?t.fragments.concat(t.fragmentHint):t.fragments;d.forEach(function(F){var k;(!F.initSegment||F.initSegment.relurl===((k=E)===null||k===void 0?void 0:k.relurl))&&(F.initSegment=E)})}if(t.skippedSegments&&(t.deltaUpdateFailed=t.fragments.some(function(F){return!F}),t.deltaUpdateFailed)){N.logger.warn("[level-helper] Previous playlist missing segments skipped in delta playlist");for(var A=t.skippedSegments;A--;)t.fragments.shift();t.startSN=t.fragments[0].sn,t.startCC=t.fragments[0].cc}var c=t.fragments;if(x){N.logger.warn("discontinuity sliding from playlist, take drift into account");for(var w=0;w<c.length;w++)c[w].cc+=x}t.skippedSegments&&(t.startCC=t.fragments[0].cc),f(n.partList,t.partList,function(F,k){k.elementaryStreams=F.elementaryStreams,k.stats=F.stats}),h?R(t,h,h.startPTS,h.endPTS,h.startDTS,h.endDTS):s(n,t),c.length&&(t.totalduration=t.edge-c[0].start),t.driftStartTime=n.driftStartTime,t.driftStart=n.driftStart;var m=t.advancedDateTime;if(t.advanced&&m){var g=t.edge;t.driftStart||(t.driftStartTime=m,t.driftStart=g),t.driftEndTime=m,t.driftEnd=g}else t.driftEndTime=n.driftEndTime,t.driftEnd=n.driftEnd,t.advancedDateTime=n.advancedDateTime}function f(n,t,E){if(n&&t)for(var b=0,_=0,B=n.length;_<=B;_++){var x=n[_],h=t[_+b];x&&h&&x.index===h.index&&x.fragment.sn===h.fragment.sn?E(x,h):b--}}function l(n,t,E){for(var b=t.skippedSegments,_=Math.max(n.startSN,t.startSN)-t.startSN,B=(n.fragmentHint?1:0)+(b?t.endSN:Math.min(n.endSN,t.endSN))-t.startSN,x=t.startSN-n.startSN,h=t.fragmentHint?t.fragments.concat(t.fragmentHint):t.fragments,d=n.fragmentHint?n.fragments.concat(n.fragmentHint):n.fragments,A=_;A<=B;A++){var c=d[x+A],w=h[A];b&&!w&&A<b&&(w=t.fragments[A]=c),c&&w&&E(c,w)}}function s(n,t){var E=t.startSN+t.skippedSegments-n.startSN,b=n.fragments;if(E<0||E>=b.length)return;i(t,b[E].start)}function i(n,t){if(t){for(var E=n.fragments,b=n.skippedSegments;b<E.length;b++)E[b].start+=t;n.fragmentHint&&(n.fragmentHint.start+=t)}}function o(n,t){var E=1e3*n.levelTargetDuration,b=E/2,_=n.age,B=_>0&&_<E*3,x=t.loading.end-t.loading.start,h,d=n.availabilityDelay;if(n.updated===!1)if(B){var A=333*n.misses;h=Math.max(Math.min(b,x*2),A),n.availabilityDelay=(n.availabilityDelay||0)+h}else h=b;else B?(d=Math.min(d||E/2,_),n.availabilityDelay=d,h=d+E-_):h=E-x;return Math.round(h)}function r(n,t,E){if(!n||!n.details)return null;var b=n.details,_=b.fragments[t-b.startSN];return _||(_=b.fragmentHint,_&&_.sn===t?_:t<b.startSN&&E&&E.sn===t?E:null)}function a(n,t,E){if(!n||!n.details)return null;var b=n.details.partList;if(b)for(var _=b.length;_--;){var B=b[_];if(B.index===E&&B.fragment.sn===t)return B}return null}},"./src/controller/stream-controller.ts":function(Ae,z,U){"use strict";U.r(z),U.d(z,"default",function(){return b});var V=U("./src/polyfills/number.ts"),N=U("./src/controller/base-stream-controller.ts"),L=U("./src/is-supported.ts"),$=U("./src/events.ts"),H=U("./src/utils/buffer-helper.ts"),e=U("./src/controller/fragment-tracker.ts"),R=U("./src/types/loader.ts"),u=U("./src/loader/fragment.ts"),f=U("./src/demux/transmuxer-interface.ts"),l=U("./src/types/transmuxer.ts"),s=U("./src/controller/gap-controller.ts"),i=U("./src/errors.ts"),o=U("./src/utils/logger.ts");function r(_,B){for(var x=0;x<B.length;x++){var h=B[x];h.enumerable=h.enumerable||!1,h.configurable=!0,"value"in h&&(h.writable=!0),Object.defineProperty(_,h.key,h)}}function a(_,B,x){return B&&r(_.prototype,B),x&&r(_,x),_}function n(_,B){_.prototype=Object.create(B.prototype),_.prototype.constructor=_,t(_,B)}function t(_,B){return t=Object.setPrototypeOf||function(h,d){return h.__proto__=d,h},t(_,B)}var E=100,b=function(_){n(B,_);function B(h,d){var A;return A=_.call(this,h,d,"[stream-controller]")||this,A.audioCodecSwap=!1,A.gapController=null,A.level=-1,A._forceStartLoad=!1,A.altAudio=!1,A.audioOnly=!1,A.fragPlaying=null,A.onvplaying=null,A.onvseeked=null,A.fragLastKbps=0,A.stalled=!1,A.couldBacktrack=!1,A.audioCodecSwitch=!1,A.videoBuffer=null,A._registerListeners(),A}var x=B.prototype;return x._registerListeners=function(){var d=this.hls;d.on($.Events.MEDIA_ATTACHED,this.onMediaAttached,this),d.on($.Events.MEDIA_DETACHING,this.onMediaDetaching,this),d.on($.Events.MANIFEST_LOADING,this.onManifestLoading,this),d.on($.Events.MANIFEST_PARSED,this.onManifestParsed,this),d.on($.Events.LEVEL_LOADING,this.onLevelLoading,this),d.on($.Events.LEVEL_LOADED,this.onLevelLoaded,this),d.on($.Events.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),d.on($.Events.ERROR,this.onError,this),d.on($.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),d.on($.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),d.on($.Events.BUFFER_CREATED,this.onBufferCreated,this),d.on($.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),d.on($.Events.LEVELS_UPDATED,this.onLevelsUpdated,this),d.on($.Events.FRAG_BUFFERED,this.onFragBuffered,this)},x._unregisterListeners=function(){var d=this.hls;d.off($.Events.MEDIA_ATTACHED,this.onMediaAttached,this),d.off($.Events.MEDIA_DETACHING,this.onMediaDetaching,this),d.off($.Events.MANIFEST_LOADING,this.onManifestLoading,this),d.off($.Events.MANIFEST_PARSED,this.onManifestParsed,this),d.off($.Events.LEVEL_LOADED,this.onLevelLoaded,this),d.off($.Events.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),d.off($.Events.ERROR,this.onError,this),d.off($.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),d.off($.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),d.off($.Events.BUFFER_CREATED,this.onBufferCreated,this),d.off($.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),d.off($.Events.LEVELS_UPDATED,this.onLevelsUpdated,this),d.off($.Events.FRAG_BUFFERED,this.onFragBuffered,this)},x.onHandlerDestroying=function(){this._unregisterListeners(),this.onMediaDetaching()},x.startLoad=function(d){if(this.levels){var A=this.lastCurrentTime,c=this.hls;if(this.stopLoad(),this.setInterval(E),this.level=-1,this.fragLoadError=0,!this.startFragRequested){var w=c.startLevel;w===-1&&(c.config.testBandwidth?(w=0,this.bitrateTest=!0):w=c.nextAutoLevel),this.level=c.nextLoadLevel=w,this.loadedmetadata=!1}A>0&&d===-1&&(this.log("Override startPosition with lastCurrentTime @"+A.toFixed(3)),d=A),this.state=N.State.IDLE,this.nextLoadPosition=this.startPosition=this.lastCurrentTime=d,this.tick()}else this._forceStartLoad=!0,this.state=N.State.STOPPED},x.stopLoad=function(){this._forceStartLoad=!1,_.prototype.stopLoad.call(this)},x.doTick=function(){switch(this.state){case N.State.IDLE:this.doTickIdle();break;case N.State.WAITING_LEVEL:{var d,A=this.levels,c=this.level,w=A==null||((d=A[c])===null||d===void 0)?void 0:d.details;if(w&&(!w.live||this.levelLastLoaded===this.level)){if(this.waitForCdnTuneIn(w))break;this.state=N.State.IDLE;break}break}case N.State.FRAG_LOADING_WAITING_RETRY:{var m,g=self.performance.now(),F=this.retryDate;(!F||g>=F||(m=this.media)!==null&&m!==void 0&&m.seeking)&&(this.log("retryDate reached, switch back to IDLE state"),this.state=N.State.IDLE)}break;default:break}this.onTickEnd()},x.onTickEnd=function(){_.prototype.onTickEnd.call(this),this.checkBuffer(),this.checkFragmentChanged()},x.doTickIdle=function(){var d,A,c=this.hls,w=this.levelLastLoaded,m=this.levels,g=this.media,F=c.config,k=c.nextLoadLevel;if(w===null||!g&&(this.startFragRequested||!F.startFragPrefetch))return;if(this.altAudio&&this.audioOnly)return;if(!m||!m[k])return;var S=m[k];this.level=c.nextLoadLevel=k;var Q=S.details;if(!Q||this.state===N.State.WAITING_LEVEL||Q.live&&this.levelLastLoaded!==k){this.state=N.State.WAITING_LEVEL;return}var X=this.getFwdBufferInfo(this.mediaBuffer?this.mediaBuffer:g,R.PlaylistLevelType.MAIN);if(X===null)return;var P=X.len,q=this.getMaxBufferLength(S.maxBitrate);if(P>=q)return;if(this._streamEnded(X,Q)){var ie={};this.altAudio&&(ie.type="video"),this.hls.trigger($.Events.BUFFER_EOS,ie),this.state=N.State.ENDED;return}var be=X.end,me=this.getNextFragment(be,Q);if(this.couldBacktrack&&!this.fragPrevious&&me&&me.sn!=="initSegment"){var Me=me.sn-Q.startSN;Me>1&&(me=Q.fragments[Me-1],this.fragmentTracker.removeFragment(me))}if(me&&this.fragmentTracker.getState(me)===e.FragmentState.OK&&this.nextLoadPosition>be){var Ne=this.audioOnly&&!this.altAudio?u.ElementaryStreamTypes.AUDIO:u.ElementaryStreamTypes.VIDEO;this.afterBufferFlushed(g,Ne,R.PlaylistLevelType.MAIN),me=this.getNextFragment(this.nextLoadPosition,Q)}if(!me)return;me.initSegment&&!me.initSegment.data&&!this.bitrateTest&&(me=me.initSegment),((d=me.decryptdata)===null||d===void 0?void 0:d.keyFormat)==="identity"&&!((A=me.decryptdata)!==null&&A!==void 0&&A.key)?this.loadKey(me,Q):this.loadFragment(me,Q,be)},x.loadFragment=function(d,A,c){var w,m=this.fragmentTracker.getState(d);if(this.fragCurrent=d,m===e.FragmentState.BACKTRACKED){var g=this.fragmentTracker.getBacktrackData(d);if(g){this._handleFragmentLoadProgress(g),this._handleFragmentLoadComplete(g);return}else m=e.FragmentState.NOT_LOADED}m===e.FragmentState.NOT_LOADED||m===e.FragmentState.PARTIAL?d.sn==="initSegment"?this._loadInitSegment(d):this.bitrateTest?(d.bitrateTest=!0,this.log("Fragment "+d.sn+" of level "+d.level+" is being downloaded to test bitrate and will not be buffered"),this._loadBitrateTestFrag(d)):(this.startFragRequested=!0,_.prototype.loadFragment.call(this,d,A,c)):m===e.FragmentState.APPENDING?this.reduceMaxBufferLength(d.duration)&&this.fragmentTracker.removeFragment(d):((w=this.media)===null||w===void 0?void 0:w.buffered.length)===0&&this.fragmentTracker.removeAllFragments()},x.getAppendedFrag=function(d){var A=this.fragmentTracker.getAppendedFrag(d,R.PlaylistLevelType.MAIN);return A&&"fragment"in A?A.fragment:A},x.getBufferedFrag=function(d){return this.fragmentTracker.getBufferedFrag(d,R.PlaylistLevelType.MAIN)},x.followingBufferedFrag=function(d){return d?this.getBufferedFrag(d.end+.5):null},x.immediateLevelSwitch=function(){this.abortCurrentFrag(),this.flushMainBuffer(0,Number.POSITIVE_INFINITY)},x.nextLevelSwitch=function(){var d=this.levels,A=this.media;if(A!=null&&A.readyState){var c,w=this.getAppendedFrag(A.currentTime);if(w&&w.start>1&&this.flushMainBuffer(0,w.start-1),!A.paused&&d){var m=this.hls.nextLoadLevel,g=d[m],F=this.fragLastKbps;F&&this.fragCurrent?c=this.fragCurrent.duration*g.maxBitrate/(1e3*F)+1:c=0}else c=0;var k=this.getBufferedFrag(A.currentTime+c);if(k){var S=this.followingBufferedFrag(k);if(S){this.abortCurrentFrag();var Q=S.maxStartPTS?S.maxStartPTS:S.start,X=S.duration,P=Math.max(k.end,Q+Math.min(Math.max(X-this.config.maxFragLookUpTolerance,X*.5),X*.75));this.flushMainBuffer(P,Number.POSITIVE_INFINITY)}}}},x.abortCurrentFrag=function(){var d=this.fragCurrent;this.fragCurrent=null,d!=null&&d.loader&&d.loader.abort(),this.state===N.State.KEY_LOADING&&(this.state=N.State.IDLE),this.nextLoadPosition=this.getLoadPosition()},x.flushMainBuffer=function(d,A){_.prototype.flushMainBuffer.call(this,d,A,this.altAudio?"video":null)},x.onMediaAttached=function(d,A){_.prototype.onMediaAttached.call(this,d,A);var c=A.media;this.onvplaying=this.onMediaPlaying.bind(this),this.onvseeked=this.onMediaSeeked.bind(this),c.addEventListener("playing",this.onvplaying),c.addEventListener("seeked",this.onvseeked),this.gapController=new s.default(this.config,c,this.fragmentTracker,this.hls)},x.onMediaDetaching=function(){var d=this.media;d&&(d.removeEventListener("playing",this.onvplaying),d.removeEventListener("seeked",this.onvseeked),this.onvplaying=this.onvseeked=null,this.videoBuffer=null),this.fragPlaying=null,this.gapController&&(this.gapController.destroy(),this.gapController=null),_.prototype.onMediaDetaching.call(this)},x.onMediaPlaying=function(){this.tick()},x.onMediaSeeked=function(){var d=this.media,A=d?d.currentTime:null;Object(V.isFiniteNumber)(A)&&this.log("Media seeked to "+A.toFixed(3)),this.tick()},x.onManifestLoading=function(){this.log("Trigger BUFFER_RESET"),this.hls.trigger($.Events.BUFFER_RESET,void 0),this.fragmentTracker.removeAllFragments(),this.couldBacktrack=this.stalled=!1,this.startPosition=this.lastCurrentTime=0,this.fragPlaying=null},x.onManifestParsed=function(d,A){var c=!1,w=!1,m;A.levels.forEach(function(g){m=g.audioCodec,m&&(m.indexOf("mp4a.40.2")!==-1&&(c=!0),m.indexOf("mp4a.40.5")!==-1&&(w=!0))}),this.audioCodecSwitch=c&&w&&!Object(L.changeTypeSupported)(),this.audioCodecSwitch&&this.log("Both AAC/HE-AAC audio found in levels; declaring level codec as HE-AAC"),this.levels=A.levels,this.startFragRequested=!1},x.onLevelLoading=function(d,A){var c=this.levels;if(!c||this.state!==N.State.IDLE)return;var w=c[A.level];(!w.details||w.details.live&&this.levelLastLoaded!==A.level||this.waitForCdnTuneIn(w.details))&&(this.state=N.State.WAITING_LEVEL)},x.onLevelLoaded=function(d,A){var c,w=this.levels,m=A.level,g=A.details,F=g.totalduration;if(!w){this.warn("Levels were reset while loading level "+m);return}this.log("Level "+m+" loaded ["+g.startSN+","+g.endSN+"], cc ["+g.startCC+", "+g.endCC+"] duration:"+F);var k=this.fragCurrent;k&&(this.state===N.State.FRAG_LOADING||this.state===N.State.FRAG_LOADING_WAITING_RETRY)&&(k.level!==A.level&&k.loader&&(this.state=N.State.IDLE,k.loader.abort()));var S=w[m],Q=0;if(g.live||(c=S.details)!==null&&c!==void 0&&c.live){if(g.fragments[0]||(g.deltaUpdateFailed=!0),g.deltaUpdateFailed)return;Q=this.alignPlaylists(g,S.details)}if(S.details=g,this.levelLastLoaded=m,this.hls.trigger($.Events.LEVEL_UPDATED,{details:g,level:m}),this.state===N.State.WAITING_LEVEL){if(this.waitForCdnTuneIn(g))return;this.state=N.State.IDLE}this.startFragRequested?g.live&&this.synchronizeToLiveEdge(g):this.setStartPosition(g,Q),this.tick()},x._handleFragmentLoadProgress=function(d){var A,c=d.frag,w=d.part,m=d.payload,g=this.levels;if(!g){this.warn("Levels were reset while fragment load was in progress. Fragment "+c.sn+" of level "+c.level+" will not be buffered");return}var F=g[c.level],k=F.details;if(!k){this.warn("Dropping fragment "+c.sn+" of level "+c.level+" after level details were reset");return}var S=F.videoCodec,Q=k.PTSKnown||!k.live,X=(A=c.initSegment)===null||A===void 0?void 0:A.data,P=this._getAudioCodec(F),q=this.transmuxer=this.transmuxer||new f.default(this.hls,R.PlaylistLevelType.MAIN,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)),ie=w?w.index:-1,be=ie!==-1,me=new l.ChunkMetadata(c.level,c.sn,c.stats.chunkCount,m.byteLength,ie,be),Me=this.initPTS[c.cc];q.push(m,X,P,S,c,w,k.totalduration,Q,me,Me)},x.onAudioTrackSwitching=function(d,A){var c=this.altAudio,w=!!A.url,m=A.id;if(!w){if(this.mediaBuffer!==this.media){this.log("Switching on main audio, use media.buffered to schedule main fragment loading"),this.mediaBuffer=this.media;var g=this.fragCurrent;g!=null&&g.loader&&(this.log("Switching to main audio track, cancel main fragment load"),g.loader.abort()),this.resetTransmuxer(),this.resetLoadingState()}else this.audioOnly&&this.resetTransmuxer();var F=this.hls;c&&F.trigger($.Events.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:"audio"}),F.trigger($.Events.AUDIO_TRACK_SWITCHED,{id:m})}},x.onAudioTrackSwitched=function(d,A){var c=A.id,w=!!this.hls.audioTracks[c].url;if(w){var m=this.videoBuffer;m&&this.mediaBuffer!==m&&(this.log("Switching on alternate audio, use video.buffered to schedule main fragment loading"),this.mediaBuffer=m)}this.altAudio=w,this.tick()},x.onBufferCreated=function(d,A){var c=A.tracks,w,m,g=!1;for(var F in c){var k=c[F];if(k.id==="main"){if(m=F,w=k,F==="video"){var S=c[F];S&&(this.videoBuffer=S.buffer)}}else g=!0}g&&w?(this.log("Alternate track found, use "+m+".buffered to schedule main fragment loading"),this.mediaBuffer=w.buffer):this.mediaBuffer=this.media},x.onFragBuffered=function(d,A){var c=A.frag,w=A.part;if(c&&c.type!==R.PlaylistLevelType.MAIN)return;if(this.fragContextChanged(c)){this.warn("Fragment "+c.sn+(w?" p: "+w.index:"")+" of level "+c.level+" finished buffering, but was aborted. state: "+this.state),this.state===N.State.PARSED&&(this.state=N.State.IDLE);return}var m=w?w.stats:c.stats;this.fragLastKbps=Math.round(8*m.total/(m.buffering.end-m.loading.first)),c.sn!=="initSegment"&&(this.fragPrevious=c),this.fragBufferedComplete(c,w)},x.onError=function(d,A){switch(A.details){case i.ErrorDetails.FRAG_LOAD_ERROR:case i.ErrorDetails.FRAG_LOAD_TIMEOUT:case i.ErrorDetails.KEY_LOAD_ERROR:case i.ErrorDetails.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(R.PlaylistLevelType.MAIN,A);break;case i.ErrorDetails.LEVEL_LOAD_ERROR:case i.ErrorDetails.LEVEL_LOAD_TIMEOUT:this.state!==N.State.ERROR&&(A.fatal?(this.warn(""+A.details),this.state=N.State.ERROR):!A.levelRetry&&this.state===N.State.WAITING_LEVEL&&(this.state=N.State.IDLE));break;case i.ErrorDetails.BUFFER_FULL_ERROR:if(A.parent==="main"&&(this.state===N.State.PARSING||this.state===N.State.PARSED)){var c=!0,w=this.getFwdBufferInfo(this.media,R.PlaylistLevelType.MAIN);w&&w.len>.5&&(c=!this.reduceMaxBufferLength(w.len)),c&&(this.warn("buffer full error also media.currentTime is not buffered, flush main"),this.immediateLevelSwitch()),this.resetLoadingState()}break;default:break}},x.checkBuffer=function(){var d=this.media,A=this.gapController;if(!d||!A||!d.readyState)return;var c=H.BufferHelper.getBuffered(d);!this.loadedmetadata&&c.length?(this.loadedmetadata=!0,this.seekToStartPos()):A.poll(this.lastCurrentTime),this.lastCurrentTime=d.currentTime},x.onFragLoadEmergencyAborted=function(){this.state=N.State.IDLE,this.loadedmetadata||(this.startFragRequested=!1,this.nextLoadPosition=this.startPosition),this.tickImmediate()},x.onBufferFlushed=function(d,A){var c=A.type;if(c!==u.ElementaryStreamTypes.AUDIO||this.audioOnly&&!this.altAudio){var w=(c===u.ElementaryStreamTypes.VIDEO?this.videoBuffer:this.mediaBuffer)||this.media;this.afterBufferFlushed(w,c,R.PlaylistLevelType.MAIN)}},x.onLevelsUpdated=function(d,A){this.levels=A.levels},x.swapAudioCodec=function(){this.audioCodecSwap=!this.audioCodecSwap},x.seekToStartPos=function(){var d=this.media,A=d.currentTime,c=this.startPosition;if(c>=0&&A<c){if(d.seeking){o.logger.log("could not seek to "+c+", already seeking at "+A);return}var w=H.BufferHelper.getBuffered(d),m=w.length?w.start(0):0,g=m-c;g>0&&(g<this.config.maxBufferHole||g<this.config.maxFragLookUpTolerance)&&(o.logger.log("adjusting start position by "+g+" to match buffer start"),c+=g,this.startPosition=c),this.log("seek to target start position "+c+" from current time "+A),d.currentTime=c}},x._getAudioCodec=function(d){var A=this.config.defaultAudioCodec||d.audioCodec;return this.audioCodecSwap&&A&&(this.log("Swapping audio codec"),A.indexOf("mp4a.40.5")!==-1?A="mp4a.40.2":A="mp4a.40.5"),A},x._loadBitrateTestFrag=function(d){var A=this;this._doFragLoad(d).then(function(c){var w=A.hls;if(!c||w.nextLoadLevel||A.fragContextChanged(d))return;A.fragLoadError=0,A.state=N.State.IDLE,A.startFragRequested=!1,A.bitrateTest=!1;var m=d.stats;m.parsing.start=m.parsing.end=m.buffering.start=m.buffering.end=self.performance.now(),w.trigger($.Events.FRAG_LOADED,c)})},x._handleTransmuxComplete=function(d){var A,c="main",w=this.hls,m=d.remuxResult,g=d.chunkMeta,F=this.getCurrentContext(g);if(!F){this.warn("The loading context changed while buffering fragment "+g.sn+" of level "+g.level+". This chunk will not be buffered."),this.resetLiveStartWhenNotLoaded(g.level);return}var k=F.frag,S=F.part,Q=F.level,X=m.video,P=m.text,q=m.id3,ie=m.initSegment,be=this.altAudio?void 0:m.audio;if(this.fragContextChanged(k))return;if(this.state=N.State.PARSING,ie){ie.tracks&&(this._bufferInitSegment(Q,ie.tracks,k,g),w.trigger($.Events.FRAG_PARSING_INIT_SEGMENT,{frag:k,id:c,tracks:ie.tracks}));var me=ie.initPTS,Me=ie.timescale;Object(V.isFiniteNumber)(me)&&(this.initPTS[k.cc]=me,w.trigger($.Events.INIT_PTS_FOUND,{frag:k,id:c,initPTS:me,timescale:Me}))}if(X&&m.independent!==!1){if(Q.details){var Ne=X.startPTS,ke=X.endPTS,Ke=X.startDTS,Ye=X.endDTS;if(S)S.elementaryStreams[X.type]={startPTS:Ne,endPTS:ke,startDTS:Ke,endDTS:Ye};else if(X.firstKeyFrame&&X.independent&&(this.couldBacktrack=!0),X.dropped&&X.independent){var _e=this.getLoadPosition()+this.config.maxBufferHole;if(_e<Ne){this.backtrack(k);return}k.setElementaryStreamInfo(X.type,k.start,ke,k.start,Ye,!0)}k.setElementaryStreamInfo(X.type,Ne,ke,Ke,Ye),this.bufferFragmentData(X,k,S,g)}}else if(m.independent===!1){this.backtrack(k);return}if(be){var Te=be.startPTS,Pe=be.endPTS,bt=be.startDTS,mt=be.endDTS;S&&(S.elementaryStreams[u.ElementaryStreamTypes.AUDIO]={startPTS:Te,endPTS:Pe,startDTS:bt,endDTS:mt}),k.setElementaryStreamInfo(u.ElementaryStreamTypes.AUDIO,Te,Pe,bt,mt),this.bufferFragmentData(be,k,S,g)}if(q!=null&&(A=q.samples)!==null&&A!==void 0&&A.length){var dt={frag:k,id:c,samples:q.samples};w.trigger($.Events.FRAG_PARSING_METADATA,dt)}if(P){var yt={frag:k,id:c,samples:P.samples};w.trigger($.Events.FRAG_PARSING_USERDATA,yt)}},x._bufferInitSegment=function(d,A,c,w){var m=this;if(this.state!==N.State.PARSING)return;this.audioOnly=!!A.audio&&!A.video,this.altAudio&&!this.audioOnly&&delete A.audio;var g=A.audio,F=A.video,k=A.audiovideo;if(g){var S=d.audioCodec,Q=navigator.userAgent.toLowerCase();this.audioCodecSwitch&&(S&&(S.indexOf("mp4a.40.5")!==-1?S="mp4a.40.2":S="mp4a.40.5"),g.metadata.channelCount!==1&&Q.indexOf("firefox")===-1&&(S="mp4a.40.5")),Q.indexOf("android")!==-1&&g.container!=="audio/mpeg"&&(S="mp4a.40.2",this.log("Android: force audio codec to "+S)),d.audioCodec&&d.audioCodec!==S&&this.log('Swapping manifest audio codec "'+d.audioCodec+'" for "'+S+'"'),g.levelCodec=S,g.id="main",this.log("Init audio buffer, container:"+g.container+", codecs[selected/level/parsed]=["+(S||"")+"/"+(d.audioCodec||"")+"/"+g.codec+"]")}F&&(F.levelCodec=d.videoCodec,F.id="main",this.log("Init video buffer, container:"+F.container+", codecs[level/parsed]=["+(d.videoCodec||"")+"/"+F.codec+"]")),k&&this.log("Init audiovideo buffer, container:"+k.container+", codecs[level/parsed]=["+(d.attrs.CODECS||"")+"/"+k.codec+"]"),this.hls.trigger($.Events.BUFFER_CODECS,A),Object.keys(A).forEach(function(X){var P=A[X],q=P.initSegment;q!=null&&q.byteLength&&m.hls.trigger($.Events.BUFFER_APPENDING,{type:X,data:q,frag:c,part:null,chunkMeta:w,parent:c.type})}),this.tick()},x.backtrack=function(d){this.couldBacktrack=!0,this.resetTransmuxer(),this.flushBufferGap(d);var A=this.fragmentTracker.backtrack(d);this.fragPrevious=null,this.nextLoadPosition=d.start,A?this.resetFragmentLoading(d):this.state=N.State.BACKTRACKING},x.checkFragmentChanged=function(){var d=this.media,A=null;if(d&&d.readyState>1&&d.seeking===!1){var c=d.currentTime;if(H.BufferHelper.isBuffered(d,c)?A=this.getAppendedFrag(c):H.BufferHelper.isBuffered(d,c+.1)&&(A=this.getAppendedFrag(c+.1)),A){var w=this.fragPlaying,m=A.level;(!w||A.sn!==w.sn||w.level!==m||A.urlId!==w.urlId)&&(this.hls.trigger($.Events.FRAG_CHANGED,{frag:A}),(!w||w.level!==m)&&this.hls.trigger($.Events.LEVEL_SWITCHED,{level:m}),this.fragPlaying=A)}}},a(B,[{key:"nextLevel",get:function(){var d=this.nextBufferedFrag;return d?d.level:-1}},{key:"currentLevel",get:function(){var d=this.media;if(d){var A=this.getAppendedFrag(d.currentTime);if(A)return A.level}return-1}},{key:"nextBufferedFrag",get:function(){var d=this.media;if(d){var A=this.getAppendedFrag(d.currentTime);return this.followingBufferedFrag(A)}else return null}},{key:"forceStartLoad",get:function(){return this._forceStartLoad}}]),B}(N.default)},"./src/controller/subtitle-stream-controller.ts":function(Ae,z,U){"use strict";U.r(z),U.d(z,"SubtitleStreamController",function(){return n});var V=U("./src/events.ts"),N=U("./src/utils/logger.ts"),L=U("./src/utils/buffer-helper.ts"),$=U("./src/controller/fragment-finders.ts"),H=U("./src/utils/discontinuities.ts"),e=U("./src/controller/level-helper.ts"),R=U("./src/controller/fragment-tracker.ts"),u=U("./src/controller/base-stream-controller.ts"),f=U("./src/types/loader.ts"),l=U("./src/types/level.ts");function s(t,E){for(var b=0;b<E.length;b++){var _=E[b];_.enumerable=_.enumerable||!1,_.configurable=!0,"value"in _&&(_.writable=!0),Object.defineProperty(t,_.key,_)}}function i(t,E,b){return E&&s(t.prototype,E),b&&s(t,b),t}function o(t,E){t.prototype=Object.create(E.prototype),t.prototype.constructor=t,r(t,E)}function r(t,E){return r=Object.setPrototypeOf||function(_,B){return _.__proto__=B,_},r(t,E)}var a=500,n=function(t){o(E,t);function E(_,B){var x;return x=t.call(this,_,B,"[subtitle-stream-controller]")||this,x.levels=[],x.currentTrackId=-1,x.tracksBuffered=[],x.mainDetails=null,x._registerListeners(),x}var b=E.prototype;return b.onHandlerDestroying=function(){this._unregisterListeners(),this.mainDetails=null},b._registerListeners=function(){var B=this.hls;B.on(V.Events.MEDIA_ATTACHED,this.onMediaAttached,this),B.on(V.Events.MEDIA_DETACHING,this.onMediaDetaching,this),B.on(V.Events.MANIFEST_LOADING,this.onManifestLoading,this),B.on(V.Events.LEVEL_LOADED,this.onLevelLoaded,this),B.on(V.Events.ERROR,this.onError,this),B.on(V.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),B.on(V.Events.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),B.on(V.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),B.on(V.Events.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),B.on(V.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},b._unregisterListeners=function(){var B=this.hls;B.off(V.Events.MEDIA_ATTACHED,this.onMediaAttached,this),B.off(V.Events.MEDIA_DETACHING,this.onMediaDetaching,this),B.off(V.Events.MANIFEST_LOADING,this.onManifestLoading,this),B.off(V.Events.LEVEL_LOADED,this.onLevelLoaded,this),B.off(V.Events.ERROR,this.onError,this),B.off(V.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),B.off(V.Events.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),B.off(V.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),B.off(V.Events.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),B.off(V.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)},b.startLoad=function(){this.stopLoad(),this.state=u.State.IDLE,this.setInterval(a),this.tick()},b.onManifestLoading=function(){this.mainDetails=null,this.fragmentTracker.removeAllFragments()},b.onLevelLoaded=function(B,x){this.mainDetails=x.details},b.onSubtitleFragProcessed=function(B,x){var h=x.frag,d=x.success;if(this.fragPrevious=h,this.state=u.State.IDLE,!d)return;var A=this.tracksBuffered[this.currentTrackId];if(!A)return;for(var c,w=h.start,m=0;m<A.length;m++)if(w>=A[m].start&&w<=A[m].end){c=A[m];break}var g=h.start+h.duration;c?c.end=g:(c={start:w,end:g},A.push(c)),this.fragmentTracker.fragBuffered(h)},b.onBufferFlushing=function(B,x){var h=x.startOffset,d=x.endOffset;if(h===0&&d!==Number.POSITIVE_INFINITY){var A=this.currentTrackId,c=this.levels;if(!c.length||!c[A]||!c[A].details)return;var w=c[A].details,m=w.targetduration,g=d-m;if(g<=0)return;x.endOffsetSubtitles=Math.max(0,g),this.tracksBuffered.forEach(function(F){for(var k=0;k<F.length;){if(F[k].end<=g){F.shift();continue}else if(F[k].start<g)F[k].start=g;else break;k++}}),this.fragmentTracker.removeFragmentsInRange(h,g,f.PlaylistLevelType.SUBTITLE)}},b.onError=function(B,x){var h,d=x.frag;if(!d||d.type!==f.PlaylistLevelType.SUBTITLE)return;(h=this.fragCurrent)!==null&&h!==void 0&&h.loader&&this.fragCurrent.loader.abort(),this.state=u.State.IDLE},b.onSubtitleTracksUpdated=function(B,x){var h=this,d=x.subtitleTracks;this.tracksBuffered=[],this.levels=d.map(function(A){return new l.Level(A)}),this.fragmentTracker.removeAllFragments(),this.fragPrevious=null,this.levels.forEach(function(A){h.tracksBuffered[A.id]=[]}),this.mediaBuffer=null},b.onSubtitleTrackSwitch=function(B,x){if(this.currentTrackId=x.id,!this.levels.length||this.currentTrackId===-1){this.clearInterval();return}var h=this.levels[this.currentTrackId];h!=null&&h.details?this.mediaBuffer=this.mediaBufferTimeRanges:this.mediaBuffer=null,h&&this.setInterval(a)},b.onSubtitleTrackLoaded=function(B,x){var h,d=x.details,A=x.id,c=this.currentTrackId,w=this.levels;if(!w.length)return;var m=w[c];if(A>=w.length||A!==c||!m)return;if(this.mediaBuffer=this.mediaBufferTimeRanges,d.live||(h=m.details)!==null&&h!==void 0&&h.live){var g=this.mainDetails;if(d.deltaUpdateFailed||!g)return;var F=g.fragments[0];if(!m.details)d.hasProgramDateTime&&g.hasProgramDateTime?Object(H.alignMediaPlaylistByPDT)(d,g):F&&Object(e.addSliding)(d,F.start);else{var k=this.alignPlaylists(d,m.details);k===0&&F&&Object(e.addSliding)(d,F.start)}}if(m.details=d,this.levelLastLoaded=A,this.tick(),d.live&&!this.fragCurrent&&this.media&&this.state===u.State.IDLE){var S=Object($.findFragmentByPTS)(null,d.fragments,this.media.currentTime,0);S||(this.warn("Subtitle playlist not aligned with playback"),m.details=void 0)}},b._handleFragmentLoadComplete=function(B){var x=B.frag,h=B.payload,d=x.decryptdata,A=this.hls;if(this.fragContextChanged(x))return;if(h&&h.byteLength>0&&d&&d.key&&d.iv&&d.method==="AES-128"){var c=performance.now();this.decrypter.webCryptoDecrypt(new Uint8Array(h),d.key.buffer,d.iv.buffer).then(function(w){var m=performance.now();A.trigger(V.Events.FRAG_DECRYPTED,{frag:x,payload:w,stats:{tstart:c,tdecrypt:m}})})}},b.doTick=function(){if(!this.media){this.state=u.State.IDLE;return}if(this.state===u.State.IDLE){var B,x=this.currentTrackId,h=this.levels;if(!h.length||!h[x]||!h[x].details)return;var d=h[x].details,A=d.targetduration,c=this.config,w=this.media,m=L.BufferHelper.bufferedInfo(this.mediaBufferTimeRanges,w.currentTime-A,c.maxBufferHole),g=m.end,F=m.len,k=this.getMaxBufferLength()+A;if(F>k)return;console.assert(d,"Subtitle track details are defined on idle subtitle stream controller tick");var S=d.fragments,Q=S.length,X=d.edge,P,q=this.fragPrevious;if(g<X){var ie=c.maxFragLookUpTolerance;q&&d.hasProgramDateTime&&(P=Object($.findFragmentByPDT)(S,q.endProgramDateTime,ie)),P||(P=Object($.findFragmentByPTS)(q,S,g,ie),!P&&q&&q.start<S[0].start&&(P=S[0]))}else P=S[Q-1];(B=P)!==null&&B!==void 0&&B.encrypted?(N.logger.log("Loading key for "+P.sn),this.state=u.State.KEY_LOADING,this.hls.trigger(V.Events.KEY_LOADING,{frag:P})):P&&this.fragmentTracker.getState(P)===R.FragmentState.NOT_LOADED&&this.loadFragment(P,d,g)}},b.loadFragment=function(B,x,h){this.fragCurrent=B,t.prototype.loadFragment.call(this,B,x,h)},i(E,[{key:"mediaBufferTimeRanges",get:function(){return this.tracksBuffered[this.currentTrackId]||[]}}]),E}(u.default)},"./src/controller/subtitle-track-controller.ts":function(Ae,z,U){"use strict";U.r(z);var V=U("./src/events.ts"),N=U("./src/utils/texttrack-utils.ts"),L=U("./src/controller/base-playlist-controller.ts"),$=U("./src/types/loader.ts");function H(s,i){for(var o=0;o<i.length;o++){var r=i[o];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(s,r.key,r)}}function e(s,i,o){return i&&H(s.prototype,i),o&&H(s,o),s}function R(s,i){s.prototype=Object.create(i.prototype),s.prototype.constructor=s,u(s,i)}function u(s,i){return u=Object.setPrototypeOf||function(r,a){return r.__proto__=a,r},u(s,i)}var f=function(s){R(i,s);function i(r){var a;return a=s.call(this,r,"[subtitle-track-controller]")||this,a.media=null,a.tracks=[],a.groupId=null,a.tracksInGroup=[],a.trackId=-1,a.selectDefaultTrack=!0,a.queuedDefaultTrack=-1,a.trackChangeListener=function(){return a.onTextTracksChanged()},a.asyncPollTrackChange=function(){return a.pollTrackChange(0)},a.useTextTrackPolling=!1,a.subtitlePollingInterval=-1,a.subtitleDisplay=!0,a.registerListeners(),a}var o=i.prototype;return o.destroy=function(){this.unregisterListeners(),this.tracks.length=0,this.tracksInGroup.length=0,this.trackChangeListener=this.asyncPollTrackChange=null,s.prototype.destroy.call(this)},o.registerListeners=function(){var a=this.hls;a.on(V.Events.MEDIA_ATTACHED,this.onMediaAttached,this),a.on(V.Events.MEDIA_DETACHING,this.onMediaDetaching,this),a.on(V.Events.MANIFEST_LOADING,this.onManifestLoading,this),a.on(V.Events.MANIFEST_PARSED,this.onManifestParsed,this),a.on(V.Events.LEVEL_LOADING,this.onLevelLoading,this),a.on(V.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),a.on(V.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),a.on(V.Events.ERROR,this.onError,this)},o.unregisterListeners=function(){var a=this.hls;a.off(V.Events.MEDIA_ATTACHED,this.onMediaAttached,this),a.off(V.Events.MEDIA_DETACHING,this.onMediaDetaching,this),a.off(V.Events.MANIFEST_LOADING,this.onManifestLoading,this),a.off(V.Events.MANIFEST_PARSED,this.onManifestParsed,this),a.off(V.Events.LEVEL_LOADING,this.onLevelLoading,this),a.off(V.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),a.off(V.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),a.off(V.Events.ERROR,this.onError,this)},o.onMediaAttached=function(a,n){if(this.media=n.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)},o.pollTrackChange=function(a){self.clearInterval(this.subtitlePollingInterval),this.subtitlePollingInterval=self.setInterval(this.trackChangeListener,a)},o.onMediaDetaching=function(){if(!this.media)return;self.clearInterval(this.subtitlePollingInterval),this.useTextTrackPolling||this.media.textTracks.removeEventListener("change",this.asyncPollTrackChange),this.trackId>-1&&(this.queuedDefaultTrack=this.trackId);var a=l(this.media.textTracks);a.forEach(function(n){Object(N.clearCurrentCues)(n)}),this.subtitleTrack=-1,this.media=null},o.onManifestLoading=function(){this.tracks=[],this.groupId=null,this.tracksInGroup=[],this.trackId=-1,this.selectDefaultTrack=!0},o.onManifestParsed=function(a,n){this.tracks=n.subtitleTracks},o.onSubtitleTrackLoaded=function(a,n){var t=n.id,E=n.details,b=this.trackId,_=this.tracksInGroup[b];if(!_){this.warn("Invalid subtitle track id "+t);return}var B=_.details;_.details=n.details,this.log("subtitle track "+t+" loaded ["+E.startSN+"-"+E.endSN+"]"),t===this.trackId&&(this.retryCount=0,this.playlistLoaded(t,n,B))},o.onLevelLoading=function(a,n){this.switchLevel(n.level)},o.onLevelSwitching=function(a,n){this.switchLevel(n.level)},o.switchLevel=function(a){var n=this.hls.levels[a];if(!(n!=null&&n.textGroupIds))return;var t=n.textGroupIds[n.urlId];if(this.groupId!==t){var E=this.tracksInGroup?this.tracksInGroup[this.trackId]:void 0,b=this.tracks.filter(function(x){return!t||x.groupId===t});this.tracksInGroup=b;var _=this.findTrackId(E==null?void 0:E.name)||this.findTrackId();this.groupId=t;var B={subtitleTracks:b};this.log("Updating subtitle tracks, "+b.length+' track(s) found in "'+t+'" group-id'),this.hls.trigger(V.Events.SUBTITLE_TRACKS_UPDATED,B),_!==-1&&this.setSubtitleTrack(_,E)}},o.findTrackId=function(a){for(var n=this.tracksInGroup,t=0;t<n.length;t++){var E=n[t];if((!this.selectDefaultTrack||E.default)&&(!a||a===E.name))return E.id}return-1},o.onError=function(a,n){if(s.prototype.onError.call(this,a,n),n.fatal||!n.context)return;n.context.type===$.PlaylistContextType.SUBTITLE_TRACK&&n.context.id===this.trackId&&n.context.groupId===this.groupId&&this.retryLoadingOrFail(n)},o.loadPlaylist=function(a){var n=this.tracksInGroup[this.trackId];if(this.shouldLoadTrack(n)){var t=n.id,E=n.groupId,b=n.url;if(a)try{b=a.addDirectives(b)}catch(_){this.warn("Could not construct new URL with HLS Delivery Directives: "+_)}this.log("Loading subtitle playlist for id "+t),this.hls.trigger(V.Events.SUBTITLE_TRACK_LOADING,{url:b,id:t,groupId:E,deliveryDirectives:a||null})}},o.toggleTrackModes=function(a){var n=this,t=this.media,E=this.subtitleDisplay,b=this.trackId;if(!t)return;var _=l(t.textTracks),B=_.filter(function(d){return d.groupId===n.groupId});if(a===-1)[].slice.call(_).forEach(function(d){d.mode="disabled"});else{var x=B[b];x&&(x.mode="disabled")}var h=B[a];h&&(h.mode=E?"showing":"hidden")},o.setSubtitleTrack=function(a,n){var t,E=this.tracksInGroup;if(!this.media){this.queuedDefaultTrack=a;return}if(this.trackId!==a&&this.toggleTrackModes(a),this.trackId===a&&(a===-1||(t=E[a])!==null&&t!==void 0&&t.details)||a<-1||a>=E.length)return;this.clearTimer();var b=E[a];if(this.log("Switching to subtitle track "+a),this.trackId=a,b){var _=b.id,B=b.groupId,x=B===void 0?"":B,h=b.name,d=b.type,A=b.url;this.hls.trigger(V.Events.SUBTITLE_TRACK_SWITCH,{id:_,groupId:x,name:h,type:d,url:A});var c=this.switchParams(b.url,n==null?void 0:n.details);this.loadPlaylist(c)}else this.hls.trigger(V.Events.SUBTITLE_TRACK_SWITCH,{id:a})},o.onTextTracksChanged=function(){if(this.useTextTrackPolling||self.clearInterval(this.subtitlePollingInterval),!this.media||!this.hls.config.renderTextTracksNatively)return;for(var a=-1,n=l(this.media.textTracks),t=0;t<n.length;t++)if(n[t].mode==="hidden")a=t;else if(n[t].mode==="showing"){a=t;break}this.subtitleTrack!==a&&(this.subtitleTrack=a)},e(i,[{key:"subtitleTracks",get:function(){return this.tracksInGroup}},{key:"subtitleTrack",get:function(){return this.trackId},set:function(a){this.selectDefaultTrack=!1;var n=this.tracksInGroup?this.tracksInGroup[this.trackId]:void 0;this.setSubtitleTrack(a,n)}}]),i}(L.default);function l(s){for(var i=[],o=0;o<s.length;o++){var r=s[o];r.kind==="subtitles"&&r.label&&i.push(s[o])}return i}z.default=f},"./src/controller/timeline-controller.ts":function(Ae,z,U){"use strict";U.r(z),U.d(z,"TimelineController",function(){return l});var V=U("./src/polyfills/number.ts"),N=U("./src/events.ts"),L=U("./src/utils/cea-608-parser.ts"),$=U("./src/utils/output-filter.ts"),H=U("./src/utils/webvtt-parser.ts"),e=U("./src/utils/texttrack-utils.ts"),R=U("./src/utils/imsc1-ttml-parser.ts"),u=U("./src/types/loader.ts"),f=U("./src/utils/logger.ts"),l=function(){function r(n){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=o(),this.captionsProperties=void 0,this.hls=n,this.config=n.config,this.Cues=n.config.cueHandler,this.captionsProperties={textTrack1:{label:this.config.captionsTextTrack1Label,languageCode:this.config.captionsTextTrack1LanguageCode},textTrack2:{label:this.config.captionsTextTrack2Label,languageCode:this.config.captionsTextTrack2LanguageCode},textTrack3:{label:this.config.captionsTextTrack3Label,languageCode:this.config.captionsTextTrack3LanguageCode},textTrack4:{label:this.config.captionsTextTrack4Label,languageCode:this.config.captionsTextTrack4LanguageCode}},this.config.enableCEA708Captions){var t=new $.default(this,"textTrack1"),E=new $.default(this,"textTrack2"),b=new $.default(this,"textTrack3"),_=new $.default(this,"textTrack4");this.cea608Parser1=new L.default(1,t,E),this.cea608Parser2=new L.default(3,b,_)}n.on(N.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),n.on(N.Events.MEDIA_DETACHING,this.onMediaDetaching,this),n.on(N.Events.MANIFEST_LOADING,this.onManifestLoading,this),n.on(N.Events.MANIFEST_LOADED,this.onManifestLoaded,this),n.on(N.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),n.on(N.Events.FRAG_LOADING,this.onFragLoading,this),n.on(N.Events.FRAG_LOADED,this.onFragLoaded,this),n.on(N.Events.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),n.on(N.Events.FRAG_DECRYPTED,this.onFragDecrypted,this),n.on(N.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),n.on(N.Events.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),n.on(N.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)}var a=r.prototype;return a.destroy=function(){var t=this.hls;t.off(N.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),t.off(N.Events.MEDIA_DETACHING,this.onMediaDetaching,this),t.off(N.Events.MANIFEST_LOADING,this.onManifestLoading,this),t.off(N.Events.MANIFEST_LOADED,this.onManifestLoaded,this),t.off(N.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),t.off(N.Events.FRAG_LOADING,this.onFragLoading,this),t.off(N.Events.FRAG_LOADED,this.onFragLoaded,this),t.off(N.Events.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),t.off(N.Events.FRAG_DECRYPTED,this.onFragDecrypted,this),t.off(N.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),t.off(N.Events.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),t.off(N.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),this.hls=this.config=this.cea608Parser1=this.cea608Parser2=null},a.addCues=function(t,E,b,_,B){for(var x=!1,h=B.length;h--;){var d=B[h],A=i(d[0],d[1],E,b);if(A>=0&&(d[0]=Math.min(d[0],E),d[1]=Math.max(d[1],b),x=!0,A/(b-E)>.5))return}if(x||B.push([E,b]),this.config.renderTextTracksNatively){var c=this.captionsTracks[t];this.Cues.newCue(c,E,b,_)}else{var w=this.Cues.newCue(null,E,b,_);this.hls.trigger(N.Events.CUES_PARSED,{type:"captions",cues:w,track:t})}},a.onInitPtsFound=function(t,E){var b=this,_=E.frag,B=E.id,x=E.initPTS,h=E.timescale,d=this.unparsedVttFrags;B==="main"&&(this.initPTS[_.cc]=x,this.timescale[_.cc]=h),d.length&&(this.unparsedVttFrags=[],d.forEach(function(A){b.onFragLoaded(N.Events.FRAG_LOADED,A)}))},a.getExistingTrack=function(t){var E=this.media;if(E)for(var b=0;b<E.textTracks.length;b++){var _=E.textTracks[b];if(_[t])return _}return null},a.createCaptionsTrack=function(t){this.config.renderTextTracksNatively?this.createNativeTrack(t):this.createNonNativeTrack(t)},a.createNativeTrack=function(t){if(this.captionsTracks[t])return;var E=this.captionsProperties,b=this.captionsTracks,_=this.media,B=E[t],x=B.label,h=B.languageCode,d=this.getExistingTrack(t);if(d)b[t]=d,Object(e.clearCurrentCues)(b[t]),Object(e.sendAddTrackEvent)(b[t],_);else{var A=this.createTextTrack("captions",x,h);A&&(A[t]=!0,b[t]=A)}},a.createNonNativeTrack=function(t){if(this.nonNativeCaptionsTracks[t])return;var E=this.captionsProperties[t];if(!E)return;var b=E.label,_={_id:t,label:b,kind:"captions",default:E.media?!!E.media.default:!1,closedCaptions:E.media};this.nonNativeCaptionsTracks[t]=_,this.hls.trigger(N.Events.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:[_]})},a.createTextTrack=function(t,E,b){var _=this.media;return _?_.addTextTrack(t,E,b):void 0},a.onMediaAttaching=function(t,E){this.media=E.media,this._cleanTracks()},a.onMediaDetaching=function(){var t=this.captionsTracks;Object.keys(t).forEach(function(E){Object(e.clearCurrentCues)(t[E]),delete t[E]}),this.nonNativeCaptionsTracks={}},a.onManifestLoading=function(){this.lastSn=-1,this.lastPartIndex=-1,this.prevCC=-1,this.vttCCs=o(),this._cleanTracks(),this.tracks=[],this.captionsTracks={},this.nonNativeCaptionsTracks={},this.textTracks=[],this.unparsedVttFrags=this.unparsedVttFrags||[],this.initPTS=[],this.timescale=[],this.cea608Parser1&&this.cea608Parser2&&(this.cea608Parser1.reset(),this.cea608Parser2.reset())},a._cleanTracks=function(){var t=this.media;if(!t)return;var E=t.textTracks;if(E)for(var b=0;b<E.length;b++)Object(e.clearCurrentCues)(E[b])},a.onSubtitleTracksUpdated=function(t,E){var b=this;this.textTracks=[];var _=E.subtitleTracks||[],B=_.some(function(A){return A.textCodec===R.IMSC1_CODEC});if(this.config.enableWebVTT||B&&this.config.enableIMSC1){var x=this.tracks&&_&&this.tracks.length===_.length;if(this.tracks=_||[],this.config.renderTextTracksNatively){var h=this.media?this.media.textTracks:[];this.tracks.forEach(function(A,c){var w;if(c<h.length){for(var m=null,g=0;g<h.length;g++)if(s(h[g],A)){m=h[g];break}m&&(w=m)}w?Object(e.clearCurrentCues)(w):(w=b.createTextTrack("subtitles",A.name,A.lang),w&&(w.mode="disabled")),w&&(w.groupId=A.groupId,b.textTracks.push(w))})}else if(!x&&this.tracks&&this.tracks.length){var d=this.tracks.map(function(A){return{label:A.name,kind:A.type.toLowerCase(),default:A.default,subtitleTrack:A}});this.hls.trigger(N.Events.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:d})}}},a.onManifestLoaded=function(t,E){var b=this;this.config.enableCEA708Captions&&E.captions&&E.captions.forEach(function(_){var B=/(?:CC|SERVICE)([1-4])/.exec(_.instreamId);if(!B)return;var x="textTrack"+B[1],h=b.captionsProperties[x];if(!h)return;h.label=_.name,_.lang&&(h.languageCode=_.lang),h.media=_})},a.onFragLoading=function(t,E){var b=this.cea608Parser1,_=this.cea608Parser2,B=this.lastSn,x=this.lastPartIndex;if(!this.enabled||!(b&&_))return;if(E.frag.type===u.PlaylistLevelType.MAIN){var h,d,A=E.frag.sn,c=(h=E==null||((d=E.part)===null||d===void 0)?void 0:d.index)!=null?h:-1;A===B+1||A===B&&c===x+1||(b.reset(),_.reset()),this.lastSn=A,this.lastPartIndex=c}},a.onFragLoaded=function(t,E){var b=E.frag,_=E.payload,B=this.initPTS,x=this.unparsedVttFrags;if(b.type===u.PlaylistLevelType.SUBTITLE)if(_.byteLength){if(!Object(V.isFiniteNumber)(B[b.cc])){x.push(E),B.length&&this.hls.trigger(N.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:b,error:new Error("Missing initial subtitle PTS")});return}var h=b.decryptdata;if(h==null||h.key==null||h.method!=="AES-128"){var d=this.tracks[b.level],A=this.vttCCs;A[b.cc]||(A[b.cc]={start:b.start,prevCC:this.prevCC,new:!0},this.prevCC=b.cc),d&&d.textCodec===R.IMSC1_CODEC?this._parseIMSC1(b,_):this._parseVTTs(b,_,A)}}else this.hls.trigger(N.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:b,error:new Error("Empty subtitle payload")})},a._parseIMSC1=function(t,E){var b=this,_=this.hls;Object(R.parseIMSC1)(E,this.initPTS[t.cc],this.timescale[t.cc],function(B){b._appendCues(B,t.level),_.trigger(N.Events.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:t})},function(B){f.logger.log("Failed to parse IMSC1: "+B),_.trigger(N.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:t,error:B})})},a._parseVTTs=function(t,E,b){var _=this,B=this.hls;Object(H.parseWebVTT)(E,this.initPTS[t.cc],this.timescale[t.cc],b,t.cc,t.start,function(x){_._appendCues(x,t.level),B.trigger(N.Events.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:t})},function(x){_._fallbackToIMSC1(t,E),f.logger.log("Failed to parse VTT cue: "+x),B.trigger(N.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:t,error:x})})},a._fallbackToIMSC1=function(t,E){var b=this,_=this.tracks[t.level];_.textCodec||Object(R.parseIMSC1)(E,this.initPTS[t.cc],this.timescale[t.cc],function(){_.textCodec=R.IMSC1_CODEC,b._parseIMSC1(t,E)},function(){_.textCodec="wvtt"})},a._appendCues=function(t,E){var b=this.hls;if(this.config.renderTextTracksNatively){var _=this.textTracks[E];if(_.mode==="disabled")return;t.forEach(function(h){return Object(e.addCueToTrack)(_,h)})}else{var B=this.tracks[E],x=B.default?"default":"subtitles"+E;b.trigger(N.Events.CUES_PARSED,{type:"subtitles",cues:t,track:x})}},a.onFragDecrypted=function(t,E){var b=E.frag;if(b.type===u.PlaylistLevelType.SUBTITLE){if(!Object(V.isFiniteNumber)(this.initPTS[b.cc])){this.unparsedVttFrags.push(E);return}this.onFragLoaded(N.Events.FRAG_LOADED,E)}},a.onSubtitleTracksCleared=function(){this.tracks=[],this.captionsTracks={}},a.onFragParsingUserdata=function(t,E){var b=this.cea608Parser1,_=this.cea608Parser2;if(!this.enabled||!(b&&_))return;for(var B=0;B<E.samples.length;B++){var x=E.samples[B].bytes;if(x){var h=this.extractCea608Data(x);b.addData(E.samples[B].pts,h[0]),_.addData(E.samples[B].pts,h[1])}}},a.onBufferFlushing=function(t,E){var b=E.startOffset,_=E.endOffset,B=E.endOffsetSubtitles,x=E.type,h=this.media;if(!h||h.currentTime<_)return;if(!x||x==="video"){var d=this.captionsTracks;Object.keys(d).forEach(function(c){return Object(e.removeCuesInRange)(d[c],b,_)})}if(this.config.renderTextTracksNatively&&(b===0&&B!==void 0)){var A=this.textTracks;Object.keys(A).forEach(function(c){return Object(e.removeCuesInRange)(A[c],b,B)})}},a.extractCea608Data=function(t){for(var E=t[0]&31,b=2,_=[[],[]],B=0;B<E;B++){var x=t[b++],h=127&t[b++],d=127&t[b++],A=(4&x)!==0,c=3&x;if(h===0&&d===0)continue;A&&((c===0||c===1)&&(_[c].push(h),_[c].push(d)))}return _},r}();function s(r,a){return r&&r.label===a.name&&!(r.textTrack1||r.textTrack2)}function i(r,a,n,t){return Math.min(a,t)-Math.max(r,n)}function o(){return{ccOffset:0,presentationOffset:0,0:{start:0,prevCC:-1,new:!1}}}},"./src/crypt/aes-crypto.ts":function(Ae,z,U){"use strict";U.r(z),U.d(z,"default",function(){return V});var V=function(){function N($,H){this.subtle=void 0,this.aesIV=void 0,this.subtle=$,this.aesIV=H}var L=N.prototype;return L.decrypt=function(H,e){return this.subtle.decrypt({name:"AES-CBC",iv:this.aesIV},e,H)},N}()},"./src/crypt/aes-decryptor.ts":function(Ae,z,U){"use strict";U.r(z),U.d(z,"removePadding",function(){return N}),U.d(z,"default",function(){return L});var V=U("./src/utils/typed-array.ts");function N($){var H=$.byteLength,e=H&&new DataView($.buffer).getUint8(H-1);return e?Object(V.sliceUint8)($,0,H-e):$}var L=function(){function $(){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 H=$.prototype;return H.uint8ArrayToUint32Array_=function(R){for(var u=new DataView(R),f=new Uint32Array(4),l=0;l<4;l++)f[l]=u.getUint32(l*4);return f},H.initTable=function(){var R=this.sBox,u=this.invSBox,f=this.subMix,l=f[0],s=f[1],i=f[2],o=f[3],r=this.invSubMix,a=r[0],n=r[1],t=r[2],E=r[3],b=new Uint32Array(256),_=0,B=0,x=0;for(x=0;x<256;x++)x<128?b[x]=x<<1:b[x]=x<<1^283;for(x=0;x<256;x++){var h=B^B<<1^B<<2^B<<3^B<<4;h=h>>>8^h&255^99,R[_]=h,u[h]=_;var d=b[_],A=b[d],c=b[A],w=b[h]*257^h*16843008;l[_]=w<<24|w>>>8,s[_]=w<<16|w>>>16,i[_]=w<<8|w>>>24,o[_]=w,w=c*16843009^A*65537^d*257^_*16843008,a[h]=w<<24|w>>>8,n[h]=w<<16|w>>>16,t[h]=w<<8|w>>>24,E[h]=w,_?(_=d^b[b[b[c^d]]],B^=b[b[B]]):_=B=1}},H.expandKey=function(R){for(var u=this.uint8ArrayToUint32Array_(R),f=!0,l=0;l<u.length&&f;)f=u[l]===this.key[l],l++;if(f)return;this.key=u;var s=this.keySize=u.length;if(s!==4&&s!==6&&s!==8)throw new Error("Invalid aes key size="+s);var i=this.ksRows=(s+6+1)*4,o,r,a=this.keySchedule=new Uint32Array(i),n=this.invKeySchedule=new Uint32Array(i),t=this.sBox,E=this.rcon,b=this.invSubMix,_=b[0],B=b[1],x=b[2],h=b[3],d,A;for(o=0;o<i;o++){if(o<s){d=a[o]=u[o];continue}A=d,o%s===0?(A=A<<8|A>>>24,A=t[A>>>24]<<24|t[A>>>16&255]<<16|t[A>>>8&255]<<8|t[A&255],A^=E[o/s|0]<<24):s>6&&o%s===4&&(A=t[A>>>24]<<24|t[A>>>16&255]<<16|t[A>>>8&255]<<8|t[A&255]),a[o]=d=(a[o-s]^A)>>>0}for(r=0;r<i;r++)o=i-r,r&3?A=a[o]:A=a[o-4],r<4||o<=4?n[r]=A:n[r]=_[t[A>>>24]]^B[t[A>>>16&255]]^x[t[A>>>8&255]]^h[t[A&255]],n[r]=n[r]>>>0},H.networkToHostOrderSwap=function(R){return R<<24|(R&65280)<<8|(R&16711680)>>8|R>>>24},H.decrypt=function(R,u,f){for(var l=this.keySize+6,s=this.invKeySchedule,i=this.invSBox,o=this.invSubMix,r=o[0],a=o[1],n=o[2],t=o[3],E=this.uint8ArrayToUint32Array_(f),b=E[0],_=E[1],B=E[2],x=E[3],h=new Int32Array(R),d=new Int32Array(h.length),A,c,w,m,g,F,k,S,Q,X,P,q,ie,be,me=this.networkToHostOrderSwap;u<h.length;){for(Q=me(h[u]),X=me(h[u+1]),P=me(h[u+2]),q=me(h[u+3]),g=Q^s[0],F=q^s[1],k=P^s[2],S=X^s[3],ie=4,be=1;be<l;be++)A=r[g>>>24]^a[F>>16&255]^n[k>>8&255]^t[S&255]^s[ie],c=r[F>>>24]^a[k>>16&255]^n[S>>8&255]^t[g&255]^s[ie+1],w=r[k>>>24]^a[S>>16&255]^n[g>>8&255]^t[F&255]^s[ie+2],m=r[S>>>24]^a[g>>16&255]^n[F>>8&255]^t[k&255]^s[ie+3],g=A,F=c,k=w,S=m,ie=ie+4;A=i[g>>>24]<<24^i[F>>16&255]<<16^i[k>>8&255]<<8^i[S&255]^s[ie],c=i[F>>>24]<<24^i[k>>16&255]<<16^i[S>>8&255]<<8^i[g&255]^s[ie+1],w=i[k>>>24]<<24^i[S>>16&255]<<16^i[g>>8&255]<<8^i[F&255]^s[ie+2],m=i[S>>>24]<<24^i[g>>16&255]<<16^i[F>>8&255]<<8^i[k&255]^s[ie+3],d[u]=me(A^b),d[u+1]=me(m^_),d[u+2]=me(w^B),d[u+3]=me(c^x),b=Q,_=X,B=P,x=q,u=u+4}return d.buffer},$}()},"./src/crypt/decrypter.ts":function(Ae,z,U){"use strict";U.r(z),U.d(z,"default",function(){return u});var V=U("./src/crypt/aes-crypto.ts"),N=U("./src/crypt/fast-aes-key.ts"),L=U("./src/crypt/aes-decryptor.ts"),$=U("./src/utils/logger.ts"),H=U("./src/utils/mp4-tools.ts"),e=U("./src/utils/typed-array.ts"),R=16,u=function(){function f(s,i,o){var r=o===void 0?{}:o,a=r.removePKCS7Padding,n=a===void 0?!0:a;if(this.logEnabled=!0,this.observer=void 0,this.config=void 0,this.removePKCS7Padding=void 0,this.subtle=null,this.softwareDecrypter=null,this.key=null,this.fastAesKey=null,this.remainderData=null,this.currentIV=null,this.currentResult=null,this.observer=s,this.config=i,this.removePKCS7Padding=n,n)try{var t=self.crypto;t&&(this.subtle=t.subtle||t.webkitSubtle)}catch(E){}this.subtle===null&&(this.config.enableSoftwareAES=!0)}var l=f.prototype;return l.destroy=function(){this.observer=null},l.isSync=function(){return this.config.enableSoftwareAES},l.flush=function(){var i=this.currentResult;if(!i){this.reset();return}var o=new Uint8Array(i);return this.reset(),this.removePKCS7Padding?Object(L.removePadding)(o):o},l.reset=function(){this.currentResult=null,this.currentIV=null,this.remainderData=null,this.softwareDecrypter&&(this.softwareDecrypter=null)},l.decrypt=function(i,o,r,a){if(this.config.enableSoftwareAES){this.softwareDecrypt(new Uint8Array(i),o,r);var n=this.flush();n&&a(n.buffer)}else this.webCryptoDecrypt(new Uint8Array(i),o,r).then(a)},l.softwareDecrypt=function(i,o,r){var a=this.currentIV,n=this.currentResult,t=this.remainderData;this.logOnce("JS AES decrypt"),t&&(i=Object(H.appendUint8Array)(t,i),this.remainderData=null);var E=this.getValidChunk(i);if(!E.length)return null;a&&(r=a);var b=this.softwareDecrypter;b||(b=this.softwareDecrypter=new L.default),b.expandKey(o);var _=n;return this.currentResult=b.decrypt(E.buffer,0,r),this.currentIV=Object(e.sliceUint8)(E,-16).buffer,_||null},l.webCryptoDecrypt=function(i,o,r){var a=this,n=this.subtle;return(this.key!==o||!this.fastAesKey)&&(this.key=o,this.fastAesKey=new N.default(n,o)),this.fastAesKey.expandKey().then(function(t){if(!n)return Promise.reject(new Error("web crypto not initialized"));var E=new V.default(n,r);return E.decrypt(i.buffer,t)}).catch(function(t){return a.onWebCryptoError(t,i,o,r)})},l.onWebCryptoError=function(i,o,r,a){return $.logger.warn("[decrypter.ts]: WebCrypto Error, disable WebCrypto API:",i),this.config.enableSoftwareAES=!0,this.logEnabled=!0,this.softwareDecrypt(o,r,a)},l.getValidChunk=function(i){var o=i,r=i.length-i.length%R;return r!==i.length&&(o=Object(e.sliceUint8)(i,0,r),this.remainderData=Object(e.sliceUint8)(i,r)),o},l.logOnce=function(i){if(!this.logEnabled)return;$.logger.log("[decrypter.ts]: "+i),this.logEnabled=!1},f}()},"./src/crypt/fast-aes-key.ts":function(Ae,z,U){"use strict";U.r(z),U.d(z,"default",function(){return V});var V=function(){function N($,H){this.subtle=void 0,this.key=void 0,this.subtle=$,this.key=H}var L=N.prototype;return L.expandKey=function(){return this.subtle.importKey("raw",this.key,{name:"AES-CBC"},!1,["encrypt","decrypt"])},N}()},"./src/demux/aacdemuxer.ts":function(Ae,z,U){"use strict";U.r(z);var V=U("./src/demux/base-audio-demuxer.ts"),N=U("./src/demux/adts.ts"),L=U("./src/utils/logger.ts"),$=U("./src/demux/id3.ts");function H(u,f){u.prototype=Object.create(f.prototype),u.prototype.constructor=u,e(u,f)}function e(u,f){return e=Object.setPrototypeOf||function(s,i){return s.__proto__=i,s},e(u,f)}var R=function(u){H(f,u);function f(s,i){var o;return o=u.call(this)||this,o.observer=void 0,o.config=void 0,o.observer=s,o.config=i,o}var l=f.prototype;return l.resetInitSegment=function(i,o,r){u.prototype.resetInitSegment.call(this,i,o,r),this._audioTrack={container:"audio/adts",type:"audio",id:2,pid:-1,sequenceNumber:0,isAAC:!0,samples:[],manifestCodec:i,duration:r,inputTimeScale:9e4,dropped:0}},f.probe=function(i){if(!i)return!1;for(var o=$.getID3Data(i,0)||[],r=o.length,a=i.length;r<a;r++)if(N.probe(i,r))return L.logger.log("ADTS sync word found !"),!0;return!1},l.canParse=function(i,o){return N.canParse(i,o)},l.appendFrame=function(i,o,r){N.initTrackConfig(i,this.observer,o,r,i.manifestCodec);var a=N.appendFrame(i,o,r,this.initPTS,this.frameIndex);if(a&&a.missing===0)return a},f}(V.default);R.minProbeByteLength=9,z.default=R},"./src/demux/adts.ts":function(Ae,z,U){"use strict";U.r(z),U.d(z,"getAudioConfig",function(){return $}),U.d(z,"isHeaderPattern",function(){return H}),U.d(z,"getHeaderLength",function(){return e}),U.d(z,"getFullFrameLength",function(){return R}),U.d(z,"canGetFrameLength",function(){return u}),U.d(z,"isHeader",function(){return f}),U.d(z,"canParse",function(){return l}),U.d(z,"probe",function(){return s}),U.d(z,"initTrackConfig",function(){return i}),U.d(z,"getFrameDuration",function(){return o}),U.d(z,"parseFrameHeader",function(){return r}),U.d(z,"appendFrame",function(){return a});var V=U("./src/utils/logger.ts"),N=U("./src/errors.ts"),L=U("./src/events.ts");function $(n,t,E,b){var _,B,x,h,d=navigator.userAgent.toLowerCase(),A=b,c=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];_=((t[E+2]&192)>>>6)+1;var w=(t[E+2]&60)>>>2;if(w>c.length-1){n.trigger(L.Events.ERROR,{type:N.ErrorTypes.MEDIA_ERROR,details:N.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"invalid ADTS sampling index:"+w});return}return x=(t[E+2]&1)<<2,x|=(t[E+3]&192)>>>6,V.logger.log("manifest codec:"+b+", ADTS type:"+_+", samplingIndex:"+w),/firefox/i.test(d)?w>=6?(_=5,h=new Array(4),B=w-3):(_=2,h=new Array(2),B=w):d.indexOf("android")!==-1?(_=2,h=new Array(2),B=w):(_=5,h=new Array(4),b&&(b.indexOf("mp4a.40.29")!==-1||b.indexOf("mp4a.40.5")!==-1)||!b&&w>=6?B=w-3:((b&&b.indexOf("mp4a.40.2")!==-1&&(w>=6&&x===1||/vivaldi/i.test(d))||!b&&x===1)&&(_=2,h=new Array(2)),B=w)),h[0]=_<<3,h[0]|=(w&14)>>1,h[1]|=(w&1)<<7,h[1]|=x<<3,_===5&&(h[1]|=(B&14)>>1,h[2]=(B&1)<<7,h[2]|=2<<2,h[3]=0),{config:h,samplerate:c[w],channelCount:x,codec:"mp4a.40."+_,manifestCodec:A}}function H(n,t){return n[t]===255&&(n[t+1]&246)===240}function e(n,t){return n[t+1]&1?7:9}function R(n,t){return(n[t+3]&3)<<11|n[t+4]<<3|(n[t+5]&224)>>>5}function u(n,t){return t+5<n.length}function f(n,t){return t+1<n.length&&H(n,t)}function l(n,t){return u(n,t)&&H(n,t)&&R(n,t)<=n.length-t}function s(n,t){if(f(n,t)){var E=e(n,t);if(t+E>=n.length)return!1;var b=R(n,t);if(b<=E)return!1;var _=t+b;return _===n.length||f(n,_)}return!1}function i(n,t,E,b,_){if(!n.samplerate){var B=$(t,E,b,_);if(!B)return;n.config=B.config,n.samplerate=B.samplerate,n.channelCount=B.channelCount,n.codec=B.codec,n.manifestCodec=B.manifestCodec,V.logger.log("parsed codec:"+n.codec+", rate:"+B.samplerate+", channels:"+B.channelCount)}}function o(n){return 1024*9e4/n}function r(n,t,E,b,_){var B=e(n,t),x=R(n,t);if(x-=B,x>0){var h=E+b*_;return{headerLength:B,frameLength:x,stamp:h}}}function a(n,t,E,b,_){var B=o(n.samplerate),x=r(t,E,b,_,B);if(x){var h=x.frameLength,d=x.headerLength,A=x.stamp,c=d+h,w=Math.max(0,E+c-t.length),m;w?(m=new Uint8Array(c-d),m.set(t.subarray(E+d,t.length),0)):m=t.subarray(E+d,E+c);var g={unit:m,pts:A};return w||n.samples.push(g),{sample:g,length:c,missing:w}}}},"./src/demux/base-audio-demuxer.ts":function(Ae,z,U){"use strict";U.r(z),U.d(z,"initPTSFn",function(){return R});var V=U("./src/polyfills/number.ts"),N=U("./src/demux/id3.ts"),L=U("./src/demux/dummy-demuxed-track.ts"),$=U("./src/utils/mp4-tools.ts"),H=U("./src/utils/typed-array.ts"),e=function(){function u(){this._audioTrack=void 0,this._id3Track=void 0,this.frameIndex=0,this.cachedData=null,this.initPTS=null}var f=u.prototype;return f.resetInitSegment=function(s,i,o){this._id3Track={type:"id3",id:3,pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0}},f.resetTimeStamp=function(){},f.resetContiguity=function(){},f.canParse=function(s,i){return!1},f.appendFrame=function(s,i,o){},f.demux=function(s,i){this.cachedData&&(s=Object($.appendUint8Array)(this.cachedData,s),this.cachedData=null);var o=N.getID3Data(s,0),r=o?o.length:0,a,n,t=this._audioTrack,E=this._id3Track,b=o?N.getTimeStamp(o):void 0,_=s.length;for((this.frameIndex===0||this.initPTS===null)&&(this.initPTS=R(b,i)),o&&o.length>0&&E.samples.push({pts:this.initPTS,dts:this.initPTS,data:o}),n=this.initPTS;r<_;){if(this.canParse(s,r)){var B=this.appendFrame(t,s,r);B?(this.frameIndex++,n=B.sample.pts,r+=B.length,a=r):r=_}else N.canParse(s,r)?(o=N.getID3Data(s,r),E.samples.push({pts:n,dts:n,data:o}),r+=o.length,a=r):r++;if(r===_&&a!==_){var x=Object(H.sliceUint8)(s,a);this.cachedData?this.cachedData=Object($.appendUint8Array)(this.cachedData,x):this.cachedData=x}}return{audioTrack:t,avcTrack:Object(L.dummyTrack)(),id3Track:E,textTrack:Object(L.dummyTrack)()}},f.demuxSampleAes=function(s,i,o){return Promise.reject(new Error("["+this+"] This demuxer does not support Sample-AES decryption"))},f.flush=function(s){var i=this.cachedData;return i&&(this.cachedData=null,this.demux(i,0)),this.frameIndex=0,{audioTrack:this._audioTrack,avcTrack:Object(L.dummyTrack)(),id3Track:this._id3Track,textTrack:Object(L.dummyTrack)()}},f.destroy=function(){},u}(),R=function(f,l){return Object(V.isFiniteNumber)(f)?f*90:l*9e4};z.default=e},"./src/demux/chunk-cache.ts":function(Ae,z,U){"use strict";U.r(z),U.d(z,"default",function(){return V});var V=function(){function L(){this.chunks=[],this.dataLength=0}var $=L.prototype;return $.push=function(e){this.chunks.push(e),this.dataLength+=e.length},$.flush=function(){var e=this.chunks,R=this.dataLength,u;if(e.length)e.length===1?u=e[0]:u=N(e,R);else return new Uint8Array(0);return this.reset(),u},$.reset=function(){this.chunks.length=0,this.dataLength=0},L}();function N(L,$){for(var H=new Uint8Array($),e=0,R=0;R<L.length;R++){var u=L[R];H.set(u,e),e+=u.length}return H}},"./src/demux/dummy-demuxed-track.ts":function(Ae,z,U){"use strict";U.r(z),U.d(z,"dummyTrack",function(){return V});function V(){return{type:"",id:-1,pid:-1,inputTimeScale:9e4,sequenceNumber:-1,samples:[],dropped:0}}},"./src/demux/exp-golomb.ts":function(Ae,z,U){"use strict";U.r(z);var V=U("./src/utils/logger.ts"),N=function(){function L(H){this.data=void 0,this.bytesAvailable=void 0,this.word=void 0,this.bitsAvailable=void 0,this.data=H,this.bytesAvailable=H.byteLength,this.word=0,this.bitsAvailable=0}var $=L.prototype;return $.loadWord=function(){var e=this.data,R=this.bytesAvailable,u=e.byteLength-R,f=new Uint8Array(4),l=Math.min(4,R);if(l===0)throw new Error("no bytes available");f.set(e.subarray(u,u+l)),this.word=new DataView(f.buffer).getUint32(0),this.bitsAvailable=l*8,this.bytesAvailable-=l},$.skipBits=function(e){var R;this.bitsAvailable>e?(this.word<<=e,this.bitsAvailable-=e):(e-=this.bitsAvailable,R=e>>3,e-=R>>3,this.bytesAvailable-=R,this.loadWord(),this.word<<=e,this.bitsAvailable-=e)},$.readBits=function(e){var R=Math.min(this.bitsAvailable,e),u=this.word>>>32-R;return e>32&&V.logger.error("Cannot read more than 32 bits at a time"),this.bitsAvailable-=R,this.bitsAvailable>0?this.word<<=R:this.bytesAvailable>0&&this.loadWord(),R=e-R,R>0&&this.bitsAvailable?u<<R|this.readBits(R):u},$.skipLZ=function(){var e;for(e=0;e<this.bitsAvailable;++e)if((this.word&2147483648>>>e)!==0)return this.word<<=e,this.bitsAvailable-=e,e;return this.loadWord(),e+this.skipLZ()},$.skipUEG=function(){this.skipBits(1+this.skipLZ())},$.skipEG=function(){this.skipBits(1+this.skipLZ())},$.readUEG=function(){var e=this.skipLZ();return this.readBits(e+1)-1},$.readEG=function(){var e=this.readUEG();return 1&e?1+e>>>1:-1*(e>>>1)},$.readBoolean=function(){return this.readBits(1)===1},$.readUByte=function(){return this.readBits(8)},$.readUShort=function(){return this.readBits(16)},$.readUInt=function(){return this.readBits(32)},$.skipScalingList=function(e){for(var R=8,u=8,f,l=0;l<e;l++)u!==0&&(f=this.readEG(),u=(R+f+256)%256),R=u===0?R:u},$.readSPS=function(){var e=0,R=0,u=0,f=0,l,s,i,o=this.readUByte.bind(this),r=this.readBits.bind(this),a=this.readUEG.bind(this),n=this.readBoolean.bind(this),t=this.skipBits.bind(this),E=this.skipEG.bind(this),b=this.skipUEG.bind(this),_=this.skipScalingList.bind(this);o();var B=o();if(r(5),t(3),o(),b(),B===100||B===110||B===122||B===244||B===44||B===83||B===86||B===118||B===128){var x=a();if(x===3&&t(1),b(),b(),t(1),n())for(s=x!==3?8:12,i=0;i<s;i++)n()&&(i<6?_(16):_(64))}b();var h=a();if(h===0)a();else if(h===1)for(t(1),E(),E(),l=a(),i=0;i<l;i++)E();b(),t(1);var d=a(),A=a(),c=r(1);c===0&&t(1),t(1),n()&&(e=a(),R=a(),u=a(),f=a());var w=[1,1];if(n()&&n()){var m=o();switch(m){case 1:w=[1,1];break;case 2:w=[12,11];break;case 3:w=[10,11];break;case 4:w=[16,11];break;case 5:w=[40,33];break;case 6:w=[24,11];break;case 7:w=[20,11];break;case 8:w=[32,11];break;case 9:w=[80,33];break;case 10:w=[18,11];break;case 11:w=[15,11];break;case 12:w=[64,33];break;case 13:w=[160,99];break;case 14:w=[4,3];break;case 15:w=[3,2];break;case 16:w=[2,1];break;case 255:{w=[o()<<8|o(),o()<<8|o()];break}}}return{width:Math.ceil((d+1)*16-e*2-R*2),height:(2-c)*(A+1)*16-(c?2:4)*(u+f),pixelRatio:w}},$.readSliceType=function(){return this.readUByte(),this.readUEG(),this.readUEG()},L}();z.default=N},"./src/demux/id3.ts":function(Ae,z,U){"use strict";U.r(z),U.d(z,"isHeader",function(){return V}),U.d(z,"isFooter",function(){return N}),U.d(z,"getID3Data",function(){return L}),U.d(z,"canParse",function(){return H}),U.d(z,"getTimeStamp",function(){return e}),U.d(z,"isTimeStampFrame",function(){return R}),U.d(z,"getID3Frames",function(){return f}),U.d(z,"decodeFrame",function(){return l}),U.d(z,"utf8ArrayToStr",function(){return a}),U.d(z,"testables",function(){return n});var V=function(_,B){return B+10<=_.length&&(_[B]===73&&_[B+1]===68&&_[B+2]===51&&(_[B+3]<255&&_[B+4]<255&&(_[B+6]<128&&_[B+7]<128&&_[B+8]<128&&_[B+9]<128)))},N=function(_,B){return B+10<=_.length&&(_[B]===51&&_[B+1]===68&&_[B+2]===73&&(_[B+3]<255&&_[B+4]<255&&(_[B+6]<128&&_[B+7]<128&&_[B+8]<128&&_[B+9]<128)))},L=function(_,B){for(var x=B,h=0;V(_,B);){h+=10;var d=$(_,B+6);h+=d,N(_,B+10)&&(h+=10),B+=h}return h>0?_.subarray(x,x+h):void 0},$=function(_,B){var x=0;return x=(_[B]&127)<<21,x|=(_[B+1]&127)<<14,x|=(_[B+2]&127)<<7,x|=_[B+3]&127,x},H=function(_,B){return V(_,B)&&$(_,B+6)+10<=_.length-B},e=function(_){for(var B=f(_),x=0;x<B.length;x++){var h=B[x];if(R(h))return r(h)}return},R=function(_){return _&&_.key==="PRIV"&&_.info==="com.apple.streaming.transportStreamTimestamp"},u=function(_){var B=String.fromCharCode(_[0],_[1],_[2],_[3]),x=$(_,4),h=10;return{type:B,size:x,data:_.subarray(h,h+x)}},f=function(_){for(var B=0,x=[];V(_,B);){var h=$(_,B+6);B+=10;for(var d=B+h;B+8<d;){var A=u(_.subarray(B)),c=l(A);c&&x.push(c),B+=A.size+10}N(_,B)&&(B+=10)}return x},l=function(_){return _.type==="PRIV"?s(_):_.type[0]==="W"?o(_):i(_)},s=function(_){if(_.size<2)return;var B=a(_.data,!0),x=new Uint8Array(_.data.subarray(B.length+1));return{key:_.type,info:B,data:x.buffer}},i=function(_){if(_.size<2)return;if(_.type==="TXXX"){var B=1,x=a(_.data.subarray(B),!0);B+=x.length+1;var h=a(_.data.subarray(B));return{key:_.type,info:x,data:h}}var d=a(_.data.subarray(1));return{key:_.type,data:d}},o=function(_){if(_.type==="WXXX"){if(_.size<2)return;var B=1,x=a(_.data.subarray(B),!0);B+=x.length+1;var h=a(_.data.subarray(B));return{key:_.type,info:x,data:h}}var d=a(_.data);return{key:_.type,data:d}},r=function(_){if(_.data.byteLength===8){var B=new Uint8Array(_.data),x=B[3]&1,h=(B[4]<<23)+(B[5]<<15)+(B[6]<<7)+B[7];return h/=45,x&&(h+=4772185884e-2),Math.round(h)}return},a=function(_,B){B===void 0&&(B=!1);var x=E();if(x){var h=x.decode(_);if(B){var d=h.indexOf("\0");return d!==-1?h.substring(0,d):h}return h.replace(/\0/g,"")}for(var A=_.length,c,w,m,g="",F=0;F<A;){if(c=_[F++],c===0&&B)return g;if(c===0||c===3)continue;switch(c>>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:g+=String.fromCharCode(c);break;case 12:case 13:w=_[F++],g+=String.fromCharCode((c&31)<<6|w&63);break;case 14:w=_[F++],m=_[F++],g+=String.fromCharCode((c&15)<<12|(w&63)<<6|(m&63)<<0);break;default:}}return g},n={decodeTextFrame:i},t;function E(){return!t&&typeof self.TextDecoder!="undefined"&&(t=new self.TextDecoder("utf-8")),t}},"./src/demux/mp3demuxer.ts":function(Ae,z,U){"use strict";U.r(z);var V=U("./src/demux/base-audio-demuxer.ts"),N=U("./src/demux/id3.ts"),L=U("./src/utils/logger.ts"),$=U("./src/demux/mpegaudio.ts");function H(u,f){u.prototype=Object.create(f.prototype),u.prototype.constructor=u,e(u,f)}function e(u,f){return e=Object.setPrototypeOf||function(s,i){return s.__proto__=i,s},e(u,f)}var R=function(u){H(f,u);function f(){return u.apply(this,arguments)||this}var l=f.prototype;return l.resetInitSegment=function(i,o,r){u.prototype.resetInitSegment.call(this,i,o,r),this._audioTrack={container:"audio/mpeg",type:"audio",id:2,pid:-1,sequenceNumber:0,isAAC:!1,samples:[],manifestCodec:i,duration:r,inputTimeScale:9e4,dropped:0}},f.probe=function(i){if(!i)return!1;for(var o=N.getID3Data(i,0)||[],r=o.length,a=i.length;r<a;r++)if($.probe(i,r))return L.logger.log("MPEG Audio sync word found !"),!0;return!1},l.canParse=function(i,o){return $.canParse(i,o)},l.appendFrame=function(i,o,r){return this.initPTS===null?void 0:$.appendFrame(i,o,r,this.initPTS,this.frameIndex)},f}(V.default);R.minProbeByteLength=4,z.default=R},"./src/demux/mp4demuxer.ts":function(Ae,z,U){"use strict";U.r(z);var V=U("./src/utils/mp4-tools.ts"),N=U("./src/demux/dummy-demuxed-track.ts"),L=function(){function $(e,R){this.remainderData=null,this.config=void 0,this.config=R}var H=$.prototype;return H.resetTimeStamp=function(){},H.resetInitSegment=function(){},H.resetContiguity=function(){},$.probe=function(R){return Object(V.findBox)({data:R,start:0,end:Math.min(R.length,16384)},["moof"]).length>0},H.demux=function(R){var u=R,f=Object(N.dummyTrack)();if(this.config.progressive){this.remainderData&&(u=Object(V.appendUint8Array)(this.remainderData,R));var l=Object(V.segmentValidRange)(u);this.remainderData=l.remainder,f.samples=l.valid||new Uint8Array}else f.samples=u;return{audioTrack:Object(N.dummyTrack)(),avcTrack:f,id3Track:Object(N.dummyTrack)(),textTrack:Object(N.dummyTrack)()}},H.flush=function(){var R=Object(N.dummyTrack)();return R.samples=this.remainderData||new Uint8Array,this.remainderData=null,{audioTrack:Object(N.dummyTrack)(),avcTrack:R,id3Track:Object(N.dummyTrack)(),textTrack:Object(N.dummyTrack)()}},H.demuxSampleAes=function(R,u,f){return Promise.reject(new Error("The MP4 demuxer does not support SAMPLE-AES decryption"))},H.destroy=function(){},$}();L.minProbeByteLength=1024,z.default=L},"./src/demux/mpegaudio.ts":function(Ae,z,U){"use strict";U.r(z),U.d(z,"appendFrame",function(){return e}),U.d(z,"parseHeader",function(){return R}),U.d(z,"isHeaderPattern",function(){return u}),U.d(z,"isHeader",function(){return f}),U.d(z,"canParse",function(){return l}),U.d(z,"probe",function(){return s});var V=null,N=[32,64,96,128,160,192,224,256,288,320,352,384,416,448,32,48,56,64,80,96,112,128,160,192,224,256,320,384,32,40,48,56,64,80,96,112,128,160,192,224,256,320,32,48,56,64,80,96,112,128,144,160,176,192,224,256,8,16,24,32,40,48,56,64,80,96,112,128,144,160],L=[44100,48e3,32e3,22050,24e3,16e3,11025,12e3,8e3],$=[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],H=[0,1,1,4];function e(i,o,r,a,n){if(r+24>o.length)return;var t=R(o,r);if(t&&r+t.frameLength<=o.length){var E=t.samplesPerFrame*9e4/t.sampleRate,b=a+n*E,_={unit:o.subarray(r,r+t.frameLength),pts:b,dts:b};return i.config=[],i.channelCount=t.channelCount,i.samplerate=t.sampleRate,i.samples.push(_),{sample:_,length:t.frameLength,missing:0}}}function R(i,o){var r=i[o+1]>>3&3,a=i[o+1]>>1&3,n=i[o+2]>>4&15,t=i[o+2]>>2&3;if(r!==1&&n!==0&&n!==15&&t!==3){var E=i[o+2]>>1&1,b=i[o+3]>>6,_=r===3?3-a:a===3?3:4,B=N[_*14+n-1]*1e3,x=r===3?0:r===2?1:2,h=L[x*3+t],d=b===3?1:2,A=$[r][a],c=H[a],w=A*8*c,m=Math.floor(A*B/h+E)*c;if(V===null){var g=navigator.userAgent||"",F=g.match(/Chrome\/(\d+)/i);V=F?parseInt(F[1]):0}var k=!!V&&V<=87;return k&&a===2&&B>=224e3&&b===0&&(i[o+3]=i[o+3]|128),{sampleRate:h,channelCount:d,frameLength:m,samplesPerFrame:w}}}function u(i,o){return i[o]===255&&(i[o+1]&224)===224&&(i[o+1]&6)!==0}function f(i,o){return o+1<i.length&&u(i,o)}function l(i,o){var r=4;return u(i,o)&&r<=i.length-o}function s(i,o){if(o+1<i.length&&u(i,o)){var r=4,a=R(i,o),n=r;a!=null&&a.frameLength&&(n=a.frameLength);var t=o+n;return t===i.length||f(i,t)}return!1}},"./src/demux/sample-aes.ts":function(Ae,z,U){"use strict";U.r(z);var V=U("./src/crypt/decrypter.ts"),N=U("./src/demux/tsdemuxer.ts"),L=function(){function $(e,R,u){this.keyData=void 0,this.decrypter=void 0,this.keyData=u,this.decrypter=new V.default(e,R,{removePKCS7Padding:!1})}var H=$.prototype;return H.decryptBuffer=function(R,u){this.decrypter.decrypt(R,this.keyData.key.buffer,this.keyData.iv.buffer,u)},H.decryptAacSample=function(R,u,f,l){var s=R[u].unit,i=s.subarray(16,s.length-s.length%16),o=i.buffer.slice(i.byteOffset,i.byteOffset+i.length),r=this;this.decryptBuffer(o,function(a){var n=new Uint8Array(a);s.set(n,16),l||r.decryptAacSamples(R,u+1,f)})},H.decryptAacSamples=function(R,u,f){for(;;u++){if(u>=R.length){f();return}if(R[u].unit.length<32)continue;var l=this.decrypter.isSync();if(this.decryptAacSample(R,u,f,l),!l)return}},H.getAvcEncryptedData=function(R){for(var u=Math.floor((R.length-48)/160)*16+16,f=new Int8Array(u),l=0,s=32;s<=R.length-16;s+=160,l+=16)f.set(R.subarray(s,s+16),l);return f},H.getAvcDecryptedUnit=function(R,u){for(var f=new Uint8Array(u),l=0,s=32;s<=R.length-16;s+=160,l+=16)R.set(f.subarray(l,l+16),s);return R},H.decryptAvcSample=function(R,u,f,l,s,i){var o=Object(N.discardEPB)(s.data),r=this.getAvcEncryptedData(o),a=this;this.decryptBuffer(r.buffer,function(n){s.data=a.getAvcDecryptedUnit(o,n),i||a.decryptAvcSamples(R,u,f+1,l)})},H.decryptAvcSamples=function(R,u,f,l){if(R instanceof Uint8Array)throw new Error("Cannot decrypt samples of type Uint8Array");for(;;u++,f=0){if(u>=R.length){l();return}for(var s=R[u].units;!(f>=s.length);f++){var i=s[f];if(i.data.length<=48||i.type!==1&&i.type!==5)continue;var o=this.decrypter.isSync();if(this.decryptAvcSample(R,u,f,l,i,o),!o)return}}},$}();z.default=L},"./src/demux/transmuxer-interface.ts":function(Ae,z,U){"use strict";U.r(z),U.d(z,"default",function(){return s});var V=U("./node_modules/webworkify-webpack/index.js"),N=U.n(V),L=U("./src/events.ts"),$=U("./src/demux/transmuxer.ts"),H=U("./src/utils/logger.ts"),e=U("./src/errors.ts"),R=U("./src/utils/mediasource-helper.ts"),u=U("./node_modules/eventemitter3/index.js"),f=U.n(u),l=Object(R.getMediaSource)()||{isTypeSupported:function(){return!1}},s=function(){function i(r,a,n,t){var E=this;this.hls=void 0,this.id=void 0,this.observer=void 0,this.frag=null,this.part=null,this.worker=void 0,this.onwmsg=void 0,this.transmuxer=null,this.onTransmuxComplete=void 0,this.onFlush=void 0,this.hls=r,this.id=a,this.onTransmuxComplete=n,this.onFlush=t;var b=r.config,_=function(A,c){c=c||{},c.frag=E.frag,c.id=E.id,r.trigger(A,c)};this.observer=new u.EventEmitter,this.observer.on(L.Events.FRAG_DECRYPTED,_),this.observer.on(L.Events.ERROR,_);var B={mp4:l.isTypeSupported("video/mp4"),mpeg:l.isTypeSupported("audio/mpeg"),mp3:l.isTypeSupported('audio/mp4; codecs="mp3"')},x=navigator.vendor;if(b.enableWorker&&typeof Worker!="undefined"){H.logger.log("demuxing in webworker");var h;try{h=this.worker=V("./src/demux/transmuxer-worker.ts"),this.onwmsg=this.onWorkerMessage.bind(this),h.addEventListener("message",this.onwmsg),h.onerror=function(d){r.trigger(L.Events.ERROR,{type:e.ErrorTypes.OTHER_ERROR,details:e.ErrorDetails.INTERNAL_EXCEPTION,fatal:!0,event:"demuxerWorker",error:new Error(d.message+" ("+d.filename+":"+d.lineno+")")})},h.postMessage({cmd:"init",typeSupported:B,vendor:x,id:a,config:JSON.stringify(b)})}catch(d){H.logger.warn("Error in worker:",d),H.logger.error("Error while initializing DemuxerWorker, fallback to inline"),h&&self.URL.revokeObjectURL(h.objectURL),this.transmuxer=new $.default(this.observer,B,b,x,a),this.worker=null}}else this.transmuxer=new $.default(this.observer,B,b,x,a)}var o=i.prototype;return o.destroy=function(){var a=this.worker;if(a)a.removeEventListener("message",this.onwmsg),a.terminate(),this.worker=null;else{var n=this.transmuxer;n&&(n.destroy(),this.transmuxer=null)}var t=this.observer;t&&t.removeAllListeners(),this.observer=null},o.push=function(a,n,t,E,b,_,B,x,h,d){var A=this;h.transmuxing.start=self.performance.now();var c=this.transmuxer,w=this.worker,m=_?_.start:b.start,g=b.decryptdata,F=this.frag,k=!(F&&b.cc===F.cc),S=!(F&&h.level===F.level),Q=F?h.sn-F.sn:-1,X=this.part?h.part-this.part.index:1,P=!S&&(Q===1||Q===0&&X===1),q=self.performance.now();(S||Q||b.stats.parsing.start===0)&&(b.stats.parsing.start=q),_&&(X||!P)&&(_.stats.parsing.start=q);var ie=new $.TransmuxState(k,P,x,S,m);if(!P||k){H.logger.log("[transmuxer-interface, "+b.type+"]: Starting new transmux session for sn: "+h.sn+" p: "+h.part+" level: "+h.level+" id: "+h.id+`
|
|
discontinuity: `+k+`
|
|
trackSwitch: `+S+`
|
|
contiguous: `+P+`
|
|
accurateTimeOffset: `+x+`
|
|
timeOffset: `+m);var be=new $.TransmuxConfig(t,E,n,B,d);this.configureTransmuxer(be)}if(this.frag=b,this.part=_,w)w.postMessage({cmd:"demux",data:a,decryptdata:g,chunkMeta:h,state:ie},a instanceof ArrayBuffer?[a]:[]);else if(c){var me=c.push(a,g,h,ie);Object($.isPromise)(me)?me.then(function(Me){A.handleTransmuxComplete(Me)}):this.handleTransmuxComplete(me)}},o.flush=function(a){var n=this;a.transmuxing.start=self.performance.now();var t=this.transmuxer,E=this.worker;if(E)E.postMessage({cmd:"flush",chunkMeta:a});else if(t){var b=t.flush(a);Object($.isPromise)(b)?b.then(function(_){n.handleFlushResult(_,a)}):this.handleFlushResult(b,a)}},o.handleFlushResult=function(a,n){var t=this;a.forEach(function(E){t.handleTransmuxComplete(E)}),this.onFlush(n)},o.onWorkerMessage=function(a){var n=a.data,t=this.hls;switch(n.event){case"init":{self.URL.revokeObjectURL(this.worker.objectURL);break}case"transmuxComplete":{this.handleTransmuxComplete(n.data);break}case"flush":{this.onFlush(n.data);break}default:{n.data=n.data||{},n.data.frag=this.frag,n.data.id=this.id,t.trigger(n.event,n.data);break}}},o.configureTransmuxer=function(a){var n=this.worker,t=this.transmuxer;n?n.postMessage({cmd:"configure",config:a}):t&&t.configure(a)},o.handleTransmuxComplete=function(a){a.chunkMeta.transmuxing.end=self.performance.now(),this.onTransmuxComplete(a)},i}()},"./src/demux/transmuxer-worker.ts":function(Ae,z,U){"use strict";U.r(z),U.d(z,"default",function(){return e});var V=U("./src/demux/transmuxer.ts"),N=U("./src/events.ts"),L=U("./src/utils/logger.ts"),$=U("./node_modules/eventemitter3/index.js"),H=U.n($);function e(s){var i=new $.EventEmitter,o=function(a,n){s.postMessage({event:a,data:n})};i.on(N.Events.FRAG_DECRYPTED,o),i.on(N.Events.ERROR,o),s.addEventListener("message",function(r){var a=r.data;switch(a.cmd){case"init":{var n=JSON.parse(a.config);s.transmuxer=new V.default(i,a.typeSupported,n,a.vendor,a.id),Object(L.enableLogs)(n.debug),o("init",null);break}case"configure":{s.transmuxer.configure(a.config);break}case"demux":{var t=s.transmuxer.push(a.data,a.decryptdata,a.chunkMeta,a.state);Object(V.isPromise)(t)?t.then(function(_){R(s,_)}):R(s,t);break}case"flush":{var E=a.chunkMeta,b=s.transmuxer.flush(E);Object(V.isPromise)(b)?b.then(function(_){f(s,_,E)}):f(s,b,E);break}default:break}})}function R(s,i){if(l(i.remuxResult))return;var o=[],r=i.remuxResult,a=r.audio,n=r.video;a&&u(o,a),n&&u(o,n),s.postMessage({event:"transmuxComplete",data:i},o)}function u(s,i){i.data1&&s.push(i.data1.buffer),i.data2&&s.push(i.data2.buffer)}function f(s,i,o){i.forEach(function(r){R(s,r)}),s.postMessage({event:"flush",data:o})}function l(s){return!s.audio&&!s.video&&!s.text&&!s.id3&&!s.initSegment}},"./src/demux/transmuxer.ts":function(Ae,z,U){"use strict";U.r(z),U.d(z,"default",function(){return n}),U.d(z,"isPromise",function(){return b}),U.d(z,"TransmuxConfig",function(){return _}),U.d(z,"TransmuxState",function(){return B});var V=U("./src/events.ts"),N=U("./src/errors.ts"),L=U("./src/crypt/decrypter.ts"),$=U("./src/demux/aacdemuxer.ts"),H=U("./src/demux/mp4demuxer.ts"),e=U("./src/demux/tsdemuxer.ts"),R=U("./src/demux/mp3demuxer.ts"),u=U("./src/remux/mp4-remuxer.ts"),f=U("./src/remux/passthrough-remuxer.ts"),l=U("./src/demux/chunk-cache.ts"),s=U("./src/utils/mp4-tools.ts"),i=U("./src/utils/logger.ts"),o;try{o=self.performance.now.bind(self.performance)}catch(x){i.logger.debug("Unable to use Performance API on this environment"),o=self.Date.now}var r=[{demux:e.default,remux:u.default},{demux:H.default,remux:f.default},{demux:$.default,remux:u.default},{demux:R.default,remux:u.default}],a=1024;r.forEach(function(x){var h=x.demux;a=Math.max(a,h.minProbeByteLength)});var n=function(){function x(d,A,c,w,m){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 l.default,this.observer=d,this.typeSupported=A,this.config=c,this.vendor=w,this.id=m}var h=x.prototype;return h.configure=function(A){this.transmuxConfig=A,this.decrypter&&this.decrypter.reset()},h.push=function(A,c,w,m){var g=this,F=w.transmuxing;F.executeStart=o();var k=new Uint8Array(A),S=this.cache,Q=this.config,X=this.currentTransmuxState,P=this.transmuxConfig;m&&(this.currentTransmuxState=m);var q=t(k,c);if(q&&q.method==="AES-128"){var ie=this.getDecrypter();if(Q.enableSoftwareAES){var be=ie.softwareDecrypt(k,q.key.buffer,q.iv.buffer);if(!be)return F.executeEnd=o(),E(w);k=new Uint8Array(be)}else return this.decryptionPromise=ie.webCryptoDecrypt(k,q.key.buffer,q.iv.buffer).then(function(Z){var te=g.push(Z,null,w);return g.decryptionPromise=null,te}),this.decryptionPromise}var me=m||X,Me=me.contiguous,Ne=me.discontinuity,ke=me.trackSwitch,Ke=me.accurateTimeOffset,Ye=me.timeOffset,_e=P.audioCodec,Te=P.videoCodec,Pe=P.defaultInitPts,bt=P.duration,mt=P.initSegmentData;if((Ne||ke)&&this.resetInitSegment(mt,_e,Te,bt),Ne&&this.resetInitialTimestamp(Pe),Me||this.resetContiguity(),this.needsProbing(k,Ne,ke)){if(S.dataLength){var dt=S.flush();k=Object(s.appendUint8Array)(dt,k)}this.configureTransmuxer(k,P)}var yt=this.transmux(k,q,Ye,Ke,w),le=this.currentTransmuxState;return le.contiguous=!0,le.discontinuity=!1,le.trackSwitch=!1,F.executeEnd=o(),yt},h.flush=function(A){var c=this,w=A.transmuxing;w.executeStart=o();var m=this.decrypter,g=this.cache,F=this.currentTransmuxState,k=this.decryptionPromise;if(k)return k.then(function(){return c.flush(A)});var S=[],Q=F.timeOffset;if(m){var X=m.flush();X&&S.push(this.push(X,null,A))}var P=g.dataLength;g.reset();var q=this.demuxer,ie=this.remuxer;if(!q||!ie)return P>=a&&this.observer.emit(V.Events.ERROR,V.Events.ERROR,{type:N.ErrorTypes.MEDIA_ERROR,details:N.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"no demux matching with content found"}),w.executeEnd=o(),[E(A)];var be=q.flush(Q);return b(be)?be.then(function(me){return c.flushRemux(S,me,A),S}):(this.flushRemux(S,be,A),S)},h.flushRemux=function(A,c,w){var m=c.audioTrack,g=c.avcTrack,F=c.id3Track,k=c.textTrack,S=this.currentTransmuxState,Q=S.accurateTimeOffset,X=S.timeOffset;i.logger.log("[transmuxer.ts]: Flushed fragment "+w.sn+(w.part>-1?" p: "+w.part:"")+" of level "+w.level);var P=this.remuxer.remux(m,g,F,k,X,Q,!0,this.id);A.push({remuxResult:P,chunkMeta:w}),w.transmuxing.executeEnd=o()},h.resetInitialTimestamp=function(A){var c=this.demuxer,w=this.remuxer;if(!c||!w)return;c.resetTimeStamp(A),w.resetTimeStamp(A)},h.resetContiguity=function(){var A=this.demuxer,c=this.remuxer;if(!A||!c)return;A.resetContiguity(),c.resetNextTimestamp()},h.resetInitSegment=function(A,c,w,m){var g=this.demuxer,F=this.remuxer;if(!g||!F)return;g.resetInitSegment(c,w,m),F.resetInitSegment(A,c,w)},h.destroy=function(){this.demuxer&&(this.demuxer.destroy(),this.demuxer=void 0),this.remuxer&&(this.remuxer.destroy(),this.remuxer=void 0)},h.transmux=function(A,c,w,m,g){var F;return c&&c.method==="SAMPLE-AES"?F=this.transmuxSampleAes(A,c,w,m,g):F=this.transmuxUnencrypted(A,w,m,g),F},h.transmuxUnencrypted=function(A,c,w,m){var g=this.demuxer.demux(A,c,!1,!this.config.progressive),F=g.audioTrack,k=g.avcTrack,S=g.id3Track,Q=g.textTrack,X=this.remuxer.remux(F,k,S,Q,c,w,!1,this.id);return{remuxResult:X,chunkMeta:m}},h.transmuxSampleAes=function(A,c,w,m,g){var F=this;return this.demuxer.demuxSampleAes(A,c,w).then(function(k){var S=F.remuxer.remux(k.audioTrack,k.avcTrack,k.id3Track,k.textTrack,w,m,!1,F.id);return{remuxResult:S,chunkMeta:g}})},h.configureTransmuxer=function(A,c){for(var w=this.config,m=this.observer,g=this.typeSupported,F=this.vendor,k=c.audioCodec,S=c.defaultInitPts,Q=c.duration,X=c.initSegmentData,P=c.videoCodec,q,ie=0,be=r.length;ie<be;ie++)if(r[ie].demux.probe(A)){q=r[ie];break}q||(i.logger.warn("Failed to find demuxer by probing frag, treating as mp4 passthrough"),q={demux:H.default,remux:f.default});var me=this.demuxer,Me=this.remuxer,Ne=q.remux,ke=q.demux;(!Me||!(Me instanceof Ne))&&(this.remuxer=new Ne(m,w,g,F)),(!me||!(me instanceof ke))&&(this.demuxer=new ke(m,w,g),this.probe=ke.probe),this.resetInitSegment(X,k,P,Q),this.resetInitialTimestamp(S)},h.needsProbing=function(A,c,w){return!this.demuxer||!this.remuxer||c||w},h.getDecrypter=function(){var A=this.decrypter;return A||(A=this.decrypter=new L.default(this.observer,this.config)),A},x}();function t(x,h){var d=null;return x.byteLength>0&&h!=null&&h.key!=null&&h.iv!==null&&h.method!=null&&(d=h),d}var E=function(h){return{remuxResult:{},chunkMeta:h}};function b(x){return"then"in x&&x.then instanceof Function}var _=function(h,d,A,c,w){this.audioCodec=void 0,this.videoCodec=void 0,this.initSegmentData=void 0,this.duration=void 0,this.defaultInitPts=void 0,this.audioCodec=h,this.videoCodec=d,this.initSegmentData=A,this.duration=c,this.defaultInitPts=w},B=function(h,d,A,c,w){this.discontinuity=void 0,this.contiguous=void 0,this.accurateTimeOffset=void 0,this.trackSwitch=void 0,this.timeOffset=void 0,this.discontinuity=h,this.contiguous=d,this.accurateTimeOffset=A,this.trackSwitch=c,this.timeOffset=w}},"./src/demux/tsdemuxer.ts":function(Ae,z,U){"use strict";U.r(z),U.d(z,"discardEPB",function(){return E});var V=U("./src/demux/adts.ts"),N=U("./src/demux/mpegaudio.ts"),L=U("./src/demux/exp-golomb.ts"),$=U("./src/demux/id3.ts"),H=U("./src/demux/sample-aes.ts"),e=U("./src/events.ts"),R=U("./src/utils/mp4-tools.ts"),u=U("./src/utils/logger.ts"),f=U("./src/errors.ts"),l={video:1,audio:2,id3:3,text:4},s=function(){function b(B,x,h){this.observer=void 0,this.config=void 0,this.typeSupported=void 0,this.sampleAes=null,this.pmtParsed=!1,this.audioCodec=void 0,this.videoCodec=void 0,this._duration=0,this.aacLastPTS=null,this._initPTS=null,this._initDTS=null,this._pmtId=-1,this._avcTrack=void 0,this._audioTrack=void 0,this._id3Track=void 0,this._txtTrack=void 0,this.aacOverFlow=null,this.avcSample=null,this.remainderData=null,this.observer=B,this.config=x,this.typeSupported=h}b.probe=function(x){var h=b.syncOffset(x);return h<0?!1:(h&&u.logger.warn("MPEG2-TS detected but first sync word found @ offset "+h+", junk ahead ?"),!0)},b.syncOffset=function(x){for(var h=Math.min(1e3,x.length-3*188),d=0;d<h;){if(x[d]===71&&x[d+188]===71&&x[d+2*188]===71)return d;d++}return-1},b.createTrack=function(x,h){return{container:x==="video"||x==="audio"?"video/mp2t":void 0,type:x,id:l[x],pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0,duration:x==="audio"?h:void 0}};var _=b.prototype;return _.resetInitSegment=function(x,h,d){this.pmtParsed=!1,this._pmtId=-1,this._avcTrack=b.createTrack("video",d),this._audioTrack=b.createTrack("audio",d),this._id3Track=b.createTrack("id3",d),this._txtTrack=b.createTrack("text",d),this._audioTrack.isAAC=!0,this.aacOverFlow=null,this.aacLastPTS=null,this.avcSample=null,this.audioCodec=x,this.videoCodec=h,this._duration=d},_.resetTimeStamp=function(){},_.resetContiguity=function(){var x=this._audioTrack,h=this._avcTrack,d=this._id3Track;x&&(x.pesData=null),h&&(h.pesData=null),d&&(d.pesData=null),this.aacOverFlow=null,this.aacLastPTS=null},_.demux=function(x,h,d,A){d===void 0&&(d=!1),A===void 0&&(A=!1),d||(this.sampleAes=null);var c,w=this._avcTrack,m=this._audioTrack,g=this._id3Track,F=w.pid,k=w.pesData,S=m.pid,Q=g.pid,X=m.pesData,P=g.pesData,q=!1,ie=this.pmtParsed,be=this._pmtId,me=x.length;if(this.remainderData&&(x=Object(R.appendUint8Array)(this.remainderData,x),me=x.length,this.remainderData=null),me<188&&!A)return this.remainderData=x,{audioTrack:m,avcTrack:w,id3Track:g,textTrack:this._txtTrack};var Me=Math.max(0,b.syncOffset(x));me-=(me+Me)%188,me<x.byteLength&&!A&&(this.remainderData=new Uint8Array(x.buffer,me,x.buffer.byteLength-me));for(var Ne=Me;Ne<me;Ne+=188)if(x[Ne]===71){var ke=!!(x[Ne+1]&64),Ke=((x[Ne+1]&31)<<8)+x[Ne+2],Ye=(x[Ne+3]&48)>>4,_e=void 0;if(Ye>1){if(_e=Ne+5+x[Ne+4],_e===Ne+188)continue}else _e=Ne+4;switch(Ke){case F:ke&&(k&&(c=a(k))&&this.parseAVCPES(c,!1),k={data:[],size:0}),k&&(k.data.push(x.subarray(_e,Ne+188)),k.size+=Ne+188-_e);break;case S:ke&&(X&&(c=a(X))&&(m.isAAC?this.parseAACPES(c):this.parseMPEGPES(c)),X={data:[],size:0}),X&&(X.data.push(x.subarray(_e,Ne+188)),X.size+=Ne+188-_e);break;case Q:ke&&(P&&(c=a(P))&&this.parseID3PES(c),P={data:[],size:0}),P&&(P.data.push(x.subarray(_e,Ne+188)),P.size+=Ne+188-_e);break;case 0:ke&&(_e+=x[_e]+1),be=this._pmtId=o(x,_e);break;case be:{ke&&(_e+=x[_e]+1);var Te=r(x,_e,this.typeSupported.mpeg===!0||this.typeSupported.mp3===!0,d);F=Te.avc,F>0&&(w.pid=F),S=Te.audio,S>0&&(m.pid=S,m.isAAC=Te.isAAC),Q=Te.id3,Q>0&&(g.pid=Q),q&&!ie&&(u.logger.log("reparse from beginning"),q=!1,Ne=Me-188),ie=this.pmtParsed=!0;break}case 17:case 8191:break;default:q=!0;break}}else this.observer.emit(e.Events.ERROR,e.Events.ERROR,{type:f.ErrorTypes.MEDIA_ERROR,details:f.ErrorDetails.FRAG_PARSING_ERROR,fatal:!1,reason:"TS packet did not start with 0x47"});w.pesData=k,m.pesData=X,g.pesData=P;var Pe={audioTrack:m,avcTrack:w,id3Track:g,textTrack:this._txtTrack};return A&&this.extractRemainingSamples(Pe),Pe},_.flush=function(){var x=this.remainderData;this.remainderData=null;var h;return x?h=this.demux(x,-1,!1,!0):h={audioTrack:this._audioTrack,avcTrack:this._avcTrack,textTrack:this._txtTrack,id3Track:this._id3Track},this.extractRemainingSamples(h),this.sampleAes?this.decrypt(h,this.sampleAes):h},_.extractRemainingSamples=function(x){var h=x.audioTrack,d=x.avcTrack,A=x.id3Track,c=d.pesData,w=h.pesData,m=A.pesData,g;c&&(g=a(c))?(this.parseAVCPES(g,!0),d.pesData=null):d.pesData=c,w&&(g=a(w))?(h.isAAC?this.parseAACPES(g):this.parseMPEGPES(g),h.pesData=null):(w!=null&&w.size&&u.logger.log("last AAC PES packet truncated,might overlap between fragments"),h.pesData=w),m&&(g=a(m))?(this.parseID3PES(g),A.pesData=null):A.pesData=m},_.demuxSampleAes=function(x,h,d){var A=this.demux(x,d,!0,!this.config.progressive),c=this.sampleAes=new H.default(this.observer,this.config,h);return this.decrypt(A,c)},_.decrypt=function(x,h){return new Promise(function(d){var A=x.audioTrack,c=x.avcTrack;A.samples&&A.isAAC?h.decryptAacSamples(A.samples,0,function(){c.samples?h.decryptAvcSamples(c.samples,0,0,function(){d(x)}):d(x)}):c.samples&&h.decryptAvcSamples(c.samples,0,0,function(){d(x)})})},_.destroy=function(){this._initPTS=this._initDTS=null,this._duration=0},_.parseAVCPES=function(x,h){var d=this,A=this._avcTrack,c=this.parseAVCNALu(x.data),w=!1,m=this.avcSample,g,F=!1;x.data=null,m&&c.length&&!A.audFound&&(n(m,A),m=this.avcSample=i(!1,x.pts,x.dts,"")),c.forEach(function(k){switch(k.type){case 1:{g=!0,m||(m=d.avcSample=i(!0,x.pts,x.dts,"")),w&&(m.debug+="NDR "),m.frame=!0;var S=k.data;if(F&&S.length>4){var Q=new L.default(S).readSliceType();(Q===2||Q===4||Q===7||Q===9)&&(m.key=!0)}break}case 5:g=!0,m||(m=d.avcSample=i(!0,x.pts,x.dts,"")),w&&(m.debug+="IDR "),m.key=!0,m.frame=!0;break;case 6:{g=!0,w&&m&&(m.debug+="SEI ");var X=new L.default(E(k.data));X.readUByte();for(var P=0,q=0,ie=!1,be=0;!ie&&X.bytesAvailable>1;){P=0;do be=X.readUByte(),P+=be;while(be===255);q=0;do be=X.readUByte(),q+=be;while(be===255);if(P===4&&X.bytesAvailable!==0){ie=!0;var me=X.readUByte();if(me===181){var Me=X.readUShort();if(Me===49){var Ne=X.readUInt();if(Ne===1195456820){var ke=X.readUByte();if(ke===3){for(var Ke=X.readUByte(),Ye=X.readUByte(),_e=31&Ke,Te=[Ke,Ye],Pe=0;Pe<_e;Pe++)Te.push(X.readUByte()),Te.push(X.readUByte()),Te.push(X.readUByte());t(d._txtTrack.samples,{type:3,pts:x.pts,bytes:Te})}}}}}else if(P===5&&X.bytesAvailable!==0){if(ie=!0,q>16){for(var bt=[],mt=0;mt<16;mt++)bt.push(X.readUByte().toString(16)),(mt===3||mt===5||mt===7||mt===9)&&bt.push("-");for(var dt=q-16,yt=new Uint8Array(dt),le=0;le<dt;le++)yt[le]=X.readUByte();t(d._txtTrack.samples,{pts:x.pts,payloadType:P,uuid:bt.join(""),userData:Object($.utf8ArrayToStr)(yt),userDataBytes:yt})}}else if(q<X.bytesAvailable)for(var Z=0;Z<q;Z++)X.readUByte()}break}case 7:if(g=!0,F=!0,w&&m&&(m.debug+="SPS "),!A.sps){var te=new L.default(k.data),ee=te.readSPS();A.width=ee.width,A.height=ee.height,A.pixelRatio=ee.pixelRatio,A.sps=[k.data],A.duration=d._duration;for(var ue=k.data.subarray(1,4),ye="avc1.",ve=0;ve<3;ve++){var Je=ue[ve].toString(16);Je.length<2&&(Je="0"+Je),ye+=Je}A.codec=ye}break;case 8:g=!0,w&&m&&(m.debug+="PPS "),A.pps||(A.pps=[k.data]);break;case 9:g=!1,A.audFound=!0,m&&n(m,A),m=d.avcSample=i(!1,x.pts,x.dts,w?"AUD ":"");break;case 12:g=!1;break;default:g=!1,m&&(m.debug+="unknown NAL "+k.type+" ");break}if(m&&g){var tt=m.units;tt.push(k)}}),h&&m&&(n(m,A),this.avcSample=null)},_.getLastNalUnit=function(){var x,h=this.avcSample,d;if(!h||h.units.length===0){var A=this._avcTrack.samples;h=A[A.length-1]}if((x=h)!==null&&x!==void 0&&x.units){var c=h.units;d=c[c.length-1]}return d},_.parseAVCNALu=function(x){var h=x.byteLength,d=this._avcTrack,A=d.naluState||0,c=A,w=[],m=0,g,F,k,S=-1,Q=0;for(A===-1&&(S=0,Q=x[0]&31,A=0,m=1);m<h;){if(g=x[m++],!A){A=g?0:1;continue}if(A===1){A=g?0:2;continue}if(!g)A=3;else if(g===1){if(S>=0){var X={data:x.subarray(S,m-A-1),type:Q};w.push(X)}else{var P=this.getLastNalUnit();if(P&&(c&&m<=4-c&&(P.state&&(P.data=P.data.subarray(0,P.data.byteLength-c))),F=m-A-1,F>0)){var q=new Uint8Array(P.data.byteLength+F);q.set(P.data,0),q.set(x.subarray(0,F),P.data.byteLength),P.data=q,P.state=0}}m<h?(k=x[m]&31,S=m,Q=k,A=0):A=-1}else A=0}if(S>=0&&A>=0){var ie={data:x.subarray(S,h),type:Q,state:A};w.push(ie)}if(w.length===0){var be=this.getLastNalUnit();if(be){var me=new Uint8Array(be.data.byteLength+x.byteLength);me.set(be.data,0),me.set(x,be.data.byteLength),be.data=me}}return d.naluState=A,w},_.parseAACPES=function(x){var h=0,d=this._audioTrack,A=this.aacOverFlow,c=x.data;if(A){this.aacOverFlow=null;var w=A.sample.unit.byteLength,m=Math.min(A.missing,w),g=w-m;A.sample.unit.set(c.subarray(0,m),g),d.samples.push(A.sample),h=A.missing}var F,k;for(F=h,k=c.length;F<k-1&&!V.isHeader(c,F);F++);if(F!==h){var S,Q;if(F<k-1?(S="AAC PES did not start with ADTS header,offset:"+F,Q=!1):(S="no ADTS header found in AAC PES",Q=!0),u.logger.warn("parsing error:"+S),this.observer.emit(e.Events.ERROR,e.Events.ERROR,{type:f.ErrorTypes.MEDIA_ERROR,details:f.ErrorDetails.FRAG_PARSING_ERROR,fatal:Q,reason:S}),Q)return}V.initTrackConfig(d,this.observer,c,F,this.audioCodec);var X;if(x.pts!==void 0)X=x.pts;else if(A){var P=V.getFrameDuration(d.samplerate);X=A.sample.pts+P}else{u.logger.warn("[tsdemuxer]: AAC PES unknown PTS");return}for(var q=0;F<k;)if(V.isHeader(c,F)){if(F+5<k){var ie=V.appendFrame(d,c,F,X,q);if(ie)if(ie.missing)this.aacOverFlow=ie;else{F+=ie.length,q++;continue}}break}else F++},_.parseMPEGPES=function(x){var h=x.data,d=h.length,A=0,c=0,w=x.pts;if(w===void 0){u.logger.warn("[tsdemuxer]: MPEG PES unknown PTS");return}for(;c<d;)if(N.isHeader(h,c)){var m=N.appendFrame(this._audioTrack,h,c,w,A);if(m)c+=m.length,A++;else break}else c++},_.parseID3PES=function(x){if(x.pts===void 0){u.logger.warn("[tsdemuxer]: ID3 PES unknown PTS");return}this._id3Track.samples.push(x)},b}();s.minProbeByteLength=188;function i(b,_,B,x){return{key:b,frame:!1,pts:_,dts:B,units:[],debug:x,length:0}}function o(b,_){return(b[_+10]&31)<<8|b[_+11]}function r(b,_,B,x){var h={audio:-1,avc:-1,id3:-1,isAAC:!0},d=(b[_+1]&15)<<8|b[_+2],A=_+3+d-4,c=(b[_+10]&15)<<8|b[_+11];for(_+=12+c;_<A;){var w=(b[_+1]&31)<<8|b[_+2];switch(b[_]){case 207:if(!x){u.logger.log("ADTS AAC with AES-128-CBC frame encryption found in unencrypted stream");break}case 15:h.audio===-1&&(h.audio=w);break;case 21:h.id3===-1&&(h.id3=w);break;case 219:if(!x){u.logger.log("H.264 with AES-128-CBC slice encryption found in unencrypted stream");break}case 27:h.avc===-1&&(h.avc=w);break;case 3:case 4:B?h.audio===-1&&(h.audio=w,h.isAAC=!1):u.logger.log("MPEG audio found, not supported in this browser");break;case 36:u.logger.warn("Unsupported HEVC stream type found");break;default:break}_+=((b[_+3]&15)<<8|b[_+4])+5}return h}function a(b){var _=0,B,x,h,d,A,c=b.data;if(!b||b.size===0)return null;for(;c[0].length<19&&c.length>1;){var w=new Uint8Array(c[0].length+c[1].length);w.set(c[0]),w.set(c[1],c[0].length),c[0]=w,c.splice(1,1)}B=c[0];var m=(B[0]<<16)+(B[1]<<8)+B[2];if(m===1){if(x=(B[4]<<8)+B[5],x&&x>b.size-6)return null;var g=B[7];g&192&&(d=(B[9]&14)*536870912+(B[10]&255)*4194304+(B[11]&254)*16384+(B[12]&255)*128+(B[13]&254)/2,g&64?(A=(B[14]&14)*536870912+(B[15]&255)*4194304+(B[16]&254)*16384+(B[17]&255)*128+(B[18]&254)/2,d-A>60*9e4&&(u.logger.warn(Math.round((d-A)/9e4)+"s delta between PTS and DTS, align them"),d=A)):A=d),h=B[8];var F=h+9;if(b.size<=F)return null;b.size-=F;for(var k=new Uint8Array(b.size),S=0,Q=c.length;S<Q;S++){B=c[S];var X=B.byteLength;if(F)if(F>X){F-=X;continue}else B=B.subarray(F),X-=F,F=0;k.set(B,_),_+=X}return x&&(x-=h+3),{data:k,pts:d,dts:A,len:x}}return null}function n(b,_){if(b.units.length&&b.frame){if(b.pts===void 0){var B=_.samples,x=B.length;if(x){var h=B[x-1];b.pts=h.pts,b.dts=h.dts}else{_.dropped++;return}}_.samples.push(b)}b.debug.length&&u.logger.log(b.pts+"/"+b.dts+":"+b.debug)}function t(b,_){var B=b.length;if(B>0){if(_.pts>=b[B-1].pts)b.push(_);else for(var x=B-1;x>=0;x--)if(_.pts<b[x].pts){b.splice(x,0,_);break}}else b.push(_)}function E(b){for(var _=b.byteLength,B=[],x=1;x<_-2;)b[x]===0&&b[x+1]===0&&b[x+2]===3?(B.push(x+2),x+=2):x++;if(B.length===0)return b;var h=_-B.length,d=new Uint8Array(h),A=0;for(x=0;x<h;A++,x++)A===B[0]&&(A++,B.shift()),d[x]=b[A];return d}z.default=s},"./src/errors.ts":function(Ae,z,U){"use strict";U.r(z),U.d(z,"ErrorTypes",function(){return V}),U.d(z,"ErrorDetails",function(){return N});var V;(function(L){L.NETWORK_ERROR="networkError",L.MEDIA_ERROR="mediaError",L.KEY_SYSTEM_ERROR="keySystemError",L.MUX_ERROR="muxError",L.OTHER_ERROR="otherError"})(V||(V={}));var N;(function(L){L.KEY_SYSTEM_NO_KEYS="keySystemNoKeys",L.KEY_SYSTEM_NO_ACCESS="keySystemNoAccess",L.KEY_SYSTEM_NO_SESSION="keySystemNoSession",L.KEY_SYSTEM_LICENSE_REQUEST_FAILED="keySystemLicenseRequestFailed",L.KEY_SYSTEM_NO_INIT_DATA="keySystemNoInitData",L.MANIFEST_LOAD_ERROR="manifestLoadError",L.MANIFEST_LOAD_TIMEOUT="manifestLoadTimeOut",L.MANIFEST_PARSING_ERROR="manifestParsingError",L.MANIFEST_INCOMPATIBLE_CODECS_ERROR="manifestIncompatibleCodecsError",L.LEVEL_EMPTY_ERROR="levelEmptyError",L.LEVEL_LOAD_ERROR="levelLoadError",L.LEVEL_LOAD_TIMEOUT="levelLoadTimeOut",L.LEVEL_SWITCH_ERROR="levelSwitchError",L.AUDIO_TRACK_LOAD_ERROR="audioTrackLoadError",L.AUDIO_TRACK_LOAD_TIMEOUT="audioTrackLoadTimeOut",L.SUBTITLE_LOAD_ERROR="subtitleTrackLoadError",L.SUBTITLE_TRACK_LOAD_TIMEOUT="subtitleTrackLoadTimeOut",L.FRAG_LOAD_ERROR="fragLoadError",L.FRAG_LOAD_TIMEOUT="fragLoadTimeOut",L.FRAG_DECRYPT_ERROR="fragDecryptError",L.FRAG_PARSING_ERROR="fragParsingError",L.REMUX_ALLOC_ERROR="remuxAllocError",L.KEY_LOAD_ERROR="keyLoadError",L.KEY_LOAD_TIMEOUT="keyLoadTimeOut",L.BUFFER_ADD_CODEC_ERROR="bufferAddCodecError",L.BUFFER_INCOMPATIBLE_CODECS_ERROR="bufferIncompatibleCodecsError",L.BUFFER_APPEND_ERROR="bufferAppendError",L.BUFFER_APPENDING_ERROR="bufferAppendingError",L.BUFFER_STALLED_ERROR="bufferStalledError",L.BUFFER_FULL_ERROR="bufferFullError",L.BUFFER_SEEK_OVER_HOLE="bufferSeekOverHole",L.BUFFER_NUDGE_ON_STALL="bufferNudgeOnStall",L.INTERNAL_EXCEPTION="internalException",L.INTERNAL_ABORTED="aborted",L.UNKNOWN="unknown"})(N||(N={}))},"./src/events.ts":function(Ae,z,U){"use strict";U.r(z),U.d(z,"Events",function(){return V});var V;(function(N){N.MEDIA_ATTACHING="hlsMediaAttaching",N.MEDIA_ATTACHED="hlsMediaAttached",N.MEDIA_DETACHING="hlsMediaDetaching",N.MEDIA_DETACHED="hlsMediaDetached",N.BUFFER_RESET="hlsBufferReset",N.BUFFER_CODECS="hlsBufferCodecs",N.BUFFER_CREATED="hlsBufferCreated",N.BUFFER_APPENDING="hlsBufferAppending",N.BUFFER_APPENDED="hlsBufferAppended",N.BUFFER_EOS="hlsBufferEos",N.BUFFER_FLUSHING="hlsBufferFlushing",N.BUFFER_FLUSHED="hlsBufferFlushed",N.MANIFEST_LOADING="hlsManifestLoading",N.MANIFEST_LOADED="hlsManifestLoaded",N.MANIFEST_PARSED="hlsManifestParsed",N.LEVEL_SWITCHING="hlsLevelSwitching",N.LEVEL_SWITCHED="hlsLevelSwitched",N.LEVEL_LOADING="hlsLevelLoading",N.LEVEL_LOADED="hlsLevelLoaded",N.LEVEL_UPDATED="hlsLevelUpdated",N.LEVEL_PTS_UPDATED="hlsLevelPtsUpdated",N.LEVELS_UPDATED="hlsLevelsUpdated",N.AUDIO_TRACKS_UPDATED="hlsAudioTracksUpdated",N.AUDIO_TRACK_SWITCHING="hlsAudioTrackSwitching",N.AUDIO_TRACK_SWITCHED="hlsAudioTrackSwitched",N.AUDIO_TRACK_LOADING="hlsAudioTrackLoading",N.AUDIO_TRACK_LOADED="hlsAudioTrackLoaded",N.SUBTITLE_TRACKS_UPDATED="hlsSubtitleTracksUpdated",N.SUBTITLE_TRACKS_CLEARED="hlsSubtitleTracksCleared",N.SUBTITLE_TRACK_SWITCH="hlsSubtitleTrackSwitch",N.SUBTITLE_TRACK_LOADING="hlsSubtitleTrackLoading",N.SUBTITLE_TRACK_LOADED="hlsSubtitleTrackLoaded",N.SUBTITLE_FRAG_PROCESSED="hlsSubtitleFragProcessed",N.CUES_PARSED="hlsCuesParsed",N.NON_NATIVE_TEXT_TRACKS_FOUND="hlsNonNativeTextTracksFound",N.INIT_PTS_FOUND="hlsInitPtsFound",N.FRAG_LOADING="hlsFragLoading",N.FRAG_LOAD_EMERGENCY_ABORTED="hlsFragLoadEmergencyAborted",N.FRAG_LOADED="hlsFragLoaded",N.FRAG_DECRYPTED="hlsFragDecrypted",N.FRAG_PARSING_INIT_SEGMENT="hlsFragParsingInitSegment",N.FRAG_PARSING_USERDATA="hlsFragParsingUserdata",N.FRAG_PARSING_METADATA="hlsFragParsingMetadata",N.FRAG_PARSED="hlsFragParsed",N.FRAG_BUFFERED="hlsFragBuffered",N.FRAG_CHANGED="hlsFragChanged",N.FPS_DROP="hlsFpsDrop",N.FPS_DROP_LEVEL_CAPPING="hlsFpsDropLevelCapping",N.ERROR="hlsError",N.DESTROYING="hlsDestroying",N.KEY_LOADING="hlsKeyLoading",N.KEY_LOADED="hlsKeyLoaded",N.LIVE_BACK_BUFFER_REACHED="hlsLiveBackBufferReached",N.BACK_BUFFER_REACHED="hlsBackBufferReached"})(V||(V={}))},"./src/hls.ts":function(Ae,z,U){"use strict";U.r(z),U.d(z,"default",function(){return b});var V=U("./node_modules/url-toolkit/src/url-toolkit.js"),N=U.n(V),L=U("./src/loader/playlist-loader.ts"),$=U("./src/loader/key-loader.ts"),H=U("./src/controller/id3-track-controller.ts"),e=U("./src/controller/latency-controller.ts"),R=U("./src/controller/level-controller.ts"),u=U("./src/controller/fragment-tracker.ts"),f=U("./src/controller/stream-controller.ts"),l=U("./src/is-supported.ts"),s=U("./src/utils/logger.ts"),i=U("./src/config.ts"),o=U("./node_modules/eventemitter3/index.js"),r=U.n(o),a=U("./src/events.ts"),n=U("./src/errors.ts");function t(_,B){for(var x=0;x<B.length;x++){var h=B[x];h.enumerable=h.enumerable||!1,h.configurable=!0,"value"in h&&(h.writable=!0),Object.defineProperty(_,h.key,h)}}function E(_,B,x){return B&&t(_.prototype,B),x&&t(_,x),_}var b=function(){_.isSupported=function(){return Object(l.isSupported)()};function _(x){x===void 0&&(x={}),this.config=void 0,this.userConfig=void 0,this.coreComponents=void 0,this.networkControllers=void 0,this._emitter=new o.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 h=this.config=Object(i.mergeConfig)(_.DefaultConfig,x);this.userConfig=x,Object(s.enableLogs)(h.debug),this._autoLevelCapping=-1,h.progressive&&Object(i.enableStreamingMode)(h);var d=h.abrController,A=h.bufferController,c=h.capLevelController,w=h.fpsController,m=this.abrController=new d(this),g=this.bufferController=new A(this),F=this.capLevelController=new c(this),k=new w(this),S=new L.default(this),Q=new $.default(this),X=new H.default(this),P=this.levelController=new R.default(this),q=new u.FragmentTracker(this),ie=this.streamController=new f.default(this,q);F.setStreamController(ie),k.setStreamController(ie);var be=[P,ie];this.networkControllers=be;var me=[S,Q,m,g,F,k,X,q];this.audioTrackController=this.createController(h.audioTrackController,null,be),this.createController(h.audioStreamController,q,be),this.subtitleTrackController=this.createController(h.subtitleTrackController,null,be),this.createController(h.subtitleStreamController,q,be),this.createController(h.timelineController,null,me),this.emeController=this.createController(h.emeController,null,me),this.cmcdController=this.createController(h.cmcdController,null,me),this.latencyController=this.createController(e.default,null,me),this.coreComponents=me}var B=_.prototype;return B.createController=function(h,d,A){if(h){var c=d?new h(this,d):new h(this);return A&&A.push(c),c}return null},B.on=function(h,d,A){A===void 0&&(A=this),this._emitter.on(h,d,A)},B.once=function(h,d,A){A===void 0&&(A=this),this._emitter.once(h,d,A)},B.removeAllListeners=function(h){this._emitter.removeAllListeners(h)},B.off=function(h,d,A,c){A===void 0&&(A=this),this._emitter.off(h,d,A,c)},B.listeners=function(h){return this._emitter.listeners(h)},B.emit=function(h,d,A){return this._emitter.emit(h,d,A)},B.trigger=function(h,d){if(this.config.debug)return this.emit(h,h,d);try{return this.emit(h,h,d)}catch(A){s.logger.error("An internal error happened while handling event "+h+'. Error message: "'+A.message+'". Here is a stacktrace:',A),this.trigger(a.Events.ERROR,{type:n.ErrorTypes.OTHER_ERROR,details:n.ErrorDetails.INTERNAL_EXCEPTION,fatal:!1,event:h,error:A})}return!1},B.listenerCount=function(h){return this._emitter.listenerCount(h)},B.destroy=function(){s.logger.log("destroy"),this.trigger(a.Events.DESTROYING,void 0),this.detachMedia(),this.removeAllListeners(),this._autoLevelCapping=-1,this.url=null,this.networkControllers.forEach(function(h){return h.destroy()}),this.networkControllers.length=0,this.coreComponents.forEach(function(h){return h.destroy()}),this.coreComponents.length=0},B.attachMedia=function(h){s.logger.log("attachMedia"),this._media=h,this.trigger(a.Events.MEDIA_ATTACHING,{media:h})},B.detachMedia=function(){s.logger.log("detachMedia"),this.trigger(a.Events.MEDIA_DETACHING,void 0),this._media=null},B.loadSource=function(h){this.stopLoad();var d=this.media,A=this.url,c=this.url=V.buildAbsoluteURL(self.location.href,h,{alwaysNormalize:!0});s.logger.log("loadSource:"+c),d&&A&&A!==c&&this.bufferController.hasSourceTypes()&&(this.detachMedia(),this.attachMedia(d)),this.trigger(a.Events.MANIFEST_LOADING,{url:h})},B.startLoad=function(h){h===void 0&&(h=-1),s.logger.log("startLoad("+h+")"),this.networkControllers.forEach(function(d){d.startLoad(h)})},B.stopLoad=function(){s.logger.log("stopLoad"),this.networkControllers.forEach(function(h){h.stopLoad()})},B.swapAudioCodec=function(){s.logger.log("swapAudioCodec"),this.streamController.swapAudioCodec()},B.recoverMediaError=function(){s.logger.log("recoverMediaError");var h=this._media;this.detachMedia(),h&&this.attachMedia(h)},B.removeLevel=function(h,d){d===void 0&&(d=0),this.levelController.removeLevel(h,d)},E(_,[{key:"levels",get:function(){var h=this.levelController.levels;return h||[]}},{key:"currentLevel",get:function(){return this.streamController.currentLevel},set:function(h){s.logger.log("set currentLevel:"+h),this.loadLevel=h,this.abrController.clearTimer(),this.streamController.immediateLevelSwitch()}},{key:"nextLevel",get:function(){return this.streamController.nextLevel},set:function(h){s.logger.log("set nextLevel:"+h),this.levelController.manualLevel=h,this.streamController.nextLevelSwitch()}},{key:"loadLevel",get:function(){return this.levelController.level},set:function(h){s.logger.log("set loadLevel:"+h),this.levelController.manualLevel=h}},{key:"nextLoadLevel",get:function(){return this.levelController.nextLoadLevel},set:function(h){this.levelController.nextLoadLevel=h}},{key:"firstLevel",get:function(){return Math.max(this.levelController.firstLevel,this.minAutoLevel)},set:function(h){s.logger.log("set firstLevel:"+h),this.levelController.firstLevel=h}},{key:"startLevel",get:function(){return this.levelController.startLevel},set:function(h){s.logger.log("set startLevel:"+h),h!==-1&&(h=Math.max(h,this.minAutoLevel)),this.levelController.startLevel=h}},{key:"capLevelToPlayerSize",get:function(){return this.config.capLevelToPlayerSize},set:function(h){var d=!!h;d!==this.config.capLevelToPlayerSize&&(d?this.capLevelController.startCapping():(this.capLevelController.stopCapping(),this.autoLevelCapping=-1,this.streamController.nextLevelSwitch()),this.config.capLevelToPlayerSize=d)}},{key:"autoLevelCapping",get:function(){return this._autoLevelCapping},set:function(h){this._autoLevelCapping!==h&&(s.logger.log("set autoLevelCapping:"+h),this._autoLevelCapping=h)}},{key:"bandwidthEstimate",get:function(){var h=this.abrController.bwEstimator;return h?h.getEstimate():NaN}},{key:"autoLevelEnabled",get:function(){return this.levelController.manualLevel===-1}},{key:"manualLevel",get:function(){return this.levelController.manualLevel}},{key:"minAutoLevel",get:function(){var h=this.levels,d=this.config.minAutoBitrate;if(!h)return 0;for(var A=h.length,c=0;c<A;c++)if(h[c].maxBitrate>d)return c;return 0}},{key:"maxAutoLevel",get:function(){var h=this.levels,d=this.autoLevelCapping,A;return d===-1&&h&&h.length?A=h.length-1:A=d,A}},{key:"nextAutoLevel",get:function(){return Math.min(Math.max(this.abrController.nextAutoLevel,this.minAutoLevel),this.maxAutoLevel)},set:function(h){this.abrController.nextAutoLevel=Math.max(this.minAutoLevel,h)}},{key:"audioTracks",get:function(){var h=this.audioTrackController;return h?h.audioTracks:[]}},{key:"audioTrack",get:function(){var h=this.audioTrackController;return h?h.audioTrack:-1},set:function(h){var d=this.audioTrackController;d&&(d.audioTrack=h)}},{key:"subtitleTracks",get:function(){var h=this.subtitleTrackController;return h?h.subtitleTracks:[]}},{key:"subtitleTrack",get:function(){var h=this.subtitleTrackController;return h?h.subtitleTrack:-1},set:function(h){var d=this.subtitleTrackController;d&&(d.subtitleTrack=h)}},{key:"media",get:function(){return this._media}},{key:"subtitleDisplay",get:function(){var h=this.subtitleTrackController;return h?h.subtitleDisplay:!1},set:function(h){var d=this.subtitleTrackController;d&&(d.subtitleDisplay=h)}},{key:"lowLatencyMode",get:function(){return this.config.lowLatencyMode},set:function(h){this.config.lowLatencyMode=h}},{key:"liveSyncPosition",get:function(){return this.latencyController.liveSyncPosition}},{key:"latency",get:function(){return this.latencyController.latency}},{key:"maxLatency",get:function(){return this.latencyController.maxLatency}},{key:"targetLatency",get:function(){return this.latencyController.targetLatency}},{key:"drift",get:function(){return this.latencyController.drift}},{key:"forceStartLoad",get:function(){return this.streamController.forceStartLoad}}],[{key:"version",get:function(){return"1.1.2"}},{key:"Events",get:function(){return a.Events}},{key:"ErrorTypes",get:function(){return n.ErrorTypes}},{key:"ErrorDetails",get:function(){return n.ErrorDetails}},{key:"DefaultConfig",get:function(){return _.defaultConfig?_.defaultConfig:i.hlsDefaultConfig},set:function(h){_.defaultConfig=h}}]),_}();b.defaultConfig=void 0},"./src/is-supported.ts":function(Ae,z,U){"use strict";U.r(z),U.d(z,"isSupported",function(){return L}),U.d(z,"changeTypeSupported",function(){return $});var V=U("./src/utils/mediasource-helper.ts");function N(){return self.SourceBuffer||self.WebKitSourceBuffer}function L(){var H=Object(V.getMediaSource)();if(!H)return!1;var e=N(),R=H&&typeof H.isTypeSupported=="function"&&H.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"'),u=!e||e.prototype&&typeof e.prototype.appendBuffer=="function"&&typeof e.prototype.remove=="function";return!!R&&!!u}function $(){var H,e=N();return typeof(e==null||((H=e.prototype)===null||H===void 0)?void 0:H.changeType)=="function"}},"./src/loader/fragment-loader.ts":function(Ae,z,U){"use strict";U.r(z),U.d(z,"default",function(){return s}),U.d(z,"LoadError",function(){return o});var V=U("./src/polyfills/number.ts"),N=U("./src/errors.ts");function L(r,a){r.prototype=Object.create(a.prototype),r.prototype.constructor=r,u(r,a)}function $(r){var a=typeof Map=="function"?new Map:void 0;return $=function(t){if(t===null||!R(t))return t;if(typeof t!="function")throw new TypeError("Super expression must either be null or a function");if(typeof a!="undefined"){if(a.has(t))return a.get(t);a.set(t,E)}function E(){return H(t,arguments,f(this).constructor)}return E.prototype=Object.create(t.prototype,{constructor:{value:E,enumerable:!1,writable:!0,configurable:!0}}),u(E,t)},$(r)}function H(r,a,n){return e()?H=Reflect.construct:H=function(E,b,_){var B=[null];B.push.apply(B,b);var x=Function.bind.apply(E,B),h=new x;return _&&u(h,_.prototype),h},H.apply(null,arguments)}function e(){if(typeof Reflect=="undefined"||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(r){return!1}}function R(r){return Function.toString.call(r).indexOf("[native code]")!==-1}function u(r,a){return u=Object.setPrototypeOf||function(t,E){return t.__proto__=E,t},u(r,a)}function f(r){return f=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},f(r)}var l=Math.pow(2,17),s=function(){function r(n){this.config=void 0,this.loader=null,this.partLoadTimeout=-1,this.config=n}var a=r.prototype;return a.destroy=function(){this.loader&&(this.loader.destroy(),this.loader=null)},a.abort=function(){this.loader&&this.loader.abort()},a.load=function(t,E){var b=this,_=t.url;if(!_)return Promise.reject(new o({type:N.ErrorTypes.NETWORK_ERROR,details:N.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:t,networkDetails:null},"Fragment does not have a "+(_?"part list":"url")));this.abort();var B=this.config,x=B.fLoader,h=B.loader;return new Promise(function(d,A){b.loader&&b.loader.destroy();var c=b.loader=t.loader=x?new x(B):new h(B),w=i(t),m={timeout:B.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:B.fragLoadingMaxRetryTimeout,highWaterMark:l};t.stats=c.stats,c.load(w,m,{onSuccess:function(F,k,S,Q){b.resetLoader(t,c),d({frag:t,part:null,payload:F.data,networkDetails:Q})},onError:function(F,k,S){b.resetLoader(t,c),A(new o({type:N.ErrorTypes.NETWORK_ERROR,details:N.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:t,response:F,networkDetails:S}))},onAbort:function(F,k,S){b.resetLoader(t,c),A(new o({type:N.ErrorTypes.NETWORK_ERROR,details:N.ErrorDetails.INTERNAL_ABORTED,fatal:!1,frag:t,networkDetails:S}))},onTimeout:function(F,k,S){b.resetLoader(t,c),A(new o({type:N.ErrorTypes.NETWORK_ERROR,details:N.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:t,networkDetails:S}))},onProgress:function(F,k,S,Q){E&&E({frag:t,part:null,payload:S,networkDetails:Q})}})})},a.loadPart=function(t,E,b){var _=this;this.abort();var B=this.config,x=B.fLoader,h=B.loader;return new Promise(function(d,A){_.loader&&_.loader.destroy();var c=_.loader=t.loader=x?new x(B):new h(B),w=i(t,E),m={timeout:B.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:B.fragLoadingMaxRetryTimeout,highWaterMark:l};E.stats=c.stats,c.load(w,m,{onSuccess:function(F,k,S,Q){_.resetLoader(t,c),_.updateStatsFromPart(t,E);var X={frag:t,part:E,payload:F.data,networkDetails:Q};b(X),d(X)},onError:function(F,k,S){_.resetLoader(t,c),A(new o({type:N.ErrorTypes.NETWORK_ERROR,details:N.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:t,part:E,response:F,networkDetails:S}))},onAbort:function(F,k,S){t.stats.aborted=E.stats.aborted,_.resetLoader(t,c),A(new o({type:N.ErrorTypes.NETWORK_ERROR,details:N.ErrorDetails.INTERNAL_ABORTED,fatal:!1,frag:t,part:E,networkDetails:S}))},onTimeout:function(F,k,S){_.resetLoader(t,c),A(new o({type:N.ErrorTypes.NETWORK_ERROR,details:N.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:t,part:E,networkDetails:S}))}})})},a.updateStatsFromPart=function(t,E){var b=t.stats,_=E.stats,B=_.total;if(b.loaded+=_.loaded,B){var x=Math.round(t.duration/E.duration),h=Math.min(Math.round(b.loaded/B),x),d=x-h,A=d*Math.round(b.loaded/h);b.total=b.loaded+A}else b.total=Math.max(b.loaded,b.total);var c=b.loading,w=_.loading;c.start?c.first+=w.first-w.start:(c.start=w.start,c.first=w.first),c.end=w.end},a.resetLoader=function(t,E){t.loader=null,this.loader===E&&(self.clearTimeout(this.partLoadTimeout),this.loader=null),E.destroy()},r}();function i(r,a){a===void 0&&(a=null);var n=a||r,t={frag:r,part:a,responseType:"arraybuffer",url:n.url,headers:{},rangeStart:0,rangeEnd:0},E=n.byteRangeStartOffset,b=n.byteRangeEndOffset;return Object(V.isFiniteNumber)(E)&&Object(V.isFiniteNumber)(b)&&(t.rangeStart=E,t.rangeEnd=b),t}var o=function(r){L(a,r);function a(n){for(var t,E=arguments.length,b=new Array(E>1?E-1:0),_=1;_<E;_++)b[_-1]=arguments[_];return t=r.call.apply(r,[this].concat(b))||this,t.data=void 0,t.data=n,t}return a}($(Error))},"./src/loader/fragment.ts":function(Ae,z,U){"use strict";U.r(z),U.d(z,"ElementaryStreamTypes",function(){return s}),U.d(z,"BaseSegment",function(){return i}),U.d(z,"Fragment",function(){return o}),U.d(z,"Part",function(){return r});var V=U("./src/polyfills/number.ts"),N=U("./node_modules/url-toolkit/src/url-toolkit.js"),L=U.n(N),$=U("./src/utils/logger.ts"),H=U("./src/loader/level-key.ts"),e=U("./src/loader/load-stats.ts");function R(a,n){a.prototype=Object.create(n.prototype),a.prototype.constructor=a,u(a,n)}function u(a,n){return u=Object.setPrototypeOf||function(E,b){return E.__proto__=b,E},u(a,n)}function f(a,n){for(var t=0;t<n.length;t++){var E=n[t];E.enumerable=E.enumerable||!1,E.configurable=!0,"value"in E&&(E.writable=!0),Object.defineProperty(a,E.key,E)}}function l(a,n,t){return n&&f(a.prototype,n),t&&f(a,t),a}var s;(function(a){a.AUDIO="audio",a.VIDEO="video",a.AUDIOVIDEO="audiovideo"})(s||(s={}));var i=function(){function a(t){var E;this._byteRange=null,this._url=null,this.baseurl=void 0,this.relurl=void 0,this.elementaryStreams=(E={},E[s.AUDIO]=null,E[s.VIDEO]=null,E[s.AUDIOVIDEO]=null,E),this.baseurl=t}var n=a.prototype;return n.setByteRange=function(E,b){var _=E.split("@",2),B=[];_.length===1?B[0]=b?b.byteRangeEndOffset:0:B[0]=parseInt(_[1]),B[1]=parseInt(_[0])+B[0],this._byteRange=B},l(a,[{key:"byteRange",get:function(){return this._byteRange?this._byteRange:[]}},{key:"byteRangeStartOffset",get:function(){return this.byteRange[0]}},{key:"byteRangeEndOffset",get:function(){return this.byteRange[1]}},{key:"url",get:function(){return!this._url&&this.baseurl&&this.relurl&&(this._url=Object(N.buildAbsoluteURL)(this.baseurl,this.relurl,{alwaysNormalize:!0})),this._url||""},set:function(E){this._url=E}}]),a}(),o=function(a){R(n,a);function n(E,b){var _;return _=a.call(this,b)||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 e.LoadStats,_.urlId=0,_.data=void 0,_.bitrateTest=!1,_.title=null,_.initSegment=null,_.type=E,_}var t=n.prototype;return t.createInitializationVector=function(b){for(var _=new Uint8Array(16),B=12;B<16;B++)_[B]=b>>8*(15-B)&255;return _},t.setDecryptDataFromLevelKey=function(b,_){var B=b;return(b==null?void 0:b.method)==="AES-128"&&b.uri&&!b.iv&&(B=H.LevelKey.fromURI(b.uri),B.method=b.method,B.iv=this.createInitializationVector(_),B.keyFormat="identity"),B},t.setElementaryStreamInfo=function(b,_,B,x,h,d){d===void 0&&(d=!1);var A=this.elementaryStreams,c=A[b];if(!c){A[b]={startPTS:_,endPTS:B,startDTS:x,endDTS:h,partial:d};return}c.startPTS=Math.min(c.startPTS,_),c.endPTS=Math.max(c.endPTS,B),c.startDTS=Math.min(c.startDTS,x),c.endDTS=Math.max(c.endDTS,h)},t.clearElementaryStreamInfo=function(){var b=this.elementaryStreams;b[s.AUDIO]=null,b[s.VIDEO]=null,b[s.AUDIOVIDEO]=null},l(n,[{key:"decryptdata",get:function(){if(!this.levelkey&&!this._decryptdata)return null;if(!this._decryptdata&&this.levelkey){var b=this.sn;typeof b!="number"&&(this.levelkey&&this.levelkey.method==="AES-128"&&!this.levelkey.iv&&$.logger.warn('missing IV for initialization segment with method="'+this.levelkey.method+'" - compliance issue'),b=0),this._decryptdata=this.setDecryptDataFromLevelKey(this.levelkey,b)}return this._decryptdata}},{key:"end",get:function(){return this.start+this.duration}},{key:"endProgramDateTime",get:function(){if(this.programDateTime===null)return null;if(!Object(V.isFiniteNumber)(this.programDateTime))return null;var b=Object(V.isFiniteNumber)(this.duration)?this.duration:0;return this.programDateTime+b*1e3}},{key:"encrypted",get:function(){var b;return!!((b=this.decryptdata)!==null&&b!==void 0&&b.keyFormat&&this.decryptdata.uri)}}]),n}(i),r=function(a){R(n,a);function n(t,E,b,_,B){var x;x=a.call(this,b)||this,x.fragOffset=0,x.duration=0,x.gap=!1,x.independent=!1,x.relurl=void 0,x.fragment=void 0,x.index=void 0,x.stats=new e.LoadStats,x.duration=t.decimalFloatingPoint("DURATION"),x.gap=t.bool("GAP"),x.independent=t.bool("INDEPENDENT"),x.relurl=t.enumeratedString("URI"),x.fragment=E,x.index=_;var h=t.enumeratedString("BYTERANGE");return h&&x.setByteRange(h,B),B&&(x.fragOffset=B.fragOffset+B.duration),x}return l(n,[{key:"start",get:function(){return this.fragment.start+this.fragOffset}},{key:"end",get:function(){return this.start+this.duration}},{key:"loaded",get:function(){var E=this.elementaryStreams;return!!(E.audio||E.video||E.audiovideo)}}]),n}(i)},"./src/loader/key-loader.ts":function(Ae,z,U){"use strict";U.r(z),U.d(z,"default",function(){return $});var V=U("./src/events.ts"),N=U("./src/errors.ts"),L=U("./src/utils/logger.ts"),$=function(){function H(R){this.hls=void 0,this.loaders={},this.decryptkey=null,this.decrypturl=null,this.hls=R,this._registerListeners()}var e=H.prototype;return e._registerListeners=function(){this.hls.on(V.Events.KEY_LOADING,this.onKeyLoading,this)},e._unregisterListeners=function(){this.hls.off(V.Events.KEY_LOADING,this.onKeyLoading)},e.destroy=function(){this._unregisterListeners();for(var u in this.loaders){var f=this.loaders[u];f&&f.destroy()}this.loaders={}},e.onKeyLoading=function(u,f){var l=f.frag,s=l.type,i=this.loaders[s];if(!l.decryptdata){L.logger.warn("Missing decryption data on fragment in onKeyLoading");return}var o=l.decryptdata.uri;if(o!==this.decrypturl||this.decryptkey===null){var r=this.hls.config;if(i&&(L.logger.warn("abort previous key loader for type:"+s),i.abort()),!o){L.logger.warn("key uri is falsy");return}var a=r.loader,n=l.loader=this.loaders[s]=new a(r);this.decrypturl=o,this.decryptkey=null;var t={url:o,frag:l,responseType:"arraybuffer"},E={timeout:r.fragLoadingTimeOut,maxRetry:0,retryDelay:r.fragLoadingRetryDelay,maxRetryDelay:r.fragLoadingMaxRetryTimeout,highWaterMark:0},b={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};n.load(t,E,b)}else this.decryptkey&&(l.decryptdata.key=this.decryptkey,this.hls.trigger(V.Events.KEY_LOADED,{frag:l}))},e.loadsuccess=function(u,f,l){var s=l.frag;if(!s.decryptdata){L.logger.error("after key load, decryptdata unset");return}this.decryptkey=s.decryptdata.key=new Uint8Array(u.data),s.loader=null,delete this.loaders[s.type],this.hls.trigger(V.Events.KEY_LOADED,{frag:s})},e.loaderror=function(u,f){var l=f.frag,s=l.loader;s&&s.abort(),delete this.loaders[l.type],this.hls.trigger(V.Events.ERROR,{type:N.ErrorTypes.NETWORK_ERROR,details:N.ErrorDetails.KEY_LOAD_ERROR,fatal:!1,frag:l,response:u})},e.loadtimeout=function(u,f){var l=f.frag,s=l.loader;s&&s.abort(),delete this.loaders[l.type],this.hls.trigger(V.Events.ERROR,{type:N.ErrorTypes.NETWORK_ERROR,details:N.ErrorDetails.KEY_LOAD_TIMEOUT,fatal:!1,frag:l})},H}()},"./src/loader/level-details.ts":function(Ae,z,U){"use strict";U.r(z),U.d(z,"LevelDetails",function(){return H});var V=U("./src/polyfills/number.ts");function N(e,R){for(var u=0;u<R.length;u++){var f=R[u];f.enumerable=f.enumerable||!1,f.configurable=!0,"value"in f&&(f.writable=!0),Object.defineProperty(e,f.key,f)}}function L(e,R,u){return R&&N(e.prototype,R),u&&N(e,u),e}var $=10,H=function(){function e(u){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=u}var R=e.prototype;return R.reloaded=function(f){if(!f){this.advanced=!0,this.updated=!0;return}var l=this.lastPartSn-f.lastPartSn,s=this.lastPartIndex-f.lastPartIndex;this.updated=this.endSN!==f.endSN||!!s||!!l,this.advanced=this.endSN>f.endSN||l>0||l===0&&s>0,this.updated||this.advanced?this.misses=Math.floor(f.misses*.6):this.misses=f.misses+1,this.availabilityDelay=f.availabilityDelay},L(e,[{key:"hasProgramDateTime",get:function(){return this.fragments.length?Object(V.isFiniteNumber)(this.fragments[this.fragments.length-1].programDateTime):!1}},{key:"levelTargetDuration",get:function(){return this.averagetargetduration||this.targetduration||$}},{key:"drift",get:function(){var f=this.driftEndTime-this.driftStartTime;if(f>0){var l=this.driftEnd-this.driftStart;return l*1e3/f}return 1}},{key:"edge",get:function(){return this.partEnd||this.fragmentEnd}},{key:"partEnd",get:function(){var f;return(f=this.partList)!==null&&f!==void 0&&f.length?this.partList[this.partList.length-1].end:this.fragmentEnd}},{key:"fragmentEnd",get:function(){var f;return(f=this.fragments)!==null&&f!==void 0&&f.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 f;return(f=this.partList)!==null&&f!==void 0&&f.length?this.partList[this.partList.length-1].index:-1}},{key:"lastPartSn",get:function(){var f;return(f=this.partList)!==null&&f!==void 0&&f.length?this.partList[this.partList.length-1].fragment.sn:this.endSN}}]),e}()},"./src/loader/level-key.ts":function(Ae,z,U){"use strict";U.r(z),U.d(z,"LevelKey",function(){return H});var V=U("./node_modules/url-toolkit/src/url-toolkit.js"),N=U.n(V);function L(e,R){for(var u=0;u<R.length;u++){var f=R[u];f.enumerable=f.enumerable||!1,f.configurable=!0,"value"in f&&(f.writable=!0),Object.defineProperty(e,f.key,f)}}function $(e,R,u){return R&&L(e.prototype,R),u&&L(e,u),e}var H=function(){e.fromURL=function(u,f){return new e(u,f)},e.fromURI=function(u){return new e(u)};function e(R,u){this._uri=null,this.method=null,this.keyFormat=null,this.keyFormatVersions=null,this.keyID=null,this.key=null,this.iv=null,u?this._uri=Object(V.buildAbsoluteURL)(R,u,{alwaysNormalize:!0}):this._uri=R}return $(e,[{key:"uri",get:function(){return this._uri}}]),e}()},"./src/loader/load-stats.ts":function(Ae,z,U){"use strict";U.r(z),U.d(z,"LoadStats",function(){return V});var V=function(){this.aborted=!1,this.loaded=0,this.retry=0,this.total=0,this.chunkCount=0,this.bwEstimate=0,this.loading={start:0,first:0,end:0},this.parsing={start:0,end:0},this.buffering={start:0,first:0,end:0}}},"./src/loader/m3u8-parser.ts":function(Ae,z,U){"use strict";U.r(z),U.d(z,"default",function(){return n});var V=U("./src/polyfills/number.ts"),N=U("./node_modules/url-toolkit/src/url-toolkit.js"),L=U.n(N),$=U("./src/loader/fragment.ts"),H=U("./src/loader/level-details.ts"),e=U("./src/loader/level-key.ts"),R=U("./src/utils/attr-list.ts"),u=U("./src/utils/logger.ts"),f=U("./src/utils/codecs.ts"),l=/#EXT-X-STREAM-INF:([^\r\n]*)(?:[\r\n](?:#[^\r\n]*)?)*([^\r\n]+)|#EXT-X-SESSION-DATA:([^\r\n]*)[\r\n]+/g,s=/#EXT-X-MEDIA:(.*)/g,i=new RegExp([/#EXTINF:\s*(\d*(?:\.\d+)?)(?:,(.*)\s+)?/.source,/(?!#) *(\S[\S ]*)/.source,/#EXT-X-BYTERANGE:*(.+)/.source,/#EXT-X-PROGRAM-DATE-TIME:(.+)/.source,/#.*/.source].join("|"),"g"),o=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("|")),r=/\.(mp4|m4s|m4v|m4a)$/i;function a(B){var x,h;return r.test((x=(h=N.parseURL(B))===null||h===void 0?void 0:h.path)!=null?x:"")}var n=function(){function B(){}return B.findGroup=function(h,d){for(var A=0;A<h.length;A++){var c=h[A];if(c.id===d)return c}},B.convertAVC1ToAVCOTI=function(h){var d=h.split(".");if(d.length>2){var A=d.shift()+".";return A+=parseInt(d.shift()).toString(16),A+=("000"+parseInt(d.shift()).toString(16)).substr(-4),A}return h},B.resolve=function(h,d){return N.buildAbsoluteURL(d,h,{alwaysNormalize:!0})},B.parseMasterPlaylist=function(h,d){var A=[],c={},w=!1;l.lastIndex=0;for(var m;(m=l.exec(h))!=null;)if(m[1]){var g=new R.AttrList(m[1]),F={attrs:g,bitrate:g.decimalInteger("AVERAGE-BANDWIDTH")||g.decimalInteger("BANDWIDTH"),name:g.NAME,url:B.resolve(m[2],d)},k=g.decimalResolution("RESOLUTION");k&&(F.width=k.width,F.height=k.height),t((g.CODECS||"").split(/[ ,]+/).filter(function(Q){return Q}),F),F.videoCodec&&F.videoCodec.indexOf("avc1")!==-1&&(F.videoCodec=B.convertAVC1ToAVCOTI(F.videoCodec)),A.push(F)}else if(m[3]){var S=new R.AttrList(m[3]);S["DATA-ID"]&&(w=!0,c[S["DATA-ID"]]=S)}return{levels:A,sessionData:w?c:null}},B.parseMasterPlaylistMedia=function(h,d,A,c){c===void 0&&(c=[]);var w,m=[],g=0;for(s.lastIndex=0;(w=s.exec(h))!==null;){var F=new R.AttrList(w[1]);if(F.TYPE===A){var k={attrs:F,bitrate:0,id:g++,groupId:F["GROUP-ID"],instreamId:F["INSTREAM-ID"],name:F.NAME||F.LANGUAGE||"",type:A,default:F.bool("DEFAULT"),autoselect:F.bool("AUTOSELECT"),forced:F.bool("FORCED"),lang:F.LANGUAGE,url:F.URI?B.resolve(F.URI,d):""};if(c.length){var S=B.findGroup(c,k.groupId)||c[0];E(k,S,"audioCodec"),E(k,S,"textCodec")}m.push(k)}}return m},B.parseLevelPlaylist=function(h,d,A,c,w){var m=new H.LevelDetails(d),g=m.fragments,F=null,k=0,S=0,Q=0,X=0,P=null,q=new $.Fragment(c,d),ie,be,me,Me=-1,Ne=!1;for(i.lastIndex=0,m.m3u8=h;(ie=i.exec(h))!==null;){Ne&&(Ne=!1,q=new $.Fragment(c,d),q.start=Q,q.sn=k,q.cc=X,q.level=A,F&&(q.initSegment=F,q.rawProgramDateTime=F.rawProgramDateTime));var ke=ie[1];if(ke){q.duration=parseFloat(ke);var Ke=(" "+ie[2]).slice(1);q.title=Ke||null,q.tagList.push(Ke?["INF",ke,Ke]:["INF",ke])}else if(ie[3])Object(V.isFiniteNumber)(q.duration)&&(q.start=Q,me&&(q.levelkey=me),q.sn=k,q.level=A,q.cc=X,q.urlId=w,g.push(q),q.relurl=(" "+ie[3]).slice(1),_(q,P),P=q,Q+=q.duration,k++,S=0,Ne=!0);else if(ie[4]){var Ye=(" "+ie[4]).slice(1);P?q.setByteRange(Ye,P):q.setByteRange(Ye)}else if(ie[5])q.rawProgramDateTime=(" "+ie[5]).slice(1),q.tagList.push(["PROGRAM-DATE-TIME",q.rawProgramDateTime]),Me===-1&&(Me=g.length);else{if(ie=ie[0].match(o),!ie){u.logger.warn("No matches on slow regex match for level playlist!");continue}for(be=1;be<ie.length&&!(typeof ie[be]!="undefined");be++);var _e=(" "+ie[be]).slice(1),Te=(" "+ie[be+1]).slice(1),Pe=ie[be+2]?(" "+ie[be+2]).slice(1):"";switch(_e){case"PLAYLIST-TYPE":m.type=Te.toUpperCase();break;case"MEDIA-SEQUENCE":k=m.startSN=parseInt(Te);break;case"SKIP":{var bt=new R.AttrList(Te),mt=bt.decimalInteger("SKIPPED-SEGMENTS");if(Object(V.isFiniteNumber)(mt)){m.skippedSegments=mt;for(var dt=mt;dt--;)g.unshift(null);k+=mt}var yt=bt.enumeratedString("RECENTLY-REMOVED-DATERANGES");yt&&(m.recentlyRemovedDateranges=yt.split(" "));break}case"TARGETDURATION":m.targetduration=parseFloat(Te);break;case"VERSION":m.version=parseInt(Te);break;case"EXTM3U":break;case"ENDLIST":m.live=!1;break;case"#":(Te||Pe)&&q.tagList.push(Pe?[Te,Pe]:[Te]);break;case"DIS":X++;case"GAP":q.tagList.push([_e]);break;case"BITRATE":q.tagList.push([_e,Te]);break;case"DISCONTINUITY-SEQ":X=parseInt(Te);break;case"KEY":{var le,Z=new R.AttrList(Te),te=Z.enumeratedString("METHOD"),ee=Z.URI,ue=Z.hexadecimalInteger("IV"),ye=Z.enumeratedString("KEYFORMATVERSIONS"),ve=Z.enumeratedString("KEYID"),Je=(le=Z.enumeratedString("KEYFORMAT"))!=null?le:"identity",tt=["com.apple.streamingkeydelivery","com.microsoft.playready","urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed","com.widevine"];if(tt.indexOf(Je)>-1){u.logger.warn("Keyformat "+Je+" is not supported from the manifest");continue}else if(Je!=="identity")continue;te&&(me=e.LevelKey.fromURL(d,ee),ee&&["AES-128","SAMPLE-AES","SAMPLE-AES-CENC"].indexOf(te)>=0&&(me.method=te,me.keyFormat=Je,ve&&(me.keyID=ve),ye&&(me.keyFormatVersions=ye),me.iv=ue));break}case"START":{var it=new R.AttrList(Te),st=it.decimalFloatingPoint("TIME-OFFSET");Object(V.isFiniteNumber)(st)&&(m.startTimeOffset=st);break}case"MAP":{var ht=new R.AttrList(Te);q.relurl=ht.URI,ht.BYTERANGE&&q.setByteRange(ht.BYTERANGE),q.level=A,q.sn="initSegment",me&&(q.levelkey=me),q.initSegment=null,F=q,Ne=!0;break}case"SERVER-CONTROL":{var _t=new R.AttrList(Te);m.canBlockReload=_t.bool("CAN-BLOCK-RELOAD"),m.canSkipUntil=_t.optionalFloat("CAN-SKIP-UNTIL",0),m.canSkipDateRanges=m.canSkipUntil>0&&_t.bool("CAN-SKIP-DATERANGES"),m.partHoldBack=_t.optionalFloat("PART-HOLD-BACK",0),m.holdBack=_t.optionalFloat("HOLD-BACK",0);break}case"PART-INF":{var He=new R.AttrList(Te);m.partTarget=He.decimalFloatingPoint("PART-TARGET");break}case"PART":{var Xe=m.partList;Xe||(Xe=m.partList=[]);var at=S>0?Xe[Xe.length-1]:void 0,ut=S++,$e=new $.Part(new R.AttrList(Te),q,d,ut,at);Xe.push($e),q.duration+=$e.duration;break}case"PRELOAD-HINT":{var qe=new R.AttrList(Te);m.preloadHint=qe;break}case"RENDITION-REPORT":{var De=new R.AttrList(Te);m.renditionReports=m.renditionReports||[],m.renditionReports.push(De);break}default:u.logger.warn("line parsed but not handled: "+ie);break}}}P&&!P.relurl?(g.pop(),Q-=P.duration,m.partList&&(m.fragmentHint=P)):m.partList&&(_(q,P),q.cc=X,m.fragmentHint=q);var xe=g.length,Se=g[0],oe=g[xe-1];if(Q+=m.skippedSegments*m.targetduration,Q>0&&xe&&oe){m.averagetargetduration=Q/xe;var ce=oe.sn;m.endSN=ce!=="initSegment"?ce:0,Se&&(m.startCC=Se.cc,Se.initSegment||m.fragments.every(function(Ee){return Ee.relurl&&a(Ee.relurl)})&&(u.logger.warn("MP4 fragments found but no init segment (probably no MAP, incomplete M3U8), trying to fetch SIDX"),q=new $.Fragment(c,d),q.relurl=oe.relurl,q.level=A,q.sn="initSegment",Se.initSegment=q,m.needSidxRanges=!0))}else m.endSN=0,m.startCC=0;return m.fragmentHint&&(Q+=m.fragmentHint.duration),m.totalduration=Q,m.endCC=X,Me>0&&b(g,Me),m},B}();function t(B,x){["video","audio","text"].forEach(function(h){var d=B.filter(function(c){return Object(f.isCodecType)(c,h)});if(d.length){var A=d.filter(function(c){return c.lastIndexOf("avc1",0)===0||c.lastIndexOf("mp4a",0)===0});x[h+"Codec"]=A.length>0?A[0]:d[0],B=B.filter(function(c){return d.indexOf(c)===-1})}}),x.unknownCodecs=B}function E(B,x,h){var d=x[h];d&&(B[h]=d)}function b(B,x){for(var h=B[x],d=x;d--;){var A=B[d];if(!A)return;A.programDateTime=h.programDateTime-A.duration*1e3,h=A}}function _(B,x){B.rawProgramDateTime?B.programDateTime=Date.parse(B.rawProgramDateTime):x!=null&&x.programDateTime&&(B.programDateTime=x.endProgramDateTime),Object(V.isFiniteNumber)(B.programDateTime)||(B.programDateTime=null,B.rawProgramDateTime=null)}},"./src/loader/playlist-loader.ts":function(Ae,z,U){"use strict";U.r(z);var V=U("./src/polyfills/number.ts"),N=U("./src/events.ts"),L=U("./src/errors.ts"),$=U("./src/utils/logger.ts"),H=U("./src/utils/mp4-tools.ts"),e=U("./src/loader/m3u8-parser.ts"),R=U("./src/types/loader.ts"),u=U("./src/utils/attr-list.ts");function f(i){var o=i.type;switch(o){case R.PlaylistContextType.AUDIO_TRACK:return R.PlaylistLevelType.AUDIO;case R.PlaylistContextType.SUBTITLE_TRACK:return R.PlaylistLevelType.SUBTITLE;default:return R.PlaylistLevelType.MAIN}}function l(i,o){var r=i.url;return(r===void 0||r.indexOf("data:")===0)&&(r=o.url),r}var s=function(){function i(r){this.hls=void 0,this.loaders=Object.create(null),this.hls=r,this.registerListeners()}var o=i.prototype;return o.registerListeners=function(){var a=this.hls;a.on(N.Events.MANIFEST_LOADING,this.onManifestLoading,this),a.on(N.Events.LEVEL_LOADING,this.onLevelLoading,this),a.on(N.Events.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),a.on(N.Events.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)},o.unregisterListeners=function(){var a=this.hls;a.off(N.Events.MANIFEST_LOADING,this.onManifestLoading,this),a.off(N.Events.LEVEL_LOADING,this.onLevelLoading,this),a.off(N.Events.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),a.off(N.Events.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)},o.createInternalLoader=function(a){var n=this.hls.config,t=n.pLoader,E=n.loader,b=t||E,_=new b(n);return a.loader=_,this.loaders[a.type]=_,_},o.getInternalLoader=function(a){return this.loaders[a.type]},o.resetInternalLoader=function(a){this.loaders[a]&&delete this.loaders[a]},o.destroyInternalLoaders=function(){for(var a in this.loaders){var n=this.loaders[a];n&&n.destroy(),this.resetInternalLoader(a)}},o.destroy=function(){this.unregisterListeners(),this.destroyInternalLoaders()},o.onManifestLoading=function(a,n){var t=n.url;this.load({id:null,groupId:null,level:0,responseType:"text",type:R.PlaylistContextType.MANIFEST,url:t,deliveryDirectives:null})},o.onLevelLoading=function(a,n){var t=n.id,E=n.level,b=n.url,_=n.deliveryDirectives;this.load({id:t,groupId:null,level:E,responseType:"text",type:R.PlaylistContextType.LEVEL,url:b,deliveryDirectives:_})},o.onAudioTrackLoading=function(a,n){var t=n.id,E=n.groupId,b=n.url,_=n.deliveryDirectives;this.load({id:t,groupId:E,level:null,responseType:"text",type:R.PlaylistContextType.AUDIO_TRACK,url:b,deliveryDirectives:_})},o.onSubtitleTrackLoading=function(a,n){var t=n.id,E=n.groupId,b=n.url,_=n.deliveryDirectives;this.load({id:t,groupId:E,level:null,responseType:"text",type:R.PlaylistContextType.SUBTITLE_TRACK,url:b,deliveryDirectives:_})},o.load=function(a){var n,t=this.hls.config,E=this.getInternalLoader(a);if(E){var b=E.context;if(b&&b.url===a.url){$.logger.trace("[playlist-loader]: playlist request ongoing");return}$.logger.log("[playlist-loader]: aborting previous loader for type: "+a.type),E.abort()}var _,B,x,h;switch(a.type){case R.PlaylistContextType.MANIFEST:_=t.manifestLoadingMaxRetry,B=t.manifestLoadingTimeOut,x=t.manifestLoadingRetryDelay,h=t.manifestLoadingMaxRetryTimeout;break;case R.PlaylistContextType.LEVEL:case R.PlaylistContextType.AUDIO_TRACK:case R.PlaylistContextType.SUBTITLE_TRACK:_=0,B=t.levelLoadingTimeOut;break;default:_=t.levelLoadingMaxRetry,B=t.levelLoadingTimeOut,x=t.levelLoadingRetryDelay,h=t.levelLoadingMaxRetryTimeout;break}if(E=this.createInternalLoader(a),(n=a.deliveryDirectives)!==null&&n!==void 0&&n.part){var d;if(a.type===R.PlaylistContextType.LEVEL&&a.level!==null?d=this.hls.levels[a.level].details:a.type===R.PlaylistContextType.AUDIO_TRACK&&a.id!==null?d=this.hls.audioTracks[a.id].details:a.type===R.PlaylistContextType.SUBTITLE_TRACK&&a.id!==null&&(d=this.hls.subtitleTracks[a.id].details),d){var A=d.partTarget,c=d.targetduration;A&&c&&(B=Math.min(Math.max(A*3,c*.8)*1e3,B))}}var w={timeout:B,maxRetry:_,retryDelay:x,maxRetryDelay:h,highWaterMark:0},m={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};E.load(a,w,m)},o.loadsuccess=function(a,n,t,E){if(E===void 0&&(E=null),t.isSidxRequest){this.handleSidxRequest(a,t),this.handlePlaylistLoaded(a,n,t,E);return}this.resetInternalLoader(t.type);var b=a.data;if(b.indexOf("#EXTM3U")!==0){this.handleManifestParsingError(a,t,"no EXTM3U delimiter",E);return}n.parsing.start=performance.now(),b.indexOf("#EXTINF:")>0||b.indexOf("#EXT-X-TARGETDURATION:")>0?this.handleTrackOrLevelPlaylist(a,n,t,E):this.handleMasterPlaylist(a,n,t,E)},o.loaderror=function(a,n,t){t===void 0&&(t=null),this.handleNetworkError(n,t,!1,a)},o.loadtimeout=function(a,n,t){t===void 0&&(t=null),this.handleNetworkError(n,t,!0)},o.handleMasterPlaylist=function(a,n,t,E){var b=this.hls,_=a.data,B=l(a,t),x=e.default.parseMasterPlaylist(_,B),h=x.levels,d=x.sessionData;if(!h.length){this.handleManifestParsingError(a,t,"no level found in manifest",E);return}var A=h.map(function(k){return{id:k.attrs.AUDIO,audioCodec:k.audioCodec}}),c=h.map(function(k){return{id:k.attrs.SUBTITLES,textCodec:k.textCodec}}),w=e.default.parseMasterPlaylistMedia(_,B,"AUDIO",A),m=e.default.parseMasterPlaylistMedia(_,B,"SUBTITLES",c),g=e.default.parseMasterPlaylistMedia(_,B,"CLOSED-CAPTIONS");if(w.length){var F=w.some(function(k){return!k.url});!F&&h[0].audioCodec&&!h[0].attrs.AUDIO&&($.logger.log("[playlist-loader]: audio codec signaled in quality level, but no embedded audio track signaled, create one"),w.unshift({type:"main",name:"main",default:!1,autoselect:!1,forced:!1,id:-1,attrs:new u.AttrList({}),bitrate:0,url:""}))}b.trigger(N.Events.MANIFEST_LOADED,{levels:h,audioTracks:w,subtitles:m,captions:g,url:B,stats:n,networkDetails:E,sessionData:d})},o.handleTrackOrLevelPlaylist=function(a,n,t,E){var b=this.hls,_=t.id,B=t.level,x=t.type,h=l(a,t),d=Object(V.isFiniteNumber)(_)?_:0,A=Object(V.isFiniteNumber)(B)?B:d,c=f(t),w=e.default.parseLevelPlaylist(a.data,h,A,c,d);if(!w.fragments.length){b.trigger(N.Events.ERROR,{type:L.ErrorTypes.NETWORK_ERROR,details:L.ErrorDetails.LEVEL_EMPTY_ERROR,fatal:!1,url:h,reason:"no fragments found in level",level:typeof t.level=="number"?t.level:void 0});return}if(x===R.PlaylistContextType.MANIFEST){var m={attrs:new u.AttrList({}),bitrate:0,details:w,name:"",url:h};b.trigger(N.Events.MANIFEST_LOADED,{levels:[m],audioTracks:[],url:h,stats:n,networkDetails:E,sessionData:null})}if(n.parsing.end=performance.now(),w.needSidxRanges){var g,F=(g=w.fragments[0].initSegment)===null||g===void 0?void 0:g.url;this.load({url:F,isSidxRequest:!0,type:x,level:B,levelDetails:w,id:_,groupId:null,rangeStart:0,rangeEnd:2048,responseType:"arraybuffer",deliveryDirectives:null});return}t.levelDetails=w,this.handlePlaylistLoaded(a,n,t,E)},o.handleSidxRequest=function(a,n){var t=Object(H.parseSegmentIndex)(new Uint8Array(a.data));if(!t)return;var E=t.references,b=n.levelDetails;E.forEach(function(_,B){var x=_.info,h=b.fragments[B];h.byteRange.length===0&&h.setByteRange(String(1+x.end-x.start)+"@"+String(x.start)),h.initSegment&&h.initSegment.setByteRange(String(t.moovEndOffset)+"@0")})},o.handleManifestParsingError=function(a,n,t,E){this.hls.trigger(N.Events.ERROR,{type:L.ErrorTypes.NETWORK_ERROR,details:L.ErrorDetails.MANIFEST_PARSING_ERROR,fatal:n.type===R.PlaylistContextType.MANIFEST,url:a.url,reason:t,response:a,context:n,networkDetails:E})},o.handleNetworkError=function(a,n,t,E){t===void 0&&(t=!1),$.logger.warn("[playlist-loader]: A network "+(t?"timeout":"error")+" occurred while loading "+a.type+" level: "+a.level+" id: "+a.id+' group-id: "'+a.groupId+'"');var b=L.ErrorDetails.UNKNOWN,_=!1,B=this.getInternalLoader(a);switch(a.type){case R.PlaylistContextType.MANIFEST:b=t?L.ErrorDetails.MANIFEST_LOAD_TIMEOUT:L.ErrorDetails.MANIFEST_LOAD_ERROR,_=!0;break;case R.PlaylistContextType.LEVEL:b=t?L.ErrorDetails.LEVEL_LOAD_TIMEOUT:L.ErrorDetails.LEVEL_LOAD_ERROR,_=!1;break;case R.PlaylistContextType.AUDIO_TRACK:b=t?L.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:L.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,_=!1;break;case R.PlaylistContextType.SUBTITLE_TRACK:b=t?L.ErrorDetails.SUBTITLE_TRACK_LOAD_TIMEOUT:L.ErrorDetails.SUBTITLE_LOAD_ERROR,_=!1;break}B&&this.resetInternalLoader(a.type);var x={type:L.ErrorTypes.NETWORK_ERROR,details:b,fatal:_,url:a.url,loader:B,context:a,networkDetails:n};E&&(x.response=E),this.hls.trigger(N.Events.ERROR,x)},o.handlePlaylistLoaded=function(a,n,t,E){var b=t.type,_=t.level,B=t.id,x=t.groupId,h=t.loader,d=t.levelDetails,A=t.deliveryDirectives;if(!(d!=null&&d.targetduration)){this.handleManifestParsingError(a,t,"invalid target duration",E);return}if(!h)return;d.live&&(h.getCacheAge&&(d.ageHeader=h.getCacheAge()||0),(!h.getCacheAge||isNaN(d.ageHeader))&&(d.ageHeader=0));switch(b){case R.PlaylistContextType.MANIFEST:case R.PlaylistContextType.LEVEL:this.hls.trigger(N.Events.LEVEL_LOADED,{details:d,level:_||0,id:B||0,stats:n,networkDetails:E,deliveryDirectives:A});break;case R.PlaylistContextType.AUDIO_TRACK:this.hls.trigger(N.Events.AUDIO_TRACK_LOADED,{details:d,id:B||0,groupId:x||"",stats:n,networkDetails:E,deliveryDirectives:A});break;case R.PlaylistContextType.SUBTITLE_TRACK:this.hls.trigger(N.Events.SUBTITLE_TRACK_LOADED,{details:d,id:B||0,groupId:x||"",stats:n,networkDetails:E,deliveryDirectives:A});break}},i}();z.default=s},"./src/polyfills/number.ts":function(Ae,z,U){"use strict";U.r(z),U.d(z,"isFiniteNumber",function(){return V}),U.d(z,"MAX_SAFE_INTEGER",function(){return N});var V=Number.isFinite||function(L){return typeof L=="number"&&isFinite(L)},N=Number.MAX_SAFE_INTEGER||9007199254740991},"./src/remux/aac-helper.ts":function(Ae,z,U){"use strict";U.r(z);var V=function(){function N(){}return N.getSilentFrame=function($,H){switch($){case"mp4a.40.2":if(H===1)return new Uint8Array([0,200,0,128,35,128]);if(H===2)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(H===3)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(H===4)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(H===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(H===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(H===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(H===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(H===3)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);break}return},N}();z.default=V},"./src/remux/mp4-generator.ts":function(Ae,z,U){"use strict";U.r(z);var V=Math.pow(2,32)-1,N=function(){function L(){}return L.init=function(){L.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 H;for(H in L.types)L.types.hasOwnProperty(H)&&(L.types[H]=[H.charCodeAt(0),H.charCodeAt(1),H.charCodeAt(2),H.charCodeAt(3)]);var e=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),R=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]);L.HDLR_TYPES={video:e,audio:R};var u=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),f=new Uint8Array([0,0,0,0,0,0,0,0]);L.STTS=L.STSC=L.STCO=f,L.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),L.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),L.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),L.STSD=new Uint8Array([0,0,0,0,0,0,0,1]);var l=new Uint8Array([105,115,111,109]),s=new Uint8Array([97,118,99,49]),i=new Uint8Array([0,0,0,1]);L.FTYP=L.box(L.types.ftyp,l,i,l,s),L.DINF=L.box(L.types.dinf,L.box(L.types.dref,u))},L.box=function(H){for(var e=8,R=arguments.length,u=new Array(R>1?R-1:0),f=1;f<R;f++)u[f-1]=arguments[f];for(var l=u.length,s=l;l--;)e+=u[l].byteLength;var i=new Uint8Array(e);for(i[0]=e>>24&255,i[1]=e>>16&255,i[2]=e>>8&255,i[3]=e&255,i.set(H,4),l=0,e=8;l<s;l++)i.set(u[l],e),e+=u[l].byteLength;return i},L.hdlr=function(H){return L.box(L.types.hdlr,L.HDLR_TYPES[H])},L.mdat=function(H){return L.box(L.types.mdat,H)},L.mdhd=function(H,e){e*=H;var R=Math.floor(e/(V+1)),u=Math.floor(e%(V+1));return L.box(L.types.mdhd,new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,H>>24&255,H>>16&255,H>>8&255,H&255,R>>24,R>>16&255,R>>8&255,R&255,u>>24,u>>16&255,u>>8&255,u&255,85,196,0,0]))},L.mdia=function(H){return L.box(L.types.mdia,L.mdhd(H.timescale,H.duration),L.hdlr(H.type),L.minf(H))},L.mfhd=function(H){return L.box(L.types.mfhd,new Uint8Array([0,0,0,0,H>>24,H>>16&255,H>>8&255,H&255]))},L.minf=function(H){return H.type==="audio"?L.box(L.types.minf,L.box(L.types.smhd,L.SMHD),L.DINF,L.stbl(H)):L.box(L.types.minf,L.box(L.types.vmhd,L.VMHD),L.DINF,L.stbl(H))},L.moof=function(H,e,R){return L.box(L.types.moof,L.mfhd(H),L.traf(R,e))},L.moov=function(H){for(var e=H.length,R=[];e--;)R[e]=L.trak(H[e]);return L.box.apply(null,[L.types.moov,L.mvhd(H[0].timescale,H[0].duration)].concat(R).concat(L.mvex(H)))},L.mvex=function(H){for(var e=H.length,R=[];e--;)R[e]=L.trex(H[e]);return L.box.apply(null,[L.types.mvex].concat(R))},L.mvhd=function(H,e){e*=H;var R=Math.floor(e/(V+1)),u=Math.floor(e%(V+1)),f=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,H>>24&255,H>>16&255,H>>8&255,H&255,R>>24,R>>16&255,R>>8&255,R&255,u>>24,u>>16&255,u>>8&255,u&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 L.box(L.types.mvhd,f)},L.sdtp=function(H){var e=H.samples||[],R=new Uint8Array(4+e.length),u,f;for(u=0;u<e.length;u++)f=e[u].flags,R[u+4]=f.dependsOn<<4|f.isDependedOn<<2|f.hasRedundancy;return L.box(L.types.sdtp,R)},L.stbl=function(H){return L.box(L.types.stbl,L.stsd(H),L.box(L.types.stts,L.STTS),L.box(L.types.stsc,L.STSC),L.box(L.types.stsz,L.STSZ),L.box(L.types.stco,L.STCO))},L.avc1=function(H){var e=[],R=[],u,f,l;for(u=0;u<H.sps.length;u++)f=H.sps[u],l=f.byteLength,e.push(l>>>8&255),e.push(l&255),e=e.concat(Array.prototype.slice.call(f));for(u=0;u<H.pps.length;u++)f=H.pps[u],l=f.byteLength,R.push(l>>>8&255),R.push(l&255),R=R.concat(Array.prototype.slice.call(f));var s=L.box(L.types.avcC,new Uint8Array([1,e[3],e[4],e[5],252|3,224|H.sps.length].concat(e).concat([H.pps.length]).concat(R))),i=H.width,o=H.height,r=H.pixelRatio[0],a=H.pixelRatio[1];return L.box(L.types.avc1,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,i>>8&255,i&255,o>>8&255,o&255,0,72,0,0,0,72,0,0,0,0,0,0,0,1,18,100,97,105,108,121,109,111,116,105,111,110,47,104,108,115,46,106,115,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),s,L.box(L.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])),L.box(L.types.pasp,new Uint8Array([r>>24,r>>16&255,r>>8&255,r&255,a>>24,a>>16&255,a>>8&255,a&255])))},L.esds=function(H){var e=H.config.length;return new Uint8Array([0,0,0,0,3,23+e,0,1,0,4,15+e,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([e]).concat(H.config).concat([6,1,2]))},L.mp4a=function(H){var e=H.samplerate;return L.box(L.types.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,H.channelCount,0,16,0,0,0,0,e>>8&255,e&255,0,0]),L.box(L.types.esds,L.esds(H)))},L.mp3=function(H){var e=H.samplerate;return L.box(L.types[".mp3"],new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,H.channelCount,0,16,0,0,0,0,e>>8&255,e&255,0,0]))},L.stsd=function(H){return H.type==="audio"?!H.isAAC&&H.codec==="mp3"?L.box(L.types.stsd,L.STSD,L.mp3(H)):L.box(L.types.stsd,L.STSD,L.mp4a(H)):L.box(L.types.stsd,L.STSD,L.avc1(H))},L.tkhd=function(H){var e=H.id,R=H.duration*H.timescale,u=H.width,f=H.height,l=Math.floor(R/(V+1)),s=Math.floor(R%(V+1));return L.box(L.types.tkhd,new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,e>>24&255,e>>16&255,e>>8&255,e&255,0,0,0,0,l>>24,l>>16&255,l>>8&255,l&255,s>>24,s>>16&255,s>>8&255,s&255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,u>>8&255,u&255,0,0,f>>8&255,f&255,0,0]))},L.traf=function(H,e){var R=L.sdtp(H),u=H.id,f=Math.floor(e/(V+1)),l=Math.floor(e%(V+1));return L.box(L.types.traf,L.box(L.types.tfhd,new Uint8Array([0,0,0,0,u>>24,u>>16&255,u>>8&255,u&255])),L.box(L.types.tfdt,new Uint8Array([1,0,0,0,f>>24,f>>16&255,f>>8&255,f&255,l>>24,l>>16&255,l>>8&255,l&255])),L.trun(H,R.length+16+20+8+16+8+8),R)},L.trak=function(H){return H.duration=H.duration||4294967295,L.box(L.types.trak,L.tkhd(H),L.mdia(H))},L.trex=function(H){var e=H.id;return L.box(L.types.trex,new Uint8Array([0,0,0,0,e>>24,e>>16&255,e>>8&255,e&255,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]))},L.trun=function(H,e){var R=H.samples||[],u=R.length,f=12+16*u,l=new Uint8Array(f),s,i,o,r,a,n;for(e+=8+f,l.set([0,0,15,1,u>>>24&255,u>>>16&255,u>>>8&255,u&255,e>>>24&255,e>>>16&255,e>>>8&255,e&255],0),s=0;s<u;s++)i=R[s],o=i.duration,r=i.size,a=i.flags,n=i.cts,l.set([o>>>24&255,o>>>16&255,o>>>8&255,o&255,r>>>24&255,r>>>16&255,r>>>8&255,r&255,a.isLeading<<2|a.dependsOn,a.isDependedOn<<6|a.hasRedundancy<<4|a.paddingValue<<1|a.isNonSync,a.degradPrio&240<<8,a.degradPrio&15,n>>>24&255,n>>>16&255,n>>>8&255,n&255],12+16*s);return L.box(L.types.trun,l)},L.initSegment=function(H){L.types||L.init();var e=L.moov(H),R=new Uint8Array(L.FTYP.byteLength+e.byteLength);return R.set(L.FTYP),R.set(e,L.FTYP.byteLength),R},L}();N.types=void 0,N.HDLR_TYPES=void 0,N.STTS=void 0,N.STSC=void 0,N.STCO=void 0,N.STSZ=void 0,N.VMHD=void 0,N.SMHD=void 0,N.STSD=void 0,N.FTYP=void 0,N.DINF=void 0,z.default=N},"./src/remux/mp4-remuxer.ts":function(Ae,z,U){"use strict";U.r(z),U.d(z,"default",function(){return n}),U.d(z,"normalizePts",function(){return t});var V=U("./src/polyfills/number.ts"),N=U("./src/remux/aac-helper.ts"),L=U("./src/remux/mp4-generator.ts"),$=U("./src/events.ts"),H=U("./src/errors.ts"),e=U("./src/utils/logger.ts"),R=U("./src/types/loader.ts"),u=U("./src/utils/timescale-conversion.ts");function f(){return f=Object.assign||function(B){for(var x=1;x<arguments.length;x++){var h=arguments[x];for(var d in h)Object.prototype.hasOwnProperty.call(h,d)&&(B[d]=h[d])}return B},f.apply(this,arguments)}var l=10*1e3,s=1024,i=1152,o=null,r=null,a=!1,n=function(){function B(h,d,A,c){if(c===void 0&&(c=""),this.observer=void 0,this.config=void 0,this.typeSupported=void 0,this.ISGenerated=!1,this._initPTS=void 0,this._initDTS=void 0,this.nextAvcDts=null,this.nextAudioPts=null,this.isAudioContiguous=!1,this.isVideoContiguous=!1,this.observer=h,this.config=d,this.typeSupported=A,this.ISGenerated=!1,o===null){var w=navigator.userAgent||"",m=w.match(/Chrome\/(\d+)/i);o=m?parseInt(m[1]):0}if(r===null){var g=navigator.userAgent.match(/Safari\/(\d+)/i);r=g?parseInt(g[1]):0}a=!!o&&o<75||!!r&&r<600}var x=B.prototype;return x.destroy=function(){},x.resetTimeStamp=function(d){e.logger.log("[mp4-remuxer]: initPTS & initDTS reset"),this._initPTS=this._initDTS=d},x.resetNextTimestamp=function(){e.logger.log("[mp4-remuxer]: reset next timestamp"),this.isVideoContiguous=!1,this.isAudioContiguous=!1},x.resetInitSegment=function(){e.logger.log("[mp4-remuxer]: ISGenerated flag reset"),this.ISGenerated=!1},x.getVideoStartPts=function(d){var A=!1,c=d.reduce(function(w,m){var g=m.pts-w;return g<-4294967296?(A=!0,t(w,m.pts)):g>0?w:m.pts},d[0].pts);return A&&e.logger.debug("PTS rollover detected"),c},x.remux=function(d,A,c,w,m,g,F,k){var S,Q,X,P,q,ie,be=m,me=m,Me=d.pid>-1,Ne=A.pid>-1,ke=A.samples.length,Ke=d.samples.length>0,Ye=ke>1,_e=(!Me||Ke)&&(!Ne||Ye)||this.ISGenerated||F;if(_e){this.ISGenerated||(X=this.generateIS(d,A,m));var Te=this.isVideoContiguous,Pe=-1;if(Ye&&(Pe=E(A.samples),!Te&&this.config.forceKeyFrameOnDiscontinuity))if(ie=!0,Pe>0){e.logger.warn("[mp4-remuxer]: Dropped "+Pe+" out of "+ke+" video samples due to a missing keyframe");var bt=this.getVideoStartPts(A.samples);A.samples=A.samples.slice(Pe),A.dropped+=Pe,me+=(A.samples[0].pts-bt)/(A.timescale||9e4)}else Pe===-1&&(e.logger.warn("[mp4-remuxer]: No keyframe found out of "+ke+" video samples"),ie=!1);if(this.ISGenerated){if(Ke&&Ye){var mt=this.getVideoStartPts(A.samples),dt=t(d.samples[0].pts,mt)-mt,yt=dt/A.inputTimeScale;be+=Math.max(0,yt),me+=Math.max(0,-yt)}if(Ke){if(d.samplerate||(e.logger.warn("[mp4-remuxer]: regenerate InitSegment as audio detected"),X=this.generateIS(d,A,m)),Q=this.remuxAudio(d,be,this.isAudioContiguous,g,Ne||Ye||k===R.PlaylistLevelType.AUDIO?me:void 0),Ye){var le=Q?Q.endPTS-Q.startPTS:0;A.inputTimeScale||(e.logger.warn("[mp4-remuxer]: regenerate InitSegment as video detected"),X=this.generateIS(d,A,m)),S=this.remuxVideo(A,me,Te,le)}}else Ye&&(S=this.remuxVideo(A,me,Te,0));S&&(S.firstKeyFrame=Pe,S.independent=Pe!==-1)}}return this.ISGenerated&&(c.samples.length&&(q=this.remuxID3(c,m)),w.samples.length&&(P=this.remuxText(w,m))),{audio:Q,video:S,initSegment:X,independent:ie,text:P,id3:q}},x.generateIS=function(d,A,c){var w=d.samples,m=A.samples,g=this.typeSupported,F={},k=!Object(V.isFiniteNumber)(this._initPTS),S="audio/mp4",Q,X,P;if(k&&(Q=X=Infinity),d.config&&w.length&&(d.timescale=d.samplerate,d.isAAC||(g.mpeg?(S="audio/mpeg",d.codec=""):g.mp3&&(d.codec="mp3")),F.audio={id:"audio",container:S,codec:d.codec,initSegment:!d.isAAC&&g.mpeg?new Uint8Array(0):L.default.initSegment([d]),metadata:{channelCount:d.channelCount}},k&&(P=d.inputTimeScale,Q=X=w[0].pts-Math.round(P*c))),A.sps&&A.pps&&m.length&&(A.timescale=A.inputTimeScale,F.video={id:"main",container:"video/mp4",codec:A.codec,initSegment:L.default.initSegment([A]),metadata:{width:A.width,height:A.height}},k)){P=A.inputTimeScale;var q=this.getVideoStartPts(m),ie=Math.round(P*c);X=Math.min(X,t(m[0].dts,q)-ie),Q=Math.min(Q,q-ie)}if(Object.keys(F).length)return this.ISGenerated=!0,k&&(this._initPTS=Q,this._initDTS=X),{tracks:F,initPTS:Q,timescale:P}},x.remuxVideo=function(d,A,c,w){var m=d.inputTimeScale,g=d.samples,F=[],k=g.length,S=this._initPTS,Q=this.nextAvcDts,X=8,P,q,ie,be=Number.POSITIVE_INFINITY,me=Number.NEGATIVE_INFINITY,Me=0,Ne=!1;if(!c||Q===null){var ke=A*m,Ke=g[0].pts-t(g[0].dts,g[0].pts);Q=ke-Ke}for(var Ye=0;Ye<k;Ye++){var _e=g[Ye];if(_e.pts=t(_e.pts-S,Q),_e.dts=t(_e.dts-S,Q),_e.dts>_e.pts){var Te=9e4*.2;Me=Math.max(Math.min(Me,_e.pts-_e.dts),-1*Te)}_e.dts<g[Ye>0?Ye-1:Ye].dts&&(Ne=!0)}Ne&&g.sort(function(tr,Xt){var gt=tr.dts-Xt.dts,Mt=tr.pts-Xt.pts;return gt||Mt}),q=g[0].dts,ie=g[g.length-1].dts;var Pe=Math.round((ie-q)/(k-1));if(Me<0){if(Me<Pe*-2){e.logger.warn("PTS < DTS detected in video samples, offsetting DTS from PTS by "+Object(u.toMsFromMpegTsClock)(-Pe,!0)+" ms");for(var bt=Me,mt=0;mt<k;mt++)g[mt].dts=bt=Math.max(bt,g[mt].pts-Pe),g[mt].pts=Math.max(bt,g[mt].pts)}else{e.logger.warn("PTS < DTS detected in video samples, shifting DTS by "+Object(u.toMsFromMpegTsClock)(Me,!0)+" ms to overcome this issue");for(var dt=0;dt<k;dt++)g[dt].dts=g[dt].dts+Me}q=g[0].dts}if(c){var yt=q-Q,le=yt>Pe,Z=yt<-1;if(le||Z){le?e.logger.warn("AVC: "+Object(u.toMsFromMpegTsClock)(yt,!0)+" ms ("+yt+"dts) hole between fragments detected, filling it"):e.logger.warn("AVC: "+Object(u.toMsFromMpegTsClock)(-yt,!0)+" ms ("+yt+"dts) overlapping between fragments detected"),q=Q;var te=g[0].pts-yt;g[0].dts=q,g[0].pts=te,e.logger.log("Video: First PTS/DTS adjusted: "+Object(u.toMsFromMpegTsClock)(te,!0)+"/"+Object(u.toMsFromMpegTsClock)(q,!0)+", delta: "+Object(u.toMsFromMpegTsClock)(yt,!0)+" ms")}}a&&(q=Math.max(0,q));for(var ee=0,ue=0,ye=0;ye<k;ye++){for(var ve=g[ye],Je=ve.units,tt=Je.length,it=0,st=0;st<tt;st++)it+=Je[st].data.length;ue+=it,ee+=tt,ve.length=it,ve.dts=Math.max(ve.dts,q),ve.pts=Math.max(ve.pts,ve.dts,0),be=Math.min(ve.pts,be),me=Math.max(ve.pts,me)}ie=g[k-1].dts;var ht=ue+4*ee+8,_t;try{_t=new Uint8Array(ht)}catch(tr){this.observer.emit($.Events.ERROR,$.Events.ERROR,{type:H.ErrorTypes.MUX_ERROR,details:H.ErrorDetails.REMUX_ALLOC_ERROR,fatal:!1,bytes:ht,reason:"fail allocating video mdat "+ht});return}var He=new DataView(_t.buffer);He.setUint32(0,ht),_t.set(L.default.types.mdat,4);for(var Xe=0;Xe<k;Xe++){for(var at=g[Xe],ut=at.units,$e=0,qe=0,De=ut.length;qe<De;qe++){var xe=ut[qe],Se=xe.data,oe=xe.data.byteLength;He.setUint32(X,oe),X+=4,_t.set(Se,X),X+=oe,$e+=4+oe}if(Xe<k-1)P=g[Xe+1].dts-at.dts;else{var ce=this.config,Ee=at.dts-g[Xe>0?Xe-1:Xe].dts;if(ce.stretchShortVideoTrack&&this.nextAudioPts!==null){var Ce=Math.floor(ce.maxBufferHole*m),Ge=(w?be+w*m:this.nextAudioPts)-at.pts;Ge>Ce?(P=Ge-Ee,P<0&&(P=Ee),e.logger.log("[mp4-remuxer]: It is approximately "+Ge/90+" ms to the next segment; using duration "+P/90+" ms for the last video frame.")):P=Ee}else P=Ee}var et=Math.round(at.pts-at.dts);F.push(new b(at.key,P,$e,et))}if(F.length&&o&&o<70){var pt=F[0].flags;pt.dependsOn=2,pt.isNonSync=0}console.assert(P!==void 0,"mp4SampleDuration must be computed"),this.nextAvcDts=Q=ie+P,this.isVideoContiguous=!0;var Bt=L.default.moof(d.sequenceNumber++,q,f({},d,{samples:F})),Dt="video",xt={data1:Bt,data2:_t,startPTS:be/m,endPTS:(me+P)/m,startDTS:q/m,endDTS:Q/m,type:Dt,hasAudio:!1,hasVideo:!0,nb:F.length,dropped:d.dropped};return d.samples=[],d.dropped=0,console.assert(_t.length,"MDAT length must not be zero"),xt},x.remuxAudio=function(d,A,c,w,m){var g=d.inputTimeScale,F=d.samplerate?d.samplerate:g,k=g/F,S=d.isAAC?s:i,Q=S*k,X=this._initPTS,P=!d.isAAC&&this.typeSupported.mpeg,q=[],ie=d.samples,be=P?0:8,me=this.nextAudioPts||-1,Me=A*g;if(this.isAudioContiguous=c=c||ie.length&&me>0&&(w&&Math.abs(Me-me)<9e3||Math.abs(t(ie[0].pts-X,Me)-me)<20*Q),ie.forEach(function(Se){Se.pts=t(Se.pts-X,Me)}),!c||me<0){if(ie=ie.filter(function(Se){return Se.pts>=0}),!ie.length)return;m===0?me=0:w?me=Math.max(0,Me):me=ie[0].pts}if(d.isAAC)for(var Ne=m!==void 0,ke=this.config.maxAudioFramesDrift,Ke=0,Ye=me;Ke<ie.length;Ke++){var _e=ie[Ke],Te=_e.pts,Pe=Te-Ye,bt=Math.abs(1e3*Pe/g);if(Pe<=-ke*Q&&Ne)Ke===0&&(e.logger.warn("Audio frame @ "+(Te/g).toFixed(3)+"s overlaps nextAudioPts by "+Math.round(1e3*Pe/g)+" ms."),this.nextAudioPts=me=Ye=Te);else if(Pe>=ke*Q&&bt<l&&Ne){var mt=Math.round(Pe/Q);Ye=Te-mt*Q,Ye<0&&(mt--,Ye+=Q),Ke===0&&(this.nextAudioPts=me=Ye),e.logger.warn("[mp4-remuxer]: Injecting "+mt+" audio frame @ "+(Ye/g).toFixed(3)+"s due to "+Math.round(1e3*Pe/g)+" ms gap.");for(var dt=0;dt<mt;dt++){var yt=Math.max(Ye,0),le=N.default.getSilentFrame(d.manifestCodec||d.codec,d.channelCount);le||(e.logger.log("[mp4-remuxer]: Unable to get silent frame for given audio codec; duplicating last frame instead."),le=_e.unit.subarray()),ie.splice(Ke,0,{unit:le,pts:yt}),Ye+=Q,Ke++}}_e.pts=Ye,Ye+=Q}for(var Z=null,te=null,ee,ue=0,ye=ie.length;ye--;)ue+=ie[ye].unit.byteLength;for(var ve=0,Je=ie.length;ve<Je;ve++){var tt=ie[ve],it=tt.unit,st=tt.pts;if(te!==null){var ht=q[ve-1];ht.duration=Math.round((st-te)/k)}else if(c&&d.isAAC&&(st=me),Z=st,ue>0){ue+=be;try{ee=new Uint8Array(ue)}catch(Se){this.observer.emit($.Events.ERROR,$.Events.ERROR,{type:H.ErrorTypes.MUX_ERROR,details:H.ErrorDetails.REMUX_ALLOC_ERROR,fatal:!1,bytes:ue,reason:"fail allocating audio mdat "+ue});return}if(!P){var _t=new DataView(ee.buffer);_t.setUint32(0,ue),ee.set(L.default.types.mdat,4)}}else return;ee.set(it,be);var He=it.byteLength;be+=He,q.push(new b(!0,S,He,0)),te=st}var Xe=q.length;if(!Xe)return;var at=q[q.length-1];this.nextAudioPts=me=te+k*at.duration;var ut=P?new Uint8Array(0):L.default.moof(d.sequenceNumber++,Z/k,f({},d,{samples:q}));d.samples=[];var $e=Z/g,qe=me/g,De="audio",xe={data1:ut,data2:ee,startPTS:$e,endPTS:qe,startDTS:$e,endDTS:qe,type:De,hasAudio:!0,hasVideo:!1,nb:Xe};return this.isAudioContiguous=!0,console.assert(ee.length,"MDAT length must not be zero"),xe},x.remuxEmptyAudio=function(d,A,c,w){var m=d.inputTimeScale,g=d.samplerate?d.samplerate:m,F=m/g,k=this.nextAudioPts,S=(k!==null?k:w.startDTS*m)+this._initDTS,Q=w.endDTS*m+this._initDTS,X=F*s,P=Math.ceil((Q-S)/X),q=N.default.getSilentFrame(d.manifestCodec||d.codec,d.channelCount);if(e.logger.warn("[mp4-remuxer]: remux empty Audio"),!q){e.logger.trace("[mp4-remuxer]: Unable to remuxEmptyAudio since we were unable to get a silent frame for given audio codec");return}for(var ie=[],be=0;be<P;be++){var me=S+be*X;ie.push({unit:q,pts:me,dts:me})}return d.samples=ie,this.remuxAudio(d,A,c,!1)},x.remuxID3=function(d,A){var c=d.samples.length;if(!c)return;for(var w=d.inputTimeScale,m=this._initPTS,g=this._initDTS,F=0;F<c;F++){var k=d.samples[F];k.pts=t(k.pts-m,A*w)/w,k.dts=t(k.dts-g,A*w)/w}var S=d.samples;return d.samples=[],{samples:S}},x.remuxText=function(d,A){var c=d.samples.length;if(!c)return;for(var w=d.inputTimeScale,m=this._initPTS,g=0;g<c;g++){var F=d.samples[g];F.pts=t(F.pts-m,A*w)/w}d.samples.sort(function(S,Q){return S.pts-Q.pts});var k=d.samples;return d.samples=[],{samples:k}},B}();function t(B,x){var h;if(x===null)return B;for(x<B?h=-8589934592:h=8589934592;Math.abs(B-x)>4294967296;)B+=h;return B}function E(B){for(var x=0;x<B.length;x++)if(B[x].key)return x;return-1}var b=function(x,h,d,A){this.size=void 0,this.duration=void 0,this.cts=void 0,this.flags=void 0,this.duration=h,this.size=d,this.cts=A,this.flags=new _(x)},_=function(x){this.isLeading=0,this.isDependedOn=0,this.hasRedundancy=0,this.degradPrio=0,this.dependsOn=1,this.isNonSync=1,this.dependsOn=x?2:1,this.isNonSync=x?0:1}},"./src/remux/passthrough-remuxer.ts":function(Ae,z,U){"use strict";U.r(z);var V=U("./src/polyfills/number.ts"),N=U("./src/utils/mp4-tools.ts"),L=U("./src/loader/fragment.ts"),$=U("./src/utils/logger.ts"),H=function(){function u(){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 f=u.prototype;return f.destroy=function(){},f.resetTimeStamp=function(s){this.initPTS=s,this.lastEndDTS=null},f.resetNextTimestamp=function(){this.lastEndDTS=null},f.resetInitSegment=function(s,i,o){this.audioCodec=i,this.videoCodec=o,this.generateInitSegment(s),this.emitInitSegment=!0},f.generateInitSegment=function(s){var i=this.audioCodec,o=this.videoCodec;if(!s||!s.byteLength){this.initTracks=void 0,this.initData=void 0;return}var r=this.initData=Object(N.parseInitSegment)(s);i||(i=R(r.audio,L.ElementaryStreamTypes.AUDIO)),o||(o=R(r.video,L.ElementaryStreamTypes.VIDEO));var a={};r.audio&&r.video?a.audiovideo={container:"video/mp4",codec:i+","+o,initSegment:s,id:"main"}:r.audio?a.audio={container:"audio/mp4",codec:i,initSegment:s,id:"audio"}:r.video?a.video={container:"video/mp4",codec:o,initSegment:s,id:"main"}:$.logger.warn("[passthrough-remuxer.ts]: initSegment does not contain moov or trak boxes."),this.initTracks=a},f.remux=function(s,i,o,r,a){var n=this.initPTS,t=this.lastEndDTS,E={audio:void 0,video:void 0,text:r,id3:o,initSegment:void 0};Object(V.isFiniteNumber)(t)||(t=this.lastEndDTS=a||0);var b=i.samples;if(!b||!b.length)return E;var _={initPTS:void 0,timescale:1},B=this.initData;if((!B||!B.length)&&(this.generateInitSegment(b),B=this.initData),!B||!B.length)return $.logger.warn("[passthrough-remuxer.ts]: Failed to generate initSegment."),E;this.emitInitSegment&&(_.tracks=this.initTracks,this.emitInitSegment=!1),Object(V.isFiniteNumber)(n)||(this.initPTS=_.initPTS=n=e(B,b,t));var x=Object(N.getDuration)(b,B),h=t,d=x+h;Object(N.offsetStartDTS)(B,b,n),x>0?this.lastEndDTS=d:($.logger.warn("Duration parsed from mp4 should be greater than zero"),this.resetNextTimestamp());var A=!!B.audio,c=!!B.video,w="";A&&(w+="audio"),c&&(w+="video");var m={data1:b,startPTS:h,startDTS:h,endPTS:d,endDTS:d,type:w,hasAudio:A,hasVideo:c,nb:1,dropped:0};return E.audio=m.type==="audio"?m:void 0,E.video=m.type!=="audio"?m:void 0,E.text=r,E.id3=o,E.initSegment=_,E},u}(),e=function(f,l,s){return Object(N.getStartDTS)(f,l)-s};function R(u,f){var l=u==null?void 0:u.codec;return l&&l.length>4?l:l==="hvc1"?"hvc1.1.c.L120.90":l==="av01"?"av01.0.04M.08":l==="avc1"||f===L.ElementaryStreamTypes.VIDEO?"avc1.42e01e":"mp4a.40.5"}z.default=H},"./src/task-loop.ts":function(Ae,z,U){"use strict";U.r(z),U.d(z,"default",function(){return V});var V=function(){function N(){this._boundTick=void 0,this._tickTimer=null,this._tickInterval=null,this._tickCallCount=0,this._boundTick=this.tick.bind(this)}var L=N.prototype;return L.destroy=function(){this.onHandlerDestroying(),this.onHandlerDestroyed()},L.onHandlerDestroying=function(){this.clearNextTick(),this.clearInterval()},L.onHandlerDestroyed=function(){},L.hasInterval=function(){return!!this._tickInterval},L.hasNextTick=function(){return!!this._tickTimer},L.setInterval=function(H){return this._tickInterval?!1:(this._tickInterval=self.setInterval(this._boundTick,H),!0)},L.clearInterval=function(){return this._tickInterval?(self.clearInterval(this._tickInterval),this._tickInterval=null,!0):!1},L.clearNextTick=function(){return this._tickTimer?(self.clearTimeout(this._tickTimer),this._tickTimer=null,!0):!1},L.tick=function(){this._tickCallCount++,this._tickCallCount===1&&(this.doTick(),this._tickCallCount>1&&this.tickImmediate(),this._tickCallCount=0)},L.tickImmediate=function(){this.clearNextTick(),this._tickTimer=self.setTimeout(this._boundTick,0)},L.doTick=function(){},N}()},"./src/types/cmcd.ts":function(Ae,z,U){"use strict";U.r(z),U.d(z,"CMCDVersion",function(){return V}),U.d(z,"CMCDObjectType",function(){return N}),U.d(z,"CMCDStreamingFormat",function(){return L}),U.d(z,"CMCDStreamType",function(){return $});var V=1,N;(function(H){H.MANIFEST="m",H.AUDIO="a",H.VIDEO="v",H.MUXED="av",H.INIT="i",H.CAPTION="c",H.TIMED_TEXT="tt",H.KEY="k",H.OTHER="o"})(N||(N={}));var L;(function(H){H.DASH="d",H.HLS="h",H.SMOOTH="s",H.OTHER="o"})(L||(L={}));var $;(function(H){H.VOD="v",H.LIVE="l"})($||($={}))},"./src/types/level.ts":function(Ae,z,U){"use strict";U.r(z),U.d(z,"HlsSkip",function(){return L}),U.d(z,"getSkipValue",function(){return $}),U.d(z,"HlsUrlParameters",function(){return H}),U.d(z,"Level",function(){return e});function V(R,u){for(var f=0;f<u.length;f++){var l=u[f];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(R,l.key,l)}}function N(R,u,f){return u&&V(R.prototype,u),f&&V(R,f),R}var L;(function(R){R.No="",R.Yes="YES",R.v2="v2"})(L||(L={}));function $(R,u){var f=R.canSkipUntil,l=R.canSkipDateRanges,s=R.endSN,i=u!==void 0?u-s:0;return f&&i<f?l?L.v2:L.Yes:L.No}var H=function(){function R(f,l,s){this.msn=void 0,this.part=void 0,this.skip=void 0,this.msn=f,this.part=l,this.skip=s}var u=R.prototype;return u.addDirectives=function(l){var s=new self.URL(l);return this.msn!==void 0&&s.searchParams.set("_HLS_msn",this.msn.toString()),this.part!==void 0&&s.searchParams.set("_HLS_part",this.part.toString()),this.skip&&s.searchParams.set("_HLS_skip",this.skip),s.toString()},R}(),e=function(){function R(u){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=[u.url],this.attrs=u.attrs,this.bitrate=u.bitrate,u.details&&(this.details=u.details),this.id=u.id||0,this.name=u.name,this.width=u.width||0,this.height=u.height||0,this.audioCodec=u.audioCodec,this.videoCodec=u.videoCodec,this.unknownCodecs=u.unknownCodecs,this.codecSet=[u.videoCodec,u.audioCodec].filter(function(f){return f}).join(",").replace(/\.[^.,]+/g,"")}return N(R,[{key:"maxBitrate",get:function(){return Math.max(this.realBitrate,this.bitrate)}},{key:"uri",get:function(){return this.url[this._urlId]||""}},{key:"urlId",get:function(){return this._urlId},set:function(f){var l=f%this.url.length;this._urlId!==l&&(this.details=void 0,this._urlId=l)}}]),R}()},"./src/types/loader.ts":function(Ae,z,U){"use strict";U.r(z),U.d(z,"PlaylistContextType",function(){return V}),U.d(z,"PlaylistLevelType",function(){return N});var V;(function(L){L.MANIFEST="manifest",L.LEVEL="level",L.AUDIO_TRACK="audioTrack",L.SUBTITLE_TRACK="subtitleTrack"})(V||(V={}));var N;(function(L){L.MAIN="main",L.AUDIO="audio",L.SUBTITLE="subtitle"})(N||(N={}))},"./src/types/transmuxer.ts":function(Ae,z,U){"use strict";U.r(z),U.d(z,"ChunkMetadata",function(){return V});var V=function($,H,e,R,u,f){R===void 0&&(R=0),u===void 0&&(u=-1),f===void 0&&(f=!1),this.level=void 0,this.sn=void 0,this.part=void 0,this.id=void 0,this.size=void 0,this.partial=void 0,this.transmuxing=N(),this.buffering={audio:N(),video:N(),audiovideo:N()},this.level=$,this.sn=H,this.id=e,this.size=R,this.part=u,this.partial=f};function N(){return{start:0,executeStart:0,executeEnd:0,end:0}}},"./src/utils/attr-list.ts":function(Ae,z,U){"use strict";U.r(z),U.d(z,"AttrList",function(){return L});var V=/^(\d+)x(\d+)$/,N=/\s*(.+?)\s*=((?:\".*?\")|.*?)(?:,|$)/g,L=function(){function $(e){typeof e=="string"&&(e=$.parseAttrList(e));for(var R in e)e.hasOwnProperty(R)&&(this[R]=e[R])}var H=$.prototype;return H.decimalInteger=function(R){var u=parseInt(this[R],10);return u>Number.MAX_SAFE_INTEGER?Infinity:u},H.hexadecimalInteger=function(R){if(this[R]){var u=(this[R]||"0x").slice(2);u=(u.length&1?"0":"")+u;for(var f=new Uint8Array(u.length/2),l=0;l<u.length/2;l++)f[l]=parseInt(u.slice(l*2,l*2+2),16);return f}else return null},H.hexadecimalIntegerAsNumber=function(R){var u=parseInt(this[R],16);return u>Number.MAX_SAFE_INTEGER?Infinity:u},H.decimalFloatingPoint=function(R){return parseFloat(this[R])},H.optionalFloat=function(R,u){var f=this[R];return f?parseFloat(f):u},H.enumeratedString=function(R){return this[R]},H.bool=function(R){return this[R]==="YES"},H.decimalResolution=function(R){var u=V.exec(this[R]);return u===null?void 0:{width:parseInt(u[1],10),height:parseInt(u[2],10)}},$.parseAttrList=function(R){var u,f={},l='"';for(N.lastIndex=0;(u=N.exec(R))!==null;){var s=u[2];s.indexOf(l)===0&&s.lastIndexOf(l)===s.length-1&&(s=s.slice(1,-1)),f[u[1]]=s}return f},$}()},"./src/utils/binary-search.ts":function(Ae,z,U){"use strict";U.r(z);var V={search:function(L,$){for(var H=0,e=L.length-1,R=null,u=null;H<=e;){R=(H+e)/2|0,u=L[R];var f=$(u);if(f>0)H=R+1;else if(f<0)e=R-1;else return u}return null}};z.default=V},"./src/utils/buffer-helper.ts":function(Ae,z,U){"use strict";U.r(z),U.d(z,"BufferHelper",function(){return L});var V=U("./src/utils/logger.ts"),N={length:0,start:function(){return 0},end:function(){return 0}},L=function(){function $(){}return $.isBuffered=function(e,R){try{if(e){for(var u=$.getBuffered(e),f=0;f<u.length;f++)if(R>=u.start(f)&&R<=u.end(f))return!0}}catch(l){}return!1},$.bufferInfo=function(e,R,u){try{if(e){var f=$.getBuffered(e),l=[],s;for(s=0;s<f.length;s++)l.push({start:f.start(s),end:f.end(s)});return this.bufferedInfo(l,R,u)}}catch(i){}return{len:0,start:R,end:R,nextStart:void 0}},$.bufferedInfo=function(e,R,u){R=Math.max(0,R),e.sort(function(_,B){var x=_.start-B.start;return x||B.end-_.end});var f=[];if(u)for(var l=0;l<e.length;l++){var s=f.length;if(s){var i=f[s-1].end;e[l].start-i<u?e[l].end>i&&(f[s-1].end=e[l].end):f.push(e[l])}else f.push(e[l])}else f=e;for(var o=0,r,a=R,n=R,t=0;t<f.length;t++){var E=f[t].start,b=f[t].end;if(R+u>=E&&R<b)a=E,n=b,o=n-R;else if(R+u<E){r=E;break}}return{len:o,start:a||0,end:n||0,nextStart:r}},$.getBuffered=function(e){try{return e.buffered}catch(R){return V.logger.log("failed to get media.buffered",R),N}},$}()},"./src/utils/cea-608-parser.ts":function(Ae,z,U){"use strict";U.r(z),U.d(z,"Row",function(){return n}),U.d(z,"CaptionScreen",function(){return t});var V=U("./src/utils/logger.ts"),N={42:225,92:233,94:237,95:243,96:250,123:231,124:247,125:209,126:241,127:9608,128:174,129:176,130:189,131:191,132:8482,133:162,134:163,135:9834,136:224,137:32,138:232,139:226,140:234,141:238,142:244,143:251,144:193,145:201,146:211,147:218,148:220,149:252,150:8216,151:161,152:42,153:8217,154:9473,155:169,156:8480,157:8226,158:8220,159:8221,160:192,161:194,162:199,163:200,164:202,165:203,166:235,167:206,168:207,169:239,170:212,171:217,172:249,173:219,174:171,175:187,176:195,177:227,178:205,179:204,180:236,181:210,182:242,183:213,184:245,185:123,186:125,187:92,188:94,189:95,190:124,191:8764,192:196,193:228,194:214,195:246,196:223,197:165,198:164,199:9475,200:197,201:229,202:216,203:248,204:9487,205:9491,206:9495,207:9499},L=function(d){var A=d;return N.hasOwnProperty(d)&&(A=N[d]),String.fromCharCode(A)},$=15,H=100,e={17:1,18:3,21:5,22:7,23:9,16:11,19:12,20:14},R={17:2,18:4,21:6,22:8,23:10,19:13,20:15},u={25:1,26:3,29:5,30:7,31:9,24:11,27:12,28:14},f={25:2,26:4,29:6,30:8,31:10,27:13,28:15},l=["white","green","blue","cyan","red","yellow","magenta","black","transparent"],s;(function(h){h[h.ERROR=0]="ERROR",h[h.TEXT=1]="TEXT",h[h.WARNING=2]="WARNING",h[h.INFO=2]="INFO",h[h.DEBUG=3]="DEBUG",h[h.DATA=3]="DATA"})(s||(s={}));var i=function(){function h(){this.time=null,this.verboseLevel=s.ERROR}var d=h.prototype;return d.log=function(c,w){this.verboseLevel>=c&&V.logger.log(this.time+" ["+c+"] "+w)},h}(),o=function(d){for(var A=[],c=0;c<d.length;c++)A.push(d[c].toString(16));return A},r=function(){function h(A,c,w,m,g){this.foreground=void 0,this.underline=void 0,this.italics=void 0,this.background=void 0,this.flash=void 0,this.foreground=A||"white",this.underline=c||!1,this.italics=w||!1,this.background=m||"black",this.flash=g||!1}var d=h.prototype;return d.reset=function(){this.foreground="white",this.underline=!1,this.italics=!1,this.background="black",this.flash=!1},d.setStyles=function(c){for(var w=["foreground","underline","italics","background","flash"],m=0;m<w.length;m++){var g=w[m];c.hasOwnProperty(g)&&(this[g]=c[g])}},d.isDefault=function(){return this.foreground==="white"&&!this.underline&&!this.italics&&this.background==="black"&&!this.flash},d.equals=function(c){return this.foreground===c.foreground&&this.underline===c.underline&&this.italics===c.italics&&this.background===c.background&&this.flash===c.flash},d.copy=function(c){this.foreground=c.foreground,this.underline=c.underline,this.italics=c.italics,this.background=c.background,this.flash=c.flash},d.toString=function(){return"color="+this.foreground+", underline="+this.underline+", italics="+this.italics+", background="+this.background+", flash="+this.flash},h}(),a=function(){function h(A,c,w,m,g,F){this.uchar=void 0,this.penState=void 0,this.uchar=A||" ",this.penState=new r(c,w,m,g,F)}var d=h.prototype;return d.reset=function(){this.uchar=" ",this.penState.reset()},d.setChar=function(c,w){this.uchar=c,this.penState.copy(w)},d.setPenState=function(c){this.penState.copy(c)},d.equals=function(c){return this.uchar===c.uchar&&this.penState.equals(c.penState)},d.copy=function(c){this.uchar=c.uchar,this.penState.copy(c.penState)},d.isEmpty=function(){return this.uchar===" "&&this.penState.isDefault()},h}(),n=function(){function h(A){this.chars=void 0,this.pos=void 0,this.currPenState=void 0,this.cueStartTime=void 0,this.logger=void 0,this.chars=[];for(var c=0;c<H;c++)this.chars.push(new a);this.logger=A,this.pos=0,this.currPenState=new r}var d=h.prototype;return d.equals=function(c){for(var w=!0,m=0;m<H;m++)if(!this.chars[m].equals(c.chars[m])){w=!1;break}return w},d.copy=function(c){for(var w=0;w<H;w++)this.chars[w].copy(c.chars[w])},d.isEmpty=function(){for(var c=!0,w=0;w<H;w++)if(!this.chars[w].isEmpty()){c=!1;break}return c},d.setCursor=function(c){this.pos!==c&&(this.pos=c),this.pos<0?(this.logger.log(s.DEBUG,"Negative cursor position "+this.pos),this.pos=0):this.pos>H&&(this.logger.log(s.DEBUG,"Too large cursor position "+this.pos),this.pos=H)},d.moveCursor=function(c){var w=this.pos+c;if(c>1)for(var m=this.pos+1;m<w+1;m++)this.chars[m].setPenState(this.currPenState);this.setCursor(w)},d.backSpace=function(){this.moveCursor(-1),this.chars[this.pos].setChar(" ",this.currPenState)},d.insertChar=function(c){c>=144&&this.backSpace();var w=L(c);if(this.pos>=H){this.logger.log(s.ERROR,"Cannot insert "+c.toString(16)+" ("+w+") at position "+this.pos+". Skipping it!");return}this.chars[this.pos].setChar(w,this.currPenState),this.moveCursor(1)},d.clearFromPos=function(c){var w;for(w=c;w<H;w++)this.chars[w].reset()},d.clear=function(){this.clearFromPos(0),this.pos=0,this.currPenState.reset()},d.clearToEndOfRow=function(){this.clearFromPos(this.pos)},d.getTextString=function(){for(var c=[],w=!0,m=0;m<H;m++){var g=this.chars[m].uchar;g!==" "&&(w=!1),c.push(g)}return w?"":c.join("")},d.setPenStyles=function(c){this.currPenState.setStyles(c);var w=this.chars[this.pos];w.setPenState(this.currPenState)},h}(),t=function(){function h(A){this.rows=void 0,this.currRow=void 0,this.nrRollUpRows=void 0,this.lastOutputScreen=void 0,this.logger=void 0,this.rows=[];for(var c=0;c<$;c++)this.rows.push(new n(A));this.logger=A,this.currRow=$-1,this.nrRollUpRows=null,this.lastOutputScreen=null,this.reset()}var d=h.prototype;return d.reset=function(){for(var c=0;c<$;c++)this.rows[c].clear();this.currRow=$-1},d.equals=function(c){for(var w=!0,m=0;m<$;m++)if(!this.rows[m].equals(c.rows[m])){w=!1;break}return w},d.copy=function(c){for(var w=0;w<$;w++)this.rows[w].copy(c.rows[w])},d.isEmpty=function(){for(var c=!0,w=0;w<$;w++)if(!this.rows[w].isEmpty()){c=!1;break}return c},d.backSpace=function(){var c=this.rows[this.currRow];c.backSpace()},d.clearToEndOfRow=function(){var c=this.rows[this.currRow];c.clearToEndOfRow()},d.insertChar=function(c){var w=this.rows[this.currRow];w.insertChar(c)},d.setPen=function(c){var w=this.rows[this.currRow];w.setPenStyles(c)},d.moveCursor=function(c){var w=this.rows[this.currRow];w.moveCursor(c)},d.setCursor=function(c){this.logger.log(s.INFO,"setCursor: "+c);var w=this.rows[this.currRow];w.setCursor(c)},d.setPAC=function(c){this.logger.log(s.INFO,"pacData = "+JSON.stringify(c));var w=c.row-1;if(this.nrRollUpRows&&w<this.nrRollUpRows-1&&(w=this.nrRollUpRows-1),this.nrRollUpRows&&this.currRow!==w){for(var m=0;m<$;m++)this.rows[m].clear();var g=this.currRow+1-this.nrRollUpRows,F=this.lastOutputScreen;if(F){var k=F.rows[g].cueStartTime,S=this.logger.time;if(k&&S!==null&&k<S)for(var Q=0;Q<this.nrRollUpRows;Q++)this.rows[w-this.nrRollUpRows+Q+1].copy(F.rows[g+Q])}}this.currRow=w;var X=this.rows[this.currRow];if(c.indent!==null){var P=c.indent,q=Math.max(P-1,0);X.setCursor(c.indent),c.color=X.chars[q].penState.foreground}var ie={foreground:c.color,underline:c.underline,italics:c.italics,background:"black",flash:!1};this.setPen(ie)},d.setBkgData=function(c){this.logger.log(s.INFO,"bkgData = "+JSON.stringify(c)),this.backSpace(),this.setPen(c),this.insertChar(32)},d.setRollUpRows=function(c){this.nrRollUpRows=c},d.rollUp=function(){if(this.nrRollUpRows===null){this.logger.log(s.DEBUG,"roll_up but nrRollUpRows not set yet");return}this.logger.log(s.TEXT,this.getDisplayText());var c=this.currRow+1-this.nrRollUpRows,w=this.rows.splice(c,1)[0];w.clear(),this.rows.splice(this.currRow,0,w),this.logger.log(s.INFO,"Rolling up")},d.getDisplayText=function(c){c=c||!1;for(var w=[],m="",g=-1,F=0;F<$;F++){var k=this.rows[F].getTextString();k&&(g=F+1,c?w.push("Row "+g+": '"+k+"'"):w.push(k.trim()))}return w.length>0&&(c?m="["+w.join(" | ")+"]":m=w.join(`
|
|
`)),m},d.getTextAndFormat=function(){return this.rows},h}(),E=function(){function h(A,c,w){this.chNr=void 0,this.outputFilter=void 0,this.mode=void 0,this.verbose=void 0,this.displayedMemory=void 0,this.nonDisplayedMemory=void 0,this.lastOutputScreen=void 0,this.currRollUpRow=void 0,this.writeScreen=void 0,this.cueStartTime=void 0,this.logger=void 0,this.chNr=A,this.outputFilter=c,this.mode=null,this.verbose=0,this.displayedMemory=new t(w),this.nonDisplayedMemory=new t(w),this.lastOutputScreen=new t(w),this.currRollUpRow=this.displayedMemory.rows[$-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null,this.logger=w}var d=h.prototype;return d.reset=function(){this.mode=null,this.displayedMemory.reset(),this.nonDisplayedMemory.reset(),this.lastOutputScreen.reset(),this.outputFilter.reset(),this.currRollUpRow=this.displayedMemory.rows[$-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null},d.getHandler=function(){return this.outputFilter},d.setHandler=function(c){this.outputFilter=c},d.setPAC=function(c){this.writeScreen.setPAC(c)},d.setBkgData=function(c){this.writeScreen.setBkgData(c)},d.setMode=function(c){if(c===this.mode)return;this.mode=c,this.logger.log(s.INFO,"MODE="+c),this.mode==="MODE_POP-ON"?this.writeScreen=this.nonDisplayedMemory:(this.writeScreen=this.displayedMemory,this.writeScreen.reset()),this.mode!=="MODE_ROLL-UP"&&(this.displayedMemory.nrRollUpRows=null,this.nonDisplayedMemory.nrRollUpRows=null),this.mode=c},d.insertChars=function(c){for(var w=0;w<c.length;w++)this.writeScreen.insertChar(c[w]);var m=this.writeScreen===this.displayedMemory?"DISP":"NON_DISP";this.logger.log(s.INFO,m+": "+this.writeScreen.getDisplayText(!0)),(this.mode==="MODE_PAINT-ON"||this.mode==="MODE_ROLL-UP")&&(this.logger.log(s.TEXT,"DISPLAYED: "+this.displayedMemory.getDisplayText(!0)),this.outputDataUpdate())},d.ccRCL=function(){this.logger.log(s.INFO,"RCL - Resume Caption Loading"),this.setMode("MODE_POP-ON")},d.ccBS=function(){if(this.logger.log(s.INFO,"BS - BackSpace"),this.mode==="MODE_TEXT")return;this.writeScreen.backSpace(),this.writeScreen===this.displayedMemory&&this.outputDataUpdate()},d.ccAOF=function(){},d.ccAON=function(){},d.ccDER=function(){this.logger.log(s.INFO,"DER- Delete to End of Row"),this.writeScreen.clearToEndOfRow(),this.outputDataUpdate()},d.ccRU=function(c){this.logger.log(s.INFO,"RU("+c+") - Roll Up"),this.writeScreen=this.displayedMemory,this.setMode("MODE_ROLL-UP"),this.writeScreen.setRollUpRows(c)},d.ccFON=function(){this.logger.log(s.INFO,"FON - Flash On"),this.writeScreen.setPen({flash:!0})},d.ccRDC=function(){this.logger.log(s.INFO,"RDC - Resume Direct Captioning"),this.setMode("MODE_PAINT-ON")},d.ccTR=function(){this.logger.log(s.INFO,"TR"),this.setMode("MODE_TEXT")},d.ccRTD=function(){this.logger.log(s.INFO,"RTD"),this.setMode("MODE_TEXT")},d.ccEDM=function(){this.logger.log(s.INFO,"EDM - Erase Displayed Memory"),this.displayedMemory.reset(),this.outputDataUpdate(!0)},d.ccCR=function(){this.logger.log(s.INFO,"CR - Carriage Return"),this.writeScreen.rollUp(),this.outputDataUpdate(!0)},d.ccENM=function(){this.logger.log(s.INFO,"ENM - Erase Non-displayed Memory"),this.nonDisplayedMemory.reset()},d.ccEOC=function(){if(this.logger.log(s.INFO,"EOC - End Of Caption"),this.mode==="MODE_POP-ON"){var c=this.displayedMemory;this.displayedMemory=this.nonDisplayedMemory,this.nonDisplayedMemory=c,this.writeScreen=this.nonDisplayedMemory,this.logger.log(s.TEXT,"DISP: "+this.displayedMemory.getDisplayText())}this.outputDataUpdate(!0)},d.ccTO=function(c){this.logger.log(s.INFO,"TO("+c+") - Tab Offset"),this.writeScreen.moveCursor(c)},d.ccMIDROW=function(c){var w={flash:!1};if(w.underline=c%2===1,w.italics=c>=46,w.italics)w.foreground="white";else{var m=Math.floor(c/2)-16,g=["white","green","blue","cyan","red","yellow","magenta"];w.foreground=g[m]}this.logger.log(s.INFO,"MIDROW: "+JSON.stringify(w)),this.writeScreen.setPen(w)},d.outputDataUpdate=function(c){c===void 0&&(c=!1);var w=this.logger.time;if(w===null)return;this.outputFilter&&(this.cueStartTime===null&&!this.displayedMemory.isEmpty()?this.cueStartTime=w:this.displayedMemory.equals(this.lastOutputScreen)||(this.outputFilter.newCue(this.cueStartTime,w,this.lastOutputScreen),c&&this.outputFilter.dispatchCue&&this.outputFilter.dispatchCue(),this.cueStartTime=this.displayedMemory.isEmpty()?null:w),this.lastOutputScreen.copy(this.displayedMemory))},d.cueSplitAtTime=function(c){this.outputFilter&&(this.displayedMemory.isEmpty()||(this.outputFilter.newCue&&this.outputFilter.newCue(this.cueStartTime,c,this.displayedMemory),this.cueStartTime=c))},h}(),b=function(){function h(A,c,w){this.channels=void 0,this.currentChannel=0,this.cmdHistory=void 0,this.logger=void 0;var m=new i;this.channels=[null,new E(A,c,m),new E(A+1,w,m)],this.cmdHistory=x(),this.logger=m}var d=h.prototype;return d.getHandler=function(c){return this.channels[c].getHandler()},d.setHandler=function(c,w){this.channels[c].setHandler(w)},d.addData=function(c,w){var m,g,F,k=!1;this.logger.time=c;for(var S=0;S<w.length;S+=2){if(g=w[S]&127,F=w[S+1]&127,g===0&&F===0)continue;if(this.logger.log(s.DATA,"["+o([w[S],w[S+1]])+"] -> ("+o([g,F])+")"),m=this.parseCmd(g,F),m||(m=this.parseMidrow(g,F)),m||(m=this.parsePAC(g,F)),m||(m=this.parseBackgroundAttributes(g,F)),!m&&(k=this.parseChars(g,F),k)){var Q=this.currentChannel;if(Q&&Q>0){var X=this.channels[Q];X.insertChars(k)}else this.logger.log(s.WARNING,"No channel found yet. TEXT-MODE?")}!m&&!k&&this.logger.log(s.WARNING,"Couldn't parse cleaned data "+o([g,F])+" orig: "+o([w[S],w[S+1]]))}},d.parseCmd=function(c,w){var m=this.cmdHistory,g=(c===20||c===28||c===21||c===29)&&w>=32&&w<=47,F=(c===23||c===31)&&w>=33&&w<=35;if(!(g||F))return!1;if(B(c,w,m))return _(null,null,m),this.logger.log(s.DEBUG,"Repeated command ("+o([c,w])+") is dropped"),!0;var k=c===20||c===21||c===23?1:2,S=this.channels[k];return c===20||c===21||c===28||c===29?w===32?S.ccRCL():w===33?S.ccBS():w===34?S.ccAOF():w===35?S.ccAON():w===36?S.ccDER():w===37?S.ccRU(2):w===38?S.ccRU(3):w===39?S.ccRU(4):w===40?S.ccFON():w===41?S.ccRDC():w===42?S.ccTR():w===43?S.ccRTD():w===44?S.ccEDM():w===45?S.ccCR():w===46?S.ccENM():w===47&&S.ccEOC():S.ccTO(w-32),_(c,w,m),this.currentChannel=k,!0},d.parseMidrow=function(c,w){var m=0;if((c===17||c===25)&&w>=32&&w<=47){if(c===17?m=1:m=2,m!==this.currentChannel)return this.logger.log(s.ERROR,"Mismatch channel in midrow parsing"),!1;var g=this.channels[m];return g?(g.ccMIDROW(w),this.logger.log(s.DEBUG,"MIDROW ("+o([c,w])+")"),!0):!1}return!1},d.parsePAC=function(c,w){var m,g=this.cmdHistory,F=(c>=17&&c<=23||c>=25&&c<=31)&&w>=64&&w<=127,k=(c===16||c===24)&&w>=64&&w<=95;if(!(F||k))return!1;if(B(c,w,g))return _(null,null,g),!0;var S=c<=23?1:2;w>=64&&w<=95?m=S===1?e[c]:u[c]:m=S===1?R[c]:f[c];var Q=this.channels[S];return Q?(Q.setPAC(this.interpretPAC(m,w)),_(c,w,g),this.currentChannel=S,!0):!1},d.interpretPAC=function(c,w){var m,g={color:null,italics:!1,indent:null,underline:!1,row:c};return w>95?m=w-96:m=w-64,g.underline=(m&1)===1,m<=13?g.color=["white","green","blue","cyan","red","yellow","magenta","white"][Math.floor(m/2)]:m<=15?(g.italics=!0,g.color="white"):g.indent=Math.floor((m-16)/2)*4,g},d.parseChars=function(c,w){var m,g=null,F=null;if(c>=25?(m=2,F=c-8):(m=1,F=c),F>=17&&F<=19){var k;F===17?k=w+80:F===18?k=w+112:k=w+144,this.logger.log(s.INFO,"Special char '"+L(k)+"' in channel "+m),g=[k]}else c>=32&&c<=127&&(g=w===0?[c]:[c,w]);if(g){var S=o(g);this.logger.log(s.DEBUG,"Char codes = "+S.join(",")),_(c,w,this.cmdHistory)}return g},d.parseBackgroundAttributes=function(c,w){var m=(c===16||c===24)&&w>=32&&w<=47,g=(c===23||c===31)&&w>=45&&w<=47;if(!(m||g))return!1;var F,k={};c===16||c===24?(F=Math.floor((w-32)/2),k.background=l[F],w%2===1&&(k.background=k.background+"_semi")):w===45?k.background="transparent":(k.foreground="black",w===47&&(k.underline=!0));var S=c<=23?1:2,Q=this.channels[S];return Q.setBkgData(k),_(c,w,this.cmdHistory),!0},d.reset=function(){for(var c=0;c<Object.keys(this.channels).length;c++){var w=this.channels[c];w&&w.reset()}this.cmdHistory=x()},d.cueSplitAtTime=function(c){for(var w=0;w<this.channels.length;w++){var m=this.channels[w];m&&m.cueSplitAtTime(c)}},h}();function _(h,d,A){A.a=h,A.b=d}function B(h,d,A){return A.a===h&&A.b===d}function x(){return{a:null,b:null}}z.default=b},"./src/utils/codecs.ts":function(Ae,z,U){"use strict";U.r(z),U.d(z,"isCodecType",function(){return N}),U.d(z,"isCodecSupportedInMp4",function(){return L});var V={audio:{a3ds:!0,"ac-3":!0,"ac-4":!0,alac:!0,alaw:!0,dra1:!0,"dts+":!0,"dts-":!0,dtsc:!0,dtse:!0,dtsh:!0,"ec-3":!0,enca:!0,g719:!0,g726:!0,m4ae:!0,mha1:!0,mha2:!0,mhm1:!0,mhm2:!0,mlpa:!0,mp4a:!0,"raw ":!0,Opus:!0,samr:!0,sawb:!0,sawp:!0,sevc:!0,sqcp:!0,ssmv:!0,twos:!0,ulaw:!0},video:{avc1:!0,avc2:!0,avc3:!0,avc4:!0,avcp:!0,av01:!0,drac:!0,dvav:!0,dvhe:!0,encv:!0,hev1:!0,hvc1:!0,mjp2:!0,mp4v:!0,mvc1:!0,mvc2:!0,mvc3:!0,mvc4:!0,resv:!0,rv60:!0,s263:!0,svc1:!0,svc2:!0,"vc-1":!0,vp08:!0,vp09:!0},text:{stpp:!0,wvtt:!0}};function N($,H){var e=V[H];return!!e&&e[$.slice(0,4)]===!0}function L($,H){return MediaSource.isTypeSupported((H||"video")+'/mp4;codecs="'+$+'"')}},"./src/utils/cues.ts":function(Ae,z,U){"use strict";U.r(z);var V=U("./src/utils/vttparser.ts"),N=U("./src/utils/webvtt-parser.ts"),L=U("./src/utils/texttrack-utils.ts"),$=/\s/,H={newCue:function(R,u,f,l){for(var s=[],i,o,r,a,n,t=self.VTTCue||self.TextTrackCue,E=0;E<l.rows.length;E++)if(i=l.rows[E],r=!0,a=0,n="",!i.isEmpty()){for(var b=0;b<i.chars.length;b++)$.test(i.chars[b].uchar)&&r?a++:(n+=i.chars[b].uchar,r=!1);i.cueStartTime=u,u===f&&(f+=1e-4),a>=16?a--:a++;var _=Object(V.fixLineBreaks)(n.trim()),B=Object(N.generateCueId)(u,f,_);(!R||!R.cues||!R.cues.getCueById(B))&&(o=new t(u,f,_),o.id=B,o.line=E+1,o.align="left",o.position=10+Math.min(80,Math.floor(a*8/32)*10),s.push(o))}return R&&s.length&&(s.sort(function(x,h){return x.line==="auto"||h.line==="auto"?0:x.line>8&&h.line>8?h.line-x.line:x.line-h.line}),s.forEach(function(x){return Object(L.addCueToTrack)(R,x)})),s}};z.default=H},"./src/utils/discontinuities.ts":function(Ae,z,U){"use strict";U.r(z),U.d(z,"findFirstFragWithCC",function(){return $}),U.d(z,"shouldAlignOnDiscontinuities",function(){return H}),U.d(z,"findDiscontinuousReferenceFrag",function(){return e}),U.d(z,"adjustSlidingStart",function(){return u}),U.d(z,"alignStream",function(){return f}),U.d(z,"alignPDT",function(){return s}),U.d(z,"alignFragmentByPDTDelta",function(){return i}),U.d(z,"alignMediaPlaylistByPDT",function(){return o});var V=U("./src/polyfills/number.ts"),N=U("./src/utils/logger.ts"),L=U("./src/controller/level-helper.ts");function $(r,a){for(var n=null,t=0,E=r.length;t<E;t++){var b=r[t];if(b&&b.cc===a){n=b;break}}return n}function H(r,a,n){return!!(a.details&&(n.endCC>n.startCC||r&&r.cc<n.startCC))}function e(r,a){var n=r.fragments,t=a.fragments;if(!t.length||!n.length){N.logger.log("No fragments to align");return}var E=$(n,t[0].cc);if(!E||E&&!E.startPTS){N.logger.log("No frag in previous level to align on");return}return E}function R(r,a){if(r){var n=r.start+a;r.start=r.startPTS=n,r.endPTS=n+r.duration}}function u(r,a){for(var n=a.fragments,t=0,E=n.length;t<E;t++)R(n[t],r);a.fragmentHint&&R(a.fragmentHint,r),a.alignedSliding=!0}function f(r,a,n){if(!a)return;l(r,n,a),!n.alignedSliding&&a.details&&s(n,a.details),!n.alignedSliding&&a.details&&!n.skippedSegments&&Object(L.adjustSliding)(a.details,n)}function l(r,a,n){if(H(r,n,a)){var t=e(n.details,a);t&&Object(V.isFiniteNumber)(t.start)&&(N.logger.log("Adjusting PTS using last level due to CC increase within current level "+a.url),u(t.start,a))}}function s(r,a){if(!a.fragments.length||!r.hasProgramDateTime||!a.hasProgramDateTime)return;var n=a.fragments[0].programDateTime,t=r.fragments[0].programDateTime,E=(t-n)/1e3+a.fragments[0].start;E&&Object(V.isFiniteNumber)(E)&&(N.logger.log("Adjusting PTS using programDateTime delta "+(t-n)+"ms, sliding:"+E.toFixed(3)+" "+r.url+" "),u(E,r))}function i(r,a){var n=r.programDateTime;if(!n)return;var t=(n-a)/1e3;r.start=r.startPTS=t,r.endPTS=t+r.duration}function o(r,a){if(!a.fragments.length||!r.hasProgramDateTime||!a.hasProgramDateTime)return;var n=a.fragments[0].programDateTime,t=a.fragments[0].start,E=n-t*1e3;r.fragments.forEach(function(b){i(b,E)}),r.fragmentHint&&i(r.fragmentHint,E),r.alignedSliding=!0}},"./src/utils/ewma-bandwidth-estimator.ts":function(Ae,z,U){"use strict";U.r(z);var V=U("./src/utils/ewma.ts"),N=function(){function L(H,e,R){this.defaultEstimate_=void 0,this.minWeight_=void 0,this.minDelayMs_=void 0,this.slow_=void 0,this.fast_=void 0,this.defaultEstimate_=R,this.minWeight_=.001,this.minDelayMs_=50,this.slow_=new V.default(H),this.fast_=new V.default(e)}var $=L.prototype;return $.update=function(e,R){var u=this.slow_,f=this.fast_;this.slow_.halfLife!==e&&(this.slow_=new V.default(e,u.getEstimate(),u.getTotalWeight())),this.fast_.halfLife!==R&&(this.fast_=new V.default(R,f.getEstimate(),f.getTotalWeight()))},$.sample=function(e,R){e=Math.max(e,this.minDelayMs_);var u=8*R,f=e/1e3,l=u/f;this.fast_.sample(f,l),this.slow_.sample(f,l)},$.canEstimate=function(){var e=this.fast_;return e&&e.getTotalWeight()>=this.minWeight_},$.getEstimate=function(){return this.canEstimate()?Math.min(this.fast_.getEstimate(),this.slow_.getEstimate()):this.defaultEstimate_},$.destroy=function(){},L}();z.default=N},"./src/utils/ewma.ts":function(Ae,z,U){"use strict";U.r(z);var V=function(){function N($,H,e){H===void 0&&(H=0),e===void 0&&(e=0),this.halfLife=void 0,this.alpha_=void 0,this.estimate_=void 0,this.totalWeight_=void 0,this.halfLife=$,this.alpha_=$?Math.exp(Math.log(.5)/$):0,this.estimate_=H,this.totalWeight_=e}var L=N.prototype;return L.sample=function(H,e){var R=Math.pow(this.alpha_,H);this.estimate_=e*(1-R)+R*this.estimate_,this.totalWeight_+=H},L.getTotalWeight=function(){return this.totalWeight_},L.getEstimate=function(){if(this.alpha_){var H=1-Math.pow(this.alpha_,this.totalWeight_);if(H)return this.estimate_/H}return this.estimate_},N}();z.default=V},"./src/utils/fetch-loader.ts":function(Ae,z,U){"use strict";U.r(z),U.d(z,"fetchSupported",function(){return i});var V=U("./src/polyfills/number.ts"),N=U("./src/loader/load-stats.ts"),L=U("./src/demux/chunk-cache.ts");function $(t,E){t.prototype=Object.create(E.prototype),t.prototype.constructor=t,f(t,E)}function H(t){var E=typeof Map=="function"?new Map:void 0;return H=function(_){if(_===null||!u(_))return _;if(typeof _!="function")throw new TypeError("Super expression must either be null or a function");if(typeof E!="undefined"){if(E.has(_))return E.get(_);E.set(_,B)}function B(){return e(_,arguments,l(this).constructor)}return B.prototype=Object.create(_.prototype,{constructor:{value:B,enumerable:!1,writable:!0,configurable:!0}}),f(B,_)},H(t)}function e(t,E,b){return R()?e=Reflect.construct:e=function(B,x,h){var d=[null];d.push.apply(d,x);var A=Function.bind.apply(B,d),c=new A;return h&&f(c,h.prototype),c},e.apply(null,arguments)}function R(){if(typeof Reflect=="undefined"||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}function u(t){return Function.toString.call(t).indexOf("[native code]")!==-1}function f(t,E){return f=Object.setPrototypeOf||function(_,B){return _.__proto__=B,_},f(t,E)}function l(t){return l=Object.setPrototypeOf?Object.getPrototypeOf:function(b){return b.__proto__||Object.getPrototypeOf(b)},l(t)}function s(){return s=Object.assign||function(t){for(var E=1;E<arguments.length;E++){var b=arguments[E];for(var _ in b)Object.prototype.hasOwnProperty.call(b,_)&&(t[_]=b[_])}return t},s.apply(this,arguments)}function i(){if(self.fetch&&self.AbortController&&self.ReadableStream&&self.Request)try{return new self.ReadableStream({}),!0}catch(t){}return!1}var o=function(){function t(b){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=b.fetchSetup||a,this.controller=new self.AbortController,this.stats=new N.LoadStats}var E=t.prototype;return E.destroy=function(){this.loader=this.callbacks=null,this.abortInternal()},E.abortInternal=function(){var _=this.response;(!_||!_.ok)&&(this.stats.aborted=!0,this.controller.abort())},E.abort=function(){var _;this.abortInternal(),(_=this.callbacks)!==null&&_!==void 0&&_.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.response)},E.load=function(_,B,x){var h=this,d=this.stats;if(d.loading.start)throw new Error("Loader can only be used once.");d.loading.start=self.performance.now();var A=r(_,this.controller.signal),c=x.onProgress,w=_.responseType==="arraybuffer",m=w?"byteLength":"length";this.context=_,this.config=B,this.callbacks=x,this.request=this.fetchSetup(_,A),self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(function(){h.abortInternal(),x.onTimeout(d,_,h.response)},B.timeout),self.fetch(this.request).then(function(g){if(h.response=h.loader=g,!g.ok){var F=g.status,k=g.statusText;throw new n(k||"fetch, bad network response",F,g)}return d.loading.first=Math.max(self.performance.now(),d.loading.start),d.total=parseInt(g.headers.get("Content-Length")||"0"),c&&Object(V.isFiniteNumber)(B.highWaterMark)?h.loadProgressively(g,d,_,B.highWaterMark,c):w?g.arrayBuffer():g.text()}).then(function(g){var F=h.response;self.clearTimeout(h.requestTimeout),d.loading.end=Math.max(self.performance.now(),d.loading.first),d.loaded=d.total=g[m];var k={url:F.url,data:g};c&&!Object(V.isFiniteNumber)(B.highWaterMark)&&c(d,_,g,F),x.onSuccess(k,d,_,F)}).catch(function(g){if(self.clearTimeout(h.requestTimeout),d.aborted)return;var F=g.code||0;x.onError({code:F,text:g.message},_,g.details)})},E.getCacheAge=function(){var _=null;if(this.response){var B=this.response.headers.get("age");_=B?parseFloat(B):null}return _},E.loadProgressively=function(_,B,x,h,d){h===void 0&&(h=0);var A=new L.default,c=_.body.getReader(),w=function m(){return c.read().then(function(g){if(g.done)return A.dataLength&&d(B,x,A.flush(),_),Promise.resolve(new ArrayBuffer(0));var F=g.value,k=F.length;return B.loaded+=k,k<h||A.dataLength?(A.push(F),A.dataLength>=h&&d(B,x,A.flush(),_)):d(B,x,F,_),m()}).catch(function(){return Promise.reject()})};return w()},t}();function r(t,E){var b={method:"GET",mode:"cors",credentials:"same-origin",signal:E,headers:new self.Headers(s({},t.headers))};return t.rangeEnd&&b.headers.set("Range","bytes="+t.rangeStart+"-"+String(t.rangeEnd-1)),b}function a(t,E){return new self.Request(t.url,E)}var n=function(t){$(E,t);function E(b,_,B){var x;return x=t.call(this,b)||this,x.code=void 0,x.details=void 0,x.code=_,x.details=B,x}return E}(H(Error));z.default=o},"./src/utils/imsc1-ttml-parser.ts":function(Ae,z,U){"use strict";U.r(z),U.d(z,"IMSC1_CODEC",function(){return u}),U.d(z,"parseIMSC1",function(){return i});var V=U("./src/utils/mp4-tools.ts"),N=U("./src/utils/vttparser.ts"),L=U("./src/utils/vttcue.ts"),$=U("./src/demux/id3.ts"),H=U("./src/utils/timescale-conversion.ts"),e=U("./src/utils/webvtt-parser.ts");function R(){return R=Object.assign||function(h){for(var d=1;d<arguments.length;d++){var A=arguments[d];for(var c in A)Object.prototype.hasOwnProperty.call(A,c)&&(h[c]=A[c])}return h},R.apply(this,arguments)}var u="stpp.ttml.im1t",f=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,l=/^(\d*(?:\.\d*)?)(h|m|s|ms|f|t)$/,s={left:"start",center:"center",right:"end",start:"start",end:"end"};function i(h,d,A,c,w){var m=Object(V.findBox)(new Uint8Array(h),["mdat"]);if(m.length===0){w(new Error("Could not parse IMSC1 mdat"));return}var g=m[0],F=Object($.utf8ArrayToStr)(new Uint8Array(h,g.start,g.end-g.start)),k=Object(H.toTimescaleFromScale)(d,1,A);try{c(o(F,k))}catch(S){w(S)}}function o(h,d){var A=new DOMParser,c=A.parseFromString(h,"text/xml"),w=c.getElementsByTagName("tt")[0];if(!w)throw new Error("Invalid ttml");var m={frameRate:30,subFrameRate:1,frameRateMultiplier:0,tickRate:0},g=Object.keys(m).reduce(function(X,P){return X[P]=w.getAttribute("ttp:"+P)||m[P],X},{}),F=w.getAttribute("xml:space")!=="preserve",k=a(r(w,"styling","style")),S=a(r(w,"layout","region")),Q=r(w,"body","[begin]");return[].map.call(Q,function(X){var P=n(X,F);if(!P||!X.hasAttribute("begin"))return null;var q=_(X.getAttribute("begin"),g),ie=_(X.getAttribute("dur"),g),be=_(X.getAttribute("end"),g);if(q===null)throw b(X);if(be===null){if(ie===null)throw b(X);be=q+ie}var me=new L.default(q-d,be-d,P);me.id=Object(e.generateCueId)(me.startTime,me.endTime,me.text);var Me=S[X.getAttribute("region")],Ne=k[X.getAttribute("style")];me.position=10,me.size=80;var ke=t(Me,Ne),Ke=ke.textAlign;if(Ke){var Ye=s[Ke];Ye&&(me.lineAlign=Ye),me.align=Ke}return R(me,ke),me}).filter(function(X){return X!==null})}function r(h,d,A){var c=h.getElementsByTagName(d)[0];return c?[].slice.call(c.querySelectorAll(A)):[]}function a(h){return h.reduce(function(d,A){var c=A.getAttribute("xml:id");return c&&(d[c]=A),d},{})}function n(h,d){return[].slice.call(h.childNodes).reduce(function(A,c,w){var m;return c.nodeName==="br"&&w?A+`
|
|
`:(m=c.childNodes)!==null&&m!==void 0&&m.length?n(c,d):d?A+c.textContent.trim().replace(/\s+/g," "):A+c.textContent},"")}function t(h,d){var A="http://www.w3.org/ns/ttml#styling",c=["displayAlign","textAlign","color","backgroundColor","fontSize","fontFamily"];return c.reduce(function(w,m){var g=E(d,A,m)||E(h,A,m);return g&&(w[m]=g),w},{})}function E(h,d,A){return h.hasAttributeNS(d,A)?h.getAttributeNS(d,A):null}function b(h){return new Error("Could not parse ttml timestamp "+h)}function _(h,d){if(!h)return null;var A=Object(N.parseTimeStamp)(h);return A===null&&(f.test(h)?A=B(h,d):l.test(h)&&(A=x(h,d))),A}function B(h,d){var A=f.exec(h),c=(A[4]|0)+(A[5]|0)/d.subFrameRate;return(A[1]|0)*3600+(A[2]|0)*60+(A[3]|0)+c/d.frameRate}function x(h,d){var A=l.exec(h),c=Number(A[1]),w=A[2];switch(w){case"h":return c*3600;case"m":return c*60;case"ms":return c*1e3;case"f":return c/d.frameRate;case"t":return c/d.tickRate}return c}},"./src/utils/logger.ts":function(Ae,z,U){"use strict";U.r(z),U.d(z,"enableLogs",function(){return e}),U.d(z,"logger",function(){return R});var V=function(){},N={trace:V,debug:V,log:V,warn:V,info:V,error:V},L=N;function $(u){var f=self.console[u];return f?f.bind(self.console,"["+u+"] >"):V}function H(u){for(var f=arguments.length,l=new Array(f>1?f-1:0),s=1;s<f;s++)l[s-1]=arguments[s];l.forEach(function(i){L[i]=u[i]?u[i].bind(u):$(i)})}function e(u){if(self.console&&u===!0||typeof u=="object"){H(u,"debug","log","info","warn","error");try{L.log()}catch(f){L=N}}else L=N}var R=L},"./src/utils/mediakeys-helper.ts":function(Ae,z,U){"use strict";U.r(z),U.d(z,"KeySystems",function(){return V}),U.d(z,"requestMediaKeySystemAccess",function(){return N});var V;(function(L){L.WIDEVINE="com.widevine.alpha",L.PLAYREADY="com.microsoft.playready"})(V||(V={}));var N=function(){return typeof self!="undefined"&&self.navigator&&self.navigator.requestMediaKeySystemAccess?self.navigator.requestMediaKeySystemAccess.bind(self.navigator):null}()},"./src/utils/mediasource-helper.ts":function(Ae,z,U){"use strict";U.r(z),U.d(z,"getMediaSource",function(){return V});function V(){return self.MediaSource||self.WebKitMediaSource}},"./src/utils/mp4-tools.ts":function(Ae,z,U){"use strict";U.r(z),U.d(z,"bin2str",function(){return H}),U.d(z,"readUint16",function(){return e}),U.d(z,"readUint32",function(){return R}),U.d(z,"writeUint32",function(){return u}),U.d(z,"findBox",function(){return f}),U.d(z,"parseSegmentIndex",function(){return l}),U.d(z,"parseInitSegment",function(){return s}),U.d(z,"getStartDTS",function(){return i}),U.d(z,"getDuration",function(){return o}),U.d(z,"computeRawDurationFromSamples",function(){return r}),U.d(z,"offsetStartDTS",function(){return a}),U.d(z,"segmentValidRange",function(){return n}),U.d(z,"appendUint8Array",function(){return t});var V=U("./src/utils/typed-array.ts"),N=U("./src/loader/fragment.ts"),L=Math.pow(2,32)-1,$=[].push;function H(E){return String.fromCharCode.apply(null,E)}function e(E,b){"data"in E&&(b+=E.start,E=E.data);var _=E[b]<<8|E[b+1];return _<0?65536+_:_}function R(E,b){"data"in E&&(b+=E.start,E=E.data);var _=E[b]<<24|E[b+1]<<16|E[b+2]<<8|E[b+3];return _<0?4294967296+_:_}function u(E,b,_){"data"in E&&(b+=E.start,E=E.data),E[b]=_>>24,E[b+1]=_>>16&255,E[b+2]=_>>8&255,E[b+3]=_&255}function f(E,b){var _=[];if(!b.length)return _;var B,x,h;"data"in E?(B=E.data,x=E.start,h=E.end):(B=E,x=0,h=B.byteLength);for(var d=x;d<h;){var A=R(B,d),c=H(B.subarray(d+4,d+8)),w=A>1?d+A:h;if(c===b[0])if(b.length===1)_.push({data:B,start:d+8,end:w});else{var m=f({data:B,start:d+8,end:w},b.slice(1));m.length&&$.apply(_,m)}d=w}return _}function l(E){var b=f(E,["moov"]),_=b[0],B=_?_.end:null,x=f(E,["sidx"]);if(!x||!x[0])return null;var h=[],d=x[0],A=d.data[0],c=A===0?8:16,w=R(d,c);c+=4;var m=0,g=0;A===0?c+=8:c+=16,c+=2;var F=d.end+g,k=e(d,c);c+=2;for(var S=0;S<k;S++){var Q=c,X=R(d,Q);Q+=4;var P=X&2147483647,q=(X&2147483648)>>>31;if(q===1)return console.warn("SIDX has hierarchical references (not supported)"),null;var ie=R(d,Q);Q+=4,h.push({referenceSize:P,subsegmentDuration:ie,info:{duration:ie/w,start:F,end:F+P-1}}),F+=P,Q+=4,c=Q}return{earliestPresentationTime:m,timescale:w,version:A,referencesCount:k,references:h,moovEndOffset:B}}function s(E){for(var b=[],_=f(E,["moov","trak"]),B=0;B<_.length;B++){var x=_[B],h=f(x,["tkhd"])[0];if(h){var d=h.data[h.start],A=d===0?12:20,c=R(h,A),w=f(x,["mdia","mdhd"])[0];if(w){d=w.data[w.start],A=d===0?12:20;var m=R(w,A),g=f(x,["mdia","hdlr"])[0];if(g){var F=H(g.data.subarray(g.start+8,g.start+12)),k={soun:N.ElementaryStreamTypes.AUDIO,vide:N.ElementaryStreamTypes.VIDEO}[F];if(k){var S=f(x,["mdia","minf","stbl","stsd"])[0],Q=void 0;S&&(Q=H(S.data.subarray(S.start+12,S.start+16))),b[c]={timescale:m,type:k},b[k]={timescale:m,id:c,codec:Q}}}}}}var X=f(E,["moov","mvex","trex"]);return X.forEach(function(P){var q=R(P,4),ie=b[q];ie&&(ie.default={duration:R(P,12),flags:R(P,20)})}),b}function i(E,b){return f(b,["moof","traf"]).reduce(function(_,B){var x=f(B,["tfdt"])[0],h=x.data[x.start],d=f(B,["tfhd"]).reduce(function(A,c){var w=R(c,4),m=E[w];if(m){var g=R(x,4);h===1&&(g*=Math.pow(2,32),g+=R(x,8));var F=m.timescale||9e4,k=g/F;if(isFinite(k)&&(A===null||k<A))return k}return A},null);return d!==null&&isFinite(d)&&(_===null||d<_)?d:_},null)||0}function o(E,b){for(var _=0,B=0,x=0,h=f(E,["moof","traf"]),d=0;d<h.length;d++){var A=h[d],c=f(A,["tfhd"])[0],w=R(c,4),m=b[w];if(!m)continue;var g=m.default,F=R(c,0)|(g==null?void 0:g.flags),k=g==null?void 0:g.duration;F&8&&(F&2?k=R(c,12):k=R(c,8));for(var S=m.timescale||9e4,Q=f(A,["trun"]),X=0;X<Q.length;X++){if(k){var P=R(Q[X],4);_=k*P}else _=r(Q[X]);m.type===N.ElementaryStreamTypes.VIDEO?B+=_/S:m.type===N.ElementaryStreamTypes.AUDIO&&(x+=_/S)}}if(B===0&&x===0){var q=l(E);if(q!=null&&q.references)return q.references.reduce(function(ie,be){return ie+be.info.duration||0},0)}return B||x}function r(E){var b=R(E,0),_=8;b&1&&(_+=4),b&4&&(_+=4);for(var B=0,x=R(E,4),h=0;h<x;h++){if(b&256){var d=R(E,_);B+=d,_+=4}b&512&&(_+=4),b&1024&&(_+=4),b&2048&&(_+=4)}return B}function a(E,b,_){f(b,["moof","traf"]).forEach(function(B){f(B,["tfhd"]).forEach(function(x){var h=R(x,4),d=E[h];if(!d)return;var A=d.timescale||9e4;f(B,["tfdt"]).forEach(function(c){var w=c.data[c.start],m=R(c,4);if(w===0)u(c,4,m-_*A);else{m*=Math.pow(2,32),m+=R(c,8),m-=_*A,m=Math.max(m,0);var g=Math.floor(m/(L+1)),F=Math.floor(m%(L+1));u(c,4,g),u(c,8,F)}})})})}function n(E){var b={valid:null,remainder:null},_=f(E,["moof"]);if(_){if(_.length<2)return b.remainder=E,b}else return b;var B=_[_.length-1];return b.valid=Object(V.sliceUint8)(E,0,B.start-8),b.remainder=Object(V.sliceUint8)(E,B.start-8),b}function t(E,b){var _=new Uint8Array(E.length+b.length);return _.set(E),_.set(b,E.length),_}},"./src/utils/output-filter.ts":function(Ae,z,U){"use strict";U.r(z),U.d(z,"default",function(){return V});var V=function(){function N($,H){this.timelineController=void 0,this.cueRanges=[],this.trackName=void 0,this.startTime=null,this.endTime=null,this.screen=null,this.timelineController=$,this.trackName=H}var L=N.prototype;return L.dispatchCue=function(){if(this.startTime===null)return;this.timelineController.addCues(this.trackName,this.startTime,this.endTime,this.screen,this.cueRanges),this.startTime=null},L.newCue=function(H,e,R){(this.startTime===null||this.startTime>H)&&(this.startTime=H),this.endTime=e,this.screen=R,this.timelineController.createCaptionsTrack(this.trackName)},L.reset=function(){this.cueRanges=[]},N}()},"./src/utils/texttrack-utils.ts":function(Ae,z,U){"use strict";U.r(z),U.d(z,"sendAddTrackEvent",function(){return N}),U.d(z,"addCueToTrack",function(){return L}),U.d(z,"clearCurrentCues",function(){return $}),U.d(z,"removeCuesInRange",function(){return H}),U.d(z,"getCuesInRange",function(){return R});var V=U("./src/utils/logger.ts");function N(u,f){var l;try{l=new Event("addtrack")}catch(s){l=document.createEvent("Event"),l.initEvent("addtrack",!1,!1)}l.track=u,f.dispatchEvent(l)}function L(u,f){var l=u.mode;if(l==="disabled"&&(u.mode="hidden"),u.cues&&!u.cues.getCueById(f.id))try{if(u.addCue(f),!u.cues.getCueById(f.id))throw new Error("addCue is failed for: "+f)}catch(i){V.logger.debug("[texttrack-utils]: "+i);var s=new self.TextTrackCue(f.startTime,f.endTime,f.text);s.id=f.id,u.addCue(s)}l==="disabled"&&(u.mode=l)}function $(u){var f=u.mode;if(f==="disabled"&&(u.mode="hidden"),u.cues)for(var l=u.cues.length;l--;)u.removeCue(u.cues[l]);f==="disabled"&&(u.mode=f)}function H(u,f,l){var s=u.mode;if(s==="disabled"&&(u.mode="hidden"),u.cues&&u.cues.length>0)for(var i=R(u.cues,f,l),o=0;o<i.length;o++)u.removeCue(i[o]);s==="disabled"&&(u.mode=s)}function e(u,f){if(f<u[0].startTime)return 0;var l=u.length-1;if(f>u[l].endTime)return-1;for(var s=0,i=l;s<=i;){var o=Math.floor((i+s)/2);if(f<u[o].startTime)i=o-1;else if(f>u[o].startTime&&s<l)s=o+1;else return o}return u[s].startTime-f<f-u[i].startTime?s:i}function R(u,f,l){var s=[],i=e(u,f);if(i>-1)for(var o=i,r=u.length;o<r;o++){var a=u[o];if(a.startTime>=f&&a.endTime<=l)s.push(a);else if(a.startTime>l)return s}return s}},"./src/utils/time-ranges.ts":function(Ae,z,U){"use strict";U.r(z);var V={toString:function(L){for(var $="",H=L.length,e=0;e<H;e++)$+="["+L.start(e).toFixed(3)+","+L.end(e).toFixed(3)+"]";return $}};z.default=V},"./src/utils/timescale-conversion.ts":function(Ae,z,U){"use strict";U.r(z),U.d(z,"toTimescaleFromBase",function(){return N}),U.d(z,"toTimescaleFromScale",function(){return L}),U.d(z,"toMsFromMpegTsClock",function(){return $}),U.d(z,"toMpegTsClockFromTimescale",function(){return H});var V=9e4;function N(e,R,u,f){u===void 0&&(u=1),f===void 0&&(f=!1);var l=e*R*u;return f?Math.round(l):l}function L(e,R,u,f){return u===void 0&&(u=1),f===void 0&&(f=!1),N(e,R,1/u,f)}function $(e,R){return R===void 0&&(R=!1),N(e,1e3,1/V,R)}function H(e,R){return R===void 0&&(R=1),N(e,V,1/R)}},"./src/utils/typed-array.ts":function(Ae,z,U){"use strict";U.r(z),U.d(z,"sliceUint8",function(){return V});function V(N,L,$){return Uint8Array.prototype.slice?N.slice(L,$):new Uint8Array(Array.prototype.slice.call(N,L,$))}},"./src/utils/vttcue.ts":function(Ae,z,U){"use strict";U.r(z),z.default=function(){if(typeof self!="undefined"&&self.VTTCue)return self.VTTCue;var V=["","lr","rl"],N=["start","middle","end","left","right"];function L(u,f){if(typeof f!="string")return!1;if(!Array.isArray(u))return!1;var l=f.toLowerCase();return~u.indexOf(l)?l:!1}function $(u){return L(V,u)}function H(u){return L(N,u)}function e(u){for(var f=arguments.length,l=new Array(f>1?f-1:0),s=1;s<f;s++)l[s-1]=arguments[s];for(var i=1;i<arguments.length;i++){var o=arguments[i];for(var r in o)u[r]=o[r]}return u}function R(u,f,l){var s=this,i={enumerable:!0};s.hasBeenReset=!1;var o="",r=!1,a=u,n=f,t=l,E=null,b="",_=!0,B="auto",x="start",h=50,d="middle",A=50,c="middle";Object.defineProperty(s,"id",e({},i,{get:function(){return o},set:function(m){o=""+m}})),Object.defineProperty(s,"pauseOnExit",e({},i,{get:function(){return r},set:function(m){r=!!m}})),Object.defineProperty(s,"startTime",e({},i,{get:function(){return a},set:function(m){if(typeof m!="number")throw new TypeError("Start time must be set to a number.");a=m,this.hasBeenReset=!0}})),Object.defineProperty(s,"endTime",e({},i,{get:function(){return n},set:function(m){if(typeof m!="number")throw new TypeError("End time must be set to a number.");n=m,this.hasBeenReset=!0}})),Object.defineProperty(s,"text",e({},i,{get:function(){return t},set:function(m){t=""+m,this.hasBeenReset=!0}})),Object.defineProperty(s,"region",e({},i,{get:function(){return E},set:function(m){E=m,this.hasBeenReset=!0}})),Object.defineProperty(s,"vertical",e({},i,{get:function(){return b},set:function(m){var g=$(m);if(g===!1)throw new SyntaxError("An invalid or illegal string was specified.");b=g,this.hasBeenReset=!0}})),Object.defineProperty(s,"snapToLines",e({},i,{get:function(){return _},set:function(m){_=!!m,this.hasBeenReset=!0}})),Object.defineProperty(s,"line",e({},i,{get:function(){return B},set:function(m){if(typeof m!="number"&&m!=="auto")throw new SyntaxError("An invalid number or illegal string was specified.");B=m,this.hasBeenReset=!0}})),Object.defineProperty(s,"lineAlign",e({},i,{get:function(){return x},set:function(m){var g=H(m);if(!g)throw new SyntaxError("An invalid or illegal string was specified.");x=g,this.hasBeenReset=!0}})),Object.defineProperty(s,"position",e({},i,{get:function(){return h},set:function(m){if(m<0||m>100)throw new Error("Position must be between 0 and 100.");h=m,this.hasBeenReset=!0}})),Object.defineProperty(s,"positionAlign",e({},i,{get:function(){return d},set:function(m){var g=H(m);if(!g)throw new SyntaxError("An invalid or illegal string was specified.");d=g,this.hasBeenReset=!0}})),Object.defineProperty(s,"size",e({},i,{get:function(){return A},set:function(m){if(m<0||m>100)throw new Error("Size must be between 0 and 100.");A=m,this.hasBeenReset=!0}})),Object.defineProperty(s,"align",e({},i,{get:function(){return c},set:function(m){var g=H(m);if(!g)throw new SyntaxError("An invalid or illegal string was specified.");c=g,this.hasBeenReset=!0}})),s.displayState=void 0}return R.prototype.getCueAsHTML=function(){var u=self.WebVTT;return u.convertCueToDOMTree(self,this.text)},R}()},"./src/utils/vttparser.ts":function(Ae,z,U){"use strict";U.r(z),U.d(z,"parseTimeStamp",function(){return L}),U.d(z,"fixLineBreaks",function(){return f}),U.d(z,"VTTParser",function(){return l});var V=U("./src/utils/vttcue.ts"),N=function(){function s(){}var i=s.prototype;return i.decode=function(r,a){if(!r)return"";if(typeof r!="string")throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(r))},s}();function L(s){function i(r,a,n,t){return(r|0)*3600+(a|0)*60+(n|0)+parseFloat(t||0)}var o=s.match(/^(?:(\d+):)?(\d{2}):(\d{2})(\.\d+)?/);return o?parseFloat(o[2])>59?i(o[2],o[3],0,o[4]):i(o[1],o[2],o[3],o[4]):null}var $=function(){function s(){this.values=Object.create(null)}var i=s.prototype;return i.set=function(r,a){!this.get(r)&&a!==""&&(this.values[r]=a)},i.get=function(r,a,n){return n?this.has(r)?this.values[r]:a[n]:this.has(r)?this.values[r]:a},i.has=function(r){return r in this.values},i.alt=function(r,a,n){for(var t=0;t<n.length;++t)if(a===n[t]){this.set(r,a);break}},i.integer=function(r,a){/^-?\d+$/.test(a)&&this.set(r,parseInt(a,10))},i.percent=function(r,a){if(/^([\d]{1,3})(\.[\d]*)?%$/.test(a)){var n=parseFloat(a);if(n>=0&&n<=100)return this.set(r,n),!0}return!1},s}();function H(s,i,o,r){var a=r?s.split(r):[s];for(var n in a){if(typeof a[n]!="string")continue;var t=a[n].split(o);if(t.length!==2)continue;var E=t[0],b=t[1];i(E,b)}}var e=new V.default(0,0,""),R=e.align==="middle"?"middle":"center";function u(s,i,o){var r=s;function a(){var E=L(s);if(E===null)throw new Error("Malformed timestamp: "+r);return s=s.replace(/^[^\sa-zA-Z-]+/,""),E}function n(E,b){var _=new $;H(E,function(h,d){var A;switch(h){case"region":for(var c=o.length-1;c>=0;c--)if(o[c].id===d){_.set(h,o[c].region);break}break;case"vertical":_.alt(h,d,["rl","lr"]);break;case"line":A=d.split(","),_.integer(h,A[0]),_.percent(h,A[0])&&_.set("snapToLines",!1),_.alt(h,A[0],["auto"]),A.length===2&&_.alt("lineAlign",A[1],["start",R,"end"]);break;case"position":A=d.split(","),_.percent(h,A[0]),A.length===2&&_.alt("positionAlign",A[1],["start",R,"end","line-left","line-right","auto"]);break;case"size":_.percent(h,d);break;case"align":_.alt(h,d,["start",R,"end","left","right"]);break}},/:/,/\s/),b.region=_.get("region",null),b.vertical=_.get("vertical","");var B=_.get("line","auto");B==="auto"&&e.line===-1&&(B=-1),b.line=B,b.lineAlign=_.get("lineAlign","start"),b.snapToLines=_.get("snapToLines",!0),b.size=_.get("size",100),b.align=_.get("align",R);var x=_.get("position","auto");x==="auto"&&e.position===50&&(x=b.align==="start"||b.align==="left"?0:b.align==="end"||b.align==="right"?100:50),b.position=x}function t(){s=s.replace(/^\s+/,"")}if(t(),i.startTime=a(),t(),s.substr(0,3)!=="-->")throw new Error("Malformed time stamp (time stamps must be separated by '-->'): "+r);s=s.substr(3),t(),i.endTime=a(),t(),n(s,i)}function f(s){return s.replace(/<br(?: \/)?>/gi,`
|
|
`)}var l=function(){function s(){this.state="INITIAL",this.buffer="",this.decoder=new N,this.regionList=[],this.cue=null,this.oncue=void 0,this.onparsingerror=void 0,this.onflush=void 0}var i=s.prototype;return i.parse=function(r){var a=this;r&&(a.buffer+=a.decoder.decode(r,{stream:!0}));function n(){var x=a.buffer,h=0;for(x=f(x);h<x.length&&x[h]!=="\r"&&x[h]!==`
|
|
`;)++h;var d=x.substr(0,h);return x[h]==="\r"&&++h,x[h]===`
|
|
`&&++h,a.buffer=x.substr(h),d}function t(x){H(x,function(h,d){},/:/)}try{var E="";if(a.state==="INITIAL"){if(!/\r\n|\n/.test(a.buffer))return this;E=n();var b=E.match(/^()?WEBVTT([ \t].*)?$/);if(!b||!b[0])throw new Error("Malformed WebVTT signature.");a.state="HEADER"}for(var _=!1;a.buffer;){if(!/\r\n|\n/.test(a.buffer))return this;_?_=!1:E=n();switch(a.state){case"HEADER":/:/.test(E)?t(E):E||(a.state="ID");continue;case"NOTE":E||(a.state="ID");continue;case"ID":if(/^NOTE($|[ \t])/.test(E)){a.state="NOTE";break}if(!E)continue;if(a.cue=new V.default(0,0,""),a.state="CUE",E.indexOf("-->")===-1){a.cue.id=E;continue}case"CUE":if(!a.cue){a.state="BADCUE";continue}try{u(E,a.cue,a.regionList)}catch(x){a.cue=null,a.state="BADCUE";continue}a.state="CUETEXT";continue;case"CUETEXT":{var B=E.indexOf("-->")!==-1;if(!E||B&&(_=!0)){a.oncue&&a.cue&&a.oncue(a.cue),a.cue=null,a.state="ID";continue}if(a.cue===null)continue;a.cue.text&&(a.cue.text+=`
|
|
`),a.cue.text+=E}continue;case"BADCUE":E||(a.state="ID")}}}catch(x){a.state==="CUETEXT"&&a.cue&&a.oncue&&a.oncue(a.cue),a.cue=null,a.state=a.state==="INITIAL"?"BADWEBVTT":"BADCUE"}return this},i.flush=function(){var r=this;try{if((r.cue||r.state==="HEADER")&&(r.buffer+=`
|
|
|
|
`,r.parse()),r.state==="INITIAL"||r.state==="BADWEBVTT")throw new Error("Malformed WebVTT signature.")}catch(a){r.onparsingerror&&r.onparsingerror(a)}return r.onflush&&r.onflush(),this},s}()},"./src/utils/webvtt-parser.ts":function(Ae,z,U){"use strict";U.r(z),U.d(z,"generateCueId",function(){return l}),U.d(z,"parseWebVTT",function(){return i});var V=U("./src/polyfills/number.ts"),N=U("./src/utils/vttparser.ts"),L=U("./src/demux/id3.ts"),$=U("./src/utils/timescale-conversion.ts"),H=U("./src/remux/mp4-remuxer.ts"),e=/\r\n|\n\r|\n|\r/g,R=function(r,a,n){return n===void 0&&(n=0),r.substr(n,a.length)===a},u=function(r){var a=parseInt(r.substr(-3)),n=parseInt(r.substr(-6,2)),t=parseInt(r.substr(-9,2)),E=r.length>9?parseInt(r.substr(0,r.indexOf(":"))):0;if(!Object(V.isFiniteNumber)(a)||!Object(V.isFiniteNumber)(n)||!Object(V.isFiniteNumber)(t)||!Object(V.isFiniteNumber)(E))throw Error("Malformed X-TIMESTAMP-MAP: Local:"+r);return a+=1e3*n,a+=60*1e3*t,a+=60*60*1e3*E,a},f=function(r){for(var a=5381,n=r.length;n;)a=a*33^r.charCodeAt(--n);return(a>>>0).toString()};function l(o,r,a){return f(o.toString())+f(r.toString())+f(a)}var s=function(r,a,n){var t=r[a],E=r[t.prevCC];if(!E||!E.new&&t.new){r.ccOffset=r.presentationOffset=t.start,t.new=!1;return}for(;(b=E)!==null&&b!==void 0&&b.new;){var b;r.ccOffset+=t.start-E.start,t.new=!1,t=E,E=r[t.prevCC]}r.presentationOffset=n};function i(o,r,a,n,t,E,b,_){var B=new N.VTTParser,x=Object(L.utf8ArrayToStr)(new Uint8Array(o)).trim().replace(e,`
|
|
`).split(`
|
|
`),h=[],d=Object($.toMpegTsClockFromTimescale)(r,a),A="00:00.000",c=0,w=0,m,g=!0,F=!1;B.oncue=function(k){var S=n[t],Q=n.ccOffset,X=(c-d)/9e4;if(S!=null&&S.new&&(w!==void 0?Q=n.ccOffset=S.start:s(n,t,X)),X&&(Q=X-n.presentationOffset),F){var P=k.endTime-k.startTime,q=Object(H.normalizePts)((k.startTime+Q-w)*9e4,E*9e4)/9e4;k.startTime=q,k.endTime=q+P}var ie=k.text.trim();k.text=decodeURIComponent(encodeURIComponent(ie)),k.id||(k.id=l(k.startTime,k.endTime,ie)),k.endTime>0&&h.push(k)},B.onparsingerror=function(k){m=k},B.onflush=function(){if(m){_(m);return}b(h)},x.forEach(function(k){if(g)if(R(k,"X-TIMESTAMP-MAP=")){g=!1,F=!0,k.substr(16).split(",").forEach(function(S){R(S,"LOCAL:")?A=S.substr(6):R(S,"MPEGTS:")&&(c=parseInt(S.substr(7)))});try{w=u(A)/1e3}catch(S){F=!1,m=S}return}else k===""&&(g=!1);B.parse(k+`
|
|
`)}),B.flush()}},"./src/utils/xhr-loader.ts":function(Ae,z,U){"use strict";U.r(z);var V=U("./src/utils/logger.ts"),N=U("./src/loader/load-stats.ts"),L=/^age:\s*[\d.]+\s*$/m,$=function(){function H(R){this.xhrSetup=void 0,this.requestTimeout=void 0,this.retryTimeout=void 0,this.retryDelay=void 0,this.config=null,this.callbacks=null,this.context=void 0,this.loader=null,this.stats=void 0,this.xhrSetup=R?R.xhrSetup:null,this.stats=new N.LoadStats,this.retryDelay=0}var e=H.prototype;return e.destroy=function(){this.callbacks=null,this.abortInternal(),this.loader=null,this.config=null},e.abortInternal=function(){var u=this.loader;self.clearTimeout(this.requestTimeout),self.clearTimeout(this.retryTimeout),u&&(u.onreadystatechange=null,u.onprogress=null,u.readyState!==4&&(this.stats.aborted=!0,u.abort()))},e.abort=function(){var u;this.abortInternal(),(u=this.callbacks)!==null&&u!==void 0&&u.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.loader)},e.load=function(u,f,l){if(this.stats.loading.start)throw new Error("Loader can only be used once.");this.stats.loading.start=self.performance.now(),this.context=u,this.config=f,this.callbacks=l,this.retryDelay=f.retryDelay,this.loadInternal()},e.loadInternal=function(){var u=this.config,f=this.context;if(!u)return;var l=this.loader=new self.XMLHttpRequest,s=this.stats;s.loading.first=0,s.loaded=0;var i=this.xhrSetup;try{if(i)try{i(l,f.url)}catch(a){l.open("GET",f.url,!0),i(l,f.url)}l.readyState||l.open("GET",f.url,!0);var o=this.context.headers;if(o)for(var r in o)l.setRequestHeader(r,o[r])}catch(a){this.callbacks.onError({code:l.status,text:a.message},f,l);return}f.rangeEnd&&l.setRequestHeader("Range","bytes="+f.rangeStart+"-"+(f.rangeEnd-1)),l.onreadystatechange=this.readystatechange.bind(this),l.onprogress=this.loadprogress.bind(this),l.responseType=f.responseType,self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),u.timeout),l.send()},e.readystatechange=function(){var u=this.context,f=this.loader,l=this.stats;if(!u||!f)return;var s=f.readyState,i=this.config;if(l.aborted)return;if(s>=2)if(self.clearTimeout(this.requestTimeout),l.loading.first===0&&(l.loading.first=Math.max(self.performance.now(),l.loading.start)),s===4){f.onreadystatechange=null,f.onprogress=null;var o=f.status;if(o>=200&&o<300){l.loading.end=Math.max(self.performance.now(),l.loading.first);var r,a;if(u.responseType==="arraybuffer"?(r=f.response,a=r.byteLength):(r=f.responseText,a=r.length),l.loaded=l.total=a,!this.callbacks)return;var n=this.callbacks.onProgress;if(n&&n(l,u,r,f),!this.callbacks)return;var t={url:f.responseURL,data:r};this.callbacks.onSuccess(t,l,u,f)}else l.retry>=i.maxRetry||o>=400&&o<499?(V.logger.error(o+" while loading "+u.url),this.callbacks.onError({code:o,text:f.statusText},u,f)):(V.logger.warn(o+" while loading "+u.url+", retrying in "+this.retryDelay+"..."),this.abortInternal(),this.loader=null,self.clearTimeout(this.retryTimeout),this.retryTimeout=self.setTimeout(this.loadInternal.bind(this),this.retryDelay),this.retryDelay=Math.min(2*this.retryDelay,i.maxRetryDelay),l.retry++)}else self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),i.timeout)},e.loadtimeout=function(){V.logger.warn("timeout while loading "+this.context.url);var u=this.callbacks;u&&(this.abortInternal(),u.onTimeout(this.stats,this.context,this.loader))},e.loadprogress=function(u){var f=this.stats;f.loaded=u.loaded,u.lengthComputable&&(f.total=u.total)},e.getCacheAge=function(){var u=null;if(this.loader&&L.test(this.loader.getAllResponseHeaders())){var f=this.loader.getResponseHeader("age");u=f?parseFloat(f):null}return u},H}();z.default=$}}).default})},vHTk:function(wt,Be,G){wt.exports={wrp:"wrp___z2l1F",bgBlack:"bgBlack___3ezfX",monaco:"monaco___1ypjT",darkBlue:"darkBlue___2ViJc",close:"close___3q-z4",embed:"embed___3dQqc"}},wCXF:function(wt,Be,G){"use strict";G.d(Be,"a",function(){return it});var Ae=G("rePB"),z=G("VTBJ"),U=G("KQm4"),V=G("U8pU"),N=G("ODXe"),L=G("q1tI"),$=G("TSYQ"),H=G.n($),e=G("Gytx"),R=G.n(e),u=G("Kwbf"),f=G("t23M"),l=G("qx4F"),s=G("6eGT"),i=G("IBYe"),o=G("Ff2n"),r=G("c+Xe"),a=G("fyJ8"),n=G("biw7");function t(He,Xe,at,ut,$e){var qe=at[He]||{},De=at[Xe]||{},xe,Se;qe.fixed==="left"?xe=ut.left[He]:De.fixed==="right"&&(Se=ut.right[Xe]);var oe=!1,ce=!1,Ee=!1,Ce=!1,Ge=at[Xe+1],et=at[He-1];if($e==="rtl"){if(xe!==void 0){var pt=et&&et.fixed==="left";Ce=!pt}else if(Se!==void 0){var Bt=Ge&&Ge.fixed==="right";Ee=!Bt}}else if(xe!==void 0){var Dt=Ge&&Ge.fixed==="left";oe=!Dt}else if(Se!==void 0){var xt=et&&et.fixed==="right";ce=!xt}return{fixLeft:xe,fixRight:Se,lastFixLeft:oe,firstFixRight:ce,lastFixRight:Ee,firstFixLeft:Ce,isSticky:ut.isSticky}}var E=G("sR1s");function b(He){var Xe=He.cells,at=He.stickyOffsets,ut=He.flattenColumns,$e=He.rowComponent,qe=He.cellComponent,De=He.onHeaderRow,xe=He.index,Se=L.useContext(n.a),oe=Se.prefixCls,ce=Se.direction,Ee;De&&(Ee=De(Xe.map(function(Ge){return Ge.column}),xe));var Ce=Object(E.a)(Xe.map(function(Ge){return Ge.column}));return L.createElement($e,Object.assign({},Ee),Xe.map(function(Ge,et){var pt=Ge.column,Bt=t(Ge.colStart,Ge.colEnd,ut,at,ce),Dt;return pt&&pt.onHeaderCell&&(Dt=Ge.column.onHeaderCell(pt)),L.createElement(a.a,Object.assign({},Ge,{ellipsis:pt.ellipsis,align:pt.align,component:qe,prefixCls:oe,key:Ce[et]},Bt,{additionalProps:Dt,rowType:"header"}))}))}b.displayName="HeaderRow";var _=b;function B(He){var Xe=[];function at(De,xe){var Se=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;Xe[Se]=Xe[Se]||[];var oe=xe,ce=De.filter(Boolean).map(function(Ee){var Ce={key:Ee.key,className:Ee.className||"",children:Ee.title,column:Ee,colStart:oe},Ge=1,et=Ee.children;return et&&et.length>0&&(Ge=at(et,oe,Se+1).reduce(function(pt,Bt){return pt+Bt},0),Ce.hasSubColumns=!0),"colSpan"in Ee&&(Ge=Ee.colSpan),"rowSpan"in Ee&&(Ce.rowSpan=Ee.rowSpan),Ce.colSpan=Ge,Ce.colEnd=Ce.colStart+Ge-1,Xe[Se].push(Ce),oe+=Ge,Ge});return ce}at(He,0);for(var ut=Xe.length,$e=function(xe){Xe[xe].forEach(function(Se){!("rowSpan"in Se)&&!Se.hasSubColumns&&(Se.rowSpan=ut-xe)})},qe=0;qe<ut;qe+=1)$e(qe);return Xe}function x(He){var Xe=He.stickyOffsets,at=He.columns,ut=He.flattenColumns,$e=He.onHeaderRow,qe=L.useContext(n.a),De=qe.prefixCls,xe=qe.getComponent,Se=L.useMemo(function(){return B(at)},[at]),oe=xe(["header","wrapper"],"thead"),ce=xe(["header","row"],"tr"),Ee=xe(["header","cell"],"th");return L.createElement(oe,{className:"".concat(De,"-thead")},Se.map(function(Ce,Ge){var et=L.createElement(_,{key:Ge,flattenColumns:ut,cells:Ce,stickyOffsets:Xe,rowComponent:ce,cellComponent:Ee,onHeaderRow:$e,index:Ge});return et}))}var h=x,d=G("hW8S");function A(He){for(var Xe=He.colWidths,at=He.columns,ut=He.columCount,$e=[],qe=ut||at.length,De=!1,xe=qe-1;xe>=0;xe-=1){var Se=Xe[xe],oe=at&&at[xe],ce=oe&&oe[d.a];(Se||ce||De)&&($e.unshift(L.createElement("col",Object.assign({key:xe,style:{width:Se,minWidth:Se}},ce))),De=!0)}return L.createElement("colgroup",null,$e)}var c=A;function w(He,Xe){return Object(L.useMemo)(function(){for(var at=[],ut=0;ut<Xe;ut+=1){var $e=He[ut];if($e!==void 0)at[ut]=$e;else return null}return at},[He.join("_"),Xe])}var m=L.forwardRef(function(He,Xe){var at=He.noData,ut=He.columns,$e=He.flattenColumns,qe=He.colWidths,De=He.columCount,xe=He.stickyOffsets,Se=He.direction,oe=He.fixHeader,ce=He.offsetHeader,Ee=He.stickyClassName,Ce=He.onScroll,Ge=Object(o.a)(He,["noData","columns","flattenColumns","colWidths","columCount","stickyOffsets","direction","fixHeader","offsetHeader","stickyClassName","onScroll"]),et=L.useContext(n.a),pt=et.prefixCls,Bt=et.scrollbarSize,Dt=et.isSticky,xt=Dt&&!oe?0:Bt,tr=L.useRef(null),Xt=L.useCallback(function(nr){Object(r.b)(Xe,nr),Object(r.b)(tr,nr)},[]);L.useEffect(function(){var nr;function ur(Et){var _r=Et.currentTarget,kt=Et.deltaX;kt&&(Ce({currentTarget:_r,scrollLeft:_r.scrollLeft+kt}),Et.preventDefault())}return(nr=tr.current)===null||nr===void 0||nr.addEventListener("wheel",ur),function(){var Et;(Et=tr.current)===null||Et===void 0||Et.removeEventListener("wheel",ur)}},[]);var gt=$e[$e.length-1],Mt={fixed:gt?gt.fixed:null,onHeaderCell:function(){return{className:"".concat(pt,"-cell-scrollbar")}}},Jt=Object(L.useMemo)(function(){return xt?[].concat(Object(U.a)(ut),[Mt]):ut},[xt,ut]),Lt=Object(L.useMemo)(function(){return xt?[].concat(Object(U.a)($e),[Mt]):$e},[xt,$e]),ar=Object(L.useMemo)(function(){var nr=xe.right,ur=xe.left;return Object(z.a)(Object(z.a)({},xe),{},{left:Se==="rtl"?[].concat(Object(U.a)(ur.map(function(Et){return Et+xt})),[0]):ur,right:Se==="rtl"?nr:[].concat(Object(U.a)(nr.map(function(Et){return Et+xt})),[0]),isSticky:Dt})},[xt,xe,Dt]),zt=w(qe,De);return L.createElement("div",{style:Object(z.a)({overflow:"hidden"},Dt?{top:ce}:{}),ref:Xt,className:H()("".concat(pt,"-header"),Object(Ae.a)({},Ee,!!Ee))},L.createElement("table",{style:{tableLayout:"fixed",visibility:at||zt?null:"hidden"}},L.createElement(c,{colWidths:zt?[].concat(Object(U.a)(zt),[xt]):[],columCount:De+1,columns:Lt}),L.createElement(h,Object.assign({},Ge,{stickyOffsets:ar,columns:Jt,flattenColumns:Lt}))))});m.displayName="FixedHeader";var g=m,F=L.createContext(null),k=F;function S(He){var Xe=He.prefixCls,at=He.children,ut=He.component,$e=He.cellComponent,qe=He.fixHeader,De=He.fixColumn,xe=He.horizonScroll,Se=He.className,oe=He.expanded,ce=He.componentWidth,Ee=He.colSpan,Ce=L.useContext(n.a),Ge=Ce.scrollbarSize;return L.useMemo(function(){var et=at;return De&&(et=L.createElement("div",{style:{width:ce-(qe?Ge:0),position:"sticky",left:0,overflow:"hidden"},className:"".concat(Xe,"-expanded-row-fixed")},et)),L.createElement(ut,{className:Se,style:{display:oe?null:"none"}},L.createElement(a.a,{component:$e,prefixCls:Xe,colSpan:Ee},et))},[at,ut,qe,xe,Se,oe,ce,Ee,Ge])}var Q=S;function X(He){var Xe=He.className,at=He.style,ut=He.record,$e=He.index,qe=He.rowKey,De=He.getRowKey,xe=He.rowExpandable,Se=He.expandedKeys,oe=He.onRow,ce=He.indent,Ee=ce===void 0?0:ce,Ce=He.rowComponent,Ge=He.cellComponent,et=He.childrenColumnName,pt=L.useContext(n.a),Bt=pt.prefixCls,Dt=pt.fixedInfoList,xt=L.useContext(k),tr=xt.fixHeader,Xt=xt.fixColumn,gt=xt.horizonScroll,Mt=xt.componentWidth,Jt=xt.flattenColumns,Lt=xt.expandableType,ar=xt.expandRowByClick,zt=xt.onTriggerExpand,nr=xt.rowClassName,ur=xt.expandedRowClassName,Et=xt.indentSize,_r=xt.expandIcon,kt=xt.expandedRowRender,Ut=xt.expandIconColumnIndex,$t=L.useState(!1),vr=Object(N.a)($t,2),Wr=vr[0],Gr=vr[1],Hr=Se&&Se.has(He.recordKey);L.useEffect(function(){Hr&&Gr(!0)},[Hr]);var Fr=Lt==="row"&&(!xe||xe(ut)),dr=Lt==="nest",Cr=et&&ut&&ut[et],tn=Fr||dr,Br;oe&&(Br=oe(ut,$e));var An=function(v){if(ar&&tn&&zt(ut,v),Br&&Br.onClick){for(var C,K=arguments.length,re=new Array(K>1?K-1:0),W=1;W<K;W++)re[W-1]=arguments[W];(C=Br).onClick.apply(C,[v].concat(re))}},Sr;typeof nr=="string"?Sr=nr:typeof nr=="function"&&(Sr=nr(ut,$e,Ee));var de=Object(E.a)(Jt),he=L.createElement(Ce,Object.assign({},Br,{"data-row-key":qe,className:H()(Xe,"".concat(Bt,"-row"),"".concat(Bt,"-row-level-").concat(Ee),Sr,Br&&Br.className),style:Object(z.a)(Object(z.a)({},at),Br?Br.style:null),onClick:An}),Jt.map(function(j,v){var C=j.render,K=j.dataIndex,re=j.className,W=de[v],Ie=Dt[v],rt;v===(Ut||0)&&dr&&(rt=L.createElement(L.Fragment,null,L.createElement("span",{style:{paddingLeft:"".concat(Et*Ee,"px")},className:"".concat(Bt,"-row-indent indent-level-").concat(Ee)}),_r({prefixCls:Bt,expanded:Hr,expandable:Cr,record:ut,onExpand:zt})));var vt;return j.onCell&&(vt=j.onCell(ut,$e)),L.createElement(a.a,Object.assign({className:re,ellipsis:j.ellipsis,align:j.align,component:Ge,prefixCls:Bt,key:W,record:ut,index:$e,dataIndex:K,render:C,shouldCellUpdate:j.shouldCellUpdate},Ie,{appendNode:rt,additionalProps:vt}))})),we;if(Fr&&(Wr||Hr)){var Qe=kt(ut,$e,Ee+1,Hr),lt=ur&&ur(ut,$e,Ee);we=L.createElement(Q,{expanded:Hr,className:H()("".concat(Bt,"-expanded-row"),"".concat(Bt,"-expanded-row-level-").concat(Ee+1),lt),prefixCls:Bt,fixHeader:tr,fixColumn:Xt,horizonScroll:gt,component:Ce,componentWidth:Mt,cellComponent:Ge,colSpan:Jt.length},Qe)}var ft;return Cr&&Hr&&(ft=(ut[et]||[]).map(function(j,v){var C=De(j,v);return L.createElement(X,Object.assign({},He,{key:C,rowKey:C,record:j,recordKey:C,index:v,indent:Ee+1}))})),L.createElement(L.Fragment,null,he,we,ft)}X.displayName="BodyRow";var P=X,q=L.createContext(null),ie=q;function be(He){var Xe=He.columnKey,at=He.onColumnResize,ut=L.useRef();return L.useEffect(function(){ut.current&&at(Xe,ut.current.offsetWidth)},[]),L.createElement(f.a,{onResize:function(qe){var De=qe.offsetWidth;at(Xe,De)}},L.createElement("td",{ref:ut,style:{padding:0,border:0,height:0}},L.createElement("div",{style:{height:0,overflow:"hidden"}},"\xA0")))}function me(He){var Xe=He.data,at=He.getRowKey,ut=He.measureColumnWidth,$e=He.expandedKeys,qe=He.onRow,De=He.rowExpandable,xe=He.emptyNode,Se=He.childrenColumnName,oe=L.useContext(ie),ce=oe.onColumnResize,Ee=L.useContext(n.a),Ce=Ee.prefixCls,Ge=Ee.getComponent,et=L.useContext(k),pt=et.fixHeader,Bt=et.horizonScroll,Dt=et.flattenColumns,xt=et.componentWidth;return L.useMemo(function(){var tr=Ge(["body","wrapper"],"tbody"),Xt=Ge(["body","row"],"tr"),gt=Ge(["body","cell"],"td"),Mt;Xe.length?Mt=Xe.map(function(Lt,ar){var zt=at(Lt,ar);return L.createElement(P,{key:zt,rowKey:zt,record:Lt,recordKey:zt,index:ar,rowComponent:Xt,cellComponent:gt,expandedKeys:$e,onRow:qe,getRowKey:at,rowExpandable:De,childrenColumnName:Se})}):Mt=L.createElement(Q,{expanded:!0,className:"".concat(Ce,"-placeholder"),prefixCls:Ce,fixHeader:pt,fixColumn:Bt,horizonScroll:Bt,component:Xt,componentWidth:xt,cellComponent:gt,colSpan:Dt.length},xe);var Jt=Object(E.a)(Dt);return L.createElement(tr,{className:"".concat(Ce,"-tbody")},ut&&L.createElement("tr",{"aria-hidden":"true",className:"".concat(Ce,"-measure-row"),style:{height:0}},Jt.map(function(Lt){return L.createElement(be,{key:Lt,columnKey:Lt,onColumnResize:ce})})),Mt)},[Xe,Ce,qe,ut,$e,at,Ge,xt,xe,Dt])}var Me=L.memo(me);Me.displayName="Body";var Ne=Me,ke=G("wRmb"),Ke=G("xEkU"),Ye=G.n(Ke);function _e(He){var Xe=Object(L.useRef)(He),at=Object(L.useState)({}),ut=Object(N.a)(at,2),$e=ut[1],qe=Object(L.useRef)(null),De=Object(L.useRef)([]);function xe(Se){qe.current===null&&(De.current=[],qe.current=Ye()(function(){De.current.forEach(function(oe){Xe.current=oe(Xe.current)}),qe.current=null,$e({})})),De.current.push(Se)}return Object(L.useEffect)(function(){return function(){Ye.a.cancel(qe.current)}},[]),[Xe.current,xe]}function Te(He){var Xe=Object(L.useRef)(He),at=Object(L.useRef)(null);function ut(){window.clearTimeout(at.current)}function $e(De){Xe.current=De,ut(),at.current=window.setTimeout(function(){Xe.current=null,at.current=null},100)}function qe(){return Xe.current}return Object(L.useEffect)(function(){return ut},[]),[$e,qe]}function Pe(He,Xe,at){var ut=Object(L.useMemo)(function(){for(var $e=[],qe=[],De=0,xe=0,Se=0;Se<Xe;Se+=1)if(at==="rtl"){qe[Se]=xe,xe+=He[Se]||0;var oe=Xe-Se-1;$e[oe]=De,De+=He[oe]||0}else{$e[Se]=De,De+=He[Se]||0;var ce=Xe-Se-1;qe[ce]=xe,xe+=He[ce]||0}return{left:$e,right:qe}},[He,Xe,at]);return ut}var bt=Pe;function mt(He){var Xe=He.className,at=He.children;return L.createElement("div",{className:Xe},at)}var dt=mt,yt=G("n6Qo");function le(He){var Xe,at=He.prefixCls,ut=He.record,$e=He.onExpand,qe=He.expanded,De=He.expandable,xe="".concat(at,"-row-expand-icon");if(!De)return L.createElement("span",{className:H()(xe,"".concat(at,"-row-spaced"))});var Se=function(ce){$e(ut,ce),ce.stopPropagation()};return L.createElement("span",{className:H()(xe,(Xe={},Object(Ae.a)(Xe,"".concat(at,"-row-expanded"),qe),Object(Ae.a)(Xe,"".concat(at,"-row-collapsed"),!qe),Xe)),onClick:Se})}function Z(He,Xe,at){var ut=[];function $e(qe){(qe||[]).forEach(function(De,xe){ut.push(Xe(De,xe)),$e(De[at])})}return $e(He),ut}var te=G("zT1h"),ee=G("y0+3"),ue=function(Xe,at){var ut,$e,qe=Xe.scrollBodyRef,De=Xe.onScroll,xe=Xe.offsetScroll,Se=L.useContext(n.a),oe=Se.prefixCls,ce=((ut=qe.current)===null||ut===void 0?void 0:ut.scrollWidth)||0,Ee=(($e=qe.current)===null||$e===void 0?void 0:$e.clientWidth)||0,Ce=ce&&Ee*(Ee/ce),Ge=L.useRef(),et=_e({scrollLeft:0,isHiddenScrollBar:!1}),pt=Object(N.a)(et,2),Bt=pt[0],Dt=pt[1],xt=L.useRef({delta:0,x:0}),tr=L.useState(!1),Xt=Object(N.a)(tr,2),gt=Xt[0],Mt=Xt[1],Jt=function(){Mt(!1)},Lt=function(Et){Et.persist(),xt.current.delta=Et.pageX-Bt.scrollLeft,xt.current.x=0,Mt(!0),Et.preventDefault()},ar=function(Et){var _r,kt=Et||((_r=window)===null||_r===void 0?void 0:_r.event),Ut=kt.buttons;if(!gt||Ut===0){gt&&Mt(!1);return}var $t=xt.current.x+Et.pageX-xt.current.x-xt.current.delta;$t<=0&&($t=0),$t+Ce>=Ee&&($t=Ee-Ce),De({scrollLeft:$t/Ee*(ce+2)}),xt.current.x=Et.pageX},zt=function(){var Et=Object(ee.b)(qe.current).top,_r=Et+qe.current.offsetHeight,kt=document.documentElement.scrollTop+window.innerHeight;_r-Object(l.a)()<=kt||Et>=kt-xe?Dt(function(Ut){return Object(z.a)(Object(z.a)({},Ut),{},{isHiddenScrollBar:!0})}):Dt(function(Ut){return Object(z.a)(Object(z.a)({},Ut),{},{isHiddenScrollBar:!1})})},nr=function(Et){Dt(function(_r){return Object(z.a)(Object(z.a)({},_r),{},{scrollLeft:Et/ce*Ee||0})})};return L.useImperativeHandle(at,function(){return{setScrollLeft:nr}}),L.useEffect(function(){var ur=Object(te.a)(document.body,"mouseup",Jt,!1),Et=Object(te.a)(document.body,"mousemove",ar,!1);return zt(),function(){ur.remove(),Et.remove()}},[Ce,gt]),L.useEffect(function(){var ur=Object(te.a)(window,"scroll",zt,!1),Et=Object(te.a)(window,"resize",zt,!1);return function(){ur.remove(),Et.remove()}},[]),L.useEffect(function(){Bt.isHiddenScrollBar||Dt(function(ur){var Et,_r;return Object(z.a)(Object(z.a)({},ur),{},{scrollLeft:qe.current.scrollLeft/((Et=qe.current)===null||Et===void 0?void 0:Et.scrollWidth)*((_r=qe.current)===null||_r===void 0?void 0:_r.clientWidth)})})},[Bt.isHiddenScrollBar]),ce<=Ee||!Ce||Bt.isHiddenScrollBar?null:L.createElement("div",{style:{height:Object(l.a)(),width:Ee,bottom:xe},className:"".concat(oe,"-sticky-scroll")},L.createElement("div",{onMouseDown:Lt,ref:Ge,className:H()("".concat(oe,"-sticky-scroll-bar"),Object(Ae.a)({},"".concat(oe,"-sticky-scroll-bar-active"),gt)),style:{width:"".concat(Ce,"px"),transform:"translate3d(".concat(Bt.scrollLeft,"px, 0, 0)")}}))},ye=L.forwardRef(ue);function ve(He,Xe){return L.useMemo(function(){var at=!!He;return{isSticky:at,stickyClassName:at?"".concat(Xe,"-sticky-header"):"",offsetHeader:Object(V.a)(He)==="object"&&He.offsetHeader||0,offsetScroll:Object(V.a)(He)==="object"&&He.offsetScroll||0}},[He,Xe])}var Je=[],tt={},it="rc-table-internal-hook",st=L.memo(function(He){var Xe=He.children;return Xe},function(He,Xe){return R()(He.props,Xe.props)?He.pingLeft!==Xe.pingLeft||He.pingRight!==Xe.pingRight:!1});function ht(He){var Xe,at=He.prefixCls,ut=He.className,$e=He.rowClassName,qe=He.style,De=He.data,xe=He.rowKey,Se=He.scroll,oe=He.tableLayout,ce=He.direction,Ee=He.title,Ce=He.footer,Ge=He.summary,et=He.id,pt=He.showHeader,Bt=He.components,Dt=He.emptyText,xt=He.onRow,tr=He.onHeaderRow,Xt=He.internalHooks,gt=He.transformColumns,Mt=He.internalRefs,Jt=He.sticky,Lt=De||Je,ar=!!Lt.length,zt=L.useState(0),nr=Object(N.a)(zt,2),ur=nr[0],Et=nr[1];L.useEffect(function(){Et(Object(l.a)())});var _r=L.useMemo(function(){return Object(E.c)(Bt,{})},[Bt]),kt=L.useCallback(function(Er,yr){return Object(E.b)(_r,Er)||yr},[_r]),Ut=L.useMemo(function(){return typeof xe=="function"?xe:function(Er){var yr=Er&&Er[xe];return yr}},[xe]),$t=Object(d.c)(He),vr=$t.expandIcon,Wr=$t.expandedRowKeys,Gr=$t.defaultExpandedRowKeys,Hr=$t.defaultExpandAllRows,Fr=$t.expandedRowRender,dr=$t.onExpand,Cr=$t.onExpandedRowsChange,tn=$t.expandRowByClick,Br=$t.rowExpandable,An=$t.expandIconColumnIndex,Sr=$t.expandedRowClassName,de=$t.childrenColumnName,he=$t.indentSize,we=vr||le,Qe=de||"children",lt=L.useMemo(function(){return Fr?"row":He.expandable&&Xt===it&&He.expandable.__PARENT_RENDER_ICON__||Lt.some(function(Er){return Er&&Object(V.a)(Er)==="object"&&Er[Qe]})?"nest":!1},[!!Fr,Lt]),ft=L.useState(function(){return Gr||(Hr?Z(Lt,Ut,Qe):[])}),j=Object(N.a)(ft,2),v=j[0],C=j[1],K=L.useMemo(function(){return new Set(Wr||v||[])},[Wr,v]),re=L.useCallback(function(Er){var yr=Ut(Er,Lt.indexOf(Er)),on,vn=K.has(yr);vn?(K.delete(yr),on=Object(U.a)(K)):on=[].concat(Object(U.a)(K),[yr]),C(on),dr&&dr(!vn,Er),Cr&&Cr(on)},[Ut,K,Lt,dr,Cr]),W=L.useState(0),Ie=Object(N.a)(W,2),rt=Ie[0],vt=Ie[1],Ct=Object(ke.b)(Object(z.a)(Object(z.a)(Object(z.a)({},He),$t),{},{expandable:!!Fr,expandedKeys:K,getRowKey:Ut,onTriggerExpand:re,expandIcon:we,expandIconColumnIndex:An,direction:ce}),Xt===it?gt:null),ot=Object(N.a)(Ct,2),Pt=ot[0],Ot=ot[1],Ht=L.useMemo(function(){return{columns:Pt,flattenColumns:Ot}},[Pt,Ot]),er=L.useRef(),wr=L.useRef(),sr=L.useRef(),hr=L.useState(!1),Zt=Object(N.a)(hr,2),Qr=Zt[0],Ir=Zt[1],fr=L.useState(!1),Kr=Object(N.a)(fr,2),$r=Kr[0],Zr=Kr[1],jr=_e(new Map),Or=Object(N.a)(jr,2),Vr=Or[0],Yr=Or[1],Jr=Object(E.a)(Ot),sn=Jr.map(function(Er){return Vr.get(Er)}),rn=L.useMemo(function(){return sn},[sn.join("_")]),Dr=bt(rn,Ot.length,ce),ir=Se&&Object(E.d)(Se.y),rr=Se&&Object(E.d)(Se.x),mr=rr&&Ot.some(function(Er){var yr=Er.fixed;return yr}),Ar=L.useRef(),zr=ve(Jt,at),br=zr.isSticky,Rn=zr.offsetHeader,qr=zr.offsetScroll,Bn=zr.stickyClassName,Dn,Pn,Xr;ir&&(Pn={overflowY:"scroll",maxHeight:Se.y}),rr&&(Dn={overflowX:"auto"},ir||(Pn={overflowY:"hidden"}),Xr={width:Se.x===!0?"auto":Se.x,minWidth:"100%"});var Zi=L.useCallback(function(Er,yr){Yr(function(on){var vn=new Map(on);return vn.set(Er,yr),vn})},[]),jn=Te(null),qi=Object(N.a)(jn,2),ea=qi[0],oi=qi[1];function wi(Er,yr){if(!yr)return;typeof yr=="function"?yr(Er):yr.scrollLeft!==Er&&(yr.scrollLeft=Er)}var Sn=function(yr){var on=yr.currentTarget,vn=yr.scrollLeft,ei=typeof vn=="number"?vn:on.scrollLeft,aa=on||tt;if(!oi()||oi()===aa){var Oi;ea(aa),wi(ei,wr.current),wi(ei,sr.current),wi(ei,(Oi=Ar.current)===null||Oi===void 0?void 0:Oi.setScrollLeft)}if(on){var Na=on.scrollWidth,Pa=on.clientWidth;Ir(ei>0),Zr(ei<Na-Pa)}},Tn=function(){sr.current&&Sn({currentTarget:sr.current})},ta=function(yr){var on=yr.width;Tn(),vt(er.current?er.current.offsetWidth:on)};L.useEffect(function(){return Tn},[]),L.useEffect(function(){rr&&Tn()},[rr]),L.useEffect(function(){Xt===it&&Mt&&(Mt.body.current=sr.current)});var Ci=kt(["table"],"table"),mn=L.useMemo(function(){return oe||(mr?Se.x==="max-content"?"auto":"fixed":ir||Ot.some(function(Er){var yr=Er.ellipsis;return yr})?"fixed":"auto")},[ir,mr,Ot,oe]),Mn,qn={colWidths:rn,columCount:Ot.length,stickyOffsets:Dr,onHeaderRow:tr,fixHeader:ir},ra=L.useMemo(function(){return ar?null:typeof Dt=="function"?Dt():Dt},[ar,Dt]),na=L.createElement(Ne,{data:Lt,measureColumnWidth:ir||rr||br,expandedKeys:K,rowExpandable:Br,getRowKey:Ut,onRow:xt,emptyNode:ra,childrenColumnName:Qe}),Wn=L.createElement(c,{colWidths:Ot.map(function(Er){var yr=Er.width;return yr}),columns:Ot}),Gn=Ge&&L.createElement(yt.b,null,Ge(Lt)),ia=kt(["body"]);if(ir||br){var Ti;typeof ia=="function"?(Ti=ia(Lt,{scrollbarSize:ur,ref:sr,onScroll:Sn}),qn.colWidths=Ot.map(function(Er,yr){var on=Er.width,vn=yr===Pt.length-1?on-ur:on;return typeof vn=="number"&&!Number.isNaN(vn)?vn:(Object(u.a)(!1,"When use `components.body` with render props. Each column should have a fixed value."),0)})):Ti=L.createElement("div",{style:Object(z.a)(Object(z.a)({},Dn),Pn),onScroll:Sn,ref:sr,className:H()("".concat(at,"-body"))},L.createElement(Ci,{style:Object(z.a)(Object(z.a)({},Xr),{},{tableLayout:mn})},Wn,na,Gn),br&&L.createElement(ye,{ref:Ar,offsetScroll:qr,scrollBodyRef:sr,onScroll:Sn})),Mn=L.createElement(L.Fragment,null,pt!==!1&&L.createElement(g,Object.assign({noData:!Lt.length},qn,Ht,{direction:ce,offsetHeader:Rn,stickyClassName:Bn,ref:wr,onScroll:Sn})),Ti)}else Mn=L.createElement("div",{style:Object(z.a)(Object(z.a)({},Dn),Pn),className:H()("".concat(at,"-content")),onScroll:Sn,ref:sr},L.createElement(Ci,{style:Object(z.a)(Object(z.a)({},Xr),{},{tableLayout:mn})},Wn,pt!==!1&&L.createElement(h,Object.assign({},qn,Ht)),na,Gn));var Fa=Object(d.b)(He),xi=L.createElement("div",Object.assign({className:H()(at,ut,(Xe={},Object(Ae.a)(Xe,"".concat(at,"-rtl"),ce==="rtl"),Object(Ae.a)(Xe,"".concat(at,"-ping-left"),Qr),Object(Ae.a)(Xe,"".concat(at,"-ping-right"),$r),Object(Ae.a)(Xe,"".concat(at,"-layout-fixed"),oe==="fixed"),Object(Ae.a)(Xe,"".concat(at,"-fixed-header"),ir),Object(Ae.a)(Xe,"".concat(at,"-fixed-column"),mr),Object(Ae.a)(Xe,"".concat(at,"-scroll-horizontal"),rr),Object(Ae.a)(Xe,"".concat(at,"-has-fix-left"),Ot[0]&&Ot[0].fixed),Object(Ae.a)(Xe,"".concat(at,"-has-fix-right"),Ot[Ot.length-1]&&Ot[Ot.length-1].fixed==="right"),Xe)),style:qe,id:et,ref:er},Fa),L.createElement(st,{pingLeft:Qr,pingRight:$r,props:Object(z.a)(Object(z.a)({},He),{},{stickyOffsets:Dr,mergedExpandedKeys:K})},Ee&&L.createElement(dt,{className:"".concat(at,"-title")},Ee(Lt)),L.createElement("div",{className:"".concat(at,"-container")},Mn),Ce&&L.createElement(dt,{className:"".concat(at,"-footer")},Ce(Lt))));rr&&(xi=L.createElement(f.a,{onResize:ta},xi));var Bi=L.useMemo(function(){return{prefixCls:at,getComponent:kt,scrollbarSize:ur,direction:ce,fixedInfoList:Ot.map(function(Er,yr){return t(yr,yr,Ot,Dr,ce)}),isSticky:br}},[at,kt,ur,ce,Ot,Dr,ce,br]),Si=L.useMemo(function(){return Object(z.a)(Object(z.a)({},Ht),{},{tableLayout:mn,rowClassName:$e,expandedRowClassName:Sr,componentWidth:rt,fixHeader:ir,fixColumn:mr,horizonScroll:rr,expandIcon:we,expandableType:lt,expandRowByClick:tn,expandedRowRender:Fr,onTriggerExpand:re,expandIconColumnIndex:An,indentSize:he})},[Ht,mn,$e,Sr,rt,ir,mr,rr,we,lt,tn,Fr,re,An,he]),Ii=L.useMemo(function(){return{onColumnResize:Zi}},[Zi]);return L.createElement(n.a.Provider,{value:Bi},L.createElement(k.Provider,{value:Si},L.createElement(ie.Provider,{value:Ii},xi)))}ht.Column=i.a,ht.ColumnGroup=s.a,ht.Summary=yt.a,ht.defaultProps={rowKey:"key",prefixCls:"rc-table",emptyText:function(){return"No Data"}};var _t=Be.b=ht},wOnQ:function(wt,Be,G){/*!
|
|
* html2canvas 1.4.1 <https://html2canvas.hertzen.com>
|
|
* Copyright (c) 2022 Niklas von Hertzen <https://hertzen.com>
|
|
* Released under MIT License
|
|
*/(function(Ae,z){wt.exports=z()})(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 Ae=function(T,p){return Ae=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(D,O){D.__proto__=O}||function(D,O){for(var Y in O)Object.prototype.hasOwnProperty.call(O,Y)&&(D[Y]=O[Y])},Ae(T,p)};function z(T,p){if(typeof p!="function"&&p!==null)throw new TypeError("Class extends value "+String(p)+" is not a constructor or null");Ae(T,p);function D(){this.constructor=T}T.prototype=p===null?Object.create(p):(D.prototype=p.prototype,new D)}var U=function(){return U=Object.assign||function(p){for(var D,O=1,Y=arguments.length;O<Y;O++){D=arguments[O];for(var ne in D)Object.prototype.hasOwnProperty.call(D,ne)&&(p[ne]=D[ne])}return p},U.apply(this,arguments)};function V(T,p,D,O){function Y(ne){return ne instanceof D?ne:new D(function(ge){ge(ne)})}return new(D||(D=Promise))(function(ne,ge){function Re(Ze){try{ze(O.next(Ze))}catch(At){ge(At)}}function Oe(Ze){try{ze(O.throw(Ze))}catch(At){ge(At)}}function ze(Ze){Ze.done?ne(Ze.value):Y(Ze.value).then(Re,Oe)}ze((O=O.apply(T,p||[])).next())})}function N(T,p){var D={label:0,sent:function(){if(ne[0]&1)throw ne[1];return ne[1]},trys:[],ops:[]},O,Y,ne,ge;return ge={next:Re(0),throw:Re(1),return:Re(2)},typeof Symbol=="function"&&(ge[Symbol.iterator]=function(){return this}),ge;function Re(ze){return function(Ze){return Oe([ze,Ze])}}function Oe(ze){if(O)throw new TypeError("Generator is already executing.");for(;D;)try{if(O=1,Y&&(ne=ze[0]&2?Y.return:ze[0]?Y.throw||((ne=Y.return)&&ne.call(Y),0):Y.next)&&!(ne=ne.call(Y,ze[1])).done)return ne;(Y=0,ne)&&(ze=[ze[0]&2,ne.value]);switch(ze[0]){case 0:case 1:ne=ze;break;case 4:return D.label++,{value:ze[1],done:!1};case 5:D.label++,Y=ze[1],ze=[0];continue;case 7:ze=D.ops.pop(),D.trys.pop();continue;default:if(!(ne=D.trys,ne=ne.length>0&&ne[ne.length-1])&&(ze[0]===6||ze[0]===2)){D=0;continue}if(ze[0]===3&&(!ne||ze[1]>ne[0]&&ze[1]<ne[3])){D.label=ze[1];break}if(ze[0]===6&&D.label<ne[1]){D.label=ne[1],ne=ze;break}if(ne&&D.label<ne[2]){D.label=ne[2],D.ops.push(ze);break}ne[2]&&D.ops.pop(),D.trys.pop();continue}ze=p.call(T,D)}catch(Ze){ze=[6,Ze],Y=0}finally{O=ne=0}if(ze[0]&5)throw ze[1];return{value:ze[0]?ze[1]:void 0,done:!0}}}function L(T,p,D){if(D||arguments.length===2)for(var O=0,Y=p.length,ne;O<Y;O++)(ne||!(O in p))&&(ne||(ne=Array.prototype.slice.call(p,0,O)),ne[O]=p[O]);return T.concat(ne||p)}for(var $=function(){function T(p,D,O,Y){this.left=p,this.top=D,this.width=O,this.height=Y}return T.prototype.add=function(p,D,O,Y){return new T(this.left+p,this.top+D,this.width+O,this.height+Y)},T.fromClientRect=function(p,D){return new T(D.left+p.windowBounds.left,D.top+p.windowBounds.top,D.width,D.height)},T.fromDOMRectList=function(p,D){var O=Array.from(D).find(function(Y){return Y.width!==0});return O?new T(O.left+p.windowBounds.left,O.top+p.windowBounds.top,O.width,O.height):T.EMPTY},T.EMPTY=new T(0,0,0,0),T}(),H=function(T,p){return $.fromClientRect(T,p.getBoundingClientRect())},e=function(T){var p=T.body,D=T.documentElement;if(!p||!D)throw new Error("Unable to get document size");var O=Math.max(Math.max(p.scrollWidth,D.scrollWidth),Math.max(p.offsetWidth,D.offsetWidth),Math.max(p.clientWidth,D.clientWidth)),Y=Math.max(Math.max(p.scrollHeight,D.scrollHeight),Math.max(p.offsetHeight,D.offsetHeight),Math.max(p.clientHeight,D.clientHeight));return new $(0,0,O,Y)},R=function(T){for(var p=[],D=0,O=T.length;D<O;){var Y=T.charCodeAt(D++);if(Y>=55296&&Y<=56319&&D<O){var ne=T.charCodeAt(D++);(ne&64512)===56320?p.push(((Y&1023)<<10)+(ne&1023)+65536):(p.push(Y),D--)}else p.push(Y)}return p},u=function(){for(var T=[],p=0;p<arguments.length;p++)T[p]=arguments[p];if(String.fromCodePoint)return String.fromCodePoint.apply(String,T);var D=T.length;if(!D)return"";for(var O=[],Y=-1,ne="";++Y<D;){var ge=T[Y];ge<=65535?O.push(ge):(ge-=65536,O.push((ge>>10)+55296,ge%1024+56320)),(Y+1===D||O.length>16384)&&(ne+=String.fromCharCode.apply(String,O),O.length=0)}return ne},f="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",l=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),s=0;s<f.length;s++)l[f.charCodeAt(s)]=s;for(var i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),r=0;r<i.length;r++)o[i.charCodeAt(r)]=r;for(var a=function(T){var p=T.length*.75,D=T.length,O,Y=0,ne,ge,Re,Oe;T[T.length-1]==="="&&(p--,T[T.length-2]==="="&&p--);var ze=typeof ArrayBuffer!="undefined"&&typeof Uint8Array!="undefined"&&typeof Uint8Array.prototype.slice!="undefined"?new ArrayBuffer(p):new Array(p),Ze=Array.isArray(ze)?ze:new Uint8Array(ze);for(O=0;O<D;O+=4)ne=o[T.charCodeAt(O)],ge=o[T.charCodeAt(O+1)],Re=o[T.charCodeAt(O+2)],Oe=o[T.charCodeAt(O+3)],Ze[Y++]=ne<<2|ge>>4,Ze[Y++]=(ge&15)<<4|Re>>2,Ze[Y++]=(Re&3)<<6|Oe&63;return ze},n=function(T){for(var p=T.length,D=[],O=0;O<p;O+=2)D.push(T[O+1]<<8|T[O]);return D},t=function(T){for(var p=T.length,D=[],O=0;O<p;O+=4)D.push(T[O+3]<<24|T[O+2]<<16|T[O+1]<<8|T[O]);return D},E=5,b=6+5,_=2,B=b-E,x=65536>>E,h=1<<E,d=h-1,A=1024>>E,c=x+A,w=c,m=2048>>6,g=w+m,F=65536>>b,k=1<<B,S=k-1,Q=function(T,p,D){return T.slice?T.slice(p,D):new Uint16Array(Array.prototype.slice.call(T,p,D))},X=function(T,p,D){return T.slice?T.slice(p,D):new Uint32Array(Array.prototype.slice.call(T,p,D))},P=function(T,p){var D=a(T),O=Array.isArray(D)?t(D):new Uint32Array(D),Y=Array.isArray(D)?n(D):new Uint16Array(D),ne=24,ge=Q(Y,ne/2,O[4]/2),Re=O[5]===2?Q(Y,(ne+O[4])/2):X(O,Math.ceil((ne+O[4])/4));return new q(O[0],O[1],O[2],O[3],ge,Re)},q=function(){function T(p,D,O,Y,ne,ge){this.initialValue=p,this.errorValue=D,this.highStart=O,this.highValueIndex=Y,this.index=ne,this.data=ge}return T.prototype.get=function(p){var D;if(p>=0){if(p<55296||p>56319&&p<=65535)return D=this.index[p>>E],D=(D<<_)+(p&d),this.data[D];if(p<=65535)return D=this.index[x+(p-55296>>E)],D=(D<<_)+(p&d),this.data[D];if(p<this.highStart)return D=g-F+(p>>b),D=this.index[D],D+=p>>E&S,D=this.index[D],D=(D<<_)+(p&d),this.data[D];if(p<=1114111)return this.data[this.highValueIndex]}return this.errorValue},T}(),ie="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",be=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),me=0;me<ie.length;me++)be[ie.charCodeAt(me)]=me;var Me="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==",Ne=50,ke=1,Ke=2,Ye=3,_e=4,Te=5,Pe=7,bt=8,mt=9,dt=10,yt=11,le=12,Z=13,te=14,ee=15,ue=16,ye=17,ve=18,Je=19,tt=20,it=21,st=22,ht=23,_t=24,He=25,Xe=26,at=27,ut=28,$e=29,qe=30,De=31,xe=32,Se=33,oe=34,ce=35,Ee=36,Ce=37,Ge=38,et=39,pt=40,Bt=41,Dt=42,xt=43,tr=[9001,65288],Xt="!",gt="\xD7",Mt="\xF7",Jt=P(Me),Lt=[qe,Ee],ar=[ke,Ke,Ye,Te],zt=[dt,bt],nr=[at,Xe],ur=ar.concat(zt),Et=[Ge,et,pt,oe,ce],_r=[ee,Z],kt=function(T,p){p===void 0&&(p="strict");var D=[],O=[],Y=[];return T.forEach(function(ne,ge){var Re=Jt.get(ne);if(Re>Ne?(Y.push(!0),Re-=Ne):Y.push(!1),["normal","auto","loose"].indexOf(p)!==-1&&[8208,8211,12316,12448].indexOf(ne)!==-1)return O.push(ge),D.push(ue);if(Re===_e||Re===yt){if(ge===0)return O.push(ge),D.push(qe);var Oe=D[ge-1];return ur.indexOf(Oe)===-1?(O.push(O[ge-1]),D.push(Oe)):(O.push(ge),D.push(qe))}if(O.push(ge),Re===De)return D.push(p==="strict"?it:Ce);if(Re===Dt)return D.push(qe);if(Re===$e)return D.push(qe);if(Re===xt)return ne>=131072&&ne<=196605||ne>=196608&&ne<=262141?D.push(Ce):D.push(qe);D.push(Re)}),[O,D,Y]},Ut=function(T,p,D,O){var Y=O[D];if(Array.isArray(T)?T.indexOf(Y)!==-1:T===Y)for(var ne=D;ne<=O.length;){ne++;var ge=O[ne];if(ge===p)return!0;if(ge!==dt)break}if(Y===dt)for(var ne=D;ne>0;){ne--;var Re=O[ne];if(Array.isArray(T)?T.indexOf(Re)!==-1:T===Re)for(var Oe=D;Oe<=O.length;){Oe++;var ge=O[Oe];if(ge===p)return!0;if(ge!==dt)break}if(Re!==dt)break}return!1},$t=function(T,p){for(var D=T;D>=0;){var O=p[D];if(O===dt)D--;else return O}return 0},vr=function(T,p,D,O,Y){if(D[O]===0)return gt;var ne=O-1;if(Array.isArray(Y)&&Y[ne]===!0)return gt;var ge=ne-1,Re=ne+1,Oe=p[ne],ze=ge>=0?p[ge]:0,Ze=p[Re];if(Oe===Ke&&Ze===Ye)return gt;if(ar.indexOf(Oe)!==-1)return Xt;if(ar.indexOf(Ze)!==-1)return gt;if(zt.indexOf(Ze)!==-1)return gt;if($t(ne,p)===bt)return Mt;if(Jt.get(T[ne])===yt)return gt;if((Oe===xe||Oe===Se)&&Jt.get(T[Re])===yt)return gt;if(Oe===Pe||Ze===Pe)return gt;if(Oe===mt)return gt;if([dt,Z,ee].indexOf(Oe)===-1&&Ze===mt)return gt;if([ye,ve,Je,_t,ut].indexOf(Ze)!==-1)return gt;if($t(ne,p)===st)return gt;if(Ut(ht,st,ne,p))return gt;if(Ut([ye,ve],it,ne,p))return gt;if(Ut(le,le,ne,p))return gt;if(Oe===dt)return Mt;if(Oe===ht||Ze===ht)return gt;if(Ze===ue||Oe===ue)return Mt;if([Z,ee,it].indexOf(Ze)!==-1||Oe===te)return gt;if(ze===Ee&&_r.indexOf(Oe)!==-1)return gt;if(Oe===ut&&Ze===Ee)return gt;if(Ze===tt)return gt;if(Lt.indexOf(Ze)!==-1&&Oe===He||Lt.indexOf(Oe)!==-1&&Ze===He)return gt;if(Oe===at&&[Ce,xe,Se].indexOf(Ze)!==-1||[Ce,xe,Se].indexOf(Oe)!==-1&&Ze===Xe)return gt;if(Lt.indexOf(Oe)!==-1&&nr.indexOf(Ze)!==-1||nr.indexOf(Oe)!==-1&&Lt.indexOf(Ze)!==-1)return gt;if([at,Xe].indexOf(Oe)!==-1&&(Ze===He||[st,ee].indexOf(Ze)!==-1&&p[Re+1]===He)||[st,ee].indexOf(Oe)!==-1&&Ze===He||Oe===He&&[He,ut,_t].indexOf(Ze)!==-1)return gt;if([He,ut,_t,ye,ve].indexOf(Ze)!==-1)for(var At=ne;At>=0;){var ct=p[At];if(ct===He)return gt;if([ut,_t].indexOf(ct)!==-1)At--;else break}if([at,Xe].indexOf(Ze)!==-1)for(var At=[ye,ve].indexOf(Oe)!==-1?ge:ne;At>=0;){var ct=p[At];if(ct===He)return gt;if([ut,_t].indexOf(ct)!==-1)At--;else break}if(Ge===Oe&&[Ge,et,oe,ce].indexOf(Ze)!==-1||[et,oe].indexOf(Oe)!==-1&&[et,pt].indexOf(Ze)!==-1||[pt,ce].indexOf(Oe)!==-1&&Ze===pt)return gt;if(Et.indexOf(Oe)!==-1&&[tt,Xe].indexOf(Ze)!==-1||Et.indexOf(Ze)!==-1&&Oe===at)return gt;if(Lt.indexOf(Oe)!==-1&&Lt.indexOf(Ze)!==-1)return gt;if(Oe===_t&&Lt.indexOf(Ze)!==-1)return gt;if(Lt.concat(He).indexOf(Oe)!==-1&&Ze===st&&tr.indexOf(T[Re])===-1||Lt.concat(He).indexOf(Ze)!==-1&&Oe===ve)return gt;if(Oe===Bt&&Ze===Bt){for(var Wt=D[ne],It=1;Wt>0&&(Wt--,p[Wt]===Bt);)It++;if(It%2!==0)return gt}return Oe===xe&&Ze===Se?gt:Mt},Wr=function(T,p){p||(p={lineBreak:"normal",wordBreak:"normal"});var D=kt(T,p.lineBreak),O=D[0],Y=D[1],ne=D[2];(p.wordBreak==="break-all"||p.wordBreak==="break-word")&&(Y=Y.map(function(Re){return[He,qe,Dt].indexOf(Re)!==-1?Ce:Re}));var ge=p.wordBreak==="keep-all"?ne.map(function(Re,Oe){return Re&&T[Oe]>=19968&&T[Oe]<=40959}):void 0;return[O,Y,ge]},Gr=function(){function T(p,D,O,Y){this.codePoints=p,this.required=D===Xt,this.start=O,this.end=Y}return T.prototype.slice=function(){return u.apply(void 0,this.codePoints.slice(this.start,this.end))},T}(),Hr=function(T,p){var D=R(T),O=Wr(D,p),Y=O[0],ne=O[1],ge=O[2],Re=D.length,Oe=0,ze=0;return{next:function(){if(ze>=Re)return{done:!0,value:null};for(var Ze=gt;ze<Re&&(Ze=vr(D,ne,Y,++ze,ge))===gt;);if(Ze!==gt||ze===Re){var At=new Gr(D,Ze,Oe,ze);return Oe=ze,{value:At,done:!1}}return{done:!0,value:null}}}},Fr=1<<0,dr=1<<1,Cr=1<<2,tn=1<<3,Br=10,An=47,Sr=92,de=9,he=32,we=34,Qe=61,lt=35,ft=36,j=37,v=39,C=40,K=41,re=95,W=45,Ie=33,rt=60,vt=62,Ct=64,ot=91,Pt=93,Ot=61,Ht=123,er=63,wr=125,sr=124,hr=126,Zt=128,Qr=65533,Ir=42,fr=43,Kr=44,$r=58,Zr=59,jr=46,Or=0,Vr=8,Yr=11,Jr=14,sn=31,rn=127,Dr=-1,ir=48,rr=97,mr=101,Ar=102,zr=117,br=122,Rn=65,qr=69,Bn=70,Dn=85,Pn=90,Xr=function(T){return T>=ir&&T<=57},Zi=function(T){return T>=55296&&T<=57343},jn=function(T){return Xr(T)||T>=Rn&&T<=Bn||T>=rr&&T<=Ar},qi=function(T){return T>=rr&&T<=br},ea=function(T){return T>=Rn&&T<=Pn},oi=function(T){return qi(T)||ea(T)},wi=function(T){return T>=Zt},Sn=function(T){return T===Br||T===de||T===he},Tn=function(T){return oi(T)||wi(T)||T===re},ta=function(T){return Tn(T)||Xr(T)||T===W},Ci=function(T){return T>=Or&&T<=Vr||T===Yr||T>=Jr&&T<=sn||T===rn},mn=function(T,p){return T!==Sr?!1:p!==Br},Mn=function(T,p,D){return T===W?Tn(p)||mn(p,D):Tn(T)?!0:!!(T===Sr&&mn(T,p))},qn=function(T,p,D){return T===fr||T===W?Xr(p)?!0:p===jr&&Xr(D):T===jr?Xr(p):Xr(T)},ra=function(T){var p=0,D=1;(T[p]===fr||T[p]===W)&&(T[p]===W&&(D=-1),p++);for(var O=[];Xr(T[p]);)O.push(T[p++]);var Y=O.length?parseInt(u.apply(void 0,O),10):0;T[p]===jr&&p++;for(var ne=[];Xr(T[p]);)ne.push(T[p++]);var ge=ne.length,Re=ge?parseInt(u.apply(void 0,ne),10):0;(T[p]===qr||T[p]===mr)&&p++;var Oe=1;(T[p]===fr||T[p]===W)&&(T[p]===W&&(Oe=-1),p++);for(var ze=[];Xr(T[p]);)ze.push(T[p++]);var Ze=ze.length?parseInt(u.apply(void 0,ze),10):0;return D*(Y+Re*Math.pow(10,-ge))*Math.pow(10,Oe*Ze)},na={type:2},Wn={type:3},Gn={type:4},ia={type:13},Ti={type:8},Fa={type:21},xi={type:9},Bi={type:10},Si={type:11},Ii={type:12},Er={type:14},yr={type:23},on={type:1},vn={type:25},ei={type:24},aa={type:26},Oi={type:27},Na={type:28},Pa={type:29},Wo={type:31},sa={type:32},_s=function(){function T(){this._value=[]}return T.prototype.write=function(p){this._value=this._value.concat(R(p))},T.prototype.read=function(){for(var p=[],D=this.consumeToken();D!==sa;)p.push(D),D=this.consumeToken();return p},T.prototype.consumeToken=function(){var p=this.consumeCodePoint();switch(p){case we:return this.consumeStringToken(we);case lt:var D=this.peekCodePoint(0),O=this.peekCodePoint(1),Y=this.peekCodePoint(2);if(ta(D)||mn(O,Y)){var ne=Mn(D,O,Y)?dr:Fr,ge=this.consumeName();return{type:5,value:ge,flags:ne}}break;case ft:if(this.peekCodePoint(0)===Qe)return this.consumeCodePoint(),ia;break;case v:return this.consumeStringToken(v);case C:return na;case K:return Wn;case Ir:if(this.peekCodePoint(0)===Qe)return this.consumeCodePoint(),Er;break;case fr:if(qn(p,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(p),this.consumeNumericToken();break;case Kr:return Gn;case W:var Re=p,Oe=this.peekCodePoint(0),ze=this.peekCodePoint(1);if(qn(Re,Oe,ze))return this.reconsumeCodePoint(p),this.consumeNumericToken();if(Mn(Re,Oe,ze))return this.reconsumeCodePoint(p),this.consumeIdentLikeToken();if(Oe===W&&ze===vt)return this.consumeCodePoint(),this.consumeCodePoint(),ei;break;case jr:if(qn(p,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(p),this.consumeNumericToken();break;case An:if(this.peekCodePoint(0)===Ir)for(this.consumeCodePoint();;){var Ze=this.consumeCodePoint();if(Ze===Ir&&(Ze=this.consumeCodePoint(),Ze===An))return this.consumeToken();if(Ze===Dr)return this.consumeToken()}break;case $r:return aa;case Zr:return Oi;case rt:if(this.peekCodePoint(0)===Ie&&this.peekCodePoint(1)===W&&this.peekCodePoint(2)===W)return this.consumeCodePoint(),this.consumeCodePoint(),vn;break;case Ct:var At=this.peekCodePoint(0),ct=this.peekCodePoint(1),Wt=this.peekCodePoint(2);if(Mn(At,ct,Wt)){var ge=this.consumeName();return{type:7,value:ge}}break;case ot:return Na;case Sr:if(mn(p,this.peekCodePoint(0)))return this.reconsumeCodePoint(p),this.consumeIdentLikeToken();break;case Pt:return Pa;case Ot:if(this.peekCodePoint(0)===Qe)return this.consumeCodePoint(),Ti;break;case Ht:return Si;case wr:return Ii;case zr:case Dn:var It=this.peekCodePoint(0),Nt=this.peekCodePoint(1);return It===fr&&(jn(Nt)||Nt===er)&&(this.consumeCodePoint(),this.consumeUnicodeRangeToken()),this.reconsumeCodePoint(p),this.consumeIdentLikeToken();case sr:if(this.peekCodePoint(0)===Qe)return this.consumeCodePoint(),xi;if(this.peekCodePoint(0)===sr)return this.consumeCodePoint(),Fa;break;case hr:if(this.peekCodePoint(0)===Qe)return this.consumeCodePoint(),Bi;break;case Dr:return sa}return Sn(p)?(this.consumeWhiteSpace(),Wo):Xr(p)?(this.reconsumeCodePoint(p),this.consumeNumericToken()):Tn(p)?(this.reconsumeCodePoint(p),this.consumeIdentLikeToken()):{type:6,value:u(p)}},T.prototype.consumeCodePoint=function(){var p=this._value.shift();return typeof p=="undefined"?-1:p},T.prototype.reconsumeCodePoint=function(p){this._value.unshift(p)},T.prototype.peekCodePoint=function(p){return p>=this._value.length?-1:this._value[p]},T.prototype.consumeUnicodeRangeToken=function(){for(var p=[],D=this.consumeCodePoint();jn(D)&&p.length<6;)p.push(D),D=this.consumeCodePoint();for(var O=!1;D===er&&p.length<6;)p.push(D),D=this.consumeCodePoint(),O=!0;if(O){var Y=parseInt(u.apply(void 0,p.map(function(Oe){return Oe===er?ir:Oe})),16),ne=parseInt(u.apply(void 0,p.map(function(Oe){return Oe===er?Bn:Oe})),16);return{type:30,start:Y,end:ne}}var ge=parseInt(u.apply(void 0,p),16);if(this.peekCodePoint(0)===W&&jn(this.peekCodePoint(1))){this.consumeCodePoint(),D=this.consumeCodePoint();for(var Re=[];jn(D)&&Re.length<6;)Re.push(D),D=this.consumeCodePoint();var ne=parseInt(u.apply(void 0,Re),16);return{type:30,start:ge,end:ne}}else return{type:30,start:ge,end:ge}},T.prototype.consumeIdentLikeToken=function(){var p=this.consumeName();return p.toLowerCase()==="url"&&this.peekCodePoint(0)===C?(this.consumeCodePoint(),this.consumeUrlToken()):this.peekCodePoint(0)===C?(this.consumeCodePoint(),{type:19,value:p}):{type:20,value:p}},T.prototype.consumeUrlToken=function(){var p=[];if(this.consumeWhiteSpace(),this.peekCodePoint(0)===Dr)return{type:22,value:""};var D=this.peekCodePoint(0);if(D===v||D===we){var O=this.consumeStringToken(this.consumeCodePoint());return O.type===0&&(this.consumeWhiteSpace(),this.peekCodePoint(0)===Dr||this.peekCodePoint(0)===K)?(this.consumeCodePoint(),{type:22,value:O.value}):(this.consumeBadUrlRemnants(),yr)}for(;;){var Y=this.consumeCodePoint();if(Y===Dr||Y===K)return{type:22,value:u.apply(void 0,p)};if(Sn(Y))return this.consumeWhiteSpace(),this.peekCodePoint(0)===Dr||this.peekCodePoint(0)===K?(this.consumeCodePoint(),{type:22,value:u.apply(void 0,p)}):(this.consumeBadUrlRemnants(),yr);if(Y===we||Y===v||Y===C||Ci(Y))return this.consumeBadUrlRemnants(),yr;if(Y===Sr)if(mn(Y,this.peekCodePoint(0)))p.push(this.consumeEscapedCodePoint());else return this.consumeBadUrlRemnants(),yr;else p.push(Y)}},T.prototype.consumeWhiteSpace=function(){for(;Sn(this.peekCodePoint(0));)this.consumeCodePoint()},T.prototype.consumeBadUrlRemnants=function(){for(;;){var p=this.consumeCodePoint();if(p===K||p===Dr)return;mn(p,this.peekCodePoint(0))&&this.consumeEscapedCodePoint()}},T.prototype.consumeStringSlice=function(p){for(var D=5e4,O="";p>0;){var Y=Math.min(D,p);O+=u.apply(void 0,this._value.splice(0,Y)),p-=Y}return this._value.shift(),O},T.prototype.consumeStringToken=function(p){var D="",O=0;do{var Y=this._value[O];if(Y===Dr||Y===void 0||Y===p)return D+=this.consumeStringSlice(O),{type:0,value:D};if(Y===Br)return this._value.splice(0,O),on;if(Y===Sr){var ne=this._value[O+1];ne!==Dr&&ne!==void 0&&(ne===Br?(D+=this.consumeStringSlice(O),O=-1,this._value.shift()):mn(Y,ne)&&(D+=this.consumeStringSlice(O),D+=u(this.consumeEscapedCodePoint()),O=-1))}O++}while(!0)},T.prototype.consumeNumber=function(){var p=[],D=Cr,O=this.peekCodePoint(0);for((O===fr||O===W)&&p.push(this.consumeCodePoint());Xr(this.peekCodePoint(0));)p.push(this.consumeCodePoint());O=this.peekCodePoint(0);var Y=this.peekCodePoint(1);if(O===jr&&Xr(Y))for(p.push(this.consumeCodePoint(),this.consumeCodePoint()),D=tn;Xr(this.peekCodePoint(0));)p.push(this.consumeCodePoint());O=this.peekCodePoint(0),Y=this.peekCodePoint(1);var ne=this.peekCodePoint(2);if((O===qr||O===mr)&&((Y===fr||Y===W)&&Xr(ne)||Xr(Y)))for(p.push(this.consumeCodePoint(),this.consumeCodePoint()),D=tn;Xr(this.peekCodePoint(0));)p.push(this.consumeCodePoint());return[ra(p),D]},T.prototype.consumeNumericToken=function(){var p=this.consumeNumber(),D=p[0],O=p[1],Y=this.peekCodePoint(0),ne=this.peekCodePoint(1),ge=this.peekCodePoint(2);if(Mn(Y,ne,ge)){var Re=this.consumeName();return{type:15,number:D,flags:O,unit:Re}}return Y===j?(this.consumeCodePoint(),{type:16,number:D,flags:O}):{type:17,number:D,flags:O}},T.prototype.consumeEscapedCodePoint=function(){var p=this.consumeCodePoint();if(jn(p)){for(var D=u(p);jn(this.peekCodePoint(0))&&D.length<6;)D+=u(this.consumeCodePoint());Sn(this.peekCodePoint(0))&&this.consumeCodePoint();var O=parseInt(D,16);return O===0||Zi(O)||O>1114111?Qr:O}return p===Dr?Qr:p},T.prototype.consumeName=function(){for(var p="";;){var D=this.consumeCodePoint();if(ta(D))p+=u(D);else if(mn(D,this.peekCodePoint(0)))p+=u(this.consumeEscapedCodePoint());else return this.reconsumeCodePoint(D),p}},T}(),ws=function(){function T(p){this._tokens=p}return T.create=function(p){var D=new _s;return D.write(p),new T(D.read())},T.parseValue=function(p){return T.create(p).parseComponentValue()},T.parseValues=function(p){return T.create(p).parseComponentValues()},T.prototype.parseComponentValue=function(){for(var p=this.consumeToken();p.type===31;)p=this.consumeToken();if(p.type===32)throw new SyntaxError("Error parsing CSS component value, unexpected EOF");this.reconsumeToken(p);var D=this.consumeComponentValue();do p=this.consumeToken();while(p.type===31);if(p.type===32)return D;throw new SyntaxError("Error parsing CSS component value, multiple values found when expecting only one")},T.prototype.parseComponentValues=function(){for(var p=[];;){var D=this.consumeComponentValue();if(D.type===32)return p;p.push(D),p.push()}},T.prototype.consumeComponentValue=function(){var p=this.consumeToken();switch(p.type){case 11:case 28:case 2:return this.consumeSimpleBlock(p.type);case 19:return this.consumeFunction(p)}return p},T.prototype.consumeSimpleBlock=function(p){for(var D={type:p,values:[]},O=this.consumeToken();;){if(O.type===32||Vo(O,p))return D;this.reconsumeToken(O),D.values.push(this.consumeComponentValue()),O=this.consumeToken()}},T.prototype.consumeFunction=function(p){for(var D={name:p.value,values:[],type:18};;){var O=this.consumeToken();if(O.type===32||O.type===3)return D;this.reconsumeToken(O),D.values.push(this.consumeComponentValue())}},T.prototype.consumeToken=function(){var p=this._tokens.shift();return typeof p=="undefined"?sa:p},T.prototype.reconsumeToken=function(p){this._tokens.unshift(p)},T}(),Ri=function(T){return T.type===15},li=function(T){return T.type===17},Nr=function(T){return T.type===20},Go=function(T){return T.type===0},Di=function(T,p){return Nr(T)&&T.value===p},Cs=function(T){return T.type!==31},Vn=function(T){return T.type!==31&&T.type!==4},In=function(T){var p=[],D=[];return T.forEach(function(O){if(O.type===4){if(D.length===0)throw new Error("Error parsing function args, zero tokens for arg");p.push(D),D=[];return}O.type!==31&&D.push(O)}),D.length&&p.push(D),p},Vo=function(T,p){return p===11&&T.type===12||p===28&&T.type===29?!0:p===2&&T.type===3},kn=function(T){return T.type===17||T.type===15},ln=function(T){return T.type===16||kn(T)},Ts=function(T){return T.length>1?[T[0],T[1]]:[T[0]]},hn={type:17,number:0,flags:Cr},Ma={type:16,number:50,flags:Cr},Ln={type:16,number:100,flags:Cr},Hn=function(T,p,D){var O=T[0],Y=T[1];return[Pr(O,p),Pr(typeof Y!="undefined"?Y:O,D)]},Pr=function(T,p){if(T.type===16)return T.number/100*p;if(Ri(T))switch(T.unit){case"rem":case"em":return 16*T.number;case"px":default:return T.number}return T.number},zn="deg",Ai="grad",ka="rad",oa="turn",ui={name:"angle",parse:function(T,p){if(p.type===15)switch(p.unit){case zn:return Math.PI*p.number/180;case Ai:return Math.PI/200*p.number;case ka:return p.number;case oa:return Math.PI*2*p.number}throw new Error("Unsupported angle type")}},Ha=function(T){return T.type===15&&(T.unit===zn||T.unit===Ai||T.unit===ka||T.unit===oa)},xs=function(T){var p=T.filter(Nr).map(function(D){return D.value}).join(" ");switch(p){case"to bottom right":case"to right bottom":case"left top":case"top left":return[hn,hn];case"to top":case"bottom":return bn(0);case"to bottom left":case"to left bottom":case"right top":case"top right":return[hn,Ln];case"to right":case"left":return bn(90);case"to top left":case"to left top":case"right bottom":case"bottom right":return[Ln,Ln];case"to bottom":case"top":return bn(180);case"to top right":case"to right top":case"left bottom":case"bottom left":return[Ln,hn];case"to left":case"right":return bn(270)}return 0},bn=function(T){return Math.PI*T/180},Xn={name:"color",parse:function(T,p){if(p.type===18){var D=zo[p.name];if(typeof D=="undefined")throw new Error('Attempting to parse an unsupported color function "'+p.name+'"');return D(T,p.values)}if(p.type===5){if(p.value.length===3){var O=p.value.substring(0,1),Y=p.value.substring(1,2),ne=p.value.substring(2,3);return Jn(parseInt(O+O,16),parseInt(Y+Y,16),parseInt(ne+ne,16),1)}if(p.value.length===4){var O=p.value.substring(0,1),Y=p.value.substring(1,2),ne=p.value.substring(2,3),ge=p.value.substring(3,4);return Jn(parseInt(O+O,16),parseInt(Y+Y,16),parseInt(ne+ne,16),parseInt(ge+ge,16)/255)}if(p.value.length===6){var O=p.value.substring(0,2),Y=p.value.substring(2,4),ne=p.value.substring(4,6);return Jn(parseInt(O,16),parseInt(Y,16),parseInt(ne,16),1)}if(p.value.length===8){var O=p.value.substring(0,2),Y=p.value.substring(2,4),ne=p.value.substring(4,6),ge=p.value.substring(6,8);return Jn(parseInt(O,16),parseInt(Y,16),parseInt(ne,16),parseInt(ge,16)/255)}}if(p.type===20){var Re=Qn[p.value.toUpperCase()];if(typeof Re!="undefined")return Re}return Qn.TRANSPARENT}},Yn=function(T){return(255&T)===0},un=function(T){var p=255&T,D=255&T>>8,O=255&T>>16,Y=255&T>>24;return p<255?"rgba("+Y+","+O+","+D+","+p/255+")":"rgb("+Y+","+O+","+D+")"},Jn=function(T,p,D,O){return(T<<24|p<<16|D<<8|Math.round(O*255)<<0)>>>0},Bs=function(T,p){if(T.type===17)return T.number;if(T.type===16){var D=p===3?1:255;return p===3?T.number/100*D:Math.round(T.number/100*D)}return 0},Qa=function(T,p){var D=p.filter(Vn);if(D.length===3){var O=D.map(Bs),Y=O[0],ne=O[1],ge=O[2];return Jn(Y,ne,ge,1)}if(D.length===4){var Re=D.map(Bs),Y=Re[0],ne=Re[1],ge=Re[2],Oe=Re[3];return Jn(Y,ne,ge,Oe)}return 0};function Ka(T,p,D){return D<0&&(D+=1),D>=1&&(D-=1),D<1/6?(p-T)*D*6+T:D<1/2?p:D<2/3?(p-T)*6*(2/3-D)+T:T}var Ss=function(T,p){var D=p.filter(Vn),O=D[0],Y=D[1],ne=D[2],ge=D[3],Re=(O.type===17?bn(O.number):ui.parse(T,O))/(Math.PI*2),Oe=ln(Y)?Y.number/100:0,ze=ln(ne)?ne.number/100:0,Ze=typeof ge!="undefined"&&ln(ge)?Pr(ge,1):1;if(Oe===0)return Jn(ze*255,ze*255,ze*255,1);var At=ze<=.5?ze*(Oe+1):ze+Oe-ze*Oe,ct=ze*2-At,Wt=Ka(ct,At,Re+1/3),It=Ka(ct,At,Re),Nt=Ka(ct,At,Re-1/3);return Jn(Wt*255,It*255,Nt*255,Ze)},zo={hsl:Ss,hsla:Ss,rgb:Qa,rgba:Qa},Li=function(T,p){return Xn.parse(T,ws.create(p).parseComponentValue())},Qn={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},Xo={name:"background-clip",initialValue:"border-box",prefix:!1,type:1,parse:function(T,p){return p.map(function(D){if(Nr(D))switch(D.value){case"padding-box":return 1;case"content-box":return 2}return 0})}},Yo={name:"background-color",initialValue:"transparent",prefix:!1,type:3,format:"color"},la=function(T,p){var D=Xn.parse(T,p[0]),O=p[1];return O&&ln(O)?{color:D,stop:O}:{color:D,stop:null}},Is=function(T,p){var D=T[0],O=T[T.length-1];D.stop===null&&(D.stop=hn),O.stop===null&&(O.stop=Ln);for(var Y=[],ne=0,ge=0;ge<T.length;ge++){var Re=T[ge].stop;if(Re!==null){var Oe=Pr(Re,p);Oe>ne?Y.push(Oe):Y.push(ne),ne=Oe}else Y.push(null)}for(var ze=null,ge=0;ge<Y.length;ge++){var Ze=Y[ge];if(Ze===null)ze===null&&(ze=ge);else if(ze!==null){for(var At=ge-ze,ct=Y[ze-1],Wt=(Ze-ct)/(At+1),It=1;It<=At;It++)Y[ze+It-1]=Wt*It;ze=null}}return T.map(function(Nt,or){var jt=Nt.color;return{color:jt,stop:Math.max(Math.min(1,Y[or]/p),0)}})},Ui=function(T,p,D){var O=p/2,Y=D/2,ne=Pr(T[0],p)-O,ge=Y-Pr(T[1],D);return(Math.atan2(ge,ne)+Math.PI*2)%(Math.PI*2)},Aa=function(T,p,D){var O=typeof T=="number"?T:Ui(T,p,D),Y=Math.abs(p*Math.sin(O))+Math.abs(D*Math.cos(O)),ne=p/2,ge=D/2,Re=Y/2,Oe=Math.sin(O-Math.PI/2)*Re,ze=Math.cos(O-Math.PI/2)*Re;return[Y,ne-ze,ne+ze,ge-Oe,ge+Oe]},En=function(T,p){return Math.sqrt(T*T+p*p)},Os=function(T,p,D,O,Y){var ne=[[0,0],[0,p],[T,0],[T,p]];return ne.reduce(function(ge,Re){var Oe=Re[0],ze=Re[1],Ze=En(D-Oe,O-ze);return(Y?Ze<ge.optimumDistance:Ze>ge.optimumDistance)?{optimumCorner:Re,optimumDistance:Ze}:ge},{optimumDistance:Y?Infinity:-Infinity,optimumCorner:null}).optimumCorner},Jo=function(T,p,D,O,Y){var ne=0,ge=0;switch(T.size){case 0:T.shape===0?ne=ge=Math.min(Math.abs(p),Math.abs(p-O),Math.abs(D),Math.abs(D-Y)):T.shape===1&&(ne=Math.min(Math.abs(p),Math.abs(p-O)),ge=Math.min(Math.abs(D),Math.abs(D-Y)));break;case 2:if(T.shape===0)ne=ge=Math.min(En(p,D),En(p,D-Y),En(p-O,D),En(p-O,D-Y));else if(T.shape===1){var Re=Math.min(Math.abs(D),Math.abs(D-Y))/Math.min(Math.abs(p),Math.abs(p-O)),Oe=Os(O,Y,p,D,!0),ze=Oe[0],Ze=Oe[1];ne=En(ze-p,(Ze-D)/Re),ge=Re*ne}break;case 1:T.shape===0?ne=ge=Math.max(Math.abs(p),Math.abs(p-O),Math.abs(D),Math.abs(D-Y)):T.shape===1&&(ne=Math.max(Math.abs(p),Math.abs(p-O)),ge=Math.max(Math.abs(D),Math.abs(D-Y)));break;case 3:if(T.shape===0)ne=ge=Math.max(En(p,D),En(p,D-Y),En(p-O,D),En(p-O,D-Y));else if(T.shape===1){var Re=Math.max(Math.abs(D),Math.abs(D-Y))/Math.max(Math.abs(p),Math.abs(p-O)),At=Os(O,Y,p,D,!1),ze=At[0],Ze=At[1];ne=En(ze-p,(Ze-D)/Re),ge=Re*ne}break}return Array.isArray(T.size)&&(ne=Pr(T.size[0],O),ge=T.size.length===2?Pr(T.size[1],Y):ne),[ne,ge]},$o=function(T,p){var D=bn(180),O=[];return In(p).forEach(function(Y,ne){if(ne===0){var ge=Y[0];if(ge.type===20&&ge.value==="to"){D=xs(Y);return}else if(Ha(ge)){D=ui.parse(T,ge);return}}var Re=la(T,Y);O.push(Re)}),{angle:D,stops:O,type:1}},ua=function(T,p){var D=bn(180),O=[];return In(p).forEach(function(Y,ne){if(ne===0){var ge=Y[0];if(ge.type===20&&["top","left","right","bottom"].indexOf(ge.value)!==-1){D=xs(Y);return}else if(Ha(ge)){D=(ui.parse(T,ge)+bn(270))%bn(360);return}}var Re=la(T,Y);O.push(Re)}),{angle:D,stops:O,type:1}},Zo=function(T,p){var D=bn(180),O=[],Y=1,ne=0,ge=3,Re=[];return In(p).forEach(function(Oe,ze){var Ze=Oe[0];if(ze===0){if(Nr(Ze)&&Ze.value==="linear"){Y=1;return}else if(Nr(Ze)&&Ze.value==="radial"){Y=2;return}}if(Ze.type===18){if(Ze.name==="from"){var At=Xn.parse(T,Ze.values[0]);O.push({stop:hn,color:At})}else if(Ze.name==="to"){var At=Xn.parse(T,Ze.values[0]);O.push({stop:Ln,color:At})}else if(Ze.name==="color-stop"){var ct=Ze.values.filter(Vn);if(ct.length===2){var At=Xn.parse(T,ct[1]),Wt=ct[0];li(Wt)&&O.push({stop:{type:16,number:Wt.number*100,flags:Wt.flags},color:At})}}}}),Y===1?{angle:(D+bn(180))%bn(360),stops:O,type:Y}:{size:ge,shape:ne,stops:O,position:Re,type:Y}},Rs="closest-side",Ds="farthest-side",Ls="closest-corner",Us="farthest-corner",Fs="circle",Ns="ellipse",ca="cover",Ps="contain",Ms=function(T,p){var D=0,O=3,Y=[],ne=[];return In(p).forEach(function(ge,Re){var Oe=!0;if(Re===0){var ze=!1;Oe=ge.reduce(function(At,ct){if(ze)if(Nr(ct))switch(ct.value){case"center":return ne.push(Ma),At;case"top":case"left":return ne.push(hn),At;case"right":case"bottom":return ne.push(Ln),At}else(ln(ct)||kn(ct))&&ne.push(ct);else if(Nr(ct))switch(ct.value){case Fs:return D=0,!1;case Ns:return D=1,!1;case"at":return ze=!0,!1;case Rs:return O=0,!1;case ca:case Ds:return O=1,!1;case Ps:case Ls:return O=2,!1;case Us:return O=3,!1}else if(kn(ct)||ln(ct))return Array.isArray(O)||(O=[]),O.push(ct),!1;return At},Oe)}if(Oe){var Ze=la(T,ge);Y.push(Ze)}}),{size:O,shape:D,stops:Y,position:ne,type:2}},Fi=function(T,p){var D=0,O=3,Y=[],ne=[];return In(p).forEach(function(ge,Re){var Oe=!0;if(Re===0?Oe=ge.reduce(function(Ze,At){if(Nr(At))switch(At.value){case"center":return ne.push(Ma),!1;case"top":case"left":return ne.push(hn),!1;case"right":case"bottom":return ne.push(Ln),!1}else if(ln(At)||kn(At))return ne.push(At),!1;return Ze},Oe):Re===1&&(Oe=ge.reduce(function(Ze,At){if(Nr(At))switch(At.value){case Fs:return D=0,!1;case Ns:return D=1,!1;case Ps:case Rs:return O=0,!1;case Ds:return O=1,!1;case Ls:return O=2,!1;case ca:case Us:return O=3,!1}else if(kn(At)||ln(At))return Array.isArray(O)||(O=[]),O.push(At),!1;return Ze},Oe)),Oe){var ze=la(T,ge);Y.push(ze)}}),{size:O,shape:D,stops:Y,position:ne,type:2}},ks=function(T){return T.type===1},qo=function(T){return T.type===2},ja={name:"image",parse:function(T,p){if(p.type===22){var D={url:p.value,type:0};return T.cache.addImage(p.value),D}if(p.type===18){var O=Qs[p.name];if(typeof O=="undefined")throw new Error('Attempting to parse an unsupported image function "'+p.name+'"');return O(T,p.values)}throw new Error("Unsupported image type "+p.type)}};function Hs(T){return!(T.type===20&&T.value==="none")&&(T.type!==18||!!Qs[T.name])}var Qs={"linear-gradient":$o,"-moz-linear-gradient":ua,"-ms-linear-gradient":ua,"-o-linear-gradient":ua,"-webkit-linear-gradient":ua,"radial-gradient":Ms,"-moz-radial-gradient":Fi,"-ms-radial-gradient":Fi,"-o-radial-gradient":Fi,"-webkit-radial-gradient":Fi,"-webkit-gradient":Zo},Ks={name:"background-image",initialValue:"none",type:1,prefix:!1,parse:function(T,p){if(p.length===0)return[];var D=p[0];return D.type===20&&D.value==="none"?[]:p.filter(function(O){return Vn(O)&&Hs(O)}).map(function(O){return ja.parse(T,O)})}},el={name:"background-origin",initialValue:"border-box",prefix:!1,type:1,parse:function(T,p){return p.map(function(D){if(Nr(D))switch(D.value){case"padding-box":return 1;case"content-box":return 2}return 0})}},tl={name:"background-position",initialValue:"0% 0%",type:1,prefix:!1,parse:function(T,p){return In(p).map(function(D){return D.filter(ln)}).map(Ts)}},rl={name:"background-repeat",initialValue:"repeat",prefix:!1,type:1,parse:function(T,p){return In(p).map(function(D){return D.filter(Nr).map(function(O){return O.value}).join(" ")}).map(nl)}},nl=function(T){switch(T){case"no-repeat":return 1;case"repeat-x":case"repeat no-repeat":return 2;case"repeat-y":case"no-repeat repeat":return 3;case"repeat":default:return 0}},_n;(function(T){T.AUTO="auto",T.CONTAIN="contain",T.COVER="cover"})(_n||(_n={}));var il={name:"background-size",initialValue:"0",prefix:!1,type:1,parse:function(T,p){return In(p).map(function(D){return D.filter(js)})}},js=function(T){return Nr(T)||ln(T)},ci=function(T){return{name:"border-"+T+"-color",initialValue:"transparent",prefix:!1,type:3,format:"color"}},al=ci("top"),Ws=ci("right"),Gs=ci("bottom"),sl=ci("left"),Ni=function(T){return{name:"border-radius-"+T,initialValue:"0 0",prefix:!1,type:1,parse:function(p,D){return Ts(D.filter(ln))}}},Vs=Ni("top-left"),ol=Ni("top-right"),ll=Ni("bottom-right"),zs=Ni("bottom-left"),da=function(T){return{name:"border-"+T+"-style",initialValue:"solid",prefix:!1,type:2,parse:function(p,D){switch(D){case"none":return 0;case"dashed":return 2;case"dotted":return 3;case"double":return 4}return 1}}},Wa=da("top"),Xs=da("right"),Ga=da("bottom"),Al=da("left"),di=function(T){return{name:"border-"+T+"-width",initialValue:"0",type:0,prefix:!1,parse:function(p,D){return Ri(D)?D.number:0}}},ul=di("top"),cl=di("right"),dl=di("bottom"),Ys=di("left"),hl={name:"color",initialValue:"transparent",prefix:!1,type:3,format:"color"},fl={name:"direction",initialValue:"ltr",prefix:!1,type:2,parse:function(T,p){switch(p){case"rtl":return 1;case"ltr":default:return 0}}},pl={name:"display",initialValue:"inline-block",prefix:!1,type:1,parse:function(T,p){return p.filter(Nr).reduce(function(D,O){return D|hi(O.value)},0)}},hi=function(T){switch(T){case"block":case"-webkit-box":return 2;case"inline":return 4;case"run-in":return 8;case"flow":return 16;case"flow-root":return 32;case"table":return 64;case"flex":case"-webkit-flex":return 128;case"grid":case"-ms-grid":return 256;case"ruby":return 512;case"subgrid":return 1024;case"list-item":return 2048;case"table-row-group":return 4096;case"table-header-group":return 8192;case"table-footer-group":return 16384;case"table-row":return 32768;case"table-cell":return 65536;case"table-column-group":return 131072;case"table-column":return 262144;case"table-caption":return 524288;case"ruby-base":return 1048576;case"ruby-text":return 2097152;case"ruby-base-container":return 4194304;case"ruby-text-container":return 8388608;case"contents":return 16777216;case"inline-block":return 33554432;case"inline-list-item":return 67108864;case"inline-table":return 134217728;case"inline-flex":return 268435456;case"inline-grid":return 536870912}return 0},fi={name:"float",initialValue:"none",prefix:!1,type:2,parse:function(T,p){switch(p){case"left":return 1;case"right":return 2;case"inline-start":return 3;case"inline-end":return 4}return 0}},Va={name:"letter-spacing",initialValue:"0",prefix:!1,type:0,parse:function(T,p){return p.type===20&&p.value==="normal"?0:p.type===17||p.type===15?p.number:0}},ha;(function(T){T.NORMAL="normal",T.STRICT="strict"})(ha||(ha={}));var Js={name:"line-break",initialValue:"normal",prefix:!1,type:2,parse:function(T,p){switch(p){case"strict":return ha.STRICT;case"normal":default:return ha.NORMAL}}},gl={name:"line-height",initialValue:"normal",prefix:!1,type:4},pi=function(T,p){return Nr(T)&&T.value==="normal"?1.2*p:T.type===17?p*T.number:ln(T)?Pr(T,p):p},ml={name:"list-style-image",initialValue:"none",type:0,prefix:!1,parse:function(T,p){return p.type===20&&p.value==="none"?null:ja.parse(T,p)}},vl={name:"list-style-position",initialValue:"outside",prefix:!1,type:2,parse:function(T,p){switch(p){case"inside":return 0;case"outside":default:return 1}}},gn={name:"list-style-type",initialValue:"none",prefix:!1,type:2,parse:function(T,p){switch(p){case"disc":return 0;case"circle":return 1;case"square":return 2;case"decimal":return 3;case"cjk-decimal":return 4;case"decimal-leading-zero":return 5;case"lower-roman":return 6;case"upper-roman":return 7;case"lower-greek":return 8;case"lower-alpha":return 9;case"upper-alpha":return 10;case"arabic-indic":return 11;case"armenian":return 12;case"bengali":return 13;case"cambodian":return 14;case"cjk-earthly-branch":return 15;case"cjk-heavenly-stem":return 16;case"cjk-ideographic":return 17;case"devanagari":return 18;case"ethiopic-numeric":return 19;case"georgian":return 20;case"gujarati":return 21;case"gurmukhi":return 22;case"hebrew":return 22;case"hiragana":return 23;case"hiragana-iroha":return 24;case"japanese-formal":return 25;case"japanese-informal":return 26;case"kannada":return 27;case"katakana":return 28;case"katakana-iroha":return 29;case"khmer":return 30;case"korean-hangul-formal":return 31;case"korean-hanja-formal":return 32;case"korean-hanja-informal":return 33;case"lao":return 34;case"lower-armenian":return 35;case"malayalam":return 36;case"mongolian":return 37;case"myanmar":return 38;case"oriya":return 39;case"persian":return 40;case"simp-chinese-formal":return 41;case"simp-chinese-informal":return 42;case"tamil":return 43;case"telugu":return 44;case"thai":return 45;case"tibetan":return 46;case"trad-chinese-formal":return 47;case"trad-chinese-informal":return 48;case"upper-armenian":return 49;case"disclosure-open":return 50;case"disclosure-closed":return 51;case"none":default:return-1}}},gi=function(T){return{name:"margin-"+T,initialValue:"0",prefix:!1,type:4}},$s=gi("top"),yl=gi("right"),Zs=gi("bottom"),Pi=gi("left"),qs={name:"overflow",initialValue:"visible",prefix:!1,type:1,parse:function(T,p){return p.filter(Nr).map(function(D){switch(D.value){case"hidden":return 1;case"scroll":return 2;case"clip":return 3;case"auto":return 4;case"visible":default:return 0}})}},bl={name:"overflow-wrap",initialValue:"normal",prefix:!1,type:2,parse:function(T,p){switch(p){case"break-word":return"break-word";case"normal":default:return"normal"}}},fa=function(T){return{name:"padding-"+T,initialValue:"0",prefix:!1,type:3,format:"length-percentage"}},El=fa("top"),za=fa("right"),Mi=fa("bottom"),_l=fa("left"),wl={name:"text-align",initialValue:"left",prefix:!1,type:2,parse:function(T,p){switch(p){case"right":return 2;case"center":case"justify":return 1;case"left":default:return 0}}},Cl={name:"position",initialValue:"static",prefix:!1,type:2,parse:function(T,p){switch(p){case"relative":return 1;case"absolute":return 2;case"fixed":return 3;case"sticky":return 4}return 0}},eo={name:"text-shadow",initialValue:"none",type:1,prefix:!1,parse:function(T,p){return p.length===1&&Di(p[0],"none")?[]:In(p).map(function(D){for(var O={color:Qn.TRANSPARENT,offsetX:hn,offsetY:hn,blur:hn},Y=0,ne=0;ne<D.length;ne++){var ge=D[ne];kn(ge)?(Y===0?O.offsetX=ge:Y===1?O.offsetY=ge:O.blur=ge,Y++):O.color=Xn.parse(T,ge)}return O})}},Tl={name:"text-transform",initialValue:"none",prefix:!1,type:2,parse:function(T,p){switch(p){case"uppercase":return 2;case"lowercase":return 1;case"capitalize":return 3}return 0}},xl={name:"transform",initialValue:"none",prefix:!0,type:0,parse:function(T,p){if(p.type===20&&p.value==="none")return null;if(p.type===18){var D=Sl[p.name];if(typeof D=="undefined")throw new Error('Attempting to parse an unsupported transform function "'+p.name+'"');return D(p.values)}return null}},Xa=function(T){var p=T.filter(function(D){return D.type===17}).map(function(D){return D.number});return p.length===6?p:null},Bl=function(T){var p=T.filter(function(Oe){return Oe.type===17}).map(function(Oe){return Oe.number}),D=p[0],O=p[1];p[2],p[3];var Y=p[4],ne=p[5];p[6],p[7],p[8],p[9],p[10],p[11];var ge=p[12],Re=p[13];return p[14],p[15],p.length===16?[D,O,Y,ne,ge,Re]:null},Sl={matrix:Xa,matrix3d:Bl},ki={type:16,number:50,flags:Cr},Il=[ki,ki],Ol={name:"transform-origin",initialValue:"50% 50%",prefix:!0,type:1,parse:function(T,p){var D=p.filter(ln);return D.length!==2?Il:[D[0],D[1]]}},to={name:"visible",initialValue:"none",prefix:!1,type:2,parse:function(T,p){switch(p){case"hidden":return 1;case"collapse":return 2;case"visible":default:return 0}}},Hi;(function(T){T.NORMAL="normal",T.BREAK_ALL="break-all",T.KEEP_ALL="keep-all"})(Hi||(Hi={}));for(var Rl={name:"word-break",initialValue:"normal",prefix:!1,type:2,parse:function(T,p){switch(p){case"break-all":return Hi.BREAK_ALL;case"keep-all":return Hi.KEEP_ALL;case"normal":default:return Hi.NORMAL}}},jA={name:"z-index",initialValue:"auto",prefix:!1,type:0,parse:function(T,p){if(p.type===20)return{auto:!0,order:0};if(li(p))return{auto:!1,order:p.number};throw new Error("Invalid z-index number parsed")}},ro={name:"time",parse:function(T,p){if(p.type===15)switch(p.unit.toLowerCase()){case"s":return 1e3*p.number;case"ms":return p.number}throw new Error("Unsupported time type")}},Ya={name:"opacity",initialValue:"1",type:0,prefix:!1,parse:function(T,p){return li(p)?p.number:1}},Qi={name:"text-decoration-color",initialValue:"transparent",prefix:!1,type:3,format:"color"},Dl={name:"text-decoration-line",initialValue:"none",prefix:!1,type:1,parse:function(T,p){return p.filter(Nr).map(function(D){switch(D.value){case"underline":return 1;case"overline":return 2;case"line-through":return 3;case"none":return 4}return 0}).filter(function(D){return D!==0})}},Ja={name:"font-family",initialValue:"",prefix:!1,type:1,parse:function(T,p){var D=[],O=[];return p.forEach(function(Y){switch(Y.type){case 20:case 0:D.push(Y.value);break;case 17:D.push(Y.number.toString());break;case 4:O.push(D.join(" ")),D.length=0;break}}),D.length&&O.push(D.join(" ")),O.map(function(Y){return Y.indexOf(" ")===-1?Y:"'"+Y+"'"})}},Ll={name:"font-size",initialValue:"0",prefix:!1,type:3,format:"length"},Ul={name:"font-weight",initialValue:"normal",type:0,prefix:!1,parse:function(T,p){if(li(p))return p.number;if(Nr(p))switch(p.value){case"bold":return 700;case"normal":default:return 400}return 400}},Fl={name:"font-variant",initialValue:"none",type:1,prefix:!1,parse:function(T,p){return p.filter(Nr).map(function(D){return D.value})}},$a={name:"font-style",initialValue:"normal",prefix:!1,type:2,parse:function(T,p){switch(p){case"oblique":return"oblique";case"italic":return"italic";case"normal":default:return"normal"}}},nn=function(T,p){return(T&p)!==0},Nl={name:"content",initialValue:"none",type:1,prefix:!1,parse:function(T,p){if(p.length===0)return[];var D=p[0];return D.type===20&&D.value==="none"?[]:p}},Pl={name:"counter-increment",initialValue:"none",prefix:!0,type:1,parse:function(T,p){if(p.length===0)return null;var D=p[0];if(D.type===20&&D.value==="none")return null;for(var O=[],Y=p.filter(Cs),ne=0;ne<Y.length;ne++){var ge=Y[ne],Re=Y[ne+1];if(ge.type===20){var Oe=Re&&li(Re)?Re.number:1;O.push({counter:ge.value,increment:Oe})}}return O}},Ml={name:"counter-reset",initialValue:"none",prefix:!0,type:1,parse:function(T,p){if(p.length===0)return[];for(var D=[],O=p.filter(Cs),Y=0;Y<O.length;Y++){var ne=O[Y],ge=O[Y+1];if(Nr(ne)&&ne.value!=="none"){var Re=ge&&li(ge)?ge.number:0;D.push({counter:ne.value,reset:Re})}}return D}},kl={name:"duration",initialValue:"0s",prefix:!1,type:1,parse:function(T,p){return p.filter(Ri).map(function(D){return ro.parse(T,D)})}},Hl={name:"quotes",initialValue:"none",prefix:!0,type:1,parse:function(T,p){if(p.length===0)return null;var D=p[0];if(D.type===20&&D.value==="none")return null;var O=[],Y=p.filter(Go);if(Y.length%2!==0)return null;for(var ne=0;ne<Y.length;ne+=2){var ge=Y[ne].value,Re=Y[ne+1].value;O.push({open:ge,close:Re})}return O}},no=function(T,p,D){if(!T)return"";var O=T[Math.min(p,T.length-1)];return O?D?O.open:O.close:""},Ql={name:"box-shadow",initialValue:"none",type:1,prefix:!1,parse:function(T,p){return p.length===1&&Di(p[0],"none")?[]:In(p).map(function(D){for(var O={color:255,offsetX:hn,offsetY:hn,blur:hn,spread:hn,inset:!1},Y=0,ne=0;ne<D.length;ne++){var ge=D[ne];Di(ge,"inset")?O.inset=!0:kn(ge)?(Y===0?O.offsetX=ge:Y===1?O.offsetY=ge:Y===2?O.blur=ge:O.spread=ge,Y++):O.color=Xn.parse(T,ge)}return O})}},Kl={name:"paint-order",initialValue:"normal",prefix:!1,type:1,parse:function(T,p){var D=[0,1,2],O=[];return p.filter(Nr).forEach(function(Y){switch(Y.value){case"stroke":O.push(1);break;case"fill":O.push(0);break;case"markers":O.push(2);break}}),D.forEach(function(Y){O.indexOf(Y)===-1&&O.push(Y)}),O}},pa={name:"-webkit-text-stroke-color",initialValue:"currentcolor",prefix:!1,type:3,format:"color"},jl={name:"-webkit-text-stroke-width",initialValue:"0",type:0,prefix:!1,parse:function(T,p){return Ri(p)?p.number:0}},io=function(){function T(p,D){var O,Y;this.animationDuration=Qt(p,kl,D.animationDuration),this.backgroundClip=Qt(p,Xo,D.backgroundClip),this.backgroundColor=Qt(p,Yo,D.backgroundColor),this.backgroundImage=Qt(p,Ks,D.backgroundImage),this.backgroundOrigin=Qt(p,el,D.backgroundOrigin),this.backgroundPosition=Qt(p,tl,D.backgroundPosition),this.backgroundRepeat=Qt(p,rl,D.backgroundRepeat),this.backgroundSize=Qt(p,il,D.backgroundSize),this.borderTopColor=Qt(p,al,D.borderTopColor),this.borderRightColor=Qt(p,Ws,D.borderRightColor),this.borderBottomColor=Qt(p,Gs,D.borderBottomColor),this.borderLeftColor=Qt(p,sl,D.borderLeftColor),this.borderTopLeftRadius=Qt(p,Vs,D.borderTopLeftRadius),this.borderTopRightRadius=Qt(p,ol,D.borderTopRightRadius),this.borderBottomRightRadius=Qt(p,ll,D.borderBottomRightRadius),this.borderBottomLeftRadius=Qt(p,zs,D.borderBottomLeftRadius),this.borderTopStyle=Qt(p,Wa,D.borderTopStyle),this.borderRightStyle=Qt(p,Xs,D.borderRightStyle),this.borderBottomStyle=Qt(p,Ga,D.borderBottomStyle),this.borderLeftStyle=Qt(p,Al,D.borderLeftStyle),this.borderTopWidth=Qt(p,ul,D.borderTopWidth),this.borderRightWidth=Qt(p,cl,D.borderRightWidth),this.borderBottomWidth=Qt(p,dl,D.borderBottomWidth),this.borderLeftWidth=Qt(p,Ys,D.borderLeftWidth),this.boxShadow=Qt(p,Ql,D.boxShadow),this.color=Qt(p,hl,D.color),this.direction=Qt(p,fl,D.direction),this.display=Qt(p,pl,D.display),this.float=Qt(p,fi,D.cssFloat),this.fontFamily=Qt(p,Ja,D.fontFamily),this.fontSize=Qt(p,Ll,D.fontSize),this.fontStyle=Qt(p,$a,D.fontStyle),this.fontVariant=Qt(p,Fl,D.fontVariant),this.fontWeight=Qt(p,Ul,D.fontWeight),this.letterSpacing=Qt(p,Va,D.letterSpacing),this.lineBreak=Qt(p,Js,D.lineBreak),this.lineHeight=Qt(p,gl,D.lineHeight),this.listStyleImage=Qt(p,ml,D.listStyleImage),this.listStylePosition=Qt(p,vl,D.listStylePosition),this.listStyleType=Qt(p,gn,D.listStyleType),this.marginTop=Qt(p,$s,D.marginTop),this.marginRight=Qt(p,yl,D.marginRight),this.marginBottom=Qt(p,Zs,D.marginBottom),this.marginLeft=Qt(p,Pi,D.marginLeft),this.opacity=Qt(p,Ya,D.opacity);var ne=Qt(p,qs,D.overflow);this.overflowX=ne[0],this.overflowY=ne[ne.length>1?1:0],this.overflowWrap=Qt(p,bl,D.overflowWrap),this.paddingTop=Qt(p,El,D.paddingTop),this.paddingRight=Qt(p,za,D.paddingRight),this.paddingBottom=Qt(p,Mi,D.paddingBottom),this.paddingLeft=Qt(p,_l,D.paddingLeft),this.paintOrder=Qt(p,Kl,D.paintOrder),this.position=Qt(p,Cl,D.position),this.textAlign=Qt(p,wl,D.textAlign),this.textDecorationColor=Qt(p,Qi,(O=D.textDecorationColor)!==null&&O!==void 0?O:D.color),this.textDecorationLine=Qt(p,Dl,(Y=D.textDecorationLine)!==null&&Y!==void 0?Y:D.textDecoration),this.textShadow=Qt(p,eo,D.textShadow),this.textTransform=Qt(p,Tl,D.textTransform),this.transform=Qt(p,xl,D.transform),this.transformOrigin=Qt(p,Ol,D.transformOrigin),this.visibility=Qt(p,to,D.visibility),this.webkitTextStrokeColor=Qt(p,pa,D.webkitTextStrokeColor),this.webkitTextStrokeWidth=Qt(p,jl,D.webkitTextStrokeWidth),this.wordBreak=Qt(p,Rl,D.wordBreak),this.zIndex=Qt(p,jA,D.zIndex)}return T.prototype.isVisible=function(){return this.display>0&&this.opacity>0&&this.visibility===0},T.prototype.isTransparent=function(){return Yn(this.backgroundColor)},T.prototype.isTransformed=function(){return this.transform!==null},T.prototype.isPositioned=function(){return this.position!==0},T.prototype.isPositionedWithZIndex=function(){return this.isPositioned()&&!this.zIndex.auto},T.prototype.isFloating=function(){return this.float!==0},T.prototype.isInlineLevel=function(){return nn(this.display,4)||nn(this.display,33554432)||nn(this.display,268435456)||nn(this.display,536870912)||nn(this.display,67108864)||nn(this.display,134217728)},T}(),ga=function(){function T(p,D){this.content=Qt(p,Nl,D.content),this.quotes=Qt(p,Hl,D.quotes)}return T}(),Za=function(){function T(p,D){this.counterIncrement=Qt(p,Pl,D.counterIncrement),this.counterReset=Qt(p,Ml,D.counterReset)}return T}(),Qt=function(T,p,D){var O=new _s,Y=D!==null&&typeof D!="undefined"?D.toString():p.initialValue;O.write(Y);var ne=new ws(O.read());switch(p.type){case 2:var ge=ne.parseComponentValue();return p.parse(T,Nr(ge)?ge.value:p.initialValue);case 0:return p.parse(T,ne.parseComponentValue());case 1:return p.parse(T,ne.parseComponentValues());case 4:return ne.parseComponentValue();case 3:switch(p.format){case"angle":return ui.parse(T,ne.parseComponentValue());case"color":return Xn.parse(T,ne.parseComponentValue());case"image":return ja.parse(T,ne.parseComponentValue());case"length":var Re=ne.parseComponentValue();return kn(Re)?Re:hn;case"length-percentage":var Oe=ne.parseComponentValue();return ln(Oe)?Oe:hn;case"time":return ro.parse(T,ne.parseComponentValue())}break}},Wl="data-html2canvas-debug",ao=function(T){var p=T.getAttribute(Wl);switch(p){case"all":return 1;case"clone":return 2;case"parse":return 3;case"render":return 4;default:return 0}},qa=function(T,p){var D=ao(T);return D===1||p===D},Un=function(){function T(p,D){if(this.context=p,this.textNodes=[],this.elements=[],this.flags=0,qa(D,3))debugger;this.styles=new io(p,window.getComputedStyle(D,null)),fs(D)&&(this.styles.animationDuration.some(function(O){return O>0})&&(D.style.animationDuration="0s"),this.styles.transform!==null&&(D.style.transform="none")),this.bounds=H(this.context,D),qa(D,4)&&(this.flags|=16)}return T}(),mi="AAAAAAAAAAAAEA4AGBkAAFAaAAACAAAAAAAIABAAGAAwADgACAAQAAgAEAAIABAACAAQAAgAEAAIABAACAAQAAgAEAAIABAAQABIAEQATAAIABAACAAQAAgAEAAIABAAVABcAAgAEAAIABAACAAQAGAAaABwAHgAgACIAI4AlgAIABAAmwCjAKgAsAC2AL4AvQDFAMoA0gBPAVYBWgEIAAgACACMANoAYgFkAWwBdAF8AX0BhQGNAZUBlgGeAaMBlQGWAasBswF8AbsBwwF0AcsBYwHTAQgA2wG/AOMBdAF8AekB8QF0AfkB+wHiAHQBfAEIAAMC5gQIAAsCEgIIAAgAFgIeAggAIgIpAggAMQI5AkACygEIAAgASAJQAlgCYAIIAAgACAAKBQoFCgUTBRMFGQUrBSsFCAAIAAgACAAIAAgACAAIAAgACABdAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABoAmgCrwGvAQgAbgJ2AggAHgEIAAgACADnAXsCCAAIAAgAgwIIAAgACAAIAAgACACKAggAkQKZAggAPADJAAgAoQKkAqwCsgK6AsICCADJAggA0AIIAAgACAAIANYC3gIIAAgACAAIAAgACABAAOYCCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAkASoB+QIEAAgACAA8AEMCCABCBQgACABJBVAFCAAIAAgACAAIAAgACAAIAAgACABTBVoFCAAIAFoFCABfBWUFCAAIAAgACAAIAAgAbQUIAAgACAAIAAgACABzBXsFfQWFBYoFigWKBZEFigWKBYoFmAWfBaYFrgWxBbkFCAAIAAgACAAIAAgACAAIAAgACAAIAMEFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAMgFCADQBQgACAAIAAgACAAIAAgACAAIAAgACAAIAO4CCAAIAAgAiQAIAAgACABAAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAD0AggACAD8AggACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIANYFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAMDvwAIAAgAJAIIAAgACAAIAAgACAAIAAgACwMTAwgACAB9BOsEGwMjAwgAKwMyAwsFYgE3A/MEPwMIAEUDTQNRAwgAWQOsAGEDCAAIAAgACAAIAAgACABpAzQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFIQUoBSwFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABtAwgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABMAEwACAAIAAgACAAIABgACAAIAAgACAC/AAgACAAyAQgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACACAAIAAwAAgACAAIAAgACAAIAAgACAAIAAAARABIAAgACAAIABQASAAIAAgAIABwAEAAjgCIABsAqAC2AL0AigDQAtwC+IJIQqVAZUBWQqVAZUBlQGVAZUBlQGrC5UBlQGVAZUBlQGVAZUBlQGVAXsKlQGVAbAK6wsrDGUMpQzlDJUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAfAKAAuZA64AtwCJALoC6ADwAAgAuACgA/oEpgO6AqsD+AAIAAgAswMIAAgACAAIAIkAuwP5AfsBwwPLAwgACAAIAAgACADRA9kDCAAIAOED6QMIAAgACAAIAAgACADuA/YDCAAIAP4DyQAIAAgABgQIAAgAXQAOBAgACAAIAAgACAAIABMECAAIAAgACAAIAAgACAD8AAQBCAAIAAgAGgQiBCoECAExBAgAEAEIAAgACAAIAAgACAAIAAgACAAIAAgACAA4BAgACABABEYECAAIAAgATAQYAQgAVAQIAAgACAAIAAgACAAIAAgACAAIAFoECAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAOQEIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAB+BAcACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAEABhgSMBAgACAAIAAgAlAQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAwAEAAQABAADAAMAAwADAAQABAAEAAQABAAEAAQABHATAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAdQMIAAgACAAIAAgACAAIAMkACAAIAAgAfQMIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACACFA4kDCAAIAAgACAAIAOcBCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAIcDCAAIAAgACAAIAAgACAAIAAgACAAIAJEDCAAIAAgACADFAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABgBAgAZgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAbAQCBXIECAAIAHkECAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABAAJwEQACjBKoEsgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAC6BMIECAAIAAgACAAIAAgACABmBAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAxwQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAGYECAAIAAgAzgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAigWKBYoFigWKBYoFigWKBd0FXwUIAOIF6gXxBYoF3gT5BQAGCAaKBYoFigWKBYoFigWKBYoFigWKBYoFigXWBIoFigWKBYoFigWKBYoFigWKBYsFEAaKBYoFigWKBYoFigWKBRQGCACKBYoFigWKBQgACAAIANEECAAIABgGigUgBggAJgYIAC4GMwaKBYoF0wQ3Bj4GigWKBYoFigWKBYoFigWKBYoFigWKBYoFigUIAAgACAAIAAgACAAIAAgAigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWLBf///////wQABAAEAAQABAAEAAQABAAEAAQAAwAEAAQAAgAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAQADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAUAAAAFAAUAAAAFAAUAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAEAAQABAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUAAQAAAAUABQAFAAUABQAFAAAAAAAFAAUAAAAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAFAAUAAQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABwAFAAUABQAFAAAABwAHAAcAAAAHAAcABwAFAAEAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAcABwAFAAUAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAAAAQABAAAAAAAAAAAAAAAFAAUABQAFAAAABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAcABwAHAAcAAAAHAAcAAAAAAAUABQAHAAUAAQAHAAEABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABwABAAUABQAFAAUAAAAAAAAAAAAAAAEAAQABAAEAAQABAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABwAFAAUAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUAAQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABQANAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABAAEAAQABAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAEAAQABAAEAAQABAAEAAQABAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAABQAHAAUABQAFAAAAAAAAAAcABQAFAAUABQAFAAQABAAEAAQABAAEAAQABAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUAAAAFAAUABQAFAAUAAAAFAAUABQAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAAAAAAAAAAAAUABQAFAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAUAAAAHAAcABwAFAAUABQAFAAUABQAFAAUABwAHAAcABwAFAAcABwAAAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAUABwAHAAUABQAFAAUAAAAAAAcABwAAAAAABwAHAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAABQAFAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAABwAHAAcABQAFAAAAAAAAAAAABQAFAAAAAAAFAAUABQAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAFAAUABQAFAAUAAAAFAAUABwAAAAcABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAFAAUABwAFAAUABQAFAAAAAAAHAAcAAAAAAAcABwAFAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAcABwAAAAAAAAAHAAcABwAAAAcABwAHAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAABQAHAAcABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAHAAcABwAAAAUABQAFAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAcABQAHAAcABQAHAAcAAAAFAAcABwAAAAcABwAFAAUAAAAAAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAUABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAFAAcABwAFAAUABQAAAAUAAAAHAAcABwAHAAcABwAHAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAHAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAABwAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAUAAAAFAAAAAAAAAAAABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABwAFAAUABQAFAAUAAAAFAAUAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABwAFAAUABQAFAAUABQAAAAUABQAHAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABQAFAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAcABQAFAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAHAAUABQAFAAUABQAFAAUABwAHAAcABwAHAAcABwAHAAUABwAHAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABwAHAAcABwAFAAUABwAHAAcAAAAAAAAAAAAHAAcABQAHAAcABwAHAAcABwAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAcABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAHAAUABQAFAAUABQAFAAUAAAAFAAAABQAAAAAABQAFAAUABQAFAAUABQAFAAcABwAHAAcABwAHAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAUABQAFAAUABQAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABwAFAAcABwAHAAcABwAFAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAUABQAFAAUABwAHAAUABQAHAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAcABQAFAAcABwAHAAUABwAFAAUABQAHAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABwAHAAcABwAHAAUABQAFAAUABQAFAAUABQAHAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAcABQAFAAUABQAFAAUABQAAAAAAAAAAAAUAAAAAAAAAAAAAAAAABQAAAAAABwAFAAUAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUAAAAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAABQAAAAAAAAAFAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAUABQAHAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAHAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAHAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAcABwAFAAUABQAFAAcABwAFAAUABwAHAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAcABwAFAAUABwAHAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAFAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAFAAUABQAAAAAABQAFAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAFAAcABwAAAAAAAAAAAAAABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAFAAcABwAFAAcABwAAAAcABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAFAAUABQAAAAUABQAAAAAAAAAAAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABwAFAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABQAFAAUABQAFAAUABQAFAAUABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAHAAcABQAHAAUABQAAAAAAAAAAAAAAAAAFAAAABwAHAAcABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAHAAcABwAAAAAABwAHAAAAAAAHAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAAAAAAFAAUABQAFAAUABQAFAAAAAAAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAUABQAFAAUABwAHAAUABQAFAAcABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAcABQAFAAUABQAFAAUABwAFAAcABwAFAAcABQAFAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAcABQAFAAUABQAAAAAABwAHAAcABwAFAAUABwAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAHAAUABQAFAAUABQAFAAUABQAHAAcABQAHAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAFAAcABwAFAAUABQAFAAUABQAHAAUAAAAAAAAAAAAAAAAAAAAAAAcABwAFAAUABQAFAAcABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAUABQAFAAUABQAHAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAAAAAAFAAUABwAHAAcABwAFAAAAAAAAAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABwAHAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAcABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAHAAUABQAFAAUABQAFAAUABwAFAAUABwAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUAAAAAAAAABQAAAAUABQAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAHAAcAAAAFAAUAAAAHAAcABQAHAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAAAAAAAAAAAAAAAAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAUABQAFAAAAAAAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAABQAFAAUABQAFAAUABQAAAAUABQAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAFAAUABQAFAAUADgAOAA4ADgAOAA4ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAAAAAAAAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAMAAwADAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkAAAAAAAAAAAAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAAAAAAAAAAAAsADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwACwAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAADgAOAA4AAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAAAA4ADgAOAA4ADgAOAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAA4AAAAOAAAAAAAAAAAAAAAAAA4AAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAADgAAAAAAAAAAAA4AAAAOAAAAAAAAAAAADgAOAA4AAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4AAAAAAA4ADgAOAA4ADgAOAA4ADgAOAAAADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4AAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAOAA4ADgAOAA4ADgAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAAAAAAA=",so="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Ki=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),ma=0;ma<so.length;ma++)Ki[so.charCodeAt(ma)]=ma;for(var Gl=function(T){var p=T.length*.75,D=T.length,O,Y=0,ne,ge,Re,Oe;T[T.length-1]==="="&&(p--,T[T.length-2]==="="&&p--);var ze=typeof ArrayBuffer!="undefined"&&typeof Uint8Array!="undefined"&&typeof Uint8Array.prototype.slice!="undefined"?new ArrayBuffer(p):new Array(p),Ze=Array.isArray(ze)?ze:new Uint8Array(ze);for(O=0;O<D;O+=4)ne=Ki[T.charCodeAt(O)],ge=Ki[T.charCodeAt(O+1)],Re=Ki[T.charCodeAt(O+2)],Oe=Ki[T.charCodeAt(O+3)],Ze[Y++]=ne<<2|ge>>4,Ze[Y++]=(ge&15)<<4|Re>>2,Ze[Y++]=(Re&3)<<6|Oe&63;return ze},es=function(T){for(var p=T.length,D=[],O=0;O<p;O+=2)D.push(T[O+1]<<8|T[O]);return D},Vl=function(T){for(var p=T.length,D=[],O=0;O<p;O+=4)D.push(T[O+3]<<24|T[O+2]<<16|T[O+1]<<8|T[O]);return D},ti=5,ts=6+5,rs=2,zl=ts-ti,oo=65536>>ti,Xl=1<<ti,va=Xl-1,Yl=1024>>ti,Jl=oo+Yl,$l=Jl,Zl=2048>>6,lo=$l+Zl,ql=65536>>ts,eA=1<<zl,tA=eA-1,Ao=function(T,p,D){return T.slice?T.slice(p,D):new Uint16Array(Array.prototype.slice.call(T,p,D))},rA=function(T,p,D){return T.slice?T.slice(p,D):new Uint32Array(Array.prototype.slice.call(T,p,D))},nA=function(T,p){var D=Gl(T),O=Array.isArray(D)?Vl(D):new Uint32Array(D),Y=Array.isArray(D)?es(D):new Uint16Array(D),ne=24,ge=Ao(Y,ne/2,O[4]/2),Re=O[5]===2?Ao(Y,(ne+O[4])/2):rA(O,Math.ceil((ne+O[4])/4));return new ya(O[0],O[1],O[2],O[3],ge,Re)},ya=function(){function T(p,D,O,Y,ne,ge){this.initialValue=p,this.errorValue=D,this.highStart=O,this.highValueIndex=Y,this.index=ne,this.data=ge}return T.prototype.get=function(p){var D;if(p>=0){if(p<55296||p>56319&&p<=65535)return D=this.index[p>>ti],D=(D<<rs)+(p&va),this.data[D];if(p<=65535)return D=this.index[oo+(p-55296>>ti)],D=(D<<rs)+(p&va),this.data[D];if(p<this.highStart)return D=lo-ql+(p>>ts),D=this.index[D],D+=p>>ti&tA,D=this.index[D],D=(D<<rs)+(p&va),this.data[D];if(p<=1114111)return this.data[this.highValueIndex]}return this.errorValue},T}(),ns="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",iA=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),ba=0;ba<ns.length;ba++)iA[ns.charCodeAt(ba)]=ba;var aA=1,is=2,ri=3,uo=4,as=5,sA=7,co=8,ho=9,ss=10,Ea=11,fo=12,po=13,go=14,_a=15,oA=function(T){for(var p=[],D=0,O=T.length;D<O;){var Y=T.charCodeAt(D++);if(Y>=55296&&Y<=56319&&D<O){var ne=T.charCodeAt(D++);(ne&64512)===56320?p.push(((Y&1023)<<10)+(ne&1023)+65536):(p.push(Y),D--)}else p.push(Y)}return p},mo=function(){for(var T=[],p=0;p<arguments.length;p++)T[p]=arguments[p];if(String.fromCodePoint)return String.fromCodePoint.apply(String,T);var D=T.length;if(!D)return"";for(var O=[],Y=-1,ne="";++Y<D;){var ge=T[Y];ge<=65535?O.push(ge):(ge-=65536,O.push((ge>>10)+55296,ge%1024+56320)),(Y+1===D||O.length>16384)&&(ne+=String.fromCharCode.apply(String,O),O.length=0)}return ne},lA=nA(mi),wn="\xD7",vo="\xF7",os=function(T){return lA.get(T)},AA=function(T,p,D){var O=D-2,Y=p[O],ne=p[D-1],ge=p[D];if(ne===is&&ge===ri)return wn;if(ne===is||ne===ri||ne===uo)return vo;if(ge===is||ge===ri||ge===uo)return vo;if(ne===co&&[co,ho,Ea,fo].indexOf(ge)!==-1)return wn;if((ne===Ea||ne===ho)&&(ge===ho||ge===ss))return wn;if((ne===fo||ne===ss)&&ge===ss)return wn;if(ge===po||ge===as)return wn;if(ge===sA)return wn;if(ne===aA)return wn;if(ne===po&&ge===go){for(;Y===as;)Y=p[--O];if(Y===go)return wn}if(ne===_a&&ge===_a){for(var Re=0;Y===_a;)Re++,Y=p[--O];if(Re%2===0)return wn}return vo},uA=function(T){var p=oA(T),D=p.length,O=0,Y=0,ne=p.map(os);return{next:function(){if(O>=D)return{done:!0,value:null};for(var ge=wn;O<D&&(ge=AA(p,ne,++O))===wn;);if(ge!==wn||O===D){var Re=mo.apply(null,p.slice(Y,O));return Y=O,{value:Re,done:!1}}return{done:!0,value:null}}}},cA=function(T){for(var p=uA(T),D=[],O;!(O=p.next()).done;)O.value&&D.push(O.value.slice());return D},dA=function(T){var p=123;if(T.createRange){var D=T.createRange();if(D.getBoundingClientRect){var O=T.createElement("boundtest");O.style.height=p+"px",O.style.display="block",T.body.appendChild(O),D.selectNode(O);var Y=D.getBoundingClientRect(),ne=Math.round(Y.height);if(T.body.removeChild(O),ne===p)return!0}}return!1},hA=function(T){var p=T.createElement("boundtest");p.style.width="50px",p.style.display="block",p.style.fontSize="12px",p.style.letterSpacing="0px",p.style.wordSpacing="0px",T.body.appendChild(p);var D=T.createRange();p.innerHTML=typeof"".repeat=="function"?"👨".repeat(10):"";var O=p.firstChild,Y=R(O.data).map(function(Oe){return u(Oe)}),ne=0,ge={},Re=Y.every(function(Oe,ze){D.setStart(O,ne),D.setEnd(O,ne+Oe.length);var Ze=D.getBoundingClientRect();ne+=Oe.length;var At=Ze.x>ge.x||Ze.y>ge.y;return ge=Ze,ze===0?!0:At});return T.body.removeChild(p),Re},fA=function(){return typeof new Image().crossOrigin!="undefined"},pA=function(){return typeof new XMLHttpRequest().responseType=="string"},yo=function(T){var p=new Image,D=T.createElement("canvas"),O=D.getContext("2d");if(!O)return!1;p.src="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg'></svg>";try{O.drawImage(p,0,0),D.toDataURL()}catch(Y){return!1}return!0},ji=function(T){return T[0]===0&&T[1]===255&&T[2]===0&&T[3]===255},wa=function(T){var p=T.createElement("canvas"),D=100;p.width=D,p.height=D;var O=p.getContext("2d");if(!O)return Promise.reject(!1);O.fillStyle="rgb(0, 255, 0)",O.fillRect(0,0,D,D);var Y=new Image,ne=p.toDataURL();Y.src=ne;var ge=ls(D,D,0,0,Y);return O.fillStyle="red",O.fillRect(0,0,D,D),Ca(ge).then(function(Re){O.drawImage(Re,0,0);var Oe=O.getImageData(0,0,D,D).data;O.fillStyle="red",O.fillRect(0,0,D,D);var ze=T.createElement("div");return ze.style.backgroundImage="url("+ne+")",ze.style.height=D+"px",ji(Oe)?Ca(ls(D,D,0,0,ze)):Promise.reject(!1)}).then(function(Re){return O.drawImage(Re,0,0),ji(O.getImageData(0,0,D,D).data)}).catch(function(){return!1})},ls=function(T,p,D,O,Y){var ne="http://www.w3.org/2000/svg",ge=document.createElementNS(ne,"svg"),Re=document.createElementNS(ne,"foreignObject");return ge.setAttributeNS(null,"width",T.toString()),ge.setAttributeNS(null,"height",p.toString()),Re.setAttributeNS(null,"width","100%"),Re.setAttributeNS(null,"height","100%"),Re.setAttributeNS(null,"x",D.toString()),Re.setAttributeNS(null,"y",O.toString()),Re.setAttributeNS(null,"externalResourcesRequired","true"),ge.appendChild(Re),Re.appendChild(Y),ge},Ca=function(T){return new Promise(function(p,D){var O=new Image;O.onload=function(){return p(O)},O.onerror=D,O.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(new XMLSerializer().serializeToString(T))})},cn={get SUPPORT_RANGE_BOUNDS(){var T=dA(document);return Object.defineProperty(cn,"SUPPORT_RANGE_BOUNDS",{value:T}),T},get SUPPORT_WORD_BREAKING(){var T=cn.SUPPORT_RANGE_BOUNDS&&hA(document);return Object.defineProperty(cn,"SUPPORT_WORD_BREAKING",{value:T}),T},get SUPPORT_SVG_DRAWING(){var T=yo(document);return Object.defineProperty(cn,"SUPPORT_SVG_DRAWING",{value:T}),T},get SUPPORT_FOREIGNOBJECT_DRAWING(){var T=typeof Array.from=="function"&&typeof window.fetch=="function"?wa(document):Promise.resolve(!1);return Object.defineProperty(cn,"SUPPORT_FOREIGNOBJECT_DRAWING",{value:T}),T},get SUPPORT_CORS_IMAGES(){var T=fA();return Object.defineProperty(cn,"SUPPORT_CORS_IMAGES",{value:T}),T},get SUPPORT_RESPONSE_TYPE(){var T=pA();return Object.defineProperty(cn,"SUPPORT_RESPONSE_TYPE",{value:T}),T},get SUPPORT_CORS_XHR(){var T="withCredentials"in new XMLHttpRequest;return Object.defineProperty(cn,"SUPPORT_CORS_XHR",{value:T}),T},get SUPPORT_NATIVE_TEXT_SEGMENTATION(){var T=!!(typeof Intl!="undefined"&&Intl.Segmenter);return Object.defineProperty(cn,"SUPPORT_NATIVE_TEXT_SEGMENTATION",{value:T}),T}},Wi=function(){function T(p,D){this.text=p,this.bounds=D}return T}(),gA=function(T,p,D,O){var Y=As(p,D),ne=[],ge=0;return Y.forEach(function(Re){if(D.textDecorationLine.length||Re.trim().length>0)if(cn.SUPPORT_RANGE_BOUNDS){var Oe=bo(O,ge,Re.length).getClientRects();if(Oe.length>1){var ze=Gi(Re),Ze=0;ze.forEach(function(ct){ne.push(new Wi(ct,$.fromDOMRectList(T,bo(O,Ze+ge,ct.length).getClientRects()))),Ze+=ct.length})}else ne.push(new Wi(Re,$.fromDOMRectList(T,Oe)))}else{var At=O.splitText(Re.length);ne.push(new Wi(Re,mA(T,O))),O=At}else cn.SUPPORT_RANGE_BOUNDS||(O=O.splitText(Re.length));ge+=Re.length}),ne},mA=function(T,p){var D=p.ownerDocument;if(D){var O=D.createElement("html2canvaswrapper");O.appendChild(p.cloneNode(!0));var Y=p.parentNode;if(Y){Y.replaceChild(O,p);var ne=H(T,O);return O.firstChild&&Y.replaceChild(O.firstChild,O),ne}}return $.EMPTY},bo=function(T,p,D){var O=T.ownerDocument;if(!O)throw new Error("Node has no owner document");var Y=O.createRange();return Y.setStart(T,p),Y.setEnd(T,p+D),Y},Gi=function(T){if(cn.SUPPORT_NATIVE_TEXT_SEGMENTATION){var p=new Intl.Segmenter(void 0,{granularity:"grapheme"});return Array.from(p.segment(T)).map(function(D){return D.segment})}return cA(T)},Eo=function(T,p){if(cn.SUPPORT_NATIVE_TEXT_SEGMENTATION){var D=new Intl.Segmenter(void 0,{granularity:"word"});return Array.from(D.segment(T)).map(function(O){return O.segment})}return vA(T,p)},As=function(T,p){return p.letterSpacing!==0?Gi(T):Eo(T,p)},us=[32,160,4961,65792,65793,4153,4241],vA=function(T,p){for(var D=Hr(T,{lineBreak:p.lineBreak,wordBreak:p.overflowWrap==="break-word"?"break-word":p.wordBreak}),O=[],Y,ne=function(){if(Y.value){var ge=Y.value.slice(),Re=R(ge),Oe="";Re.forEach(function(ze){us.indexOf(ze)===-1?Oe+=u(ze):(Oe.length&&O.push(Oe),O.push(u(ze)),Oe="")}),Oe.length&&O.push(Oe)}};!(Y=D.next()).done;)ne();return O},yA=function(){function T(p,D,O){this.text=bA(D.data,O.textTransform),this.textBounds=gA(p,this.text,O,D)}return T}(),bA=function(T,p){switch(p){case 1:return T.toLowerCase();case 3:return T.replace(EA,_A);case 2:return T.toUpperCase();default:return T}},EA=/(^|\s|:|-|\(|\))([a-z])/g,_A=function(T,p,D){return T.length>0?p+D.toUpperCase():T},cs=function(T){z(p,T);function p(D,O){var Y=T.call(this,D,O)||this;return Y.src=O.currentSrc||O.src,Y.intrinsicWidth=O.naturalWidth,Y.intrinsicHeight=O.naturalHeight,Y.context.cache.addImage(Y.src),Y}return p}(Un),_o=function(T){z(p,T);function p(D,O){var Y=T.call(this,D,O)||this;return Y.canvas=O,Y.intrinsicWidth=O.width,Y.intrinsicHeight=O.height,Y}return p}(Un),wo=function(T){z(p,T);function p(D,O){var Y=T.call(this,D,O)||this,ne=new XMLSerializer,ge=H(D,O);return O.setAttribute("width",ge.width+"px"),O.setAttribute("height",ge.height+"px"),Y.svg="data:image/svg+xml,"+encodeURIComponent(ne.serializeToString(O)),Y.intrinsicWidth=O.width.baseVal.value,Y.intrinsicHeight=O.height.baseVal.value,Y.context.cache.addImage(Y.svg),Y}return p}(Un),Co=function(T){z(p,T);function p(D,O){var Y=T.call(this,D,O)||this;return Y.value=O.value,Y}return p}(Un),ds=function(T){z(p,T);function p(D,O){var Y=T.call(this,D,O)||this;return Y.start=O.start,Y.reversed=typeof O.reversed=="boolean"&&O.reversed===!0,Y}return p}(Un),wA=[{type:15,flags:0,unit:"px",number:3}],CA=[{type:16,flags:0,number:50}],TA=function(T){return T.width>T.height?new $(T.left+(T.width-T.height)/2,T.top,T.height,T.height):T.width<T.height?new $(T.left,T.top+(T.height-T.width)/2,T.width,T.width):T},xA=function(T){var p=T.type===BA?new Array(T.value.length+1).join("\u2022"):T.value;return p.length===0?T.placeholder||"":p},Ta="checkbox",xa="radio",BA="password",To=707406591,Ba=function(T){z(p,T);function p(D,O){var Y=T.call(this,D,O)||this;Y.type=O.type.toLowerCase(),Y.checked=O.checked,Y.value=xA(O),(Y.type===Ta||Y.type===xa)&&(Y.styles.backgroundColor=3739148031,Y.styles.borderTopColor=Y.styles.borderRightColor=Y.styles.borderBottomColor=Y.styles.borderLeftColor=2779096575,Y.styles.borderTopWidth=Y.styles.borderRightWidth=Y.styles.borderBottomWidth=Y.styles.borderLeftWidth=1,Y.styles.borderTopStyle=Y.styles.borderRightStyle=Y.styles.borderBottomStyle=Y.styles.borderLeftStyle=1,Y.styles.backgroundClip=[0],Y.styles.backgroundOrigin=[0],Y.bounds=TA(Y.bounds));switch(Y.type){case Ta:Y.styles.borderTopRightRadius=Y.styles.borderTopLeftRadius=Y.styles.borderBottomRightRadius=Y.styles.borderBottomLeftRadius=wA;break;case xa:Y.styles.borderTopRightRadius=Y.styles.borderTopLeftRadius=Y.styles.borderBottomRightRadius=Y.styles.borderBottomLeftRadius=CA;break}return Y}return p}(Un),hs=function(T){z(p,T);function p(D,O){var Y=T.call(this,D,O)||this,ne=O.options[O.selectedIndex||0];return Y.value=ne&&ne.text||"",Y}return p}(Un),xo=function(T){z(p,T);function p(D,O){var Y=T.call(this,D,O)||this;return Y.value=O.value,Y}return p}(Un),Bo=function(T){z(p,T);function p(D,O){var Y=T.call(this,D,O)||this;Y.src=O.src,Y.width=parseInt(O.width,10)||0,Y.height=parseInt(O.height,10)||0,Y.backgroundColor=Y.styles.backgroundColor;try{if(O.contentWindow&&O.contentWindow.document&&O.contentWindow.document.documentElement){Y.tree=Io(D,O.contentWindow.document.documentElement);var ne=O.contentWindow.document.documentElement?Li(D,getComputedStyle(O.contentWindow.document.documentElement).backgroundColor):Qn.TRANSPARENT,ge=O.contentWindow.document.body?Li(D,getComputedStyle(O.contentWindow.document.body).backgroundColor):Qn.TRANSPARENT;Y.backgroundColor=Yn(ne)?Yn(ge)?Y.styles.backgroundColor:ge:ne}}catch(Re){}return Y}return p}(Un),SA=["OL","UL","MENU"],Vi=function(T,p,D,O){for(var Y=p.firstChild,ne=void 0;Y;Y=ne)if(ne=Y.nextSibling,Oo(Y)&&Y.data.trim().length>0)D.textNodes.push(new yA(T,Y,D.styles));else if(ni(Y))if(pe(Y)&&Y.assignedNodes)Y.assignedNodes().forEach(function(Re){return Vi(T,Re,D,O)});else{var ge=So(T,Y);ge.styles.isVisible()&&(IA(Y,ge,O)?ge.flags|=4:OA(ge.styles)&&(ge.flags|=2),SA.indexOf(Y.tagName)!==-1&&(ge.flags|=8),D.elements.push(ge),Y.slot,Y.shadowRoot?Vi(T,Y.shadowRoot,ge,O):!ae(Y)&&!Do(Y)&&!fe(Y)&&Vi(T,Y,ge,O))}},So=function(T,p){return I(p)?new cs(T,p):ms(p)?new _o(T,p):Do(p)?new wo(T,p):ps(p)?new Co(T,p):Ro(p)?new ds(T,p):RA(p)?new Ba(T,p):fe(p)?new hs(T,p):ae(p)?new xo(T,p):M(p)?new Bo(T,p):new Un(T,p)},Io=function(T,p){var D=So(T,p);return D.flags|=4,Vi(T,p,D,D),D},IA=function(T,p,D){return p.styles.isPositionedWithZIndex()||p.styles.opacity<1||p.styles.isTransformed()||gs(T)&&D.styles.isTransparent()},OA=function(T){return T.isPositioned()||T.isFloating()},Oo=function(T){return T.nodeType===Node.TEXT_NODE},ni=function(T){return T.nodeType===Node.ELEMENT_NODE},fs=function(T){return ni(T)&&typeof T.style!="undefined"&&!Sa(T)},Sa=function(T){return typeof T.className=="object"},ps=function(T){return T.tagName==="LI"},Ro=function(T){return T.tagName==="OL"},RA=function(T){return T.tagName==="INPUT"},DA=function(T){return T.tagName==="HTML"},Do=function(T){return T.tagName==="svg"},gs=function(T){return T.tagName==="BODY"},ms=function(T){return T.tagName==="CANVAS"},y=function(T){return T.tagName==="VIDEO"},I=function(T){return T.tagName==="IMG"},M=function(T){return T.tagName==="IFRAME"},J=function(T){return T.tagName==="STYLE"},se=function(T){return T.tagName==="SCRIPT"},ae=function(T){return T.tagName==="TEXTAREA"},fe=function(T){return T.tagName==="SELECT"},pe=function(T){return T.tagName==="SLOT"},Le=function(T){return T.tagName.indexOf("-")>0},je=function(){function T(){this.counters={}}return T.prototype.getCounterValue=function(p){var D=this.counters[p];return D&&D.length?D[D.length-1]:1},T.prototype.getCounterValues=function(p){var D=this.counters[p];return D||[]},T.prototype.pop=function(p){var D=this;p.forEach(function(O){return D.counters[O].pop()})},T.prototype.parse=function(p){var D=this,O=p.counterIncrement,Y=p.counterReset,ne=!0;O!==null&&O.forEach(function(Re){var Oe=D.counters[Re.counter];Oe&&Re.increment!==0&&(ne=!1,Oe.length||Oe.push(1),Oe[Math.max(0,Oe.length-1)]+=Re.increment)});var ge=[];return ne&&Y.forEach(function(Re){var Oe=D.counters[Re.counter];ge.push(Re.counter),Oe||(Oe=D.counters[Re.counter]=[]),Oe.push(Re.reset)}),ge},T}(),We={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"]},Fe={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"]},Ue={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"]},Ve={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"]},nt=function(T,p,D,O,Y,ne){return T<p||T>D?fn(T,Y,ne.length>0):O.integers.reduce(function(ge,Re,Oe){for(;T>=Re;)T-=Re,ge+=O.values[Oe];return ge},"")+ne},St=function(T,p,D,O){var Y="";do D||T--,Y=O(T)+Y,T/=p;while(T*p>=p);return Y},Tt=function(T,p,D,O,Y){var ne=D-p+1;return(T<0?"-":"")+(St(Math.abs(T),ne,O,function(ge){return u(Math.floor(ge%ne)+p)})+Y)},Rt=function(T,p,D){D===void 0&&(D=". ");var O=p.length;return St(Math.abs(T),O,!1,function(Y){return p[Math.floor(Y%O)]})+D},Ft=1<<0,Yt=1<<1,qt=1<<2,pr=1<<3,lr=function(T,p,D,O,Y,ne){if(T<-9999||T>9999)return fn(T,4,Y.length>0);var ge=Math.abs(T),Re=Y;if(ge===0)return p[0]+Re;for(var Oe=0;ge>0&&Oe<=4;Oe++){var ze=ge%10;ze===0&&nn(ne,Ft)&&Re!==""?Re=p[ze]+Re:ze>1||ze===1&&Oe===0||ze===1&&Oe===1&&nn(ne,Yt)||ze===1&&Oe===1&&nn(ne,qt)&&T>100||ze===1&&Oe>1&&nn(ne,pr)?Re=p[ze]+(Oe>0?D[Oe-1]:"")+Re:ze===1&&Oe>0&&(Re=D[Oe-1]+Re),ge=Math.floor(ge/10)}return(T<0?O:"")+Re},Mr="\u5341\u767E\u5343\u842C",dn="\u62FE\u4F70\u4EDF\u842C",Tr="\u30DE\u30A4\u30CA\u30B9",an="\uB9C8\uC774\uB108\uC2A4",fn=function(T,p,D){var O=D?". ":"",Y=D?"\u3001":"",ne=D?", ":"",ge=D?" ":"";switch(p){case 0:return"\u2022"+ge;case 1:return"\u25E6"+ge;case 2:return"\u25FE"+ge;case 5:var Re=Tt(T,48,57,!0,O);return Re.length<4?"0"+Re:Re;case 4:return Rt(T,"\u3007\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D",Y);case 6:return nt(T,1,3999,We,3,O).toLowerCase();case 7:return nt(T,1,3999,We,3,O);case 8:return Tt(T,945,969,!1,O);case 9:return Tt(T,97,122,!1,O);case 10:return Tt(T,65,90,!1,O);case 11:return Tt(T,1632,1641,!0,O);case 12:case 49:return nt(T,1,9999,Fe,3,O);case 35:return nt(T,1,9999,Fe,3,O).toLowerCase();case 13:return Tt(T,2534,2543,!0,O);case 14:case 30:return Tt(T,6112,6121,!0,O);case 15:return Rt(T,"\u5B50\u4E11\u5BC5\u536F\u8FB0\u5DF3\u5348\u672A\u7533\u9149\u620C\u4EA5",Y);case 16:return Rt(T,"\u7532\u4E59\u4E19\u4E01\u620A\u5DF1\u5E9A\u8F9B\u58EC\u7678",Y);case 17:case 48:return lr(T,"\u96F6\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D",Mr,"\u8CA0",Y,Yt|qt|pr);case 47:return lr(T,"\u96F6\u58F9\u8CB3\u53C3\u8086\u4F0D\u9678\u67D2\u634C\u7396",dn,"\u8CA0",Y,Ft|Yt|qt|pr);case 42:return lr(T,"\u96F6\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D",Mr,"\u8D1F",Y,Yt|qt|pr);case 41:return lr(T,"\u96F6\u58F9\u8D30\u53C1\u8086\u4F0D\u9646\u67D2\u634C\u7396",dn,"\u8D1F",Y,Ft|Yt|qt|pr);case 26:return lr(T,"\u3007\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D","\u5341\u767E\u5343\u4E07",Tr,Y,0);case 25:return lr(T,"\u96F6\u58F1\u5F10\u53C2\u56DB\u4F0D\u516D\u4E03\u516B\u4E5D","\u62FE\u767E\u5343\u4E07",Tr,Y,Ft|Yt|qt);case 31:return lr(T,"\uC601\uC77C\uC774\uC0BC\uC0AC\uC624\uC721\uCE60\uD314\uAD6C","\uC2ED\uBC31\uCC9C\uB9CC",an,ne,Ft|Yt|qt);case 33:return lr(T,"\u96F6\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D","\u5341\u767E\u5343\u842C",an,ne,0);case 32:return lr(T,"\u96F6\u58F9\u8CB3\u53C3\u56DB\u4E94\u516D\u4E03\u516B\u4E5D","\u62FE\u767E\u5343",an,ne,Ft|Yt|qt);case 18:return Tt(T,2406,2415,!0,O);case 20:return nt(T,1,19999,Ve,3,O);case 21:return Tt(T,2790,2799,!0,O);case 22:return Tt(T,2662,2671,!0,O);case 22:return nt(T,1,10999,Ue,3,O);case 23:return Rt(T,"\u3042\u3044\u3046\u3048\u304A\u304B\u304D\u304F\u3051\u3053\u3055\u3057\u3059\u305B\u305D\u305F\u3061\u3064\u3066\u3068\u306A\u306B\u306C\u306D\u306E\u306F\u3072\u3075\u3078\u307B\u307E\u307F\u3080\u3081\u3082\u3084\u3086\u3088\u3089\u308A\u308B\u308C\u308D\u308F\u3090\u3091\u3092\u3093");case 24:return Rt(T,"\u3044\u308D\u306F\u306B\u307B\u3078\u3068\u3061\u308A\u306C\u308B\u3092\u308F\u304B\u3088\u305F\u308C\u305D\u3064\u306D\u306A\u3089\u3080\u3046\u3090\u306E\u304A\u304F\u3084\u307E\u3051\u3075\u3053\u3048\u3066\u3042\u3055\u304D\u3086\u3081\u307F\u3057\u3091\u3072\u3082\u305B\u3059");case 27:return Tt(T,3302,3311,!0,O);case 28:return Rt(T,"\u30A2\u30A4\u30A6\u30A8\u30AA\u30AB\u30AD\u30AF\u30B1\u30B3\u30B5\u30B7\u30B9\u30BB\u30BD\u30BF\u30C1\u30C4\u30C6\u30C8\u30CA\u30CB\u30CC\u30CD\u30CE\u30CF\u30D2\u30D5\u30D8\u30DB\u30DE\u30DF\u30E0\u30E1\u30E2\u30E4\u30E6\u30E8\u30E9\u30EA\u30EB\u30EC\u30ED\u30EF\u30F0\u30F1\u30F2\u30F3",Y);case 29:return Rt(T,"\u30A4\u30ED\u30CF\u30CB\u30DB\u30D8\u30C8\u30C1\u30EA\u30CC\u30EB\u30F2\u30EF\u30AB\u30E8\u30BF\u30EC\u30BD\u30C4\u30CD\u30CA\u30E9\u30E0\u30A6\u30F0\u30CE\u30AA\u30AF\u30E4\u30DE\u30B1\u30D5\u30B3\u30A8\u30C6\u30A2\u30B5\u30AD\u30E6\u30E1\u30DF\u30B7\u30F1\u30D2\u30E2\u30BB\u30B9",Y);case 34:return Tt(T,3792,3801,!0,O);case 37:return Tt(T,6160,6169,!0,O);case 38:return Tt(T,4160,4169,!0,O);case 39:return Tt(T,2918,2927,!0,O);case 40:return Tt(T,1776,1785,!0,O);case 43:return Tt(T,3046,3055,!0,O);case 44:return Tt(T,3174,3183,!0,O);case 45:return Tt(T,3664,3673,!0,O);case 46:return Tt(T,3872,3881,!0,O);case 3:default:return Tt(T,48,57,!0,O)}},yn="data-html2canvas-ignore",ii=function(){function T(p,D,O){if(this.context=p,this.options=O,this.scrolledElements=[],this.referenceElement=D,this.counters=new je,this.quoteDepth=0,!D.ownerDocument)throw new Error("Cloned element does not have an owner document");this.documentElement=this.cloneNode(D.ownerDocument.documentElement,!1)}return T.prototype.toIFrame=function(p,D){var O=this,Y=vi(p,D);if(!Y.contentWindow)return Promise.reject("Unable to find iframe window");var ne=p.defaultView.pageXOffset,ge=p.defaultView.pageYOffset,Re=Y.contentWindow,Oe=Re.document,ze=Lo(Y).then(function(){return V(O,void 0,void 0,function(){var Ze,At;return N(this,function(ct){switch(ct.label){case 0:return this.scrolledElements.forEach(FA),Re&&(Re.scrollTo(D.left,D.top),/(iPad|iPhone|iPod)/g.test(navigator.userAgent)&&(Re.scrollY!==D.top||Re.scrollX!==D.left)&&(this.context.logger.warn("Unable to restore scroll position for cloned document"),this.context.windowBounds=this.context.windowBounds.add(Re.scrollX-D.left,Re.scrollY-D.top,0,0))),Ze=this.options.onclone,At=this.clonedReferenceElement,typeof At=="undefined"?[2,Promise.reject("Error finding the "+this.referenceElement.nodeName+" in the cloned document")]:Oe.fonts&&Oe.fonts.ready?[4,Oe.fonts.ready]:[3,2];case 1:ct.sent(),ct.label=2;case 2:return/(AppleWebKit)/g.test(navigator.userAgent)?[4,LA(Oe)]:[3,4];case 3:ct.sent(),ct.label=4;case 4:return typeof Ze=="function"?[2,Promise.resolve().then(function(){return Ze(Oe,At)}).then(function(){return Y})]:[2,Y]}})})});return Oe.open(),Oe.write(UA(document.doctype)+"<html></html>"),Oa(this.referenceElement.ownerDocument,ne,ge),Oe.replaceChild(Oe.adoptNode(this.documentElement),Oe.documentElement),Oe.close(),ze},T.prototype.createElementClone=function(p){if(qa(p,2))debugger;if(ms(p))return this.createCanvasClone(p);if(y(p))return this.createVideoClone(p);if(J(p))return this.createStyleClone(p);var D=p.cloneNode(!1);return I(D)&&(I(p)&&p.currentSrc&&p.currentSrc!==p.src&&(D.src=p.currentSrc,D.srcset=""),D.loading==="lazy"&&(D.loading="eager")),Le(D)?this.createCustomElementClone(D):D},T.prototype.createCustomElementClone=function(p){var D=document.createElement("html2canvascustomelement");return Ia(p.style,D),D},T.prototype.createStyleClone=function(p){try{var D=p.sheet;if(D&&D.cssRules){var O=[].slice.call(D.cssRules,0).reduce(function(ne,ge){return ge&&typeof ge.cssText=="string"?ne+ge.cssText:ne},""),Y=p.cloneNode(!1);return Y.textContent=O,Y}}catch(ne){if(this.context.logger.error("Unable to access cssRules property",ne),ne.name!=="SecurityError")throw ne}return p.cloneNode(!1)},T.prototype.createCanvasClone=function(p){var D;if(this.options.inlineImages&&p.ownerDocument){var O=p.ownerDocument.createElement("img");try{return O.src=p.toDataURL(),O}catch(ze){this.context.logger.info("Unable to inline canvas contents, canvas is tainted",p)}}var Y=p.cloneNode(!1);try{Y.width=p.width,Y.height=p.height;var ne=p.getContext("2d"),ge=Y.getContext("2d");if(ge)if(!this.options.allowTaint&&ne)ge.putImageData(ne.getImageData(0,0,p.width,p.height),0,0);else{var Re=(D=p.getContext("webgl2"))!==null&&D!==void 0?D:p.getContext("webgl");if(Re){var Oe=Re.getContextAttributes();(Oe==null?void 0:Oe.preserveDrawingBuffer)===!1&&this.context.logger.warn("Unable to clone WebGL context as it has preserveDrawingBuffer=false",p)}ge.drawImage(p,0,0)}return Y}catch(ze){this.context.logger.info("Unable to clone canvas as it is tainted",p)}return Y},T.prototype.createVideoClone=function(p){var D=p.ownerDocument.createElement("canvas");D.width=p.offsetWidth,D.height=p.offsetHeight;var O=D.getContext("2d");try{return O&&(O.drawImage(p,0,0,D.width,D.height),this.options.allowTaint||O.getImageData(0,0,D.width,D.height)),D}catch(ne){this.context.logger.info("Unable to clone video as it is tainted",p)}var Y=p.ownerDocument.createElement("canvas");return Y.width=p.offsetWidth,Y.height=p.offsetHeight,Y},T.prototype.appendChildNode=function(p,D,O){(!ni(D)||!se(D)&&!D.hasAttribute(yn)&&(typeof this.options.ignoreElements!="function"||!this.options.ignoreElements(D)))&&((!this.options.copyStyles||!ni(D)||!J(D))&&p.appendChild(this.cloneNode(D,O)))},T.prototype.cloneChildNodes=function(p,D,O){for(var Y=this,ne=p.shadowRoot?p.shadowRoot.firstChild:p.firstChild;ne;ne=ne.nextSibling)if(ni(ne)&&pe(ne)&&typeof ne.assignedNodes=="function"){var ge=ne.assignedNodes();ge.length&&ge.forEach(function(Re){return Y.appendChildNode(D,Re,O)})}else this.appendChildNode(D,ne,O)},T.prototype.cloneNode=function(p,D){if(Oo(p))return document.createTextNode(p.data);if(!p.ownerDocument)return p.cloneNode(!1);var O=p.ownerDocument.defaultView;if(O&&ni(p)&&(fs(p)||Sa(p))){var Y=this.createElementClone(p);Y.style.transitionProperty="none";var ne=O.getComputedStyle(p),ge=O.getComputedStyle(p,":before"),Re=O.getComputedStyle(p,":after");this.referenceElement===p&&fs(Y)&&(this.clonedReferenceElement=Y),gs(Y)&&PA(Y);var Oe=this.counters.parse(new Za(this.context,ne)),ze=this.resolvePseudoContent(p,Y,ge,Kn.BEFORE);Le(p)&&(D=!0),y(p)||this.cloneChildNodes(p,Y,D),ze&&Y.insertBefore(ze,Y.firstChild);var Ze=this.resolvePseudoContent(p,Y,Re,Kn.AFTER);return Ze&&Y.appendChild(Ze),this.counters.pop(Oe),(ne&&(this.options.copyStyles||Sa(p))&&!M(p)||D)&&Ia(ne,Y),(p.scrollTop!==0||p.scrollLeft!==0)&&this.scrolledElements.push([Y,p.scrollLeft,p.scrollTop]),(ae(p)||fe(p))&&(ae(Y)||fe(Y))&&(Y.value=p.value),Y}return p.cloneNode(!1)},T.prototype.resolvePseudoContent=function(p,D,O,Y){var ne=this;if(!O)return;var ge=O.content,Re=D.ownerDocument;if(!Re||!ge||ge==="none"||ge==="-moz-alt-content"||O.display==="none")return;this.counters.parse(new Za(this.context,O));var Oe=new ga(this.context,O),ze=Re.createElement("html2canvaspseudoelement");Ia(O,ze),Oe.content.forEach(function(At){if(At.type===0)ze.appendChild(Re.createTextNode(At.value));else if(At.type===22){var ct=Re.createElement("img");ct.src=At.value,ct.style.opacity="1",ze.appendChild(ct)}else if(At.type===18){if(At.name==="attr"){var Wt=At.values.filter(Nr);Wt.length&&ze.appendChild(Re.createTextNode(p.getAttribute(Wt[0].value)||""))}else if(At.name==="counter"){var It=At.values.filter(Vn),Nt=It[0],or=It[1];if(Nt&&Nr(Nt)){var jt=ne.counters.getCounterValue(Nt.value),Vt=or&&Nr(or)?gn.parse(ne.context,or.value):3;ze.appendChild(Re.createTextNode(fn(jt,Vt,!1)))}}else if(At.name==="counters"){var xr=At.values.filter(Vn),Nt=xr[0],gr=xr[1],or=xr[2];if(Nt&&Nr(Nt)){var Lr=ne.counters.getCounterValues(Nt.value),Gt=or&&Nr(or)?gn.parse(ne.context,or.value):3,Rr=gr&&gr.type===0?gr.value:"",Ur=Lr.map(function(Cn){return fn(Cn,Gt,!1)}).join(Rr);ze.appendChild(Re.createTextNode(Ur))}}}else if(At.type===20)switch(At.value){case"open-quote":ze.appendChild(Re.createTextNode(no(Oe.quotes,ne.quoteDepth++,!0)));break;case"close-quote":ze.appendChild(Re.createTextNode(no(Oe.quotes,--ne.quoteDepth,!1)));break;default:ze.appendChild(Re.createTextNode(At.value))}}),ze.className=ys+" "+bs;var Ze=Y===Kn.BEFORE?" "+ys:" "+bs;return Sa(D)?D.className.baseValue+=Ze:D.className+=Ze,ze},T.destroy=function(p){return p.parentNode?(p.parentNode.removeChild(p),!0):!1},T}(),Kn;(function(T){T[T.BEFORE=0]="BEFORE",T[T.AFTER=1]="AFTER"})(Kn||(Kn={}));var vi=function(T,p){var D=T.createElement("iframe");return D.className="html2canvas-container",D.style.visibility="hidden",D.style.position="fixed",D.style.left="-10000px",D.style.top="0px",D.style.border="0",D.width=p.width.toString(),D.height=p.height.toString(),D.scrolling="no",D.setAttribute(yn,"true"),T.body.appendChild(D),D},zi=function(T){return new Promise(function(p){if(T.complete){p();return}if(!T.src){p();return}T.onload=p,T.onerror=p})},LA=function(T){return Promise.all([].slice.call(T.images,0).map(zi))},Lo=function(T){return new Promise(function(p,D){var O=T.contentWindow;if(!O)return D("No window assigned for iframe");var Y=O.document;O.onload=T.onload=function(){O.onload=T.onload=null;var ne=setInterval(function(){Y.body.childNodes.length>0&&Y.readyState==="complete"&&(clearInterval(ne),p(T))},50)}})},Uo=["all","d","content"],Ia=function(T,p){for(var D=T.length-1;D>=0;D--){var O=T.item(D);Uo.indexOf(O)===-1&&p.style.setProperty(O,T.getPropertyValue(O))}return p},UA=function(T){var p="";return T&&(p+="<!DOCTYPE ",T.name&&(p+=T.name),T.internalSubset&&(p+=T.internalSubset),T.publicId&&(p+='"'+T.publicId+'"'),T.systemId&&(p+='"'+T.systemId+'"'),p+=">"),p},Oa=function(T,p,D){T&&T.defaultView&&(p!==T.defaultView.pageXOffset||D!==T.defaultView.pageYOffset)&&T.defaultView.scrollTo(p,D)},FA=function(T){var p=T[0],D=T[1],O=T[2];p.scrollLeft=D,p.scrollTop=O},NA=":before",vs=":after",ys="___html2canvas___pseudoelement_before",bs="___html2canvas___pseudoelement_after",Fo=`{
|
|
content: "" !important;
|
|
display: none !important;
|
|
}`,PA=function(T){MA(T,"."+ys+NA+Fo+`
|
|
.`+bs+vs+Fo)},MA=function(T,p){var D=T.ownerDocument;if(D){var O=D.createElement("style");O.textContent=p,T.appendChild(O)}},No=function(){function T(){}return T.getOrigin=function(p){var D=T._link;return D?(D.href=p,D.href=D.href,D.protocol+D.hostname+D.port):"about:blank"},T.isSameOrigin=function(p){return T.getOrigin(p)===T._origin},T.setContext=function(p){T._link=p.document.createElement("a"),T._origin=T.getOrigin(p.location.href)},T._origin="about:blank",T}(),qA=function(){function T(p,D){this.context=p,this._options=D,this._cache={}}return T.prototype.addImage=function(p){var D=Promise.resolve();return this.has(p)||(HA(p)||nu(p))&&(this._cache[p]=this.loadImage(p)).catch(function(){}),D},T.prototype.match=function(p){return this._cache[p]},T.prototype.loadImage=function(p){return V(this,void 0,void 0,function(){var D,O,Y,ne,ge=this;return N(this,function(Re){switch(Re.label){case 0:return D=No.isSameOrigin(p),O=!kA(p)&&this._options.useCORS===!0&&cn.SUPPORT_CORS_IMAGES&&!D,Y=!kA(p)&&!D&&!HA(p)&&typeof this._options.proxy=="string"&&cn.SUPPORT_CORS_XHR&&!O,!D&&this._options.allowTaint===!1&&!kA(p)&&!HA(p)&&!Y&&!O?[2]:(ne=p,Y?[4,this.proxy(ne)]:[3,2]);case 1:ne=Re.sent(),Re.label=2;case 2:return this.context.logger.debug("Added image "+p.substring(0,256)),[4,new Promise(function(Oe,ze){var Ze=new Image;Ze.onload=function(){return Oe(Ze)},Ze.onerror=ze,(iu(ne)||O)&&(Ze.crossOrigin="anonymous"),Ze.src=ne,Ze.complete===!0&&setTimeout(function(){return Oe(Ze)},500),ge._options.imageTimeout>0&&setTimeout(function(){return ze("Timed out ("+ge._options.imageTimeout+"ms) loading image")},ge._options.imageTimeout)})];case 3:return[2,Re.sent()]}})})},T.prototype.has=function(p){return typeof this._cache[p]!="undefined"},T.prototype.keys=function(){return Promise.resolve(Object.keys(this._cache))},T.prototype.proxy=function(p){var D=this,O=this._options.proxy;if(!O)throw new Error("No proxy defined");var Y=p.substring(0,256);return new Promise(function(ne,ge){var Re=cn.SUPPORT_RESPONSE_TYPE?"blob":"text",Oe=new XMLHttpRequest;Oe.onload=function(){if(Oe.status===200)if(Re==="text")ne(Oe.response);else{var At=new FileReader;At.addEventListener("load",function(){return ne(At.result)},!1),At.addEventListener("error",function(ct){return ge(ct)},!1),At.readAsDataURL(Oe.response)}else ge("Failed to proxy resource "+Y+" with status code "+Oe.status)},Oe.onerror=ge;var ze=O.indexOf("?")>-1?"&":"?";if(Oe.open("GET",""+O+ze+"url="+encodeURIComponent(p)+"&responseType="+Re),Re!=="text"&&Oe instanceof XMLHttpRequest&&(Oe.responseType=Re),D._options.imageTimeout){var Ze=D._options.imageTimeout;Oe.timeout=Ze,Oe.ontimeout=function(){return ge("Timed out ("+Ze+"ms) proxying "+Y)}}Oe.send()})},T}(),eu=/^data:image\/svg\+xml/i,tu=/^data:image\/.*;base64,/i,ru=/^data:image\/.*/i,nu=function(T){return cn.SUPPORT_SVG_DRAWING||!au(T)},kA=function(T){return ru.test(T)},iu=function(T){return tu.test(T)},HA=function(T){return T.substr(0,4)==="blob"},au=function(T){return T.substr(-3).toLowerCase()==="svg"||eu.test(T)},Kt=function(){function T(p,D){this.type=0,this.x=p,this.y=D}return T.prototype.add=function(p,D){return new T(this.x+p,this.y+D)},T}(),Ra=function(T,p,D){return new Kt(T.x+(p.x-T.x)*D,T.y+(p.y-T.y)*D)},Po=function(){function T(p,D,O,Y){this.type=1,this.start=p,this.startControl=D,this.endControl=O,this.end=Y}return T.prototype.subdivide=function(p,D){var O=Ra(this.start,this.startControl,p),Y=Ra(this.startControl,this.endControl,p),ne=Ra(this.endControl,this.end,p),ge=Ra(O,Y,p),Re=Ra(Y,ne,p),Oe=Ra(ge,Re,p);return D?new T(this.start,O,ge,Oe):new T(Oe,Re,ne,this.end)},T.prototype.add=function(p,D){return new T(this.start.add(p,D),this.startControl.add(p,D),this.endControl.add(p,D),this.end.add(p,D))},T.prototype.reverse=function(){return new T(this.end,this.endControl,this.startControl,this.start)},T}(),Fn=function(T){return T.type===1},su=function(){function T(p){var D=p.styles,O=p.bounds,Y=Hn(D.borderTopLeftRadius,O.width,O.height),ne=Y[0],ge=Y[1],Re=Hn(D.borderTopRightRadius,O.width,O.height),Oe=Re[0],ze=Re[1],Ze=Hn(D.borderBottomRightRadius,O.width,O.height),At=Ze[0],ct=Ze[1],Wt=Hn(D.borderBottomLeftRadius,O.width,O.height),It=Wt[0],Nt=Wt[1],or=[];or.push((ne+Oe)/O.width),or.push((It+At)/O.width),or.push((ge+Nt)/O.height),or.push((ze+ct)/O.height);var jt=Math.max.apply(Math,or);jt>1&&(ne/=jt,ge/=jt,Oe/=jt,ze/=jt,At/=jt,ct/=jt,It/=jt,Nt/=jt);var Vt=O.width-Oe,xr=O.height-ct,gr=O.width-At,Lr=O.height-Nt,Gt=D.borderTopWidth,Rr=D.borderRightWidth,Ur=D.borderBottomWidth,cr=D.borderLeftWidth,xn=Pr(D.paddingTop,p.bounds.width),Cn=Pr(D.paddingRight,p.bounds.width),On=Pr(D.paddingBottom,p.bounds.width),pn=Pr(D.paddingLeft,p.bounds.width);this.topLeftBorderDoubleOuterBox=ne>0||ge>0?en(O.left+cr/3,O.top+Gt/3,ne-cr/3,ge-Gt/3,kr.TOP_LEFT):new Kt(O.left+cr/3,O.top+Gt/3),this.topRightBorderDoubleOuterBox=ne>0||ge>0?en(O.left+Vt,O.top+Gt/3,Oe-Rr/3,ze-Gt/3,kr.TOP_RIGHT):new Kt(O.left+O.width-Rr/3,O.top+Gt/3),this.bottomRightBorderDoubleOuterBox=At>0||ct>0?en(O.left+gr,O.top+xr,At-Rr/3,ct-Ur/3,kr.BOTTOM_RIGHT):new Kt(O.left+O.width-Rr/3,O.top+O.height-Ur/3),this.bottomLeftBorderDoubleOuterBox=It>0||Nt>0?en(O.left+cr/3,O.top+Lr,It-cr/3,Nt-Ur/3,kr.BOTTOM_LEFT):new Kt(O.left+cr/3,O.top+O.height-Ur/3),this.topLeftBorderDoubleInnerBox=ne>0||ge>0?en(O.left+cr*2/3,O.top+Gt*2/3,ne-cr*2/3,ge-Gt*2/3,kr.TOP_LEFT):new Kt(O.left+cr*2/3,O.top+Gt*2/3),this.topRightBorderDoubleInnerBox=ne>0||ge>0?en(O.left+Vt,O.top+Gt*2/3,Oe-Rr*2/3,ze-Gt*2/3,kr.TOP_RIGHT):new Kt(O.left+O.width-Rr*2/3,O.top+Gt*2/3),this.bottomRightBorderDoubleInnerBox=At>0||ct>0?en(O.left+gr,O.top+xr,At-Rr*2/3,ct-Ur*2/3,kr.BOTTOM_RIGHT):new Kt(O.left+O.width-Rr*2/3,O.top+O.height-Ur*2/3),this.bottomLeftBorderDoubleInnerBox=It>0||Nt>0?en(O.left+cr*2/3,O.top+Lr,It-cr*2/3,Nt-Ur*2/3,kr.BOTTOM_LEFT):new Kt(O.left+cr*2/3,O.top+O.height-Ur*2/3),this.topLeftBorderStroke=ne>0||ge>0?en(O.left+cr/2,O.top+Gt/2,ne-cr/2,ge-Gt/2,kr.TOP_LEFT):new Kt(O.left+cr/2,O.top+Gt/2),this.topRightBorderStroke=ne>0||ge>0?en(O.left+Vt,O.top+Gt/2,Oe-Rr/2,ze-Gt/2,kr.TOP_RIGHT):new Kt(O.left+O.width-Rr/2,O.top+Gt/2),this.bottomRightBorderStroke=At>0||ct>0?en(O.left+gr,O.top+xr,At-Rr/2,ct-Ur/2,kr.BOTTOM_RIGHT):new Kt(O.left+O.width-Rr/2,O.top+O.height-Ur/2),this.bottomLeftBorderStroke=It>0||Nt>0?en(O.left+cr/2,O.top+Lr,It-cr/2,Nt-Ur/2,kr.BOTTOM_LEFT):new Kt(O.left+cr/2,O.top+O.height-Ur/2),this.topLeftBorderBox=ne>0||ge>0?en(O.left,O.top,ne,ge,kr.TOP_LEFT):new Kt(O.left,O.top),this.topRightBorderBox=Oe>0||ze>0?en(O.left+Vt,O.top,Oe,ze,kr.TOP_RIGHT):new Kt(O.left+O.width,O.top),this.bottomRightBorderBox=At>0||ct>0?en(O.left+gr,O.top+xr,At,ct,kr.BOTTOM_RIGHT):new Kt(O.left+O.width,O.top+O.height),this.bottomLeftBorderBox=It>0||Nt>0?en(O.left,O.top+Lr,It,Nt,kr.BOTTOM_LEFT):new Kt(O.left,O.top+O.height),this.topLeftPaddingBox=ne>0||ge>0?en(O.left+cr,O.top+Gt,Math.max(0,ne-cr),Math.max(0,ge-Gt),kr.TOP_LEFT):new Kt(O.left+cr,O.top+Gt),this.topRightPaddingBox=Oe>0||ze>0?en(O.left+Math.min(Vt,O.width-Rr),O.top+Gt,Vt>O.width+Rr?0:Math.max(0,Oe-Rr),Math.max(0,ze-Gt),kr.TOP_RIGHT):new Kt(O.left+O.width-Rr,O.top+Gt),this.bottomRightPaddingBox=At>0||ct>0?en(O.left+Math.min(gr,O.width-cr),O.top+Math.min(xr,O.height-Ur),Math.max(0,At-Rr),Math.max(0,ct-Ur),kr.BOTTOM_RIGHT):new Kt(O.left+O.width-Rr,O.top+O.height-Ur),this.bottomLeftPaddingBox=It>0||Nt>0?en(O.left+cr,O.top+Math.min(Lr,O.height-Ur),Math.max(0,It-cr),Math.max(0,Nt-Ur),kr.BOTTOM_LEFT):new Kt(O.left+cr,O.top+O.height-Ur),this.topLeftContentBox=ne>0||ge>0?en(O.left+cr+pn,O.top+Gt+xn,Math.max(0,ne-(cr+pn)),Math.max(0,ge-(Gt+xn)),kr.TOP_LEFT):new Kt(O.left+cr+pn,O.top+Gt+xn),this.topRightContentBox=Oe>0||ze>0?en(O.left+Math.min(Vt,O.width+cr+pn),O.top+Gt+xn,Vt>O.width+cr+pn?0:Oe-cr+pn,ze-(Gt+xn),kr.TOP_RIGHT):new Kt(O.left+O.width-(Rr+Cn),O.top+Gt+xn),this.bottomRightContentBox=At>0||ct>0?en(O.left+Math.min(gr,O.width-(cr+pn)),O.top+Math.min(xr,O.height+Gt+xn),Math.max(0,At-(Rr+Cn)),ct-(Ur+On),kr.BOTTOM_RIGHT):new Kt(O.left+O.width-(Rr+Cn),O.top+O.height-(Ur+On)),this.bottomLeftContentBox=It>0||Nt>0?en(O.left+cr+pn,O.top+Lr,Math.max(0,It-(cr+pn)),Nt-(Ur+On),kr.BOTTOM_LEFT):new Kt(O.left+cr+pn,O.top+O.height-(Ur+On))}return T}(),kr;(function(T){T[T.TOP_LEFT=0]="TOP_LEFT",T[T.TOP_RIGHT=1]="TOP_RIGHT",T[T.BOTTOM_RIGHT=2]="BOTTOM_RIGHT",T[T.BOTTOM_LEFT=3]="BOTTOM_LEFT"})(kr||(kr={}));var en=function(T,p,D,O,Y){var ne=4*((Math.sqrt(2)-1)/3),ge=D*ne,Re=O*ne,Oe=T+D,ze=p+O;switch(Y){case kr.TOP_LEFT:return new Po(new Kt(T,ze),new Kt(T,ze-Re),new Kt(Oe-ge,p),new Kt(Oe,p));case kr.TOP_RIGHT:return new Po(new Kt(T,p),new Kt(T+ge,p),new Kt(Oe,ze-Re),new Kt(Oe,ze));case kr.BOTTOM_RIGHT:return new Po(new Kt(Oe,p),new Kt(Oe,p+Re),new Kt(T+ge,ze),new Kt(T,ze));case kr.BOTTOM_LEFT:default:return new Po(new Kt(Oe,ze),new Kt(Oe-ge,ze),new Kt(T,p+Re),new Kt(T,p))}},Mo=function(T){return[T.topLeftBorderBox,T.topRightBorderBox,T.bottomRightBorderBox,T.bottomLeftBorderBox]},ou=function(T){return[T.topLeftContentBox,T.topRightContentBox,T.bottomRightContentBox,T.bottomLeftContentBox]},ko=function(T){return[T.topLeftPaddingBox,T.topRightPaddingBox,T.bottomRightPaddingBox,T.bottomLeftPaddingBox]},lu=function(){function T(p,D,O){this.offsetX=p,this.offsetY=D,this.matrix=O,this.type=0,this.target=2|4}return T}(),Ho=function(){function T(p,D){this.path=p,this.target=D,this.type=1}return T}(),Au=function(){function T(p){this.opacity=p,this.type=2,this.target=2|4}return T}(),uu=function(T){return T.type===0},WA=function(T){return T.type===1},cu=function(T){return T.type===2},GA=function(T,p){return T.length===p.length?T.some(function(D,O){return D===p[O]}):!1},du=function(T,p,D,O,Y){return T.map(function(ne,ge){switch(ge){case 0:return ne.add(p,D);case 1:return ne.add(p+O,D);case 2:return ne.add(p+O,D+Y);case 3:return ne.add(p,D+Y)}return ne})},VA=function(){function T(p){this.element=p,this.inlineLevel=[],this.nonInlineLevel=[],this.negativeZIndex=[],this.zeroOrAutoZIndexOrTransformedOrOpacity=[],this.positiveZIndex=[],this.nonPositionedFloats=[],this.nonPositionedInlineLevel=[]}return T}(),zA=function(){function T(p,D){if(this.container=p,this.parent=D,this.effects=[],this.curves=new su(this.container),this.container.styles.opacity<1&&this.effects.push(new Au(this.container.styles.opacity)),this.container.styles.transform!==null){var O=this.container.bounds.left+this.container.styles.transformOrigin[0].number,Y=this.container.bounds.top+this.container.styles.transformOrigin[1].number,ne=this.container.styles.transform;this.effects.push(new lu(O,Y,ne))}if(this.container.styles.overflowX!==0){var ge=Mo(this.curves),Re=ko(this.curves);GA(ge,Re)?this.effects.push(new Ho(ge,2|4)):(this.effects.push(new Ho(ge,2)),this.effects.push(new Ho(Re,4)))}}return T.prototype.getEffects=function(p){for(var D=[2,3].indexOf(this.container.styles.position)===-1,O=this.parent,Y=this.effects.slice(0);O;){var ne=O.effects.filter(function(Oe){return!WA(Oe)});if(D||O.container.styles.position!==0||!O.parent){if(Y.unshift.apply(Y,ne),D=[2,3].indexOf(O.container.styles.position)===-1,O.container.styles.overflowX!==0){var ge=Mo(O.curves),Re=ko(O.curves);GA(ge,Re)||Y.unshift(new Ho(Re,2|4))}}else Y.unshift.apply(Y,ne);O=O.parent}return Y.filter(function(Oe){return nn(Oe.target,p)})},T}(),QA=function(T,p,D,O){T.container.elements.forEach(function(Y){var ne=nn(Y.flags,4),ge=nn(Y.flags,2),Re=new zA(Y,T);nn(Y.styles.display,2048)&&O.push(Re);var Oe=nn(Y.flags,8)?[]:O;if(ne||ge){var ze=ne||Y.styles.isPositioned()?D:p,Ze=new VA(Re);if(Y.styles.isPositioned()||Y.styles.opacity<1||Y.styles.isTransformed()){var At=Y.styles.zIndex.order;if(At<0){var ct=0;ze.negativeZIndex.some(function(It,Nt){return At>It.element.container.styles.zIndex.order?(ct=Nt,!1):ct>0}),ze.negativeZIndex.splice(ct,0,Ze)}else if(At>0){var Wt=0;ze.positiveZIndex.some(function(It,Nt){return At>=It.element.container.styles.zIndex.order?(Wt=Nt+1,!1):Wt>0}),ze.positiveZIndex.splice(Wt,0,Ze)}else ze.zeroOrAutoZIndexOrTransformedOrOpacity.push(Ze)}else Y.styles.isFloating()?ze.nonPositionedFloats.push(Ze):ze.nonPositionedInlineLevel.push(Ze);QA(Re,Ze,ne?Ze:D,Oe)}else Y.styles.isInlineLevel()?p.inlineLevel.push(Re):p.nonInlineLevel.push(Re),QA(Re,p,D,Oe);nn(Y.flags,8)&&XA(Y,Oe)})},XA=function(T,p){for(var D=T instanceof ds?T.start:1,O=T instanceof ds?T.reversed:!1,Y=0;Y<p.length;Y++){var ne=p[Y];ne.container instanceof Co&&typeof ne.container.value=="number"&&ne.container.value!==0&&(D=ne.container.value),ne.listValue=fn(D,ne.container.styles.listStyleType,!0),D+=O?-1:1}},hu=function(T){var p=new zA(T,null),D=new VA(p),O=[];return QA(p,D,D,O),XA(p.container,O),D},YA=function(T,p){switch(p){case 0:return Nn(T.topLeftBorderBox,T.topLeftPaddingBox,T.topRightBorderBox,T.topRightPaddingBox);case 1:return Nn(T.topRightBorderBox,T.topRightPaddingBox,T.bottomRightBorderBox,T.bottomRightPaddingBox);case 2:return Nn(T.bottomRightBorderBox,T.bottomRightPaddingBox,T.bottomLeftBorderBox,T.bottomLeftPaddingBox);case 3:default:return Nn(T.bottomLeftBorderBox,T.bottomLeftPaddingBox,T.topLeftBorderBox,T.topLeftPaddingBox)}},fu=function(T,p){switch(p){case 0:return Nn(T.topLeftBorderBox,T.topLeftBorderDoubleOuterBox,T.topRightBorderBox,T.topRightBorderDoubleOuterBox);case 1:return Nn(T.topRightBorderBox,T.topRightBorderDoubleOuterBox,T.bottomRightBorderBox,T.bottomRightBorderDoubleOuterBox);case 2:return Nn(T.bottomRightBorderBox,T.bottomRightBorderDoubleOuterBox,T.bottomLeftBorderBox,T.bottomLeftBorderDoubleOuterBox);case 3:default:return Nn(T.bottomLeftBorderBox,T.bottomLeftBorderDoubleOuterBox,T.topLeftBorderBox,T.topLeftBorderDoubleOuterBox)}},pu=function(T,p){switch(p){case 0:return Nn(T.topLeftBorderDoubleInnerBox,T.topLeftPaddingBox,T.topRightBorderDoubleInnerBox,T.topRightPaddingBox);case 1:return Nn(T.topRightBorderDoubleInnerBox,T.topRightPaddingBox,T.bottomRightBorderDoubleInnerBox,T.bottomRightPaddingBox);case 2:return Nn(T.bottomRightBorderDoubleInnerBox,T.bottomRightPaddingBox,T.bottomLeftBorderDoubleInnerBox,T.bottomLeftPaddingBox);case 3:default:return Nn(T.bottomLeftBorderDoubleInnerBox,T.bottomLeftPaddingBox,T.topLeftBorderDoubleInnerBox,T.topLeftPaddingBox)}},gu=function(T,p){switch(p){case 0:return Qo(T.topLeftBorderStroke,T.topRightBorderStroke);case 1:return Qo(T.topRightBorderStroke,T.bottomRightBorderStroke);case 2:return Qo(T.bottomRightBorderStroke,T.bottomLeftBorderStroke);case 3:default:return Qo(T.bottomLeftBorderStroke,T.topLeftBorderStroke)}},Qo=function(T,p){var D=[];return Fn(T)?D.push(T.subdivide(.5,!1)):D.push(T),Fn(p)?D.push(p.subdivide(.5,!0)):D.push(p),D},Nn=function(T,p,D,O){var Y=[];return Fn(T)?Y.push(T.subdivide(.5,!1)):Y.push(T),Fn(D)?Y.push(D.subdivide(.5,!0)):Y.push(D),Fn(O)?Y.push(O.subdivide(.5,!0).reverse()):Y.push(O),Fn(p)?Y.push(p.subdivide(.5,!1).reverse()):Y.push(p),Y},JA=function(T){var p=T.bounds,D=T.styles;return p.add(D.borderLeftWidth,D.borderTopWidth,-(D.borderRightWidth+D.borderLeftWidth),-(D.borderTopWidth+D.borderBottomWidth))},Ko=function(T){var p=T.styles,D=T.bounds,O=Pr(p.paddingLeft,D.width),Y=Pr(p.paddingRight,D.width),ne=Pr(p.paddingTop,D.width),ge=Pr(p.paddingBottom,D.width);return D.add(O+p.borderLeftWidth,ne+p.borderTopWidth,-(p.borderRightWidth+p.borderLeftWidth+O+Y),-(p.borderTopWidth+p.borderBottomWidth+ne+ge))},mu=function(T,p){return T===0?p.bounds:T===2?Ko(p):JA(p)},vu=function(T,p){return T===0?p.bounds:T===2?Ko(p):JA(p)},KA=function(T,p,D){var O=mu(La(T.styles.backgroundOrigin,p),T),Y=vu(La(T.styles.backgroundClip,p),T),ne=yu(La(T.styles.backgroundSize,p),D,O),ge=ne[0],Re=ne[1],Oe=Hn(La(T.styles.backgroundPosition,p),O.width-ge,O.height-Re),ze=bu(La(T.styles.backgroundRepeat,p),Oe,ne,O,Y),Ze=Math.round(O.left+Oe[0]),At=Math.round(O.top+Oe[1]);return[ze,Ze,At,ge,Re]},Da=function(T){return Nr(T)&&T.value===_n.AUTO},jo=function(T){return typeof T=="number"},yu=function(T,p,D){var O=p[0],Y=p[1],ne=p[2],ge=T[0],Re=T[1];if(!ge)return[0,0];if(ln(ge)&&Re&&ln(Re))return[Pr(ge,D.width),Pr(Re,D.height)];var Oe=jo(ne);if(Nr(ge)&&(ge.value===_n.CONTAIN||ge.value===_n.COVER)){if(jo(ne)){var ze=D.width/D.height;return ze<ne!==(ge.value===_n.COVER)?[D.width,D.width/ne]:[D.height*ne,D.height]}return[D.width,D.height]}var Ze=jo(O),At=jo(Y),ct=Ze||At;if(Da(ge)&&(!Re||Da(Re))){if(Ze&&At)return[O,Y];if(!Oe&&!ct)return[D.width,D.height];if(ct&&Oe){var Wt=Ze?O:Y*ne,It=At?Y:O/ne;return[Wt,It]}var Nt=Ze?O:D.width,or=At?Y:D.height;return[Nt,or]}if(Oe){var jt=0,Vt=0;return ln(ge)?jt=Pr(ge,D.width):ln(Re)&&(Vt=Pr(Re,D.height)),Da(ge)?jt=Vt*ne:(!Re||Da(Re))&&(Vt=jt/ne),[jt,Vt]}var xr=null,gr=null;if(ln(ge)?xr=Pr(ge,D.width):Re&&ln(Re)&&(gr=Pr(Re,D.height)),xr!==null&&(!Re||Da(Re))&&(gr=Ze&&At?xr/O*Y:D.height),gr!==null&&Da(ge)&&(xr=Ze&&At?gr/Y*O:D.width),xr!==null&&gr!==null)return[xr,gr];throw new Error("Unable to calculate background-size for element")},La=function(T,p){var D=T[p];return typeof D=="undefined"?T[0]:D},bu=function(T,p,D,O,Y){var ne=p[0],ge=p[1],Re=D[0],Oe=D[1];switch(T){case 2:return[new Kt(Math.round(O.left),Math.round(O.top+ge)),new Kt(Math.round(O.left+O.width),Math.round(O.top+ge)),new Kt(Math.round(O.left+O.width),Math.round(Oe+O.top+ge)),new Kt(Math.round(O.left),Math.round(Oe+O.top+ge))];case 3:return[new Kt(Math.round(O.left+ne),Math.round(O.top)),new Kt(Math.round(O.left+ne+Re),Math.round(O.top)),new Kt(Math.round(O.left+ne+Re),Math.round(O.height+O.top)),new Kt(Math.round(O.left+ne),Math.round(O.height+O.top))];case 1:return[new Kt(Math.round(O.left+ne),Math.round(O.top+ge)),new Kt(Math.round(O.left+ne+Re),Math.round(O.top+ge)),new Kt(Math.round(O.left+ne+Re),Math.round(O.top+ge+Oe)),new Kt(Math.round(O.left+ne),Math.round(O.top+ge+Oe))];default:return[new Kt(Math.round(Y.left),Math.round(Y.top)),new Kt(Math.round(Y.left+Y.width),Math.round(Y.top)),new Kt(Math.round(Y.left+Y.width),Math.round(Y.height+Y.top)),new Kt(Math.round(Y.left),Math.round(Y.height+Y.top))]}},Eu="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",$A="Hidden Text",_u=function(){function T(p){this._data={},this._document=p}return T.prototype.parseMetrics=function(p,D){var O=this._document.createElement("div"),Y=this._document.createElement("img"),ne=this._document.createElement("span"),ge=this._document.body;O.style.visibility="hidden",O.style.fontFamily=p,O.style.fontSize=D,O.style.margin="0",O.style.padding="0",O.style.whiteSpace="nowrap",ge.appendChild(O),Y.src=Eu,Y.width=1,Y.height=1,Y.style.margin="0",Y.style.padding="0",Y.style.verticalAlign="baseline",ne.style.fontFamily=p,ne.style.fontSize=D,ne.style.margin="0",ne.style.padding="0",ne.appendChild(this._document.createTextNode($A)),O.appendChild(ne),O.appendChild(Y);var Re=Y.offsetTop-ne.offsetTop+2;O.removeChild(ne),O.appendChild(this._document.createTextNode($A)),O.style.lineHeight="normal",Y.style.verticalAlign="super";var Oe=Y.offsetTop-O.offsetTop+2;return ge.removeChild(O),{baseline:Re,middle:Oe}},T.prototype.getMetrics=function(p,D){var O=p+" "+D;return typeof this._data[O]=="undefined"&&(this._data[O]=this.parseMetrics(p,D)),this._data[O]},T}(),ZA=function(){function T(p,D){this.context=p,this.options=D}return T}(),wu=1e4,Cu=function(T){z(p,T);function p(D,O){var Y=T.call(this,D,O)||this;return Y._activeEffects=[],Y.canvas=O.canvas?O.canvas:document.createElement("canvas"),Y.ctx=Y.canvas.getContext("2d"),O.canvas||(Y.canvas.width=Math.floor(O.width*O.scale),Y.canvas.height=Math.floor(O.height*O.scale),Y.canvas.style.width=O.width+"px",Y.canvas.style.height=O.height+"px"),Y.fontMetrics=new _u(document),Y.ctx.scale(Y.options.scale,Y.options.scale),Y.ctx.translate(-O.x,-O.y),Y.ctx.textBaseline="bottom",Y._activeEffects=[],Y.context.logger.debug("Canvas renderer initialized ("+O.width+"x"+O.height+") with scale "+O.scale),Y}return p.prototype.applyEffects=function(D){for(var O=this;this._activeEffects.length;)this.popEffect();D.forEach(function(Y){return O.applyEffect(Y)})},p.prototype.applyEffect=function(D){this.ctx.save(),cu(D)&&(this.ctx.globalAlpha=D.opacity),uu(D)&&(this.ctx.translate(D.offsetX,D.offsetY),this.ctx.transform(D.matrix[0],D.matrix[1],D.matrix[2],D.matrix[3],D.matrix[4],D.matrix[5]),this.ctx.translate(-D.offsetX,-D.offsetY)),WA(D)&&(this.path(D.path),this.ctx.clip()),this._activeEffects.push(D)},p.prototype.popEffect=function(){this._activeEffects.pop(),this.ctx.restore()},p.prototype.renderStack=function(D){return V(this,void 0,void 0,function(){var O;return N(this,function(Y){switch(Y.label){case 0:return O=D.element.container.styles,O.isVisible()?[4,this.renderStackContent(D)]:[3,2];case 1:Y.sent(),Y.label=2;case 2:return[2]}})})},p.prototype.renderNode=function(D){return V(this,void 0,void 0,function(){return N(this,function(O){switch(O.label){case 0:if(nn(D.container.flags,16))debugger;return D.container.styles.isVisible()?[4,this.renderNodeBackgroundAndBorders(D)]:[3,3];case 1:return O.sent(),[4,this.renderNodeContent(D)];case 2:O.sent(),O.label=3;case 3:return[2]}})})},p.prototype.renderTextWithLetterSpacing=function(D,O,Y){var ne=this;if(O===0)this.ctx.fillText(D.text,D.bounds.left,D.bounds.top+Y);else{var ge=Gi(D.text);ge.reduce(function(Re,Oe){return ne.ctx.fillText(Oe,Re,D.bounds.top+Y),Re+ne.ctx.measureText(Oe).width},D.bounds.left)}},p.prototype.createFontStyle=function(D){var O=D.fontVariant.filter(function(ge){return ge==="normal"||ge==="small-caps"}).join(""),Y=Iu(D.fontFamily).join(", "),ne=Ri(D.fontSize)?""+D.fontSize.number+D.fontSize.unit:D.fontSize.number+"px";return[[D.fontStyle,O,D.fontWeight,ne,Y].join(" "),Y,ne]},p.prototype.renderTextNode=function(D,O){return V(this,void 0,void 0,function(){var Y,ne,ge,Re,Oe,ze,Ze,At,ct=this;return N(this,function(Wt){return Y=this.createFontStyle(O),ne=Y[0],ge=Y[1],Re=Y[2],this.ctx.font=ne,this.ctx.direction=O.direction===1?"rtl":"ltr",this.ctx.textAlign="left",this.ctx.textBaseline="alphabetic",Oe=this.fontMetrics.getMetrics(ge,Re),ze=Oe.baseline,Ze=Oe.middle,At=O.paintOrder,D.textBounds.forEach(function(It){At.forEach(function(Nt){switch(Nt){case 0:ct.ctx.fillStyle=un(O.color),ct.renderTextWithLetterSpacing(It,O.letterSpacing,ze);var or=O.textShadow;or.length&&It.text.trim().length&&(or.slice(0).reverse().forEach(function(jt){ct.ctx.shadowColor=un(jt.color),ct.ctx.shadowOffsetX=jt.offsetX.number*ct.options.scale,ct.ctx.shadowOffsetY=jt.offsetY.number*ct.options.scale,ct.ctx.shadowBlur=jt.blur.number,ct.renderTextWithLetterSpacing(It,O.letterSpacing,ze)}),ct.ctx.shadowColor="",ct.ctx.shadowOffsetX=0,ct.ctx.shadowOffsetY=0,ct.ctx.shadowBlur=0),O.textDecorationLine.length&&(ct.ctx.fillStyle=un(O.textDecorationColor||O.color),O.textDecorationLine.forEach(function(jt){switch(jt){case 1:ct.ctx.fillRect(It.bounds.left,Math.round(It.bounds.top+ze),It.bounds.width,1);break;case 2:ct.ctx.fillRect(It.bounds.left,Math.round(It.bounds.top),It.bounds.width,1);break;case 3:ct.ctx.fillRect(It.bounds.left,Math.ceil(It.bounds.top+Ze),It.bounds.width,1);break}}));break;case 1:O.webkitTextStrokeWidth&&It.text.trim().length&&(ct.ctx.strokeStyle=un(O.webkitTextStrokeColor),ct.ctx.lineWidth=O.webkitTextStrokeWidth,ct.ctx.lineJoin=window.chrome?"miter":"round",ct.ctx.strokeText(It.text,It.bounds.left,It.bounds.top+ze)),ct.ctx.strokeStyle="",ct.ctx.lineWidth=0,ct.ctx.lineJoin="miter";break}})}),[2]})})},p.prototype.renderReplacedElement=function(D,O,Y){if(Y&&D.intrinsicWidth>0&&D.intrinsicHeight>0){var ne=Ko(D),ge=ko(O);this.path(ge),this.ctx.save(),this.ctx.clip(),this.ctx.drawImage(Y,0,0,D.intrinsicWidth,D.intrinsicHeight,ne.left,ne.top,ne.width,ne.height),this.ctx.restore()}},p.prototype.renderNodeContent=function(D){return V(this,void 0,void 0,function(){var O,Y,ne,ge,Re,Oe,ze,ze,Ze,At,ct,Wt,It,Nt,or,jt,Vt,xr,gr,ze,Lr,It,jt;return N(this,function(Gt){switch(Gt.label){case 0:this.applyEffects(D.getEffects(4)),O=D.container,Y=D.curves,ne=O.styles,ge=0,Re=O.textNodes,Gt.label=1;case 1:return ge<Re.length?(Oe=Re[ge],[4,this.renderTextNode(Oe,ne)]):[3,4];case 2:Gt.sent(),Gt.label=3;case 3:return ge++,[3,1];case 4:if(!(O instanceof cs))return[3,8];Gt.label=5;case 5:return Gt.trys.push([5,7,,8]),[4,this.context.cache.match(O.src)];case 6:return ze=Gt.sent(),this.renderReplacedElement(O,Y,ze),[3,8];case 7:return Gt.sent(),this.context.logger.error("Error loading image "+O.src),[3,8];case 8:if(O instanceof _o&&this.renderReplacedElement(O,Y,O.canvas),!(O instanceof wo))return[3,12];Gt.label=9;case 9:return Gt.trys.push([9,11,,12]),[4,this.context.cache.match(O.svg)];case 10:return ze=Gt.sent(),this.renderReplacedElement(O,Y,ze),[3,12];case 11:return Gt.sent(),this.context.logger.error("Error loading svg "+O.svg.substring(0,255)),[3,12];case 12:return O instanceof Bo&&O.tree?(Ze=new p(this.context,{scale:this.options.scale,backgroundColor:O.backgroundColor,x:0,y:0,width:O.width,height:O.height}),[4,Ze.render(O.tree)]):[3,14];case 13:At=Gt.sent(),O.width&&O.height&&this.ctx.drawImage(At,0,0,O.width,O.height,O.bounds.left,O.bounds.top,O.bounds.width,O.bounds.height),Gt.label=14;case 14:if(O instanceof Ba&&(ct=Math.min(O.bounds.width,O.bounds.height),O.type===Ta?O.checked&&(this.ctx.save(),this.path([new Kt(O.bounds.left+ct*.39363,O.bounds.top+ct*.79),new Kt(O.bounds.left+ct*.16,O.bounds.top+ct*.5549),new Kt(O.bounds.left+ct*.27347,O.bounds.top+ct*.44071),new Kt(O.bounds.left+ct*.39694,O.bounds.top+ct*.5649),new Kt(O.bounds.left+ct*.72983,O.bounds.top+ct*.23),new Kt(O.bounds.left+ct*.84,O.bounds.top+ct*.34085),new Kt(O.bounds.left+ct*.39363,O.bounds.top+ct*.79)]),this.ctx.fillStyle=un(To),this.ctx.fill(),this.ctx.restore()):O.type===xa&&(O.checked&&(this.ctx.save(),this.ctx.beginPath(),this.ctx.arc(O.bounds.left+ct/2,O.bounds.top+ct/2,ct/4,0,Math.PI*2,!0),this.ctx.fillStyle=un(To),this.ctx.fill(),this.ctx.restore()))),Tu(O)&&O.value.length){Wt=this.createFontStyle(ne),It=Wt[0],Nt=Wt[1],or=this.fontMetrics.getMetrics(It,Nt).baseline,this.ctx.font=It,this.ctx.fillStyle=un(ne.color),this.ctx.textBaseline="alphabetic",this.ctx.textAlign=Bu(O.styles.textAlign),jt=Ko(O),Vt=0;switch(O.styles.textAlign){case 1:Vt+=jt.width/2;break;case 2:Vt+=jt.width;break}xr=jt.add(Vt,0,0,-jt.height/2+1),this.ctx.save(),this.path([new Kt(jt.left,jt.top),new Kt(jt.left+jt.width,jt.top),new Kt(jt.left+jt.width,jt.top+jt.height),new Kt(jt.left,jt.top+jt.height)]),this.ctx.clip(),this.renderTextWithLetterSpacing(new Wi(O.value,xr),ne.letterSpacing,or),this.ctx.restore(),this.ctx.textBaseline="alphabetic",this.ctx.textAlign="left"}if(!nn(O.styles.display,2048))return[3,20];if(!(O.styles.listStyleImage!==null))return[3,19];if(gr=O.styles.listStyleImage,!(gr.type===0))return[3,18];ze=void 0,Lr=gr.url,Gt.label=15;case 15:return Gt.trys.push([15,17,,18]),[4,this.context.cache.match(Lr)];case 16:return ze=Gt.sent(),this.ctx.drawImage(ze,O.bounds.left-(ze.width+10),O.bounds.top),[3,18];case 17:return Gt.sent(),this.context.logger.error("Error loading list-style-image "+Lr),[3,18];case 18:return[3,20];case 19:D.listValue&&O.styles.listStyleType!==-1&&(It=this.createFontStyle(ne)[0],this.ctx.font=It,this.ctx.fillStyle=un(ne.color),this.ctx.textBaseline="middle",this.ctx.textAlign="right",jt=new $(O.bounds.left,O.bounds.top+Pr(O.styles.paddingTop,O.bounds.width),O.bounds.width,pi(ne.lineHeight,ne.fontSize.number)/2+1),this.renderTextWithLetterSpacing(new Wi(D.listValue,jt),ne.letterSpacing,pi(ne.lineHeight,ne.fontSize.number)/2+2),this.ctx.textBaseline="bottom",this.ctx.textAlign="left"),Gt.label=20;case 20:return[2]}})})},p.prototype.renderStackContent=function(D){return V(this,void 0,void 0,function(){var O,Y,ne,ge,Re,ne,Oe,ze,ne,Ze,At,ne,ct,Wt,ne,It,Nt,ne,or,jt,ne;return N(this,function(Vt){switch(Vt.label){case 0:if(nn(D.element.container.flags,16))debugger;return[4,this.renderNodeBackgroundAndBorders(D.element)];case 1:Vt.sent(),O=0,Y=D.negativeZIndex,Vt.label=2;case 2:return O<Y.length?(ne=Y[O],[4,this.renderStack(ne)]):[3,5];case 3:Vt.sent(),Vt.label=4;case 4:return O++,[3,2];case 5:return[4,this.renderNodeContent(D.element)];case 6:Vt.sent(),ge=0,Re=D.nonInlineLevel,Vt.label=7;case 7:return ge<Re.length?(ne=Re[ge],[4,this.renderNode(ne)]):[3,10];case 8:Vt.sent(),Vt.label=9;case 9:return ge++,[3,7];case 10:Oe=0,ze=D.nonPositionedFloats,Vt.label=11;case 11:return Oe<ze.length?(ne=ze[Oe],[4,this.renderStack(ne)]):[3,14];case 12:Vt.sent(),Vt.label=13;case 13:return Oe++,[3,11];case 14:Ze=0,At=D.nonPositionedInlineLevel,Vt.label=15;case 15:return Ze<At.length?(ne=At[Ze],[4,this.renderStack(ne)]):[3,18];case 16:Vt.sent(),Vt.label=17;case 17:return Ze++,[3,15];case 18:ct=0,Wt=D.inlineLevel,Vt.label=19;case 19:return ct<Wt.length?(ne=Wt[ct],[4,this.renderNode(ne)]):[3,22];case 20:Vt.sent(),Vt.label=21;case 21:return ct++,[3,19];case 22:It=0,Nt=D.zeroOrAutoZIndexOrTransformedOrOpacity,Vt.label=23;case 23:return It<Nt.length?(ne=Nt[It],[4,this.renderStack(ne)]):[3,26];case 24:Vt.sent(),Vt.label=25;case 25:return It++,[3,23];case 26:or=0,jt=D.positiveZIndex,Vt.label=27;case 27:return or<jt.length?(ne=jt[or],[4,this.renderStack(ne)]):[3,30];case 28:Vt.sent(),Vt.label=29;case 29:return or++,[3,27];case 30:return[2]}})})},p.prototype.mask=function(D){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(D.slice(0).reverse()),this.ctx.closePath()},p.prototype.path=function(D){this.ctx.beginPath(),this.formatPath(D),this.ctx.closePath()},p.prototype.formatPath=function(D){var O=this;D.forEach(function(Y,ne){var ge=Fn(Y)?Y.start:Y;ne===0?O.ctx.moveTo(ge.x,ge.y):O.ctx.lineTo(ge.x,ge.y),Fn(Y)&&O.ctx.bezierCurveTo(Y.startControl.x,Y.startControl.y,Y.endControl.x,Y.endControl.y,Y.end.x,Y.end.y)})},p.prototype.renderRepeat=function(D,O,Y,ne){this.path(D),this.ctx.fillStyle=O,this.ctx.translate(Y,ne),this.ctx.fill(),this.ctx.translate(-Y,-ne)},p.prototype.resizeImage=function(D,O,Y){var ne;if(D.width===O&&D.height===Y)return D;var ge=(ne=this.canvas.ownerDocument)!==null&&ne!==void 0?ne:document,Re=ge.createElement("canvas");Re.width=Math.max(1,O),Re.height=Math.max(1,Y);var Oe=Re.getContext("2d");return Oe.drawImage(D,0,0,D.width,D.height,0,0,O,Y),Re},p.prototype.renderBackgroundImage=function(D){return V(this,void 0,void 0,function(){var O,Y,ne,ge,Re,Oe;return N(this,function(ze){switch(ze.label){case 0:O=D.styles.backgroundImage.length-1,Y=function(Ze){var At,ct,Wt,It,Nt,or,jt,Vt,xr,gr,It,Nt,or,jt,Vt,Lr,Gt,Rr,Ur,cr,xn,Cn,On,pn,xr,$n,It,yi,bi,jt,Vt,Ei,Nt,or,Xi,Zn,_i,Yi,Ji,ai,$i,si;return N(this,function(Ua){switch(Ua.label){case 0:if(!(Ze.type===0))return[3,5];At=void 0,ct=Ze.url,Ua.label=1;case 1:return Ua.trys.push([1,3,,4]),[4,ne.context.cache.match(ct)];case 2:return At=Ua.sent(),[3,4];case 3:return Ua.sent(),ne.context.logger.error("Error loading background-image "+ct),[3,4];case 4:return At&&(Wt=KA(D,O,[At.width,At.height,At.width/At.height]),It=Wt[0],Nt=Wt[1],or=Wt[2],jt=Wt[3],Vt=Wt[4],xr=ne.ctx.createPattern(ne.resizeImage(At,jt,Vt),"repeat"),ne.renderRepeat(It,xr,Nt,or)),[3,6];case 5:ks(Ze)?(gr=KA(D,O,[null,null,null]),It=gr[0],Nt=gr[1],or=gr[2],jt=gr[3],Vt=gr[4],Lr=Aa(Ze.angle,jt,Vt),Gt=Lr[0],Rr=Lr[1],Ur=Lr[2],cr=Lr[3],xn=Lr[4],Cn=document.createElement("canvas"),Cn.width=jt,Cn.height=Vt,On=Cn.getContext("2d"),pn=On.createLinearGradient(Rr,cr,Ur,xn),Is(Ze.stops,Gt).forEach(function(Es){return pn.addColorStop(Es.stop,un(Es.color))}),On.fillStyle=pn,On.fillRect(0,0,jt,Vt),jt>0&&Vt>0&&(xr=ne.ctx.createPattern(Cn,"repeat"),ne.renderRepeat(It,xr,Nt,or))):qo(Ze)&&($n=KA(D,O,[null,null,null]),It=$n[0],yi=$n[1],bi=$n[2],jt=$n[3],Vt=$n[4],Ei=Ze.position.length===0?[Ma]:Ze.position,Nt=Pr(Ei[0],jt),or=Pr(Ei[Ei.length-1],Vt),Xi=Jo(Ze,Nt,or,jt,Vt),Zn=Xi[0],_i=Xi[1],Zn>0&&_i>0&&(Yi=ne.ctx.createRadialGradient(yi+Nt,bi+or,0,yi+Nt,bi+or,Zn),Is(Ze.stops,Zn*2).forEach(function(Es){return Yi.addColorStop(Es.stop,un(Es.color))}),ne.path(It),ne.ctx.fillStyle=Yi,Zn!==_i?(Ji=D.bounds.left+.5*D.bounds.width,ai=D.bounds.top+.5*D.bounds.height,$i=_i/Zn,si=1/$i,ne.ctx.save(),ne.ctx.translate(Ji,ai),ne.ctx.transform(1,0,0,$i,0,0),ne.ctx.translate(-Ji,-ai),ne.ctx.fillRect(yi,si*(bi-ai)+ai,jt,Vt*si),ne.ctx.restore()):ne.ctx.fill())),Ua.label=6;case 6:return O--,[2]}})},ne=this,ge=0,Re=D.styles.backgroundImage.slice(0).reverse(),ze.label=1;case 1:return ge<Re.length?(Oe=Re[ge],[5,Y(Oe)]):[3,4];case 2:ze.sent(),ze.label=3;case 3:return ge++,[3,1];case 4:return[2]}})})},p.prototype.renderSolidBorder=function(D,O,Y){return V(this,void 0,void 0,function(){return N(this,function(ne){return this.path(YA(Y,O)),this.ctx.fillStyle=un(D),this.ctx.fill(),[2]})})},p.prototype.renderDoubleBorder=function(D,O,Y,ne){return V(this,void 0,void 0,function(){var ge,Re;return N(this,function(Oe){switch(Oe.label){case 0:return O<3?[4,this.renderSolidBorder(D,Y,ne)]:[3,2];case 1:return Oe.sent(),[2];case 2:return ge=fu(ne,Y),this.path(ge),this.ctx.fillStyle=un(D),this.ctx.fill(),Re=pu(ne,Y),this.path(Re),this.ctx.fill(),[2]}})})},p.prototype.renderNodeBackgroundAndBorders=function(D){return V(this,void 0,void 0,function(){var O,Y,ne,ge,Re,Oe,ze,Ze,At=this;return N(this,function(ct){switch(ct.label){case 0:return this.applyEffects(D.getEffects(2)),O=D.container.styles,Y=!Yn(O.backgroundColor)||O.backgroundImage.length,ne=[{style:O.borderTopStyle,color:O.borderTopColor,width:O.borderTopWidth},{style:O.borderRightStyle,color:O.borderRightColor,width:O.borderRightWidth},{style:O.borderBottomStyle,color:O.borderBottomColor,width:O.borderBottomWidth},{style:O.borderLeftStyle,color:O.borderLeftColor,width:O.borderLeftWidth}],ge=xu(La(O.backgroundClip,0),D.curves),Y||O.boxShadow.length?(this.ctx.save(),this.path(ge),this.ctx.clip(),Yn(O.backgroundColor)||(this.ctx.fillStyle=un(O.backgroundColor),this.ctx.fill()),[4,this.renderBackgroundImage(D.container)]):[3,2];case 1:ct.sent(),this.ctx.restore(),O.boxShadow.slice(0).reverse().forEach(function(Wt){At.ctx.save();var It=Mo(D.curves),Nt=Wt.inset?0:wu,or=du(It,-Nt+(Wt.inset?1:-1)*Wt.spread.number,(Wt.inset?1:-1)*Wt.spread.number,Wt.spread.number*(Wt.inset?-2:2),Wt.spread.number*(Wt.inset?-2:2));Wt.inset?(At.path(It),At.ctx.clip(),At.mask(or)):(At.mask(It),At.ctx.clip(),At.path(or)),At.ctx.shadowOffsetX=Wt.offsetX.number+Nt,At.ctx.shadowOffsetY=Wt.offsetY.number,At.ctx.shadowColor=un(Wt.color),At.ctx.shadowBlur=Wt.blur.number,At.ctx.fillStyle=Wt.inset?un(Wt.color):"rgba(0,0,0,1)",At.ctx.fill(),At.ctx.restore()}),ct.label=2;case 2:Re=0,Oe=0,ze=ne,ct.label=3;case 3:return Oe<ze.length?(Ze=ze[Oe],Ze.style!==0&&!Yn(Ze.color)&&Ze.width>0?Ze.style===2?[4,this.renderDashedDottedBorder(Ze.color,Ze.width,Re,D.curves,2)]:[3,5]:[3,11]):[3,13];case 4:return ct.sent(),[3,11];case 5:return Ze.style===3?[4,this.renderDashedDottedBorder(Ze.color,Ze.width,Re,D.curves,3)]:[3,7];case 6:return ct.sent(),[3,11];case 7:return Ze.style===4?[4,this.renderDoubleBorder(Ze.color,Ze.width,Re,D.curves)]:[3,9];case 8:return ct.sent(),[3,11];case 9:return[4,this.renderSolidBorder(Ze.color,Re,D.curves)];case 10:ct.sent(),ct.label=11;case 11:Re++,ct.label=12;case 12:return Oe++,[3,3];case 13:return[2]}})})},p.prototype.renderDashedDottedBorder=function(D,O,Y,ne,ge){return V(this,void 0,void 0,function(){var Re,Oe,ze,Ze,At,ct,Wt,It,Nt,or,jt,Vt,xr,gr,Lr,Gt,Lr,Gt;return N(this,function(Rr){return this.ctx.save(),Re=gu(ne,Y),Oe=YA(ne,Y),ge===2&&(this.path(Oe),this.ctx.clip()),Fn(Oe[0])?(ze=Oe[0].start.x,Ze=Oe[0].start.y):(ze=Oe[0].x,Ze=Oe[0].y),Fn(Oe[1])?(At=Oe[1].end.x,ct=Oe[1].end.y):(At=Oe[1].x,ct=Oe[1].y),Y===0||Y===2?Wt=Math.abs(ze-At):Wt=Math.abs(Ze-ct),this.ctx.beginPath(),ge===3?this.formatPath(Re):this.formatPath(Oe.slice(0,2)),It=O<3?O*3:O*2,Nt=O<3?O*2:O,ge===3&&(It=O,Nt=O),or=!0,Wt<=It*2?or=!1:Wt<=It*2+Nt?(jt=Wt/(2*It+Nt),It*=jt,Nt*=jt):(Vt=Math.floor((Wt+Nt)/(It+Nt)),xr=(Wt-Vt*It)/(Vt-1),gr=(Wt-(Vt+1)*It)/Vt,Nt=gr<=0||Math.abs(Nt-xr)<Math.abs(Nt-gr)?xr:gr),or&&(ge===3?this.ctx.setLineDash([0,It+Nt]):this.ctx.setLineDash([It,Nt])),ge===3?(this.ctx.lineCap="round",this.ctx.lineWidth=O):this.ctx.lineWidth=O*2+1.1,this.ctx.strokeStyle=un(D),this.ctx.stroke(),this.ctx.setLineDash([]),ge===2&&(Fn(Oe[0])&&(Lr=Oe[3],Gt=Oe[0],this.ctx.beginPath(),this.formatPath([new Kt(Lr.end.x,Lr.end.y),new Kt(Gt.start.x,Gt.start.y)]),this.ctx.stroke()),Fn(Oe[1])&&(Lr=Oe[1],Gt=Oe[2],this.ctx.beginPath(),this.formatPath([new Kt(Lr.end.x,Lr.end.y),new Kt(Gt.start.x,Gt.start.y)]),this.ctx.stroke())),this.ctx.restore(),[2]})})},p.prototype.render=function(D){return V(this,void 0,void 0,function(){var O;return N(this,function(Y){switch(Y.label){case 0:return this.options.backgroundColor&&(this.ctx.fillStyle=un(this.options.backgroundColor),this.ctx.fillRect(this.options.x,this.options.y,this.options.width,this.options.height)),O=hu(D),[4,this.renderStack(O)];case 1:return Y.sent(),this.applyEffects([]),[2,this.canvas]}})})},p}(ZA),Tu=function(T){return T instanceof xo||T instanceof hs?!0:T instanceof Ba&&T.type!==xa&&T.type!==Ta},xu=function(T,p){switch(T){case 0:return Mo(p);case 2:return ou(p);case 1:default:return ko(p)}},Bu=function(T){switch(T){case 1:return"center";case 2:return"right";case 0:default:return"left"}},Su=["-apple-system","system-ui"],Iu=function(T){return/iPhone OS 15_(0|1)/.test(window.navigator.userAgent)?T.filter(function(p){return Su.indexOf(p)===-1}):T},Ou=function(T){z(p,T);function p(D,O){var Y=T.call(this,D,O)||this;return Y.canvas=O.canvas?O.canvas:document.createElement("canvas"),Y.ctx=Y.canvas.getContext("2d"),Y.options=O,Y.canvas.width=Math.floor(O.width*O.scale),Y.canvas.height=Math.floor(O.height*O.scale),Y.canvas.style.width=O.width+"px",Y.canvas.style.height=O.height+"px",Y.ctx.scale(Y.options.scale,Y.options.scale),Y.ctx.translate(-O.x,-O.y),Y.context.logger.debug("EXPERIMENTAL ForeignObject renderer initialized ("+O.width+"x"+O.height+" at "+O.x+","+O.y+") with scale "+O.scale),Y}return p.prototype.render=function(D){return V(this,void 0,void 0,function(){var O,Y;return N(this,function(ne){switch(ne.label){case 0:return O=ls(this.options.width*this.options.scale,this.options.height*this.options.scale,this.options.scale,this.options.scale,D),[4,Ru(O)];case 1:return Y=ne.sent(),this.options.backgroundColor&&(this.ctx.fillStyle=un(this.options.backgroundColor),this.ctx.fillRect(0,0,this.options.width*this.options.scale,this.options.height*this.options.scale)),this.ctx.drawImage(Y,-this.options.x*this.options.scale,-this.options.y*this.options.scale),[2,this.canvas]}})})},p}(ZA),Ru=function(T){return new Promise(function(p,D){var O=new Image;O.onload=function(){p(O)},O.onerror=D,O.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(new XMLSerializer().serializeToString(T))})},Du=function(){function T(p){var D=p.id,O=p.enabled;this.id=D,this.enabled=O,this.start=Date.now()}return T.prototype.debug=function(){for(var p=[],D=0;D<arguments.length;D++)p[D]=arguments[D];this.enabled&&(typeof window!="undefined"&&window.console&&typeof console.debug=="function"?console.debug.apply(console,L([this.id,this.getTime()+"ms"],p)):this.info.apply(this,p))},T.prototype.getTime=function(){return Date.now()-this.start},T.prototype.info=function(){for(var p=[],D=0;D<arguments.length;D++)p[D]=arguments[D];this.enabled&&(typeof window!="undefined"&&window.console&&typeof console.info=="function"&&console.info.apply(console,L([this.id,this.getTime()+"ms"],p)))},T.prototype.warn=function(){for(var p=[],D=0;D<arguments.length;D++)p[D]=arguments[D];this.enabled&&(typeof window!="undefined"&&window.console&&typeof console.warn=="function"?console.warn.apply(console,L([this.id,this.getTime()+"ms"],p)):this.info.apply(this,p))},T.prototype.error=function(){for(var p=[],D=0;D<arguments.length;D++)p[D]=arguments[D];this.enabled&&(typeof window!="undefined"&&window.console&&typeof console.error=="function"?console.error.apply(console,L([this.id,this.getTime()+"ms"],p)):this.info.apply(this,p))},T.instances={},T}(),Lu=function(){function T(p,D){var O;this.windowBounds=D,this.instanceName="#"+T.instanceCount++,this.logger=new Du({id:this.instanceName,enabled:p.logging}),this.cache=(O=p.cache)!==null&&O!==void 0?O:new qA(this,p)}return T.instanceCount=1,T}(),Uu=function(T,p){return p===void 0&&(p={}),Fu(T,p)};typeof window!="undefined"&&No.setContext(window);var Fu=function(T,p){return V(void 0,void 0,void 0,function(){var D,O,Y,ne,ge,Re,Oe,ze,Ze,At,ct,Wt,It,Nt,or,jt,Vt,xr,gr,Lr,Gt,Rr,Gt,Ur,cr,xn,Cn,On,pn,$n,yi,bi,Ei,Xi,Zn,_i,Yi,Ji,ai,$i;return N(this,function(si){switch(si.label){case 0:if(!T||typeof T!="object")return[2,Promise.reject("Invalid element provided as first argument")];if(D=T.ownerDocument,!D)throw new Error("Element is not attached to a Document");if(O=D.defaultView,!O)throw new Error("Document is not attached to a Window");return Y={allowTaint:(Ur=p.allowTaint)!==null&&Ur!==void 0?Ur:!1,imageTimeout:(cr=p.imageTimeout)!==null&&cr!==void 0?cr:15e3,proxy:p.proxy,useCORS:(xn=p.useCORS)!==null&&xn!==void 0?xn:!1},ne=U({logging:(Cn=p.logging)!==null&&Cn!==void 0?Cn:!0,cache:p.cache},Y),ge={windowWidth:(On=p.windowWidth)!==null&&On!==void 0?On:O.innerWidth,windowHeight:(pn=p.windowHeight)!==null&&pn!==void 0?pn:O.innerHeight,scrollX:($n=p.scrollX)!==null&&$n!==void 0?$n:O.pageXOffset,scrollY:(yi=p.scrollY)!==null&&yi!==void 0?yi:O.pageYOffset},Re=new $(ge.scrollX,ge.scrollY,ge.windowWidth,ge.windowHeight),Oe=new Lu(ne,Re),ze=(bi=p.foreignObjectRendering)!==null&&bi!==void 0?bi:!1,Ze={allowTaint:(Ei=p.allowTaint)!==null&&Ei!==void 0?Ei:!1,onclone:p.onclone,ignoreElements:p.ignoreElements,inlineImages:ze,copyStyles:ze},Oe.logger.debug("Starting document clone with size "+Re.width+"x"+Re.height+" scrolled to "+-Re.left+","+-Re.top),At=new ii(Oe,T,Ze),ct=At.clonedReferenceElement,ct?[4,At.toIFrame(D,Re)]:[2,Promise.reject("Unable to find element in cloned iframe")];case 1:return Wt=si.sent(),It=gs(ct)||DA(ct)?e(ct.ownerDocument):H(Oe,ct),Nt=It.width,or=It.height,jt=It.left,Vt=It.top,xr=Nu(Oe,ct,p.backgroundColor),gr={canvas:p.canvas,backgroundColor:xr,scale:(Zn=(Xi=p.scale)!==null&&Xi!==void 0?Xi:O.devicePixelRatio)!==null&&Zn!==void 0?Zn:1,x:((_i=p.x)!==null&&_i!==void 0?_i:0)+jt,y:((Yi=p.y)!==null&&Yi!==void 0?Yi:0)+Vt,width:(Ji=p.width)!==null&&Ji!==void 0?Ji:Math.ceil(Nt),height:(ai=p.height)!==null&&ai!==void 0?ai:Math.ceil(or)},ze?(Oe.logger.debug("Document cloned, using foreign object rendering"),Gt=new Ou(Oe,gr),[4,Gt.render(ct)]):[3,3];case 2:return Lr=si.sent(),[3,5];case 3:return Oe.logger.debug("Document cloned, element located at "+jt+","+Vt+" with size "+Nt+"x"+or+" using computed rendering"),Oe.logger.debug("Starting DOM parsing"),Rr=Io(Oe,ct),xr===Rr.styles.backgroundColor&&(Rr.styles.backgroundColor=Qn.TRANSPARENT),Oe.logger.debug("Starting renderer for element at "+gr.x+","+gr.y+" with size "+gr.width+"x"+gr.height),Gt=new Cu(Oe,gr),[4,Gt.render(Rr)];case 4:Lr=si.sent(),si.label=5;case 5:return(($i=p.removeContainer)!==null&&$i!==void 0?$i:!0)&&(ii.destroy(Wt)||Oe.logger.error("Cannot detach cloned iframe as it is not in the DOM anymore")),Oe.logger.debug("Finished rendering"),[2,Lr]}})})},Nu=function(T,p,D){var O=p.ownerDocument,Y=O.documentElement?Li(T,getComputedStyle(O.documentElement).backgroundColor):Qn.TRANSPARENT,ne=O.body?Li(T,getComputedStyle(O.body).backgroundColor):Qn.TRANSPARENT,ge=typeof D=="string"?Li(T,D):D===null?Qn.TRANSPARENT:4294967295;return p===O.documentElement?Yn(Y)?Yn(ne)?ge:ne:Y:ge};return Uu})},wRmb:function(wt,Be,G){"use strict";G.d(Be,"a",function(){return R});var Ae=G("rePB"),z=G("KQm4"),U=G("VTBJ"),V=G("Ff2n"),N=G("q1tI"),L=G.n(N),$=G("Kwbf"),H=G("Zm9Q"),e=G("hW8S");function R(i){return Object(H.a)(i).filter(function(o){return N.isValidElement(o)}).map(function(o){var r=o.key,a=o.props,n=a.children,t=Object(V.a)(a,["children"]),E=Object(U.a)({key:r},t);return n&&(E.children=R(n)),E})}function u(i){return i.reduce(function(o,r){var a=r.fixed,n=a===!0?"left":a,t=r.children;return t&&t.length>0?[].concat(Object(z.a)(o),Object(z.a)(u(t).map(function(E){return Object(U.a)({fixed:n},E)}))):[].concat(Object(z.a)(o),[Object(U.a)(Object(U.a)({},r),{},{fixed:n})])},[])}function f(i){for(var o=!0,r=0;r<i.length;r+=1){var a=i[r];if(o&&a.fixed!=="left")o=!1;else if(!o&&a.fixed==="left"){Object($.a)(!1,"Index ".concat(r-1," of `columns` missing `fixed='left'` prop."));break}}for(var n=!0,t=i.length-1;t>=0;t-=1){var E=i[t];if(n&&E.fixed!=="right")n=!1;else if(!n&&E.fixed==="right"){Object($.a)(!1,"Index ".concat(t+1," of `columns` missing `fixed='right'` prop."));break}}}function l(i){return i.map(function(o){var r=o.fixed,a=Object(V.a)(o,["fixed"]),n=r;return r==="left"?n="right":r==="right"&&(n="left"),Object(U.a)({fixed:n},a)})}function s(i,o){var r=i.prefixCls,a=i.columns,n=i.children,t=i.expandable,E=i.expandedKeys,b=i.getRowKey,_=i.onTriggerExpand,B=i.expandIcon,x=i.rowExpandable,h=i.expandIconColumnIndex,d=i.direction,A=i.expandRowByClick,c=N.useMemo(function(){return a||R(n)},[a,n]),w=N.useMemo(function(){if(t){var F,k=h||0,S=c[k],Q=(F={},Object(Ae.a)(F,e.a,{className:"".concat(r,"-expand-icon-col")}),Object(Ae.a)(F,"title",""),Object(Ae.a)(F,"fixed",S?S.fixed:null),Object(Ae.a)(F,"className","".concat(r,"-row-expand-icon-cell")),Object(Ae.a)(F,"render",function(q,ie,be){var me=b(ie,be),Me=E.has(me),Ne=x?x(ie):!0,ke=B({prefixCls:r,expanded:Me,expandable:Ne,record:ie,onExpand:_});return A?N.createElement("span",{onClick:function(Ye){return Ye.stopPropagation()}},ke):ke}),F),X=c.slice();return k>=0&&X.splice(k,0,Q),X}return c},[t,c,b,E,B,d]),m=N.useMemo(function(){var F=w;return o&&(F=o(F)),F.length||(F=[{render:function(){return null}}]),F},[o,w,d]),g=N.useMemo(function(){return d==="rtl"?l(u(m)):u(m)},[m,d]);return[m,g]}Be.b=s},"y0+3":function(wt,Be,G){"use strict";G.d(Be,"a",function(){return u}),G.d(Be,"b",function(){return l});var Ae=/margin|padding|width|height|max|min|offset/,z={left:!0,top:!0},U={cssFloat:1,styleFloat:1,float:1};function V(s){return s.nodeType===1?s.ownerDocument.defaultView.getComputedStyle(s,null):{}}function N(s,i,o){if(i=i.toLowerCase(),o==="auto"){if(i==="height")return s.offsetHeight;if(i==="width")return s.offsetWidth}return i in z||(z[i]=Ae.test(i)),z[i]?parseFloat(o)||0:o}function L(s,i){var o=arguments.length,r=V(s);return i=U[i]?"cssFloat"in s.style?"cssFloat":"styleFloat":i,o===1?r:N(s,i,r[i]||s.style[i])}function $(s,i,o){var r=arguments.length;if(i=U[i]?"cssFloat"in s.style?"cssFloat":"styleFloat":i,r===3)return typeof o=="number"&&Ae.test(i)&&(o="".concat(o,"px")),s.style[i]=o,o;for(var a in i)i.hasOwnProperty(a)&&$(s,a,i[a]);return V(s)}function H(s){return s===document.body?document.documentElement.clientWidth:s.offsetWidth}function e(s){return s===document.body?window.innerHeight||document.documentElement.clientHeight:s.offsetHeight}function R(){var s=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth),i=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight);return{width:s,height:i}}function u(){var s=document.documentElement.clientWidth,i=window.innerHeight||document.documentElement.clientHeight;return{width:s,height:i}}function f(){return{scrollLeft:Math.max(document.documentElement.scrollLeft,document.body.scrollLeft),scrollTop:Math.max(document.documentElement.scrollTop,document.body.scrollTop)}}function l(s){var i=s.getBoundingClientRect(),o=document.documentElement;return{left:i.left+(window.pageXOffset||o.scrollLeft)-(o.clientLeft||document.body.clientLeft||0),top:i.top+(window.pageYOffset||o.scrollTop)-(o.clientTop||document.body.clientTop||0)}}}}]);
|