(window.webpackJsonp=window.webpackJsonp||[]).push([[100,5,7,8],{"+92d":function(Ne,ne,U){Ne.exports=U.p+"static/b1.8d46544a.svg"},"+ua5":function(Ne,ne,U){},"/cxE":function(Ne,ne,U){"use strict";U.d(ne,"f",function(){return I}),U.d(ne,"g",function(){return W}),U.d(ne,"h",function(){return P}),U.d(ne,"e",function(){return K}),U.d(ne,"b",function(){return N}),U.d(ne,"c",function(){return e}),U.d(ne,"d",function(){return C}),U.d(ne,"a",function(){return g});class Q{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(v){setTimeout(()=>{throw v.stack?new Error(v.message+`
`+v.stack):v},0)}}emit(v){this.listeners.forEach(c=>{c(v)})}onUnexpectedError(v){this.unexpectedErrorHandler(v),this.emit(v)}onUnexpectedExternalError(v){this.unexpectedErrorHandler(v)}}const H=new Q;function I(v){K(v)||H.onUnexpectedError(v);return}function W(v){K(v)||H.onUnexpectedExternalError(v);return}function P(v){if(v instanceof Error){let{name:c,message:s}=v;const i=v.stacktrace||v.stack;return{$isError:!0,name:c,message:s,stack:i}}return v}const R="Canceled";function K(v){return v instanceof Error&&v.name===R&&v.message===R}function N(){const v=new Error(R);return v.name=v.message,v}function e(v){return v?new Error(`Illegal argument: ${v}`):new Error("Illegal argument")}function C(v){return v?new Error(`Illegal state: ${v}`):new Error("Illegal state")}class g extends Error{constructor(v){super("NotSupported");v&&(this.message=v)}}},"24hK":function(Ne,ne,U){"use strict";U.d(ne,"a",function(){return H});class Q{constructor(I){this.element=I,this.next=Q.Undefined,this.prev=Q.Undefined}}Q.Undefined=new Q(void 0);class H{constructor(){this._first=Q.Undefined,this._last=Q.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===Q.Undefined}clear(){let I=this._first;for(;I!==Q.Undefined;){const W=I.next;I.prev=Q.Undefined,I.next=Q.Undefined,I=W}this._first=Q.Undefined,this._last=Q.Undefined,this._size=0}unshift(I){return this._insert(I,!1)}push(I){return this._insert(I,!0)}_insert(I,W){const P=new Q(I);if(this._first===Q.Undefined)this._first=P,this._last=P;else if(W){const K=this._last;this._last=P,P.prev=K,K.next=P}else{const K=this._first;this._first=P,P.next=K,K.prev=P}this._size+=1;let R=!1;return()=>{R||(R=!0,this._remove(P))}}shift(){if(this._first===Q.Undefined)return;{const I=this._first.element;return this._remove(this._first),I}}pop(){if(this._last===Q.Undefined)return;{const I=this._last.element;return this._remove(this._last),I}}_remove(I){if(I.prev!==Q.Undefined&&I.next!==Q.Undefined){const W=I.prev;W.next=I.next,I.next.prev=W}else I.prev===Q.Undefined&&I.next===Q.Undefined?(this._first=Q.Undefined,this._last=Q.Undefined):I.next===Q.Undefined?(this._last=this._last.prev,this._last.next=Q.Undefined):I.prev===Q.Undefined&&(this._first=this._first.next,this._first.prev=Q.Undefined);this._size-=1}*[Symbol.iterator](){let I=this._first;for(;I!==Q.Undefined;)yield I.element,I=I.next}}},"3/fG":function(Ne,ne,U){"use strict";U.d(ne,"a",function(){return H});function Q(I,W){let P;return W.length===0?P=I:P=I.replace(/\{(\d+)\}/g,function(R,K){const N=K[0];return typeof W[N]!="undefined"?W[N]:R}),P}function H(I,W,...P){return Q(W,P)}},"55Ip":function(Ne,ne,U){"use strict";U.d(ne,"a",function(){return r});var Q=U("Ty5D"),H=U("dI71"),I=U("q1tI"),W=U.n(I),P=U("YS25"),R=U("17x9"),K=U.n(R),N=U("wx14"),e=U("zLVn"),C=U("9R94"),g=function(h){Object(H.a)(o,h);function o(){for(var b,p=arguments.length,d=new Array(p),A=0;A
=0||p.relatedTarget.className.indexOf("".concat(S,"-next"))>=0))return;h.setState({goInputText:""}),D(h.getValidValue())},h.go=function(p){var d=h.state.goInputText;if(d==="")return;(p.keyCode===s.ENTER||p.type==="click")&&(h.setState({goInputText:""}),h.props.quickGo(h.getValidValue()))},h}return Object(P.a)(f,[{key:"getValidValue",value:function(){var o=this.state,u=o.goInputText,b=o.current;return!u||isNaN(u)?b:Number(u)}},{key:"getPageSizeOptions",value:function(){var o=this.props,u=o.pageSize,b=o.pageSizeOptions;return b.some(function(p){return p.toString()===u.toString()})?b:b.concat([u.toString()]).sort(function(p,d){var A=isNaN(Number(p))?0:Number(p),D=isNaN(Number(d))?0:Number(d);return A-D})}},{key:"render",value:function(){var o=this,u=this.props,b=u.pageSize,p=u.locale,d=u.rootPrefixCls,A=u.changeSize,D=u.quickGo,S=u.goButton,L=u.selectComponentClass,M=u.buildOptionText,O=u.selectPrefixCls,j=u.disabled,G=this.state.goInputText,X="".concat(d,"-options"),te=L,fe=null,ve=null,he=null;if(!A&&!D)return null;var xe=this.getPageSizeOptions();if(A&&te){var Se=xe.map(function(de,ie){return e.a.createElement(te.Option,{key:ie,value:de.toString()},(M||o.buildOptionText)(de))});fe=e.a.createElement(te,{disabled:j,prefixCls:O,showSearch:!1,className:"".concat(X,"-size-changer"),optionLabelProp:"children",dropdownMatchSelectWidth:!1,value:(b||xe[0]).toString(),onChange:this.changeSize,getPopupContainer:function(ie){return ie.parentNode}},Se)}return D&&(S&&(he=typeof S=="boolean"?e.a.createElement("button",{type:"button",onClick:this.go,onKeyUp:this.go,disabled:j,className:"".concat(X,"-quick-jumper-button")},p.jump_to_confirm):e.a.createElement("span",{onClick:this.go,onKeyUp:this.go},S)),ve=e.a.createElement("div",{className:"".concat(X,"-quick-jumper")},p.jump_to,e.a.createElement("input",{disabled:j,type:"text",value:G,onChange:this.handleChange,onKeyUp:this.go,onBlur:this.handleBlur}),p.page,he)),e.a.createElement("li",{className:"".concat(X)},fe,ve)}}]),f}(e.a.Component);i.defaultProps={pageSizeOptions:["10","20","50","100"]};var l=i,a=U("N2Kk");function n(){}function r(T){return typeof T=="number"&&isFinite(T)&&Math.floor(T)===T}function t(T,_,f){return f}function E(T,_,f){var h=typeof T=="undefined"?_.pageSize:T;return Math.floor((f.total-1)/h)+1}var y=function(T){Object(R.a)(f,T);var _=Object(K.a)(f);function f(h){var o;Object(W.a)(this,f),o=_.call(this,h),o.getJumpPrevPage=function(){return Math.max(1,o.state.current-(o.props.showLessItems?3:5))},o.getJumpNextPage=function(){return Math.min(E(void 0,o.state,o.props),o.state.current+(o.props.showLessItems?3:5))},o.getItemIcon=function(A,D){var S=o.props.prefixCls,L=A||e.a.createElement("button",{type:"button","aria-label":D,className:"".concat(S,"-item-link")});return typeof A=="function"&&(L=e.a.createElement(A,Object(I.a)({},o.props))),L},o.savePaginationNode=function(A){o.paginationNode=A},o.isValid=function(A){return r(A)&&A!==o.state.current},o.shouldDisplayQuickJumper=function(){var A=o.props,D=A.showQuickJumper,S=A.pageSize,L=A.total;return L<=S?!1:D},o.handleKeyDown=function(A){(A.keyCode===s.ARROW_UP||A.keyCode===s.ARROW_DOWN)&&A.preventDefault()},o.handleKeyUp=function(A){var D=o.getValidValue(A),S=o.state.currentInputValue;D!==S&&o.setState({currentInputValue:D}),A.keyCode===s.ENTER?o.handleChange(D):A.keyCode===s.ARROW_UP?o.handleChange(D-1):A.keyCode===s.ARROW_DOWN&&o.handleChange(D+1)},o.changePageSize=function(A){var D=o.state.current,S=E(A,o.state,o.props);D=D>S?S:D,S===0&&(D=o.state.current),typeof A=="number"&&("pageSize"in o.props||o.setState({pageSize:A}),"current"in o.props||o.setState({current:D,currentInputValue:D})),o.props.onShowSizeChange(D,A),"onChange"in o.props&&o.props.onChange&&o.props.onChange(D,A)},o.handleChange=function(A){var D=o.props.disabled,S=A;if(o.isValid(S)&&!D){var L=E(void 0,o.state,o.props);S>L?S=L:S<1&&(S=1),"current"in o.props||o.setState({current:S,currentInputValue:S});var M=o.state.pageSize;return o.props.onChange(S,M),S}return o.state.current},o.prev=function(){o.hasPrev()&&o.handleChange(o.state.current-1)},o.next=function(){o.hasNext()&&o.handleChange(o.state.current+1)},o.jumpPrev=function(){o.handleChange(o.getJumpPrevPage())},o.jumpNext=function(){o.handleChange(o.getJumpNextPage())},o.hasPrev=function(){return o.state.current>1},o.hasNext=function(){return o.state.current2?S-2:0),M=2;M=b?d=b:d=Number(u),d}},{key:"getShowSizeChanger",value:function(){var o=this.props,u=o.showSizeChanger,b=o.total,p=o.totalBoundaryShowSizeChanger;return typeof u!="undefined"?u:b>p}},{key:"renderPrev",value:function(o){var u=this.props,b=u.prevIcon,p=u.itemRender,d=p(o,"prev",this.getItemIcon(b,"prev page")),A=!this.hasPrev();return Object(N.isValidElement)(d)?Object(N.cloneElement)(d,{disabled:A}):d}},{key:"renderNext",value:function(o){var u=this.props,b=u.nextIcon,p=u.itemRender,d=p(o,"next",this.getItemIcon(b,"next page")),A=!this.hasNext();return Object(N.isValidElement)(d)?Object(N.cloneElement)(d,{disabled:A}):d}},{key:"render",value:function(){var o=this,u=this.props,b=u.prefixCls,p=u.className,d=u.style,A=u.disabled,D=u.hideOnSinglePage,S=u.total,L=u.locale,M=u.showQuickJumper,O=u.showLessItems,j=u.showTitle,G=u.showTotal,X=u.simple,te=u.itemRender,fe=u.showPrevNextJumpers,ve=u.jumpPrevIcon,he=u.jumpNextIcon,xe=u.selectComponentClass,Se=u.selectPrefixCls,de=u.pageSizeOptions,ie=this.state,Le=ie.current,Ve=ie.pageSize,Be=ie.currentInputValue;if(D===!0&&S<=Ve)return null;var je=E(void 0,this.state,this.props),Ee=[],Te=null,Re=null,Ie=null,$=null,se=null,ue=M&&M.goButton,ce=O?1:2,_e=Le-1>0?Le-1:0,De=Le+1=ce*2&&Le!==1+2&&(Ee[0]=Object(N.cloneElement)(Ee[0],{className:"".concat(b,"-item-after-jump-prev")}),Ee.unshift(Te)),je-Le>=ce*2&&Le!==je-2&&(Ee[Ee.length-1]=Object(N.cloneElement)(Ee[Ee.length-1],{className:"".concat(b,"-item-before-jump-next")}),Ee.push(Re)),be!==1&&Ee.unshift(Ie),we!==je&&Ee.push($)}var re=null;G&&(re=e.a.createElement("li",{className:"".concat(b,"-total-text")},G(S,[S===0?0:(Le-1)*Ve+1,Le*Ve>S?S:Le*Ve])));var Z=!this.hasPrev()||!je,J=!this.hasNext()||!je;return e.a.createElement("ul",Object(Q.a)({className:g()(b,p,Object(H.a)({},"".concat(b,"-disabled"),A)),style:d,unselectable:"unselectable",ref:this.savePaginationNode},Pe),re,e.a.createElement("li",{title:j?L.prev_page:null,onClick:this.prev,tabIndex:Z?null:0,onKeyPress:this.runIfEnterPrev,className:g()("".concat(b,"-prev"),Object(H.a)({},"".concat(b,"-disabled"),Z)),"aria-disabled":Z},this.renderPrev(_e)),Ee,e.a.createElement("li",{title:j?L.next_page:null,onClick:this.next,tabIndex:J?null:0,onKeyPress:this.runIfEnterNext,className:g()("".concat(b,"-next"),Object(H.a)({},"".concat(b,"-disabled"),J)),"aria-disabled":J},this.renderNext(De)),e.a.createElement(l,{disabled:A,locale:L,rootPrefixCls:b,selectComponentClass:xe,selectPrefixCls:Se,changeSize:this.getShowSizeChanger()?this.changePageSize:null,current:Le,pageSize:Ve,pageSizeOptions:de,quickGo:this.shouldDisplayQuickJumper()?this.handleChange:null,goButton:ue}))}}],[{key:"getDerivedStateFromProps",value:function(o,u){var b={};if("current"in o&&(b.current=o.current,o.current!==u.current&&(b.currentInputValue=b.current)),"pageSize"in o&&o.pageSize!==u.pageSize){var p=u.current,d=E(o.pageSize,u,o);p=p>d?d:p,"current"in o||(b.current=p,b.currentInputValue=p),b.pageSize=o.pageSize}return b}}]),f}(e.a.Component);y.defaultProps={defaultCurrent:1,total:0,defaultPageSize:10,onChange:n,className:"",selectPrefixCls:"rc-select",prefixCls:"rc-pagination",selectComponentClass:null,hideOnSinglePage:!1,showPrevNextJumpers:!0,showQuickJumper:!1,showLessItems:!1,showTitle:!0,onShowSizeChange:n,locale:a.a,style:{},itemRender:t,totalBoundaryShowSizeChanger:50};var m=y},"6RRn":function(Ne,ne,U){"use strict";var Q=U("wCXF"),H=U("n6Qo");U.d(ne,"b",function(){return H.a});var I=U("IBYe"),W=U("6eGT"),P=U("hW8S");U.d(ne,"a",function(){return P.a}),ne.c=Q.b},"6UM0":function(Ne,ne,U){var Q,H;(function(){var I;(function(){"use strict";var P=[function(e,C,g){var v=g(1).Beautifier,c=g(5).Options;function s(i,l){var a=new v(i,l);return a.beautify()}e.exports=s,e.exports.defaultOptions=function(){return new c}},function(e,C,g){var v=g(2).Output,c=g(3).Token,s=g(4),i=g(5).Options,l=g(7).Tokenizer,a=g(7).line_starters,n=g(7).positionable_operators,r=g(7).TOKEN;function t(O,j){return j.indexOf(O)!==-1}function E(O){return O.replace(/^\s+/g,"")}function y(O){for(var j={},G=0;GG&&(G=O.line_indent_level));var X={mode:j,parent:O,last_token:O?O.last_token:new c(r.START_BLOCK,""),last_word:O?O.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:G,alignment:0,line_indent_level:O?O.line_indent_level:G,start_line_index:this._output.get_line_number(),ternary_depth:0};return X},L.prototype._reset=function(O){var j=O.match(/^[\t ]*/)[0];this._last_last_text="",this._output=new v(this._options,j),this._output.raw=this._options.test_output_raw,this._flag_store=[],this.set_mode(u.BlockStatement);var G=new l(O,this._options);return this._tokens=G.tokenize(),O},L.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var O,j=this._reset(this._source_text),G=this._options.eol;this._options.eol==="auto"&&(G=`
`,j&&s.lineBreak.test(j||"")&&(G=j.match(s.lineBreak)[0]));for(var X=this._tokens.next();X;)this.handle_token(X),this._last_last_text=this._flags.last_token.text,this._flags.last_token=X,X=this._tokens.next();return O=this._output.get_code(G),O},L.prototype.handle_token=function(O,j){O.type===r.START_EXPR?this.handle_start_expr(O):O.type===r.END_EXPR?this.handle_end_expr(O):O.type===r.START_BLOCK?this.handle_start_block(O):O.type===r.END_BLOCK?this.handle_end_block(O):O.type===r.WORD?this.handle_word(O):O.type===r.RESERVED?this.handle_word(O):O.type===r.SEMICOLON?this.handle_semicolon(O):O.type===r.STRING?this.handle_string(O):O.type===r.EQUALS?this.handle_equals(O):O.type===r.OPERATOR?this.handle_operator(O):O.type===r.COMMA?this.handle_comma(O):O.type===r.BLOCK_COMMENT?this.handle_block_comment(O,j):O.type===r.COMMENT?this.handle_comment(O,j):O.type===r.DOT?this.handle_dot(O):O.type===r.EOF?this.handle_eof(O):O.type===r.UNKNOWN?this.handle_unknown(O,j):this.handle_unknown(O,j)},L.prototype.handle_whitespace_and_comments=function(O,j){var G=O.newlines,X=this._options.keep_array_indentation&&d(this._flags.mode);if(O.comments_before)for(var te=O.comments_before.next();te;)this.handle_whitespace_and_comments(te,j),this.handle_token(te,j),te=O.comments_before.next();if(X)for(var fe=0;fe0,j);else if(this._options.max_preserve_newlines&&G>this._options.max_preserve_newlines&&(G=this._options.max_preserve_newlines),this._options.preserve_newlines&&G>1){this.print_newline(!1,j);for(var ve=1;ve0&&(!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))},L.prototype.set_mode=function(O){this._flags?(this._flag_store.push(this._flags),this._previous_flags=this._flags):this._previous_flags=this.create_flags(null,O),this._flags=this.create_flags(this._previous_flags,O),this._output.set_indent(this._flags.indentation_level,this._flags.alignment)},L.prototype.restore_mode=function(){this._flag_store.length>0&&(this._previous_flags=this._flags,this._flags=this._flag_store.pop(),this._previous_flags.mode===u.Statement&&b(this._output,this._previous_flags),this._output.set_indent(this._flags.indentation_level,this._flags.alignment))},L.prototype.start_of_object_property=function(){return this._flags.parent.mode===u.ObjectLiteral&&this._flags.mode===u.Statement&&(this._flags.last_token.text===":"&&this._flags.ternary_depth===0||T(this._flags.last_token,["get","set"]))},L.prototype.start_of_statement=function(O){var j=!1;return j=j||T(this._flags.last_token,["var","let","const"])&&O.type===r.WORD,j=j||m(this._flags.last_token,"do"),j=j||!(this._flags.parent.mode===u.ObjectLiteral&&this._flags.mode===u.Statement)&&T(this._flags.last_token,M)&&!O.newlines,j=j||m(this._flags.last_token,"else")&&!(m(O,"if")&&!O.comments_before),j=j||this._flags.last_token.type===r.END_EXPR&&(this._previous_flags.mode===u.ForInitializer||this._previous_flags.mode===u.Conditional),j=j||this._flags.last_token.type===r.WORD&&this._flags.mode===u.BlockStatement&&!this._flags.in_case&&!(O.text==="--"||O.text==="++")&&this._last_last_text!=="function"&&O.type!==r.WORD&&O.type!==r.RESERVED,j=j||this._flags.mode===u.ObjectLiteral&&(this._flags.last_token.text===":"&&this._flags.ternary_depth===0||T(this._flags.last_token,["get","set"])),j?(this.set_mode(u.Statement),this.indent(),this.handle_whitespace_and_comments(O,!0),this.start_of_object_property()||this.allow_wrap_or_preserved_newline(O,T(O,["do","for","if","while"])),!0):!1},L.prototype.handle_start_expr=function(O){this.start_of_statement(O)||this.handle_whitespace_and_comments(O);var j=u.Expression;if(O.text==="["){if(this._flags.last_token.type===r.WORD||this._flags.last_token.text===")"){T(this._flags.last_token,a)&&(this._output.space_before_token=!0),this.print_token(O),this.set_mode(j),this.indent(),this._options.space_in_paren&&(this._output.space_before_token=!0);return}j=u.ArrayLiteral,d(this._flags.mode)&&((this._flags.last_token.text==="["||this._flags.last_token.text===","&&(this._last_last_text==="]"||this._last_last_text==="}"))&&(this._options.keep_array_indentation||this.print_newline())),t(this._flags.last_token.type,[r.START_EXPR,r.END_EXPR,r.WORD,r.OPERATOR,r.DOT])||(this._output.space_before_token=!0)}else{if(this._flags.last_token.type===r.RESERVED)this._flags.last_token.text==="for"?(this._output.space_before_token=this._options.space_before_conditional,j=u.ForInitializer):t(this._flags.last_token.text,["if","while","switch"])?(this._output.space_before_token=this._options.space_before_conditional,j=u.Conditional):t(this._flags.last_word,["await","async"])?this._output.space_before_token=!0:this._flags.last_token.text==="import"&&O.whitespace_before===""?this._output.space_before_token=!1:(t(this._flags.last_token.text,a)||this._flags.last_token.text==="catch")&&(this._output.space_before_token=!0);else if(this._flags.last_token.type===r.EQUALS||this._flags.last_token.type===r.OPERATOR)this.start_of_object_property()||this.allow_wrap_or_preserved_newline(O);else if(this._flags.last_token.type===r.WORD){this._output.space_before_token=!1;var G=this._tokens.peek(-3);if(this._options.space_after_named_function&&G){var X=this._tokens.peek(-4);T(G,["async","function"])||G.text==="*"&&T(X,["async","function"])?this._output.space_before_token=!0:this._flags.mode===u.ObjectLiteral?(G.text==="{"||G.text===","||G.text==="*"&&(X.text==="{"||X.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(O);(this._flags.last_token.type===r.RESERVED&&(this._flags.last_word==="function"||this._flags.last_word==="typeof")||this._flags.last_token.text==="*"&&(t(this._last_last_text,["function","yield"])||this._flags.mode===u.ObjectLiteral&&t(this._last_last_text,["{",","])))&&(this._output.space_before_token=this._options.space_after_anon_function)}this._flags.last_token.text===";"||this._flags.last_token.type===r.START_BLOCK?this.print_newline():(this._flags.last_token.type===r.END_EXPR||this._flags.last_token.type===r.START_EXPR||this._flags.last_token.type===r.END_BLOCK||this._flags.last_token.text==="."||this._flags.last_token.type===r.COMMA)&&this.allow_wrap_or_preserved_newline(O,O.newlines),this.print_token(O),this.set_mode(j),this._options.space_in_paren&&(this._output.space_before_token=!0),this.indent()},L.prototype.handle_end_expr=function(O){for(;this._flags.mode===u.Statement;)this.restore_mode();this.handle_whitespace_and_comments(O),this._flags.multiline_frame&&this.allow_wrap_or_preserved_newline(O,O.text==="]"&&d(this._flags.mode)&&!this._options.keep_array_indentation),this._options.space_in_paren&&(this._flags.last_token.type===r.START_EXPR&&!this._options.space_in_empty_paren?(this._output.trim(),this._output.space_before_token=!1):this._output.space_before_token=!0),this.deindent(),this.print_token(O),this.restore_mode(),b(this._output,this._previous_flags),this._flags.do_while&&this._previous_flags.mode===u.Conditional&&(this._previous_flags.mode=u.Expression,this._flags.do_block=!1,this._flags.do_while=!1)},L.prototype.handle_start_block=function(O){this.handle_whitespace_and_comments(O);var j=this._tokens.peek(),G=this._tokens.peek(1);this._flags.last_word==="switch"&&this._flags.last_token.type===r.END_EXPR?(this.set_mode(u.BlockStatement),this._flags.in_case_statement=!0):this._flags.case_body?this.set_mode(u.BlockStatement):G&&(t(G.text,[":",","])&&t(j.type,[r.STRING,r.WORD,r.RESERVED])||t(j.text,["get","set","..."])&&t(G.type,[r.WORD,r.RESERVED]))?t(this._last_last_text,["class","interface"])&&!t(G.text,[":",","])?this.set_mode(u.BlockStatement):this.set_mode(u.ObjectLiteral):this._flags.last_token.type===r.OPERATOR&&this._flags.last_token.text==="=>"?this.set_mode(u.BlockStatement):t(this._flags.last_token.type,[r.EQUALS,r.START_EXPR,r.COMMA,r.OPERATOR])||T(this._flags.last_token,["return","throw","import","default"])?this.set_mode(u.ObjectLiteral):this.set_mode(u.BlockStatement),this._flags.last_token&&(T(this._flags.last_token.previous,["class","extends"])&&(this._flags.class_start_block=!0));var X=!j.comments_before&&j.text==="}",te=X&&this._flags.last_word==="function"&&this._flags.last_token.type===r.END_EXPR;if(this._options.brace_preserve_inline){var fe=0,ve=null;this._flags.inline_frame=!0;do if(fe+=1,ve=this._tokens.peek(fe-1),ve.newlines){this._flags.inline_frame=!1;break}while(ve.type!==r.EOF&&!(ve.type===r.END_BLOCK&&ve.opened===O))}(this._options.brace_style==="expand"||this._options.brace_style==="none"&&O.newlines)&&!this._flags.inline_frame?this._flags.last_token.type!==r.OPERATOR&&(te||this._flags.last_token.type===r.EQUALS||T(this._flags.last_token,_)&&this._flags.last_token.text!=="else")?this._output.space_before_token=!0:this.print_newline(!1,!0):(d(this._previous_flags.mode)&&(this._flags.last_token.type===r.START_EXPR||this._flags.last_token.type===r.COMMA)&&((this._flags.last_token.type===r.COMMA||this._options.space_in_paren)&&(this._output.space_before_token=!0),(this._flags.last_token.type===r.COMMA||this._flags.last_token.type===r.START_EXPR&&this._flags.inline_frame)&&(this.allow_wrap_or_preserved_newline(O),this._previous_flags.multiline_frame=this._previous_flags.multiline_frame||this._flags.multiline_frame,this._flags.multiline_frame=!1)),this._flags.last_token.type!==r.OPERATOR&&this._flags.last_token.type!==r.START_EXPR&&(this._flags.last_token.type===r.START_BLOCK&&!this._flags.inline_frame?this.print_newline():this._output.space_before_token=!0)),this.print_token(O),this.indent(),!X&&!(this._options.brace_preserve_inline&&this._flags.inline_frame)&&this.print_newline()},L.prototype.handle_end_block=function(O){for(this.handle_whitespace_and_comments(O);this._flags.mode===u.Statement;)this.restore_mode();var j=this._flags.last_token.type===r.START_BLOCK;this._flags.inline_frame&&!j?this._output.space_before_token=!0:this._options.brace_style==="expand"?j||this.print_newline():j||(d(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(O)},L.prototype.handle_word=function(O){if(O.type===r.RESERVED){if(t(O.text,["set","get"])&&this._flags.mode!==u.ObjectLiteral)O.type=r.WORD;else if(O.text==="import"&&t(this._tokens.peek().text,["(","."]))O.type=r.WORD;else if(t(O.text,["as","from"])&&!this._flags.import_block)O.type=r.WORD;else if(this._flags.mode===u.ObjectLiteral){var j=this._tokens.peek();j.text===":"&&(O.type=r.WORD)}}if(this.start_of_statement(O)?T(this._flags.last_token,["var","let","const"])&&O.type===r.WORD&&(this._flags.declaration_statement=!0):O.newlines&&!A(this._flags.mode)&&(this._flags.last_token.type!==r.OPERATOR||this._flags.last_token.text==="--"||this._flags.last_token.text==="++")&&this._flags.last_token.type!==r.EQUALS&&(this._options.preserve_newlines||!T(this._flags.last_token,["var","let","const","set","get"]))?(this.handle_whitespace_and_comments(O),this.print_newline()):this.handle_whitespace_and_comments(O),this._flags.do_block&&!this._flags.do_while)if(m(O,"while")){this._output.space_before_token=!0,this.print_token(O),this._output.space_before_token=!0,this._flags.do_while=!0;return}else this.print_newline(),this._flags.do_block=!1;if(this._flags.if_block)if(!this._flags.else_block&&m(O,"else"))this._flags.else_block=!0;else{for(;this._flags.mode===u.Statement;)this.restore_mode();this._flags.if_block=!1,this._flags.else_block=!1}if(this._flags.in_case_statement&&T(O,["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(O),this._flags.in_case=!0;return}if((this._flags.last_token.type===r.COMMA||this._flags.last_token.type===r.START_EXPR||this._flags.last_token.type===r.EQUALS||this._flags.last_token.type===r.OPERATOR)&&(this.start_of_object_property()||this.allow_wrap_or_preserved_newline(O)),m(O,"function")){(t(this._flags.last_token.text,["}",";"])||this._output.just_added_newline()&&!(t(this._flags.last_token.text,["(","[","{",":","=",","])||this._flags.last_token.type===r.OPERATOR))&&(!this._output.just_added_blankline()&&!O.comments_before&&(this.print_newline(),this.print_newline(!0))),this._flags.last_token.type===r.RESERVED||this._flags.last_token.type===r.WORD?T(this._flags.last_token,["get","set","new","export"])||T(this._flags.last_token,M)?this._output.space_before_token=!0:m(this._flags.last_token,"default")&&this._last_last_text==="export"?this._output.space_before_token=!0:this._flags.last_token.text==="declare"?this._output.space_before_token=!0:this.print_newline():this._flags.last_token.type===r.OPERATOR||this._flags.last_token.text==="="?this._output.space_before_token=!0:!this._flags.multiline_frame&&(A(this._flags.mode)||d(this._flags.mode))||this.print_newline(),this.print_token(O),this._flags.last_word=O.text;return}var G="NONE";if(this._flags.last_token.type===r.END_BLOCK?this._previous_flags.inline_frame?G="SPACE":T(O,["else","catch","finally","from"])?this._options.brace_style==="expand"||this._options.brace_style==="end-expand"||this._options.brace_style==="none"&&O.newlines?G="NEWLINE":(G="SPACE",this._output.space_before_token=!0):G="NEWLINE":this._flags.last_token.type===r.SEMICOLON&&this._flags.mode===u.BlockStatement?G="NEWLINE":this._flags.last_token.type===r.SEMICOLON&&A(this._flags.mode)?G="SPACE":this._flags.last_token.type===r.STRING?G="NEWLINE":this._flags.last_token.type===r.RESERVED||this._flags.last_token.type===r.WORD||this._flags.last_token.text==="*"&&(t(this._last_last_text,["function","yield"])||this._flags.mode===u.ObjectLiteral&&t(this._last_last_text,["{",","]))?G="SPACE":this._flags.last_token.type===r.START_BLOCK?this._flags.inline_frame?G="SPACE":G="NEWLINE":this._flags.last_token.type===r.END_EXPR&&(this._output.space_before_token=!0,G="NEWLINE"),T(O,a)&&this._flags.last_token.text!==")"&&(this._flags.inline_frame||this._flags.last_token.text==="else"||this._flags.last_token.text==="export"?G="SPACE":G="NEWLINE"),T(O,["else","catch","finally"]))if((!(this._flags.last_token.type===r.END_BLOCK&&this._previous_flags.mode===u.BlockStatement)||this._options.brace_style==="expand"||this._options.brace_style==="end-expand"||this._options.brace_style==="none"&&O.newlines)&&!this._flags.inline_frame)this.print_newline();else{this._output.trim(!0);var X=this._output.current_line;X.last()!=="}"&&this.print_newline(),this._output.space_before_token=!0}else G==="NEWLINE"?T(this._flags.last_token,_)?this._output.space_before_token=!0:this._flags.last_token.text==="declare"&&T(O,["var","let","const"])?this._output.space_before_token=!0:this._flags.last_token.type!==r.END_EXPR?(this._flags.last_token.type!==r.START_EXPR||!T(O,["var","let","const"]))&&this._flags.last_token.text!==":"&&(m(O,"if")&&m(O.previous,"else")?this._output.space_before_token=!0:this.print_newline()):T(O,a)&&this._flags.last_token.text!==")"&&this.print_newline():this._flags.multiline_frame&&d(this._flags.mode)&&this._flags.last_token.text===","&&this._last_last_text==="}"?this.print_newline():G==="SPACE"&&(this._output.space_before_token=!0);O.previous&&(O.previous.type===r.WORD||O.previous.type===r.RESERVED)&&(this._output.space_before_token=!0),this.print_token(O),this._flags.last_word=O.text,O.type===r.RESERVED&&(O.text==="do"?this._flags.do_block=!0:O.text==="if"?this._flags.if_block=!0:O.text==="import"?this._flags.import_block=!0:this._flags.import_block&&m(O,"from")&&(this._flags.import_block=!1))},L.prototype.handle_semicolon=function(O){this.start_of_statement(O)?this._output.space_before_token=!1:this.handle_whitespace_and_comments(O);for(var j=this._tokens.peek();this._flags.mode===u.Statement&&!(this._flags.if_block&&m(j,"else"))&&!this._flags.do_block;)this.restore_mode();this._flags.import_block&&(this._flags.import_block=!1),this.print_token(O)},L.prototype.handle_string=function(O){O.text.startsWith("`")&&O.newlines===0&&O.whitespace_before===""&&(O.previous.text===")"||this._flags.last_token.type===r.WORD)||(this.start_of_statement(O)?this._output.space_before_token=!0:(this.handle_whitespace_and_comments(O),this._flags.last_token.type===r.RESERVED||this._flags.last_token.type===r.WORD||this._flags.inline_frame?this._output.space_before_token=!0:this._flags.last_token.type===r.COMMA||this._flags.last_token.type===r.START_EXPR||this._flags.last_token.type===r.EQUALS||this._flags.last_token.type===r.OPERATOR?this.start_of_object_property()||this.allow_wrap_or_preserved_newline(O):O.text.startsWith("`")&&this._flags.last_token.type===r.END_EXPR&&(O.previous.text==="]"||O.previous.text===")")&&O.newlines===0?this._output.space_before_token=!0:this.print_newline())),this.print_token(O)},L.prototype.handle_equals=function(O){this.start_of_statement(O)||this.handle_whitespace_and_comments(O),this._flags.declaration_statement&&(this._flags.declaration_assignment=!0),this._output.space_before_token=!0,this.print_token(O),this._output.space_before_token=!0},L.prototype.handle_comma=function(O){this.handle_whitespace_and_comments(O,!0),this.print_token(O),this._output.space_before_token=!0,this._flags.declaration_statement?(A(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(O)):this._flags.mode===u.ObjectLiteral||this._flags.mode===u.Statement&&this._flags.parent.mode===u.ObjectLiteral?(this._flags.mode===u.Statement&&this.restore_mode(),this._flags.inline_frame||this.print_newline()):this._options.comma_first&&this.allow_wrap_or_preserved_newline(O)},L.prototype.handle_operator=function(O){var j=O.text==="*"&&(T(this._flags.last_token,["function","yield"])||t(this._flags.last_token.type,[r.START_BLOCK,r.COMMA,r.END_BLOCK,r.SEMICOLON])),G=t(O.text,["-","+"])&&(t(this._flags.last_token.type,[r.START_BLOCK,r.START_EXPR,r.EQUALS,r.OPERATOR])||t(this._flags.last_token.text,a)||this._flags.last_token.text===",");if(!this.start_of_statement(O)){var X=!j;this.handle_whitespace_and_comments(O,X)}if(O.text==="*"&&this._flags.last_token.type===r.DOT){this.print_token(O);return}if(O.text==="::"){this.print_token(O);return}if(this._flags.last_token.type===r.OPERATOR&&t(this._options.operator_position,o)&&this.allow_wrap_or_preserved_newline(O),O.text===":"&&this._flags.in_case){this.print_token(O),this._flags.in_case=!1,this._flags.case_body=!0,this._tokens.peek().type!==r.START_BLOCK?(this.indent(),this.print_newline(),this._flags.case_block=!1):(this._flags.case_block=!0,this._output.space_before_token=!0);return}var te=!0,fe=!0,ve=!1;if(O.text===":"?this._flags.ternary_depth===0?te=!1:(this._flags.ternary_depth-=1,ve=!0):O.text==="?"&&(this._flags.ternary_depth+=1),!G&&!j&&this._options.preserve_newlines&&t(O.text,n)){var he=O.text===":",xe=he&&ve,Se=he&&!ve;switch(this._options.operator_position){case h.before_newline:this._output.space_before_token=!Se,this.print_token(O),(!he||xe)&&this.allow_wrap_or_preserved_newline(O),this._output.space_before_token=!0;return;case h.after_newline:this._output.space_before_token=!0,!he||xe?this._tokens.peek().newlines?this.print_newline(!1,!0):this.allow_wrap_or_preserved_newline(O):this._output.space_before_token=!1,this.print_token(O),this._output.space_before_token=!0;return;case h.preserve_newline:Se||this.allow_wrap_or_preserved_newline(O),te=!(this._output.just_added_newline()||Se),this._output.space_before_token=te,this.print_token(O),this._output.space_before_token=!0;return}}if(j){this.allow_wrap_or_preserved_newline(O),te=!1;var de=this._tokens.peek();fe=de&&t(de.type,[r.WORD,r.RESERVED])}else if(O.text==="...")this.allow_wrap_or_preserved_newline(O),te=this._flags.last_token.type===r.START_BLOCK,fe=!1;else if(t(O.text,["--","++","!","~"])||G){if((this._flags.last_token.type===r.COMMA||this._flags.last_token.type===r.START_EXPR)&&this.allow_wrap_or_preserved_newline(O),te=!1,fe=!1,O.newlines&&(O.text==="--"||O.text==="++"||O.text==="~")){var ie=T(this._flags.last_token,_)&&O.newlines;ie&&(this._previous_flags.if_block||this._previous_flags.else_block)&&this.restore_mode(),this.print_newline(ie,!0)}this._flags.last_token.text===";"&&A(this._flags.mode)&&(te=!0),this._flags.last_token.type===r.RESERVED?te=!0:this._flags.last_token.type===r.END_EXPR?te=!(this._flags.last_token.text==="]"&&(O.text==="--"||O.text==="++")):this._flags.last_token.type===r.OPERATOR&&(te=t(O.text,["--","-","++","+"])&&t(this._flags.last_token.text,["--","-","++","+"]),t(O.text,["+","-"])&&t(this._flags.last_token.text,["--","++"])&&(fe=!0)),(this._flags.mode===u.BlockStatement&&!this._flags.inline_frame||this._flags.mode===u.Statement)&&(this._flags.last_token.text==="{"||this._flags.last_token.text===";")&&this.print_newline()}this._output.space_before_token=this._output.space_before_token||te,this.print_token(O),this._output.space_before_token=fe},L.prototype.handle_block_comment=function(O,j){if(this._output.raw){this._output.add_raw_token(O),O.directives&&O.directives.preserve==="end"&&(this._output.raw=this._options.test_output_raw);return}if(O.directives){this.print_newline(!1,j),this.print_token(O),O.directives.preserve==="start"&&(this._output.raw=!0),this.print_newline(!1,!0);return}if(!s.newline.test(O.text)&&!O.newlines){this._output.space_before_token=!0,this.print_token(O),this._output.space_before_token=!0;return}else this.print_block_commment(O,j)},L.prototype.print_block_commment=function(O,j){var G=p(O.text),X,te=!1,fe=!1,ve=O.whitespace_before,he=ve.length;if(this.print_newline(!1,j),this.print_token_line_indentation(O),this._output.add_token(G[0]),this.print_newline(!1,j),G.length>1){for(G=G.slice(1),te=D(G,"*"),fe=S(G,ve),te&&(this._flags.alignment=1),X=0;X=0;s--)if(this.__items[s].match(c))return!0;return!1},C.prototype.set_indent=function(c,s){this.is_empty()&&(this.__indent_count=c||0,this.__alignment_count=s||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},C.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)},C.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},C.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var c=this.__parent.current_line;return c.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),c.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),c.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,c.__items[0]===" "&&(c.__items.splice(0,1),c.__character_count-=1),!0}return!1},C.prototype.is_empty=function(){return this.__items.length===0},C.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},C.prototype.push=function(c){this.__items.push(c);var s=c.lastIndexOf(`
`);s!==-1?this.__character_count=c.length-s:this.__character_count+=c.length},C.prototype.pop=function(){var c=null;return this.is_empty()||(c=this.__items.pop(),this.__character_count-=c.length),c},C.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},C.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},C.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},C.prototype.toString=function(){var c="";return this.is_empty()?this.__parent.indent_empty_lines&&(c=this.__parent.get_indent_string(this.__indent_count)):(c=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),c+=this.__items.join("")),c};function g(c,s){this.__cache=[""],this.__indent_size=c.indent_size,this.__indent_string=c.indent_char,c.indent_with_tabs||(this.__indent_string=new Array(c.indent_size+1).join(c.indent_char)),s=s||"",c.indent_level>0&&(s=new Array(c.indent_level+1).join(this.__indent_string)),this.__base_string=s,this.__base_string_length=s.length}g.prototype.get_indent_size=function(c,s){var i=this.__base_string_length;return s=s||0,c<0&&(i=0),i+=c*this.__indent_size,i+=s,i},g.prototype.get_indent_string=function(c,s){var i=this.__base_string;return s=s||0,c<0&&(c=0,i=""),s+=c*this.__indent_size,this.__ensure_cache(s),i+=this.__cache[s],i},g.prototype.__ensure_cache=function(c){for(;c>=this.__cache.length;)this.__add_column()},g.prototype.__add_column=function(){var c=this.__cache.length,s=0,i="";this.__indent_size&&c>=this.__indent_size&&(s=Math.floor(c/this.__indent_size),c-=s*this.__indent_size,i=new Array(s+1).join(this.__indent_string)),c&&(i+=new Array(c+1).join(" ")),this.__cache.push(i)};function v(c,s){this.__indent_cache=new g(c,s),this.raw=!1,this._end_with_newline=c.end_with_newline,this.indent_size=c.indent_size,this.wrap_line_length=c.wrap_line_length,this.indent_empty_lines=c.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new C(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}v.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},v.prototype.get_line_number=function(){return this.__lines.length},v.prototype.get_indent_string=function(c,s){return this.__indent_cache.get_indent_string(c,s)},v.prototype.get_indent_size=function(c,s){return this.__indent_cache.get_indent_size(c,s)},v.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},v.prototype.add_new_line=function(c){return this.is_empty()||!c&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},v.prototype.get_code=function(c){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 c!==`
`&&(i=i.replace(/[\n]/g,c)),i},v.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},v.prototype.set_indent=function(c,s){return c=c||0,s=s||0,this.next_line.set_indent(c,s),this.__lines.length>1?(this.current_line.set_indent(c,s),!0):(this.current_line.set_indent(),!1)},v.prototype.add_raw_token=function(c){for(var s=0;s1&&this.current_line.is_empty();)this.__lines.pop(),this.current_line=this.__lines[this.__lines.length-1],this.current_line.trim();this.previous_line=this.__lines.length>1?this.__lines[this.__lines.length-2]:null},v.prototype.just_added_newline=function(){return this.current_line.is_empty()},v.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},v.prototype.ensure_empty_line_above=function(c,s){for(var i=this.__lines.length-2;i>=0;){var l=this.__lines[i];if(l.is_empty())break;if(l.item(0).indexOf(c)!==0&&l.item(-1)!==s){this.__lines.splice(i+1,0,new C(this)),this.previous_line=this.__lines[this.__lines.length-2];break}i--}},e.exports.Output=v},function(e){function C(g,v,c,s){this.type=g,this.text=v,this.comments_before=null,this.newlines=c||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=C},function(e,C){var g="\\x23\\x24\\x40\\x41-\\x5a\\x5f\\x61-\\x7a",v="\\x24\\x30-\\x39\\x41-\\x5a\\x5f\\x61-\\x7a",c="\\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}|["+g+c+"])",l="(?:\\\\u[0-9a-fA-F]{4}|["+v+c+s+"])*";C.identifier=new RegExp(i+l,"g"),C.identifierStart=new RegExp(i),C.identifierMatch=new RegExp("(?:\\\\u[0-9a-fA-F]{4}|["+v+c+s+"])+");var a=/[\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff]/;C.newline=/[\n\r\u2028\u2029]/,C.lineBreak=new RegExp(`\r
|`+C.newline.source),C.allLineBreaks=new RegExp(C.lineBreak.source,"g")},function(e,C,g){var v=g(6).Options,c=["before-newline","after-newline","preserve-newline"];function s(i){v.call(this,i,"js");var l=this.raw_options.brace_style||null;l==="expand-strict"?this.raw_options.brace_style="expand":l==="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 a=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_preserve_inline=!1,this.brace_style="collapse";for(var n=0;n>> === !== &&= ??= ||= << && >= ** != == <= >> || ?? |> < / - + > : & % ? ^ | *".split(" "),f=">>>= ... >>= <<= === >>> !== **= &&= ??= ||= => ^= :: /= << <= == && -= >= >> != -- += ** || ?? ++ %= &= *= |= |> = ! ? > < : / ^ - + * & % ~ |";f=f.replace(/[-[\]{}()*+?.,\\^$|#]/g,"\\$&"),f="\\?\\.(?!\\d) "+f,f=f.replace(/ /g,"|");var h=new RegExp(f),o="continue,try,throw,return,var,let,const,if,switch,case,default,for,while,break,function,import,export".split(","),u=o.concat(["do","in","of","else","get","set","new","catch","finally","typeof","yield","async","await","from","as","class","extends"]),b=new RegExp("^(?:"+u.join("|")+")$"),p,d=function(D,S){c.call(this,D,S),this._patterns.whitespace=this._patterns.whitespace.matching(/\u00A0\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff/.source,/\u2028\u2029/.source);var L=new a(this._input),M=new n(this._input).read_options(this._options);this.__patterns={template:M,identifier:M.starting_with(l.identifier).matching(l.identifierMatch),number:L.matching(y),punct:L.matching(h),comment:L.starting_with(/\/\//).until(/[\n\r\u2028\u2029]/),block_comment:L.starting_with(/\/\*/).until_after(/\*\//),html_comment_start:L.matching(//),include:L.starting_with(/#include/).until_after(l.lineBreak),shebang:L.starting_with(/#!/).until_after(l.lineBreak),xml:L.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:M.until(/['\\\n\r\u2028\u2029]/),double_quote:M.until(/["\\\n\r\u2028\u2029]/),template_text:M.until(/[`\\$]/),template_expression:M.until(/[`}\\]/)}};d.prototype=new c,d.prototype._is_comment=function(D){return D.type===t.COMMENT||D.type===t.BLOCK_COMMENT||D.type===t.UNKNOWN},d.prototype._is_opening=function(D){return D.type===t.START_BLOCK||D.type===t.START_EXPR},d.prototype._is_closing=function(D,S){return(D.type===t.END_BLOCK||D.type===t.END_EXPR)&&S&&(D.text==="]"&&S.text==="["||D.text===")"&&S.text==="("||D.text==="}"&&S.text==="{")},d.prototype._reset=function(){p=!1},d.prototype._get_next_token=function(D,S){var L=null;this._readWhitespace();var M=this._input.peek();return M===null?this._create_token(t.EOF,""):(L=L||this._read_non_javascript(M),L=L||this._read_string(M),L=L||this._read_word(D),L=L||this._read_singles(M),L=L||this._read_comment(M),L=L||this._read_regexp(M,D),L=L||this._read_xml(M,D),L=L||this._read_punctuation(),L=L||this._create_token(t.UNKNOWN,this._input.next()),L)},d.prototype._read_word=function(D){var S;if(S=this.__patterns.identifier.read(),S!=="")return S=S.replace(l.allLineBreaks,`
`),!(D.type===t.DOT||D.type===t.RESERVED&&(D.text==="set"||D.text==="get"))&&b.test(S)?(S==="in"||S==="of")&&(D.type===t.WORD||D.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)},d.prototype._read_singles=function(D){var S=null;return D==="("||D==="["?S=this._create_token(t.START_EXPR,D):D===")"||D==="]"?S=this._create_token(t.END_EXPR,D):D==="{"?S=this._create_token(t.START_BLOCK,D):D==="}"?S=this._create_token(t.END_BLOCK,D):D===";"?S=this._create_token(t.SEMICOLON,D):D==="."&&T.test(this._input.peek(1))?S=this._create_token(t.DOT,D):D===","&&(S=this._create_token(t.COMMA,D)),S&&this._input.next(),S},d.prototype._read_punctuation=function(){var D=this.__patterns.punct.read();if(D!=="")return D==="="?this._create_token(t.EQUALS,D):D==="?."?this._create_token(t.DOT,D):this._create_token(t.OPERATOR,D)},d.prototype._read_non_javascript=function(D){var S="";if(D==="#"){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()+`
`);D=this._input.next();var L="#";if(this._input.hasNext()&&this._input.testChar(m)){do D=this._input.next(),L+=D;while(this._input.hasNext()&&D!=="#"&&D!=="=");return D==="#"||(this._input.peek()==="["&&this._input.peek(1)==="]"?(L+="[]",this._input.next(),this._input.next()):this._input.peek()==="{"&&this._input.peek(1)==="}"&&(L+="{}",this._input.next(),this._input.next())),this._create_token(t.WORD,L)}this._input.back()}else if(D==="<"&&this._is_first_token()){if(S=this.__patterns.html_comment_start.read(),S){for(;this._input.hasNext()&&!this._input.testChar(l.newline);)S+=this._input.next();return p=!0,this._create_token(t.COMMENT,S)}}else if(p&&D==="-"&&(S=this.__patterns.html_comment_end.read(),S))return p=!1,this._create_token(t.COMMENT,S);return null},d.prototype._read_comment=function(D){var S=null;if(D==="/"){var L="";if(this._input.peek(1)==="*"){L=this.__patterns.block_comment.read();var M=E.get_directives(L);M&&M.ignore==="start"&&(L+=E.readIgnored(this._input)),L=L.replace(l.allLineBreaks,`
`),S=this._create_token(t.BLOCK_COMMENT,L),S.directives=M}else this._input.peek(1)==="/"&&(L=this.__patterns.comment.read(),S=this._create_token(t.COMMENT,L))}return S},d.prototype._read_string=function(D){if(D==="`"||D==="'"||D==='"'){var S=this._input.next();return this.has_char_escapes=!1,D==="`"?S+=this._read_string_recursive("`",!0,"${"):S+=this._read_string_recursive(D),this.has_char_escapes&&this._options.unescape_strings&&(S=A(S)),this._input.peek()===D&&(S+=this._input.next()),S=S.replace(l.allLineBreaks,`
`),this._create_token(t.STRING,S)}return null},d.prototype._allow_regexp_or_xml=function(D){return D.type===t.RESERVED&&r(D.text,["return","case","throw","else","do","typeof","yield"])||D.type===t.END_EXPR&&D.text===")"&&D.opened.previous.type===t.RESERVED&&r(D.opened.previous.text,["if","while","for"])||r(D.type,[t.COMMENT,t.START_EXPR,t.START_BLOCK,t.START,t.END_BLOCK,t.OPERATOR,t.EQUALS,t.EOF,t.SEMICOLON,t.COMMA])},d.prototype._read_regexp=function(D,S){if(D==="/"&&this._allow_regexp_or_xml(S)){for(var L=this._input.next(),M=!1,O=!1;this._input.hasNext()&&(M||O||this._input.peek()!==D)&&!this._input.testChar(l.newline);)L+=this._input.peek(),M?M=!1:(M=this._input.peek()==="\\",this._input.peek()==="["?O=!0:this._input.peek()==="]"&&(O=!1)),this._input.next();return this._input.peek()===D&&(L+=this._input.next(),L+=this._input.read(l.identifier)),this._create_token(t.STRING,L)}return null},d.prototype._read_xml=function(D,S){if(this._options.e4x&&D==="<"&&this._allow_regexp_or_xml(S)){var L="",M=this.__patterns.xml.read_match();if(M){for(var O=M[2].replace(/^{\s+/,"{").replace(/\s+}$/,"}"),j=O.indexOf("{")===0,G=0;M;){var X=!!M[1],te=M[2],fe=!!M[M.length-1]||te.slice(0,8)==="![CDATA[";if(!fe&&(te===O||j&&te.replace(/^{\s+/,"{").replace(/\s+}$/,"}"))&&(X?--G:++G),L+=M[0],G<=0)break;M=this.__patterns.xml.read_match()}return M||(L+=this._input.match(/[\s\S]*/g)[0]),L=L.replace(l.allLineBreaks,`
`),this._create_token(t.STRING,L)}}return null};function A(D){for(var S="",L=0,M=new v(D),O=null;M.hasNext();)if(O=M.match(/([\s]|[^\\]|\\\\)+/g),O&&(S+=O[0]),M.peek()==="\\"){if(M.next(),M.peek()==="x")O=M.match(/x([0-9A-Fa-f]{2})/g);else if(M.peek()==="u")O=M.match(/u([0-9A-Fa-f]{4})/g);else{S+="\\",M.hasNext()&&(S+=M.next());continue}if(!O)return D;if(L=parseInt(O[1],16),L>126&&L<=255&&O[0].indexOf("x")===0)return D;if(L>=0&&L<32){S+="\\"+O[0];continue}else L===34||L===39||L===92?S+="\\"+String.fromCharCode(L):S+=String.fromCharCode(L)}return S}d.prototype._read_string_recursive=function(D,S,L){var M,O;D==="'"?O=this.__patterns.single_quote:D==='"'?O=this.__patterns.double_quote:D==="`"?O=this.__patterns.template_text:D==="}"&&(O=this.__patterns.template_expression);for(var j=O.read(),G="";this._input.hasNext();){if(G=this._input.next(),G===D||!S&&l.newline.test(G)){this._input.back();break}else G==="\\"&&this._input.hasNext()?(M=this._input.peek(),M==="x"||M==="u"?this.has_char_escapes=!0:M==="\r"&&this._input.peek(1)===`
`&&this._input.next(),G+=this._input.next()):L&&(L==="${"&&G==="$"&&this._input.peek()==="{"&&(G+=this._input.next()),L===G&&(D==="`"?G+=this._read_string_recursive("}",S,"`"):G+=this._read_string_recursive("`",S,"${"),this._input.hasNext()&&(G+=this._input.next())));G+=O.read(),j+=G}return j},e.exports.Tokenizer=d,e.exports.TOKEN=t,e.exports.positionable_operators=_.slice(),e.exports.line_starters=o.slice()},function(e){var C=RegExp.prototype.hasOwnProperty("sticky");function g(v){this.__input=v||"",this.__input_length=this.__input.length,this.__position=0}g.prototype.restart=function(){this.__position=0},g.prototype.back=function(){this.__position>0&&(this.__position-=1)},g.prototype.hasNext=function(){return this.__position=0&&v=0&&c=v.length&&this.__input.substring(c-v.length,c).toLowerCase()===v},e.exports.InputScanner=g},function(e,C,g){var v=g(8).InputScanner,c=g(3).Token,s=g(10).TokenStream,i=g(11).WhitespacePattern,l={START:"TK_START",RAW:"TK_RAW",EOF:"TK_EOF"},a=function(n,r){this._input=new v(n),this._options=r||{},this.__tokens=null,this._patterns={},this._patterns.whitespace=new i(this._input)};a.prototype.tokenize=function(){this._input.restart(),this.__tokens=new s,this._reset();for(var n,r=new c(l.START,""),t=null,E=[],y=new s;r.type!==l.EOF;){for(n=this._get_next_token(r,t);this._is_comment(n);)y.add(n),n=this._get_next_token(r,t);y.isEmpty()||(n.comments_before=y,y=new s),n.parent=t,this._is_opening(n)?(E.push(t),t=n):t&&this._is_closing(n,t)&&(n.opened=t,t.closed=n,t=E.pop(),n.parent=t),n.previous=r,r.next=n,this.__tokens.add(n),r=n}return this.__tokens},a.prototype._is_first_token=function(){return this.__tokens.isEmpty()},a.prototype._reset=function(){},a.prototype._get_next_token=function(n,r){this._readWhitespace();var t=this._input.read(/.+/g);return t?this._create_token(l.RAW,t):this._create_token(l.EOF,"")},a.prototype._is_comment=function(n){return!1},a.prototype._is_opening=function(n){return!1},a.prototype._is_closing=function(n,r){return!1},a.prototype._create_token=function(n,r){var t=new c(n,r,this._patterns.whitespace.newline_count,this._patterns.whitespace.whitespace_before_token);return t},a.prototype._readWhitespace=function(){return this._patterns.whitespace.read()},e.exports.Tokenizer=a,e.exports.TOKEN=l},function(e){function C(g){this.__tokens=[],this.__tokens_length=this.__tokens.length,this.__position=0,this.__parent_token=g}C.prototype.restart=function(){this.__position=0},C.prototype.isEmpty=function(){return this.__tokens_length===0},C.prototype.hasNext=function(){return this.__position=0&&g/),erb:a.starting_with(/<%[^%]/).until_after(/[^%]%>/),django:a.starting_with(/{%/).until_after(/%}/),django_value:a.starting_with(/{{/).until_after(/}}/),django_comment:a.starting_with(/{#/).until_after(/#}/),smarty:a.starting_with(/{(?=[^}{\s\n])/).until_after(/[^\s\n]}/),smarty_comment:a.starting_with(/{\*/).until_after(/\*}/),smarty_literal:a.starting_with(/{literal}/).until_after(/{\/literal}/)}}s.prototype=new v,s.prototype._create=function(){return new s(this._input,this)},s.prototype._update=function(){this.__set_templated_pattern()},s.prototype.disable=function(i){var l=this._create();return l._disabled[i]=!0,l._update(),l},s.prototype.read_options=function(i){var l=this._create();for(var a in c)l._disabled[a]=i.templating.indexOf(a)===-1;return l._update(),l},s.prototype.exclude=function(i){var l=this._create();return l._excluded[i]=!0,l._update(),l},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 l=this._read_template();l;)this._match_pattern?l+=this._input.read(this._match_pattern):l+=this._input.readUntil(this.__template_pattern),i+=l,l=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="",l=this._input.peek();if(l==="<"){var a=this._input.peek(1);!this._disabled.php&&!this._excluded.php&&a==="?"&&(i=i||this.__patterns.php.read()),!this._disabled.erb&&!this._excluded.erb&&a==="%"&&(i=i||this.__patterns.erb.read())}else l==="{"&&(!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}],R={};function K(e){var C=R[e];if(C!==void 0)return C.exports;var g=R[e]={exports:{}};return P[e](g,g.exports,K),g.exports}var N=K(0);I=N})();var W=I;!(Q=[],H=function(){return{js_beautify:W}}.apply(ne,Q),H!==void 0&&(Ne.exports=H))})()},"6eGT":function(Ne,ne,U){"use strict";function Q(H){return null}ne.a=Q},"746U":function(Ne,ne,U){"use strict";U.d(ne,"f",function(){return Q}),U.d(ne,"l",function(){return H}),U.d(ne,"k",function(){return I}),U.d(ne,"j",function(){return W}),U.d(ne,"g",function(){return P}),U.d(ne,"m",function(){return R}),U.d(ne,"h",function(){return K}),U.d(ne,"n",function(){return N}),U.d(ne,"c",function(){return e}),U.d(ne,"a",function(){return C}),U.d(ne,"i",function(){return g}),U.d(ne,"o",function(){return v}),U.d(ne,"e",function(){return i}),U.d(ne,"d",function(){return l}),U.d(ne,"p",function(){return a}),U.d(ne,"b",function(){return n});function Q(r){return Array.isArray(r)}function H(r){return typeof r=="string"}function I(r){return typeof r=="object"&&r!==null&&!Array.isArray(r)&&!(r instanceof RegExp)&&!(r instanceof Date)}function W(r){return typeof r=="number"&&!isNaN(r)}function P(r){return r===!0||r===!1}function R(r){return typeof r=="undefined"}function K(r){return!N(r)}function N(r){return R(r)||r===null}function e(r,t){if(!r)throw new Error(t?`Unexpected type, expected '${t}'`:"Unexpected type")}function C(r){if(N(r))throw new Error("Assertion Failed: argument is undefined or null");return r}function g(r){return typeof r=="function"}function v(r,t){const E=Math.min(r.length,t.length);for(let y=0;yfunction(){const T=Array.prototype.slice.call(arguments,0);return t(m,T)};let y={};for(const m of r)y[m]=E(m);return y}function a(r){return r===null?void 0:r}function n(r,t="Unreachable"){throw new Error(t)}},"815F":function(Ne,ne,U){"use strict";U.d(ne,"e",function(){return K}),U.d(ne,"c",function(){return e}),U.d(ne,"d",function(){return C}),U.d(ne,"a",function(){return v}),U.d(ne,"f",function(){return c}),U.d(ne,"b",function(){return s});var Q=U("KQm4"),H=U("VTBJ"),I=U("Ff2n"),W=U("Zm9Q"),P=U("Kwbf"),R=U("OZM5");function K(i,l){return i!=null?i:l}function N(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],l=new Map;function a(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";(n||[]).forEach(function(t){var E=t.key,y=t.children;Object(P.a)(E!=null,"Tree node must have a certain key: [".concat(r).concat(E,"]"));var m=String(E);Object(P.a)(!l.has(m)||E===null||E===void 0,"Same 'key' exist in the Tree: ".concat(m)),l.set(m,!0),a(y,"".concat(r).concat(m," > "))})}a(i)}function e(i){function l(a){var n=Object(W.a)(a);return n.map(function(r){if(!Object(R.i)(r))return Object(P.a)(!r,"Tree/TreeNode can only accept TreeNode as children."),null;var t=r.key,E=r.props,y=E.children,m=Object(I.a)(E,["children"]),T=Object(H.a)({key:t},m),_=l(y);return _.length&&(T.children=_),T}).filter(function(r){return r})}return l(i)}function C(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],a=new Set(l===!0?[]:l),n=[];function r(t){var E=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return t.map(function(y,m){var T=Object(R.h)(E?E.pos:"0",m),_=K(y.key,T),f=Object(H.a)(Object(H.a)({},y),{},{parent:E,pos:T,children:null,data:y,isStart:[].concat(Object(Q.a)(E?E.isStart:[]),[m===0]),isEnd:[].concat(Object(Q.a)(E?E.isEnd:[]),[m===t.length-1])});return n.push(f),l===!0||a.has(_)?f.children=r(y.children||[],f):f.children=[],f})}return r(i),n}function g(i,l,a){var n;a?typeof a=="string"?n=function(E){return E[a]}:typeof a=="function"&&(n=function(E){return a(E)}):n=function(E,y){return K(E.key,y)};function r(t,E,y){var m=t?t.children:i,T=t?Object(R.h)(y.pos,E):"0";if(t){var _=n(t,T),f={node:t,index:E,pos:T,key:_,parentPos:y.node?y.pos:null,level:y.level+1};l(f)}m&&m.forEach(function(h,o){r(h,o,{node:t,pos:T,level:y?y.level+1:-1})})}r(null)}function v(i){var l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},a=l.initWrapper,n=l.processEntity,r=l.onProcessFinished,t=arguments.length>2?arguments[2]:void 0,E={},y={},m={posEntities:E,keyEntities:y};return a&&(m=a(m)||m),g(i,function(T){var _=T.node,f=T.index,h=T.pos,o=T.key,u=T.parentPos,b=T.level,p={node:_,index:f,key:o,pos:h,level:b},d=K(o,h);E[h]=p,y[d]=p,p.parent=E[u],p.parent&&(p.parent.children=p.parent.children||[],p.parent.children.push(p)),n&&n(p,m)},t),r&&r(m),m}function c(i,l){var a=l.expandedKeys,n=l.selectedKeys,r=l.loadedKeys,t=l.loadingKeys,E=l.checkedKeys,y=l.halfCheckedKeys,m=l.dragOverNodeKey,T=l.dropPosition,_=l.keyEntities,f=_[i],h={eventKey:i,expanded:a.indexOf(i)!==-1,selected:n.indexOf(i)!==-1,loaded:r.indexOf(i)!==-1,loading:t.indexOf(i)!==-1,checked:E.indexOf(i)!==-1,halfChecked:y.indexOf(i)!==-1,pos:String(f?f.pos:""),dragOver:m===i&&T===0,dragOverGapTop:m===i&&T===-1,dragOverGapBottom:m===i&&T===1};return h}function s(i){var l=i.data,a=i.expanded,n=i.selected,r=i.checked,t=i.loaded,E=i.loading,y=i.halfChecked,m=i.dragOver,T=i.dragOverGapTop,_=i.dragOverGapBottom,f=i.pos,h=i.active,o=Object(H.a)(Object(H.a)({},l),{},{expanded:a,selected:n,checked:r,loaded:t,loading:E,halfChecked:y,dragOver:m,dragOverGapTop:T,dragOverGapBottom:_,pos:f,active:h});return"props"in o||Object.defineProperty(o,"props",{get:function(){return Object(P.a)(!1,"Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`."),i}}),o}},"8HAY":function(Ne,ne,U){"use strict";U.d(ne,"a",function(){return P}),U.d(ne,"b",function(){return R}),U.d(ne,"d",function(){return K}),U.d(ne,"e",function(){return N}),U.d(ne,"c",function(){return e});var Q=U("MI8n"),H=U("pmY6"),I=U("3/fG"),W=function(C,g,v,c){function s(i){return i instanceof v?i:new v(function(l){l(i)})}return new(v||(v=Promise))(function(i,l){function a(t){try{r(c.next(t))}catch(E){l(E)}}function n(t){try{r(c.throw(t))}catch(E){l(E)}}function r(t){t.done?i(t.value):s(t.value).then(a,n)}r((c=c.apply(C,g||[])).next())})};class P extends H.a{constructor(C,g="",v="",c=!0,s){super();this._onDidChange=this._register(new Q.b),this.onDidChange=this._onDidChange.event,this._enabled=!0,this._id=C,this._label=g,this._cssClass=v,this._enabled=c,this._actionCallback=s}get id(){return this._id}get label(){return this._label}set label(C){this._setLabel(C)}_setLabel(C){this._label!==C&&(this._label=C,this._onDidChange.fire({label:C}))}get tooltip(){return this._tooltip||""}set tooltip(C){this._setTooltip(C)}_setTooltip(C){this._tooltip!==C&&(this._tooltip=C,this._onDidChange.fire({tooltip:C}))}get class(){return this._cssClass}set class(C){this._setClass(C)}_setClass(C){this._cssClass!==C&&(this._cssClass=C,this._onDidChange.fire({class:C}))}get enabled(){return this._enabled}set enabled(C){this._setEnabled(C)}_setEnabled(C){this._enabled!==C&&(this._enabled=C,this._onDidChange.fire({enabled:C}))}get checked(){return this._checked}set checked(C){this._setChecked(C)}_setChecked(C){this._checked!==C&&(this._checked=C,this._onDidChange.fire({checked:C}))}run(C,g){return W(this,void 0,void 0,function*(){this._actionCallback&&(yield this._actionCallback(C))})}}class R extends H.a{constructor(){super(...arguments);this._onBeforeRun=this._register(new Q.b),this.onBeforeRun=this._onBeforeRun.event,this._onDidRun=this._register(new Q.b),this.onDidRun=this._onDidRun.event}run(C,g){return W(this,void 0,void 0,function*(){if(!C.enabled)return;this._onBeforeRun.fire({action:C});let v;try{yield this.runAction(C,g)}catch(c){v=c}this._onDidRun.fire({action:C,error:v})})}runAction(C,g){return W(this,void 0,void 0,function*(){yield C.run(g)})}}class K extends P{constructor(C){super(K.ID,C,C?"separator text":"separator");this.checked=!1,this.enabled=!1}}K.ID="vs.actions.separator";class N{constructor(C,g,v,c){this.tooltip="",this.enabled=!0,this.checked=!1,this.id=C,this.label=g,this.class=c,this._actions=v}get actions(){return this._actions}dispose(){}run(){return W(this,void 0,void 0,function*(){})}}class e extends P{constructor(){super(e.ID,I.a("submenu.empty","(empty)"),void 0,!1)}}e.ID="vs.actions.empty"},"8hTe":function(Ne,ne,U){Ne.exports={button:"button___1wy9m"}},"9Bee":function(Ne,ne,U){"use strict";var Q=U("DYRE"),H=U("zeV3"),I=U("+L6B"),W=U("2/Rp"),P=U("k1fw"),R=U("9og8"),K=U("tJVT"),N=U("WmNS"),e=U.n(N),C=U("q1tI"),g=U.n(C),v=U("vg9a"),c=U("DlQD"),s=U.n(c),i=U("rUJ1");function l(B,x){var w=B.match(/^(\s+)(?:```)/);if(w===null)return x;var k=w[1];return x.split(`
`).map(function(z){var F=z.match(/^\s+/);if(F===null)return z;var ae=Object(K.a)(F,1),Ce=ae[0];return Ce.length>=k.length?z.slice(k.length):z}).join(`
`)}var a=[],n=[""],r=new s.a.Renderer,t=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function E(){a.length=0,n=[""]}var y={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function m(B,x,w,k){if(x>=B.length||B[x].level<=w)return x;var z=B[x];k.push("- "+z.text+""),x++;var F=[];return x=m(B,x,z.level,F),F.length>0&&(k.push("
"),F.forEach(function(ae){k.push(ae)}),k.push("
")),k.push(" "),x=m(B,x,w,k),x}function T(){return m(a,0,0,n),n.push("
"),n.join("")}var _={heading:function(x){var w=t.exec(x);if(w)return{type:"heading",raw:w[0],depth:w[1].length,text:w[2]}},fences:function(x){var w=this.rules.block.fences.exec(x);if(w){var k=w[0],z=l(k,w[3]||""),F=w[2]?w[2].trim():w[2];if(["latex","katex","math"].indexOf(F)>=0){var ae=o(),Ce=z;z=ae,u[ae]={type:"block",expression:Ce}}return{type:"code",raw:k,lang:F,text:z}}}},f=/(?:\${2})([^\n`]+?)(?:\${2})/gi,h=0,o=function(){return"__special_katext_id_".concat(h++,"__")},u={};function b(){return u}function p(){h=0,u={}}function d(B){return B=B.replace(f,function(x,w){var k=o();return u[k]={type:"inline",expression:w},k}),B}var A=r.listitem;r.listitem=function(B){return A(d(B))};var D=r.paragraph;r.paragraph=function(B){return D(d(B))};var S=r.tablecell;r.tablecell=function(B,x){return S(d(B),x)},r.code=function(B,x,w){var k=(x||"").match(/\S*/)[0];return k?["latex","katex","math"].indexOf(k)>=0?"".concat(B,"
"):'
').concat(w?B:Object(i.escape)(B,!0),`
`):''+(w?B:Object(i.escape)(B,!0))+"
"},r.heading=function(B,x,w){var k=this.options.headerPrefix+w.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return a.push({anchor:k,level:x,text:B}),"'+B+""},s.a.setOptions({silent:!0,gfm:!0,pedantic:!1}),s.a.use({tokenizer:_,renderer:r});var L=s.a,M=U("SJMd"),O=U("ulZh"),j=U.n(O),G=U("m3rI"),X=U("Oy/b"),te=U("p5ED"),fe=U("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 ve=function(B,x){return(ve=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(w,k){w.__proto__=k}||function(w,k){for(var z in k)Object.prototype.hasOwnProperty.call(k,z)&&(w[z]=k[z])})(B,x)};function he(B,x){function w(){this.constructor=B}ve(B,x),B.prototype=x===null?Object.create(x):(w.prototype=x.prototype,new w)}function xe(B,x,w,k){return new(w||(w=Promise))(function(z,F){function ae($e){try{We(k.next($e))}catch(Ae){F(Ae)}}function Ce($e){try{We(k.throw($e))}catch(Ae){F(Ae)}}function We($e){var Ae;$e.done?z($e.value):(Ae=$e.value,Ae instanceof w?Ae:new w(function(Ze){Ze(Ae)})).then(ae,Ce)}We((k=k.apply(B,x||[])).next())})}function Se(B,x){var w,k,z,F,ae={label:0,sent:function(){if(1&z[0])throw z[1];return z[1]},trys:[],ops:[]};return F={next:Ce(0),throw:Ce(1),return:Ce(2)},typeof Symbol=="function"&&(F[Symbol.iterator]=function(){return this}),F;function Ce(We){return function($e){return function(Ae){if(w)throw new TypeError("Generator is already executing.");for(;ae;)try{if(w=1,k&&(z=2&Ae[0]?k.return:Ae[0]?k.throw||((z=k.return)&&z.call(k),0):k.next)&&!(z=z.call(k,Ae[1])).done)return z;switch(k=0,z&&(Ae=[2&Ae[0],z.value]),Ae[0]){case 0:case 1:z=Ae;break;case 4:return ae.label++,{value:Ae[1],done:!1};case 5:ae.label++,k=Ae[1],Ae=[0];continue;case 7:Ae=ae.ops.pop(),ae.trys.pop();continue;default:if(!(z=ae.trys,(z=z.length>0&&z[z.length-1])||Ae[0]!==6&&Ae[0]!==2)){ae=0;continue}if(Ae[0]===3&&(!z||Ae[1]>z[0]&&Ae[1]',"select"),this.addActionButton(k,'',"delete"),this.uiStyleSettings.clearButtonVisible&&this.addActionButton(k,'',"clear"),this.uiStyleSettings.undoButtonVisible&&this.addActionButton(k,'',"undo"),this.uiStyleSettings.redoButtonVisible&&this.addActionButton(k,'',"redo"),this.uiStyleSettings.zoomButtonVisible&&this.addActionButton(k,'',"zoom"),this.uiStyleSettings.zoomButtonVisible&&this.uiStyleSettings.zoomOutButtonVisible&&this.addActionButton(k,'',"zoom-out"),this.uiStyleSettings.notesButtonVisible&&this.addActionButton(k,'',"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(F){var ae=document.createElement("div");ae.className=""+w.toolbarButtonStyleClass.name,ae.setAttribute("data-type-name",F.typeName),ae.innerHTML=F.icon,ae.addEventListener("click",function(){w.markerToolbarButtonClicked(ae,F)}),w.buttons.push(ae),w.markerButtons.push(ae)}),this.overflowButton=document.createElement("div"),this.overflowButton.className=this.toolbarButtonStyleClass.name+" "+(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name),this.overflowButton.innerHTML='',this.overflowButton.addEventListener("click",this.overflowButtonClicked),this.markerButtonBlock.appendChild(this.overflowButton));var z=document.createElement("div");z.className=this.toolbarBlockStyleClass.name,z.style.whiteSpace="nowrap",z.style.display=this.uiStyleSettings.resultButtonBlockVisible!==!1?"":"none",this.uiContainer.appendChild(z),this.addActionButton(z,'',"render"),this.addActionButton(z,'',"close"),this.markerjsContainer.appendChild(this.uiContainer),this.setSelectMode(),this.setCurrentMarker(),this.adjustLayout()},B.prototype.addButtonClickListener=function(x){this.buttonClickListeners.push(x)},B.prototype.removeButtonClickListener=function(x){this.buttonClickListeners.indexOf(x)>-1&&this.buttonClickListeners.splice(this.buttonClickListeners.indexOf(x),1)},B.prototype.setSelectMode=function(){this.resetButtonStyles(),this.setActiveButton(this.buttons[0])},B.prototype.adjustLayout=function(){if(this.markerButtons&&this.markerButtons.length>0){var x=Math.floor(this.markerButtonBlock.clientWidth/this.uiStyleSettings.toolbarHeight)-1;this.markerButtonBlock.innerHTML="",this.markerButtonOverflowBlock.innerHTML="";for(var w=0;w0&&this.buttonClickListeners.forEach(function(k){return k("marker",w)}),this.markerButtonOverflowBlock.style.display="none"},B.prototype.actionToolbarButtonClicked=function(x,w){this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(k){return k("action",w)}),this.markerButtonOverflowBlock.style.display="none",this.setActiveButton(this.buttons[0])},B.prototype.setActiveButton=function(x){this.resetButtonStyles(),x.className=x.className.replace(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,"").trim(),x.className+=" "+(this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name)},B.prototype.setActiveMarkerButton=function(x){var w=this.markerButtons.find(function(k){return k.getAttribute("data-type-name")===x});w&&this.setActiveButton(w)},B.prototype.setCurrentMarker=function(x){var w=this;this.currentMarker=x,this.buttons.filter(function(k){return/delete|notes/.test(k.getAttribute("data-action"))}).forEach(function(k){w.currentMarker===void 0?(k.style.fillOpacity="0.4",k.style.pointerEvents="none"):(k.style.fillOpacity="1",k.style.pointerEvents="all")})},B}(),Ie=function(){function B(x,w,k,z){this.panels=[],this.panelButtons=[],this.markerjsContainer=x,this.displayMode=w,this.uiStyleSettings=k,this.styles=z,this.panelButtonClick=this.panelButtonClick.bind(this),this.addStyles()}return B.prototype.addStyles=function(){var x;this.toolboxStyleClass=this.styles.addClass(new Te("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 Te("toolbox_colors",`
color: `+this.uiStyleSettings.toolboxColor+`;
`));var w=this.uiStyleSettings.toolbarHeight/4;this.toolboxButtonRowStyleClass=this.styles.addClass(new Te("toolbox-button-row",`
display: flex;
cursor: default;
box-sizing: content-box;
`)),this.toolboxButtonRowStyleColorsClass=this.styles.addClass(new Te("toolbox-button-row_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
`)),this.toolboxPanelRowStyleClass=this.styles.addClass(new Te("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 Te("toolbox-panel-row_colors",`
background-color: `+((x=this.uiStyleSettings.toolboxBackgroundColor)!==null&&x!==void 0?x:this.uiStyleSettings.toolbarBackgroundHoverColor)+`;
`)),this.toolboxButtonStyleClass=this.styles.addClass(new Te("toolbox_button",`
display: inline-block;
width: `+(this.uiStyleSettings.toolbarHeight-2*w)+`px;
height: `+(this.uiStyleSettings.toolbarHeight-2*w)+`px;
padding: `+w+`px;
box-sizing: content-box;
`)),this.toolboxButtonStyleColorsClass=this.styles.addClass(new Te("toolbox-button_colors",`
fill: `+this.uiStyleSettings.toolbarColor+`;
`)),this.toolboxActiveButtonStyleColorsClass=this.styles.addClass(new Te("toolbox-active-button_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`;
fill: `+this.uiStyleSettings.toolbarColor+`;
`)),this.styles.addRule(new Ee("."+this.toolboxButtonStyleColorsClass.name+":hover",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
`)),this.styles.addRule(new Ee("."+this.toolboxButtonStyleClass.name+" svg",`
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
`))},B.prototype.show=function(x){var w;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=x,this.uiContainer.className=this.toolboxStyleClass.name+" "+((w=this.uiStyleSettings.toolboxStyleColorsClassName)!==null&&w!==void 0?w:this.toolboxStyleColorsClass.name),this.markerjsContainer.appendChild(this.uiContainer)},B.prototype.setPanelButtons=function(x){var w,k,z=this;this.panels=x,this.uiContainer!==void 0&&(this.uiContainer.innerHTML="",this.panelRow=document.createElement("div"),this.panelRow.className=this.toolboxPanelRowStyleClass.name+" "+((w=this.uiStyleSettings.toolboxPanelRowStyleColorsClassName)!==null&&w!==void 0?w:this.toolboxPanelRowStyleColorsClass.name),this.uiContainer.appendChild(this.panelRow),this.buttonRow=document.createElement("div"),this.buttonRow.className=this.toolboxButtonRowStyleClass.name+" "+((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(F){var ae;F.uiStyleSettings=z.uiStyleSettings;var Ce=document.createElement("div");Ce.className=z.toolboxButtonStyleClass.name+" "+((ae=z.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&ae!==void 0?ae:z.toolboxButtonStyleColorsClass.name),Ce.innerHTML=F.icon,Ce.title=F.title,Ce.addEventListener("click",function(){z.panelButtonClick(F)}),z.panelButtons.push(Ce),z.buttonRow.appendChild(Ce)}),this.displayMode==="inline"?this.panelRow.style.display="none":this.panelRow.style.visibility="hidden")},B.prototype.panelButtonClick=function(x){var w=this,k=-1;if(x!==this.activePanel){k=this.panels.indexOf(x),this.panelRow.innerHTML="";var z=x.getUi();z.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.panelRow.appendChild(z),this.panelRow.style.display="flex",this.panelRow.style.visibility="visible",this.panelRow.className=this.panelRow.className.replace(this.styles.fadeOutAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeInAnimationClassName,this.activePanel=x}else this.activePanel=void 0,this.panelRow.className=this.panelRow.className.replace(this.styles.fadeInAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeOutAnimationClassName,setTimeout(function(){w.displayMode==="inline"?w.panelRow.style.display="none":w.panelRow.style.visibility="hidden"},200);this.panelButtons.forEach(function(F,ae){var Ce,We;F.className=w.toolboxButtonStyleClass.name+" "+(ae===k?""+((Ce=w.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)!==null&&Ce!==void 0?Ce:w.toolboxActiveButtonStyleColorsClass.name):""+((We=w.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&We!==void 0?We:w.toolboxButtonStyleColorsClass.name))})},B}(),$=function(B,x){this.title=B,this.icon=x},se=function(B){function x(w,k,z,F){var ae=B.call(this,w,F||'')||this;return ae.colors=[],ae.addTransparent=!1,ae.colorBoxes=[],ae.colors=k,ae.currentColor=z,ae.setCurrentColor=ae.setCurrentColor.bind(ae),ae.getColorBox=ae.getColorBox.bind(ae),ae}return he(x,B),x.prototype.getUi=function(){var w=this,k=document.createElement("div");return k.style.overflow="hidden",k.style.whiteSpace="nowrap",this.colors.forEach(function(z){var F=w.getColorBox(z);k.appendChild(F),w.colorBoxes.push(F)}),k},x.prototype.getColorBox=function(w){var k=this,z=this.uiStyleSettings.toolbarHeight/4,F=this.uiStyleSettings.toolbarHeight-z,ae=document.createElement("div");ae.style.display="inline-block",ae.style.boxSizing="content-box",ae.style.width=F-2+"px",ae.style.height=F-2+"px",ae.style.padding="1px",ae.style.marginRight="2px",ae.style.marginBottom="2px",ae.style.borderWidth="2px",ae.style.borderStyle="solid",ae.style.borderRadius=(F+2)/2+"px",ae.style.borderColor=w===this.currentColor?this.uiStyleSettings.toolboxAccentColor:"transparent",ae.addEventListener("click",function(){k.setCurrentColor(w,ae)});var Ce=document.createElement("div");return Ce.style.display="inline-block",Ce.style.width=F-2+"px",Ce.style.height=F-2+"px",Ce.style.backgroundColor=w,Ce.style.borderRadius=F/2+"px",w==="transparent"&&(Ce.style.fill=this.uiStyleSettings.toolboxAccentColor,Ce.innerHTML=``),ae.appendChild(Ce),ae},x.prototype.setCurrentColor=function(w,k){var z=this;this.currentColor=w,this.colorBoxes.forEach(function(F){F.style.borderColor=F===k?z.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onColorChanged&&this.onColorChanged(w)},x}($),ue=function(){function B(x,w,k){this._state="new",this._isSelected=!1,this._container=x,this._overlayContainer=w,this.globalSettings=k,this.stateChanged=this.stateChanged.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this)}return Object.defineProperty(B.prototype,"typeName",{get:function(){return Object.getPrototypeOf(this).constructor.typeName},enumerable:!1,configurable:!0}),Object.defineProperty(B.prototype,"container",{get:function(){return this._container},enumerable:!1,configurable:!0}),Object.defineProperty(B.prototype,"overlayContainer",{get:function(){return this._overlayContainer},enumerable:!1,configurable:!0}),Object.defineProperty(B.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),Object.defineProperty(B.prototype,"toolboxPanels",{get:function(){return[]},enumerable:!1,configurable:!0}),B.prototype.ownsTarget=function(x){return!1},Object.defineProperty(B.prototype,"isSelected",{get:function(){return this._isSelected},enumerable:!1,configurable:!0}),B.prototype.select=function(){this.container.style.cursor="move",this._isSelected=!0,this.manipulationStartState=this.getState()},B.prototype.deselect=function(){this.container.style.cursor="default",this._isSelected=!1,this.stateChanged()},B.prototype.pointerDown=function(x,w){},B.prototype.dblClick=function(x,w){},B.prototype.manipulate=function(x){},B.prototype.pointerUp=function(x){this.stateChanged()},B.prototype.dispose=function(){},B.prototype.addMarkerVisualToContainer=function(x){this.container.childNodes.length>0?this.container.insertBefore(x,this.container.childNodes[0]):this.container.appendChild(x)},B.prototype.getState=function(){return{typeName:B.typeName,state:this.state,notes:this.notes}},B.prototype.restoreState=function(x){this._state=x.state,this.notes=x.notes},B.prototype.scale=function(x,w){},B.prototype.colorChanged=function(x){this.onColorChanged&&this.onColorChanged(x),this.stateChanged()},B.prototype.fillColorChanged=function(x){this.onFillColorChanged&&this.onFillColorChanged(x),this.stateChanged()},B.prototype.stateChanged=function(){if(this.onStateChanged&&this.state!=="creating"&&this.state!=="new"){var x=this.getState();this.manipulationStartState!==void 0&&(this.manipulationStartState.state="select"),x.state="select",JSON.stringify(this.manipulationStartState)!=JSON.stringify(x)&&this.onStateChanged(this)}},B.typeName="MarkerBase",B}(),ce=function(){function B(){this.findGripByVisual=this.findGripByVisual.bind(this)}return B.prototype.findGripByVisual=function(x){return this.topLeft.ownsTarget(x)?this.topLeft:this.topCenter.ownsTarget(x)?this.topCenter:this.topRight.ownsTarget(x)?this.topRight:this.centerLeft.ownsTarget(x)?this.centerLeft:this.centerRight.ownsTarget(x)?this.centerRight:this.bottomLeft.ownsTarget(x)?this.bottomLeft:this.bottomCenter.ownsTarget(x)?this.bottomCenter:this.bottomRight.ownsTarget(x)?this.bottomRight:void 0},B}(),_e=function(){function B(){this.GRIP_SIZE=10,this.visual=ie.createGroup(),this.visual.appendChild(ie.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(ie.createCircle(this.GRIP_SIZE,[["fill","#cccccc"],["fill-opacity","0.7"],["stroke","#333333"],["stroke-width","2"],["stroke-opacity","0.7"]]))}return B.prototype.ownsTarget=function(x){return x===this.visual||x===this.visual.childNodes[0]||x===this.visual.childNodes[1]},B}(),De=function(){function B(){}return B.toITransformMatrix=function(x){return{a:x.a,b:x.b,c:x.c,d:x.d,e:x.e,f:x.f}},B.toSVGMatrix=function(x,w){return x.a=w.a,x.b=w.b,x.c=w.c,x.d=w.d,x.e=w.e,x.f=w.f,x},B}(),Pe=function(B){function x(w,k,z){var F=B.call(this,w,k,z)||this;return F.left=0,F.top=0,F.width=0,F.height=0,F.defaultSize={x:50,y:20},F.offsetX=0,F.offsetY=0,F.rotationAngle=0,F.CB_DISTANCE=10,F._suppressMarkerCreateEvent=!1,F.container.transform.baseVal.appendItem(ie.createTransform()),F.setupControlBox(),F}return he(x,B),Object.defineProperty(x.prototype,"centerX",{get:function(){return this.left+this.width/2},enumerable:!1,configurable:!0}),Object.defineProperty(x.prototype,"centerY",{get:function(){return this.top+this.height/2},enumerable:!1,configurable:!0}),Object.defineProperty(x.prototype,"visual",{get:function(){return this._visual},set:function(w){this._visual=w;var k=ie.createTransform();this._visual.transform.baseVal.appendItem(k)},enumerable:!1,configurable:!0}),x.prototype.ownsTarget=function(w){return!!B.prototype.ownsTarget.call(this,w)||!!(this.controlGrips.findGripByVisual(w)!==void 0||this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(w))},x.prototype.pointerDown=function(w,k){B.prototype.pointerDown.call(this,w,k),this.state==="new"&&(this.left=w.x,this.top=w.y),this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.manipulationStartWidth=this.width,this.manipulationStartHeight=this.height;var z=this.unrotatePoint(w);if(this.manipulationStartX=z.x,this.manipulationStartY=z.y,this.offsetX=z.x-this.left,this.offsetY=z.y-this.top,this.state!=="new")if(this.select(),this.activeGrip=this.controlGrips.findGripByVisual(k),this.activeGrip!==void 0)this._state="resize";else if(this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(k)){this.activeGrip=this.rotatorGrip;var F=this.rotatePoint({x:this.centerX,y:this.centerY});this.left=F.x-this.width/2,this.top=F.y-this.height/2,this.moveVisual({x:this.left,y:this.top});var ae=this.container.transform.baseVal.getItem(0);ae.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(ae,0),this.adjustControlBox(),this._state="rotate"}else this._state="move"},x.prototype.pointerUp=function(w){var k=this.state;B.prototype.pointerUp.call(this,w),this.state==="creating"&&this.width<10&&this.height<10?(this.width=this.defaultSize.x,this.height=this.defaultSize.y):this.manipulate(w),this._state="select",k==="creating"&&this.onMarkerCreated&&this._suppressMarkerCreateEvent===!1&&this.onMarkerCreated(this)},x.prototype.moveVisual=function(w){this.visual.style.transform="translate("+w.x+"px, "+w.y+"px)"},x.prototype.manipulate=function(w){var k=this.unrotatePoint(w);this.state==="creating"?this.resize(w):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(w)},x.prototype.resize=function(w){var k=this.manipulationStartLeft,z=this.manipulationStartWidth,F=this.manipulationStartTop,ae=this.manipulationStartHeight;switch(this.activeGrip){case this.controlGrips.bottomLeft:case this.controlGrips.centerLeft:case this.controlGrips.topLeft:k=this.manipulationStartLeft+w.x-this.manipulationStartX,z=this.manipulationStartWidth+this.manipulationStartLeft-k;break;case this.controlGrips.bottomRight:case this.controlGrips.centerRight:case this.controlGrips.topRight:case void 0:z=this.manipulationStartWidth+w.x-this.manipulationStartX}switch(this.activeGrip){case this.controlGrips.topCenter:case this.controlGrips.topLeft:case this.controlGrips.topRight:F=this.manipulationStartTop+w.y-this.manipulationStartY,ae=this.manipulationStartHeight+this.manipulationStartTop-F;break;case this.controlGrips.bottomCenter:case this.controlGrips.bottomLeft:case this.controlGrips.bottomRight:case void 0:ae=this.manipulationStartHeight+w.y-this.manipulationStartY}z>=0?(this.left=k,this.width=z):(this.left=k+z,this.width=-z),ae>=0?(this.top=F,this.height=ae):(this.top=F+ae,this.height=-ae),this.setSize()},x.prototype.setSize=function(){this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()},x.prototype.rotate=function(w){if(Math.abs(w.x-this.centerX)>.1){var k=Math.sign(w.x-this.centerX);this.rotationAngle=180*Math.atan((w.y-this.centerY)/(w.x-this.centerX))/Math.PI+90*k,this.applyRotation()}},x.prototype.applyRotation=function(){var w=this.container.transform.baseVal.getItem(0);w.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(w,0)},x.prototype.rotatePoint=function(w){if(this.rotationAngle===0)return w;var k=this.container.getCTM(),z=ie.createPoint(w.x,w.y);return{x:(z=z.matrixTransform(k)).x,y:z.y}},x.prototype.unrotatePoint=function(w){if(this.rotationAngle===0)return w;var k=this.container.getCTM();k=k.inverse();var z=ie.createPoint(w.x,w.y);return{x:(z=z.matrixTransform(k)).x,y:z.y}},x.prototype.select=function(){B.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},x.prototype.deselect=function(){B.prototype.deselect.call(this),this.controlBox.style.display="none"},x.prototype.setupControlBox=function(){this.controlBox=ie.createGroup();var w=ie.createTransform();w.setTranslate(-this.CB_DISTANCE/2,-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.appendItem(w),this.container.appendChild(this.controlBox),this.controlRect=ie.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=ie.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 ce,this.addControlGrips(),this.controlBox.style.display="none"},x.prototype.adjustControlBox=function(){var w=this.controlBox.transform.baseVal.getItem(0);w.setTranslate(this.left-this.CB_DISTANCE/2,this.top-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.replaceItem(w,0),this.controlRect.setAttribute("width",(this.width+this.CB_DISTANCE).toString()),this.controlRect.setAttribute("height",(this.height+this.CB_DISTANCE).toString()),this.rotatorGripLine!==void 0&&(this.rotatorGripLine.setAttribute("x1",((this.width+this.CB_DISTANCE)/2).toString()),this.rotatorGripLine.setAttribute("y1",(-this.CB_DISTANCE/2).toString()),this.rotatorGripLine.setAttribute("x2",((this.width+this.CB_DISTANCE)/2).toString()),this.rotatorGripLine.setAttribute("y2",(3*-this.CB_DISTANCE).toString())),this.positionGrips()},x.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()},x.prototype.createGrip=function(){var w=new _e;return w.visual.transform.baseVal.appendItem(ie.createTransform()),this.controlBox.appendChild(w.visual),w},x.prototype.positionGrips=function(){var w=this.controlGrips.topLeft.GRIP_SIZE,k=-w/2,z=k,F=(this.width+this.CB_DISTANCE)/2-w/2,ae=(this.height+this.CB_DISTANCE)/2-w/2,Ce=this.height+this.CB_DISTANCE-w/2,We=this.width+this.CB_DISTANCE-w/2;this.positionGrip(this.controlGrips.topLeft.visual,k,z),this.positionGrip(this.controlGrips.topCenter.visual,F,z),this.positionGrip(this.controlGrips.topRight.visual,We,z),this.positionGrip(this.controlGrips.centerLeft.visual,k,ae),this.positionGrip(this.controlGrips.centerRight.visual,We,ae),this.positionGrip(this.controlGrips.bottomLeft.visual,k,Ce),this.positionGrip(this.controlGrips.bottomCenter.visual,F,Ce),this.positionGrip(this.controlGrips.bottomRight.visual,We,Ce),this.rotatorGrip!==void 0&&this.positionGrip(this.rotatorGrip.visual,F,z-3*this.CB_DISTANCE)},x.prototype.positionGrip=function(w,k,z){var F=w.transform.baseVal.getItem(0);F.setTranslate(k,z),w.transform.baseVal.replaceItem(F,0)},x.prototype.hideControlBox=function(){this.controlBox.style.display="none"},x.prototype.showControlBox=function(){this.controlBox.style.display=""},x.prototype.getState=function(){return Object.assign({left:this.left,top:this.top,width:this.width,height:this.height,rotationAngle:this.rotationAngle,visualTransformMatrix:De.toITransformMatrix(this.visual.transform.baseVal.getItem(0).matrix),containerTransformMatrix:De.toITransformMatrix(this.container.transform.baseVal.getItem(0).matrix)},B.prototype.getState.call(this))},x.prototype.restoreState=function(w){B.prototype.restoreState.call(this,w);var k=w;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(De.toSVGMatrix(this.visual.transform.baseVal.getItem(0).matrix,k.visualTransformMatrix)),this.container.transform.baseVal.getItem(0).setMatrix(De.toSVGMatrix(this.container.transform.baseVal.getItem(0).matrix,k.containerTransformMatrix))},x.prototype.scale=function(w,k){B.prototype.scale.call(this,w,k);var z=this.rotatePoint({x:this.left,y:this.top}),F=this.unrotatePoint({x:z.x*w,y:z.y*k});this.left=F.x,this.top=F.y,this.width=this.width*w,this.height=this.height*k,this.adjustControlBox()},x}(ue),Me=function(B){function x(w,k,z){var F=B.call(this,w,k,z)||this;return F.fillColor="transparent",F.strokeColor="transparent",F.strokeWidth=0,F.strokeDasharray="",F.opacity=1,F.setStrokeColor=F.setStrokeColor.bind(F),F.setFillColor=F.setFillColor.bind(F),F.setStrokeWidth=F.setStrokeWidth.bind(F),F.setStrokeDasharray=F.setStrokeDasharray.bind(F),F.createVisual=F.createVisual.bind(F),F}return he(x,B),x.prototype.ownsTarget=function(w){return!(!B.prototype.ownsTarget.call(this,w)&&w!==this.visual)},x.prototype.createVisual=function(){this.visual=ie.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)},x.prototype.pointerDown=function(w,k){B.prototype.pointerDown.call(this,w,k),this.state==="new"&&(this.createVisual(),this.moveVisual(w),this._state="creating")},x.prototype.manipulate=function(w){B.prototype.manipulate.call(this,w)},x.prototype.resize=function(w){B.prototype.resize.call(this,w),this.setSize()},x.prototype.setSize=function(){B.prototype.setSize.call(this),ie.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]])},x.prototype.pointerUp=function(w){B.prototype.pointerUp.call(this,w),this.setSize()},x.prototype.setStrokeColor=function(w){this.strokeColor=w,this.visual&&ie.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(w),this.stateChanged()},x.prototype.setFillColor=function(w){this.fillColor=w,this.visual&&ie.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},x.prototype.setStrokeWidth=function(w){this.strokeWidth=w,this.visual&&ie.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},x.prototype.setStrokeDasharray=function(w){this.strokeDasharray=w,this.visual&&ie.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},x.prototype.getState=function(){return Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},B.prototype.getState.call(this))},x.prototype.restoreState=function(w){var k=w;this.fillColor=k.fillColor,this.strokeColor=k.strokeColor,this.strokeWidth=k.strokeWidth,this.strokeDasharray=k.strokeDasharray,this.opacity=k.opacity,this.createVisual(),B.prototype.restoreState.call(this,w),this.setSize()},x.prototype.scale=function(w,k){B.prototype.scale.call(this,w,k),this.setSize()},x.title="Rectangle marker",x}(Pe),Fe=function(B){function x(w,k,z,F){var ae=B.call(this,w,F||'')||this;return ae.widths=[],ae.widthBoxes=[],ae.widths=k,ae.currentWidth=z,ae.setCurrentWidth=ae.setCurrentWidth.bind(ae),ae}return he(x,B),x.prototype.getUi=function(){var w=this,k=document.createElement("div");return k.style.display="flex",k.style.overflow="hidden",k.style.flexGrow="2",this.widths.forEach(function(z){var F=document.createElement("div");F.style.display="flex",F.style.flexGrow="2",F.style.alignItems="center",F.style.justifyContent="space-between",F.style.padding="5px",F.style.borderWidth="2px",F.style.borderStyle="solid",F.style.borderColor=z===w.currentWidth?w.uiStyleSettings.toolboxAccentColor:"transparent",F.addEventListener("click",function(){w.setCurrentWidth(z,F)}),k.appendChild(F);var ae=document.createElement("div");ae.innerText=z.toString(),ae.style.marginRight="5px",F.appendChild(ae);var Ce=document.createElement("div");Ce.style.minHeight="20px",Ce.style.flexGrow="2",Ce.style.display="flex",Ce.style.alignItems="center";var We=document.createElement("hr");We.style.minWidth="20px",We.style.border="0px",We.style.borderTop=z+"px solid "+w.uiStyleSettings.toolboxColor,We.style.flexGrow="2",Ce.appendChild(We),F.appendChild(Ce),w.widthBoxes.push(F)}),k},x.prototype.setCurrentWidth=function(w,k){var z=this;this.currentWidth=w,this.widthBoxes.forEach(function(F){F.style.borderColor=F===k?z.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},x}($),He=function(B){function x(w,k,z,F){var ae=B.call(this,w,F||'')||this;return ae.styles=[],ae.styleBoxes=[],ae.styles=k,ae.currentStyle=z,ae.setCurrentStyle=ae.setCurrentStyle.bind(ae),ae}return he(x,B),x.prototype.getUi=function(){var w=this,k=document.createElement("div");return k.style.display="flex",k.style.overflow="hidden",k.style.flexGrow="2",this.styles.forEach(function(z){var F=document.createElement("div");F.style.display="flex",F.style.alignItems="center",F.style.justifyContent="space-between",F.style.padding="5px",F.style.borderWidth="2px",F.style.borderStyle="solid",F.style.overflow="hidden",F.style.maxWidth=100/w.styles.length-5+"%",F.style.borderColor=z===w.currentStyle?w.uiStyleSettings.toolboxAccentColor:"transparent",F.addEventListener("click",function(){w.setCurrentStyle(z,F)}),k.appendChild(F);var ae=document.createElement("div");ae.style.minHeight="20px",ae.style.flexGrow="2",ae.style.overflow="hidden";var Ce=``;ae.innerHTML=Ce,F.appendChild(ae),w.styleBoxes.push(F)}),k},x.prototype.setCurrentStyle=function(w,k){var z=this;this.currentStyle=w,this.styleBoxes.forEach(function(F){F.style.borderColor=F===k?z.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},x}($),oe=function(B){function x(w,k,z){var F=B.call(this,w,k,z)||this;return F.strokeColor=z.defaultColor,F.strokeWidth=z.defaultStrokeWidth,F.strokeDasharray=z.defaultStrokeDasharray,F.strokePanel=new se("Line color",z.defaultColorSet,z.defaultColor),F.strokePanel.onColorChanged=F.setStrokeColor,F.strokeWidthPanel=new Fe("Line width",z.defaultStrokeWidths,z.defaultStrokeWidth),F.strokeWidthPanel.onWidthChanged=F.setStrokeWidth,F.strokeStylePanel=new He("Line style",z.defaultStrokeDasharrays,z.defaultStrokeDasharray),F.strokeStylePanel.onStyleChanged=F.setStrokeDasharray,F}return he(x,B),Object.defineProperty(x.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),x.prototype.getState=function(){var w=B.prototype.getState.call(this);return w.typeName=x.typeName,w},x.typeName="FrameMarker",x.title="Frame marker",x.icon='',x}(Me),me=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},be=function(B){function x(w,k,z){var F=B.call(this,w,k,z)||this;return F.x1=0,F.y1=0,F.x2=0,F.y2=0,F.defaultLength=50,F.manipulationStartX=0,F.manipulationStartY=0,F.manipulationStartX1=0,F.manipulationStartY1=0,F.manipulationStartX2=0,F.manipulationStartY2=0,F.setupControlBox(),F}return he(x,B),x.prototype.ownsTarget=function(w){return!!B.prototype.ownsTarget.call(this,w)||!(!this.grip1.ownsTarget(w)&&!this.grip2.ownsTarget(w))},x.prototype.pointerDown=function(w,k){B.prototype.pointerDown.call(this,w,k),this.manipulationStartX=w.x,this.manipulationStartY=w.y,this.state==="new"&&(this.x1=w.x,this.y1=w.y,this.x2=w.x,this.y2=w.y),this.manipulationStartX1=this.x1,this.manipulationStartY1=this.y1,this.manipulationStartX2=this.x2,this.manipulationStartY2=this.y2,this.state!=="new"&&(this.select(),this.grip1.ownsTarget(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")},x.prototype.pointerUp=function(w){var k=this.state;B.prototype.pointerUp.call(this,w),this.state==="creating"&&Math.abs(this.x1-this.x2)<10&&Math.abs(this.y1-this.y2)<10?(this.x2=this.x1+this.defaultLength,this.adjustVisual(),this.adjustControlBox()):this.manipulate(w),this._state="select",k==="creating"&&this.onMarkerCreated&&this.onMarkerCreated(this)},x.prototype.adjustVisual=function(){},x.prototype.manipulate=function(w){this.state==="creating"?this.resize(w):this.state==="move"?(this.x1=this.manipulationStartX1+w.x-this.manipulationStartX,this.y1=this.manipulationStartY1+w.y-this.manipulationStartY,this.x2=this.manipulationStartX2+w.x-this.manipulationStartX,this.y2=this.manipulationStartY2+w.y-this.manipulationStartY,this.adjustVisual(),this.adjustControlBox()):this.state==="resize"&&this.resize(w)},x.prototype.resize=function(w){switch(this.activeGrip){case this.grip1:this.x1=w.x,this.y1=w.y;break;case this.grip2:case void 0:this.x2=w.x,this.y2=w.y}this.adjustVisual(),this.adjustControlBox()},x.prototype.select=function(){B.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},x.prototype.deselect=function(){B.prototype.deselect.call(this),this.controlBox.style.display="none"},x.prototype.setupControlBox=function(){this.controlBox=ie.createGroup(),this.container.appendChild(this.controlBox),this.addControlGrips(),this.controlBox.style.display="none"},x.prototype.adjustControlBox=function(){this.positionGrips()},x.prototype.addControlGrips=function(){this.grip1=this.createGrip(),this.grip2=this.createGrip(),this.positionGrips()},x.prototype.createGrip=function(){var w=new _e;return w.visual.transform.baseVal.appendItem(ie.createTransform()),this.controlBox.appendChild(w.visual),w},x.prototype.positionGrips=function(){var w=this.grip1.GRIP_SIZE;this.positionGrip(this.grip1.visual,this.x1-w/2,this.y1-w/2),this.positionGrip(this.grip2.visual,this.x2-w/2,this.y2-w/2)},x.prototype.positionGrip=function(w,k,z){var F=w.transform.baseVal.getItem(0);F.setTranslate(k,z),w.transform.baseVal.replaceItem(F,0)},x.prototype.getState=function(){return Object.assign({x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2},B.prototype.getState.call(this))},x.prototype.restoreState=function(w){B.prototype.restoreState.call(this,w);var k=w;this.x1=k.x1,this.y1=k.y1,this.x2=k.x2,this.y2=k.y2},x.prototype.scale=function(w,k){B.prototype.scale.call(this,w,k),this.x1=this.x1*w,this.y1=this.y1*k,this.x2=this.x2*w,this.y2=this.y2*k,this.adjustVisual(),this.adjustControlBox()},x}(ue),we=function(B){function x(w,k,z){var F=B.call(this,w,k,z)||this;return F.strokeColor="transparent",F.strokeWidth=0,F.strokeDasharray="",F.setStrokeColor=F.setStrokeColor.bind(F),F.setStrokeWidth=F.setStrokeWidth.bind(F),F.setStrokeDasharray=F.setStrokeDasharray.bind(F),F.strokeColor=z.defaultColor,F.strokeWidth=z.defaultStrokeWidth,F.strokeDasharray=z.defaultStrokeDasharray,F.strokePanel=new se("Line color",z.defaultColorSet,z.defaultColor),F.strokePanel.onColorChanged=F.setStrokeColor,F.strokeWidthPanel=new Fe("Line width",z.defaultStrokeWidths,z.defaultStrokeWidth),F.strokeWidthPanel.onWidthChanged=F.setStrokeWidth,F.strokeStylePanel=new He("Line style",z.defaultStrokeDasharrays,z.defaultStrokeDasharray),F.strokeStylePanel.onStyleChanged=F.setStrokeDasharray,F}return he(x,B),x.prototype.ownsTarget=function(w){return!(!B.prototype.ownsTarget.call(this,w)&&w!==this.visual&&w!==this.selectorLine&&w!==this.visibleLine)},x.prototype.createVisual=function(){this.visual=ie.createGroup(),this.selectorLine=ie.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()]]),this.visibleLine=ie.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)},x.prototype.pointerDown=function(w,k){B.prototype.pointerDown.call(this,w,k),this.state==="new"&&(this.createVisual(),this.adjustVisual(),this._state="creating")},x.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()),ie.setAttributes(this.visibleLine,[["stroke",this.strokeColor]]),ie.setAttributes(this.visibleLine,[["stroke-width",this.strokeWidth.toString()]]),ie.setAttributes(this.visibleLine,[["stroke-dasharray",this.strokeDasharray.toString()]]))},x.prototype.setStrokeColor=function(w){this.strokeColor=w,this.adjustVisual(),this.colorChanged(w)},x.prototype.setStrokeWidth=function(w){this.strokeWidth=w,this.adjustVisual()},x.prototype.setStrokeDasharray=function(w){this.strokeDasharray=w,this.adjustVisual(),this.stateChanged()},Object.defineProperty(x.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),x.prototype.getState=function(){var w=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray},B.prototype.getState.call(this));return w.typeName=x.typeName,w},x.prototype.restoreState=function(w){B.prototype.restoreState.call(this,w);var k=w;this.strokeColor=k.strokeColor,this.strokeWidth=k.strokeWidth,this.strokeDasharray=k.strokeDasharray,this.createVisual(),this.adjustVisual()},x.typeName="LineMarker",x.title="Line marker",x.icon='',x}(be),pe=function(B){function x(w,k,z,F){var ae=B.call(this,w,F||'')||this;return ae.fonts=[],ae.fontBoxes=[],ae.fonts=k,ae.currentFont=z,ae.setCurrentFont=ae.setCurrentFont.bind(ae),ae}return he(x,B),x.prototype.getUi=function(){var w=this,k=document.createElement("div");return k.style.overflow="hidden",k.style.flexGrow="2",this.fonts.forEach(function(z){var F=document.createElement("div");F.style.display="inline-block",F.style.alignItems="center",F.style.justifyContent="space-between",F.style.padding="5px",F.style.borderWidth="2px",F.style.borderStyle="solid",F.style.overflow="hidden",F.style.maxWidth=100/w.fonts.length-5+"%",F.style.borderColor=z===w.currentFont?w.uiStyleSettings.toolboxAccentColor:"transparent",F.addEventListener("click",function(){w.setCurrentFont(z,F)}),k.appendChild(F);var ae=document.createElement("div");ae.style.display="flex",ae.style.minHeight="20px",ae.style.flexGrow="2",ae.style.fontFamily=z,ae.style.overflow="hidden";var Ce=document.createElement("div");Ce.style.whiteSpace="nowrap",Ce.style.overflow="hidden",Ce.style.textOverflow="ellipsis",Ce.innerHTML="The quick brown fox jumps over the lazy dog",ae.appendChild(Ce),F.appendChild(ae),w.fontBoxes.push(F)}),k},x.prototype.setCurrentFont=function(w,k){var z=this;this.currentFont=w,this.fontBoxes.forEach(function(F){F.style.borderColor=F===k?z.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onFontChanged&&this.onFontChanged(this.currentFont)},x}($),ye=function(B){function x(w,k,z){var F=B.call(this,w,k,z)||this;return F.color="transparent",F.padding=5,F.DEFAULT_TEXT="your text here",F.text=F.DEFAULT_TEXT,F.isMoved=!1,F.color=z.defaultColor,F.fontFamily=z.defaultFontFamily,F.defaultSize={x:100,y:30},F.setColor=F.setColor.bind(F),F.setFont=F.setFont.bind(F),F.renderText=F.renderText.bind(F),F.sizeText=F.sizeText.bind(F),F.textEditDivClicked=F.textEditDivClicked.bind(F),F.showTextEditor=F.showTextEditor.bind(F),F.setSize=F.setSize.bind(F),F.positionTextEditor=F.positionTextEditor.bind(F),F.colorPanel=new se("Color",z.defaultColorSet,z.defaultColor),F.colorPanel.onColorChanged=F.setColor,F.fontFamilyPanel=new pe("Font",z.defaultFontFamilies,z.defaultFontFamily),F.fontFamilyPanel.onFontChanged=F.setFont,F}return he(x,B),x.prototype.ownsTarget=function(w){if(B.prototype.ownsTarget.call(this,w)||w===this.visual||w===this.textElement||w===this.bgRectangle)return!0;var k=!1;return this.textElement.childNodes.forEach(function(z){z===w&&(k=!0)}),k},x.prototype.createVisual=function(){this.visual=ie.createGroup(),this.bgRectangle=ie.createRect(1,1,[["fill","transparent"]]),this.visual.appendChild(this.bgRectangle),this.textElement=ie.createText([["fill",this.color],["font-family",this.fontFamily],["font-size","16px"],["x","0"],["y","0"]]),this.textElement.transform.baseVal.appendItem(ie.createTransform()),this.textElement.transform.baseVal.appendItem(ie.createTransform()),this.visual.appendChild(this.textElement),this.addMarkerVisualToContainer(this.visual),this.renderText()},x.prototype.pointerDown=function(w,k){B.prototype.pointerDown.call(this,w,k),this.isMoved=!1,this.pointerDownPoint=w,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(w),this._state="creating")},x.prototype.renderText=function(){var w=this;if(this.textElement){for(;this.textElement.lastChild;)this.textElement.removeChild(this.textElement.lastChild);this.text.split(/\r\n|[\n\v\f\r\x85\u2028\u2029]/).forEach(function(k){w.textElement.appendChild(ie.createTSpan(k.trim()===""?" ":k.trim(),[["x","0"],["dy","1.2em"]]))}),setTimeout(this.sizeText,10)}},x.prototype.getTextScale=function(){var w=this.textElement.getBBox(),k=1;if(w.width>0&&w.height>0){var z=(1*this.width-this.width*this.padding*2/100)/w.width,F=(1*this.height-this.height*this.padding*2/100)/w.height;k=Math.min(z,F)}return k},x.prototype.getTextPosition=function(w){var k=this.textElement.getBBox(),z=0,F=0;return k.width>0&&k.height>0&&(z=(this.width-k.width*w)/2,F=this.height/2-k.height*w/2),{x:z,y:F}},x.prototype.sizeText=function(){var w=this.textElement.getBBox(),k=this.getTextScale(),z=this.getTextPosition(k);z.y-=w.y*k,navigator.userAgent.indexOf("Edge/")>-1?this.textElement.style.transform="translate("+z.x+"px, "+z.y+"px) scale("+k+", "+k+")":(this.textElement.transform.baseVal.getItem(0).setTranslate(z.x,z.y),this.textElement.transform.baseVal.getItem(1).setScale(k,k))},x.prototype.manipulate=function(w){B.prototype.manipulate.call(this,w),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(w.x-this.pointerDownPoint.x)>5||Math.abs(w.y-this.pointerDownPoint.y)>5)},x.prototype.resize=function(w){B.prototype.resize.call(this,w),this.isMoved=!0,this.setSize(),this.sizeText()},x.prototype.setSize=function(){B.prototype.setSize.call(this),this.visual&&this.bgRectangle&&(ie.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),ie.setAttributes(this.bgRectangle,[["width",this.width.toString()],["height",this.height.toString()]]))},x.prototype.pointerUp=function(w){var k=this.state;k==="creating"&&(this._suppressMarkerCreateEvent=!0),B.prototype.pointerUp.call(this,w),this.setSize(),(k==="creating"||!this.isMoved&&Date.now()-this.pointerDownTimestamp>500)&&this.showTextEditor(),this.pointerDownPoint=void 0},x.prototype.showTextEditor=function(){var w=this;this._state="edit",this.overlayContainer.innerHTML="",this.textEditDiv=document.createElement("div"),this.textEditDiv.style.flexGrow="2",this.textEditDiv.style.alignItems="center",this.textEditDiv.style.justifyContent="center",this.textEditDiv.style.pointerEvents="auto",this.textEditDiv.style.overflow="hidden",this.textEditor=document.createElement("div"),this.textEditor.style.position="absolute",this.textEditor.style.fontFamily=this.fontFamily,this.textEditor.style.lineHeight="1em",this.textEditor.innerText=this.text,this.textEditor.contentEditable="true",this.textEditor.style.color=this.color,this.textEditor.style.whiteSpace="pre",this.positionTextEditor(),this.textEditor.addEventListener("pointerup",function(k){k.stopPropagation()}),this.textEditor.addEventListener("input",function(){for(var k=Number.parseFloat(w.textEditor.style.fontSize);w.textEditor.clientWidth>=Number.parseInt(w.textEditor.style.maxWidth)&&k>.9;)k-=.1,w.textEditor.style.fontSize=Math.max(k,.9)+"em"}),this.textEditor.addEventListener("keyup",function(k){k.cancelBubble=!0}),this.textEditor.addEventListener("paste",function(k){if(k.clipboardData){var z=k.clipboardData.getData("text"),F=window.getSelection();if(!F.rangeCount)return!1;F.deleteFromDocument(),F.getRangeAt(0).insertNode(document.createTextNode(z)),k.preventDefault()}}),this.textEditDiv.addEventListener("pointerup",function(){w.textEditDivClicked(w.textEditor.innerText)}),this.textEditDiv.appendChild(this.textEditor),this.overlayContainer.appendChild(this.textEditDiv),this.hideVisual(),this.textEditor.focus(),document.execCommand("selectAll")},x.prototype.positionTextEditor=function(){if(this.state==="edit")if(this.textEditor===void 0)this.showTextEditor();else{this.textElement.style.display="";var w=this.getTextScale(),k=this.rotatePoint({x:this.left+this.width/2,y:this.top+this.height/2}),z=this.textElement.getBBox(),F={x:z.width*w,y:z.height*w};k.x-=F.x/2,k.y-=F.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*w,12)+"px",this.textElement.style.display="none"}},x.prototype.textEditDivClicked=function(w){this.text=w.trim(),this.overlayContainer.innerHTML="",this.renderText(),this.showVisual(),this._suppressMarkerCreateEvent&&(this._suppressMarkerCreateEvent=!1,this.onMarkerCreated&&this.onMarkerCreated(this)),this.stateChanged()},x.prototype.select=function(){B.prototype.select.call(this),this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText)},x.prototype.deselect=function(){this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText),B.prototype.deselect.call(this)},x.prototype.dblClick=function(w,k){B.prototype.dblClick.call(this,w,k),this.showTextEditor()},x.prototype.setColor=function(w){this.textElement&&ie.setAttributes(this.textElement,[["fill",w]]),this.color=w,this.textEditor&&(this.textEditor.style.color=this.color),this.colorChanged(w)},x.prototype.setFont=function(w){this.textElement&&ie.setAttributes(this.textElement,[["font-family",w]]),this.fontFamily=w,this.textEditor&&(this.textEditor.style.fontFamily=this.fontFamily),this.renderText(),this.stateChanged()},x.prototype.hideVisual=function(){this.textElement.style.display="none",this.hideControlBox()},x.prototype.showVisual=function(){this.state==="edit"&&(this._state="select"),this.textElement.style.display="",this.showControlBox()},Object.defineProperty(x.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),x.prototype.getState=function(){var w=Object.assign({color:this.color,fontFamily:this.fontFamily,padding:this.padding,text:this.text},B.prototype.getState.call(this));return w.typeName=x.typeName,w},x.prototype.restoreState=function(w){var k=w;this.color=k.color,this.fontFamily=k.fontFamily,this.padding=k.padding,this.text=k.text,this.createVisual(),B.prototype.restoreState.call(this,w),this.setSize()},x.prototype.scale=function(w,k){B.prototype.scale.call(this,w,k),this.setSize(),this.sizeText(),this.positionTextEditor()},x.typeName="TextMarker",x.title="Text marker",x.icon='',x}(Pe),re=function(B){function x(w,k,z){var F=B.call(this,w,k,z)||this;return F.color="transparent",F.lineWidth=3,F.drawing=!1,F.pixelRatio=1,F.color=z.defaultColor,F.lineWidth=z.defaultStrokeWidth,F.pixelRatio=z.freehandPixelRatio,F.setColor=F.setColor.bind(F),F.addCanvas=F.addCanvas.bind(F),F.finishCreation=F.finishCreation.bind(F),F.setLineWidth=F.setLineWidth.bind(F),F.colorPanel=new se("Color",z.defaultColorSet,z.defaultColor),F.colorPanel.onColorChanged=F.setColor,F.lineWidthPanel=new Fe("Line width",z.defaultStrokeWidths,z.defaultStrokeWidth),F.lineWidthPanel.onWidthChanged=F.setLineWidth,F}return he(x,B),x.prototype.ownsTarget=function(w){return!(!B.prototype.ownsTarget.call(this,w)&&w!==this.visual&&w!==this.drawingImage)},x.prototype.createVisual=function(){this.visual=ie.createGroup(),this.drawingImage=ie.createImage(),this.visual.appendChild(this.drawingImage);var w=ie.createTransform();this.visual.transform.baseVal.appendItem(w),this.addMarkerVisualToContainer(this.visual)},x.prototype.pointerDown=function(w,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(w.x,w.y),this.drawing=!0):B.prototype.pointerDown.call(this,w,k)},x.prototype.manipulate=function(w){this.state==="creating"?this.drawing&&(this.canvasContext.lineTo(w.x,w.y),this.canvasContext.stroke()):B.prototype.manipulate.call(this,w)},x.prototype.resize=function(w){B.prototype.resize.call(this,w),ie.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),ie.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]])},x.prototype.pointerUp=function(w){this._state==="creating"?this.drawing&&(this.canvasContext.closePath(),this.drawing=!1,this.globalSettings.newFreehandMarkerOnPointerUp&&this.finishCreation()):B.prototype.pointerUp.call(this,w)},x.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)},x.prototype.select=function(){this.state==="creating"&&this.finishCreation(),B.prototype.select.call(this)},x.prototype.deselect=function(){this.state==="creating"&&this.finishCreation(),B.prototype.deselect.call(this)},x.prototype.finishCreation=function(){for(var w=this.canvasContext.getImageData(0,0,this.canvasElement.width,this.canvasElement.height),k=[this.canvasElement.width+1,this.canvasElement.height+1,-1,-1],z=k[0],F=k[1],ae=k[2],Ce=k[3],We=!1,$e=0;$e0&&(We=!0,$eCe&&(Ce=$e),Ae>ae&&(ae=Ae));if(We){this.left=z/this.pixelRatio,this.top=F/this.pixelRatio,this.width=(ae-z)/this.pixelRatio,this.height=(Ce-F)/this.pixelRatio;var Ze=document.createElement("canvas");Ze.width=ae-z,Ze.height=Ce-F,Ze.getContext("2d").putImageData(this.canvasContext.getImageData(z,F,ae-z,Ce-F),0,0),this.drawingImgUrl=Ze.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},x.prototype.setDrawingImage=function(){ie.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]]),ie.setAttributes(this.drawingImage,[["href",this.drawingImgUrl]]),this.moveVisual({x:this.left,y:this.top})},x.prototype.setColor=function(w){this.color=w,this.colorChanged(w)},x.prototype.setLineWidth=function(w){this.lineWidth=w},Object.defineProperty(x.prototype,"toolboxPanels",{get:function(){return this.state==="new"||this.state==="creating"?[this.colorPanel,this.lineWidthPanel]:[]},enumerable:!1,configurable:!0}),x.prototype.getState=function(){var w=Object.assign({drawingImgUrl:this.drawingImgUrl},B.prototype.getState.call(this));return w.typeName=x.typeName,w},x.prototype.restoreState=function(w){this.createVisual(),B.prototype.restoreState.call(this,w),this.drawingImgUrl=w.drawingImgUrl,this.setDrawingImage()},x.prototype.scale=function(w,k){B.prototype.scale.call(this,w,k),this.setDrawingImage()},x.typeName="FreehandMarker",x.title="Freehand marker",x.icon='',x}(Pe),Z=function(B){function x(w,k,z){var F=B.call(this,w,z||'')||this;return F.typeBoxes=[],F.currentType=k,F.setCurrentType=F.setCurrentType.bind(F),F}return he(x,B),x.prototype.getUi=function(){var w=this,k=document.createElement("div");k.style.display="flex",k.style.overflow="hidden",k.style.flexGrow="2";for(var z=function(Ce){var We="both";switch(Ce){case 0:We="both";break;case 1:We="start";break;case 2:We="end";break;case 3:We="none"}var $e=document.createElement("div");if($e.style.display="flex",$e.style.flexGrow="2",$e.style.alignItems="center",$e.style.justifyContent="space-between",$e.style.padding="5px",$e.style.borderWidth="2px",$e.style.borderStyle="solid",$e.style.borderColor=We===F.currentType?F.uiStyleSettings.toolboxAccentColor:"transparent",$e.addEventListener("click",function(){w.setCurrentType(We,$e)}),k.appendChild($e),We==="both"||We==="start"){var Ae=document.createElement("div");Ae.style.display="flex",Ae.style.alignItems="center",Ae.style.minHeight="20px",Ae.innerHTML=``,Ae.style.marginLeft="5px",$e.appendChild(Ae)}var Ze=document.createElement("div");Ze.style.display="flex",Ze.style.alignItems="center",Ze.style.minHeight="20px",Ze.style.flexGrow="2";var qe=document.createElement("hr");if(qe.style.minWidth="20px",qe.style.border="0px",qe.style.borderTop="3px solid "+(F.uiStyleSettings!==void 0?F.uiStyleSettings.toolboxColor:"#eeeeee"),qe.style.flexGrow="2",Ze.appendChild(qe),$e.appendChild(Ze),We==="both"||We==="end"){var ft=document.createElement("div");ft.style.display="flex",ft.style.alignItems="center",ft.style.minHeight="20px",ft.innerHTML=``,ft.style.marginRight="5px",$e.appendChild(ft)}F.typeBoxes.push($e)},F=this,ae=0;ae<4;ae++)z(ae);return k},x.prototype.setCurrentType=function(w,k){var z=this;this.currentType=w,this.typeBoxes.forEach(function(F){F.style.borderColor=F===k?z.uiStyleSettings!==void 0?z.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"}),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},x}($),J=function(B){function x(w,k,z){var F=B.call(this,w,k,z)||this;return F.arrowType="end",F.arrowBaseHeight=10,F.arrowBaseWidth=10,F.getArrowPoints=F.getArrowPoints.bind(F),F.setArrowType=F.setArrowType.bind(F),F.arrowTypePanel=new Z("Arrow type","end"),F.arrowTypePanel.onArrowTypeChanged=F.setArrowType,F}return he(x,B),x.prototype.ownsTarget=function(w){return!(!B.prototype.ownsTarget.call(this,w)&&w!==this.arrow1&&w!==this.arrow2)},x.prototype.getArrowPoints=function(w,k){var z=this.arrowBaseWidth+2*this.strokeWidth,F=this.arrowBaseHeight+2*this.strokeWidth;return w-z/2+","+(k+F/2)+" "+w+","+(k-F/2)+" "+(w+z/2)+","+(k+F/2)},x.prototype.createTips=function(){this.arrow1=ie.createPolygon(this.getArrowPoints(this.x1,this.y1),[["fill",this.strokeColor]]),this.arrow1.transform.baseVal.appendItem(ie.createTransform()),this.visual.appendChild(this.arrow1),this.arrow2=ie.createPolygon(this.getArrowPoints(this.x2,this.y2),[["fill",this.strokeColor]]),this.arrow2.transform.baseVal.appendItem(ie.createTransform()),this.visual.appendChild(this.arrow2)},x.prototype.pointerDown=function(w,k){B.prototype.pointerDown.call(this,w,k),this.state==="creating"&&this.createTips()},x.prototype.adjustVisual=function(){if(B.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",ie.setAttributes(this.arrow1,[["points",this.getArrowPoints(this.x1,this.y1)],["fill",this.strokeColor]]),ie.setAttributes(this.arrow2,[["points",this.getArrowPoints(this.x2,this.y2)],["fill",this.strokeColor]]),Math.abs(this.x1-this.x2)>.1)){var w=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),k=this.arrow1.transform.baseVal.getItem(0);k.setRotate(w,this.x1,this.y1),this.arrow1.transform.baseVal.replaceItem(k,0);var z=this.arrow2.transform.baseVal.getItem(0);z.setRotate(w+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(z,0)}},x.prototype.setArrowType=function(w){this.arrowType=w,this.adjustVisual(),this.stateChanged()},Object.defineProperty(x.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel,this.arrowTypePanel]},enumerable:!1,configurable:!0}),x.prototype.getState=function(){var w=Object.assign({arrowType:this.arrowType},B.prototype.getState.call(this));return w.typeName=x.typeName,w},x.prototype.restoreState=function(w){B.prototype.restoreState.call(this,w);var k=w;this.arrowType=k.arrowType,this.createTips(),this.adjustVisual()},x.typeName="ArrowMarker",x.title="Arrow marker",x.icon='',x}(we),V=function(B){function x(w,k,z){var F=B.call(this,w,k,z)||this;return F.fillColor=z.defaultFillColor,F.strokeWidth=0,F.fillPanel=new se("Color",z.defaultColorSet,z.defaultFillColor),F.fillPanel.onColorChanged=F.setFillColor,F}return he(x,B),Object.defineProperty(x.prototype,"toolboxPanels",{get:function(){return[this.fillPanel]},enumerable:!1,configurable:!0}),x.prototype.getState=function(){var w=B.prototype.getState.call(this);return w.typeName=x.typeName,w},x.typeName="CoverMarker",x.title="Cover marker",x.icon='',x}(Me),Y=function(B){function x(w,k,z,F){var ae=B.call(this,w,F||'')||this;return ae.opacities=[],ae.opacityBoxes=[],ae.opacities=k,ae.currentOpacity=z,ae.setCurrentOpacity=ae.setCurrentOpacity.bind(ae),ae}return he(x,B),x.prototype.getUi=function(){var w=this,k=document.createElement("div");return k.style.display="flex",k.style.overflow="hidden",k.style.flexGrow="2",k.style.justifyContent="space-between",this.opacities.forEach(function(z){var F=document.createElement("div");F.style.display="flex",F.style.alignItems="center",F.style.justifyContent="center",F.style.padding="5px",F.style.borderWidth="2px",F.style.borderStyle="solid",F.style.borderColor=z===w.currentOpacity?w.uiStyleSettings.toolboxAccentColor:"transparent",F.addEventListener("click",function(){w.setCurrentOpacity(z,F)}),k.appendChild(F);var ae=document.createElement("div");ae.innerText=100*z+"%",F.appendChild(ae),w.opacityBoxes.push(F)}),k},x.prototype.setCurrentOpacity=function(w,k){var z=this;this.currentOpacity=w,this.opacityBoxes.forEach(function(F){F.style.borderColor=F===k?z.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},x}($),q=function(B){function x(w,k,z){var F=B.call(this,w,k,z)||this;return F.setOpacity=F.setOpacity.bind(F),F.fillColor=z.defaultHighlightColor,F.strokeWidth=0,F.opacity=z.defaultHighlightOpacity,F.fillPanel=new se("Color",z.defaultColorSet,F.fillColor),F.fillPanel.onColorChanged=F.setFillColor,F.opacityPanel=new Y("Opacity",z.defaultOpacitySteps,F.opacity),F.opacityPanel.onOpacityChanged=F.setOpacity,F}return he(x,B),x.prototype.setOpacity=function(w){this.opacity=w,this.visual&&ie.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(x.prototype,"toolboxPanels",{get:function(){return[this.fillPanel,this.opacityPanel]},enumerable:!1,configurable:!0}),x.prototype.getState=function(){var w=B.prototype.getState.call(this);return w.typeName=x.typeName,w},x.typeName="HighlightMarker",x.title="Highlight marker",x.icon='',x}(V),ee='',le=function(B){function x(w,k,z){var F=B.call(this,w,k,z)||this;return F.bgColor="transparent",F.tipPosition={x:0,y:0},F.tipBase1Position={x:0,y:0},F.tipBase2Position={x:0,y:0},F.tipMoving=!1,F.color=z.defaultStrokeColor,F.bgColor=z.defaultFillColor,F.fontFamily=z.defaultFontFamily,F.defaultSize={x:100,y:30},F.setBgColor=F.setBgColor.bind(F),F.getTipPoints=F.getTipPoints.bind(F),F.positionTip=F.positionTip.bind(F),F.setTipPoints=F.setTipPoints.bind(F),F.colorPanel=new se("Text color",z.defaultColorSet,F.color,''),F.colorPanel.onColorChanged=F.setColor,F.bgColorPanel=new se("Fill color",z.defaultColorSet,F.bgColor,ee),F.bgColorPanel.onColorChanged=F.setBgColor,F.fontFamilyPanel=new pe("Font",z.defaultFontFamilies,z.defaultFontFamily),F.fontFamilyPanel.onFontChanged=F.setFont,F.tipGrip=new _e,F.tipGrip.visual.transform.baseVal.appendItem(ie.createTransform()),F.controlBox.appendChild(F.tipGrip.visual),F}return he(x,B),x.prototype.ownsTarget=function(w){return B.prototype.ownsTarget.call(this,w)||this.tipGrip.ownsTarget(w)||this.tip===w},x.prototype.createTip=function(){ie.setAttributes(this.bgRectangle,[["fill",this.bgColor],["rx","10px"]]),this.tip=ie.createPolygon(this.getTipPoints(),[["fill",this.bgColor]]),this.visual.appendChild(this.tip)},x.prototype.pointerDown=function(w,k){this.state==="new"&&B.prototype.pointerDown.call(this,w,k),this.state==="creating"?this.createTip():this.tipGrip.ownsTarget(k)?(this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.tipMoving=!0):B.prototype.pointerDown.call(this,w,k)},x.prototype.pointerUp=function(w){if(this.tipMoving)this.tipMoving=!1,this.isMoved=!0,B.prototype.pointerUp.call(this,w);else{var k=this.state==="creating";B.prototype.pointerUp.call(this,w),this.setTipPoints(k),this.positionTip()}},x.prototype.manipulate=function(w){if(this.tipMoving){var k=this.unrotatePoint(w);this.tipPosition={x:k.x-this.manipulationStartLeft,y:k.y-this.manipulationStartTop},this.positionTip()}else B.prototype.manipulate.call(this,w)},x.prototype.setBgColor=function(w){this.bgRectangle&&this.tip&&(ie.setAttributes(this.bgRectangle,[["fill",w]]),ie.setAttributes(this.tip,[["fill",w]])),this.bgColor=w,this.fillColorChanged(w)},x.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},x.prototype.setTipPoints=function(w){w===void 0&&(w=!1);var k=Math.min(this.height/2,15),z=this.height/5;w&&(this.tipPosition={x:k+z/2,y:this.height+20});var F=Math.atan(this.height/2/(this.width/2));this.tipPosition.x=this.width/2&&this.tipPosition.y=this.width/2&&this.tipPosition.y>=this.height/2?F',x}(ye),ge=function(B){function x(w,k,z){var F=B.call(this,w,k,z)||this;return F.fillColor="transparent",F.strokeColor="transparent",F.strokeWidth=0,F.strokeDasharray="",F.opacity=1,F.strokeColor=z.defaultColor,F.strokeWidth=z.defaultStrokeWidth,F.strokeDasharray=z.defaultStrokeDasharray,F.fillColor=z.defaultFillColor,F.setStrokeColor=F.setStrokeColor.bind(F),F.setFillColor=F.setFillColor.bind(F),F.setStrokeWidth=F.setStrokeWidth.bind(F),F.setStrokeDasharray=F.setStrokeDasharray.bind(F),F.setOpacity=F.setOpacity.bind(F),F.createVisual=F.createVisual.bind(F),F.strokePanel=new se("Line color",de(z.defaultColorSet,["transparent"]),z.defaultColor),F.strokePanel.onColorChanged=F.setStrokeColor,F.fillPanel=new se("Fill color",de(z.defaultColorSet,["transparent"]),F.fillColor,ee),F.fillPanel.onColorChanged=F.setFillColor,F.strokeWidthPanel=new Fe("Line width",z.defaultStrokeWidths,z.defaultStrokeWidth),F.strokeWidthPanel.onWidthChanged=F.setStrokeWidth,F.strokeStylePanel=new He("Line style",z.defaultStrokeDasharrays,z.defaultStrokeDasharray),F.strokeStylePanel.onStyleChanged=F.setStrokeDasharray,F.opacityPanel=new Y("Opacity",z.defaultOpacitySteps,F.opacity),F.opacityPanel.onOpacityChanged=F.setOpacity,F}return he(x,B),x.prototype.ownsTarget=function(w){return!(!B.prototype.ownsTarget.call(this,w)&&w!==this.visual)},x.prototype.createVisual=function(){this.visual=ie.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)},x.prototype.pointerDown=function(w,k){B.prototype.pointerDown.call(this,w,k),this.state==="new"&&(this.createVisual(),this.moveVisual(w),this._state="creating")},x.prototype.manipulate=function(w){B.prototype.manipulate.call(this,w)},x.prototype.resize=function(w){B.prototype.resize.call(this,w),this.setSize()},x.prototype.setSize=function(){B.prototype.setSize.call(this),ie.setAttributes(this.visual,[["cx",(this.width/2).toString()],["cy",(this.height/2).toString()],["rx",(this.width/2).toString()],["ry",(this.height/2).toString()]])},x.prototype.pointerUp=function(w){B.prototype.pointerUp.call(this,w),this.setSize()},x.prototype.setStrokeColor=function(w){this.strokeColor=w,this.visual&&ie.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(w),this.stateChanged()},x.prototype.setFillColor=function(w){this.fillColor=w,this.visual&&ie.setAttributes(this.visual,[["fill",this.fillColor]]),this.fillColorChanged(w),this.stateChanged()},x.prototype.setStrokeWidth=function(w){this.strokeWidth=w,this.visual&&ie.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},x.prototype.setStrokeDasharray=function(w){this.strokeDasharray=w,this.visual&&ie.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},x.prototype.setOpacity=function(w){this.opacity=w,this.visual&&ie.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(x.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.opacityPanel]},enumerable:!1,configurable:!0}),x.prototype.getState=function(){var w=Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},B.prototype.getState.call(this));return w.typeName=x.typeName,w},x.prototype.restoreState=function(w){var k=w;this.fillColor=k.fillColor,this.strokeColor=k.strokeColor,this.strokeWidth=k.strokeWidth,this.strokeDasharray=k.strokeDasharray,this.opacity=k.opacity,this.createVisual(),B.prototype.restoreState.call(this,w),this.setSize()},x.prototype.scale=function(w,k){B.prototype.scale.call(this,w,k),this.setSize()},x.typeName="EllipseMarker",x.title="Ellipse marker",x.icon='',x}(Pe),Oe=function(B){function x(w,k,z){return B.call(this,w,k,z)||this}return he(x,B),Object.defineProperty(x.prototype,"tipLength",{get:function(){return 10+3*this.strokeWidth},enumerable:!1,configurable:!0}),x.prototype.ownsTarget=function(w){return!(!B.prototype.ownsTarget.call(this,w)&&w!==this.tip1&&w!==this.tip2)},x.prototype.createTips=function(){this.tip1=ie.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(ie.createTransform()),this.visual.appendChild(this.tip1),this.tip2=ie.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(ie.createTransform()),this.visual.appendChild(this.tip2)},x.prototype.pointerDown=function(w,k){B.prototype.pointerDown.call(this,w,k),this.state==="creating"&&this.createTips()},x.prototype.adjustVisual=function(){if(B.prototype.adjustVisual.call(this),this.tip1&&this.tip2&&(ie.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()]]),ie.setAttributes(this.tip2,[["x1",(this.x2-this.tipLength/2).toString()],["y1",this.y2.toString()],["x2",(this.x2+this.tipLength/2).toString()],["y2",this.y2.toString()],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),Math.abs(this.x1-this.x2)>.1)){var w=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),k=this.tip1.transform.baseVal.getItem(0);k.setRotate(w,this.x1,this.y1),this.tip1.transform.baseVal.replaceItem(k,0);var z=this.tip2.transform.baseVal.getItem(0);z.setRotate(w+180,this.x2,this.y2),this.tip2.transform.baseVal.replaceItem(z,0)}},Object.defineProperty(x.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),x.prototype.getState=function(){var w=B.prototype.getState.call(this);return w.typeName=x.typeName,w},x.prototype.restoreState=function(w){B.prototype.restoreState.call(this,w),this.createTips(),this.adjustVisual()},x.typeName="MeasurementMarker",x.title="Measurement marker",x.icon='',x}(we),Ke=function(B){function x(w,k,z){var F=B.call(this,w,k,z)||this;return F.strokePanel.colors=z.defaultColorSet,F.fillColor="transparent",F}return he(x,B),Object.defineProperty(x.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),x.prototype.getState=function(){var w=B.prototype.getState.call(this);return w.typeName=x.typeName,w},x.typeName="EllipseFrameMarker",x.title="Ellipse frame marker",x.icon='',x}(ge),ze=function(){function B(){this.undoStack=[],this.redoStack=[]}return Object.defineProperty(B.prototype,"isUndoPossible",{get:function(){return this.undoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(B.prototype,"isRedoPossible",{get:function(){return this.redoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(B.prototype,"undoStepCount",{get:function(){return this.undoStack.length},enumerable:!1,configurable:!0}),Object.defineProperty(B.prototype,"redoStepCount",{get:function(){return this.redoStack.length},enumerable:!1,configurable:!0}),B.prototype.addUndoStep=function(x){this.undoStack.length!==0&&JSON.stringify(this.undoStack[this.undoStack.length-1])===JSON.stringify(x)||(this.undoStack.push(x),JSON.stringify(this.lastRedoStep)!==JSON.stringify(x)&&this.redoStack.splice(0,this.redoStack.length))},B.prototype.replaceLastUndoStep=function(x){this.undoStack.length>0&&(this.undoStack[this.undoStack.length-1]=x)},B.prototype.getLastUndoStep=function(){return this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0},B.prototype.undo=function(){if(this.undoStack.length>1){var x=this.undoStack.pop();return x!==void 0&&this.redoStack.push(x),this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0}},B.prototype.redo=function(){return this.lastRedoStep=this.redoStack.pop(),this.lastRedoStep},B}(),ke=function(B){function x(w,k,z){var F=B.call(this,w,k,z)||this;return F.strokeColor="transparent",F.strokeWidth=0,F.strokeDasharray="",F.curveX=0,F.curveY=0,F.manipulationStartCurveX=0,F.manipulationStartCurveY=0,F.setStrokeColor=F.setStrokeColor.bind(F),F.setStrokeWidth=F.setStrokeWidth.bind(F),F.setStrokeDasharray=F.setStrokeDasharray.bind(F),F.positionGrips=F.positionGrips.bind(F),F.addControlGrips=F.addControlGrips.bind(F),F.adjustVisual=F.adjustVisual.bind(F),F.setupControlBox=F.setupControlBox.bind(F),F.resize=F.resize.bind(F),F.strokeColor=z.defaultColor,F.strokeWidth=z.defaultStrokeWidth,F.strokeDasharray=z.defaultStrokeDasharray,F.strokePanel=new se("Line color",z.defaultColorSet,z.defaultColor),F.strokePanel.onColorChanged=F.setStrokeColor,F.strokeWidthPanel=new Fe("Line width",z.defaultStrokeWidths,z.defaultStrokeWidth),F.strokeWidthPanel.onWidthChanged=F.setStrokeWidth,F.strokeStylePanel=new He("Line style",z.defaultStrokeDasharrays,z.defaultStrokeDasharray),F.strokeStylePanel.onStyleChanged=F.setStrokeDasharray,F}return he(x,B),x.prototype.ownsTarget=function(w){return!(!B.prototype.ownsTarget.call(this,w)&&w!==this.visual&&w!==this.selectorCurve&&w!==this.visibleCurve&&!this.curveGrip.ownsTarget(w))},x.prototype.getPathD=function(){return"M "+this.x1+" "+this.y1+" Q "+this.curveX+" "+this.curveY+", "+this.x2+" "+this.y2},x.prototype.createVisual=function(){this.visual=ie.createGroup(),this.selectorCurve=ie.createPath(this.getPathD(),[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()],["fill","transparent"]]),this.visibleCurve=ie.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)},x.prototype.pointerDown=function(w,k){B.prototype.pointerDown.call(this,w,k),this.manipulationStartCurveX=this.curveX,this.manipulationStartCurveY=this.curveY,this.state==="new"&&(this.curveX=w.x,this.curveY=w.y),this.state==="new"?(this.createVisual(),this.adjustVisual(),this._state="creating"):this.curveGrip.ownsTarget(k)&&(this.activeGrip=this.curveGrip,this._state="resize")},x.prototype.adjustVisual=function(){this.selectorCurve&&this.visibleCurve&&(this.selectorCurve.setAttribute("d",this.getPathD()),this.visibleCurve.setAttribute("d",this.getPathD()),ie.setAttributes(this.visibleCurve,[["stroke",this.strokeColor]]),ie.setAttributes(this.visibleCurve,[["stroke-width",this.strokeWidth.toString()]]),ie.setAttributes(this.visibleCurve,[["stroke-dasharray",this.strokeDasharray.toString()]]))},x.prototype.setupControlBox=function(){B.prototype.setupControlBox.call(this),this.curveControlLine1=ie.createLine(this.x1,this.y1,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.curveControlLine2=ie.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)},x.prototype.addControlGrips=function(){this.curveGrip=this.createGrip(),this.curveX=0,this.curveY=0,B.prototype.addControlGrips.call(this)},x.prototype.positionGrips=function(){B.prototype.positionGrips.call(this);var w=this.curveGrip.GRIP_SIZE;this.positionGrip(this.curveGrip.visual,this.curveX-w/2,this.curveY-w/2),this.curveControlLine1&&this.curveControlLine2&&(this.curveControlLine1.setAttribute("x1",this.x1.toString()),this.curveControlLine1.setAttribute("y1",this.y1.toString()),this.curveControlLine1.setAttribute("x2",this.curveX.toString()),this.curveControlLine1.setAttribute("y2",this.curveY.toString()),this.curveControlLine2.setAttribute("x1",this.x2.toString()),this.curveControlLine2.setAttribute("y1",this.y2.toString()),this.curveControlLine2.setAttribute("x2",this.curveX.toString()),this.curveControlLine2.setAttribute("y2",this.curveY.toString()))},x.prototype.manipulate=function(w){this.state==="move"&&(this.curveX=this.manipulationStartCurveX+w.x-this.manipulationStartX,this.curveY=this.manipulationStartCurveY+w.y-this.manipulationStartY),B.prototype.manipulate.call(this,w)},x.prototype.resize=function(w){this.activeGrip===this.curveGrip&&(this.curveX=w.x,this.curveY=w.y),B.prototype.resize.call(this,w),this.state==="creating"&&(this.curveX=this.x1+(this.x2-this.x1)/2,this.curveY=this.y1+(this.y2-this.y1)/2)},x.prototype.setStrokeColor=function(w){this.strokeColor=w,this.adjustVisual(),this.colorChanged(w)},x.prototype.setStrokeWidth=function(w){this.strokeWidth=w,this.adjustVisual()},x.prototype.setStrokeDasharray=function(w){this.strokeDasharray=w,this.adjustVisual()},x.prototype.scale=function(w,k){this.curveX=this.curveX*w,this.curveY=this.curveY*k,B.prototype.scale.call(this,w,k)},Object.defineProperty(x.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),x.prototype.getState=function(){var w=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,curveX:this.curveX,curveY:this.curveY},B.prototype.getState.call(this));return w.typeName=x.typeName,w},x.prototype.restoreState=function(w){B.prototype.restoreState.call(this,w);var k=w;this.strokeColor=k.strokeColor,this.strokeWidth=k.strokeWidth,this.strokeDasharray=k.strokeDasharray,this.curveX=k.curveX,this.curveY=k.curveY,this.createVisual(),this.adjustVisual()},x.typeName="CurveMarker",x.title="Curve marker",x.icon='',x}(be),Je=function(){function B(x,w){w===void 0&&(w=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=x,this.cancelable=w}return Object.defineProperty(B.prototype,"defaultPrevented",{get:function(){return this._defaultPrevented},enumerable:!1,configurable:!0}),B.prototype.preventDefault=function(){this._defaultPrevented=!0},B}(),Qe=function(B){function x(w,k,z){var F=B.call(this,w,!1)||this;return F.dataUrl=k,F.state=z,F}return he(x,B),x}(Je),Ge=function(B){function x(w,k,z){z===void 0&&(z=!1);var F=B.call(this,w,z)||this;return F.marker=k,F}return he(x,B),x}(Je),at=function(){function B(){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 B.prototype.addEventListener=function(x,w){this[x].push(w)},B.prototype.removeEventListener=function(x,w){var k=this[x].indexOf(w);k>-1&&this[x].splice(k,1)},B}(),nt=function(){function B(x){this.touchPoints=0,this._availableMarkerTypes=this.DEFAULT_MARKER_TYPES,this.mode="select",this.markers=[],this.isDragging=!1,this.renderEventListeners=[],this.closeEventListeners=[],this.settings=new me,this._isOpen=!1,this.undoRedoManager=new ze,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 at,this._silentRenderMode=!1,this._isFocused=!1,this._instanceNo=B.instanceCounter++,this.styles=new je(this.instanceNo),this.uiStyleSettings=this.styles.settings,this.target=x,this.targetRoot=document.body,this.width=x.clientWidth,this.height=x.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(B.prototype,"ALL_MARKER_TYPES",{get:function(){return[oe,re,J,ye,Ke,ge,q,le,Oe,V,we,ke]},enumerable:!1,configurable:!0}),Object.defineProperty(B.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[oe,re,J,ye,ge,q,le]},enumerable:!1,configurable:!0}),Object.defineProperty(B.prototype,"BASIC_MARKER_TYPES",{get:function(){return[oe,re,J,ye,q]},enumerable:!1,configurable:!0}),Object.defineProperty(B.prototype,"availableMarkerTypes",{get:function(){return this._availableMarkerTypes},set:function(x){var w=this;this._availableMarkerTypes.splice(0),x.forEach(function(k){if(typeof k=="string"){var z=w.ALL_MARKER_TYPES.find(function(F){return F.typeName===k});z!==void 0&&w._availableMarkerTypes.push(z)}else w._availableMarkerTypes.push(k)})},enumerable:!1,configurable:!0}),Object.defineProperty(B.prototype,"currentMarker",{get:function(){return this._currentMarker},enumerable:!1,configurable:!0}),Object.defineProperty(B.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(B.prototype,"isUndoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isUndoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(B.prototype,"isRedoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isRedoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(B.prototype,"zoomLevel",{get:function(){return this._zoomLevel},set:function(x){this._zoomLevel=x,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(B.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),B.prototype.open=function(){this.setupResizeObserver(),this.setEditingTarget(),this.setTopLeft(),this.initMarkerCanvas(),this.initOverlay(),this.attachEvents(),this.settings.displayMode==="popup"&&this.onPopupTargetResize(),Le.isLicensed||this.addLogo(),this._isOpen=!0,this._isFocused=!0},B.prototype.show=function(){var x=this;this.styles.styleSheetRoot===void 0&&Be.styleSheetRoot!==void 0&&(this.styles.styleSheetRoot=Be.styleSheetRoot),this.setWindowHeight(),this.showUI(),this.open(),this.eventListeners.show.forEach(function(w){return w(new Je(x))})},B.prototype.render=function(){return xe(this,void 0,void 0,function(){var x;return Se(this,function(w){switch(w.label){case 0:return this.setCurrentMarker(),(x=new Ve).naturalSize=this.renderAtNaturalSize,x.imageType=this.renderImageType,x.imageQuality=this.renderImageQuality,x.markersOnly=this.renderMarkersOnly,x.width=this.renderWidth,x.height=this.renderHeight,[4,x.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 1:return w.sent(),[4,x.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 2:return[2,w.sent()]}})})},B.prototype.close=function(x){var w=this;if(x===void 0&&(x=!1),this.isOpen){var k=!1;x||this.eventListeners.beforeclose.forEach(function(z){var F=new Je(w,!0);z(F),F.defaultPrevented&&(k=!0)}),k||(this.coverDiv&&this.closeUI(),this.targetObserver&&this.targetObserver.unobserve(this.target),this.settings.displayMode==="popup"&&window.removeEventListener("resize",this.setWindowHeight),this.eventListeners.close.forEach(function(z){return z(new Je(w))}),this.detachEvents(),this._isOpen=!1)}},B.prototype.addMarkersToToolbar=function(){for(var x,w=[],k=0;kthis.editorCanvas.clientHeight?this.editorCanvas.clientHeight*x:this.editorCanvas.clientWidth,k=w',x.title="Powered by marker.js",x.style.display="grid",x.style.alignItems="center",x.style.justifyItems="center",x.style.padding="3px",x.style.width="20px",x.style.height="20px",this.logoUI.appendChild(x),this.editorCanvas.appendChild(this.logoUI),this.logoUI.style.position="absolute",this.logoUI.style.pointerEvents="all",this.positionLogo()},B.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")},B.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"},B.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},B.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 x=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=x+"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 Re(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-1&&this.markers.splice(this.markers.indexOf(x),1),x.dispose()},B.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())},B.prototype.toolbarButtonClicked=function(x,w){if(x==="marker"&&w!==void 0)this.createNewMarker(w);else if(x==="action")switch(w){case"select":this.switchToSelectMode(),this.switchToSelectMode();break;case"delete":this.deleteSelectedMarker();break;case"clear":this.clear();break;case"undo":this.undo();break;case"redo":this.redo();break;case"zoom":this.stepZoom();break;case"zoom-out":this.zoomLevel=1;break;case"notes":this.notesArea===void 0?(this.switchToSelectMode(),this.zoomLevel=1,this.showNotesEditor()):this.switchToSelectMode();break;case"close":this.close();break;case"render":this.switchToSelectMode(),this.startRenderAndClose()}},B.prototype.deleteSelectedMarker=function(){var x=this;if(this._currentMarker!==void 0){var w=!1;if(this.eventListeners.markerbeforedelete.forEach(function(z){var F=new Ge(x,x._currentMarker,!0);z(F),F.defaultPrevented&&(w=!0)}),!w){var k=this._currentMarker;this._currentMarker.dispose(),this.markerImage.removeChild(this._currentMarker.container),this.markers.splice(this.markers.indexOf(this._currentMarker),1),this.setCurrentMarker(),this.addUndoStep(),this.eventListeners.markerdelete.forEach(function(z){return z(new Ge(x,k))})}}},B.prototype.clear=function(){var x=this,w=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach(function(ae){var Ce=new Ge(x,void 0,!0);ae(Ce),Ce.defaultPrevented&&(w=!0)}),!w)){this.setCurrentMarker();for(var k=function(ae){var Ce=z.markers[ae];z.setCurrentMarker(z.markers[ae]),z._currentMarker.dispose(),z.markerImage.removeChild(z._currentMarker.container),z.markers.splice(z.markers.indexOf(z._currentMarker),1),z.eventListeners.markerdelete.forEach(function(We){return We(new Ge(x,Ce))})},z=this,F=this.markers.length-1;F>=0;F--)k(F);this.addUndoStep()}},Object.defineProperty(B.prototype,"isNotesAreaOpen",{get:function(){return this.notesArea!==void 0},enumerable:!1,configurable:!0}),B.prototype.showNotesEditor=function(){var x;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=(x=this._currentMarker.notes)!==null&&x!==void 0?x:"",this.overlayContainer.appendChild(this.notesArea))},B.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)},B.prototype.selectLastMarker=function(){this.markers.length>0?this.setCurrentMarker(this.markers[this.markers.length-1]):this.setCurrentMarker()},B.prototype.addUndoStep=function(){var x=this;if(this._currentMarker===void 0||this._currentMarker.state!=="edit"){var w=this.getState(),k=this.undoRedoManager.getLastUndoStep();if(!k||k.width===w.width&&k.height===w.height){var z=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep(w),z1&&this.panTo({x:x.clientX,y:x.clientY}))},B.prototype.onPointerUp=function(x){this.touchPoints>0&&this.touchPoints--,this.touchPoints===0&&this.isDragging&&this._currentMarker!==void 0&&this._currentMarker.pointerUp(this.clientToLocalCoordinates(x.clientX,x.clientY)),this.isDragging=!1,this.addUndoStep()},B.prototype.onPointerOut=function(){this.touchPoints>0&&this.touchPoints--},B.prototype.onKeyUp=function(x){this._currentMarker===void 0||this.notesArea!==void 0||x.key!=="Delete"&&x.key!=="Backspace"||this.deleteSelectedMarker()},B.prototype.clientToLocalCoordinates=function(x,w){var k=this.markerImage.getBoundingClientRect();return{x:(x-k.left)/this.zoomLevel,y:(w-k.top)/this.zoomLevel}},B.prototype.onWindowResize=function(){this.positionUI()},B.prototype.positionUI=function(){switch(this.setTopLeft(),this.settings.displayMode){case"inline":var x=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=x+"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()},B.prototype.addLicenseKey=function(x){Le.addKey(x)},B.prototype.addEventListener=function(x,w){this.eventListeners.addEventListener(x,w)},B.prototype.removeEventListener=function(x,w){this.eventListeners.removeEventListener(x,w)},B.prototype.renderState=function(x){this._silentRenderMode=!0,this.settings.displayMode="inline",this.isOpen||this.show(),this.restoreState(x),this.startRenderAndClose(),this._silentRenderMode=!1},Object.defineProperty(B.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),B.prototype.focus=function(){var x=this;this._isFocused||(this.attachWindowEvents(),this._isFocused=!0,this._previousCurrentMarker!==void 0&&this.setCurrentMarker(this._previousCurrentMarker),this.eventListeners.focus.forEach(function(w){return w(new Je(x))}))},B.prototype.blur=function(){var x=this;this._isFocused&&(this.detachWindowEvents(),this._isFocused=!1,this._previousCurrentMarker=this._currentMarker,this.setCurrentMarker(),this.eventListeners.blur.forEach(function(w){return w(new Je(x))}))},B.instanceCounter=0,B}();/* **********************************
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 rt=function(B,x){return(rt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(w,k){w.__proto__=k}||function(w,k){for(var z in k)Object.prototype.hasOwnProperty.call(k,z)&&(w[z]=k[z])})(B,x)};function dt(B,x){if(typeof x!="function"&&x!==null)throw new TypeError("Class extends value "+String(x)+" is not a constructor or null");function w(){this.constructor=B}rt(B,x),B.prototype=x===null?Object.create(x):(w.prototype=x.prototype,new w)}function et(B,x,w,k){return new(w||(w=Promise))(function(z,F){function ae($e){try{We(k.next($e))}catch(Ae){F(Ae)}}function Ce($e){try{We(k.throw($e))}catch(Ae){F(Ae)}}function We($e){var Ae;$e.done?z($e.value):(Ae=$e.value,Ae instanceof w?Ae:new w(function(Ze){Ze(Ae)})).then(ae,Ce)}We((k=k.apply(B,x||[])).next())})}function st(B,x){var w,k,z,F,ae={label:0,sent:function(){if(1&z[0])throw z[1];return z[1]},trys:[],ops:[]};return F={next:Ce(0),throw:Ce(1),return:Ce(2)},typeof Symbol=="function"&&(F[Symbol.iterator]=function(){return this}),F;function Ce(We){return function($e){return function(Ae){if(w)throw new TypeError("Generator is already executing.");for(;ae;)try{if(w=1,k&&(z=2&Ae[0]?k.return:Ae[0]?k.throw||((z=k.return)&&z.call(k),0):k.next)&&!(z=z.call(k,Ae[1])).done)return z;switch(k=0,z&&(Ae=[2&Ae[0],z.value]),Ae[0]){case 0:case 1:z=Ae;break;case 4:return ae.label++,{value:Ae[1],done:!1};case 5:ae.label++,k=Ae[1],Ae=[0];continue;case 7:Ae=ae.ops.pop(),ae.trys.pop();continue;default:if(!(z=ae.trys,(z=z.length>0&&z[z.length-1])||Ae[0]!==6&&Ae[0]!==2)){ae=0;continue}if(Ae[0]===3&&(!z||Ae[1]>z[0]&&Ae[1]0&&w>0){var k=new Rt(x,w),z=k.ratio>=1?20:k.getHorizontalLength(20),F=k.ratio<1?20:k.getVerticalLength(20),ae=document.createElementNS("http://www.w3.org/2000/svg","svg");ae.setAttribute("xmlns","http://www.w3.org/2000/svg"),ae.setAttribute("viewBox","0 0 24 24"),document.body.appendChild(ae);var Ce=Ue.createDefs();ae.appendChild(Ce);var We=Ue.createElement("clipPath",[["id","text-bg-clip"]]);Ce.appendChild(We);var $e=Ue.createPath(Ue.getHollowRectanglePath((24-z)/2,(24-F)/2,z,F,(24-z)/2+2,(24-F)/2+2,z-4,F-4));ae.appendChild($e);var Ae=Ue.createText([["x","0"],["y","0"],["font-size","7px"],["font-family","monospace"]]);Ae.appendChild(Ue.createTSpan(x+":"+w)),ae.appendChild(Ae);var Ze=Ae.getBBox();Ue.setAttributes(Ae,[["x",((24-Ze.width)/2).toString()],["y",((24-Ze.height)/2-Ze.y).toString()]]);var qe=Ue.createPath(Ue.getHollowRectanglePath(0,0,24,24,(24-Math.ceil(Ze.width))/2,(24-Math.ceil(Ze.height))/2,Math.ceil(Ze.width),Math.ceil(Ze.height)));return We.appendChild(qe),Ue.setAttributes($e,[["clip-path","url(#text-bg-clip)"]]),document.body.removeChild(ae),ae.outerHTML}return''},B}(),Tt=function(B){function x(w,k,z){var F=B.call(this,w,k)||this;return F.isDropdownOpen=!1,F.onClick=F.dropdownButtonClicked,F.dropdownButtons=z,F}return dt(x,B),x.prototype.setupDropdown=function(){var w=this;this.dropdownBlock=document.createElement("div"),this.dropdownBlock.className=this.dropdownClassName+" "+this.dropdownColorsClassName,this.dropdownBlock.style.display="none",this.dropdownButtons.forEach(function(k){k.className=w.className,k.colorsClassName=w.colorsClassName,w.dropdownBlock.appendChild(k.getUI())}),this.uiContainer.appendChild(this.dropdownBlock)},x.prototype.positionDropdown=function(){this.dropdownBlock.style.left=this.uiContainer.clientLeft+"px",this.dropdownBlock.style.top=this.uiContainer.clientTop+this.uiContainer.clientHeight+"px"},x.prototype.dropdownButtonClicked=function(){this.dropdownBlock===void 0&&this.setupDropdown(),this.isDropdownOpen=!this.isDropdownOpen,this.toggleDropdown()},x.prototype.toggleDropdown=function(){this.positionDropdown(),this.dropdownBlock.style.display=this.isDropdownOpen?"inline-block":"none"},x.prototype.showDropdown=function(){this.isDropdownOpen=!0,this.toggleDropdown()},x.prototype.hideDropdown=function(){this.isDropdownOpen=!1,this.toggleDropdown()},x}(bt),At=function(){function B(x,w){this.GRIP_SIZE=10,this.color=x,this.fillColor=w,this.visual=Ue.createGroup(),this.visual.appendChild(Ue.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(Ue.createCircle(this.GRIP_SIZE,[["fill",this.fillColor],["fill-opacity","0.9"],["stroke",this.color],["stroke-width","2"],["stroke-opacity","0.7"]]))}return B.prototype.ownsTarget=function(x){return x===this.visual||x===this.visual.childNodes[0]||x===this.visual.childNodes[1]},B.prototype.setCenter=function(x,w){this.visual.childNodes.forEach(function(k){return Ue.setAttributes(k,[["cx",x.toString()],["cy",w.toString()]])})},B}(),_t=function(){function B(x,w,k,z){this.isMoving=!1,this._isGridVisible=!0,this.numberOfGridLines=2,this.horizontalGridLines=[],this.verticalGridLines=[],this._zoomFactor=1,this.cropRectChanged=!1,this.canvasWidth=x,this.canvasHeight=w,this.margin=k,this.container=z,this.attachEvents=this.attachEvents.bind(this),this.onPointerDown=this.onPointerDown.bind(this),this.onPointerMove=this.onPointerMove.bind(this),this.onPointerUp=this.onPointerUp.bind(this),this.resize=this.resize.bind(this),this.adjustCropRect=this.adjustCropRect.bind(this),this.scaleCanvas=this.scaleCanvas.bind(this),this.getRescaledRect=this.getRescaledRect.bind(this)}return Object.defineProperty(B.prototype,"aspectRatio",{get:function(){return this._aspectRatio},set:function(x){this._aspectRatio=x,this.adjustCropRect(),this.setCropRectangle(this.cropRect)},enumerable:!1,configurable:!0}),Object.defineProperty(B.prototype,"isGridVisible",{get:function(){return this._isGridVisible},set:function(x){this._isGridVisible=x,this.gridContainer&&Ue.setAttributes(this.gridContainer,[["display",this._isGridVisible?"":"none"]])},enumerable:!1,configurable:!0}),Object.defineProperty(B.prototype,"zoomFactor",{get:function(){return this._zoomFactor},set:function(x){this._zoomFactor=x,this.setCropRectangle(this.cropRect)},enumerable:!1,configurable:!0}),B.prototype.open=function(){var x=this;this.cropShadeElement=Ue.createPath("M0,0Z",[["fill",this.cropShadeColor],["fill-opacity","0.8"]]),this.container.appendChild(this.cropShadeElement),this.gridContainer=Ue.createGroup([["display",this.isGridVisible?"":"none"]]),this.container.appendChild(this.gridContainer);for(var w=0;wthis.canvasHeight/this.canvasWidth?this.margin:this.margin+this.canvasHeight/2-w.height/2),Ue.setAttributes(this.cropRectElement,[["x",w.x.toString()],["y",w.y.toString()],["width",w.width.toString()],["height",w.height.toString()]]);var k=w.height/(this.numberOfGridLines+1);this.horizontalGridLines.forEach(function(F,ae){var Ce=w.y+k*(ae+1);Ue.setAttributes(F,[["x1",""+w.x],["y1",""+Ce],["x2",""+(w.x+w.width)],["y2",""+Ce]])});var z=w.width/(this.numberOfGridLines+1);this.verticalGridLines.forEach(function(F,ae){var Ce=w.x+z*(ae+1);Ue.setAttributes(F,[["x1",""+Ce],["y1",""+w.y],["x2",""+Ce],["y2",""+(w.y+w.height)]])}),Ue.setAttributes(this.cropShadeElement,[["d",Ue.getHollowRectanglePath(0,0,this.canvasWidth+2*this.margin,this.canvasHeight+2*this.margin,w.x,w.y,w.width,w.height)]]),this.topLeftGrip.setCenter(w.x,w.y),this.topRightGrip.setCenter(w.x+w.width,w.y),this.bottomLeftGrip.setCenter(w.x,w.y+w.height),this.bottomRightGrip.setCenter(w.x+w.width,w.y+w.height),this.cropRectChanged&&this.onCropChange&&(this.cropRectChanged=!1,this.onCropChange(this.cropRect)),this.cropRectChanged=!1},B.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)},B.prototype.clientToLocalCoordinates=function(x,w){var k=this.container.getBoundingClientRect();return{x:x-k.left+this.margin,y:w-k.top+this.margin}},B.prototype.onPointerDown=function(x){this.container.setPointerCapture(x.pointerId),this.previousPoint=this.clientToLocalCoordinates(x.clientX,x.clientY),this.cropRectElement===x.target?this.isMoving=!0:this.topLeftGrip.ownsTarget(x.target)?this.activeGrip=this.topLeftGrip:this.bottomLeftGrip.ownsTarget(x.target)?this.activeGrip=this.bottomLeftGrip:this.topRightGrip.ownsTarget(x.target)?this.activeGrip=this.topRightGrip:this.bottomRightGrip.ownsTarget(x.target)&&(this.activeGrip=this.bottomRightGrip)},B.prototype.onPointerMove=function(x){if(this.isMoving)this.move(this.clientToLocalCoordinates(x.clientX,x.clientY));else if(this.activeGrip){var w=this.clientToLocalCoordinates(x.clientX,x.clientY);this.resize(w)}x.preventDefault()},B.prototype.onPointerUp=function(x){this.activeGrip=void 0,this.isMoving=!1,this.container.releasePointerCapture(x.pointerId)},B.prototype.move=function(x){var w=x.x-this.previousPoint.x,k=x.y-this.previousPoint.y;this.zoomFactor!==1&&(w=-w/this.zoomFactor,k=-k/this.zoomFactor),this.cropRect.x=Math.min(Math.max(this.margin,this.cropRect.x+w),this.canvasWidth-this.cropRect.width+this.margin),this.cropRect.y=Math.min(Math.max(this.margin,this.cropRect.y+k),this.canvasHeight-this.cropRect.height+this.margin),this.onCropChange?(this.cropRectChanged=!0,this.onCropChange(this.cropRect)):this.setCropRectangle(this.cropRect),this.previousPoint=x},B.prototype.resize=function(x){var w=Object.assign({},this.cropRect),k=x.x-this.previousPoint.x,z=x.y-this.previousPoint.y;switch(this.activeGrip){case this.bottomLeftGrip:case this.topLeftGrip:w.x+kthis.canvasWidth*this.zoomFactor&&(k=this.canvasWidth*this.zoomFactor-w.width),w.width+=k}switch(this.activeGrip){case this.topLeftGrip:case this.topRightGrip:this.aspectRatio?(w.y=this.cropRect.y-(this.activeGrip===this.topLeftGrip?-1:1)*this.aspectRatio.getVerticalLength(k),w.height=this.aspectRatio.getVerticalLength(w.width)):(w.y+=z,w.height=this.cropRect.y+this.cropRect.height-w.y);break;case this.bottomLeftGrip:case this.bottomRightGrip:this.aspectRatio?w.height=this.aspectRatio.getVerticalLength(w.width):w.height+=z}w.width<10&&(w.x=this.cropRect.x,w.width=10),w.height<10&&(w.y=this.cropRect.y,w.height=10),this.previousPoint=x,w.x>=this.margin&&w.y>=this.margin&&w.x-this.margin+w.width<=this.canvasWidth&&w.y-this.margin+w.height<=this.canvasHeight&&(this.cropRect=w,this.onCropChange?(this.cropRectChanged=!0,this.onCropChange(this.cropRect)):this.setCropRectangle(this.cropRect))},B.prototype.adjustCropRect=function(){if(this.aspectRatio&&Math.round(this.cropRect.height)!==Math.round(this.aspectRatio.getVerticalLength(this.cropRect.width))){var x=this.cropRect.x+this.cropRect.width/2,w=this.cropRect.y+this.cropRect.height/2,k=this.aspectRatio.getHorizontalLength(this.cropRect.height),z=this.aspectRatio.getVerticalLength(this.cropRect.width);k/this.canvasWidththis.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=x-this.cropRect.width/2,this.cropRect.y=w-this.cropRect.height/2,this.cropRect.x+this.cropRect.width>this.margin+this.canvasWidth&&(this.cropRect.x=this.margin+this.canvasWidth-this.cropRect.width),this.cropRect.y+this.cropRect.height>this.margin+this.canvasHeight&&(this.cropRect.y=this.margin+this.canvasHeight-this.cropRect.height),this.cropRect.x=Math.max(this.cropRect.x,this.margin),this.cropRect.y=Math.max(this.cropRect.y,this.margin)}},B.prototype.getRescaledRect=function(x,w,k,z,F,ae){var Ce=k/x,We=z/w;return{x:(F.x-ae)*Ce+ae,y:(F.y-ae)*We+ae,width:F.width*Ce,height:F.height*We}},B.prototype.scaleCanvas=function(x,w){var k=this.getRescaledRect(this.canvasWidth,this.canvasHeight,x,w,this.cropRect,this.margin);this.canvasWidth=x,this.canvasHeight=w,this.onCropChange&&this.onCropChange(k),this.setCropRectangle(k)},B}(),Pt=function(){function B(x){this._angle=0,this.isDragging=!1,this.width=401,this.height=24,this.title=x,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(B.prototype,"angle",{get:function(){return this._angle},set:function(x){this._angle=x,this.setAngleLabel(),this.positionScaleShape()},enumerable:!1,configurable:!0}),B.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},B.prototype.onPointerDown=function(x){this.controlContainer.setPointerCapture(x.pointerId),this.isDragging=!0,this.previousPoint={x:x.clientX,y:x.clientY}},B.prototype.onPointerMove=function(x){this.isDragging&&(this.onAngleChange&&this.onAngleChange((x.clientX-this.previousPoint.x)/5),this.previousPoint.x=x.clientX)},B.prototype.onPointerUp=function(x){this.isDragging&&this.onAngleChange&&this.onAngleChange((x.clientX-this.previousPoint.x)/5),this.isDragging=!1,this.controlContainer.releasePointerCapture(x.pointerId)},B.prototype.setAngleLabel=function(){if(this.angleLabelText){this.angleLabelText.innerHTML=""+Math.round(this._angle);var x=this.angleLabelText.getBBox();Ue.setAttributes(this.angleLabelElement,[["x",((this.width-x.width)/2).toString()],["y",(this.height/2).toString()]])}},B.prototype.positionScaleShape=function(){if(this.scaleShape){var x=this.scaleShape.transform.baseVal.getItem(0);x.setTranslate(this._angle%5*5-25,0),this.scaleShape.transform.baseVal.replaceItem(x,0)}},B.prototype.getVisual=function(){var x=document.createElementNS("http://www.w3.org/2000/svg","svg");x.setAttribute("xmlns","http://www.w3.org/2000/svg"),x.setAttribute("width",this.width+"px"),x.setAttribute("height",this.height+"px"),x.setAttribute("viewBox","0 0 "+this.width+" "+this.height),x.style.flexShrink="0",document.body.appendChild(x);for(var w="M0,"+(this.height-1)+" v"+-this.height/3+"h1v"+this.height/3,k=1;k<=this.width/5+10;k++){var z=k%5==0?this.height/3:this.height/6;w+="h4v"+-z+"h1v"+z}w+="v1H0Z",this.scaleShape=Ue.createPath(w);var F=Ue.createTransform();this.scaleShape.transform.baseVal.appendItem(F),x.appendChild(this.scaleShape),this.angleLabelElement=Ue.createText([["x","0"],["y","0"],["font-size","10px"],["font-family","monospace"]]),this.angleLabelText=Ue.createTSpan(""),this.angleLabelElement.appendChild(this.angleLabelText);var ae=Ue.createTSpan("");return ae.innerHTML="°",this.angleLabelElement.appendChild(ae),x.appendChild(this.angleLabelElement),document.body.removeChild(x),x},B}(),It=function(){function B(){this.naturalSize=!1,this.imageType="image/png"}return B.prototype.rasterize=function(x,w,k,z,F,ae,Ce){var We=this;return new Promise(function($e){var Ae=document.createElement("canvas");Ae.width=x.width.baseVal.value-2*z,Ae.height=x.height.baseVal.value-2*z;var Ze=1,qe=1;We.naturalSize===!0?(Ze=w.naturalWidth/(x.width.baseVal.value-2*z)/ae,qe=w.naturalHeight/(x.height.baseVal.value-2*z)/Ce,Ae.width=w.naturalWidth/ae,Ae.height=w.naturalHeight/Ce):We.width!==void 0&&We.height!==void 0&&(Ze=We.width/k.width,qe=We.height/k.height,Ae.width*=Ze,Ae.height*=qe);var ft=Ae.getContext("2d");ft.translate(Ae.width/2,Ae.height/2),ft.rotate(F*Math.PI/180),ft.scale(ae,Ce),ft.translate(-Ae.width/2,-Ae.height/2),ft.drawImage(w,0,0,Ae.width,Ae.height);var Lt=document.createElement("canvas");Lt.width=k.width*Ze,Lt.height=k.height*qe,Lt.getContext("2d").putImageData(ft.getImageData((k.x-z)*Ze,(k.y-z)*qe,k.width*Ze,k.height*qe),0,0),$e(Lt.toDataURL(We.imageType,We.imageQuality))})},B}(),Bt=function(){function B(x){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=B.instanceCounter++,this.styles=new pt(this.instanceNo),this.target=x,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(B.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),Object.defineProperty(B.prototype,"zoomToCropEnabled",{get:function(){return this._zoomToCropEnabled},set:function(x){this._zoomToCropEnabled=x,x?this.zoomToCrop():this.unzoomFromCrop()},enumerable:!1,configurable:!0}),Object.defineProperty(B.prototype,"isGridVisible",{get:function(){return this._isGridVisible},set:function(x){this._isGridVisible=x,this.cropLayer&&(this.cropLayer.isGridVisible=this._isGridVisible)},enumerable:!1,configurable:!0}),Object.defineProperty(B.prototype,"gridLines",{get:function(){return this._gridLines},set:function(x){this._gridLines=x,this.cropLayer&&(this.cropLayer.numberOfGridLines=this._gridLines)},enumerable:!1,configurable:!0}),Object.defineProperty(B.prototype,"rotationAngle",{get:function(){return this._rotationAngle},set:function(x){this._rotationAngle=x,this.straightener&&(this.straightener.angle=this._rotationAngle)},enumerable:!1,configurable:!0}),Object.defineProperty(B.prototype,"paddedImageWidth",{get:function(){return this.imageWidth+2*this.CANVAS_MARGIN},enumerable:!1,configurable:!0}),Object.defineProperty(B.prototype,"paddedImageHeight",{get:function(){return this.imageHeight+2*this.CANVAS_MARGIN},enumerable:!1,configurable:!0}),Object.defineProperty(B.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(B.prototype,"aspectRatio",{get:function(){var x;return(x=this._aspectRatio)!==null&&x!==void 0?x:this.aspectRatios[0]},set:function(x){this._aspectRatio=x},enumerable:!1,configurable:!0}),B.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},B.prototype.show=function(){this.showUI(),this.open()},B.prototype.close=function(x){x===void 0&&(x=!1),this.isOpen&&(this.coverDiv&&this.closeUI(),this.targetObserver&&this.targetObserver.unobserve(this.target),this.displayMode==="popup"&&window.removeEventListener("resize",this.setWindowHeight),x||this.closeEventListeners.forEach(function(w){return w()}),this._isOpen=!1)},B.prototype.addRenderEventListener=function(x){this.renderEventListeners.push(x)},B.prototype.removeRenderEventListener=function(x){this.renderEventListeners.indexOf(x)>-1&&this.renderEventListeners.splice(this.renderEventListeners.indexOf(x),1)},B.prototype.addCloseEventListener=function(x){this.closeEventListeners.push(x)},B.prototype.removeCloseEventListener=function(x){this.closeEventListeners.indexOf(x)>-1&&this.closeEventListeners.splice(this.closeEventListeners.indexOf(x),1)},B.prototype.setupResizeObserver=function(){var x=this;this.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){x.resize(x.target.clientWidth,x.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))},B.prototype.onPopupResize=function(){if(this.contentDiv.clientWidth>0&&this.contentDiv.clientHeight>0){var x=1*this.target.clientWidth/this.target.clientHeight,w=this.contentDiv.clientWidth/x>this.contentDiv.clientHeight?(this.contentDiv.clientHeight-2*this.CANVAS_MARGIN)*x:this.contentDiv.clientWidth-2*this.CANVAS_MARGIN,k=w+2*this.CANVAS_MARGINx+this.CANVAS_MARGIN?this.target.offsetTop-(x+this.CANVAS_MARGIN):0;this.coverDiv.style.top=w+"px",this.coverDiv.style.left=(this.target.offsetLeft>this.CANVAS_MARGIN?this.target.offsetLeft-this.CANVAS_MARGIN:0)+"px",this.coverDiv.style.width=this.target.offsetWidth+this.CANVAS_MARGIN+"px",this.coverDiv.style.zIndex=this.styles.settings.zIndex!==void 0?this.styles.settings.zIndex:"5";break;case"popup":this.coverDiv.style.position="absolute",this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=window.innerHeight+"px",this.coverDiv.style.backgroundColor="rgba(0, 0, 0, 0.75)",this.coverDiv.style.zIndex=this.styles.settings.zIndex!==void 0?this.styles.settings.zIndex:"1000",this.coverDiv.style.display="flex"}this.targetRoot.appendChild(this.coverDiv),this.uiDiv=document.createElement("div"),this.uiDiv.style.display="flex",this.uiDiv.style.flexDirection="column",this.uiDiv.style.flexGrow="2",this.uiDiv.style.margin=this.displayMode==="popup"?this.popupMargin+"px":"0px",this.uiDiv.style.border="0px",this.coverDiv.appendChild(this.uiDiv),this.addToolbars(),this.uiDiv.appendChild(this.topToolbar.getUI()),this.contentDiv=document.createElement("div"),this.contentDiv.style.display="flex",this.contentDiv.style.alignItems="center",this.contentDiv.style.flexDirection="row",this.contentDiv.style.flexGrow="2",this.contentDiv.style.flexShrink="1",this.contentDiv.style.overflow="hidden",this.contentDiv.style.backgroundColor=this.styles.settings.canvasBackgroundColor,this.displayMode==="popup"&&(this.contentDiv.style.maxHeight="calc(100vh - "+(2*this.popupMargin+2*this.toolbarHeight)+"px)",this.contentDiv.style.maxWidth="calc(100vw - "+2*this.popupMargin+"px)"),this.uiDiv.appendChild(this.contentDiv),this.editorCanvas=document.createElement("div"),this.editorCanvas.style.flexGrow="2",this.editorCanvas.style.flexShrink="1",this.editorCanvas.style.position="relative",this.editorCanvas.style.overflow="hidden",this.editorCanvas.style.display="flex",this.displayMode==="popup"&&(this.editorCanvas.style.alignItems="center",this.editorCanvas.style.justifyContent="center"),this.editorCanvas.style.pointerEvents="none",this.contentDiv.appendChild(this.editorCanvas),this.uiDiv.appendChild(this.bottomToolbar.getUI()),this.straightener.angle=this.rotationAngle},B.prototype.addToolbars=function(){this.addTopToolbar(),this.addBottomToolbar()},B.prototype.addTopToolbar=function(){var x=this;this.topToolbar=new tt,this.topToolbar.display=this.styles.settings.hideTopToolbar?"none":"",this.topToolbar.className=this.toolbarStyleClass.name,this.topToolbar.colorsClassName=this.styles.settings.toolbarStyleColorsClassName?this.styles.settings.toolbarStyleColorsClassName:this.toolbarStyleColorsClass.name,this.topToolbar.fadeInClassName=this.styles.fadeInAnimationClassName,this.topToolbar.blockClassName=this.toolbarBlockStyleClass.name,this.topToolbar.buttonClassName=this.toolbarButtonStyleClass.name,this.topToolbar.buttonColorsClassName=this.styles.settings.toolbarButtonStyleColorsClassName?this.styles.settings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,this.topToolbar.buttonActiveColorsClassName=this.styles.settings.toolbarActiveButtonStyleColorsClassName?this.styles.settings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name;var w=new Et;w.minWidth=3*this.toolbarHeight+"px",this.topToolbar.addButtonBlock(w);var k=[];this.aspectRatios.forEach(function(qe){var ft=new bt(ct.getIcon(qe.horizontal,qe.vertical),qe.horizontal===0&&qe.vertical===0?"FREE":qe.horizontal+":"+qe.vertical);ft.onClick=function(){return x.ratioButtonClicked(qe)},k.push(ft)}),this.aspectRatioButton=new Tt(ct.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,w.addButton(this.aspectRatioButton),this.aspectRatios.length<2&&this.aspectRatioButton.hide();var z=new bt('',"Toggle grid");z.isActive=this.isGridVisible,z.onClick=function(){x.isGridVisible=!x.isGridVisible,z.isActive=x.isGridVisible},w.addButton(z);var F=new bt('',"Zoom to selection");if(F.isActive=this.zoomToCropEnabled,F.onClick=function(){x.zoomToCropEnabled=!x.zoomToCropEnabled,F.isActive=x.zoomToCropEnabled},w.addButton(F),!ut.isLicensed){var ae=new Ot;this.topToolbar.addElementBlock(ae);var Ce=document.createElement("div");Ce.className=this.topToolbar.buttonClassName+" "+this.topToolbar.buttonColorsClassName;var We=document.createElement("a");We.style.color="currentColor",We.href="https://markerjs.com/products/cropro",We.target="_blank",We.innerHTML='',Ce.appendChild(We),ae.addElement(Ce)}var $e=new Et;$e.minWidth=3*this.toolbarHeight+"px",$e.contentAlign="end",this.topToolbar.addButtonBlock($e);var Ae=new bt('',"OK");Ae.onClick=this.startRenderAndClose,$e.addButton(Ae),this.styles.settings.toolbarOkButtonStyleColorsClassName&&(Ae.colorsClassName=this.styles.settings.toolbarOkButtonStyleColorsClassName);var Ze=new bt('',"Close");Ze.onClick=this.close,$e.addButton(Ze),this.styles.settings.toolbarCloseButtonStyleColorsClassName&&(Ze.colorsClassName=this.styles.settings.toolbarCloseButtonStyleColorsClassName)},B.prototype.addBottomToolbar=function(){var x=this;this.bottomToolbar=new tt,this.bottomToolbar.display=this.styles.settings.hideBottomToolbar?"none":"",this.bottomToolbar.className=this.toolbarStyleClass.name,this.bottomToolbar.colorsClassName=this.styles.settings.toolbarStyleColorsClassName?this.styles.settings.toolbarStyleColorsClassName:this.toolbarStyleColorsClass.name,this.bottomToolbar.fadeInClassName=this.styles.fadeInAnimationClassName,this.bottomToolbar.blockClassName=this.toolbarBlockStyleClass.name,this.bottomToolbar.buttonClassName=this.toolbarButtonStyleClass.name,this.bottomToolbar.buttonColorsClassName=this.styles.settings.toolbarButtonStyleColorsClassName?this.styles.settings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,this.bottomToolbar.buttonActiveColorsClassName=this.styles.settings.toolbarActiveButtonStyleColorsClassName?this.styles.settings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name;var w=new Et;w.minWidth=2*this.toolbarHeight+"px",this.bottomToolbar.addButtonBlock(w);var k=new bt('',"Rotate left");k.onClick=this.rotateLeftButtonClicked,w.addButton(k);var z=new bt('',"Rotate right");z.onClick=this.rotateRightButtonClicked,w.addButton(z);var F=new Ot;F.className=this.toolbarStraightenerBlockStyleClass.name,this.bottomToolbar.addElementBlock(F),this.straightener=new Pt("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($e){x.rotateBy($e),x.straightener.angle=x.rotationAngle},F.addElement(this.straightener.getUI());var ae=new Et;ae.minWidth=2*this.toolbarHeight+"px",ae.contentAlign="end",this.bottomToolbar.addButtonBlock(ae);var Ce=new bt('',"Flip horizontal");Ce.onClick=this.flipHorizontallyButtonClicked,ae.addButton(Ce);var We=new bt('',"Flip vertical");We.onClick=this.flipVerticallyButtonClicked,ae.addButton(We)},B.prototype.ratioButtonClicked=function(x){this.aspectRatio=x,this.applyAspectRatio(),this.aspectRatioButton.hideDropdown()},B.prototype.applyAspectRatio=function(){this.setCropLayerAspectRatio(),this.aspectRatioButton.icon=ct.getIcon(this.aspectRatio.horizontal,this.aspectRatio.vertical)},B.prototype.setCropLayerAspectRatio=function(){this.cropLayer&&(this.aspectRatio&&this.aspectRatio.horizontal!==0&&this.aspectRatio.vertical!==0?this.cropLayer.aspectRatio=new Rt(this.aspectRatio.horizontal,this.aspectRatio.vertical):this.cropLayer.aspectRatio=void 0)},B.prototype.closeUI=function(){this.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},B.prototype.getState=function(){return{width:this.imageWidth,height:this.imageHeight,rotationAngle:this.rotationAngle,flippedHorizontally:this.flippedHorizontally,flippedVertically:this.flippedVertically,cropRect:Object.assign({},this.cropRect)}},B.prototype.restoreState=function(x){if(x){var w=this.cropLayer.getRescaledRect(x.width,x.height,this.imageWidth,this.imageHeight,x.cropRect,this.CANVAS_MARGIN);this.cropLayer.setCropRectangle(w),this.cropRectChanged(w),this.flippedHorizontally=x.flippedHorizontally,this.flippedVertically=x.flippedVertically,this.applyFlip(),this.rotationAngle=x.rotationAngle,this.applyRotation()}},B.prototype.clientToLocalCoordinates=function(x,w){var k=this.cropImage.getBoundingClientRect();return{x:x-k.left,y:w-k.top}},B.prototype.onWindowResize=function(){this.positionUI()},B.prototype.positionUI=function(){switch(this.setTopLeft(),this.displayMode){case"inline":var x=this.target.offsetTop>this.toolbarHeight?this.target.offsetTop-this.toolbarHeight:0;this.coverDiv.style.top=x+"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()},B.prototype.rotateLeftButtonClicked=function(){var x=this.rotationAngle-90;this.rotationAngle%90!=0&&(x+=this.rotationAngle>=0?90-this.rotationAngle%90:-this.rotationAngle%90),this.rotateTo(x)},B.prototype.rotateRightButtonClicked=function(){var x=this.rotationAngle+90;this.rotationAngle%90!=0&&(x-=this.rotationAngle>=0?this.rotationAngle%90:90+this.rotationAngle%90),this.rotateTo(x)},B.prototype.rotateTo=function(x){x=(x=x>180?x-360:x)<=-180?x+360:x,this.rotationAngle=x,this.applyRotation()},B.prototype.rotateBy=function(x){this.rotateTo((this.rotationAngle+x)%360)},B.prototype.applyRotation=function(){var x=this.zoomToCropEnabled;this.zoomToCropEnabled=!1,this.editingTargetRotationScaleContainer.style.transformOrigin=this.imageWidth/2+"px "+this.imageHeight/2+"px",this.editingTargetRotationScaleContainer.style.transform="scale(1)";var w=this.editingTargetRotationContainer.transform.baseVal.getItem(0);w.setRotate(this.rotationAngle,this.imageWidth/2,this.imageHeight/2),this.editingTargetRotationContainer.transform.baseVal.replaceItem(w,0);var 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=x},B.prototype.flipHorizontallyButtonClicked=function(){this.flippedHorizontally=!this.flippedHorizontally,this.applyFlip()},B.prototype.flipVerticallyButtonClicked=function(){this.flippedVertically=!this.flippedVertically,this.applyFlip()},B.prototype.applyFlip=function(){this.editingTarget.style.transform="scale("+(this.flippedHorizontally?-1:1)+","+(this.flippedVertically?-1:1)+")"},B.prototype.startRenderAndClose=function(){return et(this,void 0,void 0,function(){var x,w;return st(this,function(k){switch(k.label){case 0:return[4,this.render()];case 1:return x=k.sent(),w=this.getState(),this.renderEventListeners.forEach(function(z){return z(x,w)}),this.close(!0),[2]}})})},B.prototype.render=function(){return et(this,void 0,void 0,function(){var x;return st(this,function(w){switch(w.label){case 0:return(x=new It).naturalSize=this.renderAtNaturalSize,x.imageType=this.renderImageType,x.imageQuality=this.renderImageQuality,x.width=this.renderWidth,x.height=this.renderHeight,this.unzoomFromCrop(),Ue.setAttributes(this.cropLayerContainer,[["display","none"]]),[4,x.rasterize(this.cropImage,this.target,{x:this.cropRect.x,y:this.cropRect.y,width:this.cropRect.width,height:this.cropRect.height},this.CANVAS_MARGIN,this.rotationAngle,this.scaleFactor*(this.flippedHorizontally?-1:1),this.scaleFactor*(this.flippedVertically?-1:1))];case 1:return w.sent(),[4,x.rasterize(this.cropImage,this.target,{x:this.cropRect.x,y:this.cropRect.y,width:this.cropRect.width,height:this.cropRect.height},this.CANVAS_MARGIN,this.rotationAngle,this.scaleFactor*(this.flippedHorizontally?-1:1),this.scaleFactor*(this.flippedVertically?-1:1))];case 2:return[2,w.sent()]}})})},B.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new Ye("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 Ye("toolbar_colors",`
background-color: `+this.styles.settings.toolbarBackgroundColor+`;
`)),this.toolbarBlockStyleClass=this.styles.addClass(new Ye("toolbar-block",`
display: flex;
align-items: center;
box-sizing: content-box;
`));var x=this.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new Ye("toolbar_button",`
display: inline-block;
width: `+(this.toolbarHeight-2*x)+`px;
height: `+(this.toolbarHeight-2*x)+`px;
padding: `+x+`px;
cursor: default;
user-select: none;
box-sizing: content-box;
`)),this.toolbarButtonStyleColorsClass=this.styles.addClass(new Ye("toolbar_button_colors",`
color: `+this.styles.settings.toolbarColor+`;
fill: currentColor;
`)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new Ye("toolbar_active_button",`
color: `+this.styles.settings.toolbarColor+`;
fill: currentColor;
background-color: `+this.styles.settings.toolbarBackgroundActiveColor+`
`)),this.styles.addRule(new Xe("."+this.toolbarButtonStyleClass.name+" svg",`
height: `+this.toolbarHeight/2+`px;
`)),this.styles.addRule(new Xe("."+this.toolbarButtonStyleColorsClass.name+":hover",`
background-color: `+this.styles.settings.toolbarBackgroundHoverColor+`
`)),this.toolbarDropdownStyleClass=this.styles.addClass(new Ye("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 Ye("toolbar_dropdown_colors",`
background-color: `+this.styles.settings.toolbarBackgroundColor+`;
`)),this.toolbarStraightenerBlockStyleClass=this.styles.addClass(new Ye("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 Ye("toolbar_straightener",`
display: flex;
overflow: hidden;
justify-content: center;
height: `+(this.toolbarHeight-2*x)+`px;
padding: `+x+`px;
cursor: default;
user-select: none;
box-sizing: content-box;
`)),this.toolbarStraightenerStyleColorsClass=this.styles.addClass(new Ye("toolbar_straightener_colors",`
color: `+this.styles.settings.toolbarColor+`;
fill: currentColor;
`))},B.instanceCounter=0,B}(),Wt=U("8hTe"),Mt=U.n(Wt),Ft=/]*>/g;function Ht(B){var x=document.createElement("div");return x.innerHTML=B,x.childNodes.length===0?"":x.childNodes[0].nodeValue}var Jt=ne.a=function(B){var x=B.value,w=x===void 0?"":x,k=B.edit,z=k===void 0?!1:k,F=B.className,ae=B.showTextOnly,Ce=B.showLines,We=B.replaces,$e=B.zoomImg,Ae=B.hasMask,Ze=B.style,qe=Ze===void 0?{}:Ze,ft=B.stylesPrev,Lt=ft===void 0?{}:ft,Ut=String(w),yt=Object(C.useRef)(),Nt=Object(C.useRef)(),rr=Object(C.useState)(""),Qt=Object(K.a)(rr,2),Kt=Qt[0],jt=Qt[1],nr=Object(C.useState)("office"),Zt=Object(K.a)(nr,2),lr=Zt[0],Gt=Zt[1],ir=function(){var it=new Bt(Nt.current);it.displayMode="popup",it.addRenderEventListener(function(){var xt=Object(R.a)(e.a.mark(function ot(wt){var mt;return e.a.wrap(function(Ct){for(;;)switch(Ct.prev=Ct.next){case 0:return yt.current.style.display="none",Ct.next=3,Object(fe.a)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:"educoder.png",file:wt}});case 3:mt=Ct.sent,mt!=null&&mt.id&&We(Nt.current.getAttribute("src").replace(G.a.API_SERVER,""),"/api/attachments/".concat(mt==null?void 0:mt.id,"?type=").concat(mt.content_type));case 5:case"end":return Ct.stop()}},ot)}));return function(ot){return xt.apply(this,arguments)}}()),it.show()},ur=function(){var it=new nt(Nt.current);it.settings.displayMode="popup",it.addEventListener("render",function(){var xt=Object(R.a)(e.a.mark(function ot(wt){var mt;return e.a.wrap(function(Ct){for(;;)switch(Ct.prev=Ct.next){case 0:if(yt.current.style.display="none",!Nt.current){Ct.next=6;break}return Ct.next=4,Object(fe.a)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:"educoder.png",file:wt.dataUrl}});case 4:mt=Ct.sent,mt!=null&&mt.id&&We(Nt.current.getAttribute("src").replace(G.a.API_SERVER,""),"/api/attachments/".concat(mt==null?void 0:mt.id,"?type=").concat(mt.content_type));case 6:case"end":return Ct.stop()}},ot)}));return function(ot){return xt.apply(this,arguments)}}()),it.show(),window.markerArea=it},zt=Object(C.useMemo)(function(){yt.current&&(yt.current.style.zIndex=-1);try{var gt=/\(\s+\/api\/attachments\/|\(\/api\/attachments\/|\(\/attachments\/download\//g,it=/\"\/api\/attachments\/|\"\/attachments\/download\//g,xt=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g;Ut=Ut.replace(gt,"("+G.a.API_SERVER+"/api/attachments/").replace(it,'"'+G.a.API_SERVER+"/api/attachments/").replace(xt,'"'+G.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(qt){}var ot=L(Ut),wt=b();if(Ut.match(/\[TOC\]/)&&(ot=ot.replace("[TOC]
",T()),E()),ot=ot.replace(/(__special_katext_id_\d+__)/g,function(qt,Ct){var sr=wt[Ct],er=sr.type,Xt=sr.expression;return Object(X.renderToString)(Ht(Xt)||"",{displayMode:er==="block",throwOnError:!1,output:"html"})}),ot=ot.replace(/▁/g,"\u2581\u2581\u2581"),p(),ae){var mt=document.createElement("div");return mt.innerHTML=ot,mt.innerText}return setTimeout(function(){return ar()},500),ot},[Ut]),kt=Object(C.useRef)();y.WebkitLineClamp=Ce,Ce&&(qe=Object(P.a)(Object(P.a)({},qe),y));function Vt(gt){var it=gt.target;if(it.tagName.toUpperCase()==="IMG"){if($e){var xt=it.getAttribute("src");jt(xt),Gt("image")}}else if(it.tagName.toUpperCase()==="A"){var ot=it.getAttribute("href");if(ot.indexOf("office")>-1)gt.preventDefault(),jt(ot),Gt("office");else if(ot.indexOf("application/pdf")>-1)gt.preventDefault(),jt(ot),Gt("pdf");else if(ot.indexOf("text/html")>-1)gt.preventDefault(),jt(ot),Gt("html");else if(ot.startsWith("#")){gt.preventDefault();var wt=document.getElementById(ot.replace("#",""));wt&&wt.scrollIntoView(!0)}}}var ar=function(){var it,xt=(it=kt.current)===null||it===void 0?void 0:it.querySelectorAll("video");xt==null||xt.forEach(function(ot){if(ot.oncontextmenu=function(){return!1},ot.src.indexOf(".m3u8")>-1&&!ot.canPlayType("application/vnd.apple.mpegurl")){if(j.a.isSupported()){var wt=new j.a;wt.loadSource(ot.src),wt.attachMedia(ot)}}})};Object(C.useEffect)(function(){if(kt.current&&zt&&(zt.match(Ft)&&window.PR.prettyPrint()),kt.current)return kt.current.addEventListener("click",Vt),function(){kt.current.removeEventListener("click",Vt),p(),E()}},[zt,kt.current,Vt]);var Yt=function(it){if(!z)return;it.target.nodeName==="IMG"?(yt.current.style.zIndex=1,yt.current.style.display="flex",yt.current.style.width=it.target.clientWidth+"px",yt.current.style.height=it.target.clientHeight+"px",yt.current.style.top=it.target.offsetTop+"px",yt.current.style.left=it.target.offsetLeft+"px",Nt.current.src=it.target.getAttribute("src")):yt.current.style.display="none"};return g.a.createElement("div",{style:{position:"relative"}},g.a.createElement("div",{ref:kt,style:Object(P.a)({},qe),className:"".concat(F||""," markdown-body ").concat(Mt.a.mdBody),onMouseOver:Yt,dangerouslySetInnerHTML:{__html:zt}}),g.a.createElement("div",{ref:yt,className:Mt.a.button},g.a.createElement(H.a,null,g.a.createElement(W.a,{onClick:function(){return ir()}},"\u88C1\u526A"),g.a.createElement(W.a,{onClick:function(){return ur()}},"\u7F16\u8F91"))),g.a.createElement("img",{ref:Nt,src:"",alt:"sample",crossOrigin:"anonymous",style:{maxWidth:"90%",opacity:0,position:"absolute",zIndex:-1}}),g.a.createElement(te.a,{close:!0,data:Kt,type:Kt!=null&&Kt.length?lr:"",style:Object(P.a)({},Lt),onClose:function(){return jt("")}}))}},BU3w:function(Ne,ne,U){"use strict";U.d(ne,"a",function(){return R});var Q=U("MNnm"),H="rc-util-key";function I(K){if(K.attachTo)return K.attachTo;var N=document.querySelector("head");return N||document.body}function W(K){var N,e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!Object(Q.a)())return null;var C=document.createElement("style");if((N=e.csp)===null||N===void 0?void 0:N.nonce){var g;C.nonce=(g=e.csp)===null||g===void 0?void 0:g.nonce}C.innerHTML=K;var v=I(e),c=v.firstChild;return e.prepend&&v.prepend?v.prepend(C):e.prepend&&c?v.insertBefore(C,c):v.appendChild(C),C}var P=new Map;function R(K,N){var e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},C=I(e);if(!P.has(C)){var g=W("",e),v=g.parentNode;P.set(C,v),v.removeChild(g)}var c=Array.from(P.get(C).children).find(function(n){return n.tagName==="STYLE"&&n[H]===N});if(c){var s,i;if(((s=e.csp)===null||s===void 0?void 0:s.nonce)&&c.nonce!==((i=e.csp)===null||i===void 0?void 0:i.nonce)){var l;c.nonce=(l=e.csp)===null||l===void 0?void 0:l.nonce}return c.innerHTML!==K&&(c.innerHTML=K),c}var a=W(K,e);return a[H]=N,a}},"C/vA":function(Ne,ne,U){"use strict";U.d(ne,"a",function(){return Q});function Q(H){const I=this;let W=!1,P;return function(){return W||(W=!0,P=H.apply(I,arguments)),P}}},"Cg/j":function(Ne,ne,U){"use strict";U.d(ne,"b",function(){return Q}),U.d(ne,"a",function(){return H}),U.d(ne,"c",function(){return W}),U.d(ne,"d",function(){return P});var Q;(function(R){R.serviceIds=new Map,R.DI_TARGET="$di$target",R.DI_DEPENDENCIES="$di$dependencies";function K(N){return N[R.DI_DEPENDENCIES]||[]}R.getServiceDependencies=K})(Q||(Q={}));const H=W("instantiationService");function I(R,K,N,e){K[Q.DI_TARGET]===K?K[Q.DI_DEPENDENCIES].push({id:R,index:N,optional:e}):(K[Q.DI_DEPENDENCIES]=[{id:R,index:N,optional:e}],K[Q.DI_TARGET]=K)}function W(R){if(Q.serviceIds.has(R))return Q.serviceIds.get(R);const K=function(N,e,C){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");I(K,N,C,!1)};return K.toString=()=>R,Q.serviceIds.set(R,K),K}function P(R){return function(K,N,e){if(arguments.length!==3)throw new Error("@optional-decorator can only be used to decorate a parameter");I(R,K,e,!0)}}},DlQD:function(Ne,ne,U){(function(Q,H){Ne.exports=H()})(this,function(){"use strict";function Q(re,Z){for(var J=0;Jre.length)&&(Z=re.length);for(var J=0,V=new Array(Z);J=re.length?{done:!0}:{done:!1,value:re[V++]}}}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 J=re[Symbol.iterator](),J.next.bind(J)}function R(re,Z){return Z={exports:{}},re(Z,Z.exports),Z.exports}var K=R(function(re){function Z(){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 J(V){re.exports.defaults=V}re.exports={defaults:Z(),getDefaults:Z,changeDefaults:J}}),N=K.defaults,e=K.getDefaults,C=K.changeDefaults,g=/[&<>"']/,v=/[&<>"']/g,c=/[<>"']|&(?!#?\w+;)/,s=/[<>"']|&(?!#?\w+;)/g,i={"&":"&","<":"<",">":">",'"':""","'":"'"},l=function(Z){return i[Z]};function a(re,Z){if(Z){if(g.test(re))return re.replace(v,l)}else if(c.test(re))return re.replace(s,l);return re}var n=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function r(re){return re.replace(n,function(Z,J){return J=J.toLowerCase(),J==="colon"?":":J.charAt(0)==="#"?J.charAt(1)==="x"?String.fromCharCode(parseInt(J.substring(2),16)):String.fromCharCode(+J.substring(1)):""})}var t=/(^|[^\[])\^/g;function E(re,Z){re=re.source||re,Z=Z||"";var J={replace:function(Y,q){return q=q.source||q,q=q.replace(t,"$1"),re=re.replace(Y,q),J},getRegex:function(){return new RegExp(re,Z)}};return J}var y=/[^\w:]/g,m=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function T(re,Z,J){if(re){var V;try{V=decodeURIComponent(r(J)).replace(y,"").toLowerCase()}catch(Y){return null}if(V.indexOf("javascript:")===0||V.indexOf("vbscript:")===0||V.indexOf("data:")===0)return null}Z&&!m.test(J)&&(J=u(Z,J));try{J=encodeURI(J).replace(/%25/g,"%")}catch(Y){return null}return J}var _={},f=/^[^:]+:\/*[^/]*$/,h=/^([^:]+:)[\s\S]*$/,o=/^([^:]+:\/*[^/]*)[\s\S]*$/;function u(re,Z){_[" "+re]||(f.test(re)?_[" "+re]=re+"/":_[" "+re]=A(re,"/",!0)),re=_[" "+re];var J=re.indexOf(":")===-1;return Z.substring(0,2)==="//"?J?Z:re.replace(h,"$1")+Z:Z.charAt(0)==="/"?J?Z:re.replace(o,"$1")+Z:re+Z}var b={exec:function(){}};function p(re){for(var Z=1,J,V;Z=0&&le[Oe]==="\\";)ge=!ge;return ge?"|":" |"}),V=J.split(/ \|/),Y=0;if(V.length>Z)V.splice(Z);else for(;V.length=V.length?Y.slice(V.length):Y}).join(`
`)}var ve=function(){function re(J){this.options=J||M}var Z=re.prototype;return Z.space=function(V){var Y=this.rules.block.newline.exec(V);if(Y)return Y[0].length>1?{type:"space",raw:Y[0]}:{raw:`
`}},Z.code=function(V,Y){var q=this.rules.block.code.exec(V);if(q){var ee=Y[Y.length-1];if(ee&&ee.type==="paragraph")return{raw:q[0],text:q[0].trimRight()};var le=q[0].replace(/^ {4}/gm,"");return{type:"code",raw:q[0],codeBlockStyle:"indented",text:this.options.pedantic?le:O(le,`
`)}}},Z.fences=function(V){var Y=this.rules.block.fences.exec(V);if(Y){var q=Y[0],ee=fe(q,Y[3]||"");return{type:"code",raw:q,lang:Y[2]?Y[2].trim():Y[2],text:ee}}},Z.heading=function(V){var Y=this.rules.block.heading.exec(V);if(Y)return{type:"heading",raw:Y[0],depth:Y[1].length,text:Y[2]}},Z.nptable=function(V){var Y=this.rules.block.nptable.exec(V);if(Y){var q={type:"table",header:j(Y[1].replace(/^ *| *\| *$/g,"")),align:Y[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:Y[3]?Y[3].replace(/\n$/,"").split(`
`):[],raw:Y[0]};if(q.header.length===q.align.length){var ee=q.align.length,le;for(le=0;le ?/gm,"");return{type:"blockquote",raw:Y[0],text:q}}},Z.list=function(V){var Y=this.rules.block.list.exec(V);if(Y){for(var q=Y[0],ee=Y[2],le=ee.length>1,ge=ee[ee.length-1]===")",Oe={type:"list",raw:q,ordered:le,start:le?+ee.slice(0,-1):"",loose:!1,items:[]},Ke=Y[0].match(this.rules.block.item),ze=!1,ke,Je,Qe,Ge,at,nt,rt,dt=Ke.length,et=0;et1||this.options.smartLists&&Qe!==ee)&&(Ge=Ke.slice(et+1).join(`
`),Oe.raw=Oe.raw.substring(0,Oe.raw.length-Ge.length),et=dt-1)),at=ze||/\n\n(?!\s*$)/.test(ke),et!==dt-1&&(ze=ke.charAt(ke.length-1)===`
`,at||(at=ze)),at&&(Oe.loose=!0),nt=/^\[[ xX]\] /.test(ke),rt=void 0,nt&&(rt=ke[1]!==" ",ke=ke.replace(/^\[[ xX]\] +/,"")),Oe.items.push({type:"list_item",raw:q,task:nt,checked:rt,loose:at,text:ke});return Oe}},Z.html=function(V){var Y=this.rules.block.html.exec(V);if(Y)return{type:this.options.sanitize?"paragraph":"html",raw:Y[0],pre:!this.options.sanitizer&&(Y[1]==="pre"||Y[1]==="script"||Y[1]==="style"),text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(Y[0]):G(Y[0]):Y[0]}},Z.def=function(V){var Y=this.rules.block.def.exec(V);if(Y){Y[3]&&(Y[3]=Y[3].substring(1,Y[3].length-1));var q=Y[1].toLowerCase().replace(/\s+/g," ");return{tag:q,raw:Y[0],href:Y[2],title:Y[3]}}},Z.table=function(V){var Y=this.rules.block.table.exec(V);if(Y){var q={type:"table",header:j(Y[1].replace(/^ *| *\| *$/g,"")),align:Y[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:Y[3]?Y[3].replace(/\n$/,"").split(`
`):[]};if(q.header.length===q.align.length){q.raw=Y[0];var ee=q.align.length,le;for(le=0;le/i.test(ee[0])&&(Y=!1),!q&&/^<(pre|code|kbd|script)(\s|>)/i.test(ee[0])?q=!0:q&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(ee[0])&&(q=!1),{type:this.options.sanitize?"text":"html",raw:ee[0],inLink:Y,inRawBlock:q,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(ee[0]):G(ee[0]):ee[0]}},Z.link=function(V){var Y=this.rules.inline.link.exec(V);if(Y){var q=X(Y[2],"()");if(q>-1){var ee=Y[0].indexOf("!")===0?5:4,le=ee+Y[1].length+q;Y[2]=Y[2].substring(0,q),Y[0]=Y[0].substring(0,le).trim(),Y[3]=""}var ge=Y[2],Oe="";if(this.options.pedantic){var Ke=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(ge);Ke?(ge=Ke[1],Oe=Ke[3]):Oe=""}else Oe=Y[3]?Y[3].slice(1,-1):"";ge=ge.trim().replace(/^<([\s\S]*)>$/,"$1");var ze=te(Y,{href:ge&&ge.replace(this.rules.inline._escapes,"$1"),title:Oe&&Oe.replace(this.rules.inline._escapes,"$1")},Y[0]);return ze}},Z.reflink=function(V,Y){var q;if((q=this.rules.inline.reflink.exec(V))||(q=this.rules.inline.nolink.exec(V))){var ee=(q[2]||q[1]).replace(/\s+/g," ");if(ee=Y[ee.toLowerCase()],!ee||!ee.href){var le=q[0].charAt(0);return{type:"text",raw:le,text:le}}var ge=te(q,ee,q[0]);return ge}},Z.strong=function(V,Y,q){q===void 0&&(q="");var ee=this.rules.inline.strong.start.exec(V);if(ee&&(!ee[1]||ee[1]&&(q===""||this.rules.inline.punctuation.exec(q)))){Y=Y.slice(-1*V.length);var le=ee[0]==="**"?this.rules.inline.strong.endAst:this.rules.inline.strong.endUnd;le.lastIndex=0;for(var ge;(ee=le.exec(Y))!=null;)if(ge=this.rules.inline.strong.middle.exec(Y.slice(0,ee.index+3)),ge)return{type:"strong",raw:V.slice(0,ge[0].length),text:V.slice(2,ge[0].length-2)}}},Z.em=function(V,Y,q){q===void 0&&(q="");var ee=this.rules.inline.em.start.exec(V);if(ee&&(!ee[1]||ee[1]&&(q===""||this.rules.inline.punctuation.exec(q)))){Y=Y.slice(-1*V.length);var le=ee[0]==="*"?this.rules.inline.em.endAst:this.rules.inline.em.endUnd;le.lastIndex=0;for(var ge;(ee=le.exec(Y))!=null;)if(ge=this.rules.inline.em.middle.exec(Y.slice(0,ee.index+2)),ge)return{type:"em",raw:V.slice(0,ge[0].length),text:V.slice(1,ge[0].length-1)}}},Z.codespan=function(V){var Y=this.rules.inline.code.exec(V);if(Y){var q=Y[2].replace(/\n/g," "),ee=/[^ ]/.test(q),le=q.startsWith(" ")&&q.endsWith(" ");return ee&&le&&(q=q.substring(1,q.length-1)),q=G(q,!0),{type:"codespan",raw:Y[0],text:q}}},Z.br=function(V){var Y=this.rules.inline.br.exec(V);if(Y)return{type:"br",raw:Y[0]}},Z.del=function(V){var Y=this.rules.inline.del.exec(V);if(Y)return{type:"del",raw:Y[0],text:Y[1]}},Z.autolink=function(V,Y){var q=this.rules.inline.autolink.exec(V);if(q){var ee,le;return q[2]==="@"?(ee=G(this.options.mangle?Y(q[1]):q[1]),le="mailto:"+ee):(ee=G(q[1]),le=ee),{type:"link",raw:q[0],text:ee,href:le,tokens:[{type:"text",raw:ee,text:ee}]}}},Z.url=function(V,Y){var q;if(q=this.rules.inline.url.exec(V)){var ee,le;if(q[2]==="@")ee=G(this.options.mangle?Y(q[0]):q[0]),le="mailto:"+ee;else{var ge;do ge=q[0],q[0]=this.rules.inline._backpedal.exec(q[0])[0];while(ge!==q[0]);ee=G(q[0]),q[1]==="www."?le="http://"+ee:le=ee}return{type:"link",raw:q[0],text:ee,href:le,tokens:[{type:"text",raw:ee,text:ee}]}}},Z.inlineText=function(V,Y,q){var ee=this.rules.inline.text.exec(V);if(ee){var le;return Y?le=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(ee[0]):G(ee[0]):ee[0]:le=G(this.options.smartypants?q(ee[0]):ee[0]),{type:"text",raw:ee[0],text:le}}},re}(),he=L.noopTest,xe=L.edit,Se=L.merge,de={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*|\\n*|\\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:he,table:he,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html)[^\n]+)*)/,text:/^[^\n]+/};de._label=/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,de._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,de.def=xe(de.def).replace("label",de._label).replace("title",de._title).getRegex(),de.bullet=/(?:[*+-]|\d{1,9}[.)])/,de.item=/^( *)(bull) ?[^\n]*(?:\n(?!\1bull ?)[^\n]*)*/,de.item=xe(de.item,"gm").replace(/bull/g,de.bullet).getRegex(),de.list=xe(de.list).replace(/bull/g,de.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+de.def.source+")").getRegex(),de._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",de._comment=//,de.html=xe(de.html,"i").replace("comment",de._comment).replace("tag",de._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),de.paragraph=xe(de._paragraph).replace("hr",de.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",de._tag).getRegex(),de.blockquote=xe(de.blockquote).replace("paragraph",de.paragraph).getRegex(),de.normal=Se({},de),de.gfm=Se({},de.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*|$)"}),de.gfm.nptable=xe(de.gfm.nptable).replace("hr",de.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",de._tag).getRegex(),de.gfm.table=xe(de.gfm.table).replace("hr",de.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",de._tag).getRegex(),de.pedantic=Se({},de.normal,{html:xe(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?\\1> *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",de._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:he,paragraph:xe(de.normal._paragraph).replace("hr",de.hr).replace("heading",` *#{1,6} *[^
]`).replace("lheading",de.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var ie={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:he,tag:"^comment|^[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\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:he,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\?@\\[\\]`^{|}~",ie.punctuation=xe(ie.punctuation).replace(/punctuation/g,ie._punctuation).getRegex(),ie._blockSkip="\\[[^\\]]*?\\]\\([^\\)]*?\\)|`[^`]*?`|<[^>]*?>",ie._overlapSkip="__[^_]*?__|\\*\\*\\[^\\*\\]*?\\*\\*",ie.em.start=xe(ie.em.start).replace(/punctuation/g,ie._punctuation).getRegex(),ie.em.middle=xe(ie.em.middle).replace(/punctuation/g,ie._punctuation).replace(/overlapSkip/g,ie._overlapSkip).getRegex(),ie.em.endAst=xe(ie.em.endAst,"g").replace(/punctuation/g,ie._punctuation).getRegex(),ie.em.endUnd=xe(ie.em.endUnd,"g").replace(/punctuation/g,ie._punctuation).getRegex(),ie.strong.start=xe(ie.strong.start).replace(/punctuation/g,ie._punctuation).getRegex(),ie.strong.middle=xe(ie.strong.middle).replace(/punctuation/g,ie._punctuation).replace(/blockSkip/g,ie._blockSkip).getRegex(),ie.strong.endAst=xe(ie.strong.endAst,"g").replace(/punctuation/g,ie._punctuation).getRegex(),ie.strong.endUnd=xe(ie.strong.endUnd,"g").replace(/punctuation/g,ie._punctuation).getRegex(),ie.blockSkip=xe(ie._blockSkip,"g").getRegex(),ie.overlapSkip=xe(ie._overlapSkip,"g").getRegex(),ie._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,ie._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,ie._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])?)+(?![-_])/,ie.autolink=xe(ie.autolink).replace("scheme",ie._scheme).replace("email",ie._email).getRegex(),ie._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,ie.tag=xe(ie.tag).replace("comment",de._comment).replace("attribute",ie._attribute).getRegex(),ie._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,ie._href=/<(?:\\[<>]?|[^\s<>\\])*>|[^\s\x00-\x1f]*/,ie._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,ie.link=xe(ie.link).replace("label",ie._label).replace("href",ie._href).replace("title",ie._title).getRegex(),ie.reflink=xe(ie.reflink).replace("label",ie._label).getRegex(),ie.reflinkSearch=xe(ie.reflinkSearch,"g").replace("reflink",ie.reflink).replace("nolink",ie.nolink).getRegex(),ie.normal=Se({},ie),ie.pedantic=Se({},ie.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:xe(/^!?\[(label)\]\((.*?)\)/).replace("label",ie._label).getRegex(),reflink:xe(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",ie._label).getRegex()}),ie.gfm=Se({},ie.normal,{escape:xe(ie.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]*?(?:(?=[\\.5&&(V="x"+V.toString(16)),Z+=""+V+";";return Z}var Re=function(){function re(J){this.tokens=[],this.tokens.links=Object.create(null),this.options=J||Ve,this.options.tokenizer=this.options.tokenizer||new ve,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;var V={block:Be.normal,inline:je.normal};this.options.pedantic?(V.block=Be.pedantic,V.inline=je.pedantic):this.options.gfm&&(V.block=Be.gfm,this.options.breaks?V.inline=je.breaks:V.inline=je.gfm),this.tokenizer.rules=V}re.lex=function(V,Y){var q=new re(Y);return q.lex(V)};var Z=re.prototype;return Z.lex=function(V){return V=V.replace(/\r\n|\r/g,`
`).replace(/\t/g," "),this.blockTokens(V,this.tokens,!0),this.inline(this.tokens),this.tokens},Z.blockTokens=function(V,Y,q){Y===void 0&&(Y=[]),q===void 0&&(q=!0),V=V.replace(/^ +$/gm,"");for(var ee,le,ge,Oe;V;){if(ee=this.tokenizer.space(V)){V=V.substring(ee.raw.length),ee.type&&Y.push(ee);continue}if(ee=this.tokenizer.code(V,Y)){V=V.substring(ee.raw.length),ee.type?Y.push(ee):(Oe=Y[Y.length-1],Oe.raw+=`
`+ee.raw,Oe.text+=`
`+ee.text);continue}if(ee=this.tokenizer.fences(V)){V=V.substring(ee.raw.length),Y.push(ee);continue}if(ee=this.tokenizer.heading(V)){V=V.substring(ee.raw.length),Y.push(ee);continue}if(ee=this.tokenizer.nptable(V)){V=V.substring(ee.raw.length),Y.push(ee);continue}if(ee=this.tokenizer.hr(V)){V=V.substring(ee.raw.length),Y.push(ee);continue}if(ee=this.tokenizer.blockquote(V)){V=V.substring(ee.raw.length),ee.tokens=this.blockTokens(ee.text,[],q),Y.push(ee);continue}if(ee=this.tokenizer.list(V)){for(V=V.substring(ee.raw.length),ge=ee.items.length,le=0;le0)for(;(Ke=this.tokenizer.rules.inline.reflinkSearch.exec(Oe))!=null;)ze.includes(Ke[0].slice(Ke[0].lastIndexOf("[")+1,-1))&&(Oe=Oe.slice(0,Ke.index)+"["+"a".repeat(Ke[0].length-2)+"]"+Oe.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(Ke=this.tokenizer.rules.inline.blockSkip.exec(Oe))!=null;)Oe=Oe.slice(0,Ke.index)+"["+"a".repeat(Ke[0].length-2)+"]"+Oe.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;V;){if(ge=this.tokenizer.escape(V)){V=V.substring(ge.raw.length),Y.push(ge);continue}if(ge=this.tokenizer.tag(V,q,ee)){V=V.substring(ge.raw.length),q=ge.inLink,ee=ge.inRawBlock,Y.push(ge);continue}if(ge=this.tokenizer.link(V)){V=V.substring(ge.raw.length),ge.type==="link"&&(ge.tokens=this.inlineTokens(ge.text,[],!0,ee)),Y.push(ge);continue}if(ge=this.tokenizer.reflink(V,this.tokens.links)){V=V.substring(ge.raw.length),ge.type==="link"&&(ge.tokens=this.inlineTokens(ge.text,[],!0,ee)),Y.push(ge);continue}if(ge=this.tokenizer.strong(V,Oe,le)){V=V.substring(ge.raw.length),ge.tokens=this.inlineTokens(ge.text,[],q,ee),Y.push(ge);continue}if(ge=this.tokenizer.em(V,Oe,le)){V=V.substring(ge.raw.length),ge.tokens=this.inlineTokens(ge.text,[],q,ee),Y.push(ge);continue}if(ge=this.tokenizer.codespan(V)){V=V.substring(ge.raw.length),Y.push(ge);continue}if(ge=this.tokenizer.br(V)){V=V.substring(ge.raw.length),Y.push(ge);continue}if(ge=this.tokenizer.del(V)){V=V.substring(ge.raw.length),ge.tokens=this.inlineTokens(ge.text,[],q,ee),Y.push(ge);continue}if(ge=this.tokenizer.autolink(V,Te)){V=V.substring(ge.raw.length),Y.push(ge);continue}if(!q&&(ge=this.tokenizer.url(V,Te))){V=V.substring(ge.raw.length),Y.push(ge);continue}if(ge=this.tokenizer.inlineText(V,ee,Ee)){V=V.substring(ge.raw.length),le=ge.raw.slice(-1),Y.push(ge);continue}if(V){var ke="Infinite loop on byte: "+V.charCodeAt(0);if(this.options.silent){console.error(ke);break}else throw new Error(ke)}}return Y},H(re,null,[{key:"rules",get:function(){return{block:Be,inline:je}}}]),re}(),Ie=K.defaults,$=L.cleanUrl,se=L.escape,ue=function(){function re(J){this.options=J||Ie}var Z=re.prototype;return Z.code=function(V,Y,q){var ee=(Y||"").match(/\S*/)[0];if(this.options.highlight){var le=this.options.highlight(V,ee);le!=null&&le!==V&&(q=!0,V=le)}return ee?''+(q?V:se(V,!0))+`
`:""+(q?V:se(V,!0))+`
`},Z.blockquote=function(V){return`
`+V+`
`},Z.html=function(V){return V},Z.heading=function(V,Y,q,ee){return this.options.headerIds?"
`:""+V+"
`},Z.hr=function(){return this.options.xhtml?`
`:`
`},Z.list=function(V,Y,q){var ee=Y?"ol":"ul",le=Y&&q!==1?' start="'+q+'"':"";return"<"+ee+le+`>
`+V+""+ee+`>
`},Z.listitem=function(V){return""+V+`
`},Z.checkbox=function(V){return" "},Z.paragraph=function(V){return""+V+`
`},Z.table=function(V,Y){return Y&&(Y=""+Y+""),`
`},Z.tablerow=function(V){return`
`+V+`
`},Z.tablecell=function(V,Y){var q=Y.header?"th":"td",ee=Y.align?"<"+q+' align="'+Y.align+'">':"<"+q+">";return ee+V+""+q+`>
`},Z.strong=function(V){return""+V+""},Z.em=function(V){return""+V+""},Z.codespan=function(V){return""+V+""},Z.br=function(){return this.options.xhtml?"
":"
"},Z.del=function(V){return""+V+""},Z.link=function(V,Y,q){if(V=$(this.options.sanitize,this.options.baseUrl,V),V===null)return q;var ee='"+q+"",ee},Z.image=function(V,Y,q){if(V=$(this.options.sanitize,this.options.baseUrl,V),V===null)return q;var ee='
":">",ee},Z.text=function(V){return V},re}(),ce=function(){function re(){}var Z=re.prototype;return Z.strong=function(V){return V},Z.em=function(V){return V},Z.codespan=function(V){return V},Z.del=function(V){return V},Z.html=function(V){return V},Z.text=function(V){return V},Z.link=function(V,Y,q){return""+q},Z.image=function(V,Y,q){return""+q},Z.br=function(){return""},re}(),_e=function(){function re(){this.seen={}}var Z=re.prototype;return Z.slug=function(V){var Y=V.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-");if(this.seen.hasOwnProperty(Y)){var q=Y;do this.seen[q]++,Y=q+"-"+this.seen[q];while(this.seen.hasOwnProperty(Y))}return this.seen[Y]=0,Y},re}(),De=K.defaults,Pe=L.unescape,Me=function(){function re(J){this.options=J||De,this.options.renderer=this.options.renderer||new ue,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new ce,this.slugger=new _e}re.parse=function(V,Y){var q=new re(Y);return q.parse(V)};var Z=re.prototype;return Z.parse=function(V,Y){Y===void 0&&(Y=!0);var q="",ee,le,ge,Oe,Ke,ze,ke,Je,Qe,Ge,at,nt,rt,dt,et,st,ut,Ue,pt=V.length;for(ee=0;ee0&&et.tokens[0].type==="text"?(et.tokens[0].text=Ue+" "+et.tokens[0].text,et.tokens[0].tokens&&et.tokens[0].tokens.length>0&&et.tokens[0].tokens[0].type==="text"&&(et.tokens[0].tokens[0].text=Ue+" "+et.tokens[0].tokens[0].text)):et.tokens.unshift({type:"text",text:Ue}):dt+=Ue),dt+=this.parse(et.tokens,rt),Qe+=this.renderer.listitem(dt,ut,st);q+=this.renderer.list(Qe,at,nt);continue}case"html":{q+=this.renderer.html(Ge.text);continue}case"paragraph":{q+=this.renderer.paragraph(this.parseInline(Ge.tokens));continue}case"text":{for(Qe=Ge.tokens?this.parseInline(Ge.tokens):Ge.text;ee+1An error occurred:
"+oe(ge.message+"",!0)+"
";throw ge}}pe.options=pe.setOptions=function(re){return Fe(pe.defaults,re),be(pe.defaults),pe},pe.getDefaults=me,pe.defaults=we,pe.use=function(re){var Z=Fe({},re);if(re.renderer&&function(){var V=pe.defaults.renderer||new ue,Y=function(le){var ge=V[le];V[le]=function(){for(var Oe=arguments.length,Ke=new Array(Oe),ze=0;ze>>6)+e(128|A&63):e(224|A>>>12&15)+e(128|A>>>6&63)+e(128|A&63)}else{var A=65536+(d.charCodeAt(0)-55296)*1024+(d.charCodeAt(1)-56320);return e(240|A>>>18&7)+e(128|A>>>12&63)+e(128|A>>>6&63)+e(128|A&63)}},g=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,v=function(d){return d.replace(g,C)},c=function(d){var A=[0,2,1][d.length%3],D=d.charCodeAt(0)<<16|(d.length>1?d.charCodeAt(1):0)<<8|(d.length>2?d.charCodeAt(2):0),S=[K.charAt(D>>>18),K.charAt(D>>>12&63),A>=2?"=":K.charAt(D>>>6&63),A>=1?"=":K.charAt(D&63)];return S.join("")},s=W.btoa&&typeof W.btoa=="function"?function(d){return W.btoa(d)}:function(d){if(d.match(/[^\x00-\xFF]/))throw new RangeError("The string contains invalid characters.");return d.replace(/[\s\S]{1,3}/g,c)},i=function(d){return s(v(String(d)))},l=function(d){return d.replace(/[+\/]/g,function(A){return A=="+"?"-":"_"}).replace(/=/g,"")},a=function(d,A){return A?l(i(d)):i(d)},n=function(d){return a(d,!0)},r;W.Uint8Array&&(r=function(d,A){for(var D="",S=0,L=d.length;S>>18)+K.charAt(G>>>12&63)+(typeof O!="undefined"?K.charAt(G>>>6&63):"=")+(typeof j!="undefined"?K.charAt(G&63):"=")}return A?l(D):D});var t=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,E=function(d){switch(d.length){case 4:var A=(7&d.charCodeAt(0))<<18|(63&d.charCodeAt(1))<<12|(63&d.charCodeAt(2))<<6|63&d.charCodeAt(3),D=A-65536;return e((D>>>10)+55296)+e((D&1023)+56320);case 3:return e((15&d.charCodeAt(0))<<12|(63&d.charCodeAt(1))<<6|63&d.charCodeAt(2));default:return e((31&d.charCodeAt(0))<<6|63&d.charCodeAt(1))}},y=function(d){return d.replace(t,E)},m=function(d){var A=d.length,D=A%4,S=(A>0?N[d.charAt(0)]<<18:0)|(A>1?N[d.charAt(1)]<<12:0)|(A>2?N[d.charAt(2)]<<6:0)|(A>3?N[d.charAt(3)]:0),L=[e(S>>>16),e(S>>>8&255),e(S&255)];return L.length-=[0,0,2,1][D],L.join("")},T=W.atob&&typeof W.atob=="function"?function(d){return W.atob(d)}:function(d){return d.replace(/\S{1,4}/g,m)},_=function(d){return T(String(d).replace(/[^A-Za-z0-9\+\/]/g,""))},f=function(d){return y(T(d))},h=function(d){return String(d).replace(/[-_]/g,function(A){return A=="-"?"+":"/"}).replace(/[^A-Za-z0-9\+\/]/g,"")},o=function(d){return f(h(d))},u;W.Uint8Array&&(u=function(d){return Uint8Array.from(_(h(d)),function(A){return A.charCodeAt(0)})});var b=function(){var d=W.Base64;return W.Base64=P,d};if(W.Base64={VERSION:R,atob:_,btoa:s,fromBase64:o,toBase64:a,utob:v,encode:a,encodeURI:n,btou:y,decode:o,noConflict:b,fromUint8Array:r,toUint8Array:u},typeof Object.defineProperty=="function"){var p=function(d){return{value:d,enumerable:!1,writable:!0,configurable:!0}};W.Base64.extendString=function(){Object.defineProperty(String.prototype,"fromBase64",p(function(){return o(this)})),Object.defineProperty(String.prototype,"toBase64",p(function(d){return a(this,d)})),Object.defineProperty(String.prototype,"toBase64URI",p(function(){return a(this,!0)}))}}return W.Meteor&&(Base64=W.Base64),Ne.exports?Ne.exports.Base64=W.Base64:!(H=[],I=function(){return W.Base64}.apply(ne,H),I!==void 0&&(Ne.exports=I)),{Base64:W.Base64}})}).call(this,U("IyRk"))},JYp7:function(Ne,ne,U){"use strict";U.d(ne,"a",function(){return Q});var Q;(function(H){function I(t){return t&&typeof t=="object"&&typeof t[Symbol.iterator]=="function"}H.is=I;const W=Object.freeze([]);function P(){return W}H.empty=P;function*R(t){yield t}H.single=R;function K(t){return t||W}H.from=K;function N(t){return!t||t[Symbol.iterator]().next().done===!0}H.isEmpty=N;function e(t){return t[Symbol.iterator]().next().value}H.first=e;function C(t,E){for(const y of t)if(E(y))return!0;return!1}H.some=C;function g(t,E){for(const y of t)if(E(y))return y;return}H.find=g;function*v(t,E){for(const y of t)E(y)&&(yield y)}H.filter=v;function*c(t,E){let y=0;for(const m of t)yield E(m,y++)}H.map=c;function*s(...t){for(const E of t)for(const y of E)yield y}H.concat=s;function*i(t){for(const E of t)for(const y of E)yield y}H.concatNested=i;function l(t,E,y){let m=y;for(const T of t)m=E(m,T);return m}H.reduce=l;function*a(t,E,y=t.length){for(E<0&&(E+=t.length),y<0?y+=t.length:y>t.length&&(y=t.length);Em===T){const m=t[Symbol.iterator](),T=E[Symbol.iterator]();for(;;){const _=m.next(),f=T.next();if(_.done!==f.done)return!1;if(_.done)return!0;if(!y(_.value,f.value))return!1}}H.equals=r})(Q||(Q={}))},LdHM:function(Ne,ne,U){"use strict";U.d(ne,"b",function(){return t}),U.d(ne,"a",function(){return y});var Q=U("1OyB"),H=U("vuIU"),I=U("Ji7U"),W=U("LK+K"),P=U("q1tI"),R=U("rePB"),K=U("Ff2n"),N=U("ODXe"),e=U("4IlW"),C=U("bX4T"),g=U("YrtM"),v=U("TSYQ"),c=U.n(v),s=U("+nKL"),i=U("8OUc"),l=function(j,G){var X=j.prefixCls,te=j.id,fe=j.flattenOptions,ve=j.childrenAsData,he=j.values,xe=j.searchValue,Se=j.multiple,de=j.defaultActiveFirstOption,ie=j.height,Le=j.itemHeight,Ve=j.notFoundContent,Be=j.open,je=j.menuItemSelectedIcon,Ee=j.virtual,Te=j.onSelect,Re=j.onToggleOpen,Ie=j.onActiveValue,$=j.onScroll,se=j.onMouseEnter,ue="".concat(X,"-item"),ce=Object(g.a)(function(){return fe},[Be,fe],function(ye,re){return re[0]&&ye[1]!==re[1]}),_e=P.useRef(null),De=function(re){re.preventDefault()},Pe=function(re){_e.current&&_e.current.scrollTo({index:re})},Me=function(re){for(var Z=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,J=ce.length,V=0;V1&&arguments[1]!==void 0?arguments[1]:!1;return Object(T.a)(O).map(function(G,X){if(!P.isValidElement(G)||!G.type)return null;var te=G.type.isSelectOptGroup,fe=G.key,ve=G.props,he=ve.children,xe=Object(K.a)(ve,["children"]);return j||!te?_(G):Object(m.a)(Object(m.a)({key:"__RC_SELECT_GRP__".concat(fe===null?X:fe,"__"),label:fe},xe),{},{options:f(he)})}).filter(function(G){return G})}var h=U("2Qr1"),o=U("qNPg"),u=U("U8pU"),b=U("Kwbf"),p=U("WKfj");function d(O){var j=O.mode,G=O.options,X=O.children,te=O.backfill,fe=O.allowClear,ve=O.placeholder,he=O.getInputElement,xe=O.showSearch,Se=O.onSearch,de=O.defaultOpen,ie=O.autoFocus,Le=O.labelInValue,Ve=O.value,Be=O.inputValue,je=O.optionLabelProp,Ee=j==="multiple"||j==="tags",Te=xe!==void 0?xe:Ee||j==="combobox",Re=G||f(X);if(Object(b.a)(j!=="tags"||Re.every(function(ue){return!ue.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),j==="tags"||j==="combobox"){var Ie=Re.some(function(ue){return ue.options?ue.options.some(function(ce){return typeof("value"in ce?ce.value:ce.key)=="number"}):typeof("value"in ue?ue.value:ue.key)=="number"});Object(b.a)(!Ie,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(Object(b.a)(j!=="combobox"||!je,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),Object(b.a)(j==="combobox"||!te,"`backfill` only works with `combobox` mode."),Object(b.a)(j==="combobox"||!he,"`getInputElement` only work with `combobox` mode."),Object(b.b)(j!=="combobox"||!he||!fe||!ve,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),Se&&!Te&&j!=="combobox"&&j!=="tags"&&Object(b.a)(!1,"`onSearch` should work with `showSearch` instead of use alone."),Object(b.b)(!de||ie,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),Ve!=null){var $=Object(p.d)(Ve);Object(b.a)(!Le||$.every(function(ue){return Object(u.a)(ue)==="object"&&("key"in ue||"value"in ue)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),Object(b.a)(!Ee||Array.isArray(Ve),"`value` should be array when `mode` is `multiple` or `tags`")}if(X){var se=null;Object(T.a)(X).some(function(ue){if(!P.isValidElement(ue)||!ue.type)return!1;var ce=ue.type;if(ce.isSelectOption)return!1;if(ce.isSelectOptGroup){var _e=Object(T.a)(ue.props.children).every(function(De){return!P.isValidElement(De)||!ue.type||De.type.isSelectOption?!0:(se=De.type,!1)});return!_e}return se=ce,!0}),se&&Object(b.a)(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(se.displayName||se.name||se,"`.")),Object(b.a)(Be===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}var A=d,D=Object(o.a)({prefixCls:"rc-select",components:{optionList:n},convertChildrenToData:f,flattenOptions:h.d,getLabeledValue:h.e,filterOptions:h.b,isValueDisabled:h.g,findValueOption:h.c,warningProps:A,fillOptionsWithMissingValue:h.a}),S=function(O){Object(I.a)(G,O);var j=Object(W.a)(G);function G(){var X;return Object(Q.a)(this,G),X=j.apply(this,arguments),X.selectRef=P.createRef(),X.focus=function(){X.selectRef.current.focus()},X.blur=function(){X.selectRef.current.blur()},X}return Object(H.a)(G,[{key:"render",value:function(){return P.createElement(D,Object.assign({ref:this.selectRef},this.props))}}]),G}(P.Component);S.Option=t,S.OptGroup=y;var L=S,M=ne.c=L},MI8n:function(Ne,ne,U){"use strict";U.d(ne,"c",function(){return P}),U.d(ne,"b",function(){return e}),U.d(ne,"e",function(){return C}),U.d(ne,"a",function(){return g}),U.d(ne,"d",function(){return v}),U.d(ne,"f",function(){return c});var Q=U("/cxE"),H=U("pmY6"),I=U("24hK"),W=U("5Y4S"),P;(function(s){s.None=()=>H.a.None;function i(d){return(A,D=null,S)=>{let L=!1,M;return M=d(O=>L?void 0:(M?M.dispose():L=!0,A.call(D,O)),null,S),L&&M.dispose(),M}}s.once=i;function l(d,A){return y((D,S=null,L)=>d(M=>D.call(S,A(M)),null,L))}s.map=l;function a(d,A){return y((D,S=null,L)=>d(M=>{A(M),D.call(S,M)},null,L))}s.forEach=a;function n(d,A){return y((D,S=null,L)=>d(M=>A(M)&&D.call(S,M),null,L))}s.filter=n;function r(d){return d}s.signal=r;function t(...d){return(A,D=null,S)=>Object(H.e)(...d.map(L=>L(M=>A.call(D,M),null,S)))}s.any=t;function E(d,A,D){let S=D;return l(d,L=>(S=A(S,L),S))}s.reduce=E;function y(d){let A;const D=new e({onFirstListenerAdd(){A=d(D.fire,D)},onLastListenerRemove(){A.dispose()}});return D.event}function m(d,A,D=100,S=!1,L){let M,O,j,G=0;const X=new e({leakWarningThreshold:L,onFirstListenerAdd(){M=d(te=>{G++,O=A(O,te),S&&!j&&(X.fire(O),O=void 0),clearTimeout(j),j=setTimeout(()=>{const fe=O;O=void 0,j=void 0,(!S||G>1)&&X.fire(fe),G=0},D)})},onLastListenerRemove(){M.dispose()}});return X.event}s.debounce=m;function T(d,A=(D,S)=>D===S){let D=!0,S;return n(d,L=>{const M=D||!A(L,S);return D=!1,S=L,M})}s.latch=T;function _(d,A){return[s.filter(d,A),s.filter(d,D=>!A(D))]}s.split=_;function f(d,A=!1,D=[]){let S=D.slice(),L=d(j=>{S?S.push(j):O.fire(j)});const M=()=>{S&&S.forEach(j=>O.fire(j)),S=null},O=new e({onFirstListenerAdd(){L||(L=d(j=>O.fire(j)))},onFirstListenerDidAdd(){S&&(A?setTimeout(M):M())},onLastListenerRemove(){L&&L.dispose(),L=null}});return O.event}s.buffer=f;class h{constructor(d){this.event=d}map(d){return new h(l(this.event,d))}forEach(d){return new h(a(this.event,d))}filter(d){return new h(n(this.event,d))}reduce(d,A){return new h(E(this.event,d,A))}latch(){return new h(T(this.event))}debounce(d,A=100,D=!1,S){return new h(m(this.event,d,A,D,S))}on(d,A,D){return this.event(d,A,D)}once(d,A,D){return i(this.event)(d,A,D)}}function o(d){return new h(d)}s.chain=o;function u(d,A,D=S=>S){const S=(...j)=>O.fire(D(...j)),L=()=>d.on(A,S),M=()=>d.removeListener(A,S),O=new e({onFirstListenerAdd:L,onLastListenerRemove:M});return O.event}s.fromNodeEventEmitter=u;function b(d,A,D=S=>S){const S=(...j)=>O.fire(D(...j)),L=()=>d.addEventListener(A,S),M=()=>d.removeEventListener(A,S),O=new e({onFirstListenerAdd:L,onLastListenerRemove:M});return O.event}s.fromDOMEventEmitter=b;function p(d){return new Promise(A=>i(d)(A))}s.toPromise=p})(P||(P={}));class R{constructor(s){this._listenerCount=0,this._invocationCount=0,this._elapsedOverall=0,this._name=`${s}_${R._idPool++}`}start(s){this._stopWatch=new W.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}}}R._idPool=0;let K=-1;class N{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=K;if(typeof this.customThreshold=="number"&&(i=this.customThreshold),i<=0||s{const n=this._stacks.get(l)||0;this._stacks.set(l,n-1)}}}class e{constructor(s){var i;this._disposed=!1,this._options=s,this._leakageMon=K>0?new N(this._options&&this._options.leakWarningThreshold):void 0,this._perfMon=((i=this._options)===null||i===void 0?void 0:i._profName)?new R(this._options._profName):void 0}get event(){return this._event||(this._event=(s,i,l)=>{var a;this._listeners||(this._listeners=new I.a);const n=this._listeners.isEmpty();n&&this._options&&this._options.onFirstListenerAdd&&this._options.onFirstListenerAdd(this);const r=this._listeners.push(i?[s,i]:s);n&&this._options&&this._options.onFirstListenerDidAdd&&this._options.onFirstListenerDidAdd(this),this._options&&this._options.onListenerDidAdd&&this._options.onListenerDidAdd(this,s,i);const t=(a=this._leakageMon)===null||a===void 0?void 0:a.check(this._listeners.size),E=Object(H.i)(()=>{if(t&&t(),!this._disposed&&(r(),this._options&&this._options.onLastListenerRemove)){const y=this._listeners&&!this._listeners.isEmpty();y||this._options.onLastListenerRemove(this)}});return l instanceof H.b?l.add(E):Array.isArray(l)&&l.push(E),E}),this._event}fire(s){var i,l;if(this._listeners){this._deliveryQueue||(this._deliveryQueue=new I.a);for(let a of this._listeners)this._deliveryQueue.push([a,s]);for((i=this._perfMon)===null||i===void 0||i.start(this._deliveryQueue.size);this._deliveryQueue.size>0;){const[a,n]=this._deliveryQueue.shift();try{typeof a=="function"?a.call(void 0,n):a[0].call(a[1],n)}catch(r){Object(Q.f)(r)}}(l=this._perfMon)===null||l===void 0||l.stop()}}dispose(){var s,i,l,a,n;this._disposed||(this._disposed=!0,(s=this._listeners)===null||s===void 0||s.clear(),(i=this._deliveryQueue)===null||i===void 0||i.clear(),(a=(l=this._options)===null||l===void 0?void 0:l.onLastListenerRemove)===null||a===void 0||a.call(l),(n=this._leakageMon)===null||n===void 0||n.dispose())}}class C extends e{constructor(s){super(s);this._isPaused=0,this._eventQueue=new I.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 g extends C{constructor(s){var i;super(s);this._delay=(i=s.delay)!==null&&i!==void 0?i:100}fire(s){this._handle||(this.pause(),this._handle=setTimeout(()=>{this._handle=void 0,this.resume()},this._delay)),super.fire(s)}}class v{constructor(){this.buffers=[]}wrapEvent(s){return(i,l,a)=>s(n=>{const r=this.buffers[this.buffers.length-1];r?r.push(()=>i.call(l,n)):i.call(l,n)},void 0,a)}bufferEvents(s){const i=[];this.buffers.push(i);const l=s();return this.buffers.pop(),i.forEach(a=>a()),l}}class c{constructor(){this.listening=!1,this.inputEvent=P.None,this.inputEventListener=H.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(Ne,ne,U){"use strict";(function(Q,H){U.d(ne,"b",function(){return l}),U.d(ne,"i",function(){return t}),U.d(ne,"f",function(){return E}),U.d(ne,"d",function(){return y}),U.d(ne,"g",function(){return m}),U.d(ne,"h",function(){return T}),U.d(ne,"c",function(){return _}),U.d(ne,"k",function(){return f}),U.d(ne,"j",function(){return h}),U.d(ne,"a",function(){return o}),U.d(ne,"e",function(){return p});var I;const W="en";let P=!1,R=!1,K=!1,N=!1,e=!1,C=!1,g=!1,v,c=W,s,i;const l=typeof self=="object"?self:typeof Q=="object"?Q:{};let a;typeof l.vscode!="undefined"&&typeof l.vscode.process!="undefined"?a=l.vscode.process:typeof H!="undefined"&&(a=H);const n=typeof((I=a==null?void 0:a.versions)===null||I===void 0?void 0:I.electron)=="string"&&a.type==="renderer";if(typeof navigator=="object"&&!n)i=navigator.userAgent,P=i.indexOf("Windows")>=0,R=i.indexOf("Macintosh")>=0,g=(i.indexOf("Macintosh")>=0||i.indexOf("iPad")>=0||i.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,K=i.indexOf("Linux")>=0,C=!0,v=navigator.language,c=v;else if(typeof a=="object"){P=a.platform==="win32",R=a.platform==="darwin",K=a.platform==="linux",N=K&&!!a.env.SNAP&&!!a.env.SNAP_REVISION,v=W,c=W;const d=a.env.VSCODE_NLS_CONFIG;if(d)try{const A=JSON.parse(d),D=A.availableLanguages["*"];v=A.locale,c=D||W,s=A._translationsConfigFile}catch(A){}e=!0}else console.error("Unable to resolve platform.");let r=0;R?r=1:P?r=3:K&&(r=2);const t=P,E=R,y=K,m=e,T=C,_=g,f=i,h=function(){if(l.setImmediate)return l.setImmediate.bind(l);if(typeof l.postMessage=="function"&&!l.importScripts){let D=[];l.addEventListener("message",L=>{if(L.data&&L.data.vscodeSetImmediateId)for(let M=0,O=D.length;M{const M=++S;D.push({id:M,callback:L}),l.postMessage({vscodeSetImmediateId:M},"*")}}if(typeof(a==null?void 0:a.nextTick)=="function")return a.nextTick.bind(a);const A=Promise.resolve();return D=>A.then(D)}(),o=R||g?2:P?1:3;let u=!0,b=!1;function p(){if(!b){b=!0;const d=new Uint8Array(2);d[0]=1,d[1]=2;const A=new Uint16Array(d.buffer);u=A[0]===(2<<8)+1}return u}}).call(this,U("IyRk"),U("Q2Ig"))},N0LK:function(Ne,ne,U){"use strict";U.d(ne,"C",function(){return Q}),U.d(ne,"v",function(){return I}),U.d(ne,"s",function(){return W}),U.d(ne,"t",function(){return P}),U.d(ne,"U",function(){return R}),U.d(ne,"J",function(){return K}),U.d(ne,"O",function(){return N}),U.d(ne,"p",function(){return e}),U.d(ne,"T",function(){return C}),U.d(ne,"q",function(){return g}),U.d(ne,"N",function(){return v}),U.d(ne,"M",function(){return c}),U.d(ne,"Q",function(){return s}),U.d(ne,"u",function(){return i}),U.d(ne,"x",function(){return l}),U.d(ne,"I",function(){return a}),U.d(ne,"f",function(){return n}),U.d(ne,"h",function(){return r}),U.d(ne,"g",function(){return t}),U.d(ne,"i",function(){return E}),U.d(ne,"G",function(){return y}),U.d(ne,"H",function(){return m}),U.d(ne,"r",function(){return T}),U.d(ne,"R",function(){return _}),U.d(ne,"d",function(){return f}),U.d(ne,"e",function(){return h}),U.d(ne,"E",function(){return o}),U.d(ne,"F",function(){return u}),U.d(ne,"j",function(){return b}),U.d(ne,"z",function(){return p}),U.d(ne,"K",function(){return A}),U.d(ne,"L",function(){return D}),U.d(ne,"m",function(){return L}),U.d(ne,"k",function(){return O}),U.d(ne,"A",function(){return G}),U.d(ne,"a",function(){return X}),U.d(ne,"n",function(){return te}),U.d(ne,"l",function(){return fe}),U.d(ne,"D",function(){return ve}),U.d(ne,"B",function(){return he}),U.d(ne,"b",function(){return xe}),U.d(ne,"S",function(){return Se}),U.d(ne,"o",function(){return de}),U.d(ne,"P",function(){return ie}),U.d(ne,"w",function(){return Le}),U.d(ne,"c",function(){return Ve}),U.d(ne,"y",function(){return Ee});function Q($){return!$||typeof $!="string"?!0:$.trim().length===0}const H=/{(\d+)}/g;function I($,...se){return se.length===0?$:$.replace(H,function(ue,ce){const _e=parseInt(ce,10);return isNaN(_e)||_e<0||_e>=se.length?ue:se[_e]})}function W($){return $.replace(/[<>&]/g,function(se){switch(se){case"<":return"<";case">":return">";case"&":return"&";default:return se}})}function P($){return $.replace(/[\\\{\}\*\+\?\|\^\$\.\[\]\(\)]/g,"\\$&")}function R($,se=" "){const ue=K($,se);return N(ue,se)}function K($,se){if(!$||!se)return $;const ue=se.length;if(ue===0||$.length===0)return $;let ce=0;for(;$.indexOf(se,ce)===ce;)ce=ce+ue;return $.substring(ce)}function N($,se){if(!$||!se)return $;const ue=se.length,ce=$.length;if(ue===0||ce===0)return $;let _e=ce,De=-1;for(;!(De=$.lastIndexOf(se,_e-1),De===-1||De+ue!==_e);){if(De===0)return"";_e=De}return $.substring(0,_e)}function e($){return $.replace(/[\-\\\{\}\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&").replace(/[\*]/g,".*")}function C($){return $.replace(/\*/g,"")}function g($,se,ue={}){if(!$)throw new Error("Cannot create regex from empty string");se||($=P($)),ue.wholeWord&&(/\B/.test($.charAt(0))||($="\\b"+$),/\B/.test($.charAt($.length-1))||($=$+"\\b"));let ce="";return ue.global&&(ce+="g"),ue.matchCase||(ce+="i"),ue.multiline&&(ce+="m"),ue.unicode&&(ce+="u"),new RegExp($,ce)}function v($){if($.source==="^"||$.source==="^$"||$.source==="$"||$.source==="^\\s*$")return!1;const se=$.exec("");return!!(se&&$.lastIndex===0)}function c($){return($.global?"g":"")+($.ignoreCase?"i":"")+($.multiline?"m":"")+($.unicode?"u":"")}function s($){return $.split(/\r\n|\r|\n/)}function i($){for(let se=0,ue=$.length;se=0;ue--){const ce=$.charCodeAt(ue);if(ce!==32&&ce!==9)return ue}return-1}function n($,se){return $se?1:0}function r($,se,ue=0,ce=$.length,_e=0,De=se.length){for(;ueHe)return 1}const Pe=ce-ue,Me=De-_e;return PeMe?1:0}function t($,se){return E($,se,0,$.length,0,se.length)}function E($,se,ue=0,ce=$.length,_e=0,De=se.length){for(;ue=128||He>=128)return r($.toLowerCase(),se.toLowerCase(),ue,ce,_e,De);y(Fe)&&(Fe-=32),y(He)&&(He-=32);const oe=Fe-He;if(oe===0)continue;return oe}const Pe=ce-ue,Me=De-_e;return PeMe?1:0}function y($){return $>=97&&$<=122}function m($){return $>=65&&$<=90}function T($,se){return $.length===se.length&&E($,se)===0}function _($,se){const ue=se.length;return se.length>$.length?!1:E($,se,0,ue)===0}function f($,se){let ue,ce=Math.min($.length,se.length);for(ue=0;ue1){const ce=$.charCodeAt(se-2);if(o(ce))return b(ce,ue)}return ue}function A($,se){const ue=Be.getInstance(),ce=se,_e=$.length,De=p($,_e,se);se+=De>=65536?2:1;let Pe=ue.getGraphemeBreakType(De);for(;se<_e;){const Me=p($,_e,se),Fe=ue.getGraphemeBreakType(Me);if(Ve(Pe,Fe))break;se+=Me>=65536?2:1,Pe=Fe}return se-ce}function D($,se){const ue=Be.getInstance(),ce=se,_e=d($,se);se-=_e>=65536?2:1;let De=ue.getGraphemeBreakType(_e);for(;se>0;){const Pe=d($,se),Me=ue.getGraphemeBreakType(Pe);if(Ve(Me,De))break;se-=Pe>=65536?2:1,De=Me}return ce-se}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 L($){return S.test($)}const M=/(?:[\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 O($){return M.test($)}const j=/^[\t\n\r\x20-\x7E]*$/;function G($){return j.test($)}const X=/[\u2028\u2029]/;function te($){return X.test($)}function fe($){for(let se=0,ue=$.length;se=11904&&$<=55215||$>=63744&&$<=64255||$>=65281&&$<=65374}function he($){return $>=127462&&$<=127487||$===8986||$===8987||$===9200||$===9203||$>=9728&&$<=10175||$===11088||$===11093||$>=127744&&$<=128591||$>=128640&&$<=128764||$>=128992&&$<=129003||$>=129280&&$<=129535||$>=129648&&$<=129750}const xe=String.fromCharCode(65279);function Se($){return!!($&&$.length>0&&$.charCodeAt(0)===65279)}function de($,se=!1){return $?(se&&($=$.replace(/\\./g,"")),$.toLowerCase()!==$):!1}function ie($){const se=90-65+1;return $=$%(2*se),$se[3*ce+1])ce=2*ce+1;else return se[3*ce+2];return 0}}Be._INSTANCE=null;function je(){return JSON.parse("[0,0,0,51592,51592,11,44424,44424,11,72251,72254,5,7150,7150,7,48008,48008,11,55176,55176,11,128420,128420,14,3276,3277,5,9979,9980,14,46216,46216,11,49800,49800,11,53384,53384,11,70726,70726,5,122915,122916,5,129320,129327,14,2558,2558,5,5906,5908,5,9762,9763,14,43360,43388,8,45320,45320,11,47112,47112,11,48904,48904,11,50696,50696,11,52488,52488,11,54280,54280,11,70082,70083,1,71350,71350,7,73111,73111,5,127892,127893,14,128726,128727,14,129473,129474,14,2027,2035,5,2901,2902,5,3784,3789,5,6754,6754,5,8418,8420,5,9877,9877,14,11088,11088,14,44008,44008,5,44872,44872,11,45768,45768,11,46664,46664,11,47560,47560,11,48456,48456,11,49352,49352,11,50248,50248,11,51144,51144,11,52040,52040,11,52936,52936,11,53832,53832,11,54728,54728,11,69811,69814,5,70459,70460,5,71096,71099,7,71998,71998,5,72874,72880,5,119149,119149,7,127374,127374,14,128335,128335,14,128482,128482,14,128765,128767,14,129399,129400,14,129680,129685,14,1476,1477,5,2377,2380,7,2759,2760,5,3137,3140,7,3458,3459,7,4153,4154,5,6432,6434,5,6978,6978,5,7675,7679,5,9723,9726,14,9823,9823,14,9919,9923,14,10035,10036,14,42736,42737,5,43596,43596,5,44200,44200,11,44648,44648,11,45096,45096,11,45544,45544,11,45992,45992,11,46440,46440,11,46888,46888,11,47336,47336,11,47784,47784,11,48232,48232,11,48680,48680,11,49128,49128,11,49576,49576,11,50024,50024,11,50472,50472,11,50920,50920,11,51368,51368,11,51816,51816,11,52264,52264,11,52712,52712,11,53160,53160,11,53608,53608,11,54056,54056,11,54504,54504,11,54952,54952,11,68108,68111,5,69933,69940,5,70197,70197,7,70498,70499,7,70845,70845,5,71229,71229,5,71727,71735,5,72154,72155,5,72344,72345,5,73023,73029,5,94095,94098,5,121403,121452,5,126981,127182,14,127538,127546,14,127990,127990,14,128391,128391,14,128445,128449,14,128500,128505,14,128752,128752,14,129160,129167,14,129356,129356,14,129432,129442,14,129648,129651,14,129751,131069,14,173,173,4,1757,1757,1,2274,2274,1,2494,2494,5,2641,2641,5,2876,2876,5,3014,3016,7,3262,3262,7,3393,3396,5,3570,3571,7,3968,3972,5,4228,4228,7,6086,6086,5,6679,6680,5,6912,6915,5,7080,7081,5,7380,7392,5,8252,8252,14,9096,9096,14,9748,9749,14,9784,9786,14,9833,9850,14,9890,9894,14,9938,9938,14,9999,9999,14,10085,10087,14,12349,12349,14,43136,43137,7,43454,43456,7,43755,43755,7,44088,44088,11,44312,44312,11,44536,44536,11,44760,44760,11,44984,44984,11,45208,45208,11,45432,45432,11,45656,45656,11,45880,45880,11,46104,46104,11,46328,46328,11,46552,46552,11,46776,46776,11,47000,47000,11,47224,47224,11,47448,47448,11,47672,47672,11,47896,47896,11,48120,48120,11,48344,48344,11,48568,48568,11,48792,48792,11,49016,49016,11,49240,49240,11,49464,49464,11,49688,49688,11,49912,49912,11,50136,50136,11,50360,50360,11,50584,50584,11,50808,50808,11,51032,51032,11,51256,51256,11,51480,51480,11,51704,51704,11,51928,51928,11,52152,52152,11,52376,52376,11,52600,52600,11,52824,52824,11,53048,53048,11,53272,53272,11,53496,53496,11,53720,53720,11,53944,53944,11,54168,54168,11,54392,54392,11,54616,54616,11,54840,54840,11,55064,55064,11,65438,65439,5,69633,69633,5,69837,69837,1,70018,70018,7,70188,70190,7,70368,70370,7,70465,70468,7,70712,70719,5,70835,70840,5,70850,70851,5,71132,71133,5,71340,71340,7,71458,71461,5,71985,71989,7,72002,72002,7,72193,72202,5,72281,72283,5,72766,72766,7,72885,72886,5,73104,73105,5,92912,92916,5,113824,113827,4,119173,119179,5,121505,121519,5,125136,125142,5,127279,127279,14,127489,127490,14,127570,127743,14,127900,127901,14,128254,128254,14,128369,128370,14,128400,128400,14,128425,128432,14,128468,128475,14,128489,128494,14,128715,128720,14,128745,128745,14,128759,128760,14,129004,129023,14,129296,129304,14,129340,129342,14,129388,129392,14,129404,129407,14,129454,129455,14,129485,129487,14,129659,129663,14,129719,129727,14,917536,917631,5,13,13,2,1160,1161,5,1564,1564,4,1807,1807,1,2085,2087,5,2363,2363,7,2402,2403,5,2507,2508,7,2622,2624,7,2691,2691,7,2786,2787,5,2881,2884,5,3006,3006,5,3072,3072,5,3170,3171,5,3267,3268,7,3330,3331,7,3406,3406,1,3538,3540,5,3655,3662,5,3897,3897,5,4038,4038,5,4184,4185,5,4352,4447,8,6068,6069,5,6155,6157,5,6448,6449,7,6742,6742,5,6783,6783,5,6966,6970,5,7042,7042,7,7143,7143,7,7212,7219,5,7412,7412,5,8206,8207,4,8294,8303,4,8596,8601,14,9410,9410,14,9742,9742,14,9757,9757,14,9770,9770,14,9794,9794,14,9828,9828,14,9855,9855,14,9882,9882,14,9900,9903,14,9929,9933,14,9963,9967,14,9987,9988,14,10006,10006,14,10062,10062,14,10175,10175,14,11744,11775,5,42607,42607,5,43043,43044,7,43263,43263,5,43444,43445,7,43569,43570,5,43698,43700,5,43766,43766,5,44032,44032,11,44144,44144,11,44256,44256,11,44368,44368,11,44480,44480,11,44592,44592,11,44704,44704,11,44816,44816,11,44928,44928,11,45040,45040,11,45152,45152,11,45264,45264,11,45376,45376,11,45488,45488,11,45600,45600,11,45712,45712,11,45824,45824,11,45936,45936,11,46048,46048,11,46160,46160,11,46272,46272,11,46384,46384,11,46496,46496,11,46608,46608,11,46720,46720,11,46832,46832,11,46944,46944,11,47056,47056,11,47168,47168,11,47280,47280,11,47392,47392,11,47504,47504,11,47616,47616,11,47728,47728,11,47840,47840,11,47952,47952,11,48064,48064,11,48176,48176,11,48288,48288,11,48400,48400,11,48512,48512,11,48624,48624,11,48736,48736,11,48848,48848,11,48960,48960,11,49072,49072,11,49184,49184,11,49296,49296,11,49408,49408,11,49520,49520,11,49632,49632,11,49744,49744,11,49856,49856,11,49968,49968,11,50080,50080,11,50192,50192,11,50304,50304,11,50416,50416,11,50528,50528,11,50640,50640,11,50752,50752,11,50864,50864,11,50976,50976,11,51088,51088,11,51200,51200,11,51312,51312,11,51424,51424,11,51536,51536,11,51648,51648,11,51760,51760,11,51872,51872,11,51984,51984,11,52096,52096,11,52208,52208,11,52320,52320,11,52432,52432,11,52544,52544,11,52656,52656,11,52768,52768,11,52880,52880,11,52992,52992,11,53104,53104,11,53216,53216,11,53328,53328,11,53440,53440,11,53552,53552,11,53664,53664,11,53776,53776,11,53888,53888,11,54000,54000,11,54112,54112,11,54224,54224,11,54336,54336,11,54448,54448,11,54560,54560,11,54672,54672,11,54784,54784,11,54896,54896,11,55008,55008,11,55120,55120,11,64286,64286,5,66272,66272,5,68900,68903,5,69762,69762,7,69817,69818,5,69927,69931,5,70003,70003,5,70070,70078,5,70094,70094,7,70194,70195,7,70206,70206,5,70400,70401,5,70463,70463,7,70475,70477,7,70512,70516,5,70722,70724,5,70832,70832,5,70842,70842,5,70847,70848,5,71088,71089,7,71102,71102,7,71219,71226,5,71231,71232,5,71342,71343,7,71453,71455,5,71463,71467,5,71737,71738,5,71995,71996,5,72000,72000,7,72145,72147,7,72160,72160,5,72249,72249,7,72273,72278,5,72330,72342,5,72752,72758,5,72850,72871,5,72882,72883,5,73018,73018,5,73031,73031,5,73109,73109,5,73461,73462,7,94031,94031,5,94192,94193,7,119142,119142,7,119155,119162,4,119362,119364,5,121476,121476,5,122888,122904,5,123184,123190,5,126976,126979,14,127184,127231,14,127344,127345,14,127405,127461,14,127514,127514,14,127561,127567,14,127778,127779,14,127896,127896,14,127985,127986,14,127995,127999,5,128326,128328,14,128360,128366,14,128378,128378,14,128394,128397,14,128405,128406,14,128422,128423,14,128435,128443,14,128453,128464,14,128479,128480,14,128484,128487,14,128496,128498,14,128640,128709,14,128723,128724,14,128736,128741,14,128747,128748,14,128755,128755,14,128762,128762,14,128981,128991,14,129096,129103,14,129292,129292,14,129311,129311,14,129329,129330,14,129344,129349,14,129360,129374,14,129394,129394,14,129402,129402,14,129413,129425,14,129445,129450,14,129466,129471,14,129483,129483,14,129511,129535,14,129653,129655,14,129667,129670,14,129705,129711,14,129731,129743,14,917505,917505,4,917760,917999,5,10,10,3,127,159,4,768,879,5,1471,1471,5,1536,1541,1,1648,1648,5,1767,1768,5,1840,1866,5,2070,2073,5,2137,2139,5,2307,2307,7,2366,2368,7,2382,2383,7,2434,2435,7,2497,2500,5,2519,2519,5,2563,2563,7,2631,2632,5,2677,2677,5,2750,2752,7,2763,2764,7,2817,2817,5,2879,2879,5,2891,2892,7,2914,2915,5,3008,3008,5,3021,3021,5,3076,3076,5,3146,3149,5,3202,3203,7,3264,3265,7,3271,3272,7,3298,3299,5,3390,3390,5,3402,3404,7,3426,3427,5,3535,3535,5,3544,3550,7,3635,3635,7,3763,3763,7,3893,3893,5,3953,3966,5,3981,3991,5,4145,4145,7,4157,4158,5,4209,4212,5,4237,4237,5,4520,4607,10,5970,5971,5,6071,6077,5,6089,6099,5,6277,6278,5,6439,6440,5,6451,6456,7,6683,6683,5,6744,6750,5,6765,6770,7,6846,6846,5,6964,6964,5,6972,6972,5,7019,7027,5,7074,7077,5,7083,7085,5,7146,7148,7,7154,7155,7,7222,7223,5,7394,7400,5,7416,7417,5,8204,8204,5,8233,8233,4,8288,8292,4,8413,8416,5,8482,8482,14,8986,8987,14,9193,9203,14,9654,9654,14,9733,9733,14,9745,9745,14,9752,9752,14,9760,9760,14,9766,9766,14,9774,9775,14,9792,9792,14,9800,9811,14,9825,9826,14,9831,9831,14,9852,9853,14,9872,9873,14,9880,9880,14,9885,9887,14,9896,9897,14,9906,9916,14,9926,9927,14,9936,9936,14,9941,9960,14,9974,9974,14,9982,9985,14,9992,9997,14,10002,10002,14,10017,10017,14,10055,10055,14,10071,10071,14,10145,10145,14,11013,11015,14,11503,11505,5,12334,12335,5,12951,12951,14,42612,42621,5,43014,43014,5,43047,43047,7,43204,43205,5,43335,43345,5,43395,43395,7,43450,43451,7,43561,43566,5,43573,43574,5,43644,43644,5,43710,43711,5,43758,43759,7,44005,44005,5,44012,44012,7,44060,44060,11,44116,44116,11,44172,44172,11,44228,44228,11,44284,44284,11,44340,44340,11,44396,44396,11,44452,44452,11,44508,44508,11,44564,44564,11,44620,44620,11,44676,44676,11,44732,44732,11,44788,44788,11,44844,44844,11,44900,44900,11,44956,44956,11,45012,45012,11,45068,45068,11,45124,45124,11,45180,45180,11,45236,45236,11,45292,45292,11,45348,45348,11,45404,45404,11,45460,45460,11,45516,45516,11,45572,45572,11,45628,45628,11,45684,45684,11,45740,45740,11,45796,45796,11,45852,45852,11,45908,45908,11,45964,45964,11,46020,46020,11,46076,46076,11,46132,46132,11,46188,46188,11,46244,46244,11,46300,46300,11,46356,46356,11,46412,46412,11,46468,46468,11,46524,46524,11,46580,46580,11,46636,46636,11,46692,46692,11,46748,46748,11,46804,46804,11,46860,46860,11,46916,46916,11,46972,46972,11,47028,47028,11,47084,47084,11,47140,47140,11,47196,47196,11,47252,47252,11,47308,47308,11,47364,47364,11,47420,47420,11,47476,47476,11,47532,47532,11,47588,47588,11,47644,47644,11,47700,47700,11,47756,47756,11,47812,47812,11,47868,47868,11,47924,47924,11,47980,47980,11,48036,48036,11,48092,48092,11,48148,48148,11,48204,48204,11,48260,48260,11,48316,48316,11,48372,48372,11,48428,48428,11,48484,48484,11,48540,48540,11,48596,48596,11,48652,48652,11,48708,48708,11,48764,48764,11,48820,48820,11,48876,48876,11,48932,48932,11,48988,48988,11,49044,49044,11,49100,49100,11,49156,49156,11,49212,49212,11,49268,49268,11,49324,49324,11,49380,49380,11,49436,49436,11,49492,49492,11,49548,49548,11,49604,49604,11,49660,49660,11,49716,49716,11,49772,49772,11,49828,49828,11,49884,49884,11,49940,49940,11,49996,49996,11,50052,50052,11,50108,50108,11,50164,50164,11,50220,50220,11,50276,50276,11,50332,50332,11,50388,50388,11,50444,50444,11,50500,50500,11,50556,50556,11,50612,50612,11,50668,50668,11,50724,50724,11,50780,50780,11,50836,50836,11,50892,50892,11,50948,50948,11,51004,51004,11,51060,51060,11,51116,51116,11,51172,51172,11,51228,51228,11,51284,51284,11,51340,51340,11,51396,51396,11,51452,51452,11,51508,51508,11,51564,51564,11,51620,51620,11,51676,51676,11,51732,51732,11,51788,51788,11,51844,51844,11,51900,51900,11,51956,51956,11,52012,52012,11,52068,52068,11,52124,52124,11,52180,52180,11,52236,52236,11,52292,52292,11,52348,52348,11,52404,52404,11,52460,52460,11,52516,52516,11,52572,52572,11,52628,52628,11,52684,52684,11,52740,52740,11,52796,52796,11,52852,52852,11,52908,52908,11,52964,52964,11,53020,53020,11,53076,53076,11,53132,53132,11,53188,53188,11,53244,53244,11,53300,53300,11,53356,53356,11,53412,53412,11,53468,53468,11,53524,53524,11,53580,53580,11,53636,53636,11,53692,53692,11,53748,53748,11,53804,53804,11,53860,53860,11,53916,53916,11,53972,53972,11,54028,54028,11,54084,54084,11,54140,54140,11,54196,54196,11,54252,54252,11,54308,54308,11,54364,54364,11,54420,54420,11,54476,54476,11,54532,54532,11,54588,54588,11,54644,54644,11,54700,54700,11,54756,54756,11,54812,54812,11,54868,54868,11,54924,54924,11,54980,54980,11,55036,55036,11,55092,55092,11,55148,55148,11,55216,55238,9,65056,65071,5,65529,65531,4,68097,68099,5,68159,68159,5,69446,69456,5,69688,69702,5,69808,69810,7,69815,69816,7,69821,69821,1,69888,69890,5,69932,69932,7,69957,69958,7,70016,70017,5,70067,70069,7,70079,70080,7,70089,70092,5,70095,70095,5,70191,70193,5,70196,70196,5,70198,70199,5,70367,70367,5,70371,70378,5,70402,70403,7,70462,70462,5,70464,70464,5,70471,70472,7,70487,70487,5,70502,70508,5,70709,70711,7,70720,70721,7,70725,70725,7,70750,70750,5,70833,70834,7,70841,70841,7,70843,70844,7,70846,70846,7,70849,70849,7,71087,71087,5,71090,71093,5,71100,71101,5,71103,71104,5,71216,71218,7,71227,71228,7,71230,71230,7,71339,71339,5,71341,71341,5,71344,71349,5,71351,71351,5,71456,71457,7,71462,71462,7,71724,71726,7,71736,71736,7,71984,71984,5,71991,71992,7,71997,71997,7,71999,71999,1,72001,72001,1,72003,72003,5,72148,72151,5,72156,72159,7,72164,72164,7,72243,72248,5,72250,72250,1,72263,72263,5,72279,72280,7,72324,72329,1,72343,72343,7,72751,72751,7,72760,72765,5,72767,72767,5,72873,72873,7,72881,72881,7,72884,72884,7,73009,73014,5,73020,73021,5,73030,73030,1,73098,73102,7,73107,73108,7,73110,73110,7,73459,73460,5,78896,78904,4,92976,92982,5,94033,94087,7,94180,94180,5,113821,113822,5,119141,119141,5,119143,119145,5,119150,119154,5,119163,119170,5,119210,119213,5,121344,121398,5,121461,121461,5,121499,121503,5,122880,122886,5,122907,122913,5,122918,122922,5,123628,123631,5,125252,125258,5,126980,126980,14,127183,127183,14,127245,127247,14,127340,127343,14,127358,127359,14,127377,127386,14,127462,127487,6,127491,127503,14,127535,127535,14,127548,127551,14,127568,127569,14,127744,127777,14,127780,127891,14,127894,127895,14,127897,127899,14,127902,127984,14,127987,127989,14,127991,127994,14,128000,128253,14,128255,128317,14,128329,128334,14,128336,128359,14,128367,128368,14,128371,128377,14,128379,128390,14,128392,128393,14,128398,128399,14,128401,128404,14,128407,128419,14,128421,128421,14,128424,128424,14,128433,128434,14,128444,128444,14,128450,128452,14,128465,128467,14,128476,128478,14,128481,128481,14,128483,128483,14,128488,128488,14,128495,128495,14,128499,128499,14,128506,128591,14,128710,128714,14,128721,128722,14,128725,128725,14,128728,128735,14,128742,128744,14,128746,128746,14,128749,128751,14,128753,128754,14,128756,128758,14,128761,128761,14,128763,128764,14,128884,128895,14,128992,129003,14,129036,129039,14,129114,129119,14,129198,129279,14,129293,129295,14,129305,129310,14,129312,129319,14,129328,129328,14,129331,129338,14,129343,129343,14,129351,129355,14,129357,129359,14,129375,129387,14,129393,129393,14,129395,129398,14,129401,129401,14,129403,129403,14,129408,129412,14,129426,129431,14,129443,129444,14,129451,129453,14,129456,129465,14,129472,129472,14,129475,129482,14,129484,129484,14,129488,129510,14,129536,129647,14,129652,129652,14,129656,129658,14,129664,129666,14,129671,129679,14,129686,129704,14,129712,129718,14,129728,129730,14,129744,129750,14,917504,917504,4,917506,917535,4,917632,917759,4,918000,921599,4,0,9,4,11,12,4,14,31,4,169,169,14,174,174,14,1155,1159,5,1425,1469,5,1473,1474,5,1479,1479,5,1552,1562,5,1611,1631,5,1750,1756,5,1759,1764,5,1770,1773,5,1809,1809,5,1958,1968,5,2045,2045,5,2075,2083,5,2089,2093,5,2259,2273,5,2275,2306,5,2362,2362,5,2364,2364,5,2369,2376,5,2381,2381,5,2385,2391,5,2433,2433,5,2492,2492,5,2495,2496,7,2503,2504,7,2509,2509,5,2530,2531,5,2561,2562,5,2620,2620,5,2625,2626,5,2635,2637,5,2672,2673,5,2689,2690,5,2748,2748,5,2753,2757,5,2761,2761,7,2765,2765,5,2810,2815,5,2818,2819,7,2878,2878,5,2880,2880,7,2887,2888,7,2893,2893,5,2903,2903,5,2946,2946,5,3007,3007,7,3009,3010,7,3018,3020,7,3031,3031,5,3073,3075,7,3134,3136,5,3142,3144,5,3157,3158,5,3201,3201,5,3260,3260,5,3263,3263,5,3266,3266,5,3270,3270,5,3274,3275,7,3285,3286,5,3328,3329,5,3387,3388,5,3391,3392,7,3398,3400,7,3405,3405,5,3415,3415,5,3457,3457,5,3530,3530,5,3536,3537,7,3542,3542,5,3551,3551,5,3633,3633,5,3636,3642,5,3761,3761,5,3764,3772,5,3864,3865,5,3895,3895,5,3902,3903,7,3967,3967,7,3974,3975,5,3993,4028,5,4141,4144,5,4146,4151,5,4155,4156,7,4182,4183,7,4190,4192,5,4226,4226,5,4229,4230,5,4253,4253,5,4448,4519,9,4957,4959,5,5938,5940,5,6002,6003,5,6070,6070,7,6078,6085,7,6087,6088,7,6109,6109,5,6158,6158,4,6313,6313,5,6435,6438,7,6441,6443,7,6450,6450,5,6457,6459,5,6681,6682,7,6741,6741,7,6743,6743,7,6752,6752,5,6757,6764,5,6771,6780,5,6832,6845,5,6847,6848,5,6916,6916,7,6965,6965,5,6971,6971,7,6973,6977,7,6979,6980,7,7040,7041,5,7073,7073,7,7078,7079,7,7082,7082,7,7142,7142,5,7144,7145,5,7149,7149,5,7151,7153,5,7204,7211,7,7220,7221,7,7376,7378,5,7393,7393,7,7405,7405,5,7415,7415,7,7616,7673,5,8203,8203,4,8205,8205,13,8232,8232,4,8234,8238,4,8265,8265,14,8293,8293,4,8400,8412,5,8417,8417,5,8421,8432,5,8505,8505,14,8617,8618,14,9000,9000,14,9167,9167,14,9208,9210,14,9642,9643,14,9664,9664,14,9728,9732,14,9735,9741,14,9743,9744,14,9746,9746,14,9750,9751,14,9753,9756,14,9758,9759,14,9761,9761,14,9764,9765,14,9767,9769,14,9771,9773,14,9776,9783,14,9787,9791,14,9793,9793,14,9795,9799,14,9812,9822,14,9824,9824,14,9827,9827,14,9829,9830,14,9832,9832,14,9851,9851,14,9854,9854,14,9856,9861,14,9874,9876,14,9878,9879,14,9881,9881,14,9883,9884,14,9888,9889,14,9895,9895,14,9898,9899,14,9904,9905,14,9917,9918,14,9924,9925,14,9928,9928,14,9934,9935,14,9937,9937,14,9939,9940,14,9961,9962,14,9968,9973,14,9975,9978,14,9981,9981,14,9986,9986,14,9989,9989,14,9998,9998,14,10000,10001,14,10004,10004,14,10013,10013,14,10024,10024,14,10052,10052,14,10060,10060,14,10067,10069,14,10083,10084,14,10133,10135,14,10160,10160,14,10548,10549,14,11035,11036,14,11093,11093,14,11647,11647,5,12330,12333,5,12336,12336,14,12441,12442,5,12953,12953,14,42608,42610,5,42654,42655,5,43010,43010,5,43019,43019,5,43045,43046,5,43052,43052,5,43188,43203,7,43232,43249,5,43302,43309,5,43346,43347,7,43392,43394,5,43443,43443,5,43446,43449,5,43452,43453,5,43493,43493,5,43567,43568,7,43571,43572,7,43587,43587,5,43597,43597,7,43696,43696,5,43703,43704,5,43713,43713,5,43756,43757,5,43765,43765,7,44003,44004,7,44006,44007,7,44009,44010,7,44013,44013,5,44033,44059,12,44061,44087,12,44089,44115,12,44117,44143,12,44145,44171,12,44173,44199,12,44201,44227,12,44229,44255,12,44257,44283,12,44285,44311,12,44313,44339,12,44341,44367,12,44369,44395,12,44397,44423,12,44425,44451,12,44453,44479,12,44481,44507,12,44509,44535,12,44537,44563,12,44565,44591,12,44593,44619,12,44621,44647,12,44649,44675,12,44677,44703,12,44705,44731,12,44733,44759,12,44761,44787,12,44789,44815,12,44817,44843,12,44845,44871,12,44873,44899,12,44901,44927,12,44929,44955,12,44957,44983,12,44985,45011,12,45013,45039,12,45041,45067,12,45069,45095,12,45097,45123,12,45125,45151,12,45153,45179,12,45181,45207,12,45209,45235,12,45237,45263,12,45265,45291,12,45293,45319,12,45321,45347,12,45349,45375,12,45377,45403,12,45405,45431,12,45433,45459,12,45461,45487,12,45489,45515,12,45517,45543,12,45545,45571,12,45573,45599,12,45601,45627,12,45629,45655,12,45657,45683,12,45685,45711,12,45713,45739,12,45741,45767,12,45769,45795,12,45797,45823,12,45825,45851,12,45853,45879,12,45881,45907,12,45909,45935,12,45937,45963,12,45965,45991,12,45993,46019,12,46021,46047,12,46049,46075,12,46077,46103,12,46105,46131,12,46133,46159,12,46161,46187,12,46189,46215,12,46217,46243,12,46245,46271,12,46273,46299,12,46301,46327,12,46329,46355,12,46357,46383,12,46385,46411,12,46413,46439,12,46441,46467,12,46469,46495,12,46497,46523,12,46525,46551,12,46553,46579,12,46581,46607,12,46609,46635,12,46637,46663,12,46665,46691,12,46693,46719,12,46721,46747,12,46749,46775,12,46777,46803,12,46805,46831,12,46833,46859,12,46861,46887,12,46889,46915,12,46917,46943,12,46945,46971,12,46973,46999,12,47001,47027,12,47029,47055,12,47057,47083,12,47085,47111,12,47113,47139,12,47141,47167,12,47169,47195,12,47197,47223,12,47225,47251,12,47253,47279,12,47281,47307,12,47309,47335,12,47337,47363,12,47365,47391,12,47393,47419,12,47421,47447,12,47449,47475,12,47477,47503,12,47505,47531,12,47533,47559,12,47561,47587,12,47589,47615,12,47617,47643,12,47645,47671,12,47673,47699,12,47701,47727,12,47729,47755,12,47757,47783,12,47785,47811,12,47813,47839,12,47841,47867,12,47869,47895,12,47897,47923,12,47925,47951,12,47953,47979,12,47981,48007,12,48009,48035,12,48037,48063,12,48065,48091,12,48093,48119,12,48121,48147,12,48149,48175,12,48177,48203,12,48205,48231,12,48233,48259,12,48261,48287,12,48289,48315,12,48317,48343,12,48345,48371,12,48373,48399,12,48401,48427,12,48429,48455,12,48457,48483,12,48485,48511,12,48513,48539,12,48541,48567,12,48569,48595,12,48597,48623,12,48625,48651,12,48653,48679,12,48681,48707,12,48709,48735,12,48737,48763,12,48765,48791,12,48793,48819,12,48821,48847,12,48849,48875,12,48877,48903,12,48905,48931,12,48933,48959,12,48961,48987,12,48989,49015,12,49017,49043,12,49045,49071,12,49073,49099,12,49101,49127,12,49129,49155,12,49157,49183,12,49185,49211,12,49213,49239,12,49241,49267,12,49269,49295,12,49297,49323,12,49325,49351,12,49353,49379,12,49381,49407,12,49409,49435,12,49437,49463,12,49465,49491,12,49493,49519,12,49521,49547,12,49549,49575,12,49577,49603,12,49605,49631,12,49633,49659,12,49661,49687,12,49689,49715,12,49717,49743,12,49745,49771,12,49773,49799,12,49801,49827,12,49829,49855,12,49857,49883,12,49885,49911,12,49913,49939,12,49941,49967,12,49969,49995,12,49997,50023,12,50025,50051,12,50053,50079,12,50081,50107,12,50109,50135,12,50137,50163,12,50165,50191,12,50193,50219,12,50221,50247,12,50249,50275,12,50277,50303,12,50305,50331,12,50333,50359,12,50361,50387,12,50389,50415,12,50417,50443,12,50445,50471,12,50473,50499,12,50501,50527,12,50529,50555,12,50557,50583,12,50585,50611,12,50613,50639,12,50641,50667,12,50669,50695,12,50697,50723,12,50725,50751,12,50753,50779,12,50781,50807,12,50809,50835,12,50837,50863,12,50865,50891,12,50893,50919,12,50921,50947,12,50949,50975,12,50977,51003,12,51005,51031,12,51033,51059,12,51061,51087,12,51089,51115,12,51117,51143,12,51145,51171,12,51173,51199,12,51201,51227,12,51229,51255,12,51257,51283,12,51285,51311,12,51313,51339,12,51341,51367,12,51369,51395,12,51397,51423,12,51425,51451,12,51453,51479,12,51481,51507,12,51509,51535,12,51537,51563,12,51565,51591,12,51593,51619,12,51621,51647,12,51649,51675,12,51677,51703,12,51705,51731,12,51733,51759,12,51761,51787,12,51789,51815,12,51817,51843,12,51845,51871,12,51873,51899,12,51901,51927,12,51929,51955,12,51957,51983,12,51985,52011,12,52013,52039,12,52041,52067,12,52069,52095,12,52097,52123,12,52125,52151,12,52153,52179,12,52181,52207,12,52209,52235,12,52237,52263,12,52265,52291,12,52293,52319,12,52321,52347,12,52349,52375,12,52377,52403,12,52405,52431,12,52433,52459,12,52461,52487,12,52489,52515,12,52517,52543,12,52545,52571,12,52573,52599,12,52601,52627,12,52629,52655,12,52657,52683,12,52685,52711,12,52713,52739,12,52741,52767,12,52769,52795,12,52797,52823,12,52825,52851,12,52853,52879,12,52881,52907,12,52909,52935,12,52937,52963,12,52965,52991,12,52993,53019,12,53021,53047,12,53049,53075,12,53077,53103,12,53105,53131,12,53133,53159,12,53161,53187,12,53189,53215,12,53217,53243,12,53245,53271,12,53273,53299,12,53301,53327,12,53329,53355,12,53357,53383,12,53385,53411,12,53413,53439,12,53441,53467,12,53469,53495,12,53497,53523,12,53525,53551,12,53553,53579,12,53581,53607,12,53609,53635,12,53637,53663,12,53665,53691,12,53693,53719,12,53721,53747,12,53749,53775,12,53777,53803,12,53805,53831,12,53833,53859,12,53861,53887,12,53889,53915,12,53917,53943,12,53945,53971,12,53973,53999,12,54001,54027,12,54029,54055,12,54057,54083,12,54085,54111,12,54113,54139,12,54141,54167,12,54169,54195,12,54197,54223,12,54225,54251,12,54253,54279,12,54281,54307,12,54309,54335,12,54337,54363,12,54365,54391,12,54393,54419,12,54421,54447,12,54449,54475,12,54477,54503,12,54505,54531,12,54533,54559,12,54561,54587,12,54589,54615,12,54617,54643,12,54645,54671,12,54673,54699,12,54701,54727,12,54729,54755,12,54757,54783,12,54785,54811,12,54813,54839,12,54841,54867,12,54869,54895,12,54897,54923,12,54925,54951,12,54953,54979,12,54981,55007,12,55009,55035,12,55037,55063,12,55065,55091,12,55093,55119,12,55121,55147,12,55149,55175,12,55177,55203,12,55243,55291,10,65024,65039,5,65279,65279,4,65520,65528,4,66045,66045,5,66422,66426,5,68101,68102,5,68152,68154,5,68325,68326,5,69291,69292,5,69632,69632,7,69634,69634,7,69759,69761,5]")}function Ee($,se){if($===0)return 0;const ue=Te($,se);if(ue!==void 0)return ue;const ce=d(se,$);return $-=Re(ce),$}function Te($,se){let ue=d(se,$);for($-=Re(ue);Ie(ue)||ue===65039||ue===8419;){if($===0)return;ue=d(se,$),$-=Re(ue)}if(!he(ue))return;if($>=0){const ce=d(se,$);ce===8205&&($-=Re(ce))}return $}function Re($){return $>=65536?2:1}function Ie($){return 127995<=$&&$<=127999}},NvD2:function(Ne,ne,U){"use strict";U.d(ne,"a",function(){return R});var Q=U("Kwbf");function H(K,N){var e=new Set;return K.forEach(function(C){N.has(C)||e.add(C)}),e}function I(K){var N=K||{},e=N.disabled,C=N.disableCheckbox,g=N.checkable;return!!(e||C)||g===!1}function W(K,N,e,C){for(var g=new Set(K),v=new Set,c=0;c<=e;c+=1){var s=N.get(c)||new Set;s.forEach(function(n){var r=n.key,t=n.node,E=n.children,y=E===void 0?[]:E;g.has(r)&&!C(t)&&y.filter(function(m){return!C(m.node)}).forEach(function(m){g.add(m.key)})})}for(var i=new Set,l=e;l>=0;l-=1){var a=N.get(l)||new Set;a.forEach(function(n){var r=n.parent,t=n.node;if(C(t)||!n.parent||i.has(n.parent.key))return;if(C(n.parent.node)){i.add(r.key);return}var E=!0,y=!1;(r.children||[]).filter(function(m){return!C(m.node)}).forEach(function(m){var T=m.key,_=g.has(T);E&&!_&&(E=!1),!y&&(_||v.has(T))&&(y=!0)}),E&&g.add(r.key),y&&v.add(r.key),i.add(r.key)})}return{checkedKeys:Array.from(g),halfCheckedKeys:Array.from(H(v,g))}}function P(K,N,e,C,g){for(var v=new Set(K),c=new Set(N),s=0;s<=C;s+=1){var i=e.get(s)||new Set;i.forEach(function(r){var t=r.key,E=r.node,y=r.children,m=y===void 0?[]:y;!v.has(t)&&!c.has(t)&&!g(E)&&m.filter(function(T){return!g(T.node)}).forEach(function(T){v.delete(T.key)})})}c=new Set;for(var l=new Set,a=C;a>=0;a-=1){var n=e.get(a)||new Set;n.forEach(function(r){var t=r.parent,E=r.node;if(g(E)||!r.parent||l.has(r.parent.key))return;if(g(r.parent.node)){l.add(t.key);return}var y=!0,m=!1;(t.children||[]).filter(function(T){return!g(T.node)}).forEach(function(T){var _=T.key,f=v.has(_);y&&!f&&(y=!1),!m&&(f||c.has(_))&&(m=!0)}),y||v.delete(t.key),m&&c.add(t.key),l.add(t.key)})}return{checkedKeys:Array.from(v),halfCheckedKeys:Array.from(H(c,v))}}function R(K,N,e,C){var g=[],v;C?v=C:v=I;var c=new Set(K.filter(function(a){var n=!!e[a];return n||g.push(a),n})),s=new Map,i=0;Object.keys(e).forEach(function(a){var n=e[a],r=n.level,t=s.get(r);t||(t=new Set,s.set(r,t)),t.add(n),i=Math.max(i,r)}),Object(Q.a)(!g.length,"Tree missing follow keys: ".concat(g.slice(0,100).map(function(a){return"'".concat(a,"'")}).join(", ")));var l;return N===!0?l=W(c,s,i,v):l=P(c,N.halfCheckedKeys,s,i,v),l}},OZM5:function(Ne,ne,U){"use strict";U.d(ne,"b",function(){return C}),U.d(ne,"a",function(){return g}),U.d(ne,"k",function(){return v}),U.d(ne,"h",function(){return c}),U.d(ne,"i",function(){return s}),U.d(ne,"g",function(){return i}),U.d(ne,"c",function(){return l}),U.d(ne,"d",function(){return a}),U.d(ne,"j",function(){return t}),U.d(ne,"e",function(){return E}),U.d(ne,"f",function(){return y});var Q=U("KQm4"),H=U("U8pU"),I=U("Ff2n"),W=U("q1tI"),P=U.n(W),R=U("Kwbf"),K=U("WaYH"),N=.25,e=2;function C(m,T){var _=m.slice(),f=_.indexOf(T);return f>=0&&_.splice(f,1),_}function g(m,T){var _=m.slice();return _.indexOf(T)===-1&&_.push(T),_}function v(m){return m.split("-")}function c(m,T){return"".concat(m,"-").concat(T)}function s(m){return m&&m.type&&m.type.isTreeNode}function i(m,T){var _=[m],f=T[m];function h(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];o.forEach(function(u){var b=u.key,p=u.children;_.push(b),h(p)})}return h(f.children),_}function l(m,T){var _=m.clientY,f=T.selectHandle.getBoundingClientRect(),h=f.top,o=f.bottom,u=f.height,b=Math.max(u*N,e);return _<=h+b?-1:_>=o-b?1:0}function a(m,T){if(!m)return;var _=T.multiple;return _?m.slice():m.length?[m[0]]:m}var n=function(T){return T};function r(m,T){if(!m)return[];var _=T||{},f=_.processProps,h=f===void 0?n:f,o=Array.isArray(m)?m:[m];return o.map(function(u){var b=u.children,p=Object(I.a)(u,["children"]),d=r(b,T);return P.a.createElement(K.a,Object.assign({},h(p)),d)})}function t(m){if(!m)return null;var T;if(Array.isArray(m))T={checkedKeys:m,halfCheckedKeys:void 0};else if(Object(H.a)(m)==="object")T={checkedKeys:m.checked||void 0,halfCheckedKeys:m.halfChecked||void 0};else return Object(R.a)(!1,"`checkedKeys` is not an array or an object"),null;return T}function E(m,T){var _=new Set;function f(h){if(_.has(h))return;var o=T[h];if(!o)return;_.add(h);var u=o.parent,b=o.node;if(b.disabled)return;u&&f(u.key)}return(m||[]).forEach(function(h){f(h)}),Object(Q.a)(_)}function y(m){var T={};return Object.keys(m).forEach(function(_){(_.startsWith("data-")||_.startsWith("aria-"))&&(T[_]=m[_])}),T}},"SA+Z":function(Ne,ne,U){var Q=U("wTVA"),H=U("EbDI"),I=U("ZhPi"),W=U("wkBT");function P(R){return Q(R)||H(R)||I(R)||W()}Ne.exports=P,Ne.exports.__esModule=!0,Ne.exports.default=Ne.exports},SJMd:function(Ne,ne){/**
* @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 U,Q,H,I=!1,W,P;window.PR_SHOULD_USE_CONTINUATION=!0;var R,K;(function(){var N=window,e=["break,continue,do,else,for,if,return,while"],C=[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"],g=[C,"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],v=[g,"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"],c=[g,"abstract,assert,boolean,byte,extends,finally,final,implements,import,instanceof,interface,null,native,package,strictfp,super,synchronized,throws,transient"],s=[g,"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",l=[g,"abstract,async,await,constructor,debugger,enum,eval,export,function,get,implements,instanceof,interface,let,null,set,undefined,var,with,yield,Infinity,NaN"],a="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",n=[e,"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"],r=[e,"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"],t=[e,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],E=[v,s,c,l,a,n,r,t],y=/^(DIR|FILE|array|vector|(de|priority_)?queue|(forward_)?list|stack|(const_)?(reverse_)?iterator|(unordered_)?(multi)?(set|map)|bitset|u?(int|float)\d*)\b/,m="str",T="kwd",_="com",f="typ",h="lit",o="pun",u="pln",b="tag",p="dec",d="src",A="atn",D="atv",S="nocode",L="(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<=?|>>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";function M(Te){for(var Re=0,Ie=!1,$=!1,se=0,ue=Te.length;se122||(V<65||J>90||be.push([Math.max(65,J)|32,Math.min(V,90)|32]),V<97||J>122||be.push([Math.max(97,J)&~32,Math.min(V,122)&~32]))}}be.sort(function(le,ge){return le[0]-ge[0]||ge[1]-le[1]});for(var Y=[],q=[],ye=0;yeee[0]&&(ee[1]+1>ee[0]&&pe.push("-"),pe.push(Pe(ee[1])))}return pe.push("]"),pe.join("")}function Fe(oe){for(var me=oe.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")),be=me.length,we=[],pe=0,ye=0;pe=2&&J==="["?me[pe]=Me(re):J!=="\\"&&(me[pe]=re.replace(/[a-zA-Z]/g,function(q){var ee=q.charCodeAt(0);return"["+String.fromCharCode(ee&~32,ee|32)+"]"}))}return me.join("")}for(var He=[],se=0,ue=Te.length;se=0;)Ie[He.charAt(oe)]=Fe;var me=Fe[1],be=""+me;De.hasOwnProperty(be)||(_e.push(me),De[be]=null)}_e.push(/[\0-\uffff]/),$=M(_e)})();var se=Re.length,ue=function(ce){for(var _e=ce.sourceCode,De=ce.basePos,Pe=ce.sourceNode,Me=[De,u],Fe=0,He=_e.match($)||[],oe={},me=0,be=He.length;me=5&&pe.substring(0,5)==="lang-",re&&!(ye&&typeof ye[1]=="string")&&(re=!1,pe=d),re||(oe[we]=pe)}var V=Fe;if(Fe+=we.length,!re)Me.push(De+V,pe);else{var Y=ye[1],q=we.indexOf(Y),ee=q+Y.length;ye[2]&&(ee=we.length-ye[2].length,q=ee-Y.length);var le=pe.substring(5);j(Pe,De+V,we.substring(0,q),ue,Me),j(Pe,De+V+q,Y,ie(le,Y),Me),j(Pe,De+V+ee,we.substring(ee),ue,Me)}}ce.decorations=Me};return ue}function fe(Te){var Re=[],Ie=[];Te.tripleQuotedStrings?Re.push([m,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,`'"`]):Te.multiLineStrings?Re.push([m,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"]):Re.push([m,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,`"'`]),Te.verbatimStrings&&Ie.push([m,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null]);var $=Te.hashComments;$&&(Te.cStyleComments?($>1?Re.push([_,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"]):Re.push([_,/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"]),Ie.push([m,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,null])):Re.push([_,/^#[^\r\n]*/,null,"#"])),Te.cStyleComments&&(Ie.push([_,/^\/\/[^\r\n]*/,null]),Ie.push([_,/^\/\*[\s\S]*?(?:\*\/|$)/,null]));var se=Te.regexLiterals;if(se){var ue=se>1?"":`
\r`,ce=ue?".":"[\\S\\s]",_e="/(?=[^/*"+ue+"])(?:[^/\\x5B\\x5C"+ue+"]|\\x5C"+ce+"|\\x5B(?:[^\\x5C\\x5D"+ue+"]|\\x5C"+ce+")*(?:\\x5D|$))+/";Ie.push(["lang-regex",RegExp("^"+L+"("+_e+")")])}var De=Te.types;De&&Ie.push([f,De]);var Pe=(""+Te.keywords).replace(/^ | $/g,"");Pe.length&&Ie.push([T,new RegExp("^(?:"+Pe.replace(/[\s,]+/g,"|")+")\\b"),null]),Re.push([u,/^\s+/,null,` \r
\xA0`]);var Me="^.[^\\s\\w.$@'\"`/\\\\]*";return Te.regexLiterals&&(Me+="(?!s*/)"),Ie.push([h,/^@[a-z_$][a-z_$@0-9]*/i,null],[f,/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],[u,/^[a-z_$][a-z_$@0-9]*/i,null],[h,new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*","i"),null,"0123456789"],[u,/^\\[\s\S]?/,null],[o,new RegExp(Me),null]),te(Re,Ie)}var ve=fe({keywords:E,hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0});function he(Te,Re,Ie){for(var $=/(?:^|\s)nocode(?:\s|$)/,se=/\r\n?|\n/,ue=Te.ownerDocument,ce=ue.createElement("li");Te.firstChild;)ce.appendChild(Te.firstChild);var _e=[ce];function De(me){var be=me.nodeType;if(be==1&&!$.test(me.className))if(me.nodeName==="br")Pe(me),me.parentNode&&me.parentNode.removeChild(me);else for(var we=me.firstChild;we;we=we.nextSibling)De(we);else if((be==3||be==4)&&Ie){var pe=me.nodeValue,ye=pe.match(se);if(ye){var re=pe.substring(0,ye.index);me.nodeValue=re;var Z=pe.substring(ye.index+ye[0].length);if(Z){var J=me.parentNode;J.insertBefore(ue.createTextNode(Z),me.nextSibling)}Pe(me),re||me.parentNode.removeChild(me)}}}function Pe(me){for(;!me.nextSibling;)if(me=me.parentNode,!me)return;function be(ye,re){var Z=re?ye.cloneNode(!1):ye,J=ye.parentNode;if(J){var V=be(J,1),Y=ye.nextSibling;V.appendChild(Z);for(var q=Y;q;q=Y)Y=q.nextSibling,V.appendChild(q)}return Z}for(var we=be(me.nextSibling,0),pe;(pe=we.parentNode)&&pe.nodeType===1;)we=pe;_e.push(we)}for(var Me=0;Me<_e.length;++Me)De(_e[Me]);Re===(Re|0)&&_e[0].setAttribute("value",Re);var Fe=ue.createElement("ol");Fe.className="linenums";for(var He=Math.max(0,Re-1|0)||0,Me=0,oe=_e.length;Me=J&&(De+=2),ue>=V&&(Fe+=2)}}finally{pe&&(pe.style.display=ye)}}var Se={};function de(Te,Re){for(var Ie=Re.length;--Ie>=0;){var $=Re[Ie];Se.hasOwnProperty($)?N.console&&console.warn("cannot override language handler %s",$):Se[$]=Te}}function ie(Te,Re){return Te&&Se.hasOwnProperty(Te)||(Te=/^\s*]*(?:>|$)/],[_,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[o,/^(?:<[%?]|[%?]>)/],["lang-",/^]*>([\s\S]+?)<\/xmp\b[^>]*>/i],["lang-js",/^