(window.webpackJsonp=window.webpackJsonp||[]).push([[279,5,7],{"+ua5":function(Ze,le,K){},"/cxE":function(Ze,le,K){"use strict";K.d(le,"f",function(){return A}),K.d(le,"g",function(){return B}),K.d(le,"h",function(){return C}),K.d(le,"e",function(){return H}),K.d(le,"b",function(){return U}),K.d(le,"c",function(){return e}),K.d(le,"d",function(){return R}),K.d(le,"a",function(){return p});class te{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(d){setTimeout(()=>{throw d.stack?new Error(d.message+`
`+d.stack):d},0)}}emit(d){this.listeners.forEach(l=>{l(d)})}onUnexpectedError(d){this.unexpectedErrorHandler(d),this.emit(d)}onUnexpectedExternalError(d){this.unexpectedErrorHandler(d)}}const j=new te;function A(d){H(d)||j.onUnexpectedError(d);return}function B(d){H(d)||j.onUnexpectedExternalError(d);return}function C(d){if(d instanceof Error){let{name:l,message:n}=d;const o=d.stacktrace||d.stack;return{$isError:!0,name:l,message:n,stack:o}}return d}const I="Canceled";function H(d){return d instanceof Error&&d.name===I&&d.message===I}function U(){const d=new Error(I);return d.name=d.message,d}function e(d){return d?new Error(`Illegal argument: ${d}`):new Error("Illegal argument")}function R(d){return d?new Error(`Illegal state: ${d}`):new Error("Illegal state")}class p extends Error{constructor(d){super("NotSupported");d&&(this.message=d)}}},"24hK":function(Ze,le,K){"use strict";K.d(le,"a",function(){return j});class te{constructor(A){this.element=A,this.next=te.Undefined,this.prev=te.Undefined}}te.Undefined=new te(void 0);class j{constructor(){this._first=te.Undefined,this._last=te.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===te.Undefined}clear(){let A=this._first;for(;A!==te.Undefined;){const B=A.next;A.prev=te.Undefined,A.next=te.Undefined,A=B}this._first=te.Undefined,this._last=te.Undefined,this._size=0}unshift(A){return this._insert(A,!1)}push(A){return this._insert(A,!0)}_insert(A,B){const C=new te(A);if(this._first===te.Undefined)this._first=C,this._last=C;else if(B){const H=this._last;this._last=C,C.prev=H,H.next=C}else{const H=this._first;this._first=C,C.next=H,H.prev=C}this._size+=1;let I=!1;return()=>{I||(I=!0,this._remove(C))}}shift(){if(this._first===te.Undefined)return;{const A=this._first.element;return this._remove(this._first),A}}pop(){if(this._last===te.Undefined)return;{const A=this._last.element;return this._remove(this._last),A}}_remove(A){if(A.prev!==te.Undefined&&A.next!==te.Undefined){const B=A.prev;B.next=A.next,A.next.prev=B}else A.prev===te.Undefined&&A.next===te.Undefined?(this._first=te.Undefined,this._last=te.Undefined):A.next===te.Undefined?(this._last=this._last.prev,this._last.next=te.Undefined):A.prev===te.Undefined&&(this._first=this._first.next,this._first.prev=te.Undefined);this._size-=1}*[Symbol.iterator](){let A=this._first;for(;A!==te.Undefined;)yield A.element,A=A.next}}},"3/fG":function(Ze,le,K){"use strict";K.d(le,"a",function(){return j});function te(A,B){let C;return B.length===0?C=A:C=A.replace(/\{(\d+)\}/g,function(I,H){const U=H[0];return typeof B[U]!="undefined"?B[U]:I}),C}function j(A,B,...C){return te(B,C)}},"55Ip":function(Ze,le,K){"use strict";K.d(le,"a",function(){return i});var te=K("Ty5D"),j=K("dI71"),A=K("q1tI"),B=K.n(A),C=K("YS25"),I=K("17x9"),H=K.n(I),U=K("wx14"),e=K("zLVn"),R=K("9R94"),p=function(s){Object(j.a)(g,s);function g(){for(var T,y=arguments.length,w=new Array(y),P=0;Pz&&(z=O.line_indent_level));var Q={mode:W,parent:O,last_token:O?O.last_token:new l(i.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:z,alignment:0,line_indent_level:O?O.line_indent_level:z,start_line_index:this._output.get_line_number(),ternary_depth:0};return Q},D.prototype._reset=function(O){var W=O.match(/^[\t ]*/)[0];this._last_last_text="",this._output=new d(this._options,W),this._output.raw=this._options.test_output_raw,this._flag_store=[],this.set_mode(h.BlockStatement);var z=new u(O,this._options);return this._tokens=z.tokenize(),O},D.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var O,W=this._reset(this._source_text),z=this._options.eol;this._options.eol==="auto"&&(z=`
`,W&&n.lineBreak.test(W||"")&&(z=W.match(n.lineBreak)[0]));for(var Q=this._tokens.next();Q;)this.handle_token(Q),this._last_last_text=this._flags.last_token.text,this._flags.last_token=Q,Q=this._tokens.next();return O=this._output.get_code(z),O},D.prototype.handle_token=function(O,W){O.type===i.START_EXPR?this.handle_start_expr(O):O.type===i.END_EXPR?this.handle_end_expr(O):O.type===i.START_BLOCK?this.handle_start_block(O):O.type===i.END_BLOCK?this.handle_end_block(O):O.type===i.WORD?this.handle_word(O):O.type===i.RESERVED?this.handle_word(O):O.type===i.SEMICOLON?this.handle_semicolon(O):O.type===i.STRING?this.handle_string(O):O.type===i.EQUALS?this.handle_equals(O):O.type===i.OPERATOR?this.handle_operator(O):O.type===i.COMMA?this.handle_comma(O):O.type===i.BLOCK_COMMENT?this.handle_block_comment(O,W):O.type===i.COMMENT?this.handle_comment(O,W):O.type===i.DOT?this.handle_dot(O):O.type===i.EOF?this.handle_eof(O):O.type===i.UNKNOWN?this.handle_unknown(O,W):this.handle_unknown(O,W)},D.prototype.handle_whitespace_and_comments=function(O,W){var z=O.newlines,Q=this._options.keep_array_indentation&&w(this._flags.mode);if(O.comments_before)for(var q=O.comments_before.next();q;)this.handle_whitespace_and_comments(q,W),this.handle_token(q,W),q=O.comments_before.next();if(Q)for(var me=0;me0,W);else if(this._options.max_preserve_newlines&&z>this._options.max_preserve_newlines&&(z=this._options.max_preserve_newlines),this._options.preserve_newlines&&z>1){this.print_newline(!1,W);for(var he=1;he0&&(!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))},D.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)},D.prototype.restore_mode=function(){this._flag_store.length>0&&(this._previous_flags=this._flags,this._flags=this._flag_store.pop(),this._previous_flags.mode===h.Statement&&T(this._output,this._previous_flags),this._output.set_indent(this._flags.indentation_level,this._flags.alignment))},D.prototype.start_of_object_property=function(){return this._flags.parent.mode===h.ObjectLiteral&&this._flags.mode===h.Statement&&(this._flags.last_token.text===":"&&this._flags.ternary_depth===0||x(this._flags.last_token,["get","set"]))},D.prototype.start_of_statement=function(O){var W=!1;return W=W||x(this._flags.last_token,["var","let","const"])&&O.type===i.WORD,W=W||v(this._flags.last_token,"do"),W=W||!(this._flags.parent.mode===h.ObjectLiteral&&this._flags.mode===h.Statement)&&x(this._flags.last_token,F)&&!O.newlines,W=W||v(this._flags.last_token,"else")&&!(v(O,"if")&&!O.comments_before),W=W||this._flags.last_token.type===i.END_EXPR&&(this._previous_flags.mode===h.ForInitializer||this._previous_flags.mode===h.Conditional),W=W||this._flags.last_token.type===i.WORD&&this._flags.mode===h.BlockStatement&&!this._flags.in_case&&!(O.text==="--"||O.text==="++")&&this._last_last_text!=="function"&&O.type!==i.WORD&&O.type!==i.RESERVED,W=W||this._flags.mode===h.ObjectLiteral&&(this._flags.last_token.text===":"&&this._flags.ternary_depth===0||x(this._flags.last_token,["get","set"])),W?(this.set_mode(h.Statement),this.indent(),this.handle_whitespace_and_comments(O,!0),this.start_of_object_property()||this.allow_wrap_or_preserved_newline(O,x(O,["do","for","if","while"])),!0):!1},D.prototype.handle_start_expr=function(O){this.start_of_statement(O)||this.handle_whitespace_and_comments(O);var W=h.Expression;if(O.text==="["){if(this._flags.last_token.type===i.WORD||this._flags.last_token.text===")"){x(this._flags.last_token,a)&&(this._output.space_before_token=!0),this.print_token(O),this.set_mode(W),this.indent(),this._options.space_in_paren&&(this._output.space_before_token=!0);return}W=h.ArrayLiteral,w(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,[i.START_EXPR,i.END_EXPR,i.WORD,i.OPERATOR,i.DOT])||(this._output.space_before_token=!0)}else{if(this._flags.last_token.type===i.RESERVED)this._flags.last_token.text==="for"?(this._output.space_before_token=this._options.space_before_conditional,W=h.ForInitializer):t(this._flags.last_token.text,["if","while","switch"])?(this._output.space_before_token=this._options.space_before_conditional,W=h.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===i.EQUALS||this._flags.last_token.type===i.OPERATOR)this.start_of_object_property()||this.allow_wrap_or_preserved_newline(O);else if(this._flags.last_token.type===i.WORD){this._output.space_before_token=!1;var z=this._tokens.peek(-3);if(this._options.space_after_named_function&&z){var Q=this._tokens.peek(-4);x(z,["async","function"])||z.text==="*"&&x(Q,["async","function"])?this._output.space_before_token=!0:this._flags.mode===h.ObjectLiteral?(z.text==="{"||z.text===","||z.text==="*"&&(Q.text==="{"||Q.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===i.RESERVED&&(this._flags.last_word==="function"||this._flags.last_word==="typeof")||this._flags.last_token.text==="*"&&(t(this._last_last_text,["function","yield"])||this._flags.mode===h.ObjectLiteral&&t(this._last_last_text,["{",","])))&&(this._output.space_before_token=this._options.space_after_anon_function)}this._flags.last_token.text===";"||this._flags.last_token.type===i.START_BLOCK?this.print_newline():(this._flags.last_token.type===i.END_EXPR||this._flags.last_token.type===i.START_EXPR||this._flags.last_token.type===i.END_BLOCK||this._flags.last_token.text==="."||this._flags.last_token.type===i.COMMA)&&this.allow_wrap_or_preserved_newline(O,O.newlines),this.print_token(O),this.set_mode(W),this._options.space_in_paren&&(this._output.space_before_token=!0),this.indent()},D.prototype.handle_end_expr=function(O){for(;this._flags.mode===h.Statement;)this.restore_mode();this.handle_whitespace_and_comments(O),this._flags.multiline_frame&&this.allow_wrap_or_preserved_newline(O,O.text==="]"&&w(this._flags.mode)&&!this._options.keep_array_indentation),this._options.space_in_paren&&(this._flags.last_token.type===i.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(),T(this._output,this._previous_flags),this._flags.do_while&&this._previous_flags.mode===h.Conditional&&(this._previous_flags.mode=h.Expression,this._flags.do_block=!1,this._flags.do_while=!1)},D.prototype.handle_start_block=function(O){this.handle_whitespace_and_comments(O);var W=this._tokens.peek(),z=this._tokens.peek(1);this._flags.last_word==="switch"&&this._flags.last_token.type===i.END_EXPR?(this.set_mode(h.BlockStatement),this._flags.in_case_statement=!0):this._flags.case_body?this.set_mode(h.BlockStatement):z&&(t(z.text,[":",","])&&t(W.type,[i.STRING,i.WORD,i.RESERVED])||t(W.text,["get","set","..."])&&t(z.type,[i.WORD,i.RESERVED]))?t(this._last_last_text,["class","interface"])&&!t(z.text,[":",","])?this.set_mode(h.BlockStatement):this.set_mode(h.ObjectLiteral):this._flags.last_token.type===i.OPERATOR&&this._flags.last_token.text==="=>"?this.set_mode(h.BlockStatement):t(this._flags.last_token.type,[i.EQUALS,i.START_EXPR,i.COMMA,i.OPERATOR])||x(this._flags.last_token,["return","throw","import","default"])?this.set_mode(h.ObjectLiteral):this.set_mode(h.BlockStatement),this._flags.last_token&&(x(this._flags.last_token.previous,["class","extends"])&&(this._flags.class_start_block=!0));var Q=!W.comments_before&&W.text==="}",q=Q&&this._flags.last_word==="function"&&this._flags.last_token.type===i.END_EXPR;if(this._options.brace_preserve_inline){var me=0,he=null;this._flags.inline_frame=!0;do if(me+=1,he=this._tokens.peek(me-1),he.newlines){this._flags.inline_frame=!1;break}while(he.type!==i.EOF&&!(he.type===i.END_BLOCK&&he.opened===O))}(this._options.brace_style==="expand"||this._options.brace_style==="none"&&O.newlines)&&!this._flags.inline_frame?this._flags.last_token.type!==i.OPERATOR&&(q||this._flags.last_token.type===i.EQUALS||x(this._flags.last_token,b)&&this._flags.last_token.text!=="else")?this._output.space_before_token=!0:this.print_newline(!1,!0):(w(this._previous_flags.mode)&&(this._flags.last_token.type===i.START_EXPR||this._flags.last_token.type===i.COMMA)&&((this._flags.last_token.type===i.COMMA||this._options.space_in_paren)&&(this._output.space_before_token=!0),(this._flags.last_token.type===i.COMMA||this._flags.last_token.type===i.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!==i.OPERATOR&&this._flags.last_token.type!==i.START_EXPR&&(this._flags.last_token.type===i.START_BLOCK&&!this._flags.inline_frame?this.print_newline():this._output.space_before_token=!0)),this.print_token(O),this.indent(),!Q&&!(this._options.brace_preserve_inline&&this._flags.inline_frame)&&this.print_newline()},D.prototype.handle_end_block=function(O){for(this.handle_whitespace_and_comments(O);this._flags.mode===h.Statement;)this.restore_mode();var W=this._flags.last_token.type===i.START_BLOCK;this._flags.inline_frame&&!W?this._output.space_before_token=!0:this._options.brace_style==="expand"?W||this.print_newline():W||(w(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)},D.prototype.handle_word=function(O){if(O.type===i.RESERVED){if(t(O.text,["set","get"])&&this._flags.mode!==h.ObjectLiteral)O.type=i.WORD;else if(O.text==="import"&&t(this._tokens.peek().text,["(","."]))O.type=i.WORD;else if(t(O.text,["as","from"])&&!this._flags.import_block)O.type=i.WORD;else if(this._flags.mode===h.ObjectLiteral){var W=this._tokens.peek();W.text===":"&&(O.type=i.WORD)}}if(this.start_of_statement(O)?x(this._flags.last_token,["var","let","const"])&&O.type===i.WORD&&(this._flags.declaration_statement=!0):O.newlines&&!P(this._flags.mode)&&(this._flags.last_token.type!==i.OPERATOR||this._flags.last_token.text==="--"||this._flags.last_token.text==="++")&&this._flags.last_token.type!==i.EQUALS&&(this._options.preserve_newlines||!x(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(v(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&&v(O,"else"))this._flags.else_block=!0;else{for(;this._flags.mode===h.Statement;)this.restore_mode();this._flags.if_block=!1,this._flags.else_block=!1}if(this._flags.in_case_statement&&x(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===i.COMMA||this._flags.last_token.type===i.START_EXPR||this._flags.last_token.type===i.EQUALS||this._flags.last_token.type===i.OPERATOR)&&(this.start_of_object_property()||this.allow_wrap_or_preserved_newline(O)),v(O,"function")){(t(this._flags.last_token.text,["}",";"])||this._output.just_added_newline()&&!(t(this._flags.last_token.text,["(","[","{",":","=",","])||this._flags.last_token.type===i.OPERATOR))&&(!this._output.just_added_blankline()&&!O.comments_before&&(this.print_newline(),this.print_newline(!0))),this._flags.last_token.type===i.RESERVED||this._flags.last_token.type===i.WORD?x(this._flags.last_token,["get","set","new","export"])||x(this._flags.last_token,F)?this._output.space_before_token=!0:v(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===i.OPERATOR||this._flags.last_token.text==="="?this._output.space_before_token=!0:!this._flags.multiline_frame&&(P(this._flags.mode)||w(this._flags.mode))||this.print_newline(),this.print_token(O),this._flags.last_word=O.text;return}var z="NONE";if(this._flags.last_token.type===i.END_BLOCK?this._previous_flags.inline_frame?z="SPACE":x(O,["else","catch","finally","from"])?this._options.brace_style==="expand"||this._options.brace_style==="end-expand"||this._options.brace_style==="none"&&O.newlines?z="NEWLINE":(z="SPACE",this._output.space_before_token=!0):z="NEWLINE":this._flags.last_token.type===i.SEMICOLON&&this._flags.mode===h.BlockStatement?z="NEWLINE":this._flags.last_token.type===i.SEMICOLON&&P(this._flags.mode)?z="SPACE":this._flags.last_token.type===i.STRING?z="NEWLINE":this._flags.last_token.type===i.RESERVED||this._flags.last_token.type===i.WORD||this._flags.last_token.text==="*"&&(t(this._last_last_text,["function","yield"])||this._flags.mode===h.ObjectLiteral&&t(this._last_last_text,["{",","]))?z="SPACE":this._flags.last_token.type===i.START_BLOCK?this._flags.inline_frame?z="SPACE":z="NEWLINE":this._flags.last_token.type===i.END_EXPR&&(this._output.space_before_token=!0,z="NEWLINE"),x(O,a)&&this._flags.last_token.text!==")"&&(this._flags.inline_frame||this._flags.last_token.text==="else"||this._flags.last_token.text==="export"?z="SPACE":z="NEWLINE"),x(O,["else","catch","finally"]))if((!(this._flags.last_token.type===i.END_BLOCK&&this._previous_flags.mode===h.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 Q=this._output.current_line;Q.last()!=="}"&&this.print_newline(),this._output.space_before_token=!0}else z==="NEWLINE"?x(this._flags.last_token,b)?this._output.space_before_token=!0:this._flags.last_token.text==="declare"&&x(O,["var","let","const"])?this._output.space_before_token=!0:this._flags.last_token.type!==i.END_EXPR?(this._flags.last_token.type!==i.START_EXPR||!x(O,["var","let","const"]))&&this._flags.last_token.text!==":"&&(v(O,"if")&&v(O.previous,"else")?this._output.space_before_token=!0:this.print_newline()):x(O,a)&&this._flags.last_token.text!==")"&&this.print_newline():this._flags.multiline_frame&&w(this._flags.mode)&&this._flags.last_token.text===","&&this._last_last_text==="}"?this.print_newline():z==="SPACE"&&(this._output.space_before_token=!0);O.previous&&(O.previous.type===i.WORD||O.previous.type===i.RESERVED)&&(this._output.space_before_token=!0),this.print_token(O),this._flags.last_word=O.text,O.type===i.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&&v(O,"from")&&(this._flags.import_block=!1))},D.prototype.handle_semicolon=function(O){this.start_of_statement(O)?this._output.space_before_token=!1:this.handle_whitespace_and_comments(O);for(var W=this._tokens.peek();this._flags.mode===h.Statement&&!(this._flags.if_block&&v(W,"else"))&&!this._flags.do_block;)this.restore_mode();this._flags.import_block&&(this._flags.import_block=!1),this.print_token(O)},D.prototype.handle_string=function(O){O.text.startsWith("`")&&O.newlines===0&&O.whitespace_before===""&&(O.previous.text===")"||this._flags.last_token.type===i.WORD)||(this.start_of_statement(O)?this._output.space_before_token=!0:(this.handle_whitespace_and_comments(O),this._flags.last_token.type===i.RESERVED||this._flags.last_token.type===i.WORD||this._flags.inline_frame?this._output.space_before_token=!0:this._flags.last_token.type===i.COMMA||this._flags.last_token.type===i.START_EXPR||this._flags.last_token.type===i.EQUALS||this._flags.last_token.type===i.OPERATOR?this.start_of_object_property()||this.allow_wrap_or_preserved_newline(O):O.text.startsWith("`")&&this._flags.last_token.type===i.END_EXPR&&(O.previous.text==="]"||O.previous.text===")")&&O.newlines===0?this._output.space_before_token=!0:this.print_newline())),this.print_token(O)},D.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},D.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?(P(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===h.ObjectLiteral||this._flags.mode===h.Statement&&this._flags.parent.mode===h.ObjectLiteral?(this._flags.mode===h.Statement&&this.restore_mode(),this._flags.inline_frame||this.print_newline()):this._options.comma_first&&this.allow_wrap_or_preserved_newline(O)},D.prototype.handle_operator=function(O){var W=O.text==="*"&&(x(this._flags.last_token,["function","yield"])||t(this._flags.last_token.type,[i.START_BLOCK,i.COMMA,i.END_BLOCK,i.SEMICOLON])),z=t(O.text,["-","+"])&&(t(this._flags.last_token.type,[i.START_BLOCK,i.START_EXPR,i.EQUALS,i.OPERATOR])||t(this._flags.last_token.text,a)||this._flags.last_token.text===",");if(!this.start_of_statement(O)){var Q=!W;this.handle_whitespace_and_comments(O,Q)}if(O.text==="*"&&this._flags.last_token.type===i.DOT){this.print_token(O);return}if(O.text==="::"){this.print_token(O);return}if(this._flags.last_token.type===i.OPERATOR&&t(this._options.operator_position,g)&&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!==i.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 q=!0,me=!0,he=!1;if(O.text===":"?this._flags.ternary_depth===0?q=!1:(this._flags.ternary_depth-=1,he=!0):O.text==="?"&&(this._flags.ternary_depth+=1),!z&&!W&&this._options.preserve_newlines&&t(O.text,r)){var ce=O.text===":",pe=ce&&he,ge=ce&&!he;switch(this._options.operator_position){case s.before_newline:this._output.space_before_token=!ge,this.print_token(O),(!ce||pe)&&this.allow_wrap_or_preserved_newline(O),this._output.space_before_token=!0;return;case s.after_newline:this._output.space_before_token=!0,!ce||pe?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 s.preserve_newline:ge||this.allow_wrap_or_preserved_newline(O),q=!(this._output.just_added_newline()||ge),this._output.space_before_token=q,this.print_token(O),this._output.space_before_token=!0;return}}if(W){this.allow_wrap_or_preserved_newline(O),q=!1;var ee=this._tokens.peek();me=ee&&t(ee.type,[i.WORD,i.RESERVED])}else if(O.text==="...")this.allow_wrap_or_preserved_newline(O),q=this._flags.last_token.type===i.START_BLOCK,me=!1;else if(t(O.text,["--","++","!","~"])||z){if((this._flags.last_token.type===i.COMMA||this._flags.last_token.type===i.START_EXPR)&&this.allow_wrap_or_preserved_newline(O),q=!1,me=!1,O.newlines&&(O.text==="--"||O.text==="++"||O.text==="~")){var J=x(this._flags.last_token,b)&&O.newlines;J&&(this._previous_flags.if_block||this._previous_flags.else_block)&&this.restore_mode(),this.print_newline(J,!0)}this._flags.last_token.text===";"&&P(this._flags.mode)&&(q=!0),this._flags.last_token.type===i.RESERVED?q=!0:this._flags.last_token.type===i.END_EXPR?q=!(this._flags.last_token.text==="]"&&(O.text==="--"||O.text==="++")):this._flags.last_token.type===i.OPERATOR&&(q=t(O.text,["--","-","++","+"])&&t(this._flags.last_token.text,["--","-","++","+"]),t(O.text,["+","-"])&&t(this._flags.last_token.text,["--","++"])&&(me=!0)),(this._flags.mode===h.BlockStatement&&!this._flags.inline_frame||this._flags.mode===h.Statement)&&(this._flags.last_token.text==="{"||this._flags.last_token.text===";")&&this.print_newline()}this._output.space_before_token=this._output.space_before_token||q,this.print_token(O),this._output.space_before_token=me},D.prototype.handle_block_comment=function(O,W){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,W),this.print_token(O),O.directives.preserve==="start"&&(this._output.raw=!0),this.print_newline(!1,!0);return}if(!n.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,W)},D.prototype.print_block_commment=function(O,W){var z=y(O.text),Q,q=!1,me=!1,he=O.whitespace_before,ce=he.length;if(this.print_newline(!1,W),this.print_token_line_indentation(O),this._output.add_token(z[0]),this.print_newline(!1,W),z.length>1){for(z=z.slice(1),q=L(z,"*"),me=S(z,he),q&&(this._flags.alignment=1),Q=0;Q=0;n--)if(this.__items[n].match(l))return!0;return!1},R.prototype.set_indent=function(l,n){this.is_empty()&&(this.__indent_count=l||0,this.__alignment_count=n||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},R.prototype._set_wrap_point=function(){this.__parent.wrap_line_length&&(this.__wrap_point_index=this.__items.length,this.__wrap_point_character_count=this.__character_count,this.__wrap_point_indent_count=this.__parent.next_line.__indent_count,this.__wrap_point_alignment_count=this.__parent.next_line.__alignment_count)},R.prototype._should_wrap=function(){return this.__wrap_point_index&&this.__character_count>this.__parent.wrap_line_length&&this.__wrap_point_character_count>this.__parent.next_line.__character_count},R.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var l=this.__parent.current_line;return l.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),l.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),l.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,l.__items[0]===" "&&(l.__items.splice(0,1),l.__character_count-=1),!0}return!1},R.prototype.is_empty=function(){return this.__items.length===0},R.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},R.prototype.push=function(l){this.__items.push(l);var n=l.lastIndexOf(`
`);n!==-1?this.__character_count=l.length-n:this.__character_count+=l.length},R.prototype.pop=function(){var l=null;return this.is_empty()||(l=this.__items.pop(),this.__character_count-=l.length),l},R.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},R.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},R.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},R.prototype.toString=function(){var l="";return this.is_empty()?this.__parent.indent_empty_lines&&(l=this.__parent.get_indent_string(this.__indent_count)):(l=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),l+=this.__items.join("")),l};function p(l,n){this.__cache=[""],this.__indent_size=l.indent_size,this.__indent_string=l.indent_char,l.indent_with_tabs||(this.__indent_string=new Array(l.indent_size+1).join(l.indent_char)),n=n||"",l.indent_level>0&&(n=new Array(l.indent_level+1).join(this.__indent_string)),this.__base_string=n,this.__base_string_length=n.length}p.prototype.get_indent_size=function(l,n){var o=this.__base_string_length;return n=n||0,l<0&&(o=0),o+=l*this.__indent_size,o+=n,o},p.prototype.get_indent_string=function(l,n){var o=this.__base_string;return n=n||0,l<0&&(l=0,o=""),n+=l*this.__indent_size,this.__ensure_cache(n),o+=this.__cache[n],o},p.prototype.__ensure_cache=function(l){for(;l>=this.__cache.length;)this.__add_column()},p.prototype.__add_column=function(){var l=this.__cache.length,n=0,o="";this.__indent_size&&l>=this.__indent_size&&(n=Math.floor(l/this.__indent_size),l-=n*this.__indent_size,o=new Array(n+1).join(this.__indent_string)),l&&(o+=new Array(l+1).join(" ")),this.__cache.push(o)};function d(l,n){this.__indent_cache=new p(l,n),this.raw=!1,this._end_with_newline=l.end_with_newline,this.indent_size=l.indent_size,this.wrap_line_length=l.wrap_line_length,this.indent_empty_lines=l.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new R(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}d.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},d.prototype.get_line_number=function(){return this.__lines.length},d.prototype.get_indent_string=function(l,n){return this.__indent_cache.get_indent_string(l,n)},d.prototype.get_indent_size=function(l,n){return this.__indent_cache.get_indent_size(l,n)},d.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},d.prototype.add_new_line=function(l){return this.is_empty()||!l&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},d.prototype.get_code=function(l){this.trim(!0);var n=this.current_line.pop();n&&(n[n.length-1]===`
`&&(n=n.replace(/\n+$/g,"")),this.current_line.push(n)),this._end_with_newline&&this.__add_outputline();var o=this.__lines.join(`
`);return l!==`
`&&(o=o.replace(/[\n]/g,l)),o},d.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},d.prototype.set_indent=function(l,n){return l=l||0,n=n||0,this.next_line.set_indent(l,n),this.__lines.length>1?(this.current_line.set_indent(l,n),!0):(this.current_line.set_indent(),!1)},d.prototype.add_raw_token=function(l){for(var n=0;n1&&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},d.prototype.just_added_newline=function(){return this.current_line.is_empty()},d.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},d.prototype.ensure_empty_line_above=function(l,n){for(var o=this.__lines.length-2;o>=0;){var u=this.__lines[o];if(u.is_empty())break;if(u.item(0).indexOf(l)!==0&&u.item(-1)!==n){this.__lines.splice(o+1,0,new R(this)),this.previous_line=this.__lines[this.__lines.length-2];break}o--}},e.exports.Output=d},function(e){function R(p,d,l,n){this.type=p,this.text=d,this.comments_before=null,this.newlines=l||0,this.whitespace_before=n||"",this.parent=null,this.next=null,this.previous=null,this.opened=null,this.closed=null,this.directives=null}e.exports.Token=R},function(e,R){var p="\\x23\\x24\\x40\\x41-\\x5a\\x5f\\x61-\\x7a",d="\\x24\\x30-\\x39\\x41-\\x5a\\x5f\\x61-\\x7a",l="\\xaa\\xb5\\xba\\xc0-\\xd6\\xd8-\\xf6\\xf8-\\u02c1\\u02c6-\\u02d1\\u02e0-\\u02e4\\u02ec\\u02ee\\u0370-\\u0374\\u0376\\u0377\\u037a-\\u037d\\u0386\\u0388-\\u038a\\u038c\\u038e-\\u03a1\\u03a3-\\u03f5\\u03f7-\\u0481\\u048a-\\u0527\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u05d0-\\u05ea\\u05f0-\\u05f2\\u0620-\\u064a\\u066e\\u066f\\u0671-\\u06d3\\u06d5\\u06e5\\u06e6\\u06ee\\u06ef\\u06fa-\\u06fc\\u06ff\\u0710\\u0712-\\u072f\\u074d-\\u07a5\\u07b1\\u07ca-\\u07ea\\u07f4\\u07f5\\u07fa\\u0800-\\u0815\\u081a\\u0824\\u0828\\u0840-\\u0858\\u08a0\\u08a2-\\u08ac\\u0904-\\u0939\\u093d\\u0950\\u0958-\\u0961\\u0971-\\u0977\\u0979-\\u097f\\u0985-\\u098c\\u098f\\u0990\\u0993-\\u09a8\\u09aa-\\u09b0\\u09b2\\u09b6-\\u09b9\\u09bd\\u09ce\\u09dc\\u09dd\\u09df-\\u09e1\\u09f0\\u09f1\\u0a05-\\u0a0a\\u0a0f\\u0a10\\u0a13-\\u0a28\\u0a2a-\\u0a30\\u0a32\\u0a33\\u0a35\\u0a36\\u0a38\\u0a39\\u0a59-\\u0a5c\\u0a5e\\u0a72-\\u0a74\\u0a85-\\u0a8d\\u0a8f-\\u0a91\\u0a93-\\u0aa8\\u0aaa-\\u0ab0\\u0ab2\\u0ab3\\u0ab5-\\u0ab9\\u0abd\\u0ad0\\u0ae0\\u0ae1\\u0b05-\\u0b0c\\u0b0f\\u0b10\\u0b13-\\u0b28\\u0b2a-\\u0b30\\u0b32\\u0b33\\u0b35-\\u0b39\\u0b3d\\u0b5c\\u0b5d\\u0b5f-\\u0b61\\u0b71\\u0b83\\u0b85-\\u0b8a\\u0b8e-\\u0b90\\u0b92-\\u0b95\\u0b99\\u0b9a\\u0b9c\\u0b9e\\u0b9f\\u0ba3\\u0ba4\\u0ba8-\\u0baa\\u0bae-\\u0bb9\\u0bd0\\u0c05-\\u0c0c\\u0c0e-\\u0c10\\u0c12-\\u0c28\\u0c2a-\\u0c33\\u0c35-\\u0c39\\u0c3d\\u0c58\\u0c59\\u0c60\\u0c61\\u0c85-\\u0c8c\\u0c8e-\\u0c90\\u0c92-\\u0ca8\\u0caa-\\u0cb3\\u0cb5-\\u0cb9\\u0cbd\\u0cde\\u0ce0\\u0ce1\\u0cf1\\u0cf2\\u0d05-\\u0d0c\\u0d0e-\\u0d10\\u0d12-\\u0d3a\\u0d3d\\u0d4e\\u0d60\\u0d61\\u0d7a-\\u0d7f\\u0d85-\\u0d96\\u0d9a-\\u0db1\\u0db3-\\u0dbb\\u0dbd\\u0dc0-\\u0dc6\\u0e01-\\u0e30\\u0e32\\u0e33\\u0e40-\\u0e46\\u0e81\\u0e82\\u0e84\\u0e87\\u0e88\\u0e8a\\u0e8d\\u0e94-\\u0e97\\u0e99-\\u0e9f\\u0ea1-\\u0ea3\\u0ea5\\u0ea7\\u0eaa\\u0eab\\u0ead-\\u0eb0\\u0eb2\\u0eb3\\u0ebd\\u0ec0-\\u0ec4\\u0ec6\\u0edc-\\u0edf\\u0f00\\u0f40-\\u0f47\\u0f49-\\u0f6c\\u0f88-\\u0f8c\\u1000-\\u102a\\u103f\\u1050-\\u1055\\u105a-\\u105d\\u1061\\u1065\\u1066\\u106e-\\u1070\\u1075-\\u1081\\u108e\\u10a0-\\u10c5\\u10c7\\u10cd\\u10d0-\\u10fa\\u10fc-\\u1248\\u124a-\\u124d\\u1250-\\u1256\\u1258\\u125a-\\u125d\\u1260-\\u1288\\u128a-\\u128d\\u1290-\\u12b0\\u12b2-\\u12b5\\u12b8-\\u12be\\u12c0\\u12c2-\\u12c5\\u12c8-\\u12d6\\u12d8-\\u1310\\u1312-\\u1315\\u1318-\\u135a\\u1380-\\u138f\\u13a0-\\u13f4\\u1401-\\u166c\\u166f-\\u167f\\u1681-\\u169a\\u16a0-\\u16ea\\u16ee-\\u16f0\\u1700-\\u170c\\u170e-\\u1711\\u1720-\\u1731\\u1740-\\u1751\\u1760-\\u176c\\u176e-\\u1770\\u1780-\\u17b3\\u17d7\\u17dc\\u1820-\\u1877\\u1880-\\u18a8\\u18aa\\u18b0-\\u18f5\\u1900-\\u191c\\u1950-\\u196d\\u1970-\\u1974\\u1980-\\u19ab\\u19c1-\\u19c7\\u1a00-\\u1a16\\u1a20-\\u1a54\\u1aa7\\u1b05-\\u1b33\\u1b45-\\u1b4b\\u1b83-\\u1ba0\\u1bae\\u1baf\\u1bba-\\u1be5\\u1c00-\\u1c23\\u1c4d-\\u1c4f\\u1c5a-\\u1c7d\\u1ce9-\\u1cec\\u1cee-\\u1cf1\\u1cf5\\u1cf6\\u1d00-\\u1dbf\\u1e00-\\u1f15\\u1f18-\\u1f1d\\u1f20-\\u1f45\\u1f48-\\u1f4d\\u1f50-\\u1f57\\u1f59\\u1f5b\\u1f5d\\u1f5f-\\u1f7d\\u1f80-\\u1fb4\\u1fb6-\\u1fbc\\u1fbe\\u1fc2-\\u1fc4\\u1fc6-\\u1fcc\\u1fd0-\\u1fd3\\u1fd6-\\u1fdb\\u1fe0-\\u1fec\\u1ff2-\\u1ff4\\u1ff6-\\u1ffc\\u2071\\u207f\\u2090-\\u209c\\u2102\\u2107\\u210a-\\u2113\\u2115\\u2119-\\u211d\\u2124\\u2126\\u2128\\u212a-\\u212d\\u212f-\\u2139\\u213c-\\u213f\\u2145-\\u2149\\u214e\\u2160-\\u2188\\u2c00-\\u2c2e\\u2c30-\\u2c5e\\u2c60-\\u2ce4\\u2ceb-\\u2cee\\u2cf2\\u2cf3\\u2d00-\\u2d25\\u2d27\\u2d2d\\u2d30-\\u2d67\\u2d6f\\u2d80-\\u2d96\\u2da0-\\u2da6\\u2da8-\\u2dae\\u2db0-\\u2db6\\u2db8-\\u2dbe\\u2dc0-\\u2dc6\\u2dc8-\\u2dce\\u2dd0-\\u2dd6\\u2dd8-\\u2dde\\u2e2f\\u3005-\\u3007\\u3021-\\u3029\\u3031-\\u3035\\u3038-\\u303c\\u3041-\\u3096\\u309d-\\u309f\\u30a1-\\u30fa\\u30fc-\\u30ff\\u3105-\\u312d\\u3131-\\u318e\\u31a0-\\u31ba\\u31f0-\\u31ff\\u3400-\\u4db5\\u4e00-\\u9fcc\\ua000-\\ua48c\\ua4d0-\\ua4fd\\ua500-\\ua60c\\ua610-\\ua61f\\ua62a\\ua62b\\ua640-\\ua66e\\ua67f-\\ua697\\ua6a0-\\ua6ef\\ua717-\\ua71f\\ua722-\\ua788\\ua78b-\\ua78e\\ua790-\\ua793\\ua7a0-\\ua7aa\\ua7f8-\\ua801\\ua803-\\ua805\\ua807-\\ua80a\\ua80c-\\ua822\\ua840-\\ua873\\ua882-\\ua8b3\\ua8f2-\\ua8f7\\ua8fb\\ua90a-\\ua925\\ua930-\\ua946\\ua960-\\ua97c\\ua984-\\ua9b2\\ua9cf\\uaa00-\\uaa28\\uaa40-\\uaa42\\uaa44-\\uaa4b\\uaa60-\\uaa76\\uaa7a\\uaa80-\\uaaaf\\uaab1\\uaab5\\uaab6\\uaab9-\\uaabd\\uaac0\\uaac2\\uaadb-\\uaadd\\uaae0-\\uaaea\\uaaf2-\\uaaf4\\uab01-\\uab06\\uab09-\\uab0e\\uab11-\\uab16\\uab20-\\uab26\\uab28-\\uab2e\\uabc0-\\uabe2\\uac00-\\ud7a3\\ud7b0-\\ud7c6\\ud7cb-\\ud7fb\\uf900-\\ufa6d\\ufa70-\\ufad9\\ufb00-\\ufb06\\ufb13-\\ufb17\\ufb1d\\ufb1f-\\ufb28\\ufb2a-\\ufb36\\ufb38-\\ufb3c\\ufb3e\\ufb40\\ufb41\\ufb43\\ufb44\\ufb46-\\ufbb1\\ufbd3-\\ufd3d\\ufd50-\\ufd8f\\ufd92-\\ufdc7\\ufdf0-\\ufdfb\\ufe70-\\ufe74\\ufe76-\\ufefc\\uff21-\\uff3a\\uff41-\\uff5a\\uff66-\\uffbe\\uffc2-\\uffc7\\uffca-\\uffcf\\uffd2-\\uffd7\\uffda-\\uffdc",n="\\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",o="(?:\\\\u[0-9a-fA-F]{4}|["+p+l+"])",u="(?:\\\\u[0-9a-fA-F]{4}|["+d+l+n+"])*";R.identifier=new RegExp(o+u,"g"),R.identifierStart=new RegExp(o),R.identifierMatch=new RegExp("(?:\\\\u[0-9a-fA-F]{4}|["+d+l+n+"])+");var a=/[\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff]/;R.newline=/[\n\r\u2028\u2029]/,R.lineBreak=new RegExp(`\r
|`+R.newline.source),R.allLineBreaks=new RegExp(R.lineBreak.source,"g")},function(e,R,p){var d=p(6).Options,l=["before-newline","after-newline","preserve-newline"];function n(o){d.call(this,o,"js");var u=this.raw_options.brace_style||null;u==="expand-strict"?this.raw_options.brace_style="expand":u==="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 r=0;r>> === !== &&= ??= ||= << && >= ** != == <= >> || ?? |> < / - + > : & % ? ^ | *".split(" "),m=">>>= ... >>= <<= === >>> !== **= &&= ??= ||= => ^= :: /= << <= == && -= >= >> != -- += ** || ?? ++ %= &= *= |= |> = ! ? > < : / ^ - + * & % ~ |";m=m.replace(/[-[\]{}()*+?.,\\^$|#]/g,"\\$&"),m="\\?\\.(?!\\d) "+m,m=m.replace(/ /g,"|");var s=new RegExp(m),g="continue,try,throw,return,var,let,const,if,switch,case,default,for,while,break,function,import,export".split(","),h=g.concat(["do","in","of","else","get","set","new","catch","finally","typeof","yield","async","await","from","as","class","extends"]),T=new RegExp("^(?:"+h.join("|")+")$"),y,w=function(L,S){l.call(this,L,S),this._patterns.whitespace=this._patterns.whitespace.matching(/\u00A0\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff/.source,/\u2028\u2029/.source);var D=new a(this._input),F=new r(this._input).read_options(this._options);this.__patterns={template:F,identifier:F.starting_with(u.identifier).matching(u.identifierMatch),number:D.matching(f),punct:D.matching(s),comment:D.starting_with(/\/\//).until(/[\n\r\u2028\u2029]/),block_comment:D.starting_with(/\/\*/).until_after(/\*\//),html_comment_start:D.matching(//),include:D.starting_with(/#include/).until_after(u.lineBreak),shebang:D.starting_with(/#!/).until_after(u.lineBreak),xml:D.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:F.until(/['\\\n\r\u2028\u2029]/),double_quote:F.until(/["\\\n\r\u2028\u2029]/),template_text:F.until(/[`\\$]/),template_expression:F.until(/[`}\\]/)}};w.prototype=new l,w.prototype._is_comment=function(L){return L.type===t.COMMENT||L.type===t.BLOCK_COMMENT||L.type===t.UNKNOWN},w.prototype._is_opening=function(L){return L.type===t.START_BLOCK||L.type===t.START_EXPR},w.prototype._is_closing=function(L,S){return(L.type===t.END_BLOCK||L.type===t.END_EXPR)&&S&&(L.text==="]"&&S.text==="["||L.text===")"&&S.text==="("||L.text==="}"&&S.text==="{")},w.prototype._reset=function(){y=!1},w.prototype._get_next_token=function(L,S){var D=null;this._readWhitespace();var F=this._input.peek();return F===null?this._create_token(t.EOF,""):(D=D||this._read_non_javascript(F),D=D||this._read_string(F),D=D||this._read_word(L),D=D||this._read_singles(F),D=D||this._read_comment(F),D=D||this._read_regexp(F,L),D=D||this._read_xml(F,L),D=D||this._read_punctuation(),D=D||this._create_token(t.UNKNOWN,this._input.next()),D)},w.prototype._read_word=function(L){var S;if(S=this.__patterns.identifier.read(),S!=="")return S=S.replace(u.allLineBreaks,`
`),!(L.type===t.DOT||L.type===t.RESERVED&&(L.text==="set"||L.text==="get"))&&T.test(S)?(S==="in"||S==="of")&&(L.type===t.WORD||L.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)},w.prototype._read_singles=function(L){var S=null;return L==="("||L==="["?S=this._create_token(t.START_EXPR,L):L===")"||L==="]"?S=this._create_token(t.END_EXPR,L):L==="{"?S=this._create_token(t.START_BLOCK,L):L==="}"?S=this._create_token(t.END_BLOCK,L):L===";"?S=this._create_token(t.SEMICOLON,L):L==="."&&x.test(this._input.peek(1))?S=this._create_token(t.DOT,L):L===","&&(S=this._create_token(t.COMMA,L)),S&&this._input.next(),S},w.prototype._read_punctuation=function(){var L=this.__patterns.punct.read();if(L!=="")return L==="="?this._create_token(t.EQUALS,L):L==="?."?this._create_token(t.DOT,L):this._create_token(t.OPERATOR,L)},w.prototype._read_non_javascript=function(L){var S="";if(L==="#"){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()+`
`);L=this._input.next();var D="#";if(this._input.hasNext()&&this._input.testChar(v)){do L=this._input.next(),D+=L;while(this._input.hasNext()&&L!=="#"&&L!=="=");return L==="#"||(this._input.peek()==="["&&this._input.peek(1)==="]"?(D+="[]",this._input.next(),this._input.next()):this._input.peek()==="{"&&this._input.peek(1)==="}"&&(D+="{}",this._input.next(),this._input.next())),this._create_token(t.WORD,D)}this._input.back()}else if(L==="<"&&this._is_first_token()){if(S=this.__patterns.html_comment_start.read(),S){for(;this._input.hasNext()&&!this._input.testChar(u.newline);)S+=this._input.next();return y=!0,this._create_token(t.COMMENT,S)}}else if(y&&L==="-"&&(S=this.__patterns.html_comment_end.read(),S))return y=!1,this._create_token(t.COMMENT,S);return null},w.prototype._read_comment=function(L){var S=null;if(L==="/"){var D="";if(this._input.peek(1)==="*"){D=this.__patterns.block_comment.read();var F=_.get_directives(D);F&&F.ignore==="start"&&(D+=_.readIgnored(this._input)),D=D.replace(u.allLineBreaks,`
`),S=this._create_token(t.BLOCK_COMMENT,D),S.directives=F}else this._input.peek(1)==="/"&&(D=this.__patterns.comment.read(),S=this._create_token(t.COMMENT,D))}return S},w.prototype._read_string=function(L){if(L==="`"||L==="'"||L==='"'){var S=this._input.next();return this.has_char_escapes=!1,L==="`"?S+=this._read_string_recursive("`",!0,"${"):S+=this._read_string_recursive(L),this.has_char_escapes&&this._options.unescape_strings&&(S=P(S)),this._input.peek()===L&&(S+=this._input.next()),S=S.replace(u.allLineBreaks,`
`),this._create_token(t.STRING,S)}return null},w.prototype._allow_regexp_or_xml=function(L){return L.type===t.RESERVED&&i(L.text,["return","case","throw","else","do","typeof","yield"])||L.type===t.END_EXPR&&L.text===")"&&L.opened.previous.type===t.RESERVED&&i(L.opened.previous.text,["if","while","for"])||i(L.type,[t.COMMENT,t.START_EXPR,t.START_BLOCK,t.START,t.END_BLOCK,t.OPERATOR,t.EQUALS,t.EOF,t.SEMICOLON,t.COMMA])},w.prototype._read_regexp=function(L,S){if(L==="/"&&this._allow_regexp_or_xml(S)){for(var D=this._input.next(),F=!1,O=!1;this._input.hasNext()&&(F||O||this._input.peek()!==L)&&!this._input.testChar(u.newline);)D+=this._input.peek(),F?F=!1:(F=this._input.peek()==="\\",this._input.peek()==="["?O=!0:this._input.peek()==="]"&&(O=!1)),this._input.next();return this._input.peek()===L&&(D+=this._input.next(),D+=this._input.read(u.identifier)),this._create_token(t.STRING,D)}return null},w.prototype._read_xml=function(L,S){if(this._options.e4x&&L==="<"&&this._allow_regexp_or_xml(S)){var D="",F=this.__patterns.xml.read_match();if(F){for(var O=F[2].replace(/^{\s+/,"{").replace(/\s+}$/,"}"),W=O.indexOf("{")===0,z=0;F;){var Q=!!F[1],q=F[2],me=!!F[F.length-1]||q.slice(0,8)==="![CDATA[";if(!me&&(q===O||W&&q.replace(/^{\s+/,"{").replace(/\s+}$/,"}"))&&(Q?--z:++z),D+=F[0],z<=0)break;F=this.__patterns.xml.read_match()}return F||(D+=this._input.match(/[\s\S]*/g)[0]),D=D.replace(u.allLineBreaks,`
`),this._create_token(t.STRING,D)}}return null};function P(L){for(var S="",D=0,F=new d(L),O=null;F.hasNext();)if(O=F.match(/([\s]|[^\\]|\\\\)+/g),O&&(S+=O[0]),F.peek()==="\\"){if(F.next(),F.peek()==="x")O=F.match(/x([0-9A-Fa-f]{2})/g);else if(F.peek()==="u")O=F.match(/u([0-9A-Fa-f]{4})/g);else{S+="\\",F.hasNext()&&(S+=F.next());continue}if(!O)return L;if(D=parseInt(O[1],16),D>126&&D<=255&&O[0].indexOf("x")===0)return L;if(D>=0&&D<32){S+="\\"+O[0];continue}else D===34||D===39||D===92?S+="\\"+String.fromCharCode(D):S+=String.fromCharCode(D)}return S}w.prototype._read_string_recursive=function(L,S,D){var F,O;L==="'"?O=this.__patterns.single_quote:L==='"'?O=this.__patterns.double_quote:L==="`"?O=this.__patterns.template_text:L==="}"&&(O=this.__patterns.template_expression);for(var W=O.read(),z="";this._input.hasNext();){if(z=this._input.next(),z===L||!S&&u.newline.test(z)){this._input.back();break}else z==="\\"&&this._input.hasNext()?(F=this._input.peek(),F==="x"||F==="u"?this.has_char_escapes=!0:F==="\r"&&this._input.peek(1)===`
`&&this._input.next(),z+=this._input.next()):D&&(D==="${"&&z==="$"&&this._input.peek()==="{"&&(z+=this._input.next()),D===z&&(L==="`"?z+=this._read_string_recursive("}",S,"`"):z+=this._read_string_recursive("`",S,"${"),this._input.hasNext()&&(z+=this._input.next())));z+=O.read(),W+=z}return W},e.exports.Tokenizer=w,e.exports.TOKEN=t,e.exports.positionable_operators=b.slice(),e.exports.line_starters=g.slice()},function(e){var R=RegExp.prototype.hasOwnProperty("sticky");function p(d){this.__input=d||"",this.__input_length=this.__input.length,this.__position=0}p.prototype.restart=function(){this.__position=0},p.prototype.back=function(){this.__position>0&&(this.__position-=1)},p.prototype.hasNext=function(){return this.__position=0&&d=0&&l=d.length&&this.__input.substring(l-d.length,l).toLowerCase()===d},e.exports.InputScanner=p},function(e,R,p){var d=p(8).InputScanner,l=p(3).Token,n=p(10).TokenStream,o=p(11).WhitespacePattern,u={START:"TK_START",RAW:"TK_RAW",EOF:"TK_EOF"},a=function(r,i){this._input=new d(r),this._options=i||{},this.__tokens=null,this._patterns={},this._patterns.whitespace=new o(this._input)};a.prototype.tokenize=function(){this._input.restart(),this.__tokens=new n,this._reset();for(var r,i=new l(u.START,""),t=null,_=[],f=new n;i.type!==u.EOF;){for(r=this._get_next_token(i,t);this._is_comment(r);)f.add(r),r=this._get_next_token(i,t);f.isEmpty()||(r.comments_before=f,f=new n),r.parent=t,this._is_opening(r)?(_.push(t),t=r):t&&this._is_closing(r,t)&&(r.opened=t,t.closed=r,t=_.pop(),r.parent=t),r.previous=i,i.next=r,this.__tokens.add(r),i=r}return this.__tokens},a.prototype._is_first_token=function(){return this.__tokens.isEmpty()},a.prototype._reset=function(){},a.prototype._get_next_token=function(r,i){this._readWhitespace();var t=this._input.read(/.+/g);return t?this._create_token(u.RAW,t):this._create_token(u.EOF,"")},a.prototype._is_comment=function(r){return!1},a.prototype._is_opening=function(r){return!1},a.prototype._is_closing=function(r,i){return!1},a.prototype._create_token=function(r,i){var t=new l(r,i,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=u},function(e){function R(p){this.__tokens=[],this.__tokens_length=this.__tokens.length,this.__position=0,this.__parent_token=p}R.prototype.restart=function(){this.__position=0},R.prototype.isEmpty=function(){return this.__tokens_length===0},R.prototype.hasNext=function(){return this.__position=0&&p/),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}/)}}n.prototype=new d,n.prototype._create=function(){return new n(this._input,this)},n.prototype._update=function(){this.__set_templated_pattern()},n.prototype.disable=function(o){var u=this._create();return u._disabled[o]=!0,u._update(),u},n.prototype.read_options=function(o){var u=this._create();for(var a in l)u._disabled[a]=o.templating.indexOf(a)===-1;return u._update(),u},n.prototype.exclude=function(o){var u=this._create();return u._excluded[o]=!0,u._update(),u},n.prototype.read=function(){var o="";this._match_pattern?o=this._input.read(this._starting_pattern):o=this._input.read(this._starting_pattern,this.__template_pattern);for(var u=this._read_template();u;)this._match_pattern?u+=this._input.read(this._match_pattern):u+=this._input.readUntil(this.__template_pattern),o+=u,u=this._read_template();return this._until_after&&(o+=this._input.readUntilAfter(this._until_pattern)),o},n.prototype.__set_templated_pattern=function(){var o=[];this._disabled.php||o.push(this.__patterns.php._starting_pattern.source),this._disabled.handlebars||o.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.erb||o.push(this.__patterns.erb._starting_pattern.source),this._disabled.django||(o.push(this.__patterns.django._starting_pattern.source),o.push(this.__patterns.django_value._starting_pattern.source),o.push(this.__patterns.django_comment._starting_pattern.source)),this._disabled.smarty||o.push(this.__patterns.smarty._starting_pattern.source),this._until_pattern&&o.push(this._until_pattern.source),this.__template_pattern=this._input.get_regexp("(?:"+o.join("|")+")")},n.prototype._read_template=function(){var o="",u=this._input.peek();if(u==="<"){var a=this._input.peek(1);!this._disabled.php&&!this._excluded.php&&a==="?"&&(o=o||this.__patterns.php.read()),!this._disabled.erb&&!this._excluded.erb&&a==="%"&&(o=o||this.__patterns.erb.read())}else u==="{"&&(!this._disabled.handlebars&&!this._excluded.handlebars&&(o=o||this.__patterns.handlebars_comment.read(),o=o||this.__patterns.handlebars_unescaped.read(),o=o||this.__patterns.handlebars.read()),this._disabled.django||(!this._excluded.django&&!this._excluded.handlebars&&(o=o||this.__patterns.django_value.read()),this._excluded.django||(o=o||this.__patterns.django_comment.read(),o=o||this.__patterns.django.read())),this._disabled.smarty||this._disabled.django&&this._disabled.handlebars&&(o=o||this.__patterns.smarty_comment.read(),o=o||this.__patterns.smarty_literal.read(),o=o||this.__patterns.smarty.read()));return o},e.exports.TemplatablePattern=n}],I={};function H(e){var R=I[e];if(R!==void 0)return R.exports;var p=I[e]={exports:{}};return C[e](p,p.exports,H),p.exports}var U=H(0);A=U})();var B=A;!(te=[],j=function(){return{js_beautify:B}}.apply(le,te),j!==void 0&&(Ze.exports=j))})()},"746U":function(Ze,le,K){"use strict";K.d(le,"f",function(){return te}),K.d(le,"l",function(){return j}),K.d(le,"k",function(){return A}),K.d(le,"j",function(){return B}),K.d(le,"g",function(){return C}),K.d(le,"m",function(){return I}),K.d(le,"h",function(){return H}),K.d(le,"n",function(){return U}),K.d(le,"c",function(){return e}),K.d(le,"a",function(){return R}),K.d(le,"i",function(){return p}),K.d(le,"o",function(){return d}),K.d(le,"e",function(){return o}),K.d(le,"d",function(){return u}),K.d(le,"p",function(){return a}),K.d(le,"b",function(){return r});function te(i){return Array.isArray(i)}function j(i){return typeof i=="string"}function A(i){return typeof i=="object"&&i!==null&&!Array.isArray(i)&&!(i instanceof RegExp)&&!(i instanceof Date)}function B(i){return typeof i=="number"&&!isNaN(i)}function C(i){return i===!0||i===!1}function I(i){return typeof i=="undefined"}function H(i){return!U(i)}function U(i){return I(i)||i===null}function e(i,t){if(!i)throw new Error(t?`Unexpected type, expected '${t}'`:"Unexpected type")}function R(i){if(U(i))throw new Error("Assertion Failed: argument is undefined or null");return i}function p(i){return typeof i=="function"}function d(i,t){const _=Math.min(i.length,t.length);for(let f=0;f<_;f++)l(i[f],t[f])}function l(i,t){if(j(t)){if(typeof i!==t)throw new Error(`argument does not match constraint: typeof ${t}`)}else if(p(t)){try{if(i instanceof t)return}catch(_){}if(!U(i)&&i.constructor===t)return;if(t.length===1&&t.call(void 0,i)===!0)return;throw new Error("argument does not match one of these constraints: arg instanceof constraint, arg.constructor === constraint, nor constraint(arg) === true")}}function n(i){let t=[],_=Object.getPrototypeOf(i);for(;Object.prototype!==_;)t=t.concat(Object.getOwnPropertyNames(_)),_=Object.getPrototypeOf(_);return t}function o(i){const t=[];for(const _ of n(i))typeof i[_]=="function"&&t.push(_);return t}function u(i,t){const _=v=>function(){const x=Array.prototype.slice.call(arguments,0);return t(v,x)};let f={};for(const v of i)f[v]=_(v);return f}function a(i){return i===null?void 0:i}function r(i,t="Unreachable"){throw new Error(t)}},"7iMQ":function(Ze,le,K){Ze.exports={flex_box_center:"flex_box_center___2gbXl",flex_space_between:"flex_space_between___1wCja",flex_box_vertical_center:"flex_box_vertical_center___1SR9W",flex_box_center_end:"flex_box_center_end___iQrwG",flex_box_column:"flex_box_column___1FzsI",bg:"bg___Fnp9V",containerTitle:"containerTitle___3SWYr",containerDesc:"containerDesc___1vOga",listItem:"listItem___3Ygyv",info:"info___q0zEQ",title:"title___1lfph",titleLeft:"titleLeft___YAW8a",titleRight:"titleRight___24IYl",acitons:"acitons___1eW6L"}},"8HAY":function(Ze,le,K){"use strict";K.d(le,"a",function(){return C}),K.d(le,"b",function(){return I}),K.d(le,"d",function(){return H}),K.d(le,"e",function(){return U}),K.d(le,"c",function(){return e});var te=K("MI8n"),j=K("pmY6"),A=K("3/fG"),B=function(R,p,d,l){function n(o){return o instanceof d?o:new d(function(u){u(o)})}return new(d||(d=Promise))(function(o,u){function a(t){try{i(l.next(t))}catch(_){u(_)}}function r(t){try{i(l.throw(t))}catch(_){u(_)}}function i(t){t.done?o(t.value):n(t.value).then(a,r)}i((l=l.apply(R,p||[])).next())})};class C extends j.a{constructor(R,p="",d="",l=!0,n){super();this._onDidChange=this._register(new te.b),this.onDidChange=this._onDidChange.event,this._enabled=!0,this._id=R,this._label=p,this._cssClass=d,this._enabled=l,this._actionCallback=n}get id(){return this._id}get label(){return this._label}set label(R){this._setLabel(R)}_setLabel(R){this._label!==R&&(this._label=R,this._onDidChange.fire({label:R}))}get tooltip(){return this._tooltip||""}set tooltip(R){this._setTooltip(R)}_setTooltip(R){this._tooltip!==R&&(this._tooltip=R,this._onDidChange.fire({tooltip:R}))}get class(){return this._cssClass}set class(R){this._setClass(R)}_setClass(R){this._cssClass!==R&&(this._cssClass=R,this._onDidChange.fire({class:R}))}get enabled(){return this._enabled}set enabled(R){this._setEnabled(R)}_setEnabled(R){this._enabled!==R&&(this._enabled=R,this._onDidChange.fire({enabled:R}))}get checked(){return this._checked}set checked(R){this._setChecked(R)}_setChecked(R){this._checked!==R&&(this._checked=R,this._onDidChange.fire({checked:R}))}run(R,p){return B(this,void 0,void 0,function*(){this._actionCallback&&(yield this._actionCallback(R))})}}class I extends j.a{constructor(){super(...arguments);this._onBeforeRun=this._register(new te.b),this.onBeforeRun=this._onBeforeRun.event,this._onDidRun=this._register(new te.b),this.onDidRun=this._onDidRun.event}run(R,p){return B(this,void 0,void 0,function*(){if(!R.enabled)return;this._onBeforeRun.fire({action:R});let d;try{yield this.runAction(R,p)}catch(l){d=l}this._onDidRun.fire({action:R,error:d})})}runAction(R,p){return B(this,void 0,void 0,function*(){yield R.run(p)})}}class H extends C{constructor(R){super(H.ID,R,R?"separator text":"separator");this.checked=!1,this.enabled=!1}}H.ID="vs.actions.separator";class U{constructor(R,p,d,l){this.tooltip="",this.enabled=!0,this.checked=!1,this.id=R,this.label=p,this.class=l,this._actions=d}get actions(){return this._actions}dispose(){}run(){return B(this,void 0,void 0,function*(){})}}class e extends C{constructor(){super(e.ID,A.a("submenu.empty","(empty)"),void 0,!1)}}e.ID="vs.actions.empty"},"8hTe":function(Ze,le,K){Ze.exports={button:"button___1wy9m"}},"9Bee":function(Ze,le,K){"use strict";var te=K("DYRE"),j=K("zeV3"),A=K("+L6B"),B=K("2/Rp"),C=K("k1fw"),I=K("9og8"),H=K("tJVT"),U=K("WmNS"),e=K.n(U),R=K("q1tI"),p=K.n(R),d=K("vg9a"),l=K("DlQD"),n=K.n(l),o=K("rUJ1");function u(M,c){var E=M.match(/^(\s+)(?:```)/);if(E===null)return c;var k=E[1];return c.split(`
`).map(function(G){var N=G.match(/^\s+/);if(N===null)return G;var ie=Object(H.a)(N,1),Ee=ie[0];return Ee.length>=k.length?G.slice(k.length):G}).join(`
`)}var a=[],r=[""],i=new n.a.Renderer,t=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function _(){a.length=0,r=[""]}var f={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function v(M,c,E,k){if(c>=M.length||M[c].level<=E)return c;var G=M[c];k.push("- "+G.text+""),c++;var N=[];return c=v(M,c,G.level,N),N.length>0&&(k.push("
"),N.forEach(function(ie){k.push(ie)}),k.push("
")),k.push(" "),c=v(M,c,E,k),c}function x(){return v(a,0,0,r),r.push("
"),r.join("")}var b={heading:function(c){var E=t.exec(c);if(E)return{type:"heading",raw:E[0],depth:E[1].length,text:E[2]}},fences:function(c){var E=this.rules.block.fences.exec(c);if(E){var k=E[0],G=u(k,E[3]||""),N=E[2]?E[2].trim():E[2];if(["latex","katex","math"].indexOf(N)>=0){var ie=g(),Ee=G;G=ie,h[ie]={type:"block",expression:Ee}}return{type:"code",raw:k,lang:N,text:G}}}},m=/(?:\${2})([^\n`]+?)(?:\${2})/gi,s=0,g=function(){return"__special_katext_id_".concat(s++,"__")},h={};function T(){return h}function y(){s=0,h={}}function w(M){return M=M.replace(m,function(c,E){var k=g();return h[k]={type:"inline",expression:E},k}),M}var P=i.listitem;i.listitem=function(M){return P(w(M))};var L=i.paragraph;i.paragraph=function(M){return L(w(M))};var S=i.tablecell;i.tablecell=function(M,c){return S(w(M),c)},i.code=function(M,c,E){var k=(c||"").match(/\S*/)[0];return k?["latex","katex","math"].indexOf(k)>=0?"".concat(M,"
"):'
').concat(E?M:Object(o.escape)(M,!0),`
`):''+(E?M:Object(o.escape)(M,!0))+"
"},i.heading=function(M,c,E){var k=this.options.headerPrefix+E.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return a.push({anchor:k,level:c,text:M}),"'+M+""},n.a.setOptions({silent:!0,gfm:!0,pedantic:!1}),n.a.use({tokenizer:b,renderer:i});var D=n.a,F=K("SJMd"),O=K("ulZh"),W=K.n(O),z=K("m3rI"),Q=K("Oy/b"),q=K("p5ED"),me=K("ErOA");/*! *****************************************************************************
Copyright (c) Microsoft Corporation.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */var he=function(M,c){return(he=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(E,k){E.__proto__=k}||function(E,k){for(var G in k)Object.prototype.hasOwnProperty.call(k,G)&&(E[G]=k[G])})(M,c)};function ce(M,c){function E(){this.constructor=M}he(M,c),M.prototype=c===null?Object.create(c):(E.prototype=c.prototype,new E)}function pe(M,c,E,k){return new(E||(E=Promise))(function(G,N){function ie($e){try{je(k.next($e))}catch(we){N(we)}}function Ee($e){try{je(k.throw($e))}catch(we){N(we)}}function je($e){var we;$e.done?G($e.value):(we=$e.value,we instanceof E?we:new E(function(nt){nt(we)})).then(ie,Ee)}je((k=k.apply(M,c||[])).next())})}function ge(M,c){var E,k,G,N,ie={label:0,sent:function(){if(1&G[0])throw G[1];return G[1]},trys:[],ops:[]};return N={next:Ee(0),throw:Ee(1),return:Ee(2)},typeof Symbol=="function"&&(N[Symbol.iterator]=function(){return this}),N;function Ee(je){return function($e){return function(we){if(E)throw new TypeError("Generator is already executing.");for(;ie;)try{if(E=1,k&&(G=2&we[0]?k.return:we[0]?k.throw||((G=k.return)&&G.call(k),0):k.next)&&!(G=G.call(k,we[1])).done)return G;switch(k=0,G&&(we=[2&we[0],G.value]),we[0]){case 0:case 1:G=we;break;case 4:return ie.label++,{value:we[1],done:!1};case 5:ie.label++,k=we[1],we=[0];continue;case 7:we=ie.ops.pop(),ie.trys.pop();continue;default:if(!(G=ie.trys,(G=G.length>0&&G[G.length-1])||we[0]!==6&&we[0]!==2)){ie=0;continue}if(we[0]===3&&(!G||we[1]>G[0]&&we[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(N){var ie=document.createElement("div");ie.className=""+E.toolbarButtonStyleClass.name,ie.setAttribute("data-type-name",N.typeName),ie.innerHTML=N.icon,ie.addEventListener("click",function(){E.markerToolbarButtonClicked(ie,N)}),E.buttons.push(ie),E.markerButtons.push(ie)}),this.overflowButton=document.createElement("div"),this.overflowButton.className=this.toolbarButtonStyleClass.name+" "+(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name),this.overflowButton.innerHTML='',this.overflowButton.addEventListener("click",this.overflowButtonClicked),this.markerButtonBlock.appendChild(this.overflowButton));var G=document.createElement("div");G.className=this.toolbarBlockStyleClass.name,G.style.whiteSpace="nowrap",G.style.display=this.uiStyleSettings.resultButtonBlockVisible!==!1?"":"none",this.uiContainer.appendChild(G),this.addActionButton(G,'',"render"),this.addActionButton(G,'',"close"),this.markerjsContainer.appendChild(this.uiContainer),this.setSelectMode(),this.setCurrentMarker(),this.adjustLayout()},M.prototype.addButtonClickListener=function(c){this.buttonClickListeners.push(c)},M.prototype.removeButtonClickListener=function(c){this.buttonClickListeners.indexOf(c)>-1&&this.buttonClickListeners.splice(this.buttonClickListeners.indexOf(c),1)},M.prototype.setSelectMode=function(){this.resetButtonStyles(),this.setActiveButton(this.buttons[0])},M.prototype.adjustLayout=function(){if(this.markerButtons&&this.markerButtons.length>0){var c=Math.floor(this.markerButtonBlock.clientWidth/this.uiStyleSettings.toolbarHeight)-1;this.markerButtonBlock.innerHTML="",this.markerButtonOverflowBlock.innerHTML="";for(var E=0;E0&&this.buttonClickListeners.forEach(function(k){return k("marker",E)}),this.markerButtonOverflowBlock.style.display="none"},M.prototype.actionToolbarButtonClicked=function(c,E){this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(k){return k("action",E)}),this.markerButtonOverflowBlock.style.display="none",this.setActiveButton(this.buttons[0])},M.prototype.setActiveButton=function(c){this.resetButtonStyles(),c.className=c.className.replace(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,"").trim(),c.className+=" "+(this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name)},M.prototype.setActiveMarkerButton=function(c){var E=this.markerButtons.find(function(k){return k.getAttribute("data-type-name")===c});E&&this.setActiveButton(E)},M.prototype.setCurrentMarker=function(c){var E=this;this.currentMarker=c,this.buttons.filter(function(k){return/delete|notes/.test(k.getAttribute("data-action"))}).forEach(function(k){E.currentMarker===void 0?(k.style.fillOpacity="0.4",k.style.pointerEvents="none"):(k.style.fillOpacity="1",k.style.pointerEvents="all")})},M}(),Se=function(){function M(c,E,k,G){this.panels=[],this.panelButtons=[],this.markerjsContainer=c,this.displayMode=E,this.uiStyleSettings=k,this.styles=G,this.panelButtonClick=this.panelButtonClick.bind(this),this.addStyles()}return M.prototype.addStyles=function(){var c;this.toolboxStyleClass=this.styles.addClass(new _e("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 _e("toolbox_colors",`
color: `+this.uiStyleSettings.toolboxColor+`;
`));var E=this.uiStyleSettings.toolbarHeight/4;this.toolboxButtonRowStyleClass=this.styles.addClass(new _e("toolbox-button-row",`
display: flex;
cursor: default;
box-sizing: content-box;
`)),this.toolboxButtonRowStyleColorsClass=this.styles.addClass(new _e("toolbox-button-row_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
`)),this.toolboxPanelRowStyleClass=this.styles.addClass(new _e("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 _e("toolbox-panel-row_colors",`
background-color: `+((c=this.uiStyleSettings.toolboxBackgroundColor)!==null&&c!==void 0?c:this.uiStyleSettings.toolbarBackgroundHoverColor)+`;
`)),this.toolboxButtonStyleClass=this.styles.addClass(new _e("toolbox_button",`
display: inline-block;
width: `+(this.uiStyleSettings.toolbarHeight-2*E)+`px;
height: `+(this.uiStyleSettings.toolbarHeight-2*E)+`px;
padding: `+E+`px;
box-sizing: content-box;
`)),this.toolboxButtonStyleColorsClass=this.styles.addClass(new _e("toolbox-button_colors",`
fill: `+this.uiStyleSettings.toolbarColor+`;
`)),this.toolboxActiveButtonStyleColorsClass=this.styles.addClass(new _e("toolbox-active-button_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`;
fill: `+this.uiStyleSettings.toolbarColor+`;
`)),this.styles.addRule(new He("."+this.toolboxButtonStyleColorsClass.name+":hover",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
`)),this.styles.addRule(new He("."+this.toolboxButtonStyleClass.name+" svg",`
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
`))},M.prototype.show=function(c){var E;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=c,this.uiContainer.className=this.toolboxStyleClass.name+" "+((E=this.uiStyleSettings.toolboxStyleColorsClassName)!==null&&E!==void 0?E:this.toolboxStyleColorsClass.name),this.markerjsContainer.appendChild(this.uiContainer)},M.prototype.setPanelButtons=function(c){var E,k,G=this;this.panels=c,this.uiContainer!==void 0&&(this.uiContainer.innerHTML="",this.panelRow=document.createElement("div"),this.panelRow.className=this.toolboxPanelRowStyleClass.name+" "+((E=this.uiStyleSettings.toolboxPanelRowStyleColorsClassName)!==null&&E!==void 0?E: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(N){var ie;N.uiStyleSettings=G.uiStyleSettings;var Ee=document.createElement("div");Ee.className=G.toolboxButtonStyleClass.name+" "+((ie=G.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&ie!==void 0?ie:G.toolboxButtonStyleColorsClass.name),Ee.innerHTML=N.icon,Ee.title=N.title,Ee.addEventListener("click",function(){G.panelButtonClick(N)}),G.panelButtons.push(Ee),G.buttonRow.appendChild(Ee)}),this.displayMode==="inline"?this.panelRow.style.display="none":this.panelRow.style.visibility="hidden")},M.prototype.panelButtonClick=function(c){var E=this,k=-1;if(c!==this.activePanel){k=this.panels.indexOf(c),this.panelRow.innerHTML="";var G=c.getUi();G.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.panelRow.appendChild(G),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=c}else this.activePanel=void 0,this.panelRow.className=this.panelRow.className.replace(this.styles.fadeInAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeOutAnimationClassName,setTimeout(function(){E.displayMode==="inline"?E.panelRow.style.display="none":E.panelRow.style.visibility="hidden"},200);this.panelButtons.forEach(function(N,ie){var Ee,je;N.className=E.toolboxButtonStyleClass.name+" "+(ie===k?""+((Ee=E.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)!==null&&Ee!==void 0?Ee:E.toolboxActiveButtonStyleColorsClass.name):""+((je=E.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&je!==void 0?je:E.toolboxButtonStyleColorsClass.name))})},M}(),X=function(M,c){this.title=M,this.icon=c},ne=function(M){function c(E,k,G,N){var ie=M.call(this,E,N||'')||this;return ie.colors=[],ie.addTransparent=!1,ie.colorBoxes=[],ie.colors=k,ie.currentColor=G,ie.setCurrentColor=ie.setCurrentColor.bind(ie),ie.getColorBox=ie.getColorBox.bind(ie),ie}return ce(c,M),c.prototype.getUi=function(){var E=this,k=document.createElement("div");return k.style.overflow="hidden",k.style.whiteSpace="nowrap",this.colors.forEach(function(G){var N=E.getColorBox(G);k.appendChild(N),E.colorBoxes.push(N)}),k},c.prototype.getColorBox=function(E){var k=this,G=this.uiStyleSettings.toolbarHeight/4,N=this.uiStyleSettings.toolbarHeight-G,ie=document.createElement("div");ie.style.display="inline-block",ie.style.boxSizing="content-box",ie.style.width=N-2+"px",ie.style.height=N-2+"px",ie.style.padding="1px",ie.style.marginRight="2px",ie.style.marginBottom="2px",ie.style.borderWidth="2px",ie.style.borderStyle="solid",ie.style.borderRadius=(N+2)/2+"px",ie.style.borderColor=E===this.currentColor?this.uiStyleSettings.toolboxAccentColor:"transparent",ie.addEventListener("click",function(){k.setCurrentColor(E,ie)});var Ee=document.createElement("div");return Ee.style.display="inline-block",Ee.style.width=N-2+"px",Ee.style.height=N-2+"px",Ee.style.backgroundColor=E,Ee.style.borderRadius=N/2+"px",E==="transparent"&&(Ee.style.fill=this.uiStyleSettings.toolboxAccentColor,Ee.innerHTML=``),ie.appendChild(Ee),ie},c.prototype.setCurrentColor=function(E,k){var G=this;this.currentColor=E,this.colorBoxes.forEach(function(N){N.style.borderColor=N===k?G.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onColorChanged&&this.onColorChanged(E)},c}(X),ue=function(){function M(c,E,k){this._state="new",this._isSelected=!1,this._container=c,this._overlayContainer=E,this.globalSettings=k,this.stateChanged=this.stateChanged.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this)}return Object.defineProperty(M.prototype,"typeName",{get:function(){return Object.getPrototypeOf(this).constructor.typeName},enumerable:!1,configurable:!0}),Object.defineProperty(M.prototype,"container",{get:function(){return this._container},enumerable:!1,configurable:!0}),Object.defineProperty(M.prototype,"overlayContainer",{get:function(){return this._overlayContainer},enumerable:!1,configurable:!0}),Object.defineProperty(M.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),Object.defineProperty(M.prototype,"toolboxPanels",{get:function(){return[]},enumerable:!1,configurable:!0}),M.prototype.ownsTarget=function(c){return!1},Object.defineProperty(M.prototype,"isSelected",{get:function(){return this._isSelected},enumerable:!1,configurable:!0}),M.prototype.select=function(){this.container.style.cursor="move",this._isSelected=!0,this.manipulationStartState=this.getState()},M.prototype.deselect=function(){this.container.style.cursor="default",this._isSelected=!1,this.stateChanged()},M.prototype.pointerDown=function(c,E){},M.prototype.dblClick=function(c,E){},M.prototype.manipulate=function(c){},M.prototype.pointerUp=function(c){this.stateChanged()},M.prototype.dispose=function(){},M.prototype.addMarkerVisualToContainer=function(c){this.container.childNodes.length>0?this.container.insertBefore(c,this.container.childNodes[0]):this.container.appendChild(c)},M.prototype.getState=function(){return{typeName:M.typeName,state:this.state,notes:this.notes}},M.prototype.restoreState=function(c){this._state=c.state,this.notes=c.notes},M.prototype.scale=function(c,E){},M.prototype.colorChanged=function(c){this.onColorChanged&&this.onColorChanged(c),this.stateChanged()},M.prototype.fillColorChanged=function(c){this.onFillColorChanged&&this.onFillColorChanged(c),this.stateChanged()},M.prototype.stateChanged=function(){if(this.onStateChanged&&this.state!=="creating"&&this.state!=="new"){var c=this.getState();this.manipulationStartState!==void 0&&(this.manipulationStartState.state="select"),c.state="select",JSON.stringify(this.manipulationStartState)!=JSON.stringify(c)&&this.onStateChanged(this)}},M.typeName="MarkerBase",M}(),de=function(){function M(){this.findGripByVisual=this.findGripByVisual.bind(this)}return M.prototype.findGripByVisual=function(c){return this.topLeft.ownsTarget(c)?this.topLeft:this.topCenter.ownsTarget(c)?this.topCenter:this.topRight.ownsTarget(c)?this.topRight:this.centerLeft.ownsTarget(c)?this.centerLeft:this.centerRight.ownsTarget(c)?this.centerRight:this.bottomLeft.ownsTarget(c)?this.bottomLeft:this.bottomCenter.ownsTarget(c)?this.bottomCenter:this.bottomRight.ownsTarget(c)?this.bottomRight:void 0},M}(),xe=function(){function M(){this.GRIP_SIZE=10,this.visual=J.createGroup(),this.visual.appendChild(J.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(J.createCircle(this.GRIP_SIZE,[["fill","#cccccc"],["fill-opacity","0.7"],["stroke","#333333"],["stroke-width","2"],["stroke-opacity","0.7"]]))}return M.prototype.ownsTarget=function(c){return c===this.visual||c===this.visual.childNodes[0]||c===this.visual.childNodes[1]},M}(),Te=function(){function M(){}return M.toITransformMatrix=function(c){return{a:c.a,b:c.b,c:c.c,d:c.d,e:c.e,f:c.f}},M.toSVGMatrix=function(c,E){return c.a=E.a,c.b=E.b,c.c=E.c,c.d=E.d,c.e=E.e,c.f=E.f,c},M}(),Le=function(M){function c(E,k,G){var N=M.call(this,E,k,G)||this;return N.left=0,N.top=0,N.width=0,N.height=0,N.defaultSize={x:50,y:20},N.offsetX=0,N.offsetY=0,N.rotationAngle=0,N.CB_DISTANCE=10,N._suppressMarkerCreateEvent=!1,N.container.transform.baseVal.appendItem(J.createTransform()),N.setupControlBox(),N}return ce(c,M),Object.defineProperty(c.prototype,"centerX",{get:function(){return this.left+this.width/2},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"centerY",{get:function(){return this.top+this.height/2},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"visual",{get:function(){return this._visual},set:function(E){this._visual=E;var k=J.createTransform();this._visual.transform.baseVal.appendItem(k)},enumerable:!1,configurable:!0}),c.prototype.ownsTarget=function(E){return!!M.prototype.ownsTarget.call(this,E)||!!(this.controlGrips.findGripByVisual(E)!==void 0||this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(E))},c.prototype.pointerDown=function(E,k){M.prototype.pointerDown.call(this,E,k),this.state==="new"&&(this.left=E.x,this.top=E.y),this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.manipulationStartWidth=this.width,this.manipulationStartHeight=this.height;var G=this.unrotatePoint(E);if(this.manipulationStartX=G.x,this.manipulationStartY=G.y,this.offsetX=G.x-this.left,this.offsetY=G.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 N=this.rotatePoint({x:this.centerX,y:this.centerY});this.left=N.x-this.width/2,this.top=N.y-this.height/2,this.moveVisual({x:this.left,y:this.top});var ie=this.container.transform.baseVal.getItem(0);ie.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(ie,0),this.adjustControlBox(),this._state="rotate"}else this._state="move"},c.prototype.pointerUp=function(E){var k=this.state;M.prototype.pointerUp.call(this,E),this.state==="creating"&&this.width<10&&this.height<10?(this.width=this.defaultSize.x,this.height=this.defaultSize.y):this.manipulate(E),this._state="select",k==="creating"&&this.onMarkerCreated&&this._suppressMarkerCreateEvent===!1&&this.onMarkerCreated(this)},c.prototype.moveVisual=function(E){this.visual.style.transform="translate("+E.x+"px, "+E.y+"px)"},c.prototype.manipulate=function(E){var k=this.unrotatePoint(E);this.state==="creating"?this.resize(E):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(E)},c.prototype.resize=function(E){var k=this.manipulationStartLeft,G=this.manipulationStartWidth,N=this.manipulationStartTop,ie=this.manipulationStartHeight;switch(this.activeGrip){case this.controlGrips.bottomLeft:case this.controlGrips.centerLeft:case this.controlGrips.topLeft:k=this.manipulationStartLeft+E.x-this.manipulationStartX,G=this.manipulationStartWidth+this.manipulationStartLeft-k;break;case this.controlGrips.bottomRight:case this.controlGrips.centerRight:case this.controlGrips.topRight:case void 0:G=this.manipulationStartWidth+E.x-this.manipulationStartX}switch(this.activeGrip){case this.controlGrips.topCenter:case this.controlGrips.topLeft:case this.controlGrips.topRight:N=this.manipulationStartTop+E.y-this.manipulationStartY,ie=this.manipulationStartHeight+this.manipulationStartTop-N;break;case this.controlGrips.bottomCenter:case this.controlGrips.bottomLeft:case this.controlGrips.bottomRight:case void 0:ie=this.manipulationStartHeight+E.y-this.manipulationStartY}G>=0?(this.left=k,this.width=G):(this.left=k+G,this.width=-G),ie>=0?(this.top=N,this.height=ie):(this.top=N+ie,this.height=-ie),this.setSize()},c.prototype.setSize=function(){this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()},c.prototype.rotate=function(E){if(Math.abs(E.x-this.centerX)>.1){var k=Math.sign(E.x-this.centerX);this.rotationAngle=180*Math.atan((E.y-this.centerY)/(E.x-this.centerX))/Math.PI+90*k,this.applyRotation()}},c.prototype.applyRotation=function(){var E=this.container.transform.baseVal.getItem(0);E.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(E,0)},c.prototype.rotatePoint=function(E){if(this.rotationAngle===0)return E;var k=this.container.getCTM(),G=J.createPoint(E.x,E.y);return{x:(G=G.matrixTransform(k)).x,y:G.y}},c.prototype.unrotatePoint=function(E){if(this.rotationAngle===0)return E;var k=this.container.getCTM();k=k.inverse();var G=J.createPoint(E.x,E.y);return{x:(G=G.matrixTransform(k)).x,y:G.y}},c.prototype.select=function(){M.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},c.prototype.deselect=function(){M.prototype.deselect.call(this),this.controlBox.style.display="none"},c.prototype.setupControlBox=function(){this.controlBox=J.createGroup();var E=J.createTransform();E.setTranslate(-this.CB_DISTANCE/2,-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.appendItem(E),this.container.appendChild(this.controlBox),this.controlRect=J.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=J.createLine((this.width+2*this.CB_DISTANCE)/2,this.top-this.CB_DISTANCE,(this.width+2*this.CB_DISTANCE)/2,this.top-3*this.CB_DISTANCE,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.controlBox.appendChild(this.rotatorGripLine)),this.controlGrips=new de,this.addControlGrips(),this.controlBox.style.display="none"},c.prototype.adjustControlBox=function(){var E=this.controlBox.transform.baseVal.getItem(0);E.setTranslate(this.left-this.CB_DISTANCE/2,this.top-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.replaceItem(E,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()},c.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()},c.prototype.createGrip=function(){var E=new xe;return E.visual.transform.baseVal.appendItem(J.createTransform()),this.controlBox.appendChild(E.visual),E},c.prototype.positionGrips=function(){var E=this.controlGrips.topLeft.GRIP_SIZE,k=-E/2,G=k,N=(this.width+this.CB_DISTANCE)/2-E/2,ie=(this.height+this.CB_DISTANCE)/2-E/2,Ee=this.height+this.CB_DISTANCE-E/2,je=this.width+this.CB_DISTANCE-E/2;this.positionGrip(this.controlGrips.topLeft.visual,k,G),this.positionGrip(this.controlGrips.topCenter.visual,N,G),this.positionGrip(this.controlGrips.topRight.visual,je,G),this.positionGrip(this.controlGrips.centerLeft.visual,k,ie),this.positionGrip(this.controlGrips.centerRight.visual,je,ie),this.positionGrip(this.controlGrips.bottomLeft.visual,k,Ee),this.positionGrip(this.controlGrips.bottomCenter.visual,N,Ee),this.positionGrip(this.controlGrips.bottomRight.visual,je,Ee),this.rotatorGrip!==void 0&&this.positionGrip(this.rotatorGrip.visual,N,G-3*this.CB_DISTANCE)},c.prototype.positionGrip=function(E,k,G){var N=E.transform.baseVal.getItem(0);N.setTranslate(k,G),E.transform.baseVal.replaceItem(N,0)},c.prototype.hideControlBox=function(){this.controlBox.style.display="none"},c.prototype.showControlBox=function(){this.controlBox.style.display=""},c.prototype.getState=function(){return Object.assign({left:this.left,top:this.top,width:this.width,height:this.height,rotationAngle:this.rotationAngle,visualTransformMatrix:Te.toITransformMatrix(this.visual.transform.baseVal.getItem(0).matrix),containerTransformMatrix:Te.toITransformMatrix(this.container.transform.baseVal.getItem(0).matrix)},M.prototype.getState.call(this))},c.prototype.restoreState=function(E){M.prototype.restoreState.call(this,E);var k=E;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(Te.toSVGMatrix(this.visual.transform.baseVal.getItem(0).matrix,k.visualTransformMatrix)),this.container.transform.baseVal.getItem(0).setMatrix(Te.toSVGMatrix(this.container.transform.baseVal.getItem(0).matrix,k.containerTransformMatrix))},c.prototype.scale=function(E,k){M.prototype.scale.call(this,E,k);var G=this.rotatePoint({x:this.left,y:this.top}),N=this.unrotatePoint({x:G.x*E,y:G.y*k});this.left=N.x,this.top=N.y,this.width=this.width*E,this.height=this.height*k,this.adjustControlBox()},c}(ue),Pe=function(M){function c(E,k,G){var N=M.call(this,E,k,G)||this;return N.fillColor="transparent",N.strokeColor="transparent",N.strokeWidth=0,N.strokeDasharray="",N.opacity=1,N.setStrokeColor=N.setStrokeColor.bind(N),N.setFillColor=N.setFillColor.bind(N),N.setStrokeWidth=N.setStrokeWidth.bind(N),N.setStrokeDasharray=N.setStrokeDasharray.bind(N),N.createVisual=N.createVisual.bind(N),N}return ce(c,M),c.prototype.ownsTarget=function(E){return!(!M.prototype.ownsTarget.call(this,E)&&E!==this.visual)},c.prototype.createVisual=function(){this.visual=J.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)},c.prototype.pointerDown=function(E,k){M.prototype.pointerDown.call(this,E,k),this.state==="new"&&(this.createVisual(),this.moveVisual(E),this._state="creating")},c.prototype.manipulate=function(E){M.prototype.manipulate.call(this,E)},c.prototype.resize=function(E){M.prototype.resize.call(this,E),this.setSize()},c.prototype.setSize=function(){M.prototype.setSize.call(this),J.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]])},c.prototype.pointerUp=function(E){M.prototype.pointerUp.call(this,E),this.setSize()},c.prototype.setStrokeColor=function(E){this.strokeColor=E,this.visual&&J.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(E),this.stateChanged()},c.prototype.setFillColor=function(E){this.fillColor=E,this.visual&&J.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},c.prototype.setStrokeWidth=function(E){this.strokeWidth=E,this.visual&&J.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},c.prototype.setStrokeDasharray=function(E){this.strokeDasharray=E,this.visual&&J.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},c.prototype.getState=function(){return Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},M.prototype.getState.call(this))},c.prototype.restoreState=function(E){var k=E;this.fillColor=k.fillColor,this.strokeColor=k.strokeColor,this.strokeWidth=k.strokeWidth,this.strokeDasharray=k.strokeDasharray,this.opacity=k.opacity,this.createVisual(),M.prototype.restoreState.call(this,E),this.setSize()},c.prototype.scale=function(E,k){M.prototype.scale.call(this,E,k),this.setSize()},c.title="Rectangle marker",c}(Le),oe=function(M){function c(E,k,G,N){var ie=M.call(this,E,N||'')||this;return ie.widths=[],ie.widthBoxes=[],ie.widths=k,ie.currentWidth=G,ie.setCurrentWidth=ie.setCurrentWidth.bind(ie),ie}return ce(c,M),c.prototype.getUi=function(){var E=this,k=document.createElement("div");return k.style.display="flex",k.style.overflow="hidden",k.style.flexGrow="2",this.widths.forEach(function(G){var N=document.createElement("div");N.style.display="flex",N.style.flexGrow="2",N.style.alignItems="center",N.style.justifyContent="space-between",N.style.padding="5px",N.style.borderWidth="2px",N.style.borderStyle="solid",N.style.borderColor=G===E.currentWidth?E.uiStyleSettings.toolboxAccentColor:"transparent",N.addEventListener("click",function(){E.setCurrentWidth(G,N)}),k.appendChild(N);var ie=document.createElement("div");ie.innerText=G.toString(),ie.style.marginRight="5px",N.appendChild(ie);var Ee=document.createElement("div");Ee.style.minHeight="20px",Ee.style.flexGrow="2",Ee.style.display="flex",Ee.style.alignItems="center";var je=document.createElement("hr");je.style.minWidth="20px",je.style.border="0px",je.style.borderTop=G+"px solid "+E.uiStyleSettings.toolboxColor,je.style.flexGrow="2",Ee.appendChild(je),N.appendChild(Ee),E.widthBoxes.push(N)}),k},c.prototype.setCurrentWidth=function(E,k){var G=this;this.currentWidth=E,this.widthBoxes.forEach(function(N){N.style.borderColor=N===k?G.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},c}(X),ke=function(M){function c(E,k,G,N){var ie=M.call(this,E,N||'')||this;return ie.styles=[],ie.styleBoxes=[],ie.styles=k,ie.currentStyle=G,ie.setCurrentStyle=ie.setCurrentStyle.bind(ie),ie}return ce(c,M),c.prototype.getUi=function(){var E=this,k=document.createElement("div");return k.style.display="flex",k.style.overflow="hidden",k.style.flexGrow="2",this.styles.forEach(function(G){var N=document.createElement("div");N.style.display="flex",N.style.alignItems="center",N.style.justifyContent="space-between",N.style.padding="5px",N.style.borderWidth="2px",N.style.borderStyle="solid",N.style.overflow="hidden",N.style.maxWidth=100/E.styles.length-5+"%",N.style.borderColor=G===E.currentStyle?E.uiStyleSettings.toolboxAccentColor:"transparent",N.addEventListener("click",function(){E.setCurrentStyle(G,N)}),k.appendChild(N);var ie=document.createElement("div");ie.style.minHeight="20px",ie.style.flexGrow="2",ie.style.overflow="hidden";var Ee=``;ie.innerHTML=Ee,N.appendChild(ie),E.styleBoxes.push(N)}),k},c.prototype.setCurrentStyle=function(E,k){var G=this;this.currentStyle=E,this.styleBoxes.forEach(function(N){N.style.borderColor=N===k?G.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},c}(X),De=function(M){function c(E,k,G){var N=M.call(this,E,k,G)||this;return N.strokeColor=G.defaultColor,N.strokeWidth=G.defaultStrokeWidth,N.strokeDasharray=G.defaultStrokeDasharray,N.strokePanel=new ne("Line color",G.defaultColorSet,G.defaultColor),N.strokePanel.onColorChanged=N.setStrokeColor,N.strokeWidthPanel=new oe("Line width",G.defaultStrokeWidths,G.defaultStrokeWidth),N.strokeWidthPanel.onWidthChanged=N.setStrokeWidth,N.strokeStylePanel=new ke("Line style",G.defaultStrokeDasharrays,G.defaultStrokeDasharray),N.strokeStylePanel.onStyleChanged=N.setStrokeDasharray,N}return ce(c,M),Object.defineProperty(c.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),c.prototype.getState=function(){var E=M.prototype.getState.call(this);return E.typeName=c.typeName,E},c.typeName="FrameMarker",c.title="Frame marker",c.icon='',c}(Pe),Ce=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},Ge=function(M){function c(E,k,G){var N=M.call(this,E,k,G)||this;return N.x1=0,N.y1=0,N.x2=0,N.y2=0,N.defaultLength=50,N.manipulationStartX=0,N.manipulationStartY=0,N.manipulationStartX1=0,N.manipulationStartY1=0,N.manipulationStartX2=0,N.manipulationStartY2=0,N.setupControlBox(),N}return ce(c,M),c.prototype.ownsTarget=function(E){return!!M.prototype.ownsTarget.call(this,E)||!(!this.grip1.ownsTarget(E)&&!this.grip2.ownsTarget(E))},c.prototype.pointerDown=function(E,k){M.prototype.pointerDown.call(this,E,k),this.manipulationStartX=E.x,this.manipulationStartY=E.y,this.state==="new"&&(this.x1=E.x,this.y1=E.y,this.x2=E.x,this.y2=E.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")},c.prototype.pointerUp=function(E){var k=this.state;M.prototype.pointerUp.call(this,E),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(E),this._state="select",k==="creating"&&this.onMarkerCreated&&this.onMarkerCreated(this)},c.prototype.adjustVisual=function(){},c.prototype.manipulate=function(E){this.state==="creating"?this.resize(E):this.state==="move"?(this.x1=this.manipulationStartX1+E.x-this.manipulationStartX,this.y1=this.manipulationStartY1+E.y-this.manipulationStartY,this.x2=this.manipulationStartX2+E.x-this.manipulationStartX,this.y2=this.manipulationStartY2+E.y-this.manipulationStartY,this.adjustVisual(),this.adjustControlBox()):this.state==="resize"&&this.resize(E)},c.prototype.resize=function(E){switch(this.activeGrip){case this.grip1:this.x1=E.x,this.y1=E.y;break;case this.grip2:case void 0:this.x2=E.x,this.y2=E.y}this.adjustVisual(),this.adjustControlBox()},c.prototype.select=function(){M.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},c.prototype.deselect=function(){M.prototype.deselect.call(this),this.controlBox.style.display="none"},c.prototype.setupControlBox=function(){this.controlBox=J.createGroup(),this.container.appendChild(this.controlBox),this.addControlGrips(),this.controlBox.style.display="none"},c.prototype.adjustControlBox=function(){this.positionGrips()},c.prototype.addControlGrips=function(){this.grip1=this.createGrip(),this.grip2=this.createGrip(),this.positionGrips()},c.prototype.createGrip=function(){var E=new xe;return E.visual.transform.baseVal.appendItem(J.createTransform()),this.controlBox.appendChild(E.visual),E},c.prototype.positionGrips=function(){var E=this.grip1.GRIP_SIZE;this.positionGrip(this.grip1.visual,this.x1-E/2,this.y1-E/2),this.positionGrip(this.grip2.visual,this.x2-E/2,this.y2-E/2)},c.prototype.positionGrip=function(E,k,G){var N=E.transform.baseVal.getItem(0);N.setTranslate(k,G),E.transform.baseVal.replaceItem(N,0)},c.prototype.getState=function(){return Object.assign({x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2},M.prototype.getState.call(this))},c.prototype.restoreState=function(E){M.prototype.restoreState.call(this,E);var k=E;this.x1=k.x1,this.y1=k.y1,this.x2=k.x2,this.y2=k.y2},c.prototype.scale=function(E,k){M.prototype.scale.call(this,E,k),this.x1=this.x1*E,this.y1=this.y1*k,this.x2=this.x2*E,this.y2=this.y2*k,this.adjustVisual(),this.adjustControlBox()},c}(ue),Be=function(M){function c(E,k,G){var N=M.call(this,E,k,G)||this;return N.strokeColor="transparent",N.strokeWidth=0,N.strokeDasharray="",N.setStrokeColor=N.setStrokeColor.bind(N),N.setStrokeWidth=N.setStrokeWidth.bind(N),N.setStrokeDasharray=N.setStrokeDasharray.bind(N),N.strokeColor=G.defaultColor,N.strokeWidth=G.defaultStrokeWidth,N.strokeDasharray=G.defaultStrokeDasharray,N.strokePanel=new ne("Line color",G.defaultColorSet,G.defaultColor),N.strokePanel.onColorChanged=N.setStrokeColor,N.strokeWidthPanel=new oe("Line width",G.defaultStrokeWidths,G.defaultStrokeWidth),N.strokeWidthPanel.onWidthChanged=N.setStrokeWidth,N.strokeStylePanel=new ke("Line style",G.defaultStrokeDasharrays,G.defaultStrokeDasharray),N.strokeStylePanel.onStyleChanged=N.setStrokeDasharray,N}return ce(c,M),c.prototype.ownsTarget=function(E){return!(!M.prototype.ownsTarget.call(this,E)&&E!==this.visual&&E!==this.selectorLine&&E!==this.visibleLine)},c.prototype.createVisual=function(){this.visual=J.createGroup(),this.selectorLine=J.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()]]),this.visibleLine=J.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)},c.prototype.pointerDown=function(E,k){M.prototype.pointerDown.call(this,E,k),this.state==="new"&&(this.createVisual(),this.adjustVisual(),this._state="creating")},c.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()),J.setAttributes(this.visibleLine,[["stroke",this.strokeColor]]),J.setAttributes(this.visibleLine,[["stroke-width",this.strokeWidth.toString()]]),J.setAttributes(this.visibleLine,[["stroke-dasharray",this.strokeDasharray.toString()]]))},c.prototype.setStrokeColor=function(E){this.strokeColor=E,this.adjustVisual(),this.colorChanged(E)},c.prototype.setStrokeWidth=function(E){this.strokeWidth=E,this.adjustVisual()},c.prototype.setStrokeDasharray=function(E){this.strokeDasharray=E,this.adjustVisual(),this.stateChanged()},Object.defineProperty(c.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),c.prototype.getState=function(){var E=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray},M.prototype.getState.call(this));return E.typeName=c.typeName,E},c.prototype.restoreState=function(E){M.prototype.restoreState.call(this,E);var k=E;this.strokeColor=k.strokeColor,this.strokeWidth=k.strokeWidth,this.strokeDasharray=k.strokeDasharray,this.createVisual(),this.adjustVisual()},c.typeName="LineMarker",c.title="Line marker",c.icon='',c}(Ge),ve=function(M){function c(E,k,G,N){var ie=M.call(this,E,N||'')||this;return ie.fonts=[],ie.fontBoxes=[],ie.fonts=k,ie.currentFont=G,ie.setCurrentFont=ie.setCurrentFont.bind(ie),ie}return ce(c,M),c.prototype.getUi=function(){var E=this,k=document.createElement("div");return k.style.overflow="hidden",k.style.flexGrow="2",this.fonts.forEach(function(G){var N=document.createElement("div");N.style.display="inline-block",N.style.alignItems="center",N.style.justifyContent="space-between",N.style.padding="5px",N.style.borderWidth="2px",N.style.borderStyle="solid",N.style.overflow="hidden",N.style.maxWidth=100/E.fonts.length-5+"%",N.style.borderColor=G===E.currentFont?E.uiStyleSettings.toolboxAccentColor:"transparent",N.addEventListener("click",function(){E.setCurrentFont(G,N)}),k.appendChild(N);var ie=document.createElement("div");ie.style.display="flex",ie.style.minHeight="20px",ie.style.flexGrow="2",ie.style.fontFamily=G,ie.style.overflow="hidden";var Ee=document.createElement("div");Ee.style.whiteSpace="nowrap",Ee.style.overflow="hidden",Ee.style.textOverflow="ellipsis",Ee.innerHTML="The quick brown fox jumps over the lazy dog",ie.appendChild(Ee),N.appendChild(ie),E.fontBoxes.push(N)}),k},c.prototype.setCurrentFont=function(E,k){var G=this;this.currentFont=E,this.fontBoxes.forEach(function(N){N.style.borderColor=N===k?G.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onFontChanged&&this.onFontChanged(this.currentFont)},c}(X),be=function(M){function c(E,k,G){var N=M.call(this,E,k,G)||this;return N.color="transparent",N.padding=5,N.DEFAULT_TEXT="your text here",N.text=N.DEFAULT_TEXT,N.isMoved=!1,N.color=G.defaultColor,N.fontFamily=G.defaultFontFamily,N.defaultSize={x:100,y:30},N.setColor=N.setColor.bind(N),N.setFont=N.setFont.bind(N),N.renderText=N.renderText.bind(N),N.sizeText=N.sizeText.bind(N),N.textEditDivClicked=N.textEditDivClicked.bind(N),N.showTextEditor=N.showTextEditor.bind(N),N.setSize=N.setSize.bind(N),N.positionTextEditor=N.positionTextEditor.bind(N),N.colorPanel=new ne("Color",G.defaultColorSet,G.defaultColor),N.colorPanel.onColorChanged=N.setColor,N.fontFamilyPanel=new ve("Font",G.defaultFontFamilies,G.defaultFontFamily),N.fontFamilyPanel.onFontChanged=N.setFont,N}return ce(c,M),c.prototype.ownsTarget=function(E){if(M.prototype.ownsTarget.call(this,E)||E===this.visual||E===this.textElement||E===this.bgRectangle)return!0;var k=!1;return this.textElement.childNodes.forEach(function(G){G===E&&(k=!0)}),k},c.prototype.createVisual=function(){this.visual=J.createGroup(),this.bgRectangle=J.createRect(1,1,[["fill","transparent"]]),this.visual.appendChild(this.bgRectangle),this.textElement=J.createText([["fill",this.color],["font-family",this.fontFamily],["font-size","16px"],["x","0"],["y","0"]]),this.textElement.transform.baseVal.appendItem(J.createTransform()),this.textElement.transform.baseVal.appendItem(J.createTransform()),this.visual.appendChild(this.textElement),this.addMarkerVisualToContainer(this.visual),this.renderText()},c.prototype.pointerDown=function(E,k){M.prototype.pointerDown.call(this,E,k),this.isMoved=!1,this.pointerDownPoint=E,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(E),this._state="creating")},c.prototype.renderText=function(){var E=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){E.textElement.appendChild(J.createTSpan(k.trim()===""?" ":k.trim(),[["x","0"],["dy","1.2em"]]))}),setTimeout(this.sizeText,10)}},c.prototype.getTextScale=function(){var E=this.textElement.getBBox(),k=1;if(E.width>0&&E.height>0){var G=(1*this.width-this.width*this.padding*2/100)/E.width,N=(1*this.height-this.height*this.padding*2/100)/E.height;k=Math.min(G,N)}return k},c.prototype.getTextPosition=function(E){var k=this.textElement.getBBox(),G=0,N=0;return k.width>0&&k.height>0&&(G=(this.width-k.width*E)/2,N=this.height/2-k.height*E/2),{x:G,y:N}},c.prototype.sizeText=function(){var E=this.textElement.getBBox(),k=this.getTextScale(),G=this.getTextPosition(k);G.y-=E.y*k,navigator.userAgent.indexOf("Edge/")>-1?this.textElement.style.transform="translate("+G.x+"px, "+G.y+"px) scale("+k+", "+k+")":(this.textElement.transform.baseVal.getItem(0).setTranslate(G.x,G.y),this.textElement.transform.baseVal.getItem(1).setScale(k,k))},c.prototype.manipulate=function(E){M.prototype.manipulate.call(this,E),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(E.x-this.pointerDownPoint.x)>5||Math.abs(E.y-this.pointerDownPoint.y)>5)},c.prototype.resize=function(E){M.prototype.resize.call(this,E),this.isMoved=!0,this.setSize(),this.sizeText()},c.prototype.setSize=function(){M.prototype.setSize.call(this),this.visual&&this.bgRectangle&&(J.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),J.setAttributes(this.bgRectangle,[["width",this.width.toString()],["height",this.height.toString()]]))},c.prototype.pointerUp=function(E){var k=this.state;k==="creating"&&(this._suppressMarkerCreateEvent=!0),M.prototype.pointerUp.call(this,E),this.setSize(),(k==="creating"||!this.isMoved&&Date.now()-this.pointerDownTimestamp>500)&&this.showTextEditor(),this.pointerDownPoint=void 0},c.prototype.showTextEditor=function(){var E=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(E.textEditor.style.fontSize);E.textEditor.clientWidth>=Number.parseInt(E.textEditor.style.maxWidth)&&k>.9;)k-=.1,E.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 G=k.clipboardData.getData("text"),N=window.getSelection();if(!N.rangeCount)return!1;N.deleteFromDocument(),N.getRangeAt(0).insertNode(document.createTextNode(G)),k.preventDefault()}}),this.textEditDiv.addEventListener("pointerup",function(){E.textEditDivClicked(E.textEditor.innerText)}),this.textEditDiv.appendChild(this.textEditor),this.overlayContainer.appendChild(this.textEditDiv),this.hideVisual(),this.textEditor.focus(),document.execCommand("selectAll")},c.prototype.positionTextEditor=function(){if(this.state==="edit")if(this.textEditor===void 0)this.showTextEditor();else{this.textElement.style.display="";var E=this.getTextScale(),k=this.rotatePoint({x:this.left+this.width/2,y:this.top+this.height/2}),G=this.textElement.getBBox(),N={x:G.width*E,y:G.height*E};k.x-=N.x/2,k.y-=N.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*E,12)+"px",this.textElement.style.display="none"}},c.prototype.textEditDivClicked=function(E){this.text=E.trim(),this.overlayContainer.innerHTML="",this.renderText(),this.showVisual(),this._suppressMarkerCreateEvent&&(this._suppressMarkerCreateEvent=!1,this.onMarkerCreated&&this.onMarkerCreated(this)),this.stateChanged()},c.prototype.select=function(){M.prototype.select.call(this),this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText)},c.prototype.deselect=function(){this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText),M.prototype.deselect.call(this)},c.prototype.dblClick=function(E,k){M.prototype.dblClick.call(this,E,k),this.showTextEditor()},c.prototype.setColor=function(E){this.textElement&&J.setAttributes(this.textElement,[["fill",E]]),this.color=E,this.textEditor&&(this.textEditor.style.color=this.color),this.colorChanged(E)},c.prototype.setFont=function(E){this.textElement&&J.setAttributes(this.textElement,[["font-family",E]]),this.fontFamily=E,this.textEditor&&(this.textEditor.style.fontFamily=this.fontFamily),this.renderText(),this.stateChanged()},c.prototype.hideVisual=function(){this.textElement.style.display="none",this.hideControlBox()},c.prototype.showVisual=function(){this.state==="edit"&&(this._state="select"),this.textElement.style.display="",this.showControlBox()},Object.defineProperty(c.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),c.prototype.getState=function(){var E=Object.assign({color:this.color,fontFamily:this.fontFamily,padding:this.padding,text:this.text},M.prototype.getState.call(this));return E.typeName=c.typeName,E},c.prototype.restoreState=function(E){var k=E;this.color=k.color,this.fontFamily=k.fontFamily,this.padding=k.padding,this.text=k.text,this.createVisual(),M.prototype.restoreState.call(this,E),this.setSize()},c.prototype.scale=function(E,k){M.prototype.scale.call(this,E,k),this.setSize(),this.sizeText(),this.positionTextEditor()},c.typeName="TextMarker",c.title="Text marker",c.icon='',c}(Le),se=function(M){function c(E,k,G){var N=M.call(this,E,k,G)||this;return N.color="transparent",N.lineWidth=3,N.drawing=!1,N.pixelRatio=1,N.color=G.defaultColor,N.lineWidth=G.defaultStrokeWidth,N.pixelRatio=G.freehandPixelRatio,N.setColor=N.setColor.bind(N),N.addCanvas=N.addCanvas.bind(N),N.finishCreation=N.finishCreation.bind(N),N.setLineWidth=N.setLineWidth.bind(N),N.colorPanel=new ne("Color",G.defaultColorSet,G.defaultColor),N.colorPanel.onColorChanged=N.setColor,N.lineWidthPanel=new oe("Line width",G.defaultStrokeWidths,G.defaultStrokeWidth),N.lineWidthPanel.onWidthChanged=N.setLineWidth,N}return ce(c,M),c.prototype.ownsTarget=function(E){return!(!M.prototype.ownsTarget.call(this,E)&&E!==this.visual&&E!==this.drawingImage)},c.prototype.createVisual=function(){this.visual=J.createGroup(),this.drawingImage=J.createImage(),this.visual.appendChild(this.drawingImage);var E=J.createTransform();this.visual.transform.baseVal.appendItem(E),this.addMarkerVisualToContainer(this.visual)},c.prototype.pointerDown=function(E,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(E.x,E.y),this.drawing=!0):M.prototype.pointerDown.call(this,E,k)},c.prototype.manipulate=function(E){this.state==="creating"?this.drawing&&(this.canvasContext.lineTo(E.x,E.y),this.canvasContext.stroke()):M.prototype.manipulate.call(this,E)},c.prototype.resize=function(E){M.prototype.resize.call(this,E),J.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),J.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]])},c.prototype.pointerUp=function(E){this._state==="creating"?this.drawing&&(this.canvasContext.closePath(),this.drawing=!1,this.globalSettings.newFreehandMarkerOnPointerUp&&this.finishCreation()):M.prototype.pointerUp.call(this,E)},c.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)},c.prototype.select=function(){this.state==="creating"&&this.finishCreation(),M.prototype.select.call(this)},c.prototype.deselect=function(){this.state==="creating"&&this.finishCreation(),M.prototype.deselect.call(this)},c.prototype.finishCreation=function(){for(var E=this.canvasContext.getImageData(0,0,this.canvasElement.width,this.canvasElement.height),k=[this.canvasElement.width+1,this.canvasElement.height+1,-1,-1],G=k[0],N=k[1],ie=k[2],Ee=k[3],je=!1,$e=0;$e0&&(je=!0,$eEe&&(Ee=$e),we>ie&&(ie=we));if(je){this.left=G/this.pixelRatio,this.top=N/this.pixelRatio,this.width=(ie-G)/this.pixelRatio,this.height=(Ee-N)/this.pixelRatio;var nt=document.createElement("canvas");nt.width=ie-G,nt.height=Ee-N,nt.getContext("2d").putImageData(this.canvasContext.getImageData(G,N,ie-G,Ee-N),0,0),this.drawingImgUrl=nt.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},c.prototype.setDrawingImage=function(){J.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]]),J.setAttributes(this.drawingImage,[["href",this.drawingImgUrl]]),this.moveVisual({x:this.left,y:this.top})},c.prototype.setColor=function(E){this.color=E,this.colorChanged(E)},c.prototype.setLineWidth=function(E){this.lineWidth=E},Object.defineProperty(c.prototype,"toolboxPanels",{get:function(){return this.state==="new"||this.state==="creating"?[this.colorPanel,this.lineWidthPanel]:[]},enumerable:!1,configurable:!0}),c.prototype.getState=function(){var E=Object.assign({drawingImgUrl:this.drawingImgUrl},M.prototype.getState.call(this));return E.typeName=c.typeName,E},c.prototype.restoreState=function(E){this.createVisual(),M.prototype.restoreState.call(this,E),this.drawingImgUrl=E.drawingImgUrl,this.setDrawingImage()},c.prototype.scale=function(E,k){M.prototype.scale.call(this,E,k),this.setDrawingImage()},c.typeName="FreehandMarker",c.title="Freehand marker",c.icon='',c}(Le),re=function(M){function c(E,k,G){var N=M.call(this,E,G||'')||this;return N.typeBoxes=[],N.currentType=k,N.setCurrentType=N.setCurrentType.bind(N),N}return ce(c,M),c.prototype.getUi=function(){var E=this,k=document.createElement("div");k.style.display="flex",k.style.overflow="hidden",k.style.flexGrow="2";for(var G=function(Ee){var je="both";switch(Ee){case 0:je="both";break;case 1:je="start";break;case 2:je="end";break;case 3:je="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=je===N.currentType?N.uiStyleSettings.toolboxAccentColor:"transparent",$e.addEventListener("click",function(){E.setCurrentType(je,$e)}),k.appendChild($e),je==="both"||je==="start"){var we=document.createElement("div");we.style.display="flex",we.style.alignItems="center",we.style.minHeight="20px",we.innerHTML=``,we.style.marginLeft="5px",$e.appendChild(we)}var nt=document.createElement("div");nt.style.display="flex",nt.style.alignItems="center",nt.style.minHeight="20px",nt.style.flexGrow="2";var _t=document.createElement("hr");if(_t.style.minWidth="20px",_t.style.border="0px",_t.style.borderTop="3px solid "+(N.uiStyleSettings!==void 0?N.uiStyleSettings.toolboxColor:"#eeeeee"),_t.style.flexGrow="2",nt.appendChild(_t),$e.appendChild(nt),je==="both"||je==="end"){var Tt=document.createElement("div");Tt.style.display="flex",Tt.style.alignItems="center",Tt.style.minHeight="20px",Tt.innerHTML=``,Tt.style.marginRight="5px",$e.appendChild(Tt)}N.typeBoxes.push($e)},N=this,ie=0;ie<4;ie++)G(ie);return k},c.prototype.setCurrentType=function(E,k){var G=this;this.currentType=E,this.typeBoxes.forEach(function(N){N.style.borderColor=N===k?G.uiStyleSettings!==void 0?G.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"}),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},c}(X),ae=function(M){function c(E,k,G){var N=M.call(this,E,k,G)||this;return N.arrowType="end",N.arrowBaseHeight=10,N.arrowBaseWidth=10,N.getArrowPoints=N.getArrowPoints.bind(N),N.setArrowType=N.setArrowType.bind(N),N.arrowTypePanel=new re("Arrow type","end"),N.arrowTypePanel.onArrowTypeChanged=N.setArrowType,N}return ce(c,M),c.prototype.ownsTarget=function(E){return!(!M.prototype.ownsTarget.call(this,E)&&E!==this.arrow1&&E!==this.arrow2)},c.prototype.getArrowPoints=function(E,k){var G=this.arrowBaseWidth+2*this.strokeWidth,N=this.arrowBaseHeight+2*this.strokeWidth;return E-G/2+","+(k+N/2)+" "+E+","+(k-N/2)+" "+(E+G/2)+","+(k+N/2)},c.prototype.createTips=function(){this.arrow1=J.createPolygon(this.getArrowPoints(this.x1,this.y1),[["fill",this.strokeColor]]),this.arrow1.transform.baseVal.appendItem(J.createTransform()),this.visual.appendChild(this.arrow1),this.arrow2=J.createPolygon(this.getArrowPoints(this.x2,this.y2),[["fill",this.strokeColor]]),this.arrow2.transform.baseVal.appendItem(J.createTransform()),this.visual.appendChild(this.arrow2)},c.prototype.pointerDown=function(E,k){M.prototype.pointerDown.call(this,E,k),this.state==="creating"&&this.createTips()},c.prototype.adjustVisual=function(){if(M.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",J.setAttributes(this.arrow1,[["points",this.getArrowPoints(this.x1,this.y1)],["fill",this.strokeColor]]),J.setAttributes(this.arrow2,[["points",this.getArrowPoints(this.x2,this.y2)],["fill",this.strokeColor]]),Math.abs(this.x1-this.x2)>.1)){var E=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(E,this.x1,this.y1),this.arrow1.transform.baseVal.replaceItem(k,0);var G=this.arrow2.transform.baseVal.getItem(0);G.setRotate(E+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(G,0)}},c.prototype.setArrowType=function(E){this.arrowType=E,this.adjustVisual(),this.stateChanged()},Object.defineProperty(c.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel,this.arrowTypePanel]},enumerable:!1,configurable:!0}),c.prototype.getState=function(){var E=Object.assign({arrowType:this.arrowType},M.prototype.getState.call(this));return E.typeName=c.typeName,E},c.prototype.restoreState=function(E){M.prototype.restoreState.call(this,E);var k=E;this.arrowType=k.arrowType,this.createTips(),this.adjustVisual()},c.typeName="ArrowMarker",c.title="Arrow marker",c.icon='',c}(Be),V=function(M){function c(E,k,G){var N=M.call(this,E,k,G)||this;return N.fillColor=G.defaultFillColor,N.strokeWidth=0,N.fillPanel=new ne("Color",G.defaultColorSet,G.defaultFillColor),N.fillPanel.onColorChanged=N.setFillColor,N}return ce(c,M),Object.defineProperty(c.prototype,"toolboxPanels",{get:function(){return[this.fillPanel]},enumerable:!1,configurable:!0}),c.prototype.getState=function(){var E=M.prototype.getState.call(this);return E.typeName=c.typeName,E},c.typeName="CoverMarker",c.title="Cover marker",c.icon='',c}(Pe),Y=function(M){function c(E,k,G,N){var ie=M.call(this,E,N||'')||this;return ie.opacities=[],ie.opacityBoxes=[],ie.opacities=k,ie.currentOpacity=G,ie.setCurrentOpacity=ie.setCurrentOpacity.bind(ie),ie}return ce(c,M),c.prototype.getUi=function(){var E=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(G){var N=document.createElement("div");N.style.display="flex",N.style.alignItems="center",N.style.justifyContent="center",N.style.padding="5px",N.style.borderWidth="2px",N.style.borderStyle="solid",N.style.borderColor=G===E.currentOpacity?E.uiStyleSettings.toolboxAccentColor:"transparent",N.addEventListener("click",function(){E.setCurrentOpacity(G,N)}),k.appendChild(N);var ie=document.createElement("div");ie.innerText=100*G+"%",N.appendChild(ie),E.opacityBoxes.push(N)}),k},c.prototype.setCurrentOpacity=function(E,k){var G=this;this.currentOpacity=E,this.opacityBoxes.forEach(function(N){N.style.borderColor=N===k?G.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},c}(X),$=function(M){function c(E,k,G){var N=M.call(this,E,k,G)||this;return N.setOpacity=N.setOpacity.bind(N),N.fillColor=G.defaultHighlightColor,N.strokeWidth=0,N.opacity=G.defaultHighlightOpacity,N.fillPanel=new ne("Color",G.defaultColorSet,N.fillColor),N.fillPanel.onColorChanged=N.setFillColor,N.opacityPanel=new Y("Opacity",G.defaultOpacitySteps,N.opacity),N.opacityPanel.onOpacityChanged=N.setOpacity,N}return ce(c,M),c.prototype.setOpacity=function(E){this.opacity=E,this.visual&&J.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(c.prototype,"toolboxPanels",{get:function(){return[this.fillPanel,this.opacityPanel]},enumerable:!1,configurable:!0}),c.prototype.getState=function(){var E=M.prototype.getState.call(this);return E.typeName=c.typeName,E},c.typeName="HighlightMarker",c.title="Highlight marker",c.icon='',c}(V),Z='',fe=function(M){function c(E,k,G){var N=M.call(this,E,k,G)||this;return N.bgColor="transparent",N.tipPosition={x:0,y:0},N.tipBase1Position={x:0,y:0},N.tipBase2Position={x:0,y:0},N.tipMoving=!1,N.color=G.defaultStrokeColor,N.bgColor=G.defaultFillColor,N.fontFamily=G.defaultFontFamily,N.defaultSize={x:100,y:30},N.setBgColor=N.setBgColor.bind(N),N.getTipPoints=N.getTipPoints.bind(N),N.positionTip=N.positionTip.bind(N),N.setTipPoints=N.setTipPoints.bind(N),N.colorPanel=new ne("Text color",G.defaultColorSet,N.color,''),N.colorPanel.onColorChanged=N.setColor,N.bgColorPanel=new ne("Fill color",G.defaultColorSet,N.bgColor,Z),N.bgColorPanel.onColorChanged=N.setBgColor,N.fontFamilyPanel=new ve("Font",G.defaultFontFamilies,G.defaultFontFamily),N.fontFamilyPanel.onFontChanged=N.setFont,N.tipGrip=new xe,N.tipGrip.visual.transform.baseVal.appendItem(J.createTransform()),N.controlBox.appendChild(N.tipGrip.visual),N}return ce(c,M),c.prototype.ownsTarget=function(E){return M.prototype.ownsTarget.call(this,E)||this.tipGrip.ownsTarget(E)||this.tip===E},c.prototype.createTip=function(){J.setAttributes(this.bgRectangle,[["fill",this.bgColor],["rx","10px"]]),this.tip=J.createPolygon(this.getTipPoints(),[["fill",this.bgColor]]),this.visual.appendChild(this.tip)},c.prototype.pointerDown=function(E,k){this.state==="new"&&M.prototype.pointerDown.call(this,E,k),this.state==="creating"?this.createTip():this.tipGrip.ownsTarget(k)?(this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.tipMoving=!0):M.prototype.pointerDown.call(this,E,k)},c.prototype.pointerUp=function(E){if(this.tipMoving)this.tipMoving=!1,this.isMoved=!0,M.prototype.pointerUp.call(this,E);else{var k=this.state==="creating";M.prototype.pointerUp.call(this,E),this.setTipPoints(k),this.positionTip()}},c.prototype.manipulate=function(E){if(this.tipMoving){var k=this.unrotatePoint(E);this.tipPosition={x:k.x-this.manipulationStartLeft,y:k.y-this.manipulationStartTop},this.positionTip()}else M.prototype.manipulate.call(this,E)},c.prototype.setBgColor=function(E){this.bgRectangle&&this.tip&&(J.setAttributes(this.bgRectangle,[["fill",E]]),J.setAttributes(this.tip,[["fill",E]])),this.bgColor=E,this.fillColorChanged(E)},c.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},c.prototype.setTipPoints=function(E){E===void 0&&(E=!1);var k=Math.min(this.height/2,15),G=this.height/5;E&&(this.tipPosition={x:k+G/2,y:this.height+20});var N=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?N',c}(be),ye=function(M){function c(E,k,G){var N=M.call(this,E,k,G)||this;return N.fillColor="transparent",N.strokeColor="transparent",N.strokeWidth=0,N.strokeDasharray="",N.opacity=1,N.strokeColor=G.defaultColor,N.strokeWidth=G.defaultStrokeWidth,N.strokeDasharray=G.defaultStrokeDasharray,N.fillColor=G.defaultFillColor,N.setStrokeColor=N.setStrokeColor.bind(N),N.setFillColor=N.setFillColor.bind(N),N.setStrokeWidth=N.setStrokeWidth.bind(N),N.setStrokeDasharray=N.setStrokeDasharray.bind(N),N.setOpacity=N.setOpacity.bind(N),N.createVisual=N.createVisual.bind(N),N.strokePanel=new ne("Line color",ee(G.defaultColorSet,["transparent"]),G.defaultColor),N.strokePanel.onColorChanged=N.setStrokeColor,N.fillPanel=new ne("Fill color",ee(G.defaultColorSet,["transparent"]),N.fillColor,Z),N.fillPanel.onColorChanged=N.setFillColor,N.strokeWidthPanel=new oe("Line width",G.defaultStrokeWidths,G.defaultStrokeWidth),N.strokeWidthPanel.onWidthChanged=N.setStrokeWidth,N.strokeStylePanel=new ke("Line style",G.defaultStrokeDasharrays,G.defaultStrokeDasharray),N.strokeStylePanel.onStyleChanged=N.setStrokeDasharray,N.opacityPanel=new Y("Opacity",G.defaultOpacitySteps,N.opacity),N.opacityPanel.onOpacityChanged=N.setOpacity,N}return ce(c,M),c.prototype.ownsTarget=function(E){return!(!M.prototype.ownsTarget.call(this,E)&&E!==this.visual)},c.prototype.createVisual=function(){this.visual=J.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)},c.prototype.pointerDown=function(E,k){M.prototype.pointerDown.call(this,E,k),this.state==="new"&&(this.createVisual(),this.moveVisual(E),this._state="creating")},c.prototype.manipulate=function(E){M.prototype.manipulate.call(this,E)},c.prototype.resize=function(E){M.prototype.resize.call(this,E),this.setSize()},c.prototype.setSize=function(){M.prototype.setSize.call(this),J.setAttributes(this.visual,[["cx",(this.width/2).toString()],["cy",(this.height/2).toString()],["rx",(this.width/2).toString()],["ry",(this.height/2).toString()]])},c.prototype.pointerUp=function(E){M.prototype.pointerUp.call(this,E),this.setSize()},c.prototype.setStrokeColor=function(E){this.strokeColor=E,this.visual&&J.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(E),this.stateChanged()},c.prototype.setFillColor=function(E){this.fillColor=E,this.visual&&J.setAttributes(this.visual,[["fill",this.fillColor]]),this.fillColorChanged(E),this.stateChanged()},c.prototype.setStrokeWidth=function(E){this.strokeWidth=E,this.visual&&J.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},c.prototype.setStrokeDasharray=function(E){this.strokeDasharray=E,this.visual&&J.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},c.prototype.setOpacity=function(E){this.opacity=E,this.visual&&J.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(c.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.opacityPanel]},enumerable:!1,configurable:!0}),c.prototype.getState=function(){var E=Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},M.prototype.getState.call(this));return E.typeName=c.typeName,E},c.prototype.restoreState=function(E){var k=E;this.fillColor=k.fillColor,this.strokeColor=k.strokeColor,this.strokeWidth=k.strokeWidth,this.strokeDasharray=k.strokeDasharray,this.opacity=k.opacity,this.createVisual(),M.prototype.restoreState.call(this,E),this.setSize()},c.prototype.scale=function(E,k){M.prototype.scale.call(this,E,k),this.setSize()},c.typeName="EllipseMarker",c.title="Ellipse marker",c.icon='',c}(Le),Oe=function(M){function c(E,k,G){return M.call(this,E,k,G)||this}return ce(c,M),Object.defineProperty(c.prototype,"tipLength",{get:function(){return 10+3*this.strokeWidth},enumerable:!1,configurable:!0}),c.prototype.ownsTarget=function(E){return!(!M.prototype.ownsTarget.call(this,E)&&E!==this.tip1&&E!==this.tip2)},c.prototype.createTips=function(){this.tip1=J.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(J.createTransform()),this.visual.appendChild(this.tip1),this.tip2=J.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(J.createTransform()),this.visual.appendChild(this.tip2)},c.prototype.pointerDown=function(E,k){M.prototype.pointerDown.call(this,E,k),this.state==="creating"&&this.createTips()},c.prototype.adjustVisual=function(){if(M.prototype.adjustVisual.call(this),this.tip1&&this.tip2&&(J.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()]]),J.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 E=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(E,this.x1,this.y1),this.tip1.transform.baseVal.replaceItem(k,0);var G=this.tip2.transform.baseVal.getItem(0);G.setRotate(E+180,this.x2,this.y2),this.tip2.transform.baseVal.replaceItem(G,0)}},Object.defineProperty(c.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),c.prototype.getState=function(){var E=M.prototype.getState.call(this);return E.typeName=c.typeName,E},c.prototype.restoreState=function(E){M.prototype.restoreState.call(this,E),this.createTips(),this.adjustVisual()},c.typeName="MeasurementMarker",c.title="Measurement marker",c.icon='',c}(Be),Ue=function(M){function c(E,k,G){var N=M.call(this,E,k,G)||this;return N.strokePanel.colors=G.defaultColorSet,N.fillColor="transparent",N}return ce(c,M),Object.defineProperty(c.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),c.prototype.getState=function(){var E=M.prototype.getState.call(this);return E.typeName=c.typeName,E},c.typeName="EllipseFrameMarker",c.title="Ellipse frame marker",c.icon='',c}(ye),We=function(){function M(){this.undoStack=[],this.redoStack=[]}return Object.defineProperty(M.prototype,"isUndoPossible",{get:function(){return this.undoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(M.prototype,"isRedoPossible",{get:function(){return this.redoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(M.prototype,"undoStepCount",{get:function(){return this.undoStack.length},enumerable:!1,configurable:!0}),Object.defineProperty(M.prototype,"redoStepCount",{get:function(){return this.redoStack.length},enumerable:!1,configurable:!0}),M.prototype.addUndoStep=function(c){this.undoStack.length!==0&&JSON.stringify(this.undoStack[this.undoStack.length-1])===JSON.stringify(c)||(this.undoStack.push(c),JSON.stringify(this.lastRedoStep)!==JSON.stringify(c)&&this.redoStack.splice(0,this.redoStack.length))},M.prototype.replaceLastUndoStep=function(c){this.undoStack.length>0&&(this.undoStack[this.undoStack.length-1]=c)},M.prototype.getLastUndoStep=function(){return this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0},M.prototype.undo=function(){if(this.undoStack.length>1){var c=this.undoStack.pop();return c!==void 0&&this.redoStack.push(c),this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0}},M.prototype.redo=function(){return this.lastRedoStep=this.redoStack.pop(),this.lastRedoStep},M}(),Ne=function(M){function c(E,k,G){var N=M.call(this,E,k,G)||this;return N.strokeColor="transparent",N.strokeWidth=0,N.strokeDasharray="",N.curveX=0,N.curveY=0,N.manipulationStartCurveX=0,N.manipulationStartCurveY=0,N.setStrokeColor=N.setStrokeColor.bind(N),N.setStrokeWidth=N.setStrokeWidth.bind(N),N.setStrokeDasharray=N.setStrokeDasharray.bind(N),N.positionGrips=N.positionGrips.bind(N),N.addControlGrips=N.addControlGrips.bind(N),N.adjustVisual=N.adjustVisual.bind(N),N.setupControlBox=N.setupControlBox.bind(N),N.resize=N.resize.bind(N),N.strokeColor=G.defaultColor,N.strokeWidth=G.defaultStrokeWidth,N.strokeDasharray=G.defaultStrokeDasharray,N.strokePanel=new ne("Line color",G.defaultColorSet,G.defaultColor),N.strokePanel.onColorChanged=N.setStrokeColor,N.strokeWidthPanel=new oe("Line width",G.defaultStrokeWidths,G.defaultStrokeWidth),N.strokeWidthPanel.onWidthChanged=N.setStrokeWidth,N.strokeStylePanel=new ke("Line style",G.defaultStrokeDasharrays,G.defaultStrokeDasharray),N.strokeStylePanel.onStyleChanged=N.setStrokeDasharray,N}return ce(c,M),c.prototype.ownsTarget=function(E){return!(!M.prototype.ownsTarget.call(this,E)&&E!==this.visual&&E!==this.selectorCurve&&E!==this.visibleCurve&&!this.curveGrip.ownsTarget(E))},c.prototype.getPathD=function(){return"M "+this.x1+" "+this.y1+" Q "+this.curveX+" "+this.curveY+", "+this.x2+" "+this.y2},c.prototype.createVisual=function(){this.visual=J.createGroup(),this.selectorCurve=J.createPath(this.getPathD(),[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()],["fill","transparent"]]),this.visibleCurve=J.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)},c.prototype.pointerDown=function(E,k){M.prototype.pointerDown.call(this,E,k),this.manipulationStartCurveX=this.curveX,this.manipulationStartCurveY=this.curveY,this.state==="new"&&(this.curveX=E.x,this.curveY=E.y),this.state==="new"?(this.createVisual(),this.adjustVisual(),this._state="creating"):this.curveGrip.ownsTarget(k)&&(this.activeGrip=this.curveGrip,this._state="resize")},c.prototype.adjustVisual=function(){this.selectorCurve&&this.visibleCurve&&(this.selectorCurve.setAttribute("d",this.getPathD()),this.visibleCurve.setAttribute("d",this.getPathD()),J.setAttributes(this.visibleCurve,[["stroke",this.strokeColor]]),J.setAttributes(this.visibleCurve,[["stroke-width",this.strokeWidth.toString()]]),J.setAttributes(this.visibleCurve,[["stroke-dasharray",this.strokeDasharray.toString()]]))},c.prototype.setupControlBox=function(){M.prototype.setupControlBox.call(this),this.curveControlLine1=J.createLine(this.x1,this.y1,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.curveControlLine2=J.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)},c.prototype.addControlGrips=function(){this.curveGrip=this.createGrip(),this.curveX=0,this.curveY=0,M.prototype.addControlGrips.call(this)},c.prototype.positionGrips=function(){M.prototype.positionGrips.call(this);var E=this.curveGrip.GRIP_SIZE;this.positionGrip(this.curveGrip.visual,this.curveX-E/2,this.curveY-E/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()))},c.prototype.manipulate=function(E){this.state==="move"&&(this.curveX=this.manipulationStartCurveX+E.x-this.manipulationStartX,this.curveY=this.manipulationStartCurveY+E.y-this.manipulationStartY),M.prototype.manipulate.call(this,E)},c.prototype.resize=function(E){this.activeGrip===this.curveGrip&&(this.curveX=E.x,this.curveY=E.y),M.prototype.resize.call(this,E),this.state==="creating"&&(this.curveX=this.x1+(this.x2-this.x1)/2,this.curveY=this.y1+(this.y2-this.y1)/2)},c.prototype.setStrokeColor=function(E){this.strokeColor=E,this.adjustVisual(),this.colorChanged(E)},c.prototype.setStrokeWidth=function(E){this.strokeWidth=E,this.adjustVisual()},c.prototype.setStrokeDasharray=function(E){this.strokeDasharray=E,this.adjustVisual()},c.prototype.scale=function(E,k){this.curveX=this.curveX*E,this.curveY=this.curveY*k,M.prototype.scale.call(this,E,k)},Object.defineProperty(c.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),c.prototype.getState=function(){var E=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,curveX:this.curveX,curveY:this.curveY},M.prototype.getState.call(this));return E.typeName=c.typeName,E},c.prototype.restoreState=function(E){M.prototype.restoreState.call(this,E);var k=E;this.strokeColor=k.strokeColor,this.strokeWidth=k.strokeWidth,this.strokeDasharray=k.strokeDasharray,this.curveX=k.curveX,this.curveY=k.curveY,this.createVisual(),this.adjustVisual()},c.typeName="CurveMarker",c.title="Curve marker",c.icon='',c}(Ge),Ve=function(){function M(c,E){E===void 0&&(E=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=c,this.cancelable=E}return Object.defineProperty(M.prototype,"defaultPrevented",{get:function(){return this._defaultPrevented},enumerable:!1,configurable:!0}),M.prototype.preventDefault=function(){this._defaultPrevented=!0},M}(),qe=function(M){function c(E,k,G){var N=M.call(this,E,!1)||this;return N.dataUrl=k,N.state=G,N}return ce(c,M),c}(Ve),ze=function(M){function c(E,k,G){G===void 0&&(G=!1);var N=M.call(this,E,G)||this;return N.marker=k,N}return ce(c,M),c}(Ve),rt=function(){function M(){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 M.prototype.addEventListener=function(c,E){this[c].push(E)},M.prototype.removeEventListener=function(c,E){var k=this[c].indexOf(E);k>-1&&this[c].splice(k,1)},M}(),lt=function(){function M(c){this.touchPoints=0,this._availableMarkerTypes=this.DEFAULT_MARKER_TYPES,this.mode="select",this.markers=[],this.isDragging=!1,this.renderEventListeners=[],this.closeEventListeners=[],this.settings=new Ce,this._isOpen=!1,this.undoRedoManager=new We,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 rt,this._silentRenderMode=!1,this._isFocused=!1,this._instanceNo=M.instanceCounter++,this.styles=new Fe(this.instanceNo),this.uiStyleSettings=this.styles.settings,this.target=c,this.targetRoot=document.body,this.width=c.clientWidth,this.height=c.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(M.prototype,"ALL_MARKER_TYPES",{get:function(){return[De,se,ae,be,Ue,ye,$,fe,Oe,V,Be,Ne]},enumerable:!1,configurable:!0}),Object.defineProperty(M.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[De,se,ae,be,ye,$,fe]},enumerable:!1,configurable:!0}),Object.defineProperty(M.prototype,"BASIC_MARKER_TYPES",{get:function(){return[De,se,ae,be,$]},enumerable:!1,configurable:!0}),Object.defineProperty(M.prototype,"availableMarkerTypes",{get:function(){return this._availableMarkerTypes},set:function(c){var E=this;this._availableMarkerTypes.splice(0),c.forEach(function(k){if(typeof k=="string"){var G=E.ALL_MARKER_TYPES.find(function(N){return N.typeName===k});G!==void 0&&E._availableMarkerTypes.push(G)}else E._availableMarkerTypes.push(k)})},enumerable:!1,configurable:!0}),Object.defineProperty(M.prototype,"currentMarker",{get:function(){return this._currentMarker},enumerable:!1,configurable:!0}),Object.defineProperty(M.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(M.prototype,"isUndoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isUndoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(M.prototype,"isRedoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isRedoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(M.prototype,"zoomLevel",{get:function(){return this._zoomLevel},set:function(c){this._zoomLevel=c,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(M.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),M.prototype.open=function(){this.setupResizeObserver(),this.setEditingTarget(),this.setTopLeft(),this.initMarkerCanvas(),this.initOverlay(),this.attachEvents(),this.settings.displayMode==="popup"&&this.onPopupTargetResize(),Re.isLicensed||this.addLogo(),this._isOpen=!0,this._isFocused=!0},M.prototype.show=function(){var c=this;this.styles.styleSheetRoot===void 0&&Ie.styleSheetRoot!==void 0&&(this.styles.styleSheetRoot=Ie.styleSheetRoot),this.setWindowHeight(),this.showUI(),this.open(),this.eventListeners.show.forEach(function(E){return E(new Ve(c))})},M.prototype.render=function(){return pe(this,void 0,void 0,function(){var c;return ge(this,function(E){switch(E.label){case 0:return this.setCurrentMarker(),(c=new Me).naturalSize=this.renderAtNaturalSize,c.imageType=this.renderImageType,c.imageQuality=this.renderImageQuality,c.markersOnly=this.renderMarkersOnly,c.width=this.renderWidth,c.height=this.renderHeight,[4,c.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 1:return E.sent(),[4,c.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 2:return[2,E.sent()]}})})},M.prototype.close=function(c){var E=this;if(c===void 0&&(c=!1),this.isOpen){var k=!1;c||this.eventListeners.beforeclose.forEach(function(G){var N=new Ve(E,!0);G(N),N.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(G){return G(new Ve(E))}),this.detachEvents(),this._isOpen=!1)}},M.prototype.addMarkersToToolbar=function(){for(var c,E=[],k=0;kthis.editorCanvas.clientHeight?this.editorCanvas.clientHeight*c:this.editorCanvas.clientWidth,k=E',c.title="Powered by marker.js",c.style.display="grid",c.style.alignItems="center",c.style.justifyItems="center",c.style.padding="3px",c.style.width="20px",c.style.height="20px",this.logoUI.appendChild(c),this.editorCanvas.appendChild(this.logoUI),this.logoUI.style.position="absolute",this.logoUI.style.pointerEvents="all",this.positionLogo()},M.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")},M.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"},M.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},M.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 c=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=c+"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 Ae(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(c),1),c.dispose()},M.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())},M.prototype.toolbarButtonClicked=function(c,E){if(c==="marker"&&E!==void 0)this.createNewMarker(E);else if(c==="action")switch(E){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()}},M.prototype.deleteSelectedMarker=function(){var c=this;if(this._currentMarker!==void 0){var E=!1;if(this.eventListeners.markerbeforedelete.forEach(function(G){var N=new ze(c,c._currentMarker,!0);G(N),N.defaultPrevented&&(E=!0)}),!E){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(G){return G(new ze(c,k))})}}},M.prototype.clear=function(){var c=this,E=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach(function(ie){var Ee=new ze(c,void 0,!0);ie(Ee),Ee.defaultPrevented&&(E=!0)}),!E)){this.setCurrentMarker();for(var k=function(ie){var Ee=G.markers[ie];G.setCurrentMarker(G.markers[ie]),G._currentMarker.dispose(),G.markerImage.removeChild(G._currentMarker.container),G.markers.splice(G.markers.indexOf(G._currentMarker),1),G.eventListeners.markerdelete.forEach(function(je){return je(new ze(c,Ee))})},G=this,N=this.markers.length-1;N>=0;N--)k(N);this.addUndoStep()}},Object.defineProperty(M.prototype,"isNotesAreaOpen",{get:function(){return this.notesArea!==void 0},enumerable:!1,configurable:!0}),M.prototype.showNotesEditor=function(){var c;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=(c=this._currentMarker.notes)!==null&&c!==void 0?c:"",this.overlayContainer.appendChild(this.notesArea))},M.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)},M.prototype.selectLastMarker=function(){this.markers.length>0?this.setCurrentMarker(this.markers[this.markers.length-1]):this.setCurrentMarker()},M.prototype.addUndoStep=function(){var c=this;if(this._currentMarker===void 0||this._currentMarker.state!=="edit"){var E=this.getState(),k=this.undoRedoManager.getLastUndoStep();if(!k||k.width===E.width&&k.height===E.height){var G=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep(E),G1&&this.panTo({x:c.clientX,y:c.clientY}))},M.prototype.onPointerUp=function(c){this.touchPoints>0&&this.touchPoints--,this.touchPoints===0&&this.isDragging&&this._currentMarker!==void 0&&this._currentMarker.pointerUp(this.clientToLocalCoordinates(c.clientX,c.clientY)),this.isDragging=!1,this.addUndoStep()},M.prototype.onPointerOut=function(){this.touchPoints>0&&this.touchPoints--},M.prototype.onKeyUp=function(c){this._currentMarker===void 0||this.notesArea!==void 0||c.key!=="Delete"&&c.key!=="Backspace"||this.deleteSelectedMarker()},M.prototype.clientToLocalCoordinates=function(c,E){var k=this.markerImage.getBoundingClientRect();return{x:(c-k.left)/this.zoomLevel,y:(E-k.top)/this.zoomLevel}},M.prototype.onWindowResize=function(){this.positionUI()},M.prototype.positionUI=function(){switch(this.setTopLeft(),this.settings.displayMode){case"inline":var c=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=c+"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()},M.prototype.addLicenseKey=function(c){Re.addKey(c)},M.prototype.addEventListener=function(c,E){this.eventListeners.addEventListener(c,E)},M.prototype.removeEventListener=function(c,E){this.eventListeners.removeEventListener(c,E)},M.prototype.renderState=function(c){this._silentRenderMode=!0,this.settings.displayMode="inline",this.isOpen||this.show(),this.restoreState(c),this.startRenderAndClose(),this._silentRenderMode=!1},Object.defineProperty(M.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),M.prototype.focus=function(){var c=this;this._isFocused||(this.attachWindowEvents(),this._isFocused=!0,this._previousCurrentMarker!==void 0&&this.setCurrentMarker(this._previousCurrentMarker),this.eventListeners.focus.forEach(function(E){return E(new Ve(c))}))},M.prototype.blur=function(){var c=this;this._isFocused&&(this.detachWindowEvents(),this._isFocused=!1,this._previousCurrentMarker=this._currentMarker,this.setCurrentMarker(),this.eventListeners.blur.forEach(function(E){return E(new Ve(c))}))},M.instanceCounter=0,M}();/* **********************************
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 ct=function(M,c){return(ct=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(E,k){E.__proto__=k}||function(E,k){for(var G in k)Object.prototype.hasOwnProperty.call(k,G)&&(E[G]=k[G])})(M,c)};function et(M,c){if(typeof c!="function"&&c!==null)throw new TypeError("Class extends value "+String(c)+" is not a constructor or null");function E(){this.constructor=M}ct(M,c),M.prototype=c===null?Object.create(c):(E.prototype=c.prototype,new E)}function ut(M,c,E,k){return new(E||(E=Promise))(function(G,N){function ie($e){try{je(k.next($e))}catch(we){N(we)}}function Ee($e){try{je(k.throw($e))}catch(we){N(we)}}function je($e){var we;$e.done?G($e.value):(we=$e.value,we instanceof E?we:new E(function(nt){nt(we)})).then(ie,Ee)}je((k=k.apply(M,c||[])).next())})}function gt(M,c){var E,k,G,N,ie={label:0,sent:function(){if(1&G[0])throw G[1];return G[1]},trys:[],ops:[]};return N={next:Ee(0),throw:Ee(1),return:Ee(2)},typeof Symbol=="function"&&(N[Symbol.iterator]=function(){return this}),N;function Ee(je){return function($e){return function(we){if(E)throw new TypeError("Generator is already executing.");for(;ie;)try{if(E=1,k&&(G=2&we[0]?k.return:we[0]?k.throw||((G=k.return)&&G.call(k),0):k.next)&&!(G=G.call(k,we[1])).done)return G;switch(k=0,G&&(we=[2&we[0],G.value]),we[0]){case 0:case 1:G=we;break;case 4:return ie.label++,{value:we[1],done:!1};case 5:ie.label++,k=we[1],we=[0];continue;case 7:we=ie.ops.pop(),ie.trys.pop();continue;default:if(!(G=ie.trys,(G=G.length>0&&G[G.length-1])||we[0]!==6&&we[0]!==2)){ie=0;continue}if(we[0]===3&&(!G||we[1]>G[0]&&we[1]0&&E>0){var k=new ot(c,E),G=k.ratio>=1?20:k.getHorizontalLength(20),N=k.ratio<1?20:k.getVerticalLength(20),ie=document.createElementNS("http://www.w3.org/2000/svg","svg");ie.setAttribute("xmlns","http://www.w3.org/2000/svg"),ie.setAttribute("viewBox","0 0 24 24"),document.body.appendChild(ie);var Ee=Ye.createDefs();ie.appendChild(Ee);var je=Ye.createElement("clipPath",[["id","text-bg-clip"]]);Ee.appendChild(je);var $e=Ye.createPath(Ye.getHollowRectanglePath((24-G)/2,(24-N)/2,G,N,(24-G)/2+2,(24-N)/2+2,G-4,N-4));ie.appendChild($e);var we=Ye.createText([["x","0"],["y","0"],["font-size","7px"],["font-family","monospace"]]);we.appendChild(Ye.createTSpan(c+":"+E)),ie.appendChild(we);var nt=we.getBBox();Ye.setAttributes(we,[["x",((24-nt.width)/2).toString()],["y",((24-nt.height)/2-nt.y).toString()]]);var _t=Ye.createPath(Ye.getHollowRectanglePath(0,0,24,24,(24-Math.ceil(nt.width))/2,(24-Math.ceil(nt.height))/2,Math.ceil(nt.width),Math.ceil(nt.height)));return je.appendChild(_t),Ye.setAttributes($e,[["clip-path","url(#text-bg-clip)"]]),document.body.removeChild(ie),ie.outerHTML}return''},M}(),ft=function(M){function c(E,k,G){var N=M.call(this,E,k)||this;return N.isDropdownOpen=!1,N.onClick=N.dropdownButtonClicked,N.dropdownButtons=G,N}return et(c,M),c.prototype.setupDropdown=function(){var E=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=E.className,k.colorsClassName=E.colorsClassName,E.dropdownBlock.appendChild(k.getUI())}),this.uiContainer.appendChild(this.dropdownBlock)},c.prototype.positionDropdown=function(){this.dropdownBlock.style.left=this.uiContainer.clientLeft+"px",this.dropdownBlock.style.top=this.uiContainer.clientTop+this.uiContainer.clientHeight+"px"},c.prototype.dropdownButtonClicked=function(){this.dropdownBlock===void 0&&this.setupDropdown(),this.isDropdownOpen=!this.isDropdownOpen,this.toggleDropdown()},c.prototype.toggleDropdown=function(){this.positionDropdown(),this.dropdownBlock.style.display=this.isDropdownOpen?"inline-block":"none"},c.prototype.showDropdown=function(){this.isDropdownOpen=!0,this.toggleDropdown()},c.prototype.hideDropdown=function(){this.isDropdownOpen=!1,this.toggleDropdown()},c}(st),Et=function(){function M(c,E){this.GRIP_SIZE=10,this.color=c,this.fillColor=E,this.visual=Ye.createGroup(),this.visual.appendChild(Ye.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(Ye.createCircle(this.GRIP_SIZE,[["fill",this.fillColor],["fill-opacity","0.9"],["stroke",this.color],["stroke-width","2"],["stroke-opacity","0.7"]]))}return M.prototype.ownsTarget=function(c){return c===this.visual||c===this.visual.childNodes[0]||c===this.visual.childNodes[1]},M.prototype.setCenter=function(c,E){this.visual.childNodes.forEach(function(k){return Ye.setAttributes(k,[["cx",c.toString()],["cy",E.toString()]])})},M}(),ht=function(){function M(c,E,k,G){this.isMoving=!1,this._isGridVisible=!0,this.numberOfGridLines=2,this.horizontalGridLines=[],this.verticalGridLines=[],this._zoomFactor=1,this.cropRectChanged=!1,this.canvasWidth=c,this.canvasHeight=E,this.margin=k,this.container=G,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(M.prototype,"aspectRatio",{get:function(){return this._aspectRatio},set:function(c){this._aspectRatio=c,this.adjustCropRect(),this.setCropRectangle(this.cropRect)},enumerable:!1,configurable:!0}),Object.defineProperty(M.prototype,"isGridVisible",{get:function(){return this._isGridVisible},set:function(c){this._isGridVisible=c,this.gridContainer&&Ye.setAttributes(this.gridContainer,[["display",this._isGridVisible?"":"none"]])},enumerable:!1,configurable:!0}),Object.defineProperty(M.prototype,"zoomFactor",{get:function(){return this._zoomFactor},set:function(c){this._zoomFactor=c,this.setCropRectangle(this.cropRect)},enumerable:!1,configurable:!0}),M.prototype.open=function(){var c=this;this.cropShadeElement=Ye.createPath("M0,0Z",[["fill",this.cropShadeColor],["fill-opacity","0.8"]]),this.container.appendChild(this.cropShadeElement),this.gridContainer=Ye.createGroup([["display",this.isGridVisible?"":"none"]]),this.container.appendChild(this.gridContainer);for(var E=0;Ethis.canvasHeight/this.canvasWidth?this.margin:this.margin+this.canvasHeight/2-E.height/2),Ye.setAttributes(this.cropRectElement,[["x",E.x.toString()],["y",E.y.toString()],["width",E.width.toString()],["height",E.height.toString()]]);var k=E.height/(this.numberOfGridLines+1);this.horizontalGridLines.forEach(function(N,ie){var Ee=E.y+k*(ie+1);Ye.setAttributes(N,[["x1",""+E.x],["y1",""+Ee],["x2",""+(E.x+E.width)],["y2",""+Ee]])});var G=E.width/(this.numberOfGridLines+1);this.verticalGridLines.forEach(function(N,ie){var Ee=E.x+G*(ie+1);Ye.setAttributes(N,[["x1",""+Ee],["y1",""+E.y],["x2",""+Ee],["y2",""+(E.y+E.height)]])}),Ye.setAttributes(this.cropShadeElement,[["d",Ye.getHollowRectanglePath(0,0,this.canvasWidth+2*this.margin,this.canvasHeight+2*this.margin,E.x,E.y,E.width,E.height)]]),this.topLeftGrip.setCenter(E.x,E.y),this.topRightGrip.setCenter(E.x+E.width,E.y),this.bottomLeftGrip.setCenter(E.x,E.y+E.height),this.bottomRightGrip.setCenter(E.x+E.width,E.y+E.height),this.cropRectChanged&&this.onCropChange&&(this.cropRectChanged=!1,this.onCropChange(this.cropRect)),this.cropRectChanged=!1},M.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)},M.prototype.clientToLocalCoordinates=function(c,E){var k=this.container.getBoundingClientRect();return{x:c-k.left+this.margin,y:E-k.top+this.margin}},M.prototype.onPointerDown=function(c){this.container.setPointerCapture(c.pointerId),this.previousPoint=this.clientToLocalCoordinates(c.clientX,c.clientY),this.cropRectElement===c.target?this.isMoving=!0:this.topLeftGrip.ownsTarget(c.target)?this.activeGrip=this.topLeftGrip:this.bottomLeftGrip.ownsTarget(c.target)?this.activeGrip=this.bottomLeftGrip:this.topRightGrip.ownsTarget(c.target)?this.activeGrip=this.topRightGrip:this.bottomRightGrip.ownsTarget(c.target)&&(this.activeGrip=this.bottomRightGrip)},M.prototype.onPointerMove=function(c){if(this.isMoving)this.move(this.clientToLocalCoordinates(c.clientX,c.clientY));else if(this.activeGrip){var E=this.clientToLocalCoordinates(c.clientX,c.clientY);this.resize(E)}c.preventDefault()},M.prototype.onPointerUp=function(c){this.activeGrip=void 0,this.isMoving=!1,this.container.releasePointerCapture(c.pointerId)},M.prototype.move=function(c){var E=c.x-this.previousPoint.x,k=c.y-this.previousPoint.y;this.zoomFactor!==1&&(E=-E/this.zoomFactor,k=-k/this.zoomFactor),this.cropRect.x=Math.min(Math.max(this.margin,this.cropRect.x+E),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=c},M.prototype.resize=function(c){var E=Object.assign({},this.cropRect),k=c.x-this.previousPoint.x,G=c.y-this.previousPoint.y;switch(this.activeGrip){case this.bottomLeftGrip:case this.topLeftGrip:E.x+kthis.canvasWidth*this.zoomFactor&&(k=this.canvasWidth*this.zoomFactor-E.width),E.width+=k}switch(this.activeGrip){case this.topLeftGrip:case this.topRightGrip:this.aspectRatio?(E.y=this.cropRect.y-(this.activeGrip===this.topLeftGrip?-1:1)*this.aspectRatio.getVerticalLength(k),E.height=this.aspectRatio.getVerticalLength(E.width)):(E.y+=G,E.height=this.cropRect.y+this.cropRect.height-E.y);break;case this.bottomLeftGrip:case this.bottomRightGrip:this.aspectRatio?E.height=this.aspectRatio.getVerticalLength(E.width):E.height+=G}E.width<10&&(E.x=this.cropRect.x,E.width=10),E.height<10&&(E.y=this.cropRect.y,E.height=10),this.previousPoint=c,E.x>=this.margin&&E.y>=this.margin&&E.x-this.margin+E.width<=this.canvasWidth&&E.y-this.margin+E.height<=this.canvasHeight&&(this.cropRect=E,this.onCropChange?(this.cropRectChanged=!0,this.onCropChange(this.cropRect)):this.setCropRectangle(this.cropRect))},M.prototype.adjustCropRect=function(){if(this.aspectRatio&&Math.round(this.cropRect.height)!==Math.round(this.aspectRatio.getVerticalLength(this.cropRect.width))){var c=this.cropRect.x+this.cropRect.width/2,E=this.cropRect.y+this.cropRect.height/2,k=this.aspectRatio.getHorizontalLength(this.cropRect.height),G=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=c-this.cropRect.width/2,this.cropRect.y=E-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)}},M.prototype.getRescaledRect=function(c,E,k,G,N,ie){var Ee=k/c,je=G/E;return{x:(N.x-ie)*Ee+ie,y:(N.y-ie)*je+ie,width:N.width*Ee,height:N.height*je}},M.prototype.scaleCanvas=function(c,E){var k=this.getRescaledRect(this.canvasWidth,this.canvasHeight,c,E,this.cropRect,this.margin);this.canvasWidth=c,this.canvasHeight=E,this.onCropChange&&this.onCropChange(k),this.setCropRectangle(k)},M}(),It=function(){function M(c){this._angle=0,this.isDragging=!1,this.width=401,this.height=24,this.title=c,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(M.prototype,"angle",{get:function(){return this._angle},set:function(c){this._angle=c,this.setAngleLabel(),this.positionScaleShape()},enumerable:!1,configurable:!0}),M.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},M.prototype.onPointerDown=function(c){this.controlContainer.setPointerCapture(c.pointerId),this.isDragging=!0,this.previousPoint={x:c.clientX,y:c.clientY}},M.prototype.onPointerMove=function(c){this.isDragging&&(this.onAngleChange&&this.onAngleChange((c.clientX-this.previousPoint.x)/5),this.previousPoint.x=c.clientX)},M.prototype.onPointerUp=function(c){this.isDragging&&this.onAngleChange&&this.onAngleChange((c.clientX-this.previousPoint.x)/5),this.isDragging=!1,this.controlContainer.releasePointerCapture(c.pointerId)},M.prototype.setAngleLabel=function(){if(this.angleLabelText){this.angleLabelText.innerHTML=""+Math.round(this._angle);var c=this.angleLabelText.getBBox();Ye.setAttributes(this.angleLabelElement,[["x",((this.width-c.width)/2).toString()],["y",(this.height/2).toString()]])}},M.prototype.positionScaleShape=function(){if(this.scaleShape){var c=this.scaleShape.transform.baseVal.getItem(0);c.setTranslate(this._angle%5*5-25,0),this.scaleShape.transform.baseVal.replaceItem(c,0)}},M.prototype.getVisual=function(){var c=document.createElementNS("http://www.w3.org/2000/svg","svg");c.setAttribute("xmlns","http://www.w3.org/2000/svg"),c.setAttribute("width",this.width+"px"),c.setAttribute("height",this.height+"px"),c.setAttribute("viewBox","0 0 "+this.width+" "+this.height),c.style.flexShrink="0",document.body.appendChild(c);for(var E="M0,"+(this.height-1)+" v"+-this.height/3+"h1v"+this.height/3,k=1;k<=this.width/5+10;k++){var G=k%5==0?this.height/3:this.height/6;E+="h4v"+-G+"h1v"+G}E+="v1H0Z",this.scaleShape=Ye.createPath(E);var N=Ye.createTransform();this.scaleShape.transform.baseVal.appendItem(N),c.appendChild(this.scaleShape),this.angleLabelElement=Ye.createText([["x","0"],["y","0"],["font-size","10px"],["font-family","monospace"]]),this.angleLabelText=Ye.createTSpan(""),this.angleLabelElement.appendChild(this.angleLabelText);var ie=Ye.createTSpan("");return ie.innerHTML="°",this.angleLabelElement.appendChild(ie),c.appendChild(this.angleLabelElement),document.body.removeChild(c),c},M}(),wt=function(){function M(){this.naturalSize=!1,this.imageType="image/png"}return M.prototype.rasterize=function(c,E,k,G,N,ie,Ee){var je=this;return new Promise(function($e){var we=document.createElement("canvas");we.width=c.width.baseVal.value-2*G,we.height=c.height.baseVal.value-2*G;var nt=1,_t=1;je.naturalSize===!0?(nt=E.naturalWidth/(c.width.baseVal.value-2*G)/ie,_t=E.naturalHeight/(c.height.baseVal.value-2*G)/Ee,we.width=E.naturalWidth/ie,we.height=E.naturalHeight/Ee):je.width!==void 0&&je.height!==void 0&&(nt=je.width/k.width,_t=je.height/k.height,we.width*=nt,we.height*=_t);var Tt=we.getContext("2d");Tt.translate(we.width/2,we.height/2),Tt.rotate(N*Math.PI/180),Tt.scale(ie,Ee),Tt.translate(-we.width/2,-we.height/2),Tt.drawImage(E,0,0,we.width,we.height);var Mt=document.createElement("canvas");Mt.width=k.width*nt,Mt.height=k.height*_t,Mt.getContext("2d").putImageData(Tt.getImageData((k.x-G)*nt,(k.y-G)*_t,k.width*nt,k.height*_t),0,0),$e(Mt.toDataURL(je.imageType,je.imageQuality))})},M}(),dt=function(){function M(c){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=M.instanceCounter++,this.styles=new xt(this.instanceNo),this.target=c,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(M.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),Object.defineProperty(M.prototype,"zoomToCropEnabled",{get:function(){return this._zoomToCropEnabled},set:function(c){this._zoomToCropEnabled=c,c?this.zoomToCrop():this.unzoomFromCrop()},enumerable:!1,configurable:!0}),Object.defineProperty(M.prototype,"isGridVisible",{get:function(){return this._isGridVisible},set:function(c){this._isGridVisible=c,this.cropLayer&&(this.cropLayer.isGridVisible=this._isGridVisible)},enumerable:!1,configurable:!0}),Object.defineProperty(M.prototype,"gridLines",{get:function(){return this._gridLines},set:function(c){this._gridLines=c,this.cropLayer&&(this.cropLayer.numberOfGridLines=this._gridLines)},enumerable:!1,configurable:!0}),Object.defineProperty(M.prototype,"rotationAngle",{get:function(){return this._rotationAngle},set:function(c){this._rotationAngle=c,this.straightener&&(this.straightener.angle=this._rotationAngle)},enumerable:!1,configurable:!0}),Object.defineProperty(M.prototype,"paddedImageWidth",{get:function(){return this.imageWidth+2*this.CANVAS_MARGIN},enumerable:!1,configurable:!0}),Object.defineProperty(M.prototype,"paddedImageHeight",{get:function(){return this.imageHeight+2*this.CANVAS_MARGIN},enumerable:!1,configurable:!0}),Object.defineProperty(M.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(M.prototype,"aspectRatio",{get:function(){var c;return(c=this._aspectRatio)!==null&&c!==void 0?c:this.aspectRatios[0]},set:function(c){this._aspectRatio=c},enumerable:!1,configurable:!0}),M.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},M.prototype.show=function(){this.showUI(),this.open()},M.prototype.close=function(c){c===void 0&&(c=!1),this.isOpen&&(this.coverDiv&&this.closeUI(),this.targetObserver&&this.targetObserver.unobserve(this.target),this.displayMode==="popup"&&window.removeEventListener("resize",this.setWindowHeight),c||this.closeEventListeners.forEach(function(E){return E()}),this._isOpen=!1)},M.prototype.addRenderEventListener=function(c){this.renderEventListeners.push(c)},M.prototype.removeRenderEventListener=function(c){this.renderEventListeners.indexOf(c)>-1&&this.renderEventListeners.splice(this.renderEventListeners.indexOf(c),1)},M.prototype.addCloseEventListener=function(c){this.closeEventListeners.push(c)},M.prototype.removeCloseEventListener=function(c){this.closeEventListeners.indexOf(c)>-1&&this.closeEventListeners.splice(this.closeEventListeners.indexOf(c),1)},M.prototype.setupResizeObserver=function(){var c=this;this.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){c.resize(c.target.clientWidth,c.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))},M.prototype.onPopupResize=function(){if(this.contentDiv.clientWidth>0&&this.contentDiv.clientHeight>0){var c=1*this.target.clientWidth/this.target.clientHeight,E=this.contentDiv.clientWidth/c>this.contentDiv.clientHeight?(this.contentDiv.clientHeight-2*this.CANVAS_MARGIN)*c:this.contentDiv.clientWidth-2*this.CANVAS_MARGIN,k=E+2*this.CANVAS_MARGINc+this.CANVAS_MARGIN?this.target.offsetTop-(c+this.CANVAS_MARGIN):0;this.coverDiv.style.top=E+"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},M.prototype.addToolbars=function(){this.addTopToolbar(),this.addBottomToolbar()},M.prototype.addTopToolbar=function(){var c=this;this.topToolbar=new Qe,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 E=new vt;E.minWidth=3*this.toolbarHeight+"px",this.topToolbar.addButtonBlock(E);var k=[];this.aspectRatios.forEach(function(_t){var Tt=new st(it.getIcon(_t.horizontal,_t.vertical),_t.horizontal===0&&_t.vertical===0?"FREE":_t.horizontal+":"+_t.vertical);Tt.onClick=function(){return c.ratioButtonClicked(_t)},k.push(Tt)}),this.aspectRatioButton=new ft(it.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,E.addButton(this.aspectRatioButton),this.aspectRatios.length<2&&this.aspectRatioButton.hide();var G=new st('',"Toggle grid");G.isActive=this.isGridVisible,G.onClick=function(){c.isGridVisible=!c.isGridVisible,G.isActive=c.isGridVisible},E.addButton(G);var N=new st('',"Zoom to selection");if(N.isActive=this.zoomToCropEnabled,N.onClick=function(){c.zoomToCropEnabled=!c.zoomToCropEnabled,N.isActive=c.zoomToCropEnabled},E.addButton(N),!Lt.isLicensed){var ie=new at;this.topToolbar.addElementBlock(ie);var Ee=document.createElement("div");Ee.className=this.topToolbar.buttonClassName+" "+this.topToolbar.buttonColorsClassName;var je=document.createElement("a");je.style.color="currentColor",je.href="https://markerjs.com/products/cropro",je.target="_blank",je.innerHTML='',Ee.appendChild(je),ie.addElement(Ee)}var $e=new vt;$e.minWidth=3*this.toolbarHeight+"px",$e.contentAlign="end",this.topToolbar.addButtonBlock($e);var we=new st('',"OK");we.onClick=this.startRenderAndClose,$e.addButton(we),this.styles.settings.toolbarOkButtonStyleColorsClassName&&(we.colorsClassName=this.styles.settings.toolbarOkButtonStyleColorsClassName);var nt=new st('',"Close");nt.onClick=this.close,$e.addButton(nt),this.styles.settings.toolbarCloseButtonStyleColorsClassName&&(nt.colorsClassName=this.styles.settings.toolbarCloseButtonStyleColorsClassName)},M.prototype.addBottomToolbar=function(){var c=this;this.bottomToolbar=new Qe,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 E=new vt;E.minWidth=2*this.toolbarHeight+"px",this.bottomToolbar.addButtonBlock(E);var k=new st('',"Rotate left");k.onClick=this.rotateLeftButtonClicked,E.addButton(k);var G=new st('',"Rotate right");G.onClick=this.rotateRightButtonClicked,E.addButton(G);var N=new at;N.className=this.toolbarStraightenerBlockStyleClass.name,this.bottomToolbar.addElementBlock(N),this.straightener=new It("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){c.rotateBy($e),c.straightener.angle=c.rotationAngle},N.addElement(this.straightener.getUI());var ie=new vt;ie.minWidth=2*this.toolbarHeight+"px",ie.contentAlign="end",this.bottomToolbar.addButtonBlock(ie);var Ee=new st('',"Flip horizontal");Ee.onClick=this.flipHorizontallyButtonClicked,ie.addButton(Ee);var je=new st('',"Flip vertical");je.onClick=this.flipVerticallyButtonClicked,ie.addButton(je)},M.prototype.ratioButtonClicked=function(c){this.aspectRatio=c,this.applyAspectRatio(),this.aspectRatioButton.hideDropdown()},M.prototype.applyAspectRatio=function(){this.setCropLayerAspectRatio(),this.aspectRatioButton.icon=it.getIcon(this.aspectRatio.horizontal,this.aspectRatio.vertical)},M.prototype.setCropLayerAspectRatio=function(){this.cropLayer&&(this.aspectRatio&&this.aspectRatio.horizontal!==0&&this.aspectRatio.vertical!==0?this.cropLayer.aspectRatio=new ot(this.aspectRatio.horizontal,this.aspectRatio.vertical):this.cropLayer.aspectRatio=void 0)},M.prototype.closeUI=function(){this.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},M.prototype.getState=function(){return{width:this.imageWidth,height:this.imageHeight,rotationAngle:this.rotationAngle,flippedHorizontally:this.flippedHorizontally,flippedVertically:this.flippedVertically,cropRect:Object.assign({},this.cropRect)}},M.prototype.restoreState=function(c){if(c){var E=this.cropLayer.getRescaledRect(c.width,c.height,this.imageWidth,this.imageHeight,c.cropRect,this.CANVAS_MARGIN);this.cropLayer.setCropRectangle(E),this.cropRectChanged(E),this.flippedHorizontally=c.flippedHorizontally,this.flippedVertically=c.flippedVertically,this.applyFlip(),this.rotationAngle=c.rotationAngle,this.applyRotation()}},M.prototype.clientToLocalCoordinates=function(c,E){var k=this.cropImage.getBoundingClientRect();return{x:c-k.left,y:E-k.top}},M.prototype.onWindowResize=function(){this.positionUI()},M.prototype.positionUI=function(){switch(this.setTopLeft(),this.displayMode){case"inline":var c=this.target.offsetTop>this.toolbarHeight?this.target.offsetTop-this.toolbarHeight:0;this.coverDiv.style.top=c+"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()},M.prototype.rotateLeftButtonClicked=function(){var c=this.rotationAngle-90;this.rotationAngle%90!=0&&(c+=this.rotationAngle>=0?90-this.rotationAngle%90:-this.rotationAngle%90),this.rotateTo(c)},M.prototype.rotateRightButtonClicked=function(){var c=this.rotationAngle+90;this.rotationAngle%90!=0&&(c-=this.rotationAngle>=0?this.rotationAngle%90:90+this.rotationAngle%90),this.rotateTo(c)},M.prototype.rotateTo=function(c){c=(c=c>180?c-360:c)<=-180?c+360:c,this.rotationAngle=c,this.applyRotation()},M.prototype.rotateBy=function(c){this.rotateTo((this.rotationAngle+c)%360)},M.prototype.applyRotation=function(){var c=this.zoomToCropEnabled;this.zoomToCropEnabled=!1,this.editingTargetRotationScaleContainer.style.transformOrigin=this.imageWidth/2+"px "+this.imageHeight/2+"px",this.editingTargetRotationScaleContainer.style.transform="scale(1)";var E=this.editingTargetRotationContainer.transform.baseVal.getItem(0);E.setRotate(this.rotationAngle,this.imageWidth/2,this.imageHeight/2),this.editingTargetRotationContainer.transform.baseVal.replaceItem(E,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=c},M.prototype.flipHorizontallyButtonClicked=function(){this.flippedHorizontally=!this.flippedHorizontally,this.applyFlip()},M.prototype.flipVerticallyButtonClicked=function(){this.flippedVertically=!this.flippedVertically,this.applyFlip()},M.prototype.applyFlip=function(){this.editingTarget.style.transform="scale("+(this.flippedHorizontally?-1:1)+","+(this.flippedVertically?-1:1)+")"},M.prototype.startRenderAndClose=function(){return ut(this,void 0,void 0,function(){var c,E;return gt(this,function(k){switch(k.label){case 0:return[4,this.render()];case 1:return c=k.sent(),E=this.getState(),this.renderEventListeners.forEach(function(G){return G(c,E)}),this.close(!0),[2]}})})},M.prototype.render=function(){return ut(this,void 0,void 0,function(){var c;return gt(this,function(E){switch(E.label){case 0:return(c=new wt).naturalSize=this.renderAtNaturalSize,c.imageType=this.renderImageType,c.imageQuality=this.renderImageQuality,c.width=this.renderWidth,c.height=this.renderHeight,this.unzoomFromCrop(),Ye.setAttributes(this.cropLayerContainer,[["display","none"]]),[4,c.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 E.sent(),[4,c.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,E.sent()]}})})},M.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new Ke("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 Ke("toolbar_colors",`
background-color: `+this.styles.settings.toolbarBackgroundColor+`;
`)),this.toolbarBlockStyleClass=this.styles.addClass(new Ke("toolbar-block",`
display: flex;
align-items: center;
box-sizing: content-box;
`));var c=this.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new Ke("toolbar_button",`
display: inline-block;
width: `+(this.toolbarHeight-2*c)+`px;
height: `+(this.toolbarHeight-2*c)+`px;
padding: `+c+`px;
cursor: default;
user-select: none;
box-sizing: content-box;
`)),this.toolbarButtonStyleColorsClass=this.styles.addClass(new Ke("toolbar_button_colors",`
color: `+this.styles.settings.toolbarColor+`;
fill: currentColor;
`)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new Ke("toolbar_active_button",`
color: `+this.styles.settings.toolbarColor+`;
fill: currentColor;
background-color: `+this.styles.settings.toolbarBackgroundActiveColor+`
`)),this.styles.addRule(new Je("."+this.toolbarButtonStyleClass.name+" svg",`
height: `+this.toolbarHeight/2+`px;
`)),this.styles.addRule(new Je("."+this.toolbarButtonStyleColorsClass.name+":hover",`
background-color: `+this.styles.settings.toolbarBackgroundHoverColor+`
`)),this.toolbarDropdownStyleClass=this.styles.addClass(new Ke("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 Ke("toolbar_dropdown_colors",`
background-color: `+this.styles.settings.toolbarBackgroundColor+`;
`)),this.toolbarStraightenerBlockStyleClass=this.styles.addClass(new Ke("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 Ke("toolbar_straightener",`
display: flex;
overflow: hidden;
justify-content: center;
height: `+(this.toolbarHeight-2*c)+`px;
padding: `+c+`px;
cursor: default;
user-select: none;
box-sizing: content-box;
`)),this.toolbarStraightenerStyleColorsClass=this.styles.addClass(new Ke("toolbar_straightener_colors",`
color: `+this.styles.settings.toolbarColor+`;
fill: currentColor;
`))},M.instanceCounter=0,M}(),Xe=K("8hTe"),pt=K.n(Xe),St=/]*>/g;function Rt(M){var c=document.createElement("div");return c.innerHTML=M,c.childNodes.length===0?"":c.childNodes[0].nodeValue}var mt=le.a=function(M){var c=M.value,E=c===void 0?"":c,k=M.edit,G=k===void 0?!1:k,N=M.className,ie=M.showTextOnly,Ee=M.showLines,je=M.replaces,$e=M.zoomImg,we=M.hasMask,nt=M.style,_t=nt===void 0?{}:nt,Tt=M.stylesPrev,Mt=Tt===void 0?{}:Tt,Ft=String(E),Dt=Object(R.useRef)(),Nt=Object(R.useRef)(),Xt=Object(R.useState)(""),zt=Object(H.a)(Xt,2),jt=zt[0],Bt=zt[1],$t=Object(R.useState)("office"),Vt=Object(H.a)($t,2),Qt=Vt[0],Ht=Vt[1],Jt=function(){var bt=new dt(Nt.current);bt.displayMode="popup",bt.addRenderEventListener(function(){var Pt=Object(I.a)(e.a.mark(function yt(kt){var At;return e.a.wrap(function(Ct){for(;;)switch(Ct.prev=Ct.next){case 0:return Dt.current.style.display="none",Ct.next=3,Object(me.a)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:"educoder.png",file:kt}});case 3:At=Ct.sent,At!=null&&At.id&&je(Nt.current.getAttribute("src").replace(z.a.API_SERVER,""),"/api/attachments/".concat(At==null?void 0:At.id,"?type=").concat(At.content_type));case 5:case"end":return Ct.stop()}},yt)}));return function(yt){return Pt.apply(this,arguments)}}()),bt.show()},Zt=function(){var bt=new lt(Nt.current);bt.settings.displayMode="popup",bt.addEventListener("render",function(){var Pt=Object(I.a)(e.a.mark(function yt(kt){var At;return e.a.wrap(function(Ct){for(;;)switch(Ct.prev=Ct.next){case 0:if(Dt.current.style.display="none",!Nt.current){Ct.next=6;break}return Ct.next=4,Object(me.a)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:"educoder.png",file:kt.dataUrl}});case 4:At=Ct.sent,At!=null&&At.id&&je(Nt.current.getAttribute("src").replace(z.a.API_SERVER,""),"/api/attachments/".concat(At==null?void 0:At.id,"?type=").concat(At.content_type));case 6:case"end":return Ct.stop()}},yt)}));return function(yt){return Pt.apply(this,arguments)}}()),bt.show(),window.markerArea=bt},Wt=Object(R.useMemo)(function(){Dt.current&&(Dt.current.style.zIndex=-1);try{var Ot=/\(\s+\/api\/attachments\/|\(\/api\/attachments\/|\(\/attachments\/download\//g,bt=/\"\/api\/attachments\/|\"\/attachments\/download\//g,Pt=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g;Ft=Ft.replace(Ot,"("+z.a.API_SERVER+"/api/attachments/").replace(bt,'"'+z.a.API_SERVER+"/api/attachments/").replace(Pt,'"'+z.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(Kt){}var yt=D(Ft),kt=T();if(Ft.match(/\[TOC\]/)&&(yt=yt.replace("[TOC]
",x()),_()),yt=yt.replace(/(__special_katext_id_\d+__)/g,function(Kt,Ct){var Yt=kt[Ct],ti=Yt.type,ii=Yt.expression;return Object(Q.renderToString)(Rt(ii)||"",{displayMode:ti==="block",throwOnError:!1,output:"html"})}),yt=yt.replace(/▁/g,"\u2581\u2581\u2581"),y(),ie){var At=document.createElement("div");return At.innerHTML=yt,At.innerText}return setTimeout(function(){return qt()},500),yt},[Ft]),Ut=Object(R.useRef)();f.WebkitLineClamp=Ee,Ee&&(_t=Object(C.a)(Object(C.a)({},_t),f));function Gt(Ot){var bt=Ot.target;if(bt.tagName.toUpperCase()==="IMG"){if($e){var Pt=bt.getAttribute("src");Bt(Pt),Ht("image")}}else if(bt.tagName.toUpperCase()==="A"){var yt=bt.getAttribute("href");if(yt.indexOf("office")>-1)Ot.preventDefault(),Bt(yt),Ht("office");else if(yt.indexOf("application/pdf")>-1)Ot.preventDefault(),Bt(yt),Ht("pdf");else if(yt.indexOf("text/html")>-1)Ot.preventDefault(),Bt(yt),Ht("html");else if(yt.startsWith("#")){Ot.preventDefault();var kt=document.getElementById(yt.replace("#",""));kt&&kt.scrollIntoView(!0)}}}var qt=function(){var bt,Pt=(bt=Ut.current)===null||bt===void 0?void 0:bt.querySelectorAll("video");Pt==null||Pt.forEach(function(yt){if(yt.oncontextmenu=function(){return!1},yt.src.indexOf(".m3u8")>-1&&!yt.canPlayType("application/vnd.apple.mpegurl")){if(W.a.isSupported()){var kt=new W.a;kt.loadSource(yt.src),kt.attachMedia(yt)}}})};Object(R.useEffect)(function(){if(Ut.current&&Wt&&(Wt.match(St)&&window.PR.prettyPrint()),Ut.current)return Ut.current.addEventListener("click",Gt),function(){Ut.current.removeEventListener("click",Gt),y(),_()}},[Wt,Ut.current,Gt]);var ei=function(bt){if(!G)return;bt.target.nodeName==="IMG"?(Dt.current.style.zIndex=1,Dt.current.style.display="flex",Dt.current.style.width=bt.target.clientWidth+"px",Dt.current.style.height=bt.target.clientHeight+"px",Dt.current.style.top=bt.target.offsetTop+"px",Dt.current.style.left=bt.target.offsetLeft+"px",Nt.current.src=bt.target.getAttribute("src")):Dt.current.style.display="none"};return p.a.createElement("div",{style:{position:"relative"}},p.a.createElement("div",{ref:Ut,style:Object(C.a)({},_t),className:"".concat(N||""," markdown-body ").concat(pt.a.mdBody),onMouseOver:ei,dangerouslySetInnerHTML:{__html:Wt}}),p.a.createElement("div",{ref:Dt,className:pt.a.button},p.a.createElement(j.a,null,p.a.createElement(B.a,{onClick:function(){return Jt()}},"\u88C1\u526A"),p.a.createElement(B.a,{onClick:function(){return Zt()}},"\u7F16\u8F91"))),p.a.createElement("img",{ref:Nt,src:"",alt:"sample",crossOrigin:"anonymous",style:{maxWidth:"90%",opacity:0,position:"absolute",zIndex:-1}}),p.a.createElement(q.a,{close:!0,data:jt,type:jt!=null&&jt.length?Qt:"",style:Object(C.a)({},Mt),onClose:function(){return Bt("")}}))}},BU3w:function(Ze,le,K){"use strict";K.d(le,"a",function(){return I});var te=K("MNnm"),j="rc-util-key";function A(H){if(H.attachTo)return H.attachTo;var U=document.querySelector("head");return U||document.body}function B(H){var U,e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!Object(te.a)())return null;var R=document.createElement("style");if((U=e.csp)===null||U===void 0?void 0:U.nonce){var p;R.nonce=(p=e.csp)===null||p===void 0?void 0:p.nonce}R.innerHTML=H;var d=A(e),l=d.firstChild;return e.prepend&&d.prepend?d.prepend(R):e.prepend&&l?d.insertBefore(R,l):d.appendChild(R),R}var C=new Map;function I(H,U){var e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},R=A(e);if(!C.has(R)){var p=B("",e),d=p.parentNode;C.set(R,d),d.removeChild(p)}var l=Array.from(C.get(R).children).find(function(r){return r.tagName==="STYLE"&&r[j]===U});if(l){var n,o;if(((n=e.csp)===null||n===void 0?void 0:n.nonce)&&l.nonce!==((o=e.csp)===null||o===void 0?void 0:o.nonce)){var u;l.nonce=(u=e.csp)===null||u===void 0?void 0:u.nonce}return l.innerHTML!==H&&(l.innerHTML=H),l}var a=B(H,e);return a[j]=U,a}},"C/vA":function(Ze,le,K){"use strict";K.d(le,"a",function(){return te});function te(j){const A=this;let B=!1,C;return function(){return B||(B=!0,C=j.apply(A,arguments)),C}}},"Cg/j":function(Ze,le,K){"use strict";K.d(le,"b",function(){return te}),K.d(le,"a",function(){return j}),K.d(le,"c",function(){return B}),K.d(le,"d",function(){return C});var te;(function(I){I.serviceIds=new Map,I.DI_TARGET="$di$target",I.DI_DEPENDENCIES="$di$dependencies";function H(U){return U[I.DI_DEPENDENCIES]||[]}I.getServiceDependencies=H})(te||(te={}));const j=B("instantiationService");function A(I,H,U,e){H[te.DI_TARGET]===H?H[te.DI_DEPENDENCIES].push({id:I,index:U,optional:e}):(H[te.DI_DEPENDENCIES]=[{id:I,index:U,optional:e}],H[te.DI_TARGET]=H)}function B(I){if(te.serviceIds.has(I))return te.serviceIds.get(I);const H=function(U,e,R){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");A(H,U,R,!1)};return H.toString=()=>I,te.serviceIds.set(I,H),H}function C(I){return function(H,U,e){if(arguments.length!==3)throw new Error("@optional-decorator can only be used to decorate a parameter");A(I,H,e,!0)}}},DlQD:function(Ze,le,K){(function(te,j){Ze.exports=j()})(this,function(){"use strict";function te(se,re){for(var ae=0;aese.length)&&(re=se.length);for(var ae=0,V=new Array(re);ae=se.length?{done:!0}:{done:!1,value:se[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 ae=se[Symbol.iterator](),ae.next.bind(ae)}function I(se,re){return re={exports:{}},se(re,re.exports),re.exports}var H=I(function(se){function re(){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 ae(V){se.exports.defaults=V}se.exports={defaults:re(),getDefaults:re,changeDefaults:ae}}),U=H.defaults,e=H.getDefaults,R=H.changeDefaults,p=/[&<>"']/,d=/[&<>"']/g,l=/[<>"']|&(?!#?\w+;)/,n=/[<>"']|&(?!#?\w+;)/g,o={"&":"&","<":"<",">":">",'"':""","'":"'"},u=function(re){return o[re]};function a(se,re){if(re){if(p.test(se))return se.replace(d,u)}else if(l.test(se))return se.replace(n,u);return se}var r=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function i(se){return se.replace(r,function(re,ae){return ae=ae.toLowerCase(),ae==="colon"?":":ae.charAt(0)==="#"?ae.charAt(1)==="x"?String.fromCharCode(parseInt(ae.substring(2),16)):String.fromCharCode(+ae.substring(1)):""})}var t=/(^|[^\[])\^/g;function _(se,re){se=se.source||se,re=re||"";var ae={replace:function(Y,$){return $=$.source||$,$=$.replace(t,"$1"),se=se.replace(Y,$),ae},getRegex:function(){return new RegExp(se,re)}};return ae}var f=/[^\w:]/g,v=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function x(se,re,ae){if(se){var V;try{V=decodeURIComponent(i(ae)).replace(f,"").toLowerCase()}catch(Y){return null}if(V.indexOf("javascript:")===0||V.indexOf("vbscript:")===0||V.indexOf("data:")===0)return null}re&&!v.test(ae)&&(ae=h(re,ae));try{ae=encodeURI(ae).replace(/%25/g,"%")}catch(Y){return null}return ae}var b={},m=/^[^:]+:\/*[^/]*$/,s=/^([^:]+:)[\s\S]*$/,g=/^([^:]+:\/*[^/]*)[\s\S]*$/;function h(se,re){b[" "+se]||(m.test(se)?b[" "+se]=se+"/":b[" "+se]=P(se,"/",!0)),se=b[" "+se];var ae=se.indexOf(":")===-1;return re.substring(0,2)==="//"?ae?re:se.replace(s,"$1")+re:re.charAt(0)==="/"?ae?re:se.replace(g,"$1")+re:se+re}var T={exec:function(){}};function y(se){for(var re=1,ae,V;re=0&&fe[Oe]==="\\";)ye=!ye;return ye?"|":" |"}),V=ae.split(/ \|/),Y=0;if(V.length>re)V.splice(re);else for(;V.length=V.length?Y.slice(V.length):Y}).join(`
`)}var he=function(){function se(ae){this.options=ae||F}var re=se.prototype;return re.space=function(V){var Y=this.rules.block.newline.exec(V);if(Y)return Y[0].length>1?{type:"space",raw:Y[0]}:{raw:`
`}},re.code=function(V,Y){var $=this.rules.block.code.exec(V);if($){var Z=Y[Y.length-1];if(Z&&Z.type==="paragraph")return{raw:$[0],text:$[0].trimRight()};var fe=$[0].replace(/^ {4}/gm,"");return{type:"code",raw:$[0],codeBlockStyle:"indented",text:this.options.pedantic?fe:O(fe,`
`)}}},re.fences=function(V){var Y=this.rules.block.fences.exec(V);if(Y){var $=Y[0],Z=me($,Y[3]||"");return{type:"code",raw:$,lang:Y[2]?Y[2].trim():Y[2],text:Z}}},re.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]}},re.nptable=function(V){var Y=this.rules.block.nptable.exec(V);if(Y){var $={type:"table",header:W(Y[1].replace(/^ *| *\| *$/g,"")),align:Y[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:Y[3]?Y[3].replace(/\n$/,"").split(`
`):[],raw:Y[0]};if($.header.length===$.align.length){var Z=$.align.length,fe;for(fe=0;fe ?/gm,"");return{type:"blockquote",raw:Y[0],text:$}}},re.list=function(V){var Y=this.rules.block.list.exec(V);if(Y){for(var $=Y[0],Z=Y[2],fe=Z.length>1,ye=Z[Z.length-1]===")",Oe={type:"list",raw:$,ordered:fe,start:fe?+Z.slice(0,-1):"",loose:!1,items:[]},Ue=Y[0].match(this.rules.block.item),We=!1,Ne,Ve,qe,ze,rt,lt,ct,et=Ue.length,ut=0;ut1||this.options.smartLists&&qe!==Z)&&(ze=Ue.slice(ut+1).join(`
`),Oe.raw=Oe.raw.substring(0,Oe.raw.length-ze.length),ut=et-1)),rt=We||/\n\n(?!\s*$)/.test(Ne),ut!==et-1&&(We=Ne.charAt(Ne.length-1)===`
`,rt||(rt=We)),rt&&(Oe.loose=!0),lt=/^\[[ xX]\] /.test(Ne),ct=void 0,lt&&(ct=Ne[1]!==" ",Ne=Ne.replace(/^\[[ xX]\] +/,"")),Oe.items.push({type:"list_item",raw:$,task:lt,checked:ct,loose:rt,text:Ne});return Oe}},re.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]):z(Y[0]):Y[0]}},re.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 $=Y[1].toLowerCase().replace(/\s+/g," ");return{tag:$,raw:Y[0],href:Y[2],title:Y[3]}}},re.table=function(V){var Y=this.rules.block.table.exec(V);if(Y){var $={type:"table",header:W(Y[1].replace(/^ *| *\| *$/g,"")),align:Y[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:Y[3]?Y[3].replace(/\n$/,"").split(`
`):[]};if($.header.length===$.align.length){$.raw=Y[0];var Z=$.align.length,fe;for(fe=0;fe/i.test(Z[0])&&(Y=!1),!$&&/^<(pre|code|kbd|script)(\s|>)/i.test(Z[0])?$=!0:$&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(Z[0])&&($=!1),{type:this.options.sanitize?"text":"html",raw:Z[0],inLink:Y,inRawBlock:$,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(Z[0]):z(Z[0]):Z[0]}},re.link=function(V){var Y=this.rules.inline.link.exec(V);if(Y){var $=Q(Y[2],"()");if($>-1){var Z=Y[0].indexOf("!")===0?5:4,fe=Z+Y[1].length+$;Y[2]=Y[2].substring(0,$),Y[0]=Y[0].substring(0,fe).trim(),Y[3]=""}var ye=Y[2],Oe="";if(this.options.pedantic){var Ue=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(ye);Ue?(ye=Ue[1],Oe=Ue[3]):Oe=""}else Oe=Y[3]?Y[3].slice(1,-1):"";ye=ye.trim().replace(/^<([\s\S]*)>$/,"$1");var We=q(Y,{href:ye&&ye.replace(this.rules.inline._escapes,"$1"),title:Oe&&Oe.replace(this.rules.inline._escapes,"$1")},Y[0]);return We}},re.reflink=function(V,Y){var $;if(($=this.rules.inline.reflink.exec(V))||($=this.rules.inline.nolink.exec(V))){var Z=($[2]||$[1]).replace(/\s+/g," ");if(Z=Y[Z.toLowerCase()],!Z||!Z.href){var fe=$[0].charAt(0);return{type:"text",raw:fe,text:fe}}var ye=q($,Z,$[0]);return ye}},re.strong=function(V,Y,$){$===void 0&&($="");var Z=this.rules.inline.strong.start.exec(V);if(Z&&(!Z[1]||Z[1]&&($===""||this.rules.inline.punctuation.exec($)))){Y=Y.slice(-1*V.length);var fe=Z[0]==="**"?this.rules.inline.strong.endAst:this.rules.inline.strong.endUnd;fe.lastIndex=0;for(var ye;(Z=fe.exec(Y))!=null;)if(ye=this.rules.inline.strong.middle.exec(Y.slice(0,Z.index+3)),ye)return{type:"strong",raw:V.slice(0,ye[0].length),text:V.slice(2,ye[0].length-2)}}},re.em=function(V,Y,$){$===void 0&&($="");var Z=this.rules.inline.em.start.exec(V);if(Z&&(!Z[1]||Z[1]&&($===""||this.rules.inline.punctuation.exec($)))){Y=Y.slice(-1*V.length);var fe=Z[0]==="*"?this.rules.inline.em.endAst:this.rules.inline.em.endUnd;fe.lastIndex=0;for(var ye;(Z=fe.exec(Y))!=null;)if(ye=this.rules.inline.em.middle.exec(Y.slice(0,Z.index+2)),ye)return{type:"em",raw:V.slice(0,ye[0].length),text:V.slice(1,ye[0].length-1)}}},re.codespan=function(V){var Y=this.rules.inline.code.exec(V);if(Y){var $=Y[2].replace(/\n/g," "),Z=/[^ ]/.test($),fe=$.startsWith(" ")&&$.endsWith(" ");return Z&&fe&&($=$.substring(1,$.length-1)),$=z($,!0),{type:"codespan",raw:Y[0],text:$}}},re.br=function(V){var Y=this.rules.inline.br.exec(V);if(Y)return{type:"br",raw:Y[0]}},re.del=function(V){var Y=this.rules.inline.del.exec(V);if(Y)return{type:"del",raw:Y[0],text:Y[1]}},re.autolink=function(V,Y){var $=this.rules.inline.autolink.exec(V);if($){var Z,fe;return $[2]==="@"?(Z=z(this.options.mangle?Y($[1]):$[1]),fe="mailto:"+Z):(Z=z($[1]),fe=Z),{type:"link",raw:$[0],text:Z,href:fe,tokens:[{type:"text",raw:Z,text:Z}]}}},re.url=function(V,Y){var $;if($=this.rules.inline.url.exec(V)){var Z,fe;if($[2]==="@")Z=z(this.options.mangle?Y($[0]):$[0]),fe="mailto:"+Z;else{var ye;do ye=$[0],$[0]=this.rules.inline._backpedal.exec($[0])[0];while(ye!==$[0]);Z=z($[0]),$[1]==="www."?fe="http://"+Z:fe=Z}return{type:"link",raw:$[0],text:Z,href:fe,tokens:[{type:"text",raw:Z,text:Z}]}}},re.inlineText=function(V,Y,$){var Z=this.rules.inline.text.exec(V);if(Z){var fe;return Y?fe=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(Z[0]):z(Z[0]):Z[0]:fe=z(this.options.smartypants?$(Z[0]):Z[0]),{type:"text",raw:Z[0],text:fe}}},se}(),ce=D.noopTest,pe=D.edit,ge=D.merge,ee={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:ce,table:ce,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html)[^\n]+)*)/,text:/^[^\n]+/};ee._label=/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,ee._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,ee.def=pe(ee.def).replace("label",ee._label).replace("title",ee._title).getRegex(),ee.bullet=/(?:[*+-]|\d{1,9}[.)])/,ee.item=/^( *)(bull) ?[^\n]*(?:\n(?!\1bull ?)[^\n]*)*/,ee.item=pe(ee.item,"gm").replace(/bull/g,ee.bullet).getRegex(),ee.list=pe(ee.list).replace(/bull/g,ee.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+ee.def.source+")").getRegex(),ee._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",ee._comment=//,ee.html=pe(ee.html,"i").replace("comment",ee._comment).replace("tag",ee._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),ee.paragraph=pe(ee._paragraph).replace("hr",ee.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",ee._tag).getRegex(),ee.blockquote=pe(ee.blockquote).replace("paragraph",ee.paragraph).getRegex(),ee.normal=ge({},ee),ee.gfm=ge({},ee.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*|$)"}),ee.gfm.nptable=pe(ee.gfm.nptable).replace("hr",ee.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",ee._tag).getRegex(),ee.gfm.table=pe(ee.gfm.table).replace("hr",ee.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",ee._tag).getRegex(),ee.pedantic=ge({},ee.normal,{html:pe(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?\\1> *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",ee._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:ce,paragraph:pe(ee.normal._paragraph).replace("hr",ee.hr).replace("heading",` *#{1,6} *[^
]`).replace("lheading",ee.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var J={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:ce,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:ce,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\?@\\[\\]`^{|}~",J.punctuation=pe(J.punctuation).replace(/punctuation/g,J._punctuation).getRegex(),J._blockSkip="\\[[^\\]]*?\\]\\([^\\)]*?\\)|`[^`]*?`|<[^>]*?>",J._overlapSkip="__[^_]*?__|\\*\\*\\[^\\*\\]*?\\*\\*",J.em.start=pe(J.em.start).replace(/punctuation/g,J._punctuation).getRegex(),J.em.middle=pe(J.em.middle).replace(/punctuation/g,J._punctuation).replace(/overlapSkip/g,J._overlapSkip).getRegex(),J.em.endAst=pe(J.em.endAst,"g").replace(/punctuation/g,J._punctuation).getRegex(),J.em.endUnd=pe(J.em.endUnd,"g").replace(/punctuation/g,J._punctuation).getRegex(),J.strong.start=pe(J.strong.start).replace(/punctuation/g,J._punctuation).getRegex(),J.strong.middle=pe(J.strong.middle).replace(/punctuation/g,J._punctuation).replace(/blockSkip/g,J._blockSkip).getRegex(),J.strong.endAst=pe(J.strong.endAst,"g").replace(/punctuation/g,J._punctuation).getRegex(),J.strong.endUnd=pe(J.strong.endUnd,"g").replace(/punctuation/g,J._punctuation).getRegex(),J.blockSkip=pe(J._blockSkip,"g").getRegex(),J.overlapSkip=pe(J._overlapSkip,"g").getRegex(),J._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,J._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,J._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])?)+(?![-_])/,J.autolink=pe(J.autolink).replace("scheme",J._scheme).replace("email",J._email).getRegex(),J._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,J.tag=pe(J.tag).replace("comment",ee._comment).replace("attribute",J._attribute).getRegex(),J._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,J._href=/<(?:\\[<>]?|[^\s<>\\])*>|[^\s\x00-\x1f]*/,J._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,J.link=pe(J.link).replace("label",J._label).replace("href",J._href).replace("title",J._title).getRegex(),J.reflink=pe(J.reflink).replace("label",J._label).getRegex(),J.reflinkSearch=pe(J.reflinkSearch,"g").replace("reflink",J.reflink).replace("nolink",J.nolink).getRegex(),J.normal=ge({},J),J.pedantic=ge({},J.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:pe(/^!?\[(label)\]\((.*?)\)/).replace("label",J._label).getRegex(),reflink:pe(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",J._label).getRegex()}),J.gfm=ge({},J.normal,{escape:pe(J.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)),re+=""+V+";";return re}var Ae=function(){function se(ae){this.tokens=[],this.tokens.links=Object.create(null),this.options=ae||Me,this.options.tokenizer=this.options.tokenizer||new he,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;var V={block:Ie.normal,inline:Fe.normal};this.options.pedantic?(V.block=Ie.pedantic,V.inline=Fe.pedantic):this.options.gfm&&(V.block=Ie.gfm,this.options.breaks?V.inline=Fe.breaks:V.inline=Fe.gfm),this.tokenizer.rules=V}se.lex=function(V,Y){var $=new se(Y);return $.lex(V)};var re=se.prototype;return re.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},re.blockTokens=function(V,Y,$){Y===void 0&&(Y=[]),$===void 0&&($=!0),V=V.replace(/^ +$/gm,"");for(var Z,fe,ye,Oe;V;){if(Z=this.tokenizer.space(V)){V=V.substring(Z.raw.length),Z.type&&Y.push(Z);continue}if(Z=this.tokenizer.code(V,Y)){V=V.substring(Z.raw.length),Z.type?Y.push(Z):(Oe=Y[Y.length-1],Oe.raw+=`
`+Z.raw,Oe.text+=`
`+Z.text);continue}if(Z=this.tokenizer.fences(V)){V=V.substring(Z.raw.length),Y.push(Z);continue}if(Z=this.tokenizer.heading(V)){V=V.substring(Z.raw.length),Y.push(Z);continue}if(Z=this.tokenizer.nptable(V)){V=V.substring(Z.raw.length),Y.push(Z);continue}if(Z=this.tokenizer.hr(V)){V=V.substring(Z.raw.length),Y.push(Z);continue}if(Z=this.tokenizer.blockquote(V)){V=V.substring(Z.raw.length),Z.tokens=this.blockTokens(Z.text,[],$),Y.push(Z);continue}if(Z=this.tokenizer.list(V)){for(V=V.substring(Z.raw.length),ye=Z.items.length,fe=0;fe0)for(;(Ue=this.tokenizer.rules.inline.reflinkSearch.exec(Oe))!=null;)We.includes(Ue[0].slice(Ue[0].lastIndexOf("[")+1,-1))&&(Oe=Oe.slice(0,Ue.index)+"["+"a".repeat(Ue[0].length-2)+"]"+Oe.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(Ue=this.tokenizer.rules.inline.blockSkip.exec(Oe))!=null;)Oe=Oe.slice(0,Ue.index)+"["+"a".repeat(Ue[0].length-2)+"]"+Oe.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;V;){if(ye=this.tokenizer.escape(V)){V=V.substring(ye.raw.length),Y.push(ye);continue}if(ye=this.tokenizer.tag(V,$,Z)){V=V.substring(ye.raw.length),$=ye.inLink,Z=ye.inRawBlock,Y.push(ye);continue}if(ye=this.tokenizer.link(V)){V=V.substring(ye.raw.length),ye.type==="link"&&(ye.tokens=this.inlineTokens(ye.text,[],!0,Z)),Y.push(ye);continue}if(ye=this.tokenizer.reflink(V,this.tokens.links)){V=V.substring(ye.raw.length),ye.type==="link"&&(ye.tokens=this.inlineTokens(ye.text,[],!0,Z)),Y.push(ye);continue}if(ye=this.tokenizer.strong(V,Oe,fe)){V=V.substring(ye.raw.length),ye.tokens=this.inlineTokens(ye.text,[],$,Z),Y.push(ye);continue}if(ye=this.tokenizer.em(V,Oe,fe)){V=V.substring(ye.raw.length),ye.tokens=this.inlineTokens(ye.text,[],$,Z),Y.push(ye);continue}if(ye=this.tokenizer.codespan(V)){V=V.substring(ye.raw.length),Y.push(ye);continue}if(ye=this.tokenizer.br(V)){V=V.substring(ye.raw.length),Y.push(ye);continue}if(ye=this.tokenizer.del(V)){V=V.substring(ye.raw.length),ye.tokens=this.inlineTokens(ye.text,[],$,Z),Y.push(ye);continue}if(ye=this.tokenizer.autolink(V,_e)){V=V.substring(ye.raw.length),Y.push(ye);continue}if(!$&&(ye=this.tokenizer.url(V,_e))){V=V.substring(ye.raw.length),Y.push(ye);continue}if(ye=this.tokenizer.inlineText(V,Z,He)){V=V.substring(ye.raw.length),fe=ye.raw.slice(-1),Y.push(ye);continue}if(V){var Ne="Infinite loop on byte: "+V.charCodeAt(0);if(this.options.silent){console.error(Ne);break}else throw new Error(Ne)}}return Y},j(se,null,[{key:"rules",get:function(){return{block:Ie,inline:Fe}}}]),se}(),Se=H.defaults,X=D.cleanUrl,ne=D.escape,ue=function(){function se(ae){this.options=ae||Se}var re=se.prototype;return re.code=function(V,Y,$){var Z=(Y||"").match(/\S*/)[0];if(this.options.highlight){var fe=this.options.highlight(V,Z);fe!=null&&fe!==V&&($=!0,V=fe)}return Z?''+($?V:ne(V,!0))+`
`:""+($?V:ne(V,!0))+`
`},re.blockquote=function(V){return`
`+V+`
`},re.html=function(V){return V},re.heading=function(V,Y,$,Z){return this.options.headerIds?"
`:""+V+"
`},re.hr=function(){return this.options.xhtml?`
`:`
`},re.list=function(V,Y,$){var Z=Y?"ol":"ul",fe=Y&&$!==1?' start="'+$+'"':"";return"<"+Z+fe+`>
`+V+""+Z+`>
`},re.listitem=function(V){return""+V+`
`},re.checkbox=function(V){return" "},re.paragraph=function(V){return""+V+`
`},re.table=function(V,Y){return Y&&(Y=""+Y+""),`
`},re.tablerow=function(V){return`
`+V+`
`},re.tablecell=function(V,Y){var $=Y.header?"th":"td",Z=Y.align?"<"+$+' align="'+Y.align+'">':"<"+$+">";return Z+V+""+$+`>
`},re.strong=function(V){return""+V+""},re.em=function(V){return""+V+""},re.codespan=function(V){return""+V+""},re.br=function(){return this.options.xhtml?"
":"
"},re.del=function(V){return""+V+""},re.link=function(V,Y,$){if(V=X(this.options.sanitize,this.options.baseUrl,V),V===null)return $;var Z='"+$+"",Z},re.image=function(V,Y,$){if(V=X(this.options.sanitize,this.options.baseUrl,V),V===null)return $;var Z='
":">",Z},re.text=function(V){return V},se}(),de=function(){function se(){}var re=se.prototype;return re.strong=function(V){return V},re.em=function(V){return V},re.codespan=function(V){return V},re.del=function(V){return V},re.html=function(V){return V},re.text=function(V){return V},re.link=function(V,Y,$){return""+$},re.image=function(V,Y,$){return""+$},re.br=function(){return""},se}(),xe=function(){function se(){this.seen={}}var re=se.prototype;return re.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 $=Y;do this.seen[$]++,Y=$+"-"+this.seen[$];while(this.seen.hasOwnProperty(Y))}return this.seen[Y]=0,Y},se}(),Te=H.defaults,Le=D.unescape,Pe=function(){function se(ae){this.options=ae||Te,this.options.renderer=this.options.renderer||new ue,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new de,this.slugger=new xe}se.parse=function(V,Y){var $=new se(Y);return $.parse(V)};var re=se.prototype;return re.parse=function(V,Y){Y===void 0&&(Y=!0);var $="",Z,fe,ye,Oe,Ue,We,Ne,Ve,qe,ze,rt,lt,ct,et,ut,gt,Lt,Ye,xt=V.length;for(Z=0;Z0&&ut.tokens[0].type==="text"?(ut.tokens[0].text=Ye+" "+ut.tokens[0].text,ut.tokens[0].tokens&&ut.tokens[0].tokens.length>0&&ut.tokens[0].tokens[0].type==="text"&&(ut.tokens[0].tokens[0].text=Ye+" "+ut.tokens[0].tokens[0].text)):ut.tokens.unshift({type:"text",text:Ye}):et+=Ye),et+=this.parse(ut.tokens,ct),qe+=this.renderer.listitem(et,Lt,gt);$+=this.renderer.list(qe,rt,lt);continue}case"html":{$+=this.renderer.html(ze.text);continue}case"paragraph":{$+=this.renderer.paragraph(this.parseInline(ze.tokens));continue}case"text":{for(qe=ze.tokens?this.parseInline(ze.tokens):ze.text;Z+1An error occurred:
"+De(ye.message+"",!0)+"
";throw ye}}ve.options=ve.setOptions=function(se){return oe(ve.defaults,se),Ge(ve.defaults),ve},ve.getDefaults=Ce,ve.defaults=Be,ve.use=function(se){var re=oe({},se);if(se.renderer&&function(){var V=ve.defaults.renderer||new ue,Y=function(fe){var ye=V[fe];V[fe]=function(){for(var Oe=arguments.length,Ue=new Array(Oe),We=0;Wet.length&&(f=t.length);_v===x){const v=t[Symbol.iterator](),x=_[Symbol.iterator]();for(;;){const b=v.next(),m=x.next();if(b.done!==m.done)return!1;if(b.done)return!0;if(!f(b.value,m.value))return!1}}j.equals=i})(te||(te={}))},LdHM:function(Ze,le,K){"use strict";K.d(le,"b",function(){return t}),K.d(le,"a",function(){return f});var te=K("1OyB"),j=K("vuIU"),A=K("Ji7U"),B=K("LK+K"),C=K("q1tI"),I=K("rePB"),H=K("Ff2n"),U=K("ODXe"),e=K("4IlW"),R=K("bX4T"),p=K("YrtM"),d=K("TSYQ"),l=K.n(d),n=K("+nKL"),o=K("8OUc"),u=function(W,z){var Q=W.prefixCls,q=W.id,me=W.flattenOptions,he=W.childrenAsData,ce=W.values,pe=W.searchValue,ge=W.multiple,ee=W.defaultActiveFirstOption,J=W.height,Re=W.itemHeight,Me=W.notFoundContent,Ie=W.open,Fe=W.menuItemSelectedIcon,He=W.virtual,_e=W.onSelect,Ae=W.onToggleOpen,Se=W.onActiveValue,X=W.onScroll,ne=W.onMouseEnter,ue="".concat(Q,"-item"),de=Object(p.a)(function(){return me},[Ie,me],function(be,se){return se[0]&&be[1]!==se[1]}),xe=C.useRef(null),Te=function(se){se.preventDefault()},Le=function(se){xe.current&&xe.current.scrollTo({index:se})},Pe=function(se){for(var re=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,ae=de.length,V=0;V1&&arguments[1]!==void 0?arguments[1]:!1;return Object(x.a)(O).map(function(z,Q){if(!C.isValidElement(z)||!z.type)return null;var q=z.type.isSelectOptGroup,me=z.key,he=z.props,ce=he.children,pe=Object(H.a)(he,["children"]);return W||!q?b(z):Object(v.a)(Object(v.a)({key:"__RC_SELECT_GRP__".concat(me===null?Q:me,"__"),label:me},pe),{},{options:m(ce)})}).filter(function(z){return z})}var s=K("2Qr1"),g=K("qNPg"),h=K("U8pU"),T=K("Kwbf"),y=K("WKfj");function w(O){var W=O.mode,z=O.options,Q=O.children,q=O.backfill,me=O.allowClear,he=O.placeholder,ce=O.getInputElement,pe=O.showSearch,ge=O.onSearch,ee=O.defaultOpen,J=O.autoFocus,Re=O.labelInValue,Me=O.value,Ie=O.inputValue,Fe=O.optionLabelProp,He=W==="multiple"||W==="tags",_e=pe!==void 0?pe:He||W==="combobox",Ae=z||m(Q);if(Object(T.a)(W!=="tags"||Ae.every(function(ue){return!ue.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),W==="tags"||W==="combobox"){var Se=Ae.some(function(ue){return ue.options?ue.options.some(function(de){return typeof("value"in de?de.value:de.key)=="number"}):typeof("value"in ue?ue.value:ue.key)=="number"});Object(T.a)(!Se,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(Object(T.a)(W!=="combobox"||!Fe,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),Object(T.a)(W==="combobox"||!q,"`backfill` only works with `combobox` mode."),Object(T.a)(W==="combobox"||!ce,"`getInputElement` only work with `combobox` mode."),Object(T.b)(W!=="combobox"||!ce||!me||!he,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),ge&&!_e&&W!=="combobox"&&W!=="tags"&&Object(T.a)(!1,"`onSearch` should work with `showSearch` instead of use alone."),Object(T.b)(!ee||J,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),Me!=null){var X=Object(y.d)(Me);Object(T.a)(!Re||X.every(function(ue){return Object(h.a)(ue)==="object"&&("key"in ue||"value"in ue)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),Object(T.a)(!He||Array.isArray(Me),"`value` should be array when `mode` is `multiple` or `tags`")}if(Q){var ne=null;Object(x.a)(Q).some(function(ue){if(!C.isValidElement(ue)||!ue.type)return!1;var de=ue.type;if(de.isSelectOption)return!1;if(de.isSelectOptGroup){var xe=Object(x.a)(ue.props.children).every(function(Te){return!C.isValidElement(Te)||!ue.type||Te.type.isSelectOption?!0:(ne=Te.type,!1)});return!xe}return ne=de,!0}),ne&&Object(T.a)(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(ne.displayName||ne.name||ne,"`.")),Object(T.a)(Ie===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}var P=w,L=Object(g.a)({prefixCls:"rc-select",components:{optionList:r},convertChildrenToData:m,flattenOptions:s.d,getLabeledValue:s.e,filterOptions:s.b,isValueDisabled:s.g,findValueOption:s.c,warningProps:P,fillOptionsWithMissingValue:s.a}),S=function(O){Object(A.a)(z,O);var W=Object(B.a)(z);function z(){var Q;return Object(te.a)(this,z),Q=W.apply(this,arguments),Q.selectRef=C.createRef(),Q.focus=function(){Q.selectRef.current.focus()},Q.blur=function(){Q.selectRef.current.blur()},Q}return Object(j.a)(z,[{key:"render",value:function(){return C.createElement(L,Object.assign({ref:this.selectRef},this.props))}}]),z}(C.Component);S.Option=t,S.OptGroup=f;var D=S,F=le.c=D},MI8n:function(Ze,le,K){"use strict";K.d(le,"c",function(){return C}),K.d(le,"b",function(){return e}),K.d(le,"e",function(){return R}),K.d(le,"a",function(){return p}),K.d(le,"d",function(){return d}),K.d(le,"f",function(){return l});var te=K("/cxE"),j=K("pmY6"),A=K("24hK"),B=K("5Y4S"),C;(function(n){n.None=()=>j.a.None;function o(w){return(P,L=null,S)=>{let D=!1,F;return F=w(O=>D?void 0:(F?F.dispose():D=!0,P.call(L,O)),null,S),D&&F.dispose(),F}}n.once=o;function u(w,P){return f((L,S=null,D)=>w(F=>L.call(S,P(F)),null,D))}n.map=u;function a(w,P){return f((L,S=null,D)=>w(F=>{P(F),L.call(S,F)},null,D))}n.forEach=a;function r(w,P){return f((L,S=null,D)=>w(F=>P(F)&&L.call(S,F),null,D))}n.filter=r;function i(w){return w}n.signal=i;function t(...w){return(P,L=null,S)=>Object(j.e)(...w.map(D=>D(F=>P.call(L,F),null,S)))}n.any=t;function _(w,P,L){let S=L;return u(w,D=>(S=P(S,D),S))}n.reduce=_;function f(w){let P;const L=new e({onFirstListenerAdd(){P=w(L.fire,L)},onLastListenerRemove(){P.dispose()}});return L.event}function v(w,P,L=100,S=!1,D){let F,O,W,z=0;const Q=new e({leakWarningThreshold:D,onFirstListenerAdd(){F=w(q=>{z++,O=P(O,q),S&&!W&&(Q.fire(O),O=void 0),clearTimeout(W),W=setTimeout(()=>{const me=O;O=void 0,W=void 0,(!S||z>1)&&Q.fire(me),z=0},L)})},onLastListenerRemove(){F.dispose()}});return Q.event}n.debounce=v;function x(w,P=(L,S)=>L===S){let L=!0,S;return r(w,D=>{const F=L||!P(D,S);return L=!1,S=D,F})}n.latch=x;function b(w,P){return[n.filter(w,P),n.filter(w,L=>!P(L))]}n.split=b;function m(w,P=!1,L=[]){let S=L.slice(),D=w(W=>{S?S.push(W):O.fire(W)});const F=()=>{S&&S.forEach(W=>O.fire(W)),S=null},O=new e({onFirstListenerAdd(){D||(D=w(W=>O.fire(W)))},onFirstListenerDidAdd(){S&&(P?setTimeout(F):F())},onLastListenerRemove(){D&&D.dispose(),D=null}});return O.event}n.buffer=m;class s{constructor(w){this.event=w}map(w){return new s(u(this.event,w))}forEach(w){return new s(a(this.event,w))}filter(w){return new s(r(this.event,w))}reduce(w,P){return new s(_(this.event,w,P))}latch(){return new s(x(this.event))}debounce(w,P=100,L=!1,S){return new s(v(this.event,w,P,L,S))}on(w,P,L){return this.event(w,P,L)}once(w,P,L){return o(this.event)(w,P,L)}}function g(w){return new s(w)}n.chain=g;function h(w,P,L=S=>S){const S=(...W)=>O.fire(L(...W)),D=()=>w.on(P,S),F=()=>w.removeListener(P,S),O=new e({onFirstListenerAdd:D,onLastListenerRemove:F});return O.event}n.fromNodeEventEmitter=h;function T(w,P,L=S=>S){const S=(...W)=>O.fire(L(...W)),D=()=>w.addEventListener(P,S),F=()=>w.removeEventListener(P,S),O=new e({onFirstListenerAdd:D,onLastListenerRemove:F});return O.event}n.fromDOMEventEmitter=T;function y(w){return new Promise(P=>o(w)(P))}n.toPromise=y})(C||(C={}));class I{constructor(n){this._listenerCount=0,this._invocationCount=0,this._elapsedOverall=0,this._name=`${n}_${I._idPool++}`}start(n){this._stopWatch=new B.a(!0),this._listenerCount=n}stop(){if(this._stopWatch){const n=this._stopWatch.elapsed();this._elapsedOverall+=n,this._invocationCount+=1,console.info(`did FIRE ${this._name}: elapsed_ms: ${n.toFixed(5)}, listener: ${this._listenerCount} (elapsed_overall: ${this._elapsedOverall.toFixed(2)}, invocations: ${this._invocationCount})`),this._stopWatch=void 0}}}I._idPool=0;let H=-1;class U{constructor(n,o=Math.random().toString(18).slice(2,5)){this.customThreshold=n,this.name=o,this._warnCountdown=0}dispose(){this._stacks&&this._stacks.clear()}check(n){let o=H;if(typeof this.customThreshold=="number"&&(o=this.customThreshold),o<=0||n{const r=this._stacks.get(u)||0;this._stacks.set(u,r-1)}}}class e{constructor(n){var o;this._disposed=!1,this._options=n,this._leakageMon=H>0?new U(this._options&&this._options.leakWarningThreshold):void 0,this._perfMon=((o=this._options)===null||o===void 0?void 0:o._profName)?new I(this._options._profName):void 0}get event(){return this._event||(this._event=(n,o,u)=>{var a;this._listeners||(this._listeners=new A.a);const r=this._listeners.isEmpty();r&&this._options&&this._options.onFirstListenerAdd&&this._options.onFirstListenerAdd(this);const i=this._listeners.push(o?[n,o]:n);r&&this._options&&this._options.onFirstListenerDidAdd&&this._options.onFirstListenerDidAdd(this),this._options&&this._options.onListenerDidAdd&&this._options.onListenerDidAdd(this,n,o);const t=(a=this._leakageMon)===null||a===void 0?void 0:a.check(this._listeners.size),_=Object(j.i)(()=>{if(t&&t(),!this._disposed&&(i(),this._options&&this._options.onLastListenerRemove)){const f=this._listeners&&!this._listeners.isEmpty();f||this._options.onLastListenerRemove(this)}});return u instanceof j.b?u.add(_):Array.isArray(u)&&u.push(_),_}),this._event}fire(n){var o,u;if(this._listeners){this._deliveryQueue||(this._deliveryQueue=new A.a);for(let a of this._listeners)this._deliveryQueue.push([a,n]);for((o=this._perfMon)===null||o===void 0||o.start(this._deliveryQueue.size);this._deliveryQueue.size>0;){const[a,r]=this._deliveryQueue.shift();try{typeof a=="function"?a.call(void 0,r):a[0].call(a[1],r)}catch(i){Object(te.f)(i)}}(u=this._perfMon)===null||u===void 0||u.stop()}}dispose(){var n,o,u,a,r;this._disposed||(this._disposed=!0,(n=this._listeners)===null||n===void 0||n.clear(),(o=this._deliveryQueue)===null||o===void 0||o.clear(),(a=(u=this._options)===null||u===void 0?void 0:u.onLastListenerRemove)===null||a===void 0||a.call(u),(r=this._leakageMon)===null||r===void 0||r.dispose())}}class R extends e{constructor(n){super(n);this._isPaused=0,this._eventQueue=new A.a,this._mergeFn=n==null?void 0:n.merge}pause(){this._isPaused++}resume(){if(this._isPaused!==0&&--this._isPaused===0)if(this._mergeFn){const n=Array.from(this._eventQueue);this._eventQueue.clear(),super.fire(this._mergeFn(n))}else for(;!this._isPaused&&this._eventQueue.size!==0;)super.fire(this._eventQueue.shift())}fire(n){this._listeners&&(this._isPaused!==0?this._eventQueue.push(n):super.fire(n))}}class p extends R{constructor(n){var o;super(n);this._delay=(o=n.delay)!==null&&o!==void 0?o:100}fire(n){this._handle||(this.pause(),this._handle=setTimeout(()=>{this._handle=void 0,this.resume()},this._delay)),super.fire(n)}}class d{constructor(){this.buffers=[]}wrapEvent(n){return(o,u,a)=>n(r=>{const i=this.buffers[this.buffers.length-1];i?i.push(()=>o.call(u,r)):o.call(u,r)},void 0,a)}bufferEvents(n){const o=[];this.buffers.push(o);const u=n();return this.buffers.pop(),o.forEach(a=>a()),u}}class l{constructor(){this.listening=!1,this.inputEvent=C.None,this.inputEventListener=j.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(n){this.inputEvent=n,this.listening&&(this.inputEventListener.dispose(),this.inputEventListener=n(this.emitter.fire,this.emitter))}dispose(){this.inputEventListener.dispose(),this.emitter.dispose()}}},MNsG:function(Ze,le,K){"use strict";(function(te,j){K.d(le,"b",function(){return u}),K.d(le,"i",function(){return t}),K.d(le,"f",function(){return _}),K.d(le,"d",function(){return f}),K.d(le,"g",function(){return v}),K.d(le,"h",function(){return x}),K.d(le,"c",function(){return b}),K.d(le,"k",function(){return m}),K.d(le,"j",function(){return s}),K.d(le,"a",function(){return g}),K.d(le,"e",function(){return y});var A;const B="en";let C=!1,I=!1,H=!1,U=!1,e=!1,R=!1,p=!1,d,l=B,n,o;const u=typeof self=="object"?self:typeof te=="object"?te:{};let a;typeof u.vscode!="undefined"&&typeof u.vscode.process!="undefined"?a=u.vscode.process:typeof j!="undefined"&&(a=j);const r=typeof((A=a==null?void 0:a.versions)===null||A===void 0?void 0:A.electron)=="string"&&a.type==="renderer";if(typeof navigator=="object"&&!r)o=navigator.userAgent,C=o.indexOf("Windows")>=0,I=o.indexOf("Macintosh")>=0,p=(o.indexOf("Macintosh")>=0||o.indexOf("iPad")>=0||o.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,H=o.indexOf("Linux")>=0,R=!0,d=navigator.language,l=d;else if(typeof a=="object"){C=a.platform==="win32",I=a.platform==="darwin",H=a.platform==="linux",U=H&&!!a.env.SNAP&&!!a.env.SNAP_REVISION,d=B,l=B;const w=a.env.VSCODE_NLS_CONFIG;if(w)try{const P=JSON.parse(w),L=P.availableLanguages["*"];d=P.locale,l=L||B,n=P._translationsConfigFile}catch(P){}e=!0}else console.error("Unable to resolve platform.");let i=0;I?i=1:C?i=3:H&&(i=2);const t=C,_=I,f=H,v=e,x=R,b=p,m=o,s=function(){if(u.setImmediate)return u.setImmediate.bind(u);if(typeof u.postMessage=="function"&&!u.importScripts){let L=[];u.addEventListener("message",D=>{if(D.data&&D.data.vscodeSetImmediateId)for(let F=0,O=L.length;F{const F=++S;L.push({id:F,callback:D}),u.postMessage({vscodeSetImmediateId:F},"*")}}if(typeof(a==null?void 0:a.nextTick)=="function")return a.nextTick.bind(a);const P=Promise.resolve();return L=>P.then(L)}(),g=I||p?2:C?1:3;let h=!0,T=!1;function y(){if(!T){T=!0;const w=new Uint8Array(2);w[0]=1,w[1]=2;const P=new Uint16Array(w.buffer);h=P[0]===(2<<8)+1}return h}}).call(this,K("IyRk"),K("Q2Ig"))},N0LK:function(Ze,le,K){"use strict";K.d(le,"C",function(){return te}),K.d(le,"v",function(){return A}),K.d(le,"s",function(){return B}),K.d(le,"t",function(){return C}),K.d(le,"U",function(){return I}),K.d(le,"J",function(){return H}),K.d(le,"O",function(){return U}),K.d(le,"p",function(){return e}),K.d(le,"T",function(){return R}),K.d(le,"q",function(){return p}),K.d(le,"N",function(){return d}),K.d(le,"M",function(){return l}),K.d(le,"Q",function(){return n}),K.d(le,"u",function(){return o}),K.d(le,"x",function(){return u}),K.d(le,"I",function(){return a}),K.d(le,"f",function(){return r}),K.d(le,"h",function(){return i}),K.d(le,"g",function(){return t}),K.d(le,"i",function(){return _}),K.d(le,"G",function(){return f}),K.d(le,"H",function(){return v}),K.d(le,"r",function(){return x}),K.d(le,"R",function(){return b}),K.d(le,"d",function(){return m}),K.d(le,"e",function(){return s}),K.d(le,"E",function(){return g}),K.d(le,"F",function(){return h}),K.d(le,"j",function(){return T}),K.d(le,"z",function(){return y}),K.d(le,"K",function(){return P}),K.d(le,"L",function(){return L}),K.d(le,"m",function(){return D}),K.d(le,"k",function(){return O}),K.d(le,"A",function(){return z}),K.d(le,"a",function(){return Q}),K.d(le,"n",function(){return q}),K.d(le,"l",function(){return me}),K.d(le,"D",function(){return he}),K.d(le,"B",function(){return ce}),K.d(le,"b",function(){return pe}),K.d(le,"S",function(){return ge}),K.d(le,"o",function(){return ee}),K.d(le,"P",function(){return J}),K.d(le,"w",function(){return Re}),K.d(le,"c",function(){return Me}),K.d(le,"y",function(){return He});function te(X){return!X||typeof X!="string"?!0:X.trim().length===0}const j=/{(\d+)}/g;function A(X,...ne){return ne.length===0?X:X.replace(j,function(ue,de){const xe=parseInt(de,10);return isNaN(xe)||xe<0||xe>=ne.length?ue:ne[xe]})}function B(X){return X.replace(/[<>&]/g,function(ne){switch(ne){case"<":return"<";case">":return">";case"&":return"&";default:return ne}})}function C(X){return X.replace(/[\\\{\}\*\+\?\|\^\$\.\[\]\(\)]/g,"\\$&")}function I(X,ne=" "){const ue=H(X,ne);return U(ue,ne)}function H(X,ne){if(!X||!ne)return X;const ue=ne.length;if(ue===0||X.length===0)return X;let de=0;for(;X.indexOf(ne,de)===de;)de=de+ue;return X.substring(de)}function U(X,ne){if(!X||!ne)return X;const ue=ne.length,de=X.length;if(ue===0||de===0)return X;let xe=de,Te=-1;for(;!(Te=X.lastIndexOf(ne,xe-1),Te===-1||Te+ue!==xe);){if(Te===0)return"";xe=Te}return X.substring(0,xe)}function e(X){return X.replace(/[\-\\\{\}\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&").replace(/[\*]/g,".*")}function R(X){return X.replace(/\*/g,"")}function p(X,ne,ue={}){if(!X)throw new Error("Cannot create regex from empty string");ne||(X=C(X)),ue.wholeWord&&(/\B/.test(X.charAt(0))||(X="\\b"+X),/\B/.test(X.charAt(X.length-1))||(X=X+"\\b"));let de="";return ue.global&&(de+="g"),ue.matchCase||(de+="i"),ue.multiline&&(de+="m"),ue.unicode&&(de+="u"),new RegExp(X,de)}function d(X){if(X.source==="^"||X.source==="^$"||X.source==="$"||X.source==="^\\s*$")return!1;const ne=X.exec("");return!!(ne&&X.lastIndex===0)}function l(X){return(X.global?"g":"")+(X.ignoreCase?"i":"")+(X.multiline?"m":"")+(X.unicode?"u":"")}function n(X){return X.split(/\r\n|\r|\n/)}function o(X){for(let ne=0,ue=X.length;ne=0;ue--){const de=X.charCodeAt(ue);if(de!==32&&de!==9)return ue}return-1}function r(X,ne){return Xne?1:0}function i(X,ne,ue=0,de=X.length,xe=0,Te=ne.length){for(;ueke)return 1}const Le=de-ue,Pe=Te-xe;return LePe?1:0}function t(X,ne){return _(X,ne,0,X.length,0,ne.length)}function _(X,ne,ue=0,de=X.length,xe=0,Te=ne.length){for(;ue=128||ke>=128)return i(X.toLowerCase(),ne.toLowerCase(),ue,de,xe,Te);f(oe)&&(oe-=32),f(ke)&&(ke-=32);const De=oe-ke;if(De===0)continue;return De}const Le=de-ue,Pe=Te-xe;return LePe?1:0}function f(X){return X>=97&&X<=122}function v(X){return X>=65&&X<=90}function x(X,ne){return X.length===ne.length&&_(X,ne)===0}function b(X,ne){const ue=ne.length;return ne.length>X.length?!1:_(X,ne,0,ue)===0}function m(X,ne){let ue,de=Math.min(X.length,ne.length);for(ue=0;ue1){const de=X.charCodeAt(ne-2);if(g(de))return T(de,ue)}return ue}function P(X,ne){const ue=Ie.getInstance(),de=ne,xe=X.length,Te=y(X,xe,ne);ne+=Te>=65536?2:1;let Le=ue.getGraphemeBreakType(Te);for(;ne=65536?2:1,Le=oe}return ne-de}function L(X,ne){const ue=Ie.getInstance(),de=ne,xe=w(X,ne);ne-=xe>=65536?2:1;let Te=ue.getGraphemeBreakType(xe);for(;ne>0;){const Le=w(X,ne),Pe=ue.getGraphemeBreakType(Le);if(Me(Pe,Te))break;ne-=Le>=65536?2:1,Te=Pe}return de-ne}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 D(X){return S.test(X)}const F=/(?:[\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(X){return F.test(X)}const W=/^[\t\n\r\x20-\x7E]*$/;function z(X){return W.test(X)}const Q=/[\u2028\u2029]/;function q(X){return Q.test(X)}function me(X){for(let ne=0,ue=X.length;ne=11904&&X<=55215||X>=63744&&X<=64255||X>=65281&&X<=65374}function ce(X){return X>=127462&&X<=127487||X===8986||X===8987||X===9200||X===9203||X>=9728&&X<=10175||X===11088||X===11093||X>=127744&&X<=128591||X>=128640&&X<=128764||X>=128992&&X<=129003||X>=129280&&X<=129535||X>=129648&&X<=129750}const pe=String.fromCharCode(65279);function ge(X){return!!(X&&X.length>0&&X.charCodeAt(0)===65279)}function ee(X,ne=!1){return X?(ne&&(X=X.replace(/\\./g,"")),X.toLowerCase()!==X):!1}function J(X){const ne=90-65+1;return X=X%(2*ne),Xne[3*de+1])de=2*de+1;else return ne[3*de+2];return 0}}Ie._INSTANCE=null;function Fe(){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 He(X,ne){if(X===0)return 0;const ue=_e(X,ne);if(ue!==void 0)return ue;const de=w(ne,X);return X-=Ae(de),X}function _e(X,ne){let ue=w(ne,X);for(X-=Ae(ue);Se(ue)||ue===65039||ue===8419;){if(X===0)return;ue=w(ne,X),X-=Ae(ue)}if(!ce(ue))return;if(X>=0){const de=w(ne,X);de===8205&&(X-=Ae(de))}return X}function Ae(X){return X>=65536?2:1}function Se(X){return 127995<=X&&X<=127999}},SJMd:function(Ze,le){/**
* @license
* Copyright (C) 2006 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/var K,te,j,A=!1,B,C;window.PR_SHOULD_USE_CONTINUATION=!0;var I,H;(function(){var U=window,e=["break,continue,do,else,for,if,return,while"],R=[e,"auto,case,char,const,default,double,enum,extern,float,goto,inline,int,long,register,restrict,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"],p=[R,"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],d=[p,"alignas,alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,delegate,dynamic_cast,explicit,export,friend,generic,late_check,mutable,namespace,noexcept,noreturn,nullptr,property,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"],l=[p,"abstract,assert,boolean,byte,extends,finally,final,implements,import,instanceof,interface,null,native,package,strictfp,super,synchronized,throws,transient"],n=[p,"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"],o="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",u=[p,"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",r=[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"],i=[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"],_=[d,n,l,u,a,r,i,t],f=/^(DIR|FILE|array|vector|(de|priority_)?queue|(forward_)?list|stack|(const_)?(reverse_)?iterator|(unordered_)?(multi)?(set|map)|bitset|u?(int|float)\d*)\b/,v="str",x="kwd",b="com",m="typ",s="lit",g="pun",h="pln",T="tag",y="dec",w="src",P="atn",L="atv",S="nocode",D="(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<=?|>>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";function F(_e){for(var Ae=0,Se=!1,X=!1,ne=0,ue=_e.length;ne122||(V<65||ae>90||Ge.push([Math.max(65,ae)|32,Math.min(V,90)|32]),V<97||ae>122||Ge.push([Math.max(97,ae)&~32,Math.min(V,122)&~32]))}}Ge.sort(function(fe,ye){return fe[0]-ye[0]||ye[1]-fe[1]});for(var Y=[],$=[],be=0;beZ[0]&&(Z[1]+1>Z[0]&&ve.push("-"),ve.push(Le(Z[1])))}return ve.push("]"),ve.join("")}function oe(De){for(var Ce=De.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")),Ge=Ce.length,Be=[],ve=0,be=0;ve=2&&ae==="["?Ce[ve]=Pe(se):ae!=="\\"&&(Ce[ve]=se.replace(/[a-zA-Z]/g,function($){var Z=$.charCodeAt(0);return"["+String.fromCharCode(Z&~32,Z|32)+"]"}))}return Ce.join("")}for(var ke=[],ne=0,ue=_e.length;ne=0;)Se[ke.charAt(De)]=oe;var Ce=oe[1],Ge=""+Ce;Te.hasOwnProperty(Ge)||(xe.push(Ce),Te[Ge]=null)}xe.push(/[\0-\uffff]/),X=F(xe)})();var ne=Ae.length,ue=function(de){for(var xe=de.sourceCode,Te=de.basePos,Le=de.sourceNode,Pe=[Te,h],oe=0,ke=xe.match(X)||[],De={},Ce=0,Ge=ke.length;Ce=5&&ve.substring(0,5)==="lang-",se&&!(be&&typeof be[1]=="string")&&(se=!1,ve=w),se||(De[Be]=ve)}var V=oe;if(oe+=Be.length,!se)Pe.push(Te+V,ve);else{var Y=be[1],$=Be.indexOf(Y),Z=$+Y.length;be[2]&&(Z=Be.length-be[2].length,$=Z-Y.length);var fe=ve.substring(5);W(Le,Te+V,Be.substring(0,$),ue,Pe),W(Le,Te+V+$,Y,J(fe,Y),Pe),W(Le,Te+V+Z,Be.substring(Z),ue,Pe)}}de.decorations=Pe};return ue}function me(_e){var Ae=[],Se=[];_e.tripleQuotedStrings?Ae.push([v,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,`'"`]):_e.multiLineStrings?Ae.push([v,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"]):Ae.push([v,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,`"'`]),_e.verbatimStrings&&Se.push([v,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null]);var X=_e.hashComments;X&&(_e.cStyleComments?(X>1?Ae.push([b,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"]):Ae.push([b,/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"]),Se.push([v,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,null])):Ae.push([b,/^#[^\r\n]*/,null,"#"])),_e.cStyleComments&&(Se.push([b,/^\/\/[^\r\n]*/,null]),Se.push([b,/^\/\*[\s\S]*?(?:\*\/|$)/,null]));var ne=_e.regexLiterals;if(ne){var ue=ne>1?"":`
\r`,de=ue?".":"[\\S\\s]",xe="/(?=[^/*"+ue+"])(?:[^/\\x5B\\x5C"+ue+"]|\\x5C"+de+"|\\x5B(?:[^\\x5C\\x5D"+ue+"]|\\x5C"+de+")*(?:\\x5D|$))+/";Se.push(["lang-regex",RegExp("^"+D+"("+xe+")")])}var Te=_e.types;Te&&Se.push([m,Te]);var Le=(""+_e.keywords).replace(/^ | $/g,"");Le.length&&Se.push([x,new RegExp("^(?:"+Le.replace(/[\s,]+/g,"|")+")\\b"),null]),Ae.push([h,/^\s+/,null,` \r
\xA0`]);var Pe="^.[^\\s\\w.$@'\"`/\\\\]*";return _e.regexLiterals&&(Pe+="(?!s*/)"),Se.push([s,/^@[a-z_$][a-z_$@0-9]*/i,null],[m,/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],[h,/^[a-z_$][a-z_$@0-9]*/i,null],[s,new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*","i"),null,"0123456789"],[h,/^\\[\s\S]?/,null],[g,new RegExp(Pe),null]),q(Ae,Se)}var he=me({keywords:_,hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0});function ce(_e,Ae,Se){for(var X=/(?:^|\s)nocode(?:\s|$)/,ne=/\r\n?|\n/,ue=_e.ownerDocument,de=ue.createElement("li");_e.firstChild;)de.appendChild(_e.firstChild);var xe=[de];function Te(Ce){var Ge=Ce.nodeType;if(Ge==1&&!X.test(Ce.className))if(Ce.nodeName==="br")Le(Ce),Ce.parentNode&&Ce.parentNode.removeChild(Ce);else for(var Be=Ce.firstChild;Be;Be=Be.nextSibling)Te(Be);else if((Ge==3||Ge==4)&&Se){var ve=Ce.nodeValue,be=ve.match(ne);if(be){var se=ve.substring(0,be.index);Ce.nodeValue=se;var re=ve.substring(be.index+be[0].length);if(re){var ae=Ce.parentNode;ae.insertBefore(ue.createTextNode(re),Ce.nextSibling)}Le(Ce),se||Ce.parentNode.removeChild(Ce)}}}function Le(Ce){for(;!Ce.nextSibling;)if(Ce=Ce.parentNode,!Ce)return;function Ge(be,se){var re=se?be.cloneNode(!1):be,ae=be.parentNode;if(ae){var V=Ge(ae,1),Y=be.nextSibling;V.appendChild(re);for(var $=Y;$;$=Y)Y=$.nextSibling,V.appendChild($)}return re}for(var Be=Ge(Ce.nextSibling,0),ve;(ve=Be.parentNode)&&ve.nodeType===1;)Be=ve;xe.push(Be)}for(var Pe=0;Pe=ae&&(Te+=2),ue>=V&&(oe+=2)}}finally{ve&&(ve.style.display=be)}}var ge={};function ee(_e,Ae){for(var Se=Ae.length;--Se>=0;){var X=Ae[Se];ge.hasOwnProperty(X)?U.console&&console.warn("cannot override language handler %s",X):ge[X]=_e}}function J(_e,Ae){return _e&&ge.hasOwnProperty(_e)||(_e=/^\s*]*(?:>|$)/],[b,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[g,/^(?:<[%?]|[%?]>)/],["lang-",/^]*>([\s\S]+?)<\/xmp\b[^>]*>/i],["lang-js",/^