From c1eed95acd4bd0ca167657fde032e3960661d6ff Mon Sep 17 00:00:00 2001 From: Alex Ritter Date: Thu, 28 Dec 2023 22:26:24 +0100 Subject: [PATCH] Fix function list bug --- dist/grapes.min.js | 4 ++-- dist/grapes.min.js.map | 2 +- package.json | 2 +- src/code_manager/model/CodeMirrorEditor.ts | 19 ++++++++++++------- src/common/traits/model/TraitList.ts | 7 +------ src/common/traits/view/TraitFunctionView.ts | 8 ++++---- 6 files changed, 21 insertions(+), 21 deletions(-) diff --git a/dist/grapes.min.js b/dist/grapes.min.js index ff6bcac271..f61a6cd25e 100644 --- a/dist/grapes.min.js +++ b/dist/grapes.min.js @@ -1,3 +1,3 @@ -/*! grapesjs - 0.21.13 */ -!function(t,e){'object'==typeof exports&&'object'==typeof module?module.exports=e():'function'==typeof define&&define.amd?define([],e):'object'==typeof exports?exports["grapesjs"]=e():t["grapesjs"]=e()}('undefined'!=typeof globalThis?globalThis:'undefined'!=typeof window?window:this,(()=>(()=>{var t={921:(t,e,n)=>{"use strict";var o,i;1&&(o=[n(94),n(838),n(600)],void 0===(i=function(t,e,n){return function(t,e,n){var o=function(e,n){return t.js_beautify(e,n)};return o.js=t.js_beautify,o.css=e.css_beautify,o.html=n.html_beautify,o.js_beautify=t.js_beautify,o.css_beautify=e.css_beautify,o.html_beautify=n.html_beautify,o}(t,e,n)}.apply(e,o))||(t.exports=i))},838:(t,e)=>{var n;!function(){var o;!function(){"use strict";var t=[,,function(t){function e(t){this.__parent=t,this.__character_count=0,this.__indent_count=-1,this.__alignment_count=0,this.__wrap_point_index=0,this.__wrap_point_character_count=0,this.__wrap_point_indent_count=-1,this.__wrap_point_alignment_count=0,this.__items=[]}function n(t,e){this.__cache=[''],this.__indent_size=t.indent_size,this.__indent_string=t.indent_char,t.indent_with_tabs||(this.__indent_string=new Array(t.indent_size+1).join(t.indent_char)),e=e||'',t.indent_level>0&&(e=new Array(t.indent_level+1).join(this.__indent_string)),this.__base_string=e,this.__base_string_length=e.length}function o(t,o){this.__indent_cache=new n(t,o),this.raw=!1,this._end_with_newline=t.end_with_newline,this.indent_size=t.indent_size,this.wrap_line_length=t.wrap_line_length,this.indent_empty_lines=t.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new e(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}e.prototype.clone_empty=function(){var t=new e(this.__parent);return t.set_indent(this.__indent_count,this.__alignment_count),t},e.prototype.item=function(t){return t<0?this.__items[this.__items.length+t]:this.__items[t]},e.prototype.has_match=function(t){for(var e=this.__items.length-1;e>=0;e--)if(this.__items[e].match(t))return!0;return!1},e.prototype.set_indent=function(t,e){this.is_empty()&&(this.__indent_count=t||0,this.__alignment_count=e||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},e.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)},e.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},e.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var t=this.__parent.current_line;return t.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),t.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),t.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count," "===t.__items[0]&&(t.__items.splice(0,1),t.__character_count-=1),!0}return!1},e.prototype.is_empty=function(){return 0===this.__items.length},e.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},e.prototype.push=function(t){this.__items.push(t);var e=t.lastIndexOf('\n');-1!==e?this.__character_count=t.length-e:this.__character_count+=t.length},e.prototype.pop=function(){var t=null;return this.is_empty()||(t=this.__items.pop(),this.__character_count-=t.length),t},e.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},e.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},e.prototype.trim=function(){for(;' '===this.last();)this.__items.pop(),this.__character_count-=1},e.prototype.toString=function(){var t='';return this.is_empty()?this.__parent.indent_empty_lines&&(t=this.__parent.get_indent_string(this.__indent_count)):(t=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),t+=this.__items.join('')),t},n.prototype.get_indent_size=function(t,e){var n=this.__base_string_length;return e=e||0,t<0&&(n=0),n+=t*this.__indent_size,n+=e},n.prototype.get_indent_string=function(t,e){var n=this.__base_string;return e=e||0,t<0&&(t=0,n=''),e+=t*this.__indent_size,this.__ensure_cache(e),n+=this.__cache[e]},n.prototype.__ensure_cache=function(t){for(;t>=this.__cache.length;)this.__add_column()},n.prototype.__add_column=function(){var t=this.__cache.length,e=0,n='';this.__indent_size&&t>=this.__indent_size&&(t-=(e=Math.floor(t/this.__indent_size))*this.__indent_size,n=new Array(e+1).join(this.__indent_string)),t&&(n+=new Array(t+1).join(' ')),this.__cache.push(n)},o.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},o.prototype.get_line_number=function(){return this.__lines.length},o.prototype.get_indent_string=function(t,e){return this.__indent_cache.get_indent_string(t,e)},o.prototype.get_indent_size=function(t,e){return this.__indent_cache.get_indent_size(t,e)},o.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},o.prototype.add_new_line=function(t){return!(this.is_empty()||!t&&this.just_added_newline())&&(this.raw||this.__add_outputline(),!0)},o.prototype.get_code=function(t){this.trim(!0);var e=this.current_line.pop();e&&('\n'===e[e.length-1]&&(e=e.replace(/\n+$/g,'')),this.current_line.push(e)),this._end_with_newline&&this.__add_outputline();var n=this.__lines.join('\n');return'\n'!==t&&(n=n.replace(/[\n]/g,t)),n},o.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},o.prototype.set_indent=function(t,e){return t=t||0,e=e||0,this.next_line.set_indent(t,e),this.__lines.length>1?(this.current_line.set_indent(t,e),!0):(this.current_line.set_indent(),!1)},o.prototype.add_raw_token=function(t){for(var e=0;e1&&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},o.prototype.just_added_newline=function(){return this.current_line.is_empty()},o.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},o.prototype.ensure_empty_line_above=function(t,n){for(var o=this.__lines.length-2;o>=0;){var i=this.__lines[o];if(i.is_empty())break;if(0!==i.item(0).indexOf(t)&&i.item(-1)!==n){this.__lines.splice(o+1,0,new e(this)),this.previous_line=this.__lines[this.__lines.length-2];break}o--}},t.exports.Output=o},,,,function(t){function e(t,e){this.raw_options=n(t,e),this.disabled=this._get_boolean('disabled'),this.eol=this._get_characters('eol','auto'),this.end_with_newline=this._get_boolean('end_with_newline'),this.indent_size=this._get_number('indent_size',4),this.indent_char=this._get_characters('indent_char',' '),this.indent_level=this._get_number('indent_level'),this.preserve_newlines=this._get_boolean('preserve_newlines',!0),this.max_preserve_newlines=this._get_number('max_preserve_newlines',32786),this.preserve_newlines||(this.max_preserve_newlines=0),this.indent_with_tabs=this._get_boolean('indent_with_tabs','\t'===this.indent_char),this.indent_with_tabs&&(this.indent_char='\t',1===this.indent_size&&(this.indent_size=4)),this.wrap_line_length=this._get_number('wrap_line_length',this._get_number('max_char')),this.indent_empty_lines=this._get_boolean('indent_empty_lines'),this.templating=this._get_selection_list('templating',['auto','none','django','erb','handlebars','php','smarty'],['auto'])}function n(t,e){var n,i={};for(n in t=o(t))n!==e&&(i[n]=t[n]);if(e&&t[e])for(n in t[e])i[n]=t[e][n];return i}function o(t){var e,n={};for(e in t){n[e.replace(/-/g,"_")]=t[e]}return n}e.prototype._get_array=function(t,e){var n=this.raw_options[t],o=e||[];return'object'==typeof n?null!==n&&'function'==typeof n.concat&&(o=n.concat()):'string'==typeof n&&(o=n.split(/[^a-zA-Z0-9_\/\-]+/)),o},e.prototype._get_boolean=function(t,e){var n=this.raw_options[t];return void 0===n?!!e:!!n},e.prototype._get_characters=function(t,e){var n=this.raw_options[t],o=e||'';return'string'==typeof n&&(o=n.replace(/\\r/,'\r').replace(/\\n/,'\n').replace(/\\t/,'\t')),o},e.prototype._get_number=function(t,e){var n=this.raw_options[t];e=parseInt(e,10),isNaN(e)&&(e=0);var o=parseInt(n,10);return isNaN(o)&&(o=e),o},e.prototype._get_selection=function(t,e,n){var o=this._get_selection_list(t,e,n);if(1!==o.length)throw new Error("Invalid Option Value: The option '"+t+"' can only be one of the following values:\n"+e+"\nYou passed in: '"+this.raw_options[t]+"'");return o[0]},e.prototype._get_selection_list=function(t,e,n){if(!e||0===e.length)throw new Error("Selection list cannot be empty.");if(n=n||[e[0]],!this._is_valid_selection(n,e))throw new Error("Invalid Default Value!");var o=this._get_array(t,n);if(!this._is_valid_selection(o,e))throw new Error("Invalid Option Value: The option '"+t+"' can contain only the following values:\n"+e+"\nYou passed in: '"+this.raw_options[t]+"'");return o},e.prototype._is_valid_selection=function(t,e){return t.length&&e.length&&!t.some((function(t){return-1===e.indexOf(t)}))},t.exports.Options=e,t.exports.normalizeOpts=o,t.exports.mergeOpts=n},,function(t){var e=RegExp.prototype.hasOwnProperty('sticky');function n(t){this.__input=t||'',this.__input_length=this.__input.length,this.__position=0}n.prototype.restart=function(){this.__position=0},n.prototype.back=function(){this.__position>0&&(this.__position-=1)},n.prototype.hasNext=function(){return this.__position=0&&t=0&&e=t.length&&this.__input.substring(e-t.length,e).toLowerCase()===t},t.exports.InputScanner=n},,,,,function(t){function e(t,e){t='string'==typeof t?t:t.source,e='string'==typeof e?e:e.source,this.__directives_block_pattern=new RegExp(t+/ beautify( \w+[:]\w+)+ /.source+e,'g'),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(t+/\sbeautify\signore:end\s/.source+e,'g')}e.prototype.get_directives=function(t){if(!t.match(this.__directives_block_pattern))return null;var e={};this.__directive_pattern.lastIndex=0;for(var n=this.__directive_pattern.exec(t);n;)e[n[1]]=n[2],n=this.__directive_pattern.exec(t);return e},e.prototype.readIgnored=function(t){return t.readUntilAfter(this.__directives_end_ignore_pattern)},t.exports.Directives=e},,function(t,e,n){var o=n(16).Beautifier,i=n(17).Options;t.exports=function(t,e){return new o(t,e).beautify()},t.exports.defaultOptions=function(){return new i}},function(t,e,n){var o=n(17).Options,i=n(2).Output,r=n(8).InputScanner,s=new(0,n(13).Directives)(/\/\*/,/\*\//),a=/\r\n|[\r\n]/,l=/\r\n|[\r\n]/g,c=/\s/,u=/(?:\s|\n)+/g,h=/\/\*(?:[\s\S]*?)((?:\*\/)|$)/g,p=/\/\/(?:[^\n\r\u2028\u2029]*)/g;function d(t,e){this._source_text=t||'',this._options=new o(e),this._ch=null,this._input=null,this.NESTED_AT_RULE={page:!0,"font-face":!0,keyframes:!0,media:!0,supports:!0,document:!0},this.CONDITIONAL_GROUP_RULE={media:!0,supports:!0,document:!0},this.NON_SEMICOLON_NEWLINE_PROPERTY=["grid-template-areas","grid-template"]}d.prototype.eatString=function(t){var e='';for(this._ch=this._input.next();this._ch;){if(e+=this._ch,"\\"===this._ch)e+=this._input.next();else if(-1!==t.indexOf(this._ch)||"\n"===this._ch)break;this._ch=this._input.next()}return e},d.prototype.eatWhitespace=function(t){for(var e=c.test(this._input.peek()),n=0;c.test(this._input.peek());)this._ch=this._input.next(),t&&'\n'===this._ch&&(0===n||n0&&this._indentLevel--},d.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var t=this._source_text,e=this._options.eol;'auto'===e&&(e='\n',t&&a.test(t||'')&&(e=t.match(a)[0]));var n=(t=t.replace(l,'\n')).match(/^[\t ]*/)[0];this._output=new i(this._options,n),this._input=new r(t),this._indentLevel=0,this._nestedLevel=0,this._ch=null;for(var o,d,f=0,g=!1,m=!1,v=!1,y=!1,_=!1,O=this._ch,b=!1;1&&(o=''!==this._input.read(u),d=O,this._ch=this._input.next(),'\\'===this._ch&&this._input.hasNext()&&(this._ch+=this._input.next()),O=this._ch,this._ch);)if('/'===this._ch&&'*'===this._input.peek()){this._output.add_new_line(),this._input.back();var w=this._input.read(h),x=s.get_directives(w);x&&'start'===x.ignore&&(w+=s.readIgnored(this._input)),this.print_string(w),this.eatWhitespace(!0),this._output.add_new_line()}else if('/'===this._ch&&'/'===this._input.peek())this._output.space_before_token=!0,this._input.back(),this.print_string(this._input.read(p)),this.eatWhitespace(!0);else if('$'===this._ch){this.preserveSingleSpace(o),this.print_string(this._ch);var S=this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);S.match(/[ :]$/)&&(S=this.eatString(": ").replace(/\s+$/,''),this.print_string(S),this._output.space_before_token=!0),0===f&&-1!==S.indexOf(':')&&(m=!0,this.indent())}else if('@'===this._ch)if(this.preserveSingleSpace(o),'{'===this._input.peek())this.print_string(this._ch+this.eatString('}'));else{this.print_string(this._ch);var k=this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);k.match(/[ :]$/)&&(k=this.eatString(": ").replace(/\s+$/,''),this.print_string(k),this._output.space_before_token=!0),0===f&&-1!==k.indexOf(':')?(m=!0,this.indent()):k in this.NESTED_AT_RULE?(this._nestedLevel+=1,k in this.CONDITIONAL_GROUP_RULE&&(v=!0)):0!==f||m||(y=!0)}else if('#'===this._ch&&'{'===this._input.peek())this.preserveSingleSpace(o),this.print_string(this._ch+this.eatString('}'));else if('{'===this._ch)m&&(m=!1,this.outdent()),y=!1,v?(v=!1,g=this._indentLevel>=this._nestedLevel):g=this._indentLevel>=this._nestedLevel-1,this._options.newline_between_rules&&g&&this._output.previous_line&&'{'!==this._output.previous_line.item(-1)&&this._output.ensure_empty_line_above('/',','),this._output.space_before_token=!0,'expand'===this._options.brace_style?(this._output.add_new_line(),this.print_string(this._ch),this.indent(),this._output.set_indent(this._indentLevel)):('('===d?this._output.space_before_token=!1:','!==d&&this.indent(),this.print_string(this._ch)),this.eatWhitespace(!0),this._output.add_new_line();else if('}'===this._ch)this.outdent(),this._output.add_new_line(),'{'===d&&this._output.trim(!0),m&&(this.outdent(),m=!1),this.print_string(this._ch),g=!1,this._nestedLevel&&this._nestedLevel--,this.eatWhitespace(!0),this._output.add_new_line(),this._options.newline_between_rules&&!this._output.just_added_blankline()&&'}'!==this._input.peek()&&this._output.add_new_line(!0),')'===this._input.peek()&&(this._output.trim(!0),"expand"===this._options.brace_style&&this._output.add_new_line(!0));else if(":"===this._ch){for(var P=0;P'!==this._ch&&'+'!==this._ch&&'~'!==this._ch||m||0!==f)if(']'===this._ch)this.print_string(this._ch);else if('['===this._ch)this.preserveSingleSpace(o),this.print_string(this._ch);else if('='===this._ch)this.eatWhitespace(),this.print_string('='),c.test(this._ch)&&(this._ch='');else if('!'!==this._ch||this._input.lookBack("\\")){var E='"'===d||'\''===d;this.preserveSingleSpace(E||o),this.print_string(this._ch),!this._output.just_added_newline()&&'\n'===this._input.peek()&&b&&this._output.add_new_line()}else this._output.space_before_token=!0,this.print_string(this._ch);else this._options.space_around_combinator?(this._output.space_before_token=!0,this.print_string(this._ch),this._output.space_before_token=!0):(this.print_string(this._ch),this.eatWhitespace(),this._ch&&c.test(this._ch)&&(this._ch=''));return this._output.get_code(e)},t.exports.Beautifier=d},function(t,e,n){var o=n(6).Options;function i(t){o.call(this,t,'css'),this.selector_separator_newline=this._get_boolean('selector_separator_newline',!0),this.newline_between_rules=this._get_boolean('newline_between_rules',!0);var e=this._get_boolean('space_around_selector_separator');this.space_around_combinator=this._get_boolean('space_around_combinator')||e;var n=this._get_selection_list('brace_style',['collapse','expand','end-expand','none','preserve-inline']);this.brace_style='collapse';for(var i=0;i{var o,i;!function(){var r;!function(){"use strict";var t=[,,function(t){function e(t){this.__parent=t,this.__character_count=0,this.__indent_count=-1,this.__alignment_count=0,this.__wrap_point_index=0,this.__wrap_point_character_count=0,this.__wrap_point_indent_count=-1,this.__wrap_point_alignment_count=0,this.__items=[]}function n(t,e){this.__cache=[''],this.__indent_size=t.indent_size,this.__indent_string=t.indent_char,t.indent_with_tabs||(this.__indent_string=new Array(t.indent_size+1).join(t.indent_char)),e=e||'',t.indent_level>0&&(e=new Array(t.indent_level+1).join(this.__indent_string)),this.__base_string=e,this.__base_string_length=e.length}function o(t,o){this.__indent_cache=new n(t,o),this.raw=!1,this._end_with_newline=t.end_with_newline,this.indent_size=t.indent_size,this.wrap_line_length=t.wrap_line_length,this.indent_empty_lines=t.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new e(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}e.prototype.clone_empty=function(){var t=new e(this.__parent);return t.set_indent(this.__indent_count,this.__alignment_count),t},e.prototype.item=function(t){return t<0?this.__items[this.__items.length+t]:this.__items[t]},e.prototype.has_match=function(t){for(var e=this.__items.length-1;e>=0;e--)if(this.__items[e].match(t))return!0;return!1},e.prototype.set_indent=function(t,e){this.is_empty()&&(this.__indent_count=t||0,this.__alignment_count=e||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},e.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)},e.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},e.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var t=this.__parent.current_line;return t.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),t.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),t.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count," "===t.__items[0]&&(t.__items.splice(0,1),t.__character_count-=1),!0}return!1},e.prototype.is_empty=function(){return 0===this.__items.length},e.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},e.prototype.push=function(t){this.__items.push(t);var e=t.lastIndexOf('\n');-1!==e?this.__character_count=t.length-e:this.__character_count+=t.length},e.prototype.pop=function(){var t=null;return this.is_empty()||(t=this.__items.pop(),this.__character_count-=t.length),t},e.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},e.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},e.prototype.trim=function(){for(;' '===this.last();)this.__items.pop(),this.__character_count-=1},e.prototype.toString=function(){var t='';return this.is_empty()?this.__parent.indent_empty_lines&&(t=this.__parent.get_indent_string(this.__indent_count)):(t=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),t+=this.__items.join('')),t},n.prototype.get_indent_size=function(t,e){var n=this.__base_string_length;return e=e||0,t<0&&(n=0),n+=t*this.__indent_size,n+=e},n.prototype.get_indent_string=function(t,e){var n=this.__base_string;return e=e||0,t<0&&(t=0,n=''),e+=t*this.__indent_size,this.__ensure_cache(e),n+=this.__cache[e]},n.prototype.__ensure_cache=function(t){for(;t>=this.__cache.length;)this.__add_column()},n.prototype.__add_column=function(){var t=this.__cache.length,e=0,n='';this.__indent_size&&t>=this.__indent_size&&(t-=(e=Math.floor(t/this.__indent_size))*this.__indent_size,n=new Array(e+1).join(this.__indent_string)),t&&(n+=new Array(t+1).join(' ')),this.__cache.push(n)},o.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},o.prototype.get_line_number=function(){return this.__lines.length},o.prototype.get_indent_string=function(t,e){return this.__indent_cache.get_indent_string(t,e)},o.prototype.get_indent_size=function(t,e){return this.__indent_cache.get_indent_size(t,e)},o.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},o.prototype.add_new_line=function(t){return!(this.is_empty()||!t&&this.just_added_newline())&&(this.raw||this.__add_outputline(),!0)},o.prototype.get_code=function(t){this.trim(!0);var e=this.current_line.pop();e&&('\n'===e[e.length-1]&&(e=e.replace(/\n+$/g,'')),this.current_line.push(e)),this._end_with_newline&&this.__add_outputline();var n=this.__lines.join('\n');return'\n'!==t&&(n=n.replace(/[\n]/g,t)),n},o.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},o.prototype.set_indent=function(t,e){return t=t||0,e=e||0,this.next_line.set_indent(t,e),this.__lines.length>1?(this.current_line.set_indent(t,e),!0):(this.current_line.set_indent(),!1)},o.prototype.add_raw_token=function(t){for(var e=0;e1&&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},o.prototype.just_added_newline=function(){return this.current_line.is_empty()},o.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},o.prototype.ensure_empty_line_above=function(t,n){for(var o=this.__lines.length-2;o>=0;){var i=this.__lines[o];if(i.is_empty())break;if(0!==i.item(0).indexOf(t)&&i.item(-1)!==n){this.__lines.splice(o+1,0,new e(this)),this.previous_line=this.__lines[this.__lines.length-2];break}o--}},t.exports.Output=o},function(t){t.exports.Token=function(t,e,n,o){this.type=t,this.text=e,this.comments_before=null,this.newlines=n||0,this.whitespace_before=o||'',this.parent=null,this.next=null,this.previous=null,this.opened=null,this.closed=null,this.directives=null}},,,function(t){function e(t,e){this.raw_options=n(t,e),this.disabled=this._get_boolean('disabled'),this.eol=this._get_characters('eol','auto'),this.end_with_newline=this._get_boolean('end_with_newline'),this.indent_size=this._get_number('indent_size',4),this.indent_char=this._get_characters('indent_char',' '),this.indent_level=this._get_number('indent_level'),this.preserve_newlines=this._get_boolean('preserve_newlines',!0),this.max_preserve_newlines=this._get_number('max_preserve_newlines',32786),this.preserve_newlines||(this.max_preserve_newlines=0),this.indent_with_tabs=this._get_boolean('indent_with_tabs','\t'===this.indent_char),this.indent_with_tabs&&(this.indent_char='\t',1===this.indent_size&&(this.indent_size=4)),this.wrap_line_length=this._get_number('wrap_line_length',this._get_number('max_char')),this.indent_empty_lines=this._get_boolean('indent_empty_lines'),this.templating=this._get_selection_list('templating',['auto','none','django','erb','handlebars','php','smarty'],['auto'])}function n(t,e){var n,i={};for(n in t=o(t))n!==e&&(i[n]=t[n]);if(e&&t[e])for(n in t[e])i[n]=t[e][n];return i}function o(t){var e,n={};for(e in t){n[e.replace(/-/g,"_")]=t[e]}return n}e.prototype._get_array=function(t,e){var n=this.raw_options[t],o=e||[];return'object'==typeof n?null!==n&&'function'==typeof n.concat&&(o=n.concat()):'string'==typeof n&&(o=n.split(/[^a-zA-Z0-9_\/\-]+/)),o},e.prototype._get_boolean=function(t,e){var n=this.raw_options[t];return void 0===n?!!e:!!n},e.prototype._get_characters=function(t,e){var n=this.raw_options[t],o=e||'';return'string'==typeof n&&(o=n.replace(/\\r/,'\r').replace(/\\n/,'\n').replace(/\\t/,'\t')),o},e.prototype._get_number=function(t,e){var n=this.raw_options[t];e=parseInt(e,10),isNaN(e)&&(e=0);var o=parseInt(n,10);return isNaN(o)&&(o=e),o},e.prototype._get_selection=function(t,e,n){var o=this._get_selection_list(t,e,n);if(1!==o.length)throw new Error("Invalid Option Value: The option '"+t+"' can only be one of the following values:\n"+e+"\nYou passed in: '"+this.raw_options[t]+"'");return o[0]},e.prototype._get_selection_list=function(t,e,n){if(!e||0===e.length)throw new Error("Selection list cannot be empty.");if(n=n||[e[0]],!this._is_valid_selection(n,e))throw new Error("Invalid Default Value!");var o=this._get_array(t,n);if(!this._is_valid_selection(o,e))throw new Error("Invalid Option Value: The option '"+t+"' can contain only the following values:\n"+e+"\nYou passed in: '"+this.raw_options[t]+"'");return o},e.prototype._is_valid_selection=function(t,e){return t.length&&e.length&&!t.some((function(t){return-1===e.indexOf(t)}))},t.exports.Options=e,t.exports.normalizeOpts=o,t.exports.mergeOpts=n},,function(t){var e=RegExp.prototype.hasOwnProperty('sticky');function n(t){this.__input=t||'',this.__input_length=this.__input.length,this.__position=0}n.prototype.restart=function(){this.__position=0},n.prototype.back=function(){this.__position>0&&(this.__position-=1)},n.prototype.hasNext=function(){return this.__position=0&&t=0&&e=t.length&&this.__input.substring(e-t.length,e).toLowerCase()===t},t.exports.InputScanner=n},function(t,e,n){var o=n(8).InputScanner,i=n(3).Token,r=n(10).TokenStream,s=n(11).WhitespacePattern,a={START:'TK_START',RAW:'TK_RAW',EOF:'TK_EOF'},l=function(t,e){this._input=new o(t),this._options=e||{},this.__tokens=null,this._patterns={},this._patterns.whitespace=new s(this._input)};l.prototype.tokenize=function(){var t;this._input.restart(),this.__tokens=new r,this._reset();for(var e=new i(a.START,''),n=null,o=[],s=new r;e.type!==a.EOF;){for(t=this._get_next_token(e,n);this._is_comment(t);)s.add(t),t=this._get_next_token(e,n);s.isEmpty()||(t.comments_before=s,s=new r),t.parent=n,this._is_opening(t)?(o.push(n),n=t):n&&this._is_closing(t,n)&&(t.opened=n,n.closed=t,n=o.pop(),t.parent=n),t.previous=e,e.next=t,this.__tokens.add(t),e=t}return this.__tokens},l.prototype._is_first_token=function(){return this.__tokens.isEmpty()},l.prototype._reset=function(){},l.prototype._get_next_token=function(t,e){this._readWhitespace();var n=this._input.read(/.+/g);return n?this._create_token(a.RAW,n):this._create_token(a.EOF,'')},l.prototype._is_comment=function(t){return!1},l.prototype._is_opening=function(t){return!1},l.prototype._is_closing=function(t,e){return!1},l.prototype._create_token=function(t,e){return new i(t,e,this._patterns.whitespace.newline_count,this._patterns.whitespace.whitespace_before_token)},l.prototype._readWhitespace=function(){return this._patterns.whitespace.read()},t.exports.Tokenizer=l,t.exports.TOKEN=a},function(t){function e(t){this.__tokens=[],this.__tokens_length=this.__tokens.length,this.__position=0,this.__parent_token=t}e.prototype.restart=function(){this.__position=0},e.prototype.isEmpty=function(){return 0===this.__tokens_length},e.prototype.hasNext=function(){return this.__position=0&&t/),erb:n.starting_with(/<%[^%]/).until_after(/[^%]%>/),django:n.starting_with(/{%/).until_after(/%}/),django_value:n.starting_with(/{{/).until_after(/}}/),django_comment:n.starting_with(/{#/).until_after(/#}/),smarty:n.starting_with(/{(?=[^}{\s\n])/).until_after(/[^\s\n]}/),smarty_comment:n.starting_with(/{\*/).until_after(/\*}/),smarty_literal:n.starting_with(/{literal}/).until_after(/{\/literal}/)}}r.prototype=new o,r.prototype._create=function(){return new r(this._input,this)},r.prototype._update=function(){this.__set_templated_pattern()},r.prototype.disable=function(t){var e=this._create();return e._disabled[t]=!0,e._update(),e},r.prototype.read_options=function(t){var e=this._create();for(var n in i)e._disabled[n]=-1===t.templating.indexOf(n);return e._update(),e},r.prototype.exclude=function(t){var e=this._create();return e._excluded[t]=!0,e._update(),e},r.prototype.read=function(){var t='';t=this._match_pattern?this._input.read(this._starting_pattern):this._input.read(this._starting_pattern,this.__template_pattern);for(var e=this._read_template();e;)this._match_pattern?e+=this._input.read(this._match_pattern):e+=this._input.readUntil(this.__template_pattern),t+=e,e=this._read_template();return this._until_after&&(t+=this._input.readUntilAfter(this._until_pattern)),t},r.prototype.__set_templated_pattern=function(){var t=[];this._disabled.php||t.push(this.__patterns.php._starting_pattern.source),this._disabled.handlebars||t.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.erb||t.push(this.__patterns.erb._starting_pattern.source),this._disabled.django||(t.push(this.__patterns.django._starting_pattern.source),t.push(this.__patterns.django_value._starting_pattern.source),t.push(this.__patterns.django_comment._starting_pattern.source)),this._disabled.smarty||t.push(this.__patterns.smarty._starting_pattern.source),this._until_pattern&&t.push(this._until_pattern.source),this.__template_pattern=this._input.get_regexp('(?:'+t.join('|')+')')},r.prototype._read_template=function(){var t='',e=this._input.peek();if('<'===e){var n=this._input.peek(1);this._disabled.php||this._excluded.php||'?'!==n||(t=t||this.__patterns.php.read()),this._disabled.erb||this._excluded.erb||'%'!==n||(t=t||this.__patterns.erb.read())}else'{'===e&&(this._disabled.handlebars||this._excluded.handlebars||(t=(t=(t=t||this.__patterns.handlebars_comment.read())||this.__patterns.handlebars_unescaped.read())||this.__patterns.handlebars.read()),this._disabled.django||(this._excluded.django||this._excluded.handlebars||(t=t||this.__patterns.django_value.read()),this._excluded.django||(t=(t=t||this.__patterns.django_comment.read())||this.__patterns.django.read())),this._disabled.smarty||this._disabled.django&&this._disabled.handlebars&&(t=(t=(t=t||this.__patterns.smarty_comment.read())||this.__patterns.smarty_literal.read())||this.__patterns.smarty.read()));return t},t.exports.TemplatablePattern=r},,,,function(t,e,n){var o=n(19).Beautifier,i=n(20).Options;t.exports=function(t,e,n,i){return new o(t,e,n,i).beautify()},t.exports.defaultOptions=function(){return new i}},function(t,e,n){var o=n(20).Options,i=n(2).Output,r=n(21).Tokenizer,s=n(21).TOKEN,a=/\r\n|[\r\n]/,l=/\r\n|[\r\n]/g,c=function(t,e){this.indent_level=0,this.alignment_size=0,this.max_preserve_newlines=t.max_preserve_newlines,this.preserve_newlines=t.preserve_newlines,this._output=new i(t,e)};c.prototype.current_line_has_match=function(t){return this._output.current_line.has_match(t)},c.prototype.set_space_before_token=function(t,e){this._output.space_before_token=t,this._output.non_breaking_space=e},c.prototype.set_wrap_point=function(){this._output.set_indent(this.indent_level,this.alignment_size),this._output.set_wrap_point()},c.prototype.add_raw_token=function(t){this._output.add_raw_token(t)},c.prototype.print_preserved_newlines=function(t){var e=0;t.type!==s.TEXT&&t.previous.type!==s.TEXT&&(e=t.newlines?1:0),this.preserve_newlines&&(e=t.newlines0);return 0!==e},c.prototype.traverse_whitespace=function(t){return!(!t.whitespace_before&&!t.newlines)&&(this.print_preserved_newlines(t)||(this._output.space_before_token=!0),!0)},c.prototype.previous_token_wrapped=function(){return this._output.previous_token_wrapped},c.prototype.print_newline=function(t){this._output.add_new_line(t)},c.prototype.print_token=function(t){t.text&&(this._output.set_indent(this.indent_level,this.alignment_size),this._output.add_token(t.text))},c.prototype.indent=function(){this.indent_level++},c.prototype.get_full_indent=function(t){return(t=this.indent_level+(t||0))<1?'':this._output.get_indent_string(t)};var u=function(t,e){var n=null,o=null;return e.closed?('script'===t?n='text/javascript':'style'===t&&(n='text/css'),n=function(t){for(var e=null,n=t.next;n.type!==s.EOF&&t.closed!==n;){if(n.type===s.ATTRIBUTE&&'type'===n.text){n.next&&n.next.type===s.EQUALS&&n.next.next&&n.next.next.type===s.VALUE&&(e=n.next.next.text);break}n=n.next}return e}(e)||n,n.search('text/css')>-1?o='css':n.search(/module|((text|application|dojo)\/(x-)?(javascript|ecmascript|jscript|livescript|(ld\+)?json|method|aspect))/)>-1?o='javascript':n.search(/(text|application|dojo)\/(x-)?(html)/)>-1?o='html':n.search(/test\/null/)>-1&&(o='null'),o):null};function h(t,e){return-1!==e.indexOf(t)}function p(t,e,n){this.parent=t||null,this.tag=e?e.tag_name:'',this.indent_level=n||0,this.parser_token=e||null}function d(t){this._printer=t,this._current_frame=null}function f(t,e,n,i){this._source_text=t||'',e=e||{},this._js_beautify=n,this._css_beautify=i,this._tag_stack=null;var r=new o(e,'html');this._options=r,this._is_wrap_attributes_force='force'===this._options.wrap_attributes.substr(0,'force'.length),this._is_wrap_attributes_force_expand_multiline='force-expand-multiline'===this._options.wrap_attributes,this._is_wrap_attributes_force_aligned='force-aligned'===this._options.wrap_attributes,this._is_wrap_attributes_aligned_multiple='aligned-multiple'===this._options.wrap_attributes,this._is_wrap_attributes_preserve='preserve'===this._options.wrap_attributes.substr(0,'preserve'.length),this._is_wrap_attributes_preserve_aligned='preserve-aligned'===this._options.wrap_attributes}d.prototype.get_parser_token=function(){return this._current_frame?this._current_frame.parser_token:null},d.prototype.record_tag=function(t){var e=new p(this._current_frame,t,this._printer.indent_level);this._current_frame=e},d.prototype._try_pop_frame=function(t){var e=null;return t&&(e=t.parser_token,this._printer.indent_level=t.indent_level,this._current_frame=t.parent),e},d.prototype._get_frame=function(t,e){for(var n=this._current_frame;n&&-1===t.indexOf(n.tag);){if(e&&-1!==e.indexOf(n.tag)){n=null;break}n=n.parent}return n},d.prototype.try_pop=function(t,e){var n=this._get_frame([t],e);return this._try_pop_frame(n)},d.prototype.indent_to_tag=function(t){var e=this._get_frame(t);e&&(this._printer.indent_level=e.indent_level)},f.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var t=this._source_text,e=this._options.eol;'auto'===this._options.eol&&(e='\n',t&&a.test(t)&&(e=t.match(a)[0]));var n=(t=t.replace(l,'\n')).match(/^[\t ]*/)[0],o={text:'',type:''},i=new g,u=new c(this._options,n),h=new r(t,this._options).tokenize();this._tag_stack=new d(u);for(var p=null,f=h.next();f.type!==s.EOF;)f.type===s.TAG_OPEN||f.type===s.COMMENT?i=p=this._handle_tag_open(u,f,i,o,h):f.type===s.ATTRIBUTE||f.type===s.EQUALS||f.type===s.VALUE||f.type===s.TEXT&&!i.tag_complete?p=this._handle_inside_tag(u,f,i,o):f.type===s.TAG_CLOSE?p=this._handle_tag_close(u,f,i):f.type===s.TEXT?p=this._handle_text(u,f,i):u.add_raw_token(f),o=p,f=h.next();return u._output.get_code(e)},f.prototype._handle_tag_close=function(t,e,n){var o={text:e.text,type:e.type};return t.alignment_size=0,n.tag_complete=!0,t.set_space_before_token(e.newlines||''!==e.whitespace_before,!0),n.is_unformatted?t.add_raw_token(e):('<'===n.tag_start_char&&(t.set_space_before_token('/'===e.text[0],!0),this._is_wrap_attributes_force_expand_multiline&&n.has_wrapped_attrs&&t.print_newline(!1)),t.print_token(e)),!n.indent_content||n.is_unformatted||n.is_content_unformatted||(t.indent(),n.indent_content=!1),n.is_inline_element||n.is_unformatted||n.is_content_unformatted||t.set_wrap_point(),o},f.prototype._handle_inside_tag=function(t,e,n,o){var i=n.has_wrapped_attrs,r={text:e.text,type:e.type};return t.set_space_before_token(e.newlines||''!==e.whitespace_before,!0),n.is_unformatted?t.add_raw_token(e):'{'===n.tag_start_char&&e.type===s.TEXT?t.print_preserved_newlines(e)?(e.newlines=0,t.add_raw_token(e)):t.print_token(e):(e.type===s.ATTRIBUTE?t.set_space_before_token(!0):(e.type===s.EQUALS||e.type===s.VALUE&&e.previous.type===s.EQUALS)&&t.set_space_before_token(!1),e.type===s.ATTRIBUTE&&'<'===n.tag_start_char&&((this._is_wrap_attributes_preserve||this._is_wrap_attributes_preserve_aligned)&&(t.traverse_whitespace(e),i=i||0!==e.newlines),this._is_wrap_attributes_force&&n.attr_count>=this._options.wrap_attributes_min_attrs&&(o.type!==s.TAG_OPEN||this._is_wrap_attributes_force_expand_multiline)&&(t.print_newline(!1),i=!0)),t.print_token(e),i=i||t.previous_token_wrapped(),n.has_wrapped_attrs=i),r},f.prototype._handle_text=function(t,e,n){var o={text:e.text,type:'TK_CONTENT'};return n.custom_beautifier_name?this._print_custom_beatifier_text(t,e,n):n.is_unformatted||n.is_content_unformatted?t.add_raw_token(e):(t.traverse_whitespace(e),t.print_token(e)),o},f.prototype._print_custom_beatifier_text=function(t,e,n){var o=this;if(''!==e.text){var i,r=e.text,s=1,a='',l='';'javascript'===n.custom_beautifier_name&&'function'==typeof this._js_beautify?i=this._js_beautify:'css'===n.custom_beautifier_name&&'function'==typeof this._css_beautify?i=this._css_beautify:'html'===n.custom_beautifier_name&&(i=function(t,e){return new f(t,e,o._js_beautify,o._css_beautify).beautify()}),"keep"===this._options.indent_scripts?s=0:"separate"===this._options.indent_scripts&&(s=-t.indent_level);var c=t.get_full_indent(s);if(r=r.replace(/\n[ \t]*$/,''),'html'!==n.custom_beautifier_name&&'<'===r[0]&&r.match(/^(|]]>)$/.exec(r);if(!u)return void t.add_raw_token(e);a=c+u[1]+'\n',r=u[4],u[5]&&(l=c+u[5]),r=r.replace(/\n[ \t]*$/,''),(u[2]||-1!==u[3].indexOf('\n'))&&(u=u[3].match(/[ \t]+$/))&&(e.whitespace_before=u[0])}if(r)if(i){var h=function(){this.eol='\n'};h.prototype=this._options.raw_options,r=i(c+r,new h)}else{var p=e.whitespace_before;p&&(r=r.replace(new RegExp('\n('+p+')?','g'),'\n')),r=c+r.replace(/\n/g,'\n'+c)}a&&(r=r?a+r+'\n'+l:a+l),t.print_newline(!1),r&&(e.text=r,e.whitespace_before='',e.newlines=0,t.add_raw_token(e),t.print_newline(!0))}},f.prototype._handle_tag_open=function(t,e,n,o,i){var r=this._get_tag_open_token(e);if(!n.is_unformatted&&!n.is_content_unformatted||n.is_empty_element||e.type!==s.TAG_OPEN||r.is_start_tag?(t.traverse_whitespace(e),this._set_tag_position(t,e,r,n,o),r.is_inline_element||t.set_wrap_point(),t.print_token(e)):(t.add_raw_token(e),r.start_tag_token=this._tag_stack.try_pop(r.tag_name)),r.is_start_tag&&this._is_wrap_attributes_force){var a,l=0;do{(a=i.peek(l)).type===s.ATTRIBUTE&&(r.attr_count+=1),l+=1}while(a.type!==s.EOF&&a.type!==s.TAG_CLOSE)}return(this._is_wrap_attributes_force_aligned||this._is_wrap_attributes_aligned_multiple||this._is_wrap_attributes_preserve_aligned)&&(r.alignment_size=e.text.length+1),r.tag_complete||r.is_unformatted||(t.alignment_size=r.alignment_size),r};var g=function(t,e){if(this.parent=t||null,this.text='',this.type='TK_TAG_OPEN',this.tag_name='',this.is_inline_element=!1,this.is_unformatted=!1,this.is_content_unformatted=!1,this.is_empty_element=!1,this.is_start_tag=!1,this.is_end_tag=!1,this.indent_content=!1,this.multiline_content=!1,this.custom_beautifier_name=null,this.start_tag_token=null,this.attr_count=0,this.has_wrapped_attrs=!1,this.alignment_size=0,this.tag_complete=!1,this.tag_start_char='',this.tag_check='',e){var n;this.tag_start_char=e.text[0],this.text=e.text,'<'===this.tag_start_char?(n=e.text.match(/^<([^\s>]*)/),this.tag_check=n?n[1]:''):(n=e.text.match(/^{{~?(?:[\^]|#\*?)?([^\s}]+)/),this.tag_check=n?n[1]:'',(e.text.startsWith('{{#>')||e.text.startsWith('{{~#>'))&&'>'===this.tag_check[0]&&('>'===this.tag_check&&null!==e.next?this.tag_check=e.next.text.split(' ')[0]:this.tag_check=e.text.split('>')[1])),this.tag_check=this.tag_check.toLowerCase(),e.type===s.COMMENT&&(this.tag_complete=!0),this.is_start_tag='/'!==this.tag_check.charAt(0),this.tag_name=this.is_start_tag?this.tag_check:this.tag_check.substr(1),this.is_end_tag=!this.is_start_tag||e.closed&&'/>'===e.closed.text;var o=2;'{'===this.tag_start_char&&this.text.length>=3&&'~'===this.text.charAt(2)&&(o=3),this.is_end_tag=this.is_end_tag||'{'===this.tag_start_char&&(this.text.length<3||/[^#\^]/.test(this.text.charAt(o)))}else this.tag_complete=!0};f.prototype._get_tag_open_token=function(t){var e=new g(this._tag_stack.get_parser_token(),t);return e.alignment_size=this._options.wrap_attributes_indent_size,e.is_end_tag=e.is_end_tag||h(e.tag_check,this._options.void_elements),e.is_empty_element=e.tag_complete||e.is_start_tag&&e.is_end_tag,e.is_unformatted=!e.tag_complete&&h(e.tag_check,this._options.unformatted),e.is_content_unformatted=!e.is_empty_element&&h(e.tag_check,this._options.content_unformatted),e.is_inline_element=h(e.tag_name,this._options.inline)||this._options.inline_custom_elements&&e.tag_name.includes("-")||'{'===e.tag_start_char,e},f.prototype._set_tag_position=function(t,e,n,o,i){if(n.is_empty_element||(n.is_end_tag?n.start_tag_token=this._tag_stack.try_pop(n.tag_name):(this._do_optional_end_element(n)&&(n.is_inline_element||t.print_newline(!1)),this._tag_stack.record_tag(n),'script'!==n.tag_name&&'style'!==n.tag_name||n.is_unformatted||n.is_content_unformatted||(n.custom_beautifier_name=u(n.tag_check,e)))),h(n.tag_check,this._options.extra_liners)&&(t.print_newline(!1),t._output.just_added_blankline()||t.print_newline(!0)),n.is_empty_element){if('{'===n.tag_start_char&&'else'===n.tag_check)this._tag_stack.indent_to_tag(['if','unless','each']),n.indent_content=!0,t.current_line_has_match(/{{#if/)||t.print_newline(!1);'!--'===n.tag_name&&i.type===s.TAG_CLOSE&&o.is_end_tag&&-1===n.text.indexOf('\n')||(n.is_inline_element||n.is_unformatted||t.print_newline(!1),this._calcluate_parent_multiline(t,n))}else if(n.is_end_tag){var r=!1;r=(r=n.start_tag_token&&n.start_tag_token.multiline_content)||!n.is_inline_element&&!(o.is_inline_element||o.is_unformatted)&&!(i.type===s.TAG_CLOSE&&n.start_tag_token===o)&&'TK_CONTENT'!==i.type,(n.is_content_unformatted||n.is_unformatted)&&(r=!1),r&&t.print_newline(!1)}else n.indent_content=!n.custom_beautifier_name,'<'===n.tag_start_char&&('html'===n.tag_name?n.indent_content=this._options.indent_inner_html:'head'===n.tag_name?n.indent_content=this._options.indent_head_inner_html:'body'===n.tag_name&&(n.indent_content=this._options.indent_body_inner_html)),n.is_inline_element||n.is_unformatted||'TK_CONTENT'===i.type&&!n.is_content_unformatted||t.print_newline(!1),this._calcluate_parent_multiline(t,n)},f.prototype._calcluate_parent_multiline=function(t,e){!e.parent||!t._output.just_added_newline()||(e.is_inline_element||e.is_unformatted)&&e.parent.is_inline_element||(e.parent.multiline_content=!0)};var m=['address','article','aside','blockquote','details','div','dl','fieldset','figcaption','figure','footer','form','h1','h2','h3','h4','h5','h6','header','hr','main','menu','nav','ol','p','pre','section','table','ul'],v=['a','audio','del','ins','map','noscript','video'];f.prototype._do_optional_end_element=function(t){var e=null;if(!t.is_empty_element&&t.is_start_tag&&t.parent){if('body'===t.tag_name)e=e||this._tag_stack.try_pop('head');else if('li'===t.tag_name)e=e||this._tag_stack.try_pop('li',['ol','ul','menu']);else if('dd'===t.tag_name||'dt'===t.tag_name)e=(e=e||this._tag_stack.try_pop('dt',['dl']))||this._tag_stack.try_pop('dd',['dl']);else if('p'===t.parent.tag_name&&-1!==m.indexOf(t.tag_name)){var n=t.parent.parent;n&&-1!==v.indexOf(n.tag_name)||(e=e||this._tag_stack.try_pop('p'))}else'rp'===t.tag_name||'rt'===t.tag_name?e=(e=e||this._tag_stack.try_pop('rt',['ruby','rtc']))||this._tag_stack.try_pop('rp',['ruby','rtc']):'optgroup'===t.tag_name?e=e||this._tag_stack.try_pop('optgroup',['select']):'option'===t.tag_name?e=e||this._tag_stack.try_pop('option',['select','datalist','optgroup']):'colgroup'===t.tag_name?e=e||this._tag_stack.try_pop('caption',['table']):'thead'===t.tag_name?e=(e=e||this._tag_stack.try_pop('caption',['table']))||this._tag_stack.try_pop('colgroup',['table']):'tbody'===t.tag_name||'tfoot'===t.tag_name?e=(e=(e=(e=e||this._tag_stack.try_pop('caption',['table']))||this._tag_stack.try_pop('colgroup',['table']))||this._tag_stack.try_pop('thead',['table']))||this._tag_stack.try_pop('tbody',['table']):'tr'===t.tag_name?e=(e=(e=e||this._tag_stack.try_pop('caption',['table']))||this._tag_stack.try_pop('colgroup',['table']))||this._tag_stack.try_pop('tr',['table','thead','tbody','tfoot']):'th'!==t.tag_name&&'td'!==t.tag_name||(e=(e=e||this._tag_stack.try_pop('td',['table','thead','tbody','tfoot','tr']))||this._tag_stack.try_pop('th',['table','thead','tbody','tfoot','tr']));return t.parent=this._tag_stack.get_parser_token(),e}},t.exports.Beautifier=f},function(t,e,n){var o=n(6).Options;function i(t){o.call(this,t,'html'),1===this.templating.length&&'auto'===this.templating[0]&&(this.templating=['django','erb','handlebars','php']),this.indent_inner_html=this._get_boolean('indent_inner_html'),this.indent_body_inner_html=this._get_boolean('indent_body_inner_html',!0),this.indent_head_inner_html=this._get_boolean('indent_head_inner_html',!0),this.indent_handlebars=this._get_boolean('indent_handlebars',!0),this.wrap_attributes=this._get_selection('wrap_attributes',['auto','force','force-aligned','force-expand-multiline','aligned-multiple','preserve','preserve-aligned']),this.wrap_attributes_min_attrs=this._get_number('wrap_attributes_min_attrs',2),this.wrap_attributes_indent_size=this._get_number('wrap_attributes_indent_size',this.indent_size),this.extra_liners=this._get_array('extra_liners',['head','body','/html']),this.inline=this._get_array('inline',['a','abbr','area','audio','b','bdi','bdo','br','button','canvas','cite','code','data','datalist','del','dfn','em','embed','i','iframe','img','input','ins','kbd','keygen','label','map','mark','math','meter','noscript','object','output','progress','q','ruby','s','samp','select','small','span','strong','sub','sup','svg','template','textarea','time','u','var','video','wbr','text','acronym','big','strike','tt']),this.inline_custom_elements=this._get_boolean('inline_custom_elements',!0),this.void_elements=this._get_array('void_elements',['area','base','br','col','embed','hr','img','input','keygen','link','menuitem','meta','param','source','track','wbr','!doctype','?xml','basefont','isindex']),this.unformatted=this._get_array('unformatted',[]),this.content_unformatted=this._get_array('content_unformatted',['pre','textarea']),this.unformatted_content_delimiter=this._get_characters('unformatted_content_delimiter'),this.indent_scripts=this._get_selection('indent_scripts',['normal','keep','separate'])}i.prototype=new o,t.exports.Options=i},function(t,e,n){var o=n(9).Tokenizer,i=n(9).TOKEN,r=n(13).Directives,s=n(14).TemplatablePattern,a=n(12).Pattern,l={TAG_OPEN:'TK_TAG_OPEN',TAG_CLOSE:'TK_TAG_CLOSE',ATTRIBUTE:'TK_ATTRIBUTE',EQUALS:'TK_EQUALS',VALUE:'TK_VALUE',COMMENT:'TK_COMMENT',TEXT:'TK_TEXT',UNKNOWN:'TK_UNKNOWN',START:i.START,RAW:i.RAW,EOF:i.EOF},c=new r(/<\!--/,/-->/),u=function(t,e){o.call(this,t,e),this._current_tag_name='';var n=new s(this._input).read_options(this._options),i=new a(this._input);if(this.__patterns={word:n.until(/[\n\r\t <]/),single_quote:n.until_after(/'/),double_quote:n.until_after(/"/),attribute:n.until(/[\n\r\t =>]|\/>/),element_name:n.until(/[\n\r\t >\/]/),handlebars_comment:i.starting_with(/{{!--/).until_after(/--}}/),handlebars:i.starting_with(/{{/).until_after(/}}/),handlebars_open:i.until(/[\n\r\t }]/),handlebars_raw_close:i.until(/}}/),comment:i.starting_with(//),cdata:i.starting_with(//),conditional_comment:i.starting_with(//),processing:i.starting_with(/<\?/).until_after(/\?>/)},this._options.indent_handlebars&&(this.__patterns.word=this.__patterns.word.exclude('handlebars')),this._unformatted_content_delimiter=null,this._options.unformatted_content_delimiter){var r=this._input.get_literal_regexp(this._options.unformatted_content_delimiter);this.__patterns.unformatted_content_delimiter=i.matching(r).until_after(r)}};(u.prototype=new o)._is_comment=function(t){return!1},u.prototype._is_opening=function(t){return t.type===l.TAG_OPEN},u.prototype._is_closing=function(t,e){return t.type===l.TAG_CLOSE&&e&&(('>'===t.text||'/>'===t.text)&&'<'===e.text[0]||'}}'===t.text&&'{'===e.text[0]&&'{'===e.text[1])},u.prototype._reset=function(){this._current_tag_name=''},u.prototype._get_next_token=function(t,e){var n=null;this._readWhitespace();var o=this._input.peek();return null===o?this._create_token(l.EOF,''):n=(n=(n=(n=(n=(n=(n=(n=(n=n||this._read_open_handlebars(o,e))||this._read_attribute(o,t,e))||this._read_close(o,e))||this._read_raw_content(o,t,e))||this._read_content_word(o))||this._read_comment_or_cdata(o))||this._read_processing(o))||this._read_open(o,e))||this._create_token(l.UNKNOWN,this._input.next())},u.prototype._read_comment_or_cdata=function(t){var e=null,n=null,o=null;'<'===t&&('!'===this._input.peek(1)&&((n=this.__patterns.comment.read())?(o=c.get_directives(n))&&'start'===o.ignore&&(n+=c.readIgnored(this._input)):n=this.__patterns.cdata.read()),n&&((e=this._create_token(l.COMMENT,n)).directives=o));return e},u.prototype._read_processing=function(t){var e=null,n=null;if('<'===t){var o=this._input.peek(1);'!'!==o&&'?'!==o||(n=(n=this.__patterns.conditional_comment.read())||this.__patterns.processing.read()),n&&((e=this._create_token(l.COMMENT,n)).directives=null)}return e},u.prototype._read_open=function(t,e){var n=null,o=null;return e||'<'===t&&(n=this._input.next(),'/'===this._input.peek()&&(n+=this._input.next()),n+=this.__patterns.element_name.read(),o=this._create_token(l.TAG_OPEN,n)),o},u.prototype._read_open_handlebars=function(t,e){var n=null,o=null;return e||this._options.indent_handlebars&&'{'===t&&'{'===this._input.peek(1)&&('!'===this._input.peek(2)?(n=(n=this.__patterns.handlebars_comment.read())||this.__patterns.handlebars.read(),o=this._create_token(l.COMMENT,n)):(n=this.__patterns.handlebars_open.read(),o=this._create_token(l.TAG_OPEN,n))),o},u.prototype._read_close=function(t,e){var n=null,o=null;return e&&('<'===e.text[0]&&('>'===t||'/'===t&&'>'===this._input.peek(1))?(n=this._input.next(),'/'===t&&(n+=this._input.next()),o=this._create_token(l.TAG_CLOSE,n)):'{'===e.text[0]&&'}'===t&&'}'===this._input.peek(1)&&(this._input.next(),this._input.next(),o=this._create_token(l.TAG_CLOSE,'}}'))),o},u.prototype._read_attribute=function(t,e,n){var o=null,i='';if(n&&'<'===n.text[0])if('='===t)o=this._create_token(l.EQUALS,this._input.next());else if('"'===t||"'"===t){var r=this._input.next();r+='"'===t?this.__patterns.double_quote.read():this.__patterns.single_quote.read(),o=this._create_token(l.VALUE,r)}else(i=this.__patterns.attribute.read())&&(o=e.type===l.EQUALS?this._create_token(l.VALUE,i):this._create_token(l.ATTRIBUTE,i));return o},u.prototype._is_content_unformatted=function(t){return-1===this._options.void_elements.indexOf(t)&&(-1!==this._options.content_unformatted.indexOf(t)||-1!==this._options.unformatted.indexOf(t))},u.prototype._read_raw_content=function(t,e,n){var o='';if(n&&'{'===n.text[0])o=this.__patterns.handlebars_raw_close.read();else if(e.type===l.TAG_CLOSE&&'<'===e.opened.text[0]&&'/'!==e.text[0]){var i=e.opened.text.substr(1).toLowerCase();if('script'===i||'style'===i){var r=this._read_comment_or_cdata(t);if(r)return r.type=l.TEXT,r;o=this._input.readUntil(new RegExp('','ig'))}else this._is_content_unformatted(i)&&(o=this._input.readUntil(new RegExp('','ig')))}return o?this._create_token(l.TEXT,o):null},u.prototype._read_content_word=function(t){var e='';if(this._options.unformatted_content_delimiter&&t===this._options.unformatted_content_delimiter[0]&&(e=this.__patterns.unformatted_content_delimiter.read()),e||(e=this.__patterns.word.read()),e)return this._create_token(l.TEXT,e)},t.exports.Tokenizer=u,t.exports.TOKEN=l}],e={};var n=function n(o){var i=e[o];if(void 0!==i)return i.exports;var r=e[o]={exports:{}};return t[o](r,r.exports,n),r.exports}(18);r=n}();var s=r;if(1)o=[n,n(94),n(838)],i=function(t){var e=n(94),o=n(838);return{html_beautify:function(t,n){return s(t,n,e.js_beautify,o.css_beautify)}}}.apply(e,o),void 0===i||(t.exports=i);else;}()},94:(t,e)=>{var n;!function(){var o;!function(){"use strict";var t=[function(t,e,n){var o=n(1).Beautifier,i=n(5).Options;t.exports=function(t,e){return new o(t,e).beautify()},t.exports.defaultOptions=function(){return new i}},function(t,e,n){var o=n(2).Output,i=n(3).Token,r=n(4),s=n(5).Options,a=n(7).Tokenizer,l=n(7).line_starters,c=n(7).positionable_operators,u=n(7).TOKEN;function h(t,e){return-1!==e.indexOf(t)}function p(t,e){return t&&t.type===u.RESERVED&&t.text===e}function d(t,e){return t&&t.type===u.RESERVED&&h(t.text,e)}var f=['case','return','do','if','throw','else','await','break','continue','async'],g=function(t){for(var e={},n=0;nn&&(n=t.line_indent_level)),{mode:e,parent:t,last_token:t?t.last_token:new i(u.START_BLOCK,''),last_word:t?t.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:n,alignment:0,line_indent_level:t?t.line_indent_level:n,start_line_index:this._output.get_line_number(),ternary_depth:0}},C.prototype._reset=function(t){var e=t.match(/^[\t ]*/)[0];this._last_last_text='',this._output=new o(this._options,e),this._output.raw=this._options.test_output_raw,this._flag_store=[],this.set_mode(v);var n=new a(t,this._options);return this._tokens=n.tokenize(),t},C.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var t=this._reset(this._source_text),e=this._options.eol;'auto'===this._options.eol&&(e='\n',t&&r.lineBreak.test(t||'')&&(e=t.match(r.lineBreak)[0]));for(var n=this._tokens.next();n;)this.handle_token(n),this._last_last_text=this._flags.last_token.text,this._flags.last_token=n,n=this._tokens.next();return this._output.get_code(e)},C.prototype.handle_token=function(t,e){t.type===u.START_EXPR?this.handle_start_expr(t):t.type===u.END_EXPR?this.handle_end_expr(t):t.type===u.START_BLOCK?this.handle_start_block(t):t.type===u.END_BLOCK?this.handle_end_block(t):t.type===u.WORD||t.type===u.RESERVED?this.handle_word(t):t.type===u.SEMICOLON?this.handle_semicolon(t):t.type===u.STRING?this.handle_string(t):t.type===u.EQUALS?this.handle_equals(t):t.type===u.OPERATOR?this.handle_operator(t):t.type===u.COMMA?this.handle_comma(t):t.type===u.BLOCK_COMMENT?this.handle_block_comment(t,e):t.type===u.COMMENT?this.handle_comment(t,e):t.type===u.DOT?this.handle_dot(t):t.type===u.EOF?this.handle_eof(t):(t.type,u.UNKNOWN,this.handle_unknown(t,e))},C.prototype.handle_whitespace_and_comments=function(t,e){var n=t.newlines,o=this._options.keep_array_indentation&&k(this._flags.mode);if(t.comments_before)for(var i=t.comments_before.next();i;)this.handle_whitespace_and_comments(i,e),this.handle_token(i,e),i=t.comments_before.next();if(o)for(var r=0;r0,e);else if(this._options.max_preserve_newlines&&n>this._options.max_preserve_newlines&&(n=this._options.max_preserve_newlines),this._options.preserve_newlines&&n>1){this.print_newline(!1,e);for(var s=1;s0&&(!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))},C.prototype.set_mode=function(t){this._flags?(this._flag_store.push(this._flags),this._previous_flags=this._flags):this._previous_flags=this.create_flags(null,t),this._flags=this.create_flags(this._previous_flags,t),this._output.set_indent(this._flags.indentation_level,this._flags.alignment)},C.prototype.restore_mode=function(){this._flag_store.length>0&&(this._previous_flags=this._flags,this._flags=this._flag_store.pop(),this._previous_flags.mode===y&&S(this._output,this._previous_flags),this._output.set_indent(this._flags.indentation_level,this._flags.alignment))},C.prototype.start_of_object_property=function(){return this._flags.parent.mode===_&&this._flags.mode===y&&(':'===this._flags.last_token.text&&0===this._flags.ternary_depth||d(this._flags.last_token,['get','set']))},C.prototype.start_of_statement=function(t){var e=!1;return!!(e=(e=(e=(e=(e=(e=(e=e||d(this._flags.last_token,['var','let','const'])&&t.type===u.WORD)||p(this._flags.last_token,'do'))||!(this._flags.parent.mode===_&&this._flags.mode===y)&&d(this._flags.last_token,T)&&!t.newlines)||p(this._flags.last_token,'else')&&!(p(t,'if')&&!t.comments_before))||this._flags.last_token.type===u.END_EXPR&&(this._previous_flags.mode===b||this._previous_flags.mode===w))||this._flags.last_token.type===u.WORD&&this._flags.mode===v&&!this._flags.in_case&&!('--'===t.text||'++'===t.text)&&'function'!==this._last_last_text&&t.type!==u.WORD&&t.type!==u.RESERVED)||this._flags.mode===_&&(':'===this._flags.last_token.text&&0===this._flags.ternary_depth||d(this._flags.last_token,['get','set'])))&&(this.set_mode(y),this.indent(),this.handle_whitespace_and_comments(t,!0),this.start_of_object_property()||this.allow_wrap_or_preserved_newline(t,d(t,['do','for','if','while'])),!0)},C.prototype.handle_start_expr=function(t){this.start_of_statement(t)||this.handle_whitespace_and_comments(t);var e=x;if('['===t.text){if(this._flags.last_token.type===u.WORD||')'===this._flags.last_token.text)return d(this._flags.last_token,l)&&(this._output.space_before_token=!0),this.print_token(t),this.set_mode(e),this.indent(),void(this._options.space_in_paren&&(this._output.space_before_token=!0));e=O,k(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()),h(this._flags.last_token.type,[u.START_EXPR,u.END_EXPR,u.WORD,u.OPERATOR,u.DOT])||(this._output.space_before_token=!0)}else{if(this._flags.last_token.type===u.RESERVED)'for'===this._flags.last_token.text?(this._output.space_before_token=this._options.space_before_conditional,e=b):h(this._flags.last_token.text,['if','while','switch'])?(this._output.space_before_token=this._options.space_before_conditional,e=w):h(this._flags.last_word,['await','async'])?this._output.space_before_token=!0:'import'===this._flags.last_token.text&&''===t.whitespace_before?this._output.space_before_token=!1:(h(this._flags.last_token.text,l)||'catch'===this._flags.last_token.text)&&(this._output.space_before_token=!0);else if(this._flags.last_token.type===u.EQUALS||this._flags.last_token.type===u.OPERATOR)this.start_of_object_property()||this.allow_wrap_or_preserved_newline(t);else if(this._flags.last_token.type===u.WORD){this._output.space_before_token=!1;var n=this._tokens.peek(-3);if(this._options.space_after_named_function&&n){var o=this._tokens.peek(-4);d(n,['async','function'])||'*'===n.text&&d(o,['async','function'])?this._output.space_before_token=!0:this._flags.mode===_?'{'!==n.text&&','!==n.text&&('*'!==n.text||'{'!==o.text&&','!==o.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(t);(this._flags.last_token.type===u.RESERVED&&('function'===this._flags.last_word||'typeof'===this._flags.last_word)||'*'===this._flags.last_token.text&&(h(this._last_last_text,['function','yield'])||this._flags.mode===_&&h(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===u.START_BLOCK?this.print_newline():this._flags.last_token.type!==u.END_EXPR&&this._flags.last_token.type!==u.START_EXPR&&this._flags.last_token.type!==u.END_BLOCK&&'.'!==this._flags.last_token.text&&this._flags.last_token.type!==u.COMMA||this.allow_wrap_or_preserved_newline(t,t.newlines),this.print_token(t),this.set_mode(e),this._options.space_in_paren&&(this._output.space_before_token=!0),this.indent()},C.prototype.handle_end_expr=function(t){for(;this._flags.mode===y;)this.restore_mode();this.handle_whitespace_and_comments(t),this._flags.multiline_frame&&this.allow_wrap_or_preserved_newline(t,']'===t.text&&k(this._flags.mode)&&!this._options.keep_array_indentation),this._options.space_in_paren&&(this._flags.last_token.type!==u.START_EXPR||this._options.space_in_empty_paren?this._output.space_before_token=!0:(this._output.trim(),this._output.space_before_token=!1)),this.deindent(),this.print_token(t),this.restore_mode(),S(this._output,this._previous_flags),this._flags.do_while&&this._previous_flags.mode===w&&(this._previous_flags.mode=x,this._flags.do_block=!1,this._flags.do_while=!1)},C.prototype.handle_start_block=function(t){this.handle_whitespace_and_comments(t);var e=this._tokens.peek(),n=this._tokens.peek(1);'switch'===this._flags.last_word&&this._flags.last_token.type===u.END_EXPR?(this.set_mode(v),this._flags.in_case_statement=!0):this._flags.case_body?this.set_mode(v):n&&(h(n.text,[':',','])&&h(e.type,[u.STRING,u.WORD,u.RESERVED])||h(e.text,['get','set','...'])&&h(n.type,[u.WORD,u.RESERVED]))?h(this._last_last_text,['class','interface'])&&!h(n.text,[':',','])?this.set_mode(v):this.set_mode(_):this._flags.last_token.type===u.OPERATOR&&'=>'===this._flags.last_token.text?this.set_mode(v):h(this._flags.last_token.type,[u.EQUALS,u.START_EXPR,u.COMMA,u.OPERATOR])||d(this._flags.last_token,['return','throw','import','default'])?this.set_mode(_):this.set_mode(v),this._flags.last_token&&d(this._flags.last_token.previous,['class','extends'])&&(this._flags.class_start_block=!0);var o=!e.comments_before&&'}'===e.text,i=o&&'function'===this._flags.last_word&&this._flags.last_token.type===u.END_EXPR;if(this._options.brace_preserve_inline){var r=0,s=null;this._flags.inline_frame=!0;do{if(r+=1,(s=this._tokens.peek(r-1)).newlines){this._flags.inline_frame=!1;break}}while(s.type!==u.EOF&&(s.type!==u.END_BLOCK||s.opened!==t))}("expand"===this._options.brace_style||"none"===this._options.brace_style&&t.newlines)&&!this._flags.inline_frame?this._flags.last_token.type!==u.OPERATOR&&(i||this._flags.last_token.type===u.EQUALS||d(this._flags.last_token,f)&&'else'!==this._flags.last_token.text)?this._output.space_before_token=!0:this.print_newline(!1,!0):(!k(this._previous_flags.mode)||this._flags.last_token.type!==u.START_EXPR&&this._flags.last_token.type!==u.COMMA||((this._flags.last_token.type===u.COMMA||this._options.space_in_paren)&&(this._output.space_before_token=!0),(this._flags.last_token.type===u.COMMA||this._flags.last_token.type===u.START_EXPR&&this._flags.inline_frame)&&(this.allow_wrap_or_preserved_newline(t),this._previous_flags.multiline_frame=this._previous_flags.multiline_frame||this._flags.multiline_frame,this._flags.multiline_frame=!1)),this._flags.last_token.type!==u.OPERATOR&&this._flags.last_token.type!==u.START_EXPR&&(h(this._flags.last_token.type,[u.START_BLOCK,u.SEMICOLON])&&!this._flags.inline_frame?this.print_newline():this._output.space_before_token=!0)),this.print_token(t),this.indent(),o||this._options.brace_preserve_inline&&this._flags.inline_frame||this.print_newline()},C.prototype.handle_end_block=function(t){for(this.handle_whitespace_and_comments(t);this._flags.mode===y;)this.restore_mode();var e=this._flags.last_token.type===u.START_BLOCK;this._flags.inline_frame&&!e?this._output.space_before_token=!0:"expand"===this._options.brace_style?e||this.print_newline():e||(k(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(t)},C.prototype.handle_word=function(t){if(t.type===u.RESERVED)if(h(t.text,['set','get'])&&this._flags.mode!==_)t.type=u.WORD;else if('import'===t.text&&h(this._tokens.peek().text,['(','.']))t.type=u.WORD;else if(h(t.text,['as','from'])&&!this._flags.import_block)t.type=u.WORD;else if(this._flags.mode===_){':'===this._tokens.peek().text&&(t.type=u.WORD)}if(this.start_of_statement(t)?d(this._flags.last_token,['var','let','const'])&&t.type===u.WORD&&(this._flags.declaration_statement=!0):!t.newlines||P(this._flags.mode)||this._flags.last_token.type===u.OPERATOR&&'--'!==this._flags.last_token.text&&'++'!==this._flags.last_token.text||this._flags.last_token.type===u.EQUALS||!this._options.preserve_newlines&&d(this._flags.last_token,['var','let','const','set','get'])?this.handle_whitespace_and_comments(t):(this.handle_whitespace_and_comments(t),this.print_newline()),this._flags.do_block&&!this._flags.do_while){if(p(t,'while'))return this._output.space_before_token=!0,this.print_token(t),this._output.space_before_token=!0,void(this._flags.do_while=!0);this.print_newline(),this._flags.do_block=!1}if(this._flags.if_block)if(!this._flags.else_block&&p(t,'else'))this._flags.else_block=!0;else{for(;this._flags.mode===y;)this.restore_mode();this._flags.if_block=!1,this._flags.else_block=!1}if(this._flags.in_case_statement&&d(t,['case','default']))return 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(t),void(this._flags.in_case=!0);if(this._flags.last_token.type!==u.COMMA&&this._flags.last_token.type!==u.START_EXPR&&this._flags.last_token.type!==u.EQUALS&&this._flags.last_token.type!==u.OPERATOR||this.start_of_object_property()||h(this._flags.last_token.text,['+','-'])&&':'===this._last_last_text&&this._flags.parent.mode===_||this.allow_wrap_or_preserved_newline(t),p(t,'function'))return(h(this._flags.last_token.text,['}',';'])||this._output.just_added_newline()&&!h(this._flags.last_token.text,['(','[','{',':','=',','])&&this._flags.last_token.type!==u.OPERATOR)&&(this._output.just_added_blankline()||t.comments_before||(this.print_newline(),this.print_newline(!0))),this._flags.last_token.type===u.RESERVED||this._flags.last_token.type===u.WORD?d(this._flags.last_token,['get','set','new','export'])||d(this._flags.last_token,T)||p(this._flags.last_token,'default')&&'export'===this._last_last_text||'declare'===this._flags.last_token.text?this._output.space_before_token=!0:this.print_newline():this._flags.last_token.type===u.OPERATOR||'='===this._flags.last_token.text?this._output.space_before_token=!0:(this._flags.multiline_frame||!P(this._flags.mode)&&!k(this._flags.mode))&&this.print_newline(),this.print_token(t),void(this._flags.last_word=t.text);var e='NONE';(this._flags.last_token.type===u.END_BLOCK?this._previous_flags.inline_frame?e='SPACE':d(t,['else','catch','finally','from'])?"expand"===this._options.brace_style||"end-expand"===this._options.brace_style||"none"===this._options.brace_style&&t.newlines?e='NEWLINE':(e='SPACE',this._output.space_before_token=!0):e='NEWLINE':this._flags.last_token.type===u.SEMICOLON&&this._flags.mode===v?e='NEWLINE':this._flags.last_token.type===u.SEMICOLON&&P(this._flags.mode)?e='SPACE':this._flags.last_token.type===u.STRING?e='NEWLINE':this._flags.last_token.type===u.RESERVED||this._flags.last_token.type===u.WORD||'*'===this._flags.last_token.text&&(h(this._last_last_text,['function','yield'])||this._flags.mode===_&&h(this._last_last_text,['{',',']))?e='SPACE':this._flags.last_token.type===u.START_BLOCK?e=this._flags.inline_frame?'SPACE':'NEWLINE':this._flags.last_token.type===u.END_EXPR&&(this._output.space_before_token=!0,e='NEWLINE'),d(t,l)&&')'!==this._flags.last_token.text&&(e=this._flags.inline_frame||'else'===this._flags.last_token.text||'export'===this._flags.last_token.text?'SPACE':'NEWLINE'),d(t,['else','catch','finally']))?(this._flags.last_token.type!==u.END_BLOCK||this._previous_flags.mode!==v||"expand"===this._options.brace_style||"end-expand"===this._options.brace_style||"none"===this._options.brace_style&&t.newlines)&&!this._flags.inline_frame?this.print_newline():(this._output.trim(!0),'}'!==this._output.current_line.last()&&this.print_newline(),this._output.space_before_token=!0):'NEWLINE'===e?d(this._flags.last_token,f)||'declare'===this._flags.last_token.text&&d(t,['var','let','const'])?this._output.space_before_token=!0:this._flags.last_token.type!==u.END_EXPR?this._flags.last_token.type===u.START_EXPR&&d(t,['var','let','const'])||':'===this._flags.last_token.text||(p(t,'if')&&p(t.previous,'else')?this._output.space_before_token=!0:this.print_newline()):d(t,l)&&')'!==this._flags.last_token.text&&this.print_newline():this._flags.multiline_frame&&k(this._flags.mode)&&','===this._flags.last_token.text&&'}'===this._last_last_text?this.print_newline():'SPACE'===e&&(this._output.space_before_token=!0);!t.previous||t.previous.type!==u.WORD&&t.previous.type!==u.RESERVED||(this._output.space_before_token=!0),this.print_token(t),this._flags.last_word=t.text,t.type===u.RESERVED&&('do'===t.text?this._flags.do_block=!0:'if'===t.text?this._flags.if_block=!0:'import'===t.text?this._flags.import_block=!0:this._flags.import_block&&p(t,'from')&&(this._flags.import_block=!1))},C.prototype.handle_semicolon=function(t){this.start_of_statement(t)?this._output.space_before_token=!1:this.handle_whitespace_and_comments(t);for(var e=this._tokens.peek();!(this._flags.mode!==y||this._flags.if_block&&p(e,'else')||this._flags.do_block);)this.restore_mode();this._flags.import_block&&(this._flags.import_block=!1),this.print_token(t)},C.prototype.handle_string=function(t){(!t.text.startsWith("`")||0!==t.newlines||''!==t.whitespace_before||')'!==t.previous.text&&this._flags.last_token.type!==u.WORD)&&(this.start_of_statement(t)?this._output.space_before_token=!0:(this.handle_whitespace_and_comments(t),this._flags.last_token.type===u.RESERVED||this._flags.last_token.type===u.WORD||this._flags.inline_frame?this._output.space_before_token=!0:this._flags.last_token.type===u.COMMA||this._flags.last_token.type===u.START_EXPR||this._flags.last_token.type===u.EQUALS||this._flags.last_token.type===u.OPERATOR?this.start_of_object_property()||this.allow_wrap_or_preserved_newline(t):!t.text.startsWith("`")||this._flags.last_token.type!==u.END_EXPR||']'!==t.previous.text&&')'!==t.previous.text||0!==t.newlines?this.print_newline():this._output.space_before_token=!0)),this.print_token(t)},C.prototype.handle_equals=function(t){this.start_of_statement(t)||this.handle_whitespace_and_comments(t),this._flags.declaration_statement&&(this._flags.declaration_assignment=!0),this._output.space_before_token=!0,this.print_token(t),this._output.space_before_token=!0},C.prototype.handle_comma=function(t){this.handle_whitespace_and_comments(t,!0),this.print_token(t),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(t)):this._flags.mode===_||this._flags.mode===y&&this._flags.parent.mode===_?(this._flags.mode===y&&this.restore_mode(),this._flags.inline_frame||this.print_newline()):this._options.comma_first&&this.allow_wrap_or_preserved_newline(t)},C.prototype.handle_operator=function(t){var e='*'===t.text&&(d(this._flags.last_token,['function','yield'])||h(this._flags.last_token.type,[u.START_BLOCK,u.COMMA,u.END_BLOCK,u.SEMICOLON])),n=h(t.text,['-','+'])&&(h(this._flags.last_token.type,[u.START_BLOCK,u.START_EXPR,u.EQUALS,u.OPERATOR])||h(this._flags.last_token.text,l)||','===this._flags.last_token.text);if(this.start_of_statement(t));else{var o=!e;this.handle_whitespace_and_comments(t,o)}if('*'!==t.text||this._flags.last_token.type!==u.DOT)if('::'!==t.text)if(h(t.text,['-','+'])&&this.start_of_object_property())this.print_token(t);else{if(this._flags.last_token.type===u.OPERATOR&&h(this._options.operator_position,m)&&this.allow_wrap_or_preserved_newline(t),':'===t.text&&this._flags.in_case)return this.print_token(t),this._flags.in_case=!1,this._flags.case_body=!0,void(this._tokens.peek().type!==u.START_BLOCK?(this.indent(),this.print_newline(),this._flags.case_block=!1):(this._flags.case_block=!0,this._output.space_before_token=!0));var i=!0,r=!0,s=!1;if(':'===t.text?0===this._flags.ternary_depth?i=!1:(this._flags.ternary_depth-=1,s=!0):'?'===t.text&&(this._flags.ternary_depth+=1),!n&&!e&&this._options.preserve_newlines&&h(t.text,c)){var a=':'===t.text,p=a&&s,_=a&&!s;switch(this._options.operator_position){case g.before_newline:return this._output.space_before_token=!_,this.print_token(t),a&&!p||this.allow_wrap_or_preserved_newline(t),void(this._output.space_before_token=!0);case g.after_newline:return this._output.space_before_token=!0,!a||p?this._tokens.peek().newlines?this.print_newline(!1,!0):this.allow_wrap_or_preserved_newline(t):this._output.space_before_token=!1,this.print_token(t),void(this._output.space_before_token=!0);case g.preserve_newline:return _||this.allow_wrap_or_preserved_newline(t),i=!(this._output.just_added_newline()||_),this._output.space_before_token=i,this.print_token(t),void(this._output.space_before_token=!0)}}if(e){this.allow_wrap_or_preserved_newline(t),i=!1;var O=this._tokens.peek();r=O&&h(O.type,[u.WORD,u.RESERVED])}else if('...'===t.text)this.allow_wrap_or_preserved_newline(t),i=this._flags.last_token.type===u.START_BLOCK,r=!1;else if(h(t.text,['--','++','!','~'])||n){if(this._flags.last_token.type!==u.COMMA&&this._flags.last_token.type!==u.START_EXPR||this.allow_wrap_or_preserved_newline(t),i=!1,r=!1,t.newlines&&('--'===t.text||'++'===t.text||'~'===t.text)){var b=d(this._flags.last_token,f)&&t.newlines;b&&(this._previous_flags.if_block||this._previous_flags.else_block)&&this.restore_mode(),this.print_newline(b,!0)}';'===this._flags.last_token.text&&P(this._flags.mode)&&(i=!0),this._flags.last_token.type===u.RESERVED?i=!0:this._flags.last_token.type===u.END_EXPR?i=!(']'===this._flags.last_token.text&&('--'===t.text||'++'===t.text)):this._flags.last_token.type===u.OPERATOR&&(i=h(t.text,['--','-','++','+'])&&h(this._flags.last_token.text,['--','-','++','+']),h(t.text,['+','-'])&&h(this._flags.last_token.text,['--','++'])&&(r=!0)),(this._flags.mode!==v||this._flags.inline_frame)&&this._flags.mode!==y||'{'!==this._flags.last_token.text&&';'!==this._flags.last_token.text||this.print_newline()}this._output.space_before_token=this._output.space_before_token||i,this.print_token(t),this._output.space_before_token=r}else this.print_token(t);else this.print_token(t)},C.prototype.handle_block_comment=function(t,e){return this._output.raw?(this._output.add_raw_token(t),void(t.directives&&'end'===t.directives.preserve&&(this._output.raw=this._options.test_output_raw))):t.directives?(this.print_newline(!1,e),this.print_token(t),'start'===t.directives.preserve&&(this._output.raw=!0),void this.print_newline(!1,!0)):r.newline.test(t.text)||t.newlines?void this.print_block_commment(t,e):(this._output.space_before_token=!0,this.print_token(t),void(this._output.space_before_token=!0))},C.prototype.print_block_commment=function(t,e){var n,o=function(t){for(var e=[],n=(t=t.replace(r.allLineBreaks,'\n')).indexOf("\n");-1!==n;)e.push(t.substring(0,n)),n=(t=t.substring(n+1)).indexOf("\n");return t.length&&e.push(t),e}(t.text),i=!1,s=!1,a=t.whitespace_before,l=a.length;if(this.print_newline(!1,e),this.print_token_line_indentation(t),this._output.add_token(o[0]),this.print_newline(!1,e),o.length>1){for(i=function(t,e){for(var n=0;n0&&(e=new Array(t.indent_level+1).join(this.__indent_string)),this.__base_string=e,this.__base_string_length=e.length}function o(t,o){this.__indent_cache=new n(t,o),this.raw=!1,this._end_with_newline=t.end_with_newline,this.indent_size=t.indent_size,this.wrap_line_length=t.wrap_line_length,this.indent_empty_lines=t.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new e(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}e.prototype.clone_empty=function(){var t=new e(this.__parent);return t.set_indent(this.__indent_count,this.__alignment_count),t},e.prototype.item=function(t){return t<0?this.__items[this.__items.length+t]:this.__items[t]},e.prototype.has_match=function(t){for(var e=this.__items.length-1;e>=0;e--)if(this.__items[e].match(t))return!0;return!1},e.prototype.set_indent=function(t,e){this.is_empty()&&(this.__indent_count=t||0,this.__alignment_count=e||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},e.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)},e.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},e.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var t=this.__parent.current_line;return t.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),t.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),t.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count," "===t.__items[0]&&(t.__items.splice(0,1),t.__character_count-=1),!0}return!1},e.prototype.is_empty=function(){return 0===this.__items.length},e.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},e.prototype.push=function(t){this.__items.push(t);var e=t.lastIndexOf('\n');-1!==e?this.__character_count=t.length-e:this.__character_count+=t.length},e.prototype.pop=function(){var t=null;return this.is_empty()||(t=this.__items.pop(),this.__character_count-=t.length),t},e.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},e.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},e.prototype.trim=function(){for(;' '===this.last();)this.__items.pop(),this.__character_count-=1},e.prototype.toString=function(){var t='';return this.is_empty()?this.__parent.indent_empty_lines&&(t=this.__parent.get_indent_string(this.__indent_count)):(t=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),t+=this.__items.join('')),t},n.prototype.get_indent_size=function(t,e){var n=this.__base_string_length;return e=e||0,t<0&&(n=0),n+=t*this.__indent_size,n+=e},n.prototype.get_indent_string=function(t,e){var n=this.__base_string;return e=e||0,t<0&&(t=0,n=''),e+=t*this.__indent_size,this.__ensure_cache(e),n+=this.__cache[e]},n.prototype.__ensure_cache=function(t){for(;t>=this.__cache.length;)this.__add_column()},n.prototype.__add_column=function(){var t=this.__cache.length,e=0,n='';this.__indent_size&&t>=this.__indent_size&&(t-=(e=Math.floor(t/this.__indent_size))*this.__indent_size,n=new Array(e+1).join(this.__indent_string)),t&&(n+=new Array(t+1).join(' ')),this.__cache.push(n)},o.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},o.prototype.get_line_number=function(){return this.__lines.length},o.prototype.get_indent_string=function(t,e){return this.__indent_cache.get_indent_string(t,e)},o.prototype.get_indent_size=function(t,e){return this.__indent_cache.get_indent_size(t,e)},o.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},o.prototype.add_new_line=function(t){return!(this.is_empty()||!t&&this.just_added_newline())&&(this.raw||this.__add_outputline(),!0)},o.prototype.get_code=function(t){this.trim(!0);var e=this.current_line.pop();e&&('\n'===e[e.length-1]&&(e=e.replace(/\n+$/g,'')),this.current_line.push(e)),this._end_with_newline&&this.__add_outputline();var n=this.__lines.join('\n');return'\n'!==t&&(n=n.replace(/[\n]/g,t)),n},o.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},o.prototype.set_indent=function(t,e){return t=t||0,e=e||0,this.next_line.set_indent(t,e),this.__lines.length>1?(this.current_line.set_indent(t,e),!0):(this.current_line.set_indent(),!1)},o.prototype.add_raw_token=function(t){for(var e=0;e1&&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},o.prototype.just_added_newline=function(){return this.current_line.is_empty()},o.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},o.prototype.ensure_empty_line_above=function(t,n){for(var o=this.__lines.length-2;o>=0;){var i=this.__lines[o];if(i.is_empty())break;if(0!==i.item(0).indexOf(t)&&i.item(-1)!==n){this.__lines.splice(o+1,0,new e(this)),this.previous_line=this.__lines[this.__lines.length-2];break}o--}},t.exports.Output=o},function(t){t.exports.Token=function(t,e,n,o){this.type=t,this.text=e,this.comments_before=null,this.newlines=n||0,this.whitespace_before=o||'',this.parent=null,this.next=null,this.previous=null,this.opened=null,this.closed=null,this.directives=null}},function(t,e){var n="\\x24\\x30-\\x39\\x41-\\x5a\\x5f\\x61-\\x7a",o="\\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-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\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",i="\\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",r="\\\\u[0-9a-fA-F]{4}|\\\\u\\{[0-9a-fA-F]+\\}",s="(?:"+r+"|["+"\\x23\\x24\\x40\\x41-\\x5a\\x5f\\x61-\\x7a"+o+"])",a="(?:"+r+"|["+n+o+i+"])*";e.identifier=new RegExp(s+a,'g'),e.identifierStart=new RegExp(s),e.identifierMatch=new RegExp("(?:"+r+"|["+n+o+i+"])+");e.newline=/[\n\r\u2028\u2029]/,e.lineBreak=new RegExp('\r\n|'+e.newline.source),e.allLineBreaks=new RegExp(e.lineBreak.source,'g')},function(t,e,n){var o=n(6).Options,i=['before-newline','after-newline','preserve-newline'];function r(t){o.call(this,t,'js');var e=this.raw_options.brace_style||null;"expand-strict"===e?this.raw_options.brace_style="expand":"collapse-preserve-inline"===e?this.raw_options.brace_style="collapse,preserve-inline":void 0!==this.raw_options.braces_on_own_line&&(this.raw_options.brace_style=this.raw_options.braces_on_own_line?"expand":"collapse");var n=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(' '),v=">>>= "+"... >>= <<= === >>> !== **= &&= ??= ||= "+"=> ^= :: /= << <= == && -= >= >> != -- += ** || ?? ++ %= &= *= |= |> "+"= ! ? > < : / ^ - + * & % ~ |";v=(v='\\?\\.(?!\\d) '+(v=v.replace(/[-[\]{}()*+?.,\\^$|#]/g,"\\$&"))).replace(/ /g,'|');var y,_=new RegExp(v),O='continue,try,throw,return,var,let,const,if,switch,case,default,for,while,break,function,import,export'.split(','),b=O.concat(['do','in','of','else','get','set','new','catch','finally','typeof','yield','async','await','from','as','class','extends']),w=new RegExp('^(?:'+b.join('|')+')$'),x=function(t,e){i.call(this,t,e),this._patterns.whitespace=this._patterns.whitespace.matching(/\u00A0\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff/.source,/\u2028\u2029/.source);var n=new l(this._input),o=new c(this._input).read_options(this._options);this.__patterns={template:o,identifier:o.starting_with(a.identifier).matching(a.identifierMatch),number:n.matching(d),punct:n.matching(_),comment:n.starting_with(/\/\//).until(/[\n\r\u2028\u2029]/),block_comment:n.starting_with(/\/\*/).until_after(/\*\//),html_comment_start:n.matching(//),include:n.starting_with(/#include/).until_after(a.lineBreak),shebang:n.starting_with(/#!/).until_after(a.lineBreak),xml:n.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:o.until(/['\\\n\r\u2028\u2029]/),double_quote:o.until(/["\\\n\r\u2028\u2029]/),template_text:o.until(/[`\\$]/),template_expression:o.until(/[`}\\]/)}};(x.prototype=new i)._is_comment=function(t){return t.type===h.COMMENT||t.type===h.BLOCK_COMMENT||t.type===h.UNKNOWN},x.prototype._is_opening=function(t){return t.type===h.START_BLOCK||t.type===h.START_EXPR},x.prototype._is_closing=function(t,e){return(t.type===h.END_BLOCK||t.type===h.END_EXPR)&&e&&(']'===t.text&&'['===e.text||')'===t.text&&'('===e.text||'}'===t.text&&'{'===e.text)},x.prototype._reset=function(){y=!1},x.prototype._get_next_token=function(t,e){var n=null;this._readWhitespace();var o=this._input.peek();return null===o?this._create_token(h.EOF,''):n=(n=(n=(n=(n=(n=(n=(n=(n=(n=n||this._read_non_javascript(o))||this._read_string(o))||this._read_pair(o,this._input.peek(1)))||this._read_word(t))||this._read_singles(o))||this._read_comment(o))||this._read_regexp(o,t))||this._read_xml(o,t))||this._read_punctuation())||this._create_token(h.UNKNOWN,this._input.next())},x.prototype._read_word=function(t){var e;return''!==(e=this.__patterns.identifier.read())?(e=e.replace(a.allLineBreaks,'\n'),t.type!==h.DOT&&(t.type!==h.RESERVED||'set'!==t.text&&'get'!==t.text)&&w.test(e)?'in'!==e&&'of'!==e||t.type!==h.WORD&&t.type!==h.STRING?this._create_token(h.RESERVED,e):this._create_token(h.OPERATOR,e):this._create_token(h.WORD,e)):''!==(e=this.__patterns.number.read())?this._create_token(h.WORD,e):void 0},x.prototype._read_singles=function(t){var e=null;return'('===t||'['===t?e=this._create_token(h.START_EXPR,t):')'===t||']'===t?e=this._create_token(h.END_EXPR,t):'{'===t?e=this._create_token(h.START_BLOCK,t):'}'===t?e=this._create_token(h.END_BLOCK,t):';'===t?e=this._create_token(h.SEMICOLON,t):'.'===t&&g.test(this._input.peek(1))?e=this._create_token(h.DOT,t):','===t&&(e=this._create_token(h.COMMA,t)),e&&this._input.next(),e},x.prototype._read_pair=function(t,e){var n=null;return'#'===t&&'{'===e&&(n=this._create_token(h.START_BLOCK,t+e)),n&&(this._input.next(),this._input.next()),n},x.prototype._read_punctuation=function(){var t=this.__patterns.punct.read();if(''!==t)return'='===t?this._create_token(h.EQUALS,t):'?.'===t?this._create_token(h.DOT,t):this._create_token(h.OPERATOR,t)},x.prototype._read_non_javascript=function(t){var e='';if('#'===t){if(this._is_first_token()&&(e=this.__patterns.shebang.read()))return this._create_token(h.UNKNOWN,e.trim()+'\n');if(e=this.__patterns.include.read())return this._create_token(h.UNKNOWN,e.trim()+'\n');t=this._input.next();var n='#';if(this._input.hasNext()&&this._input.testChar(f)){do{n+=t=this._input.next()}while(this._input.hasNext()&&'#'!==t&&'='!==t);return'#'===t||('['===this._input.peek()&&']'===this._input.peek(1)?(n+='[]',this._input.next(),this._input.next()):'{'===this._input.peek()&&'}'===this._input.peek(1)&&(n+='{}',this._input.next(),this._input.next())),this._create_token(h.WORD,n)}this._input.back()}else if('<'===t&&this._is_first_token()){if(e=this.__patterns.html_comment_start.read()){for(;this._input.hasNext()&&!this._input.testChar(a.newline);)e+=this._input.next();return y=!0,this._create_token(h.COMMENT,e)}}else if(y&&'-'===t&&(e=this.__patterns.html_comment_end.read()))return y=!1,this._create_token(h.COMMENT,e);return null},x.prototype._read_comment=function(t){var e=null;if('/'===t){var n='';if('*'===this._input.peek(1)){n=this.__patterns.block_comment.read();var o=p.get_directives(n);o&&'start'===o.ignore&&(n+=p.readIgnored(this._input)),n=n.replace(a.allLineBreaks,'\n'),(e=this._create_token(h.BLOCK_COMMENT,n)).directives=o}else'/'===this._input.peek(1)&&(n=this.__patterns.comment.read(),e=this._create_token(h.COMMENT,n))}return e},x.prototype._read_string=function(t){if('`'===t||"'"===t||'"'===t){var e=this._input.next();return this.has_char_escapes=!1,e+='`'===t?this._read_string_recursive('`',!0,'${'):this._read_string_recursive(t),this.has_char_escapes&&this._options.unescape_strings&&(e=function(t){var e='',n=0,i=new o(t),r=null;for(;i.hasNext();)if((r=i.match(/([\s]|[^\\]|\\\\)+/g))&&(e+=r[0]),'\\'===i.peek()){if(i.next(),'x'===i.peek())r=i.match(/x([0-9A-Fa-f]{2})/g);else{if('u'!==i.peek()){e+='\\',i.hasNext()&&(e+=i.next());continue}(r=i.match(/u([0-9A-Fa-f]{4})/g))||(r=i.match(/u\{([0-9A-Fa-f]+)\}/g))}if(!r)return t;if((n=parseInt(r[1],16))>126&&n<=255&&0===r[0].indexOf('x'))return t;e+=n>=0&&n<32||n>1114111?'\\'+r[0]:34===n||39===n||92===n?'\\'+String.fromCharCode(n):String.fromCharCode(n)}return e}(e)),this._input.peek()===t&&(e+=this._input.next()),e=e.replace(a.allLineBreaks,'\n'),this._create_token(h.STRING,e)}return null},x.prototype._allow_regexp_or_xml=function(t){return t.type===h.RESERVED&&u(t.text,['return','case','throw','else','do','typeof','yield'])||t.type===h.END_EXPR&&')'===t.text&&t.opened.previous.type===h.RESERVED&&u(t.opened.previous.text,['if','while','for'])||u(t.type,[h.COMMENT,h.START_EXPR,h.START_BLOCK,h.START,h.END_BLOCK,h.OPERATOR,h.EQUALS,h.EOF,h.SEMICOLON,h.COMMA])},x.prototype._read_regexp=function(t,e){if('/'===t&&this._allow_regexp_or_xml(e)){for(var n=this._input.next(),o=!1,i=!1;this._input.hasNext()&&(o||i||this._input.peek()!==t)&&!this._input.testChar(a.newline);)n+=this._input.peek(),o?o=!1:(o='\\'===this._input.peek(),'['===this._input.peek()?i=!0:']'===this._input.peek()&&(i=!1)),this._input.next();return this._input.peek()===t&&(n+=this._input.next(),n+=this._input.read(a.identifier)),this._create_token(h.STRING,n)}return null},x.prototype._read_xml=function(t,e){if(this._options.e4x&&"<"===t&&this._allow_regexp_or_xml(e)){var n='',o=this.__patterns.xml.read_match();if(o){for(var i=o[2].replace(/^{\s+/,'{').replace(/\s+}$/,'}'),r=0===i.indexOf('{'),s=0;o;){var l=!!o[1],c=o[2];if(!(!!o[o.length-1]||"![CDATA["===c.slice(0,8))&&(c===i||r&&c.replace(/^{\s+/,'{').replace(/\s+}$/,'}'))&&(l?--s:++s),n+=o[0],s<=0)break;o=this.__patterns.xml.read_match()}return o||(n+=this._input.match(/[\s\S]*/g)[0]),n=n.replace(a.allLineBreaks,'\n'),this._create_token(h.STRING,n)}}return null},x.prototype._read_string_recursive=function(t,e,n){var o,i;'\''===t?i=this.__patterns.single_quote:'"'===t?i=this.__patterns.double_quote:'`'===t?i=this.__patterns.template_text:'}'===t&&(i=this.__patterns.template_expression);for(var r=i.read(),s='';this._input.hasNext();){if((s=this._input.next())===t||!e&&a.newline.test(s)){this._input.back();break}'\\'===s&&this._input.hasNext()?('x'===(o=this._input.peek())||'u'===o?this.has_char_escapes=!0:'\r'===o&&'\n'===this._input.peek(1)&&this._input.next(),s+=this._input.next()):n&&('${'===n&&'$'===s&&'{'===this._input.peek()&&(s+=this._input.next()),n===s&&(s+='`'===t?this._read_string_recursive('}',e,'`'):this._read_string_recursive('`',e,'${'),this._input.hasNext()&&(s+=this._input.next()))),r+=s+=i.read()}return r},t.exports.Tokenizer=x,t.exports.TOKEN=h,t.exports.positionable_operators=m.slice(),t.exports.line_starters=O.slice()},function(t){var e=RegExp.prototype.hasOwnProperty('sticky');function n(t){this.__input=t||'',this.__input_length=this.__input.length,this.__position=0}n.prototype.restart=function(){this.__position=0},n.prototype.back=function(){this.__position>0&&(this.__position-=1)},n.prototype.hasNext=function(){return this.__position=0&&t=0&&e=t.length&&this.__input.substring(e-t.length,e).toLowerCase()===t},t.exports.InputScanner=n},function(t,e,n){var o=n(8).InputScanner,i=n(3).Token,r=n(10).TokenStream,s=n(11).WhitespacePattern,a={START:'TK_START',RAW:'TK_RAW',EOF:'TK_EOF'},l=function(t,e){this._input=new o(t),this._options=e||{},this.__tokens=null,this._patterns={},this._patterns.whitespace=new s(this._input)};l.prototype.tokenize=function(){var t;this._input.restart(),this.__tokens=new r,this._reset();for(var e=new i(a.START,''),n=null,o=[],s=new r;e.type!==a.EOF;){for(t=this._get_next_token(e,n);this._is_comment(t);)s.add(t),t=this._get_next_token(e,n);s.isEmpty()||(t.comments_before=s,s=new r),t.parent=n,this._is_opening(t)?(o.push(n),n=t):n&&this._is_closing(t,n)&&(t.opened=n,n.closed=t,n=o.pop(),t.parent=n),t.previous=e,e.next=t,this.__tokens.add(t),e=t}return this.__tokens},l.prototype._is_first_token=function(){return this.__tokens.isEmpty()},l.prototype._reset=function(){},l.prototype._get_next_token=function(t,e){this._readWhitespace();var n=this._input.read(/.+/g);return n?this._create_token(a.RAW,n):this._create_token(a.EOF,'')},l.prototype._is_comment=function(t){return!1},l.prototype._is_opening=function(t){return!1},l.prototype._is_closing=function(t,e){return!1},l.prototype._create_token=function(t,e){return new i(t,e,this._patterns.whitespace.newline_count,this._patterns.whitespace.whitespace_before_token)},l.prototype._readWhitespace=function(){return this._patterns.whitespace.read()},t.exports.Tokenizer=l,t.exports.TOKEN=a},function(t){function e(t){this.__tokens=[],this.__tokens_length=this.__tokens.length,this.__position=0,this.__parent_token=t}e.prototype.restart=function(){this.__position=0},e.prototype.isEmpty=function(){return 0===this.__tokens_length},e.prototype.hasNext=function(){return this.__position=0&&t/),erb:n.starting_with(/<%[^%]/).until_after(/[^%]%>/),django:n.starting_with(/{%/).until_after(/%}/),django_value:n.starting_with(/{{/).until_after(/}}/),django_comment:n.starting_with(/{#/).until_after(/#}/),smarty:n.starting_with(/{(?=[^}{\s\n])/).until_after(/[^\s\n]}/),smarty_comment:n.starting_with(/{\*/).until_after(/\*}/),smarty_literal:n.starting_with(/{literal}/).until_after(/{\/literal}/)}}r.prototype=new o,r.prototype._create=function(){return new r(this._input,this)},r.prototype._update=function(){this.__set_templated_pattern()},r.prototype.disable=function(t){var e=this._create();return e._disabled[t]=!0,e._update(),e},r.prototype.read_options=function(t){var e=this._create();for(var n in i)e._disabled[n]=-1===t.templating.indexOf(n);return e._update(),e},r.prototype.exclude=function(t){var e=this._create();return e._excluded[t]=!0,e._update(),e},r.prototype.read=function(){var t='';t=this._match_pattern?this._input.read(this._starting_pattern):this._input.read(this._starting_pattern,this.__template_pattern);for(var e=this._read_template();e;)this._match_pattern?e+=this._input.read(this._match_pattern):e+=this._input.readUntil(this.__template_pattern),t+=e,e=this._read_template();return this._until_after&&(t+=this._input.readUntilAfter(this._until_pattern)),t},r.prototype.__set_templated_pattern=function(){var t=[];this._disabled.php||t.push(this.__patterns.php._starting_pattern.source),this._disabled.handlebars||t.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.erb||t.push(this.__patterns.erb._starting_pattern.source),this._disabled.django||(t.push(this.__patterns.django._starting_pattern.source),t.push(this.__patterns.django_value._starting_pattern.source),t.push(this.__patterns.django_comment._starting_pattern.source)),this._disabled.smarty||t.push(this.__patterns.smarty._starting_pattern.source),this._until_pattern&&t.push(this._until_pattern.source),this.__template_pattern=this._input.get_regexp('(?:'+t.join('|')+')')},r.prototype._read_template=function(){var t='',e=this._input.peek();if('<'===e){var n=this._input.peek(1);this._disabled.php||this._excluded.php||'?'!==n||(t=t||this.__patterns.php.read()),this._disabled.erb||this._excluded.erb||'%'!==n||(t=t||this.__patterns.erb.read())}else'{'===e&&(this._disabled.handlebars||this._excluded.handlebars||(t=(t=(t=t||this.__patterns.handlebars_comment.read())||this.__patterns.handlebars_unescaped.read())||this.__patterns.handlebars.read()),this._disabled.django||(this._excluded.django||this._excluded.handlebars||(t=t||this.__patterns.django_value.read()),this._excluded.django||(t=(t=t||this.__patterns.django_comment.read())||this.__patterns.django.read())),this._disabled.smarty||this._disabled.django&&this._disabled.handlebars&&(t=(t=(t=t||this.__patterns.smarty_comment.read())||this.__patterns.smarty_literal.read())||this.__patterns.smarty.read()));return t},t.exports.TemplatablePattern=r}],e={};var n=function n(o){var i=e[o];if(void 0!==i)return i.exports;var r=e[o]={exports:{}};return t[o](r,r.exports,n),r.exports}(0);o=n}();var i=o;1&&(void 0===(n=function(){return{js_beautify:i}}.apply(e,[]))||(t.exports=n))}()},410:(t,e,n)=>{var o,i,r;1&&(i=[n(50),n(316)],void 0===(r='function'==typeof(o=function(t,e){var n=Array.prototype.slice;function o(t,e,n){return n.length<=4?t.call(e,n[0],n[1],n[2],n[3]):t.apply(e,n)}function i(t,e){return n.call(t,e)}function r(e,n){return null!=e&&(t.isArray(n)||(n=i(arguments,1)),t.all(n,(function(t){return t in e})))}var s=function(){var e=!1,n=-1;function o(){n++,e=!0,t.defer((function(){e=!1}))}return function(){return e||o(),n}}();function a(){this.registeredObjects=[],this.cidIndexes=[]}function l(e,n,o,i){for(var r,s=0,a=n.length;st.maximumStackLength&&(t.shift(),t.pointer--)}}}a.prototype={isRegistered:function(e){return e&&e.cid?this.registeredObjects[e.cid]:t.contains(this.registeredObjects,e)},register:function(t){return!this.isRegistered(t)&&(t&&t.cid?(this.registeredObjects[t.cid]=t,this.cidIndexes.push(t.cid)):this.registeredObjects.push(t),!0)},unregister:function(e){if(this.isRegistered(e)){if(e&&e.cid)delete this.registeredObjects[e.cid],this.cidIndexes.splice(t.indexOf(this.cidIndexes,e.cid),1);else{var n=t.indexOf(this.registeredObjects,e);this.registeredObjects.splice(n,1)}return!0}return!1},get:function(){return t.map(this.cidIndexes,(function(t){return this.registeredObjects[t]}),this).concat(this.registeredObjects)}};var d={add:{undo:function(t,e,n,o){t.remove(n,o)},redo:function(t,e,n,o){o.index&&(o.at=o.index),t.add(n,o)},on:function(e,n,o){return{object:n,before:void 0,after:e,options:t.clone(o)}}},remove:{undo:function(t,e,n,o){"index"in o&&(o.at=o.index),t.add(e,o)},redo:function(t,e,n,o){t.remove(e,o)},on:function(e,n,o){return{object:n,before:e,after:void 0,options:t.clone(o)}}},change:{undo:function(e,n,o,i){t.isEmpty(n)?t.each(t.keys(o),e.unset,e):(e.set(n),i&&i.unsetData&&i.unsetData.before&&i.unsetData.before.length&&t.each(i.unsetData.before,e.unset,e))},redo:function(e,n,o,i){t.isEmpty(o)?t.each(t.keys(n),e.unset,e):(e.set(o),i&&i.unsetData&&i.unsetData.after&&i.unsetData.after.length&&t.each(i.unsetData.after,e.unset,e))},on:function(e,n){var o=e.changedAttributes(),i=t.keys(o),r=t.pick(e.previousAttributes(),i),s=t.keys(r),a=(n||(n={})).unsetData={after:[],before:[]};return i.length!=s.length&&(i.length>s.length?t.each(i,(function(t){t in r||a.before.push(t)}),this):t.each(s,(function(t){t in o||a.after.push(t)}))),{object:e,before:r,after:o,options:t.clone(n)}}},reset:{undo:function(t,e,n){t.reset(e)},redo:function(t,e,n){t.reset(n)},on:function(e,n){return{object:e,before:n.previousModels,after:t.clone(e.models)}}}};function f(){}function g(e,n,o,i){if("object"==typeof n)return t.each(n,(function(t,n){2===e?g(e,t,o,i):g(e,n,t,o)}));switch(e){case 0:r(o,"undo","redo","on")&&t.all(t.pick(o,"undo","redo","on"),t.isFunction)&&(i[n]=o);break;case 1:i[n]&&t.isObject(o)&&(i[n]=t.extend({},i[n],o));break;case 2:delete i[n]}return this}f.prototype=d;var m=e.Model.extend({defaults:{type:null,object:null,before:null,after:null,magicFusionIndex:null},undo:function(t){c("undo",this.attributes)},redo:function(t){c("redo",this.attributes)}}),v=e.Collection.extend({model:m,pointer:-1,track:!1,isCurrentlyUndoRedoing:!1,maximumStackLength:1/0,setMaxLength:function(t){this.maximumStackLength=t}}),y=e.Model.extend({defaults:{maximumStackLength:1/0,track:!1},initialize:function(e){this.stack=new v,this.objectRegistry=new a,this.undoTypes=new f,this.stack.setMaxLength(this.get("maximumStackLength")),this.on("change:maximumStackLength",(function(t,e){this.stack.setMaxLength(e)}),this),e&&e.track&&this.startTracking(),e&&e.register&&(t.isArray(e.register)||t.isArguments(e.register)?o(this.register,this,e.register):this.register(e.register))},startTracking:function(){this.set("track",!0),this.stack.track=!0},stopTracking:function(){this.set("track",!1),this.stack.track=!1},isTracking:function(){return this.get("track")},_addToStack:function(t){p(this.stack,t,i(arguments,1),this.undoTypes)},register:function(){l("on",arguments,this._addToStack,this)},unregister:function(){l("off",arguments,this._addToStack,this)},unregisterAll:function(){o(this.unregister,this,this.objectRegistry.get())},undo:function(t){u("undo",this,this.stack,t)},undoAll:function(){u("undo",this,this.stack,!1,!0)},redo:function(t){u("redo",this,this.stack,t)},redoAll:function(){u("redo",this,this.stack,!1,!0)},isAvailable:function(t){var e=this.stack,n=e.length;switch(t){case"undo":return n>0&&e.pointer>-1;case"redo":return n>0&&e.pointer{var o,i;!function(r){var s='object'==typeof self&&self.self===self&&self||'object'==typeof n.g&&n.g.global===n.g&&n.g;if(1)o=[n(50),n(815),e],i=function(t,e,n){s.Backbone=function(t,e,n,o){var i=t.Backbone,r=Array.prototype.slice;e.VERSION='1.4.1',e.$=o,e.noConflict=function(){return t.Backbone=i,this},e.emulateHTTP=!1,e.emulateJSON=!1;var s,a=e.Events={},l=/\s+/,c=function(t,e,o,i,r){var s,a=0;if(o&&'object'==typeof o){void 0!==i&&'context'in r&&void 0===r.context&&(r.context=i);for(s=n.keys(o);athis.length&&(i=this.length),i<0&&(i+=this.length+1);var r,s,a=[],l=[],c=[],u=[],h={},p=e.add,d=e.merge,f=e.remove,g=!1,m=this.comparator&&null==i&&!1!==e.sort,v=n.isString(this.comparator)?this.comparator:null;for(s=0;s7),this._useHashChange=this._wantsHashChange&&this._hasHashChange,this._wantsPushState=!!this.options.pushState,this._hasPushState=!(!this.history||!this.history.pushState),this._usePushState=this._wantsPushState&&this._hasPushState,this.fragment=this.getFragment(),this.root=('/'+this.root+'/').replace(Y,'/'),this._wantsHashChange&&this._wantsPushState){if(!this._hasPushState&&!this.atRoot()){var e=this.root.slice(0,-1)||'/';return this.location.replace(e+'#'+this.getPath()),!0}this._hasPushState&&this.atRoot()&&this.navigate(this.getHash(),{replace:!0})}if(!this._hasHashChange&&this._wantsHashChange&&!this._usePushState){this.iframe=document.createElement('iframe'),this.iframe.src='javascript:0',this.iframe.style.display='none',this.iframe.tabIndex=-1;var o=document.body,i=o.insertBefore(this.iframe,o.firstChild).contentWindow;i.document.open(),i.document.close(),i.location.hash='#'+this.fragment}var r=window.addEventListener||function(t,e){return attachEvent('on'+t,e)};if(this._usePushState?r('popstate',this.checkUrl,!1):this._useHashChange&&!this.iframe?r('hashchange',this.checkUrl,!1):this._wantsHashChange&&(this._checkUrlInterval=setInterval(this.checkUrl,this.interval)),!this.options.silent)return this.loadUrl()},stop:function(){var t=window.removeEventListener||function(t,e){return detachEvent('on'+t,e)};this._usePushState?t('popstate',this.checkUrl,!1):this._useHashChange&&!this.iframe&&t('hashchange',this.checkUrl,!1),this.iframe&&(document.body.removeChild(this.iframe),this.iframe=null),this._checkUrlInterval&&clearInterval(this._checkUrlInterval),X.started=!1},route:function(t,e){this.handlers.unshift({route:t,callback:e})},checkUrl:function(t){var e=this.getFragment();if(e===this.fragment&&this.iframe&&(e=this.getHash(this.iframe.contentWindow)),e===this.fragment)return!1;this.iframe&&this.navigate(e),this.loadUrl()},loadUrl:function(t){return!!this.matchRoot()&&(t=this.fragment=this.getFragment(t),n.some(this.handlers,(function(e){if(e.route.test(t))return e.callback(t),!0})))},navigate:function(t,e){if(!X.started)return!1;e&&!0!==e||(e={trigger:!!e}),t=this.getFragment(t||'');var n=this.root;''!==t&&'?'!==t.charAt(0)||(n=n.slice(0,-1)||'/');var o=n+t;t=t.replace(z,'');var i=this.decodeFragment(t);if(this.fragment!==i){if(this.fragment=i,this._usePushState)this.history[e.replace?'replaceState':'pushState']({},document.title,o);else{if(!this._wantsHashChange)return this.location.assign(o);if(this._updateHash(this.location,t,e.replace),this.iframe&&t!==this.getHash(this.iframe.contentWindow)){var r=this.iframe.contentWindow;e.replace||(r.document.open(),r.document.close()),this._updateHash(r.location,t,e.replace)}}return e.trigger?this.loadUrl(t):void 0}},_updateHash:function(t,e,n){if(n){var o=t.href.replace(/(javascript:|#).*$/,'');t.replace(o+'#'+e)}else t.hash='#'+e}}),e.history=new X;var q=function(t,e){var o,i=this;return o=t&&n.has(t,'constructor')?t.constructor:function(){return i.apply(this,arguments)},n.extend(o,i,e),o.prototype=n.create(i.prototype,t),o.prototype.constructor=o,o.__super__=i.prototype,o};v.extend=y.extend=V.extend=C.extend=X.extend=q;var U=function(){throw new Error('A "url" property or function must be specified')},B=function(t,e){var n=e.error;e.error=function(o){n&&n.call(e.context,t,o,e),t.trigger('error',t,o,e)}};return e}(s,n,t,e)}.apply(e,o),void 0===i||(t.exports=i);else;}()},728:(t,e,n)=>{"use strict";n.d(e,{Z:()=>s});var o,i=n(847),r=void 0&&(void 0).__extends||(o=function(t,e){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},o(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});const s=function(t){function e(e,n,o){var i=t.call(this,n,o)||this;return i._module=e,i}return r(e,t),Object.defineProperty(e.prototype,"module",{get:function(){return this._module},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"config",{get:function(){return this._module.config},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"em",{get:function(){return this._module.em},enumerable:!1,configurable:!0}),e}(i.Hn)},201:(t,e,n)=>{"use strict";n.d(e,{Z:()=>a,q:()=>i});var o,i,r=n(728),s=void 0&&(void 0).__extends||(o=function(t,e){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},o(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});!function(t){t["Select"]="select",t["Hover"]="hover",t["Spacing"]="spacing",t["Target"]="target",t["Resize"]="resize"}(i||(i={}));const a=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return s(e,t),e.prototype.defaults=function(){return{id:'',type:''}},Object.defineProperty(e.prototype,"type",{get:function(){return this.get('type')||''},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"component",{get:function(){var t;return this.get('component')||(null===(t=this.get('componentView'))||void 0===t?void 0:t.model)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"componentView",{get:function(){var t;return this.get('componentView')||(null===(t=this.get('component'))||void 0===t?void 0:t.getView())},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"el",{get:function(){var t;return null===(t=this.componentView)||void 0===t?void 0:t.el},enumerable:!1,configurable:!0}),e.prototype.getBoxRect=function(t){var e=this.el,n=this.em.Canvas.getCanvasView(),o=this.get('boxRect');return o||(e&&n?n.getElBoxRect(e,t):{x:0,y:0,width:0,height:0})},e.prototype.getStyle=function(t){void 0===t&&(t={});var e=t.boxRect||this.getBoxRect(t),n=e.width,o=e.height,i=e.x,r=e.y;return{width:"".concat(n,"px"),height:"".concat(o,"px"),top:'0',left:'0',position:'absolute',translate:"".concat(i,"px ").concat(r,"px")}},e.prototype.isType=function(t){return this.type===t},e}(r.Z)},266:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>o});const o={run:function(t){t.Components.clear(),t.Css.clear()}}},142:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>s});var o=n(50),i=n(250),r=n(968);const s={run:function(t){(0,o.bindAll)(this,'onKeyUp','enableDragger','disableDragger'),this.editor=t,this.canvasModel=this.canvas.getCanvasView().model,this.toggleMove(1)},stop:function(t){this.toggleMove(),this.disableDragger()},onKeyUp:function(t){' '===(0,r.sN)(t)&&this.editor.stopCommand(this.id)},enableDragger:function(t){this.toggleDragger(1,t)},disableDragger:function(t){this.toggleDragger(0,t)},toggleDragger:function(t,e){var n=this.canvasModel,o=this.em,r=this.dragger,s=t?'add':'remove';this.getCanvas().classList[s]("".concat(this.ppfx,"is__grabbing")),r||(r=new i.Z({getPosition:function(){return{x:n.get('x'),y:n.get('y')}},setPosition:function(t){var e=t.x,o=t.y;n.set({x:e,y:o})},onStart:function(t,e){o.trigger('canvas:move:start',e)},onDrag:function(t,e){o.trigger('canvas:move',e)},onEnd:function(t,e){o.trigger('canvas:move:end',e)}}),this.dragger=r),t?r.start(e):r.stop()},toggleMove:function(t){var e=this.ppfx,n=t?'add':'remove',o=t?'on':'off',i={on:r.on,off:r.S1},s=this.getCanvas(),a=["".concat(e,"is__grab")];!t&&a.push("".concat(e,"is__grabbing")),a.forEach((function(t){return s.classList[n](t)})),i[o](document,'keyup',this.onKeyUp),i[o](s,'mousedown',this.enableDragger),i[o](document,'mouseup',this.disableDragger)}}},458:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>a,defineCommand:()=>s});var o,i=n(847),r=void 0&&(void 0).__extends||(o=function(t,e){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},o(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});function s(t){return t}const a=function(t){function e(e){var n=t.call(this,0)||this;n.config=e||{},n.em=n.config.em||{};var o=n.config.stylePrefix;return n.pfx=o,n.ppfx=n.config.pStylePrefix,n.hoverClass="".concat(o,"hover"),n.badgeClass="".concat(o,"badge"),n.plhClass="".concat(o,"placeholder"),n.freezClass="".concat(n.ppfx,"freezed"),n.canvas=n.em.Canvas,n.init(n.config),n}return r(e,t),e.prototype.onFrameScroll=function(t){},e.prototype.getCanvas=function(){return this.canvas.getElement()},e.prototype.getCanvasBody=function(){return this.canvas.getBody()},e.prototype.getCanvasTools=function(){return this.canvas.getToolsEl()},e.prototype.offset=function(t){var e=t.getBoundingClientRect();return{top:e.top+t.ownerDocument.body.scrollTop,left:e.left+t.ownerDocument.body.scrollLeft}},e.prototype.init=function(t){},e.prototype.callRun=function(t,e){void 0===e&&(e={});var n=this.id;if(t.trigger("run:".concat(n,":before"),e),!e||!e.abort){var o=e.sender||t,i=this.run(t,o,e);return t.trigger("run:".concat(n),i,e),t.trigger('run',n,i,e),i}t.trigger("abort:".concat(n),e)},e.prototype.callStop=function(t,e){void 0===e&&(e={});var n=this.id,o=e.sender||t;t.trigger("stop:".concat(n,":before"),e);var i=this.stop(t,o,e);return t.trigger("stop:".concat(n),i,e),t.trigger('stop',n,i,e),i},e.prototype.stopCommand=function(t){this.em.Commands.stop(this.id,t)},e.prototype.run=function(t,e,n){},e.prototype.stop=function(t,e,n){},e}(i.Hn)},463:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>r});var o=n(50),i=void 0&&(void 0).__spreadArray||function(t,e,n){if(n||2===arguments.length)for(var o,i=0,r=e.length;i{"use strict";n.r(e),n.d(e,{default:()=>a});var o=n(50),i=n(250),r=void 0&&(void 0).__assign||function(){return r=Object.assign||function(t){for(var e,n=1,o=arguments.length;n\n
\n ");(e=document.createElement('div')).className="".concat(a,"guides"),l.className="".concat(a,"guide-info ").concat(a,"guide-info__x"),c.className="".concat(a,"guide-info ").concat(a,"guide-info__y"),l.innerHTML=u,c.innerHTML=u,e.appendChild(l),e.appendChild(c),i.Canvas.getGlobalToolsEl().appendChild(e),this.guidesEl=e,this.elGuideInfoX=l,this.elGuideInfoY=c,this.elGuideInfoContentX=l.querySelector(".".concat(a,"guide-info__content")),this.elGuideInfoContentY=c.querySelector(".".concat(a,"guide-info__content")),r.on('canvas:update frame:scroll',(0,o.debounce)((function(){var e;t.updateGuides(),s.debug&&(null===(e=t.guides)||void 0===e||e.forEach((function(e){return t.renderGuide(e)})))}),200))}return e},getGuidesStatic:function(){var t=this,e=[],n=this.target.getEl(),i=n.parentNode,r=void 0===i?{}:i;return(0,o.each)(r.children,(function(o){return e=e.concat(n!==o?t.getElementGuides(o):[])})),e.concat(this.getElementGuides(r))},getGuidesTarget:function(){return this.getElementGuides(this.target.getEl())},updateGuides:function(t){var e,n,i=this;(t||this.guides).forEach((function(t){var r=t.origin,s=e===r?n:i.getElementPos(r);e=r,n=s,(0,o.each)(i.getGuidePosUpdate(t,s),(function(e,n){return t[n]=e})),t.originRect=s}))},getGuidePosUpdate:function(t,e){var n={},o=e.top,i=e.height,r=e.left,s=e.width;switch(t.type){case't':n.y=o;break;case'b':n.y=o+i;break;case'l':n.x=r;break;case'r':n.x=r+s;break;case'x':n.x=r+s/2;break;case'y':n.y=o+i/2}return n},renderGuide:function(t){void 0===t&&(t={});var e=t.guide||document.createElement('div'),n='px',o=t.active?2:1,i=e.children[0];return e.style="position: absolute; background-color: ".concat(t.active?'green':'red',";"),e.children.length||((i=document.createElement('div')).style='position: absolute; color: red; padding: 5px; top: 0; left: 0;',e.appendChild(i)),t.y?(e.style.width='100%',e.style.height="".concat(o).concat(n),e.style.top="".concat(t.y).concat(n),e.style.left=0):(e.style.width="".concat(o).concat(n),e.style.height='100%',e.style.left="".concat(t.x).concat(n),e.style.top="0".concat(n)),!t.guide&&this.guidesContainer.appendChild(e),e},getElementPos:function(t){return this.editor.Canvas.getElementPos(t,{noScroll:1})},getElementGuides:function(t){var e=this,n=this.opts,o=this.getElementPos(t),i=o.top,s=o.height,a=o.left,l=o.width,c=[{type:'t',y:i},{type:'b',y:i+s},{type:'l',x:a},{type:'r',x:a+l},{type:'x',x:a+l/2},{type:'y',y:i+s/2}].map((function(i){return r(r({},i),{origin:t,originRect:o,guide:n.debug&&e.renderGuide(i)})}));return c.forEach((function(t){var n;return null===(n=e.guides)||void 0===n?void 0:n.push(t)})),c},getTranslate:function(t,e){void 0===e&&(e='x');var n=0;return(t||'').split(' ').forEach((function(t){var o=t.trim(),i="translate".concat(e.toUpperCase(),"(");0===o.indexOf(i)&&(n=parseFloat(o.replace(i,'')))})),n},setTranslate:function(t,e,n){var o="translate".concat(e.toUpperCase(),"("),i="".concat(o).concat(n,")"),r=(t||'').split(' ').map((function(t){return 0===t.trim().indexOf(o)&&(t=i),t})).join(' ');return r.indexOf(o)<0&&(r+=" ".concat(i)),r},getPosition:function(){var t=this.target,e=this.isTran,n=t.getStyle(),o=n.left,i=n.top,r=n.transform,s=0,a=0;return e?(s=this.getTranslate(r),a=this.getTranslate(r,'y')):(s=parseFloat(o||0),a=parseFloat(i||0)),{x:s,y:a}},setPosition:function(t){var e=t.x,n=t.y,i=t.end,r=t.position,s=t.width,a=t.height,l=this,c=l.target,u=l.isTran,h=l.em,p='px',d=!i,f="".concat(parseInt(e,10)).concat(p),g="".concat(parseInt(n,10)).concat(p),m={};if(u){var v=c.getStyle()['transform']||'';v=this.setTranslate(v,'x',f),m={transform:v=this.setTranslate(v,'y',g),__p:d},c.addStyle(m,{avoidStore:!i})}else{var y={position:r,width:s,height:a},_={left:f,top:g,__p:d};(0,o.keys)(y).forEach((function(t){var e=y[t];e&&(_[t]=e)})),m=_,c.addStyle(m,{avoidStore:!i})}null==h||h.Styles.__emitCmpStyleUpdate(m,{components:h.getSelected()})},_getDragData:function(){var t=this.target;return{target:t,parent:t.parent(),index:t.index()}},onStart:function(t){var e=this,n=e.target,o=e.editor,i=e.isTran,r=e.opts,s=r.center,a=r.onStart,l=o.Canvas,c=n.getStyle(),u='absolute',h=[u,'relative'];if(a&&a(this._getDragData()),!i&&c.position!==u){var p=l.offset(n.getEl()),d=p.left,f=p.top,g=p.width,m=p.height,v=n.parent(),y=void 0;do{var _=v.getStyle();y=h.indexOf(_.position)>=0?v:null,v=v.parent()}while(v&&!y);if(s){var O=l.getMouseRelativeCanvas(t);d=O.x,f=O.y}else if(y){var b=l.offset(y.getEl());d-=b.left,f-=b.top}this.setPosition({x:d,y:f,width:"".concat(g,"px"),height:"".concat(m,"px"),position:u})}},onDrag:function(){for(var t=this,e=[],n=0;n0})).sort((function(t,e){return t.gap-e.gap})).map((function(t){return t.guide}))[0];if(y){var _=y.originRect,O=_.left,b=_.width,w=_.top,x=_.height,S=_.rect,k=u?O{"use strict";n.r(e),n.d(e,{default:()=>o});const o={run:function(t){if(t.Canvas.hasFocus()){var e=[];t.getSelectedAll().forEach((function(t){var n=t.components(),o=n&&n.filter((function(t){return t.get('selectable')}))[0];o&&e.push(o)})),e.length&&t.select(e)}}}},594:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>o});const o={run:function(t,e,n){if(void 0===n&&(n={}),t.Canvas.hasFocus()||n.force){var o=[];t.getSelectedAll().forEach((function(t){for(var e=t.parent();e&&!e.get('selectable');)e=e.parent();e&&o.push(e)})),o.length&&t.select(o)}}}},656:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>o});const o={run:function(t){if(t.Canvas.hasFocus()){var e=[];t.getSelectedAll().forEach((function(t){var n=t.parent();if(n){var o,i=n.components().length,r=0,s=0;do{r++,o=(s=t.index()+r)<=i?n.getChildAt(s):null}while(o&&!o.get('selectable'));e.push(o||t)}})),e.length&&t.select(e)}}}},768:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>o});const o={run:function(t){if(t.Canvas.hasFocus()){var e=[];t.getSelectedAll().forEach((function(t){var n=t.parent();if(n){var o,i=0,r=0;do{i++,o=(r=t.index()-i)>=0?n.getChildAt(r):null}while(o&&!o.get('selectable'));e.push(o||t)}})),e.length&&t.select(e)}}}},570:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>i});var o=n(50);const i={run:function(t,e,n){void 0===n&&(n={});var i=n.target,r=[];if(!i.get('styles'))return r;var s=i.get('type'),a=t.Pages.getAllWrappers();if(!(0,o.flatten)(a.map((function(t){return t.findType(s)}))).length){var l=t.CssComposer.getAll();r=l.filter((function(t){return t.get('group')==="cmp:".concat(s)})),l.remove(r)}return r}}},282:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>i});var o=void 0&&(void 0).__spreadArray||function(t,e,n){if(n||2===arguments.length)for(var o,i=0,r=e.length;i{"use strict";n.r(e),n.d(e,{default:()=>i});var o=n(968);const i={run:function(t,e,n){var i=this;void 0===n&&(n={}),e&&e.set&&e.set('active',0);var r=t.getConfig(),s=t.Modal,a=r.stylePrefix;if(this.cm=t.CodeManager||null,!this.editors){var l=this.buildEditor('htmlmixed','hopscotch','HTML'),c=this.buildEditor('css','hopscotch','CSS');this.htmlEditor=l.model,this.cssEditor=c.model;var u=(0,o.ut)('div',{class:"".concat(a,"export-dl")});u.appendChild(l.el),u.appendChild(c.el),this.editors=u}s.open({title:r.textViewCode,content:this.editors}).getModel().once('change:open',(function(){return t.stopCommand("".concat(i.id))})),this.htmlEditor.setContent(t.getHtml(n.optsHtml)),this.cssEditor.setContent(t.getCss(n.optsCss))},stop:function(t){var e=t.Modal;e&&e.close()},buildEditor:function(t,e,n){var o=this.em.CodeManager,i=o.createViewer({label:n,codeName:t,theme:e});return{model:i,el:new o.EditorView({model:i,config:o.getConfig()}).render().el}}}},212:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>i});var o=n(50);const i={isEnabled:function(){var t=document;return!!(t.fullscreenElement||t.webkitFullscreenElement||t.mozFullScreenElement)},enable:function(t){var e='';return t.requestFullscreen?t.requestFullscreen():t.webkitRequestFullscreen?(e='webkit',t.webkitRequestFullscreen()):t.mozRequestFullScreen?(e='moz',t.mozRequestFullScreen()):t.msRequestFullscreen&&t.msRequestFullscreen(),e},disable:function(){var t=document;this.isEnabled()&&(t.exitFullscreen?t.exitFullscreen():t.webkitExitFullscreen?t.webkitExitFullscreen():t.mozCancelFullScreen?t.mozCancelFullScreen():t.msExitFullscreen&&t.msExitFullscreen())},fsChanged:function(t){this.isEnabled()||(this.stopCommand({sender:this.sender}),document.removeEventListener("".concat(t||'',"fullscreenchange"),this.fsChanged))},run:function(t,e,n){void 0===n&&(n={}),this.sender=e;var i=n.target,r=(0,o.isElement)(i)?i:document.querySelector(i),s=this.enable(r||t.getContainer());this.fsChanged=this.fsChanged.bind(this,s),document.addEventListener(s+'fullscreenchange',this.fsChanged),t.trigger('change:canvasOffset')},stop:function(t,e){e&&e.set&&e.set('active',!1),this.disable(),t&&t.trigger('change:canvasOffset')}}},907:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>l});var o=n(50),i=n(815),r=n(968),s=n(938),a=n(477);const l=(0,o.extend)({},a["default"],s["default"],{init:function(t){s["default"].init.apply(this,arguments),(0,o.bindAll)(this,'initSorter','rollback','onEndMove'),this.opt=t,this.hoverClass=this.ppfx+'highlighter-warning',this.badgeClass=this.ppfx+'badge-warning',this.noSelClass=this.ppfx+'no-select'},enable:function(){for(var t=[],e=0;e{"use strict";n.r(e),n.d(e,{default:()=>r});var o=n(50),i=n(968);const r={open:function(t){var e=this,n=this,i=n.editor,r=n.title,s=n.config,a=n.am,l=s.custom;if((0,o.isFunction)(l.open))return l.open(a.__customData());i.Modal.open({title:r,content:t}).onceClose((function(){return i.stopCommand(e.id)}))},close:function(){var t=this.config.custom;if((0,o.isFunction)(t.close))return t.close(this.am.__customData());var e=this.editor.Modal;e&&e.close()},run:function(t,e,n){void 0===n&&(n={});var o=t.AssetManager,r=o.getConfig(),s=n.types,a=void 0===s?[]:s,l=n.accept,c=n.select;if(this.title=n.modalTitle||t.t('assetManager.modalTitle')||'',this.editor=t,this.config=r,this.am=o,o.setTarget(n.target),o.onClick(n.onClick),o.onDblClick(n.onDblClick),o.onSelect(n.onSelect),o.__behaviour({select:c,types:a,options:n}),r.custom)this.rendered=this.rendered||(0,i.ut)('div'),this.rendered.className="".concat(r.stylePrefix,"custom-wrp"),o.__behaviour({container:this.rendered}),o.__trgCustom();else{if(!this.rendered||a){var u=o.getAll().filter((function(t){return t}));a&&a.length&&(u=u.filter((function(t){return-1!==a.indexOf(t.get('type'))}))),o.render(u),this.rendered=o.getContainer()}if(l){var h=this.rendered.querySelector("input#".concat(r.stylePrefix,"uploadFile"));h&&h.setAttribute('accept',l)}}return this.open(this.rendered),this},stop:function(t){this.editor=t,this.close(this.rendered)}}},268:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>r});var o=n(50),i=n(968);const r={open:function(){var t=this,e=t.container,n=t.editor,i=t.bm,r=t.config,s=r.custom,a=r.appendTo;if((0,o.isFunction)(s.open))return s.open(i.__customData());if(this.firstRender&&!a){var l='views-container',c=n.Panels;(c.getPanel(l)||c.addPanel({id:l})).set('appendContent',e).trigger('change:appendContent'),s||e.appendChild(i.render())}e&&(e.style.display='block')},close:function(){var t=this.container,e=this.config.custom;if((0,o.isFunction)(e.close))return e.close(this.bm.__customData());t&&(t.style.display='none')},run:function(t){var e=t.Blocks;this.config=e.getConfig(),this.firstRender=!this.container,this.container=this.container||(0,i.ut)('div'),this.editor=t,this.bm=e;var n=this.container;e.__behaviour({container:n}),this.config.custom&&e.__trgCustom(),this.open()},stop:function(){this.close()}}},556:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>o});const o={run:function(t){var e=t.LayerManager,n=t.Panels,o=e.getConfig();if(!o.appendTo){if(!this.layers){var i='views-container',r=document.createElement('div'),s=n.getPanel(i)||n.addPanel({id:i});o.custom?e.__trgCustom({container:r}):r.appendChild(e.render()),s.set('appendContent',r).trigger('change:appendContent'),this.layers=r}this.layers.style.display='block'}},stop:function(){var t=this.layers;t&&(t.style.display='none')}}},120:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>o});const o={run:function(t){var e=t.Pages,n=t.Panels;if(!e.getConfig().appendTo){if(!this.layers){var o='views-container',i=document.createElement('div'),r=n.getPanel(o)||n.addPanel({id:o});i.appendChild(e.render()),r.set('appendContent',i).trigger('change:appendContent'),this.layers=i}this.layers.style.display='block'}},stop:function(){var t=this.layers;t&&(t.style.display='none')}}},462:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>i});var o=n(815);const i={run:function(t,e){if(this.sender=e,!this.$cnt){var n=t.getConfig(),i=t.Panels,r=t.DeviceManager,s=t.SelectorManager,a=t.StyleManager,l='change:appendContent',c=(0,o["default"])('
'),u=(0,o["default"])('
'),h=(0,o["default"])('
'),p=(0,o["default"])('
');if(this.$cnt=c,this.$cntInner=u,u.append(h),u.append(p),c.append(u),r&&n.showDevices){var d=i.addPanel({id:'devices-c'}),f=r.render();d.set('appendContent',f).trigger(l)}var g=s.getConfig();g.custom?s.__trgCustom({container:h.get(0)}):g.appendTo||h.append(s.render([])),this.sm=a;var m=a.getConfig(),v=m.stylePrefix;this.$header=(0,o["default"])("
").concat(t.t('styleManager.empty'),"
")),c.append(this.$header),m.custom?a.__trgCustom({container:p.get(0)}):m.appendTo||p.append(a.render());var y='views-container';(i.getPanel(y)||i.addPanel({id:y})).set('appendContent',c).trigger(l);var _=t.getModel();this.listenTo(_,a.events.target,this.toggleSm)}this.toggleSm()},toggleSm:function(){var t=this,e=t.sender,n=t.sm,o=t.$cntInner,i=t.$header;e&&e.get&&!e.get('active')||!n||(n.getSelected()?(null==o||o.show(),null==i||i.hide()):(null==o||o.hide(),null==i||i.show()))},stop:function(){var t,e;null===(t=this.$cntInner)||void 0===t||t.hide(),null===(e=this.$header)||void 0===e||e.hide()}}},521:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>i});var o=n(815);const i={run:function(t,e){this.sender=e;var n,i=t.getModel(),r=t.Config.stylePrefix,s=t.TraitManager,a=s.getConfig();if(!a.appendTo){if(!this.$cn){this.$cn=(0,o["default"])('
'),this.$cn2=(0,o["default"])('
'),this.$cn.append(this.$cn2),this.$header=(0,o["default"])('
').append("
").concat(i.t('traitManager.empty'),"
")),this.$cn.append(this.$header),a.custom?s.__trgCustom({container:this.$cn2.get(0)}):(this.$cn2.append("
").concat(i.t('traitManager.label'),"
")),this.$cn2.append(s.render()));var l=t.Panels;null==(n=l.getPanel('views-container')?l.getPanel('views-container'):l.addPanel({id:'views-container'}))||n.set('appendContent',this.$cn.get(0)).trigger('change:appendContent'),this.target=t.getModel(),this.listenTo(this.target,'component:toggled',this.toggleTm)}this.toggleTm()}},toggleTm:function(){var t=this.sender;t&&t.get&&!t.get('active')||(1===this.target.getSelectedAll().length?(this.$cn2.show(),this.$header.hide()):(this.$cn2.hide(),this.$header.show()))},stop:function(){this.$cn2&&this.$cn2.hide(),this.$header&&this.$header.hide()}}},133:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>i});var o=n(50);const i={run:function(t,e,n){void 0===n&&(n={});var i=t.getModel(),s=i.get('clipboard'),a=t.getSelected();(null==s?void 0:s.length)&&a&&(t.getSelectedAll().forEach((function(e){var a,l,c,u,h=(null===(l=null===(a=e.delegate)||void 0===a?void 0:a.copy)||void 0===l?void 0:l.call(a,e))||e,p=h.collection;if(p){var d={at:h.index()+1,action:n.action||'paste-component'};u=(0,o.contains)(s,h)&&h.get('copyable')?p.add(h.clone(),d):r(t,s,h.parent(),d)}else{var f=null===(c=i.Pages.getSelected())||void 0===c?void 0:c.getMainComponent();d={at:(null==f?void 0:f.components().length)||0,action:n.action||'paste-component'};u=r(t,s,f,d)}(u=(0,o.isArray)(u)?u:[u]).forEach((function(e){return t.trigger('component:paste',e)}))})),a.emitUpdate())}};function r(t,e,n,o){var i=e.filter((function(t){return t.get('copyable')})).filter((function(e){return t.Components.canMove(n,e).result}));return n.components().add(i.map((function(t){return t.clone()})),o)}},931:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>s});var o=n(50),i=void 0&&(void 0).__spreadArray||function(t,e,n){if(n||2===arguments.length)for(var o,i=0,r=e.length;i{"use strict";n.r(e),n.d(e,{default:()=>i});var o=void 0&&(void 0).__assign||function(){return o=Object.assign||function(t){for(var e,n=1,o=arguments.length;n{"use strict";n.r(e),n.d(e,{default:()=>k});var o,i=n(50),r=n(847),s=void 0&&(void 0).__extends||(o=function(t,e){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},o(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});const a=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return s(e,t),e.prototype.defaults=function(){return{command:'',attributes:{}}},e}(r.Hn);var l=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),c=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return l(e,t),e}(r.FE);const u=c;c.prototype.model=a;var h=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),p=function(t){function e(e,n,o){void 0===e&&(e={}),void 0===o&&(o=!1);var i=t.call(this,e)||this;return i.itemsView='',i.itemType='type',i.reuseView=!1,i.config=n||e.config||{},o&&i.listenTo(i.collection,'add',i.addTo),i.items=[],i}return h(e,t),e.prototype.addTo=function(t){this.add(t)},e.prototype.itemViewNotFound=function(t){var e=this.config,n=this.ns,o=e.em,i="".concat(n?"[".concat(n,"]: "):'',"'").concat(t,"' type not found");o&&o.logWarning(i)},e.prototype.add=function(t,e){var n,o=this,r=o.config,s=o.reuseView,a=o.items,l=this.itemsView||{},c=e||null,u=this.itemView,h=t.get(this.itemType);l[h]?u=l[h]:!h||l[h]||(0,i.includes)(['button','checkbox','color','date','datetime-local','email','file','hidden','image','month','number','password','radio','range','reset','search','submit','tel','text','time','url','week'],h)||this.itemViewNotFound(h),n=t.view&&s?t.view:new u({model:t,config:r},r),a&&a.push(n);var p=n.render().el;c?c.appendChild(p):this.$el.append(p)},e.prototype.render=function(){var t=document.createDocumentFragment();return this.clearItems(),this.$el.empty(),this.collection.length&&this.collection.each((function(e){this.add(e,t)}),this),this.$el.append(t),this.onRender(),this},e.prototype.onRender=function(){},e.prototype.onRemoveBefore=function(t,e){},e.prototype.onRemove=function(t,e){},e.prototype.remove=function(e){void 0===e&&(e={});var n=this.items;return this.onRemoveBefore(n,e),this.clearItems(),t.prototype.remove.call(this),this.onRemove(n,e),this},e.prototype.clearItems=function(){this.items},e}(r.G7);const d=p;p.prototype.itemView='';var f=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),g=void 0&&(void 0).__assign||function(){return g=Object.assign||function(t){for(var e,n=1,o=arguments.length;n").concat(l,"
"):'',"\n
").concat(i.getName(),"
");r.innerHTML=h?h(i):p}var d='px';s.display='block';var f=o.getTargetToElementFixed(t,r,{pos:e}).top,g=n.leftOff<0?-n.leftOff:0;s.top=f+d,s.left=g+d}else s.display='none'},showHighlighter:function(t){this.canvas.getHighlighter(t).style.opacity=''},initResize:function(t){var e=this.em,n=this.canvas,o=e.Editor,r=!(0,i.isElement)(t)&&(0,b.o5)(t)?t:e.getSelected(),s=null==r?void 0:r.get('resizable'),a=x.q.Resize,l=n.hasCustomSpot(a);if(n.removeSpots({type:a}),r&&s){n.addSpot({type:a,component:r});var c,u=(0,i.isElement)(t)?t:r.getEl();if(l||!u)return;var h=e.config.stylePrefix||'',p="".concat(h,"resizing"),d=function(t,e,n){var o=n.docs;o&&o.forEach((function(e){var n=e.body,o=n.className||'';n.className=('add'==t?"".concat(o," ").concat(p):o.replace(p,'')).trim()}))},f=S({onStart:function(t,o){void 0===o&&(o={});var i=o.el,s=o.config,a=o.resizer,l=s.keyHeight,u=s.keyWidth,h=s.currentUnit,p=s.keepAutoHeight,f=s.keepAutoWidth;d('add',0,o),c=e.Styles.getModelToStyle(r),n.toggleFramesEvents(!1);var g=getComputedStyle(i),m=c.getStyle(),v=m[u];s.autoWidth=f&&'auto'===v,isNaN(parseFloat(v))&&(v=g[u]);var y=m[l];s.autoHeight=p&&'auto'===y,isNaN(parseFloat(y))&&(y=g[l]),a.startDim.w=parseFloat(v),a.startDim.h=parseFloat(y),O=!1,h&&(s.unitHeight=(0,w.getUnitFromValue)(y),s.unitWidth=(0,w.getUnitFromValue)(v))},onMove:function(){o.trigger('component:resize')},onEnd:function(t,e){d('remove',0,e),o.trigger('component:resize'),n.toggleFramesEvents(!0),O=!0},updateTarget:function(t,o,i){if(void 0===i&&(i={}),c){var s=i.store,a=i.selectedHandler,l=i.config,u=l.keyHeight,h=l.keyWidth,p=l.autoHeight,d=l.autoWidth,f=l.unitWidth,g=l.unitHeight,m=['tc','bc'].indexOf(a)>=0,v=['cl','cr'].indexOf(a)>=0,y={};if(!m){var _=n.getBody().offsetWidth,O=o.w<_?o.w:_;y[h]=d?'auto':"".concat(O).concat(f)}v||(y[u]=p?'auto':"".concat(o.h).concat(g)),e.getDragMode(r)&&(y.top="".concat(o.t).concat(g),y.left="".concat(o.l).concat(f));var b=S(S({},y),{__p:!s});c.addStyle(b,{avoidStore:!s}),e.Styles.__emitCmpStyleUpdate(b,{components:e.getSelected()})}}},(0,w.isObject)(s)?s:{});this.resizer=o.runCommand('resize',{el:u,options:f,force:1})}else{if(l)return;o.stopCommand('resize'),this.resizer=null}},updateToolbar:function(t){var e=this.canvas,n=this.config.em,o=t===n?n.getSelected():t,i=e.getToolbarEl(),r=i.style,s=o.get('toolbar'),a=n.config.showToolbar,l=!e.hasCustomSpot(x.q.Select);if(o&&a&&s&&s.length&&l){if(r.display='',!this.toolbar){i.innerHTML='',this.toolbar=new u(s);var c=new _({collection:this.toolbar,em:n});i.appendChild(c.render().el)}this.toolbar.reset(s),r.top='-100px',r.left='0'}else r.display='none'},updateToolbarPos:function(t){var e='px',n=this.canvas.getToolbarEl().style;n.top="".concat(t.top).concat(e),n.left="".concat(t.left).concat(e),n.opacity=''},getCanvasPosition:function(){return this.canvas.getCanvasView().getPosition()},getBadge:function(t){return void 0===t&&(t={}),this.canvas.getBadgeEl(t.view)},onFrameScroll:function(){this.updateTools(),this.canvas.refreshSpots()},onFrameResize:function(){this.canvas.refreshSpots()},updateTools:function(){this.updateLocalPos(),this.updateGlobalPos()},isCompSelected:function(t){return t&&'selected'===t.get('status')},updateToolsLocal:function(t){var e=this.em.getConfig(),n=t||this.getElHovered(),o=n.el,i=n.pos,r=n.view,s=n.component;if(o){var a=s.get('hoverable'),l=this.lastHovered!==o,c=l?{}:{posOnly:1},u=this.canvas.hasCustomSpot(x.q.Hover);l&&a&&(this.lastHovered=o,u?this.hideHighlighter(r):this.showHighlighter(r),this.showElementOffset(o,i,{view:r})),this.isCompSelected(s)&&(this.hideHighlighter(r),!e.showOffsetsSelected&&this.hideElementOffset(r));var h='px',p=this.toggleToolsEl(1,r),d=p.style,f=this.canvas.canvasRectOffset(o,i),g=f.top,m=f.left;!u&&this.updateBadge(o,i,S(S({},c),{view:r,topOff:g,leftOff:m})),d.top=g+h,d.left=m+h,d.width=i.width+h,d.height=i.height+h,this._trgToolUp('local',{component:s,el:p,top:g,left:m,width:i.width,height:i.height})}else this.lastHovered=0},_upToolbar:(0,i.debounce)((function(){this.updateToolsGlobal({force:1})}),0),_trgToolUp:function(t,e){void 0===e&&(e={}),this.em.trigger('canvas:tools:update',S({type:t},e))},updateToolsGlobal:function(t){void 0===t&&(t={});var e=this.getElSelected(),n=e.el,o=e.pos,i=e.component;if(!n)return this.toggleToolsEl(),void(this.lastSelected=0);var r=this.canvas;(this.lastSelected!==n||t.force)&&(this.lastSelected=n,this.updateToolbar(i));var s='px',a=this.toggleToolsEl(1),l=a.style,c=r.getTargetToElementFixed(n,r.getToolbarEl(),{pos:o}),u=c.canvasOffsetTop,h=c.canvasOffsetLeft;l.top=u+s,l.left=h+s,l.width=o.width+s,l.height=o.height+s,this.updateToolbarPos({top:c.top,left:c.left}),this._trgToolUp('global',{component:i,el:a,top:u,left:h,width:o.width,height:o.height})},updateAttached:(0,i.debounce)((function(){this.updateGlobalPos()}),0),onContainerChange:(0,i.debounce)((function(){this.em.refreshCanvas()}),150),getElementPos:function(t){return this.canvas.getCanvasView().getElementPos(t,{noScroll:!0})},hideBadge:function(){this.getBadge().style.display='none'},cleanPrevious:function(t){t&&t.set({status:'',state:''})},getContentWindow:function(){return this.canvas.getWindow()},run:function(t){(0,w.hasWin)()&&(this.editor=t&&t.get('Editor'),this.enable())},stop:function(t,e,n){if(void 0===n&&(n={}),(0,w.hasWin)()){var o=this.em,i=this.editor;this.onHovered(),this.stopSelectComponent(),!n.preserveSelected&&o.setSelected(),this.toggleToolsEl(),i&&i.stopCommand('resize')}}}},477:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>i});var o=n(815);const i={startSelectPosition:function(t,e,n){var o=this;void 0===n&&(n={}),this.isPointed=!1;var i=this.em.Utils,r=t.ownerDocument.body;i&&!this.sorter&&(this.sorter=new i.Sorter({container:r,placer:this.canvas.getPlacerEl(),containerSel:'*',itemSel:'*',pfx:this.ppfx,direction:'a',document:e,wmargin:1,nested:1,em:this.em,canvasRelative:1,scale:function(){return o.em.getZoomDecimal()}})),n.onStart&&(this.sorter.onStart=n.onStart),t&&this.sorter.startSort(t,{container:r})},getOffsetDim:function(){var t=this.offset(this.canvas.getFrameEl()),e=this.offset(this.canvas.getElement());return{top:t.top-e.top,left:t.left-e.left}},stopSelectPosition:function(){this.posTargetCollection=null,this.posIndex='after'==this.posMethod&&0!==this.cDim.length?this.posIndex+1:this.posIndex,this.sorter&&(this.sorter.moved=0,this.sorter.endMove()),this.cDim&&(this.posIsLastEl=0!==this.cDim.length&&'after'==this.posMethod&&this.posIndex==this.cDim.length,this.posTargetEl=0===this.cDim.length?(0,o["default"])(this.outsideElem):!this.posIsLastEl&&this.cDim[this.posIndex]?(0,o["default"])(this.cDim[this.posIndex][5]).parent():(0,o["default"])(this.outsideElem),this.posTargetModel=this.posTargetEl.data('model'),this.posTargetCollection=this.posTargetEl.data('model-comp'))},enable:function(){this.startSelectPosition()},nearFloat:function(t,e,n){var o=t||0,i=e||'before',r=n.length,s=0!==r&&'after'==i&&o==r;return 0!==r&&(!s&&!n[o][4]||n[o-1]&&!n[o-1][4]||s&&!n[o-1][4])?1:0},run:function(){this.enable()},stop:function(){this.stopSelectPosition(),this.$wrapper.css('cursor',''),this.$wrapper.unbind()}}},886:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>l});var o=n(50),i=n(201),r=n(815),s=n(968),a=void 0&&(void 0).__assign||function(){return a=Object.assign||function(t){for(var e,n=1,o=arguments.length;n")).get(0),A=(0,r["default"])("
")).get(0),$=m+E+'-el',j="".concat(m+T+'-el'," ").concat(m+T),R="".concat($," ").concat(m+E);_=(0,r["default"])("
")).get(0),O=(0,r["default"])("
")).get(0),b=(0,r["default"])("
")).get(0),w=(0,r["default"])("
")).get(0),x=(0,r["default"])("
")).get(0),S=(0,r["default"])("
")).get(0),k=(0,r["default"])("
")).get(0),P=(0,r["default"])("
")).get(0),this['marginT'+u]=_,this['marginB'+u]=O,this['marginL'+u]=b,this['marginR'+u]=w,this['padT'+u]=x,this['padB'+u]=S,this['padL'+u]=k,this['padR'+u]=P,Q.appendChild(_),Q.appendChild(O),Q.appendChild(b),Q.appendChild(w),A.appendChild(x),A.appendChild(S),A.appendChild(k),A.appendChild(P),y.appendChild(Q),y.appendChild(A),this[v]='1'}var Z='px',M=parseFloat(g.marginLeft.replace(Z,''))*p,V=parseFloat(g.marginRight.replace(Z,''))*p,D=parseFloat(g.marginTop.replace(Z,''))*p,I=parseFloat(g.marginBottom.replace(Z,''))*p,N=_.style,W=O.style,X=b.style,L=w.style,Y=x.style,z=S.style,q=k.style,U=P.style,B=parseFloat(f.left),F=parseFloat(g.width)*p+Z;N.height=D+Z,N.width=F,N.top=f.top-D+Z,N.left=B+Z,W.height=I+Z,W.width=F,W.top=f.top+f.height+Z,W.left=B+Z;var G=f.height+D+I+Z,H=f.top-D+Z;X.height=G,X.width=M+Z,X.top=H,X.left=B-M+Z,L.height=G,L.width=V+Z,L.top=H,L.left=B+f.width+Z;var K=parseFloat(g.paddingTop)*p;Y.height=K+Z;var J=parseFloat(g.paddingBottom)*p;z.height=J+Z;var tt=f.height-J-K+Z,et=f.top+K+Z;q.height=tt,q.width=parseFloat(g.paddingLeft)*p+Z,q.top=et;var nt=parseFloat(g.paddingRight)*p;U.height=tt,U.width=nt+Z,U.top=et}}else t.stopCommand("".concat(this.id),n)},stop:function(t,e,n){void 0===n&&(n={});var o=(n||{}).state||'',i=this.getOffsetMethod(o),r=n.view;this.canvas[i](r).style.opacity=0}}},817:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>r});var o=n(50),i=n(283);const r={init:function(){(0,o.bindAll)(this,'_onFramesChange')},run:function(t){this.toggleVis(t,!0)},stop:function(t){this.toggleVis(t,!1)},toggleVis:function(t,e){if(void 0===e&&(e=!0),!t.Commands.isActive('preview')){var n=t.Canvas,o=e?'on':'off';n.getModel()[o]('change:frames',this._onFramesChange),this.handleFrames(n.getFrames(),e)}},handleFrames:function(t,e){var n=this;t.forEach((function(t){var o;(null===(o=t.view)||void 0===o?void 0:o.loaded)&&n._upFrame(t,e),t.__ol||(t.on('loaded',(function(){return n._upFrame(t)})),t.__ol=!0)}))},_onFramesChange:function(t,e){this.handleFrames(e)},_upFrame:function(t,e){var n,o=this,r=o.ppfx,s=o.em,a=o.id,l=((0,i.isDef)(e)?e:s.Commands.isActive(a))?'add':'remove',c="".concat(r,"dashed");null===(n=t.view)||void 0===n||n.getBody().classList[l](c)}}},847:(t,e,n)=>{"use strict";n.d(e,{FE:()=>u,G7:()=>h,Hn:()=>c,pH:()=>p,vA:()=>i});var o,i,r=n(316),s=n.n(r),a=void 0&&(void 0).__extends||(o=function(t,e){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},o(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),l=void 0&&(void 0).__assign||function(){return l=Object.assign||function(t){for(var e,n=1,o=arguments.length;n{"use strict";n.d(e,{Z:()=>a});var o=n(50),i=n(968),r=void 0&&(void 0).__assign||function(){return r=Object.assign||function(t){for(var e,n=1,o=arguments.length;n=e&&t<=e+o||t<=e&&t>=e-o},t.prototype.setGuideLock=function(t,e){var n=(0,o.isUndefined)(t.x)?'Y':'X',i="trg".concat(n);return null!==e?(t.active=!0,t.lock=e,this[i]=t):(delete t.active,delete t.lock,delete this[i]),t},t.prototype.stop=function(t,e){void 0===e&&(e={});var n=this.delta,i=!!e.cancel,r=i?0:n.x,s=i?0:n.y;this.toggleDrag(),this.lockedAxis=null,this.move(r,s,!0);var a=this.opts.onEnd;(0,o.isFunction)(a)&&a(t,this,{cancelled:i})},t.prototype.keyHandle=function(t){(0,i.kl)(t)&&this.stop(t,{cancel:!0})},t.prototype.move=function(t,e,n){var i=this.el,r=this.opts,s=this.startPosition;if(s){var a=r.setPosition,l=s.x+t,c=s.y+e;this.position={x:l,y:c,end:n},(0,o.isFunction)(a)&&a(this.position),i&&(i.style.left="".concat(l,"px"),i.style.top="".concat(c,"px"))}},t.prototype.getContainerEl=function(){var t=this.opts.container;return t?[t]:this.getDocumentEl()},t.prototype.getWindowEl=function(){return this.getContainerEl().map((function(t){var e=t.ownerDocument||t;return e.defaultView||e.parentWindow}))},t.prototype.getDocumentEl=function(t){var e=this.opts.doc;if(t=t||this.el,!this.docs.length){var n=[document];t&&n.push(t.ownerDocument),e&&n.push(e),this.docs=n}return this.docs},t.prototype.getPointerPos=function(t){var e=this.opts.getPointerPosition,n=(0,i.VB)(t);return e?e(t):{x:n.clientX,y:n.clientY}},t.prototype.getStartPosition=function(){var t=this.el,e=this.opts.getPosition,n={x:0,y:0};return(0,o.isFunction)(e)?n=e():t&&(n={x:parseFloat(t.style.left),y:parseFloat(t.style.top)}),n},t.prototype.getScrollInfo=function(){var t=this.opts.doc,e=t&&t.body;return{y:e?e.scrollTop:0,x:e?e.scrollLeft:0}},t.prototype.detectAxisLock=function(t,e){var n=t,o=e,i=Math.abs(n),r=Math.abs(o);return o>=i||o<=-i?'x':n>r||n<-r?'y':void 0},t}()},815:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>mt});var o='undefined'!=typeof document?document:null,i='undefined'!=typeof window?window:null,r=Array.prototype,s=r.filter,a=r.indexOf,l=r.map,c=r.push,u=r.reverse,h=r.slice,p=r.splice,d=/^#[\w-]*$/,f=/^\.[\w-]*$/,g=/<.+>/,m=/^\w+$/;function v(t,e){return void 0===e&&(e=o),f.test(t)?e.getElementsByClassName(t.slice(1)):m.test(t)?e.getElementsByTagName(t):e.querySelectorAll(t)}function y(t,e){if(void 0===e&&(e=o),t){if(t.__cash)return t;var n=t;if(T(t)){if(e.__cash&&(e=e[0]),!(n=d.test(t)?e.getElementById(t.slice(1)):g.test(t)?dt(t):v(t,e)))return}else if(C(t))return this.ready(t);(n.nodeType||n===i)&&(n=[n]),this.length=n.length;for(var r=0,s=this.length;r=0})):n.value=i}))},O.clone=function(){return this.map((function(t,e){return e.cloneNode(!0)}))},O.detach=function(){return this.each((function(t,e){e.parentNode&&e.parentNode.removeChild(e)}))};var ut,ht=/^\s*<(\w+)[^>]*>/,pt=/^\s*<(\w+)\s*\/?>(?:<\/\1>)?\s*$/;function dt(t){if(function(){if(!ut){var t=o.createElement('table'),e=o.createElement('tr');ut={'*':o.createElement('div'),tr:o.createElement('tbody'),td:e,th:e,thead:t,tbody:t,tfoot:t}}}(),!T(t))return[];if(pt.test(t))return[o.createElement(RegExp.$1)];var e=ht.test(t)&&RegExp.$1,n=ut[e]||ut['*'];return n.innerHTML=t,_(n.childNodes).detach().get()}function ft(t,e,n){if(void 0!==e){var o=T(e);!o&&e.length?S(e,(function(e){return ft(t,e,n)})):S(t,o?function(t){t.insertAdjacentHTML(n?'afterbegin':'beforeend',e)}:function(t,o){return function(t,e,n){n?t.insertBefore(e,t.childNodes[0]):t.appendChild(e)}(t,o?e.cloneNode(!0):e,n)})}}_.parseHTML=dt,O.empty=function(){var t=this[0];if(t)for(;t.firstChild;)t.removeChild(t.firstChild);return this},O.append=function(){var t=this;return S(arguments,(function(e){ft(t,e)})),this},O.appendTo=function(t){return ft(_(t),this),this},O.html=function(t){if(void 0===t)return this[0]&&this[0].innerHTML;var e=t.nodeType?t[0].outerHTML:t;return this.each((function(t,n){n.innerHTML=e}))},O.insertAfter=function(t){var e=this;return _(t).each((function(t,n){var o=n.parentNode;e.each((function(e,i){o.insertBefore(t?i.cloneNode(!0):i,n.nextSibling)}))})),this},O.after=function(){var t=this;return S(u.apply(arguments),(function(e){u.apply(_(e).slice()).insertAfter(t)})),this},O.insertBefore=function(t){var e=this;return _(t).each((function(t,n){var o=n.parentNode;e.each((function(e,i){o.insertBefore(t?i.cloneNode(!0):i,n)}))})),this},O.before=function(){var t=this;return S(arguments,(function(e){_(e).insertBefore(t)})),this},O.prepend=function(){var t=this;return S(arguments,(function(e){ft(t,e,!0)})),this},O.prependTo=function(t){return ft(_(t),u.apply(this.slice()),!0),this},O.remove=function(){return this.detach().off()},O.replaceWith=function(t){var e=this;return this.each((function(n,o){var i=o.parentNode;if(i){var r=n?_(t).clone():_(t);if(!r[0])return e.remove(),!1;i.replaceChild(r[0],o),_(r[0]).after(r.slice(1))}}))},O.replaceAll=function(t){return _(t).replaceWith(this),this},O.text=function(t){return void 0===t?this[0]?this[0].textContent:'':this.each((function(e,n){n.textContent=t}))};var gt=o&&o.documentElement;O.offset=function(){var t=this[0];if(t){var e=t.getBoundingClientRect();return{top:e.top+i.pageYOffset-gt.clientTop,left:e.left+i.pageXOffset-gt.clientLeft}}},O.offsetParent=function(){return _(this[0]&&this[0].offsetParent)},O.position=function(){var t=this[0];if(t)return{left:t.offsetLeft,top:t.offsetTop}},O.children=function(t){var e=[];return this.each((function(t,n){c.apply(e,n.children)})),e=_(R(e)),t?e.filter((function(e,n){return P(n,t)})):e},O.contents=function(){var t=[];return this.each((function(e,n){c.apply(t,'IFRAME'===n.tagName?[n.contentDocument]:n.childNodes)})),_(t.length&&R(t))},O.find=function(t){for(var e=[],n=0,o=this.length;n{"use strict";n.d(e,{$Q:()=>g,BM:()=>b,FW:()=>p,G1:()=>a,GX:()=>S,L_:()=>c,Mx:()=>l,R3:()=>m,S1:()=>$,SJ:()=>O,Ut:()=>x,VB:()=>C,Vb:()=>Q,cx:()=>u,dL:()=>f,kl:()=>T,o5:()=>w,on:()=>A,pn:()=>d,r$:()=>E,rw:()=>y,sE:()=>h,sN:()=>P,t3:()=>_,ut:()=>v});var o=n(50),i=void 0&&(void 0).__spreadArray||function(t,e,n){if(n||2===arguments.length)for(var o,i=0,r=e.length;i=r?t.appendChild(e):t.insertBefore(e,i[s])},m=function(t,e){return g(t,e)},v=function(t,e,n){void 0===e&&(e={});var i=document.createElement(t);return e&&(0,o.each)(e,(function(t,e){return i.setAttribute(e,t)})),n&&((0,o.isString)(n)?i.innerHTML=n:i.appendChild(n)),i},y=function(t){return document.createTextNode(t)},_=function(t,e){var n,o=t.type;try{n=new window[e](o,t)}catch(t){(n=document.createEvent(e)).initEvent(o,!0,!0)}return n._parentEvent=t,0===o.indexOf('key')&&(n.keyCodeVal=t.keyCode,['keyCode','which'].forEach((function(t){Object.defineProperty(n,t,{get:function(){return this.keyCodeVal}})}))),n},O=function(t,e){void 0===e&&(e=[]),(Array.isArray(e)?e:[e]).forEach((function(e){var n=e[r]||'div',i=e[s]||{},a=document.createElement(n);(0,o.each)(i,(function(t,e){a.setAttribute(e,t)})),t.appendChild(a)}))},b=function(t){return(null==t?void 0:t.nodeType)===Node.TEXT_NODE},w=function(t){return t&&!b(t)&&!function(t){return(null==t?void 0:t.nodeType)===Node.COMMENT_NODE}(t)},x=function(t){var e,n={top:0,left:0,width:0,height:0};if(!t)return n;if(b(t)){var o=document.createRange();o.selectNode(t),e=o.getBoundingClientRect(),o.detach()}return e||(t.getBoundingClientRect?t.getBoundingClientRect():n)},S=function(t){var e=(null==t?void 0:t.ownerDocument)||document,n=e.documentElement,o=e.defaultView||window;return{x:(o.pageXOffset||n.scrollLeft||0)-(n.clientLeft||0),y:(o.pageYOffset||n.scrollTop||0)-(n.clientTop||0)}},k=function(t){return t.which||t.keyCode},P=function(t){return String.fromCharCode(k(t))},C=function(t){return t.touches&&t.touches[0]?t.touches[0]:t},T=function(t){return 27===k(t)},E=function(t){return 13===k(t)},Q=function(t){return function(t){return t.ctrlKey}(t)||t.metaKey},A=function(t,e,n,i){var r=e.split(/\s+/),s=(0,o.isArray)(t)?t:[t];r.forEach((function(t){s.forEach((function(e){return null==e?void 0:e.addEventListener(t,n,i)}))}))},$=function(t,e,n,i){var r=e.split(/\s+/),s=(0,o.isArray)(t)?t:[t];r.forEach((function(t){s.forEach((function(e){return null==e?void 0:e.removeEventListener(t,n,i)}))}))}},283:(t,e,n)=>{"use strict";n.r(e),n.d(e,{appendStyles:()=>y,buildBase64UrlFromSvg:()=>W,camelCase:()=>w,capitalize:()=>j,createId:()=>N,deepMerge:()=>E,escape:()=>C,escapeNodeContent:()=>T,find:()=>P,getComponentModel:()=>D,getComponentView:()=>V,getElement:()=>k,getGlobal:()=>d,getModel:()=>Q,getUiClass:()=>v,getUnitFromValue:()=>O,getViewEl:()=>Z,hasDnd:()=>S,hasWin:()=>p,isBultInMethod:()=>l,isComponent:()=>M,isDef:()=>h,isEmptyObj:()=>$,isObject:()=>A,isRule:()=>R,matches:()=>m,normalizeFloat:()=>x,normalizeKey:()=>c,setViewEl:()=>I,shallowDiff:()=>_,toLowerCase:()=>f,upFirst:()=>b,wait:()=>u});var o=n(50),i=n(968),r=void 0&&(void 0).__assign||function(){return r=Object.assign||function(t){for(var e,n=1,o=arguments.length;n=0?s!==a&&(n[r]=a):n[r]=null}for(var r in e)e.hasOwnProperty(r)&&(0,o.isUndefined)(t[r])&&(n[r]=e[r]);return n},O=function(t){return t.replace(parseFloat(t),'')},b=function(t){return t[0].toUpperCase()+t.toLowerCase().slice(1)},w=function(t){return t.replace(/-./g,(function(t){return t[1].toUpperCase()}))},x=function(t,e,n){void 0===e&&(e=1),void 0===n&&(n=0);var o=0;if(isNaN(t))return n;if(t=parseFloat(t),Math.floor(t)!==t){var i=e.toString().split('.')[1];o=i?i.length:0}return o?parseFloat(t.toFixed(o)):t},S=function(t){return'draggable'in document.createElement('i')&&(!t||t.config.nativeDnD)},k=function(t){return(0,o.isElement)(t)||(0,i.BM)(t)?t:t&&t.getEl?t.getEl():void 0},P=function(t,e){var n=null;return t.some((function(o,i){return e(o,i,t)?(n=o,1):0})),n},C=function(t){return void 0===t&&(t=''),"".concat(t).replace(/&/g,'&').replace(//g,'>').replace(/"/g,'"').replace(/'/g,''').replace(/`/g,'`')},T=function(t){return void 0===t&&(t=''),"".concat(t).replace(/&/g,'&').replace(//g,'>')},E=function(){for(var t=[],e=0;e{var o={"./CanvasClear":266,"./CanvasClear.ts":266,"./CanvasMove":142,"./CanvasMove.ts":142,"./CommandAbstract":458,"./CommandAbstract.ts":458,"./ComponentDelete":463,"./ComponentDelete.ts":463,"./ComponentDrag":474,"./ComponentDrag.ts":474,"./ComponentEnter":866,"./ComponentEnter.ts":866,"./ComponentExit":594,"./ComponentExit.ts":594,"./ComponentNext":656,"./ComponentNext.ts":656,"./ComponentPrev":768,"./ComponentPrev.ts":768,"./ComponentStyleClear":570,"./ComponentStyleClear.ts":570,"./CopyComponent":282,"./CopyComponent.ts":282,"./ExportTemplate":905,"./ExportTemplate.ts":905,"./Fullscreen":212,"./Fullscreen.ts":212,"./MoveComponent":907,"./MoveComponent.ts":907,"./OpenAssets":963,"./OpenAssets.ts":963,"./OpenBlocks":268,"./OpenBlocks.ts":268,"./OpenLayers":556,"./OpenLayers.ts":556,"./OpenPages":120,"./OpenPages.ts":120,"./OpenStyleManager":462,"./OpenStyleManager.ts":462,"./OpenTraitManager":521,"./OpenTraitManager.ts":521,"./PasteComponent":133,"./PasteComponent.ts":133,"./Preview":931,"./Preview.ts":931,"./Resize":676,"./Resize.ts":676,"./SelectComponent":938,"./SelectComponent.ts":938,"./SelectPosition":477,"./SelectPosition.ts":477,"./ShowOffset":886,"./ShowOffset.ts":886,"./SwitchVisibility":817,"./SwitchVisibility.ts":817};function i(t){var e=r(t);return n(e)}function r(t){if(!n.o(o,t)){var e=new Error("Cannot find module '"+t+"'");throw e.code='MODULE_NOT_FOUND',e}return o[t]}i.keys=function(){return Object.keys(o)},i.resolve=r,t.exports=i,i.id=828},50:(t,e,n)=>{"use strict";n.r(e),n.d(e,{VERSION:()=>i,after:()=>Ze,all:()=>en,allKeys:()=>mt,any:()=>nn,assign:()=>Zt,before:()=>Me,bind:()=>xe,bindAll:()=>Pe,chain:()=>_e,chunk:()=>In,clone:()=>It,collect:()=>Fe,compact:()=>Tn,compose:()=>Re,constant:()=>K,contains:()=>on,countBy:()=>yn,create:()=>Dt,debounce:()=>Ae,default:()=>Yn,defaults:()=>Mt,defer:()=>Ee,delay:()=>Te,detect:()=>qe,difference:()=>Qn,drop:()=>Pn,each:()=>Be,escape:()=>ae,every:()=>en,extend:()=>Rt,extendOwn:()=>Zt,filter:()=>Je,find:()=>qe,findIndex:()=>Ne,findKey:()=>De,findLastIndex:()=>We,findWhere:()=>Ue,first:()=>kn,flatten:()=>En,foldl:()=>He,foldr:()=>Ke,forEach:()=>Be,functions:()=>$t,get:()=>Yt,groupBy:()=>mn,has:()=>zt,head:()=>kn,identity:()=>qt,include:()=>on,includes:()=>on,indexBy:()=>vn,indexOf:()=>Ye,initial:()=>Sn,inject:()=>He,intersection:()=>Rn,invert:()=>At,invoke:()=>rn,isArguments:()=>F,isArray:()=>q,isArrayBuffer:()=>V,isBoolean:()=>T,isDataView:()=>z,isDate:()=>j,isElement:()=>E,isEmpty:()=>lt,isEqual:()=>gt,isError:()=>Z,isFinite:()=>G,isFunction:()=>N,isMap:()=>kt,isMatch:()=>ct,isNaN:()=>H,isNull:()=>P,isNumber:()=>$,isObject:()=>k,isRegExp:()=>R,isSet:()=>Ct,isString:()=>A,isSymbol:()=>M,isTypedArray:()=>it,isUndefined:()=>C,isWeakMap:()=>Pt,isWeakSet:()=>Tt,iteratee:()=>Ht,keys:()=>at,last:()=>Cn,lastIndexOf:()=>ze,map:()=>Fe,mapObject:()=>Jt,matcher:()=>Ut,matches:()=>Ut,max:()=>ln,memoize:()=>Ce,methods:()=>$t,min:()=>cn,mixin:()=>Wn,negate:()=>je,noop:()=>te,now:()=>ie,object:()=>Vn,omit:()=>xn,once:()=>Ve,pairs:()=>Qt,partial:()=>we,partition:()=>_n,pick:()=>wn,pluck:()=>sn,property:()=>Bt,propertyOf:()=>ee,random:()=>oe,range:()=>Dn,reduce:()=>He,reduceRight:()=>Ke,reject:()=>tn,rest:()=>Pn,restArguments:()=>S,result:()=>me,sample:()=>pn,select:()=>Je,shuffle:()=>dn,size:()=>On,some:()=>nn,sortBy:()=>fn,sortedIndex:()=>Xe,tail:()=>Pn,take:()=>kn,tap:()=>Nt,template:()=>ge,templateSettings:()=>ce,throttle:()=>Qe,times:()=>ne,toArray:()=>hn,toPath:()=>Wt,transpose:()=>Zn,unescape:()=>le,union:()=>jn,uniq:()=>$n,unique:()=>$n,uniqueId:()=>ye,unzip:()=>Zn,values:()=>Et,where:()=>an,without:()=>An,wrap:()=>$e,zip:()=>Mn});var o={};n.r(o),n.d(o,{VERSION:()=>i,after:()=>Ze,all:()=>en,allKeys:()=>mt,any:()=>nn,assign:()=>Zt,before:()=>Me,bind:()=>xe,bindAll:()=>Pe,chain:()=>_e,chunk:()=>In,clone:()=>It,collect:()=>Fe,compact:()=>Tn,compose:()=>Re,constant:()=>K,contains:()=>on,countBy:()=>yn,create:()=>Dt,debounce:()=>Ae,default:()=>Xn,defaults:()=>Mt,defer:()=>Ee,delay:()=>Te,detect:()=>qe,difference:()=>Qn,drop:()=>Pn,each:()=>Be,escape:()=>ae,every:()=>en,extend:()=>Rt,extendOwn:()=>Zt,filter:()=>Je,find:()=>qe,findIndex:()=>Ne,findKey:()=>De,findLastIndex:()=>We,findWhere:()=>Ue,first:()=>kn,flatten:()=>En,foldl:()=>He,foldr:()=>Ke,forEach:()=>Be,functions:()=>$t,get:()=>Yt,groupBy:()=>mn,has:()=>zt,head:()=>kn,identity:()=>qt,include:()=>on,includes:()=>on,indexBy:()=>vn,indexOf:()=>Ye,initial:()=>Sn,inject:()=>He,intersection:()=>Rn,invert:()=>At,invoke:()=>rn,isArguments:()=>F,isArray:()=>q,isArrayBuffer:()=>V,isBoolean:()=>T,isDataView:()=>z,isDate:()=>j,isElement:()=>E,isEmpty:()=>lt,isEqual:()=>gt,isError:()=>Z,isFinite:()=>G,isFunction:()=>N,isMap:()=>kt,isMatch:()=>ct,isNaN:()=>H,isNull:()=>P,isNumber:()=>$,isObject:()=>k,isRegExp:()=>R,isSet:()=>Ct,isString:()=>A,isSymbol:()=>M,isTypedArray:()=>it,isUndefined:()=>C,isWeakMap:()=>Pt,isWeakSet:()=>Tt,iteratee:()=>Ht,keys:()=>at,last:()=>Cn,lastIndexOf:()=>ze,map:()=>Fe,mapObject:()=>Jt,matcher:()=>Ut,matches:()=>Ut,max:()=>ln,memoize:()=>Ce,methods:()=>$t,min:()=>cn,mixin:()=>Wn,negate:()=>je,noop:()=>te,now:()=>ie,object:()=>Vn,omit:()=>xn,once:()=>Ve,pairs:()=>Qt,partial:()=>we,partition:()=>_n,pick:()=>wn,pluck:()=>sn,property:()=>Bt,propertyOf:()=>ee,random:()=>oe,range:()=>Dn,reduce:()=>He,reduceRight:()=>Ke,reject:()=>tn,rest:()=>Pn,restArguments:()=>S,result:()=>me,sample:()=>pn,select:()=>Je,shuffle:()=>dn,size:()=>On,some:()=>nn,sortBy:()=>fn,sortedIndex:()=>Xe,tail:()=>Pn,take:()=>kn,tap:()=>Nt,template:()=>ge,templateSettings:()=>ce,throttle:()=>Qe,times:()=>ne,toArray:()=>hn,toPath:()=>Wt,transpose:()=>Zn,unescape:()=>le,union:()=>jn,uniq:()=>$n,unique:()=>$n,uniqueId:()=>ye,unzip:()=>Zn,values:()=>Et,where:()=>an,without:()=>An,wrap:()=>$e,zip:()=>Mn});var i='1.13.6',r='object'==typeof self&&self.self===self&&self||'object'==typeof global&&global.global===global&&global||Function('return this')()||{},s=Array.prototype,a=Object.prototype,l='undefined'!=typeof Symbol?Symbol.prototype:null,c=s.push,u=s.slice,h=a.toString,p=a.hasOwnProperty,d='undefined'!=typeof ArrayBuffer,f='undefined'!=typeof DataView,g=Array.isArray,m=Object.keys,v=Object.create,y=d&&ArrayBuffer.isView,_=isNaN,O=isFinite,b=!{toString:null}.propertyIsEnumerable('toString'),w=['valueOf','isPrototypeOf','toString','propertyIsEnumerable','hasOwnProperty','toLocaleString'],x=Math.pow(2,53)-1;function S(t,e){return e=null==e?t.length-1:+e,function(){for(var n=Math.max(arguments.length-e,0),o=Array(n),i=0;i=0&&n<=x}}function tt(t){return function(e){return null==e?void 0:e[t]}}const et=tt('byteLength'),nt=J(et);var ot=/\[object ((I|Ui)nt(8|16|32)|Float(32|64)|Uint8Clamped|Big(I|Ui)nt64)Array\]/;const it=d?function(t){return y?y(t)&&!z(t):nt(t)&&ot.test(h.call(t))}:K(!1),rt=tt('length');function st(t,e){e=function(t){for(var e={},n=t.length,o=0;o':'>','"':'"',"'":''','`':'`'},ae=re(se),le=re(At(se)),ce=ut.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var ue=/(.)^/,he={"'":"'",'\\':'\\','\r':'r','\n':'n','\u2028':'u2028','\u2029':'u2029'},pe=/\\|'|\r|\n|\u2028|\u2029/g;function de(t){return'\\'+he[t]}var fe=/^\s*(\w|\$)+\s*$/;function ge(t,e,n){!e&&n&&(e=n),e=Mt({},e,ut.templateSettings);var o=RegExp([(e.escape||ue).source,(e.interpolate||ue).source,(e.evaluate||ue).source].join('|')+'|$','g'),i=0,r="__p+='";t.replace(o,(function(e,n,o,s,a){return r+=t.slice(i,a).replace(pe,de),i=a+e.length,n?r+="'+\n((__t=("+n+"))==null?'':_.escape(__t))+\n'":o?r+="'+\n((__t=("+o+"))==null?'':__t)+\n'":s&&(r+="';\n"+s+"\n__p+='"),e})),r+="';\n";var s,a=e.variable;if(a){if(!fe.test(a))throw new Error('variable is not a bare identifier: '+a)}else r='with(obj||{}){\n'+r+'}\n',a='obj';r="var __t,__p='',__j=Array.prototype.join,"+"print=function(){__p+=__j.call(arguments,'');};\n"+r+'return __p;\n';try{s=new Function(a,'_',r)}catch(t){throw t.source=r,t}var l=function(t){return s.call(this,t,ut)};return l.source='function('+a+'){\n'+r+'}',l}function me(t,e,n){var o=(e=Xt(e)).length;if(!o)return N(n)?n.call(t):n;for(var i=0;i1)ke(a,e-1,n,o),i=o.length;else for(var l=0,c=a.length;le?(o&&(clearTimeout(o),o=null),a=c,s=t.apply(i,r),o||(i=r=null)):o||!1===n.trailing||(o=setTimeout(l,u)),s};return c.cancel=function(){clearTimeout(o),a=0,o=i=r=null},c}function Ae(t,e,n){var o,i,r,s,a,l=function(){var c=ie()-i;e>c?o=setTimeout(l,e-c):(o=null,n||(s=t.apply(a,r)),o||(r=a=null))},c=S((function(c){return a=this,r=c,i=ie(),o||(o=setTimeout(l,e),n&&(s=t.apply(a,r))),s}));return c.cancel=function(){clearTimeout(o),o=r=a=null},c}function $e(t,e){return we(e,t)}function je(t){return function(){return!t.apply(this,arguments)}}function Re(){var t=arguments,e=t.length-1;return function(){for(var n=e,o=t[e].apply(this,arguments);n--;)o=t[n].call(this,o);return o}}function Ze(t,e){return function(){if(--t<1)return e.apply(this,arguments)}}function Me(t,e){var n;return function(){return--t>0&&(n=e.apply(this,arguments)),t<=1&&(e=null),n}}const Ve=we(Me,2);function De(t,e,n){e=Kt(e,n);for(var o,i=at(t),r=0,s=i.length;r0?0:i-1;r>=0&&r0?s=r>=0?r:Math.max(r+a,s):a=r>=0?Math.min(r+1,a):r+a+1;else if(n&&r&&a)return o[r=n(o,i)]===i?r:-1;if(i!=i)return(r=e(u.call(o,s,a),H))>=0?r+s:-1;for(r=t>0?s:a-1;r>=0&&r=3;return function(e,n,o,i){var r=!Se(e)&&at(e),s=(r||e).length,a=t>0?0:s-1;for(i||(o=e[r?r[a]:a],a+=t);a>=0&&a=0}const rn=S((function(t,e,n){var o,i;return N(e)?i=e:(e=Xt(e),o=e.slice(0,-1),e=e[e.length-1]),Fe(t,(function(t){var r=i;if(!r){if(o&&o.length&&(t=Lt(t,o)),null==t)return;r=t[e]}return null==r?r:r.apply(t,n)}))}));function sn(t,e){return Fe(t,Bt(e))}function an(t,e){return Je(t,Ut(e))}function ln(t,e,n){var o,i,r=-1/0,s=-1/0;if(null==e||'number'==typeof e&&'object'!=typeof t[0]&&null!=t)for(var a=0,l=(t=Se(t)?t:Et(t)).length;ar&&(r=o);else e=Kt(e,n),Be(t,(function(t,n,o){((i=e(t,n,o))>s||i===-1/0&&r===-1/0)&&(r=t,s=i)}));return r}function cn(t,e,n){var o,i,r=1/0,s=1/0;if(null==e||'number'==typeof e&&'object'!=typeof t[0]&&null!=t)for(var a=0,l=(t=Se(t)?t:Et(t)).length;ao||void 0===n)return 1;if(n1&&(o=Ft(o,e[1])),e=mt(t)):(o=bn,e=ke(e,!1,!1),t=Object(t));for(var i=0,r=e.length;i1&&(n=e[1])):(e=Fe(ke(e,!1,!1),String),o=function(t,n){return!on(e,n)}),wn(t,o,n)}));function Sn(t,e,n){return u.call(t,0,Math.max(0,t.length-(null==e||n?1:e)))}function kn(t,e,n){return null==t||t.length<1?null==e||n?void 0:[]:null==e||n?t[0]:Sn(t,t.length-e)}function Pn(t,e,n){return u.call(t,null==e||n?1:e)}function Cn(t,e,n){return null==t||t.length<1?null==e||n?void 0:[]:null==e||n?t[t.length-1]:Pn(t,Math.max(0,t.length-e))}function Tn(t){return Je(t,Boolean)}function En(t,e){return ke(t,e,!1)}const Qn=S((function(t,e){return e=ke(e,!0,!0),Je(t,(function(t){return!on(e,t)}))})),An=S((function(t,e){return Qn(t,e)}));function $n(t,e,n,o){T(e)||(o=n,n=e,e=!1),null!=n&&(n=Kt(n,o));for(var i=[],r=[],s=0,a=rt(t);s{var e=t&&t.__esModule?()=>t['default']:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var o in e)n.o(e,o)&&!n.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:e[o]})},n.g=function(){if('object'==typeof globalThis)return globalThis;try{return this||new Function('return this')()}catch(t){if('object'==typeof window)return window}}(),n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{'undefined'!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:'Module'}),Object.defineProperty(t,'__esModule',{value:!0})};var o={};return(()=>{"use strict";n.d(o,{default:()=>UZ});var t=n(50),e=n(283);function i(t){for(var n=[],o=1;o',move:'',plus:'',caret:'',delete:'',copy:'',arrowUp:'',chevron:'',eye:'',eyeOff:''},i18n:{},undoManager:{},assetManager:{},canvas:{},layerManager:{},storageManager:{},richTextEditor:{},domComponents:{},modal:{},codeManager:{},panels:{},commands:{},cssComposer:{},selectorManager:{},deviceManager:{},styleManager:{},blockManager:{},traitManager:{},textViewCode:'Code',keepUnusedStyles:!1,customUI:!1};var s=n(316),a=n.n(s),l=n(815);var c,u=n(847),h=void 0&&(void 0).__extends||(c=function(t,e){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},c(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}c(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),p=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return h(e,t),e}(u.Hn),d=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return h(n,e),n.prototype.getByComponent=function(t){var e=this;return this.filter((function(n){return e.getComponent(n)===t}))[0]},n.prototype.addComponent=function(e,n){var o=this,i=((0,t.isArray)(e)?e:[e]).filter((function(t){return!o.hasComponent(t)})).map((function(t){return new p({component:t})}))[0];return this.push(i,n)},n.prototype.getComponent=function(t){return t.get('component')},n.prototype.hasComponent=function(t){var e=this.getByComponent(t);return e&&this.contains(e)},n.prototype.lastComponent=function(){var t=this.last();return t?this.getComponent(t):void 0},n.prototype.allComponents=function(){var t=this;return this.map((function(e){return t.getComponent(e)})).filter((function(t){return t}))},n.prototype.removeComponent=function(e,n){var o=this,i=((0,t.isArray)(e)?e:[e]).map((function(t){return o.getByComponent(t)}));return this.remove(i,n)},n}(u.FE);const f=d;var g=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),m=void 0&&(void 0).__assign||function(){return m=Object.assign||function(t){for(var e,n=1,o=arguments.length;n',frameStyle:"\n body { background-color: #fff }\n * ::-webkit-scrollbar-track { background: rgba(0, 0, 0, 0.1) }\n * ::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.2) }\n * ::-webkit-scrollbar { width: 10px }\n ",notTextable:['button','a','input[type=checkbox]','input[type=radio]'],allowExternalDrop:!0};var w=n(728);const x={default:'',devices:[{id:'desktop',name:'Desktop',width:''},{id:'tablet',name:'Tablet',width:'770px',widthMedia:'992px'},{id:'mobileLandscape',name:'Mobile landscape',width:'568px',widthMedia:'768px'},{id:'mobilePortrait',name:'Mobile portrait',width:'320px',widthMedia:'480px'}]};var S=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}();const k=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return S(e,t),e.prototype.defaults=function(){return{name:'',width:null,height:'',widthMedia:null,priority:null}},e.prototype.initialize=function(){var t=this;null===this.get('widthMedia')&&this.set('widthMedia',this.get('width')),null===this.get('width')&&this.set('width',this.get('widthMedia')),!this.get('priority')&&this.set('priority',parseFloat(this.get('widthMedia'))||0);['width','height','widthMedia'].forEach((function(e){return t.checkUnit(e)}))},e.prototype.checkUnit=function(t){var e=this.get(t)||'';(parseFloat(e)||0).toString()===e.toString()&&this.set(t,"".concat(e,"px"))},e.prototype.getName=function(){return this.get('name')||this.get('id')},e.prototype.getWidthMedia=function(){return this.get('widthMedia')||''},e}(u.Hn);var P=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),C=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return P(e,t),e}(u.FE);const T=C;C.prototype.model=k;var E=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),Q=void 0&&(void 0).__makeTemplateObject||function(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t},A=function(t){function e(e){var n=t.call(this,e)||this;return n.config=e.config||{},n.em=n.config.em,n.ppfx=n.config.pStylePrefix||'',n.listenTo(n.em,'change:device',n.updateSelect),n}return E(e,t),e.prototype.template=function(t){var e=t.ppfx,n=t.label;return i(R||(R=Q(["\n
","
\n
\n \n \n \n
\n
\n
\n
\n \n "],["\n
","
\n
\n \n \n \n
\n
\n
\n
\n \n "])),e,n,e,e,e,e,e,e,e)},e.prototype.events=function(){return{change:'updateDevice','click [data-add-trasp]':'startAdd'}},e.prototype.startAdd=function(){},e.prototype.updateDevice=function(){var t=this.em;if(t){var e=this.devicesEl;t.set('device',e?e.val():'')}},e.prototype.updateSelect=function(){var t=this.em,e=this.devicesEl;if(t&&t.getDeviceModel&&e){var n=t.getDeviceModel();e.val(n?n.get('id'):'')}},e.prototype.getOptions=function(){var t=this.collection,e=this.em,n='';return t.forEach((function(t){var o=t.attributes,i=o.name,r=o.id,s=e&&e.t&&e.t("deviceManager.devices.".concat(r))||i;n+="")})),n},e.prototype.render=function(){var t=this,e=t.em,n=t.ppfx,o=t.$el,i=t.el,r=e&&e.t&&e.t('deviceManager.device');return o.html(this.template({ppfx:n,label:r})),this.devicesEl=o.find(".".concat(n,"devices")),this.devicesEl.append(this.getOptions()),this.devicesEl.val(e.get('device')),i.className="".concat(n,"devices-c"),this},e}(u.G7);const j=A;var R,Z=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),M=void 0&&(void 0).__assign||function(){return M=Object.assign||function(t){for(var e,n=1,o=arguments.length;n=0&&this.head.splice(i,1)},o.prototype.addLink=function(t){var e='link';!this.getHeadByAttr('href',t,e)&&this.addHeadItem({tag:e,attributes:{href:t,rel:'stylesheet'}})},o.prototype.removeLink=function(t){this.removeHeadByAttr('href',t,'link')},o.prototype.addScript=function(t){var e='script';!this.getHeadByAttr('src',t,e)&&this.addHeadItem({tag:e,attributes:{src:t}})},o.prototype.removeScript=function(t){this.removeHeadByAttr('src',t,'script')},o.prototype.getPage=function(){var t;return null===(t=this.collection)||void 0===t?void 0:t.page},o.prototype._emitUpdated=function(t){void 0===t&&(t={}),this.em.trigger('frame:updated',K({frame:this},t))},o.prototype.hasAutoHeight=function(){return!('auto'!==this.attributes.height&&!this.config.infiniteCanvas)},o.prototype.toJSON=function(e){void 0===e&&(e={});var n=w.Z.prototype.toJSON.call(this,e),o=(0,t.result)(this,'defaults');return e.fromUndo&&delete n.component,delete n.styles,delete n.changesCount,n[tt]&&delete n.width,n[et]&&delete n.height,n.refFrame&&(n.refFrame=n.refFrame.id,delete n.component),(0,t.forEach)(n,(function(t,e){0===e.indexOf('_')&&delete n[e]})),(0,t.forEach)(o,(function(t,e){n[e]===t&&delete n[e]})),(0,t.forEach)(['attributes','head'],(function(e){(0,t.isEmpty)(n[e])&&delete n[e]})),n},o}(w.Z);const it=ot;var rt=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}();const st=function(e){function n(n,o){void 0===o&&(o=[]);var i=e.call(this,n,o,it)||this;return i.loadedItems=0,i.itemsToLoad=0,(0,t.bindAll)(i,'itemLoaded'),i.on('add',i.onAdd),i.on('reset',i.onReset),i.on('remove',i.onRemove),i.forEach((function(t){return i.onAdd(t)})),i}return rt(n,e),n.prototype.onAdd=function(t){this.module.framesById[t.id]=t},n.prototype.onReset=function(t,e){var n=this;((null==e?void 0:e.previousModels)||[]).map((function(t){return n.onRemove(t)}))},n.prototype.onRemove=function(t){t.onRemove(),delete this.module.framesById[t.id]},n.prototype.initRefs=function(){this.forEach((function(t){return t.initRefs()}))},n.prototype.itemLoaded=function(){this.loadedItems++,this.loadedItems>=this.itemsToLoad&&(this.trigger('loaded:all'),this.listenToLoadItems(!1))},n.prototype.listenToLoad=function(){this.loadedItems=0,this.itemsToLoad=this.length,this.listenToLoadItems(!0)},n.prototype.listenToLoadItems=function(t){var e=this;this.forEach((function(n){return n[t?'on':'off']('loaded',e.itemLoaded)}))},n}(G);var at=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),lt=function(e){function n(t,n){void 0===n&&(n={});var o=e.call(this,t,n)||this,i=n.em,r={};o.em=i,t.frames||(r.component=t.component,r.styles=t.styles,['component','styles'].map((function(t){return o.unset(t)})));var s=t.frames||[r],a=new st(i.Canvas,s);return a.page=o,o.set('frames',a),!o.getId()&&o.set('id',null==i?void 0:i.Pages._createId()),null==i||i.UndoManager.add(a),o}return at(n,e),n.prototype.defaults=function(){return{name:'',frames:[],_undo:!0}},n.prototype.onRemove=function(){this.getFrames().reset()},n.prototype.getFrames=function(){return this.get('frames')},n.prototype.getId=function(){return this.id},n.prototype.getName=function(){return this.get('name')},n.prototype.setName=function(t){return this.set({name:t})},n.prototype.getAllFrames=function(){return this.getFrames().models||[]},n.prototype.getMainFrame=function(){return this.getFrames().at(0)},n.prototype.getMainComponent=function(){var t=this.getMainFrame();return null==t?void 0:t.getComponent()},n.prototype.toJSON=function(e){void 0===e&&(e={});var n=u.Hn.prototype.toJSON.call(this,e),o=(0,t.result)(this,'defaults');return(0,t.forEach)(n,(function(t,e){0===e.indexOf('_')&&delete n[e]})),(0,t.forEach)(o,(function(t,e){n[e]===t&&delete n[e]})),n},n}(u.Hn);const ct=lt;var ut=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),ht=void 0&&(void 0).__assign||function(){return ht=Object.assign||function(t){for(var e,n=1,o=arguments.length;n1?new xt(e,this,{name:e,traits:i,value:n}):new _t(e,this,kt(kt({},i),{value:n}))},n.prototype.getValue=function(){var t=this.model,e=this.name;return t.get(e).map((function(t,e){return{id:e+'',value:t}}))},n.prototype.setValue=function(t){var e=this.name;this.model.set(e,t.map((function(t){return t.value})))},n.prototype.add=function(){this.setValue(Pt(Pt([],this.value,!0),[{id:this.value.length+'',value:''}],!1)),this.model.trigger("change:".concat(this.name))},n.prototype.remove=function(t){var e,n=this.value,o=null!==(e=null==n?void 0:n.findIndex((function(e){return e.id==t})))&&void 0!==e?e:-1;o>-1&&n.splice(o,1),this.setValue(n)},n}(mt);const Tt=Ct;var Et=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),Qt=void 0&&(void 0).__assign||function(){return Qt=Object.assign||function(t){for(var e,n=1,o=arguments.length;n").concat(n,"
")},o.prototype.templateInput=function(t){var e=this.clsField;return"
")},o.prototype.onChange=function(){console.log('traitchange'),this.target.value=this.inputValue},o.prototype.onUpdateEvent=function(t){this.inputValue=t},o.prototype.renderLabel=function(){var t=this.$el,e=this.templateLabel();t.find('[data-label]').append(e)},o.prototype.getLabel=function(){var t=this.em,n=this.name,o=null!=n?n:this.label;return t.t("traitManager.traits.labels.".concat(o))||(0,e.capitalize)(o).replace(/-/g,' ')},o.prototype.getInputEl=function(){if(!this.$input){var e=this,n=e.em,o=e.name,i=e.type,r=this.target.value,s=(0,l["default"])("")),a=n.t("traitManager.traits.attributes.".concat(o))||{};s.attr(It({placeholder:this.paceholder||r},a)),(0,t.isUndefined)(r)||s.prop('value',r),this.$input=s}return this.$input.get(0)},o.prototype.getElInput=function(){return this.elInput},o.prototype.renderField=function(){var t=this,e=t.$el,n=t.appendInput,o=t.elInput,i=e.find('[data-input]'),r=i[i.length-1];o||(this.elInput=this.getInputEl(),n?r.appendChild(this.elInput):r.insertBefore(this.elInput,r.firstChild))},o.prototype.rerender=function(){delete this.elInput,this.render()},o.prototype.render=function(){var t=this,e=t.$el,n=t.pfx,o=t.ppfx,i=t.name,r=t.type,s=t.clsLabel,a=this.hasLabel(),l="".concat(n,"trait");delete this.$input;var c="
\n ").concat(a?"
"):'',"\n
\n ").concat(this.templateInput(this.target.value),"\n
\n
");return e.empty().append(c),a&&this.renderLabel(),this.renderField(),this.el.className="".concat(l,"__wrp ").concat(l,"__wrp-").concat(i),this.setElement(this.el),this},o}(Vt);const Wt=Nt;var Xt=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),Lt=function(t){function e(e,n){var o=t.call(this,e,n)||this;return o.type='text',o}return Xt(e,t),e.prototype.getInputElem=function(){var t=this.input,e=this.$input;return t||e&&e.get&&e.get(0)||this.getElInput()},Object.defineProperty(e.prototype,"inputValue",{get:function(){var t,e=this.getInputElem();return null!==(t=null==e?void 0:e.value)&&void 0!==t?t:this.target.value},set:function(t){var e=this.getInputElem();e&&(e.value=t)},enumerable:!1,configurable:!0}),e}(Wt);const Yt=Lt;var zt=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),qt=function(t){function e(e,n){var o=t.call(this,e)||this;o.highlightedClass='gjs-three-bg',o.config=n;var i=o,r=i.model,s=i.pfx,a=i.ppfx,l=r.get('type')||'default';return o.className="".concat(a,"layer ").concat(a,"layer__t-").concat(l," no-select ").concat(s,"two-color"),o}return zt(e,t),e.prototype.render=function(){var t=this,e=t.em;t.pfx,t.ppfx,t.model;this.$el.attr('class',this.className);var n=new Yt(e).setTarget('name',this.model,{changeProp:!0});return this.$el.append(n.render().el),this},e.prototype.events=function(){var t=this;return{click:function(){return t.trigger('onClick',t)}}},Object.defineProperty(e.prototype,"em",{get:function(){return this.config.em},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"ppfx",{get:function(){return this.em.getConfig().stylePrefix},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"pfx",{get:function(){return this.config.stylePrefix},enumerable:!1,configurable:!0}),e.prototype.setHighlighted=function(t){t?this.$el.addClass(this.highlightedClass):this.$el.removeClass(this.highlightedClass)},Object.defineProperty(e.prototype,"page",{get:function(){return this.model},enumerable:!1,configurable:!0}),e}(u.G7);const Ut=qt;var Bt=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),Ft=function(t){function e(e,n){var o=t.call(this,e)||this;o.config=n||{};var i=o.config.pStylePrefix||'';o.ppfx=i;var r=o.collection;return o.listenTo(r,'reset',o.render),o.listenTo(r,'remove',o.render),o.em=o.config.em,o}return Bt(e,t),e.prototype.events=function(){var t,e=this.buttonAddId,n='click #'+this.buttonRemoveId;return(t={})['click #'+e]=this.__addPage,t[n]=this.__removePage,t},e.prototype.__getModule=function(){return this.em.Pages},Object.defineProperty(e.prototype,"buttonAddId",{get:function(){return this.ppfx+'button-add'},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"buttonRemoveId",{get:function(){return this.ppfx+'button-remove'},enumerable:!1,configurable:!0}),e.prototype.__addPage=function(){var t=this.em;this.collection.add(new ct({},{em:t})),this.render()},e.prototype.__removePage=function(){this.selectedView&&this.collection.remove(this.selectedView.model)},e.prototype.addTo=function(t){this.collection.add(t)},e.prototype.add=function(t,e){var n,o=this.config,i=new Ut({model:t},o),r=i.render().el;(null===(n=this.em.Pages.getSelected())||void 0===n?void 0:n.id)==t.id&&(i.setHighlighted(!0),this.selectedView=i),i.on('onClick',this.selectedHandler,this),e.appendChild(r)},e.prototype.selectedHandler=function(t){var e;this.em.Pages.select(t.model),null===(e=this.selectedView)||void 0===e||e.setHighlighted(!1),this.trigger('selected',t.model),this.selectedView=t,this.selectedView.setHighlighted(!0)},e.prototype.getCommandsNav=function(){var t=this.buttonAddId,e=this.buttonRemoveId;return(0,l["default"])("
\n
\n
\n
"))},e.prototype.render=function(){var t=this;this.$el.empty();var e=(0,l["default"])('
');e.className='gps-block',e.append(this.getCommandsNav());var n=document.createDocumentFragment();return this.collection.each((function(e){t.add(e,n)}),this),e.append(n),this.$el.append(e),this.setElement(this.$el),this},e}(u.G7);const Gt=Ft;const Ht={stylePrefix:'pg-',appendTo:'',optionsTarget:[{value:!1},{value:'_blank'}],custom:!1};var Kt=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),Jt=function(e){function n(t,n){var o=e.call(this,t,n)||this;return o.type='button',o.command=n.command,o.text=n.text,o.full=n.full,o}return Kt(n,e),n.prototype.events=function(){return{'click button':this.handleClick}},n.prototype.templateInput=function(){return''},Object.defineProperty(n.prototype,"inputValue",{get:function(){},set:function(t){this.handleClick()},enumerable:!1,configurable:!0}),n.prototype.handleClick=function(){var e=this,n=e.model,o=e.command,i=e.em;o&&((0,t.isString)(o)?i.Commands.run(o):o(i.Editor,n))},n.prototype.getInputEl=function(){var t=this,e=t.ppfx,n=t.text,o=t.full,i="".concat(e,"btn");return(0,l["default"])("")).get(0)},n}(Wt);const te=Jt;var ee=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),ne=function(t){function e(e,n){var o=t.call(this,e,n)||this;return o.type='checkbox',o.appendInput=!1,o}return ee(e,t),e.prototype.templateInput=function(){var t=this.ppfx,e=this.clsField;return"")},e.prototype.getInputElem=function(){var t=this.input,e=this.$input;return t||e&&e.get&&e.get(0)||this.getElInput()},Object.defineProperty(e.prototype,"inputValue",{get:function(){var t,e=this.getInputElem();return null!==(t=null==e?void 0:e.checked)&&void 0!==t?t:this.target.value},set:function(t){console.log('Text input value '+t);var e=this.getInputElem();e&&(e.checked=!!t)},enumerable:!1,configurable:!0}),e}(Wt);const oe=ne;function ie(t,n){if((0,e.hasWin)()){var o={beforeShow:C,move:C,change:C,show:C,hide:C,color:!1,flat:!1,showInput:!1,allowEmpty:!1,showButtons:!0,clickoutFiresChange:!0,showInitial:!1,showPalette:!1,showPaletteOnly:!1,hideAfterPaletteSelect:!1,togglePaletteOnly:!1,showSelectionPalette:!0,localStorageKey:!1,appendTo:'body',maxSelectionSize:7,cancelText:'cancel',chooseText:'choose',togglePaletteMoreText:'more',togglePaletteLessText:'less',clearText:'Clear Color Selection',noColorSelectedText:'No Color Selected',preferredFormat:!1,className:'',containerClassName:'',replacerClassName:'',showAlpha:!1,theme:'sp-light',palette:[['#ffffff','#000000','#ff0000','#ff8000','#ffff00','#008000','#0000ff','#4b0082','#9400d3']],selectionPalette:[],disabled:!1,offset:null},i=[],r=!!/msie/i.exec(window.navigator.userAgent),s=function(){function t(t,e){return!!~(''+t).indexOf(e)}var e=document.createElement('div').style;return e.cssText='background-color:rgba(0,0,0,.5)',t(e.backgroundColor,'rgba')||t(e.backgroundColor,'hsla')}(),a=["
","
","
",'
'].join(''),l=function(){var t='';if(r)for(var e=1;e<=6;e++)t+="
";return["
","
","
","
","",'
','
',"
","
","
","
","
","
","
","
",'
','
','
',"
",'
',"
","
",t,'
','
',"
",'
',"
","",'
',"
","
","","",'
','
','
'].join('')}(),c='spectrum.id';t.fn.spectrum=function(e,n){if('string'==typeof e){var o=this,r=Array.prototype.slice.call(arguments,1);return this.each((function(){var n=i[t(this).data(c)];if(n){var s=n[e];if(!s)throw new Error("Spectrum: no such method: '"+e+"'");'get'==e?o=n.get():'container'==e?o=n.container:'option'==e?o=n.option.apply(n,r):'destroy'==e?(n.destroy(),t(this).removeData(c)):s.apply(n,r)}})),o}return this.spectrum('destroy').each((function(){var n=P(this,t.extend({},e,t(this).data()));t(this).data(c,n.id)}))},t.fn.spectrum.load=!0,t.fn.spectrum.loadOpts={},t.fn.spectrum.draggable=Q,t.fn.spectrum.defaults=o,t.fn.spectrum.inputTypeColorSupport=function e(){if(void 0===e._cachedResult){var n=t("")[0];e._cachedResult='color'===n.type&&''!==n.value}return e._cachedResult},t.spectrum={},t.spectrum.localization={},t.spectrum.palettes={},t.fn.spectrum.processNativeColorInputs=function(){var e=t('input[type=color]');e.length&&!A()&&e.spectrum({preferredFormat:'hex6'})};var u=/^[\s,#]+/,h=/\s+$/,p=0,d=Math,f=d.round,g=d.min,m=d.max,v=d.random,y=function(t,e){if(e=e||{},(t=t||'')instanceof y)return t;if(!(this instanceof y))return new y(t,e);var n=function(t){var e={r:0,g:0,b:0},n=1,o=!1,i=!1;'string'==typeof t&&(t=function(t){t=t.replace(u,'').replace(h,'').toLowerCase();var e,n=!1;if(w[t])t=w[t],n=!0;else if('transparent'==t)return{r:0,g:0,b:0,a:0,format:'name'};if(e=S.rgb.exec(t))return{r:e[1],g:e[2],b:e[3]};if(e=S.rgba.exec(t))return{r:e[1],g:e[2],b:e[3],a:e[4]};if(e=S.hsl.exec(t))return{h:e[1],s:e[2],l:e[3]};if(e=S.hsla.exec(t))return{h:e[1],s:e[2],l:e[3],a:e[4]};if(e=S.hsv.exec(t))return{h:e[1],s:e[2],v:e[3]};if(e=S.hsva.exec(t))return{h:e[1],s:e[2],v:e[3],a:e[4]};if(e=S.hex8.exec(t))return{a:et(e[1]),r:K(e[2]),g:K(e[3]),b:K(e[4]),format:n?'name':'hex8'};if(e=S.hex6.exec(t))return{r:K(e[1]),g:K(e[2]),b:K(e[3]),format:n?'name':'hex'};if(e=S.hex3.exec(t))return{r:K(e[1]+''+e[1]),g:K(e[2]+''+e[2]),b:K(e[3]+''+e[3]),format:n?'name':'hex'};return!1}(t));'object'==typeof t&&(t.hasOwnProperty('r')&&t.hasOwnProperty('g')&&t.hasOwnProperty('b')?(r=t.r,s=t.g,a=t.b,e={r:255*G(r,255),g:255*G(s,255),b:255*G(a,255)},o=!0,i='%'===String(t.r).substr(-1)?'prgb':'rgb'):t.hasOwnProperty('h')&&t.hasOwnProperty('s')&&t.hasOwnProperty('v')?(t.s=tt(t.s),t.v=tt(t.v),e=function(t,e,n){t=6*G(t,360),e=G(e,100),n=G(n,100);var o=d.floor(t),i=t-o,r=n*(1-e),s=n*(1-i*e),a=n*(1-(1-i)*e),l=o%6,c=[n,s,r,r,a,n][l],u=[a,n,n,s,r,r][l],h=[r,r,a,n,n,s][l];return{r:255*c,g:255*u,b:255*h}}(t.h,t.s,t.v),o=!0,i='hsv'):t.hasOwnProperty('h')&&t.hasOwnProperty('s')&&t.hasOwnProperty('l')&&(t.s=tt(t.s),t.l=tt(t.l),e=function(t,e,n){var o,i,r;function s(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<1/2?e:n<2/3?t+(e-t)*(2/3-n)*6:t}if(t=G(t,360),e=G(e,100),n=G(n,100),0===e)o=i=r=n;else{var a=n<.5?n*(1+e):n+e-n*e,l=2*n-a;o=s(l,a,t+1/3),i=s(l,a,t),r=s(l,a,t-1/3)}return{r:255*o,g:255*i,b:255*r}}(t.h,t.s,t.l),o=!0,i='hsl'),t.hasOwnProperty('a')&&(n=t.a));var r,s,a;return n=F(n),{ok:o,format:t.format||i,r:g(255,m(e.r,0)),g:g(255,m(e.g,0)),b:g(255,m(e.b,0)),a:n}}(t);this._originalInput=t,this._r=n.r,this._g=n.g,this._b=n.b,this._a=n.a,this._roundA=f(100*this._a)/100,this._format=e.format||n.format,this._gradientType=e.gradientType,this._r<1&&(this._r=f(this._r)),this._g<1&&(this._g=f(this._g)),this._b<1&&(this._b=f(this._b)),this._ok=n.ok,this._tc_id=p++};y.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var t=this.toRgb();return(299*t.r+587*t.g+114*t.b)/1e3},setAlpha:function(t){return this._a=F(t),this._roundA=f(100*this._a)/100,this},toHsv:function(){var t=j(this._r,this._g,this._b);return{h:360*t.h,s:t.s,v:t.v,a:this._a}},toHsvString:function(){var t=j(this._r,this._g,this._b),e=f(360*t.h),n=f(100*t.s),o=f(100*t.v);return 1==this._a?'hsv('+e+', '+n+'%, '+o+'%)':'hsva('+e+', '+n+'%, '+o+'%, '+this._roundA+')'},toHsl:function(){var t=$(this._r,this._g,this._b);return{h:360*t.h,s:t.s,l:t.l,a:this._a}},toHslString:function(){var t=$(this._r,this._g,this._b),e=f(360*t.h),n=f(100*t.s),o=f(100*t.l);return 1==this._a?'hsl('+e+', '+n+'%, '+o+'%)':'hsla('+e+', '+n+'%, '+o+'%, '+this._roundA+')'},toHex:function(t){return R(this._r,this._g,this._b,t)},toHexString:function(t){return'#'+this.toHex(t)},toHex8:function(){return Z(this._r,this._g,this._b,this._a)},toHex8String:function(){return'#'+this.toHex8()},toRgb:function(){return{r:f(this._r),g:f(this._g),b:f(this._b),a:this._a}},toRgbString:function(){return 1==this._a?'rgb('+f(this._r)+', '+f(this._g)+', '+f(this._b)+')':'rgba('+f(this._r)+', '+f(this._g)+', '+f(this._b)+', '+this._roundA+')'},toPercentageRgb:function(){return{r:f(100*G(this._r,255))+'%',g:f(100*G(this._g,255))+'%',b:f(100*G(this._b,255))+'%',a:this._a}},toPercentageRgbString:function(){return 1==this._a?'rgb('+f(100*G(this._r,255))+'%, '+f(100*G(this._g,255))+'%, '+f(100*G(this._b,255))+'%)':'rgba('+f(100*G(this._r,255))+'%, '+f(100*G(this._g,255))+'%, '+f(100*G(this._b,255))+'%, '+this._roundA+')'},toName:function(){return 0===this._a?'transparent':!(this._a<1)&&(x[R(this._r,this._g,this._b,!0)]||!1)},toFilter:function(t){var e='#'+Z(this._r,this._g,this._b,this._a),n=e,o=this._gradientType?'GradientType = 1, ':'';t&&(n=y(t).toHex8String());return'progid:DXImageTransform.Microsoft.gradient('+o+'startColorstr='+e+',endColorstr='+n+')'},toString:function(t){var e=!!t;t=t||this._format;var n=!1,o=this._a<1&&this._a>=0;return e||!o||'hex'!==t&&'hex6'!==t&&'hex3'!==t&&'name'!==t?('rgb'===t&&(n=this.toRgbString()),'prgb'===t&&(n=this.toPercentageRgbString()),'hex'!==t&&'hex6'!==t||(n=this.toHexString()),'hex3'===t&&(n=this.toHexString(!0)),'hex8'===t&&(n=this.toHex8String()),'name'===t&&(n=this.toName()),'hsl'===t&&(n=this.toHslString()),'hsv'===t&&(n=this.toHsvString()),n||this.toHexString()):'name'===t&&0===this._a?this.toName():this.toRgbString()},_applyModification:function(t,e){var n=t.apply(null,[this].concat([].slice.call(e)));return this._r=n._r,this._g=n._g,this._b=n._b,this.setAlpha(n._a),this},lighten:function(){return this._applyModification(I,arguments)},brighten:function(){return this._applyModification(N,arguments)},darken:function(){return this._applyModification(W,arguments)},desaturate:function(){return this._applyModification(M,arguments)},saturate:function(){return this._applyModification(V,arguments)},greyscale:function(){return this._applyModification(D,arguments)},spin:function(){return this._applyModification(X,arguments)},_applyCombination:function(t,e){return t.apply(null,[this].concat([].slice.call(e)))},analogous:function(){return this._applyCombination(U,arguments)},complement:function(){return this._applyCombination(L,arguments)},monochromatic:function(){return this._applyCombination(B,arguments)},splitcomplement:function(){return this._applyCombination(q,arguments)},triad:function(){return this._applyCombination(Y,arguments)},tetrad:function(){return this._applyCombination(z,arguments)}},y.fromRatio=function(t,e){if('object'==typeof t){var n={};for(var o in t)t.hasOwnProperty(o)&&(n[o]='a'===o?t[o]:tt(t[o]));t=n}return y(t,e)},y.equals=function(t,e){return!(!t||!e)&&y(t).toRgbString()==y(e).toRgbString()},y.random=function(){return y.fromRatio({r:v(),g:v(),b:v()})},y.mix=function(t,e,n){n=0===n?0:n||50;var o,i=y(t).toRgb(),r=y(e).toRgb(),s=n/100,a=2*s-1,l=r.a-i.a,c=1-(o=((o=a*l==-1?a:(a+l)/(1+a*l))+1)/2),u={r:r.r*o+i.r*c,g:r.g*o+i.g*c,b:r.b*o+i.b*c,a:r.a*s+i.a*(1-s)};return y(u)},y.readability=function(t,e){var n=y(t),o=y(e),i=n.toRgb(),r=o.toRgb(),s=n.getBrightness(),a=o.getBrightness(),l=Math.max(i.r,r.r)-Math.min(i.r,r.r)+Math.max(i.g,r.g)-Math.min(i.g,r.g)+Math.max(i.b,r.b)-Math.min(i.b,r.b);return{brightness:Math.abs(s-a),color:l}},y.isReadable=function(t,e){var n=y.readability(t,e);return n.brightness>125&&n.color>500},y.mostReadable=function(t,e){for(var n=null,o=0,i=!1,r=0;r125&&s.color>500,l=3*(s.brightness/125)+s.color/500;(a&&!i||a&&i&&l>o||!a&&!i&&l>o)&&(i=a,o=l,n=y(e[r]))}return n};var _,O,b,w=y.names={aliceblue:'f0f8ff',antiquewhite:'faebd7',aqua:'0ff',aquamarine:'7fffd4',azure:'f0ffff',beige:'f5f5dc',bisque:'ffe4c4',black:'000',blanchedalmond:'ffebcd',blue:'00f',blueviolet:'8a2be2',brown:'a52a2a',burlywood:'deb887',burntsienna:'ea7e5d',cadetblue:'5f9ea0',chartreuse:'7fff00',chocolate:'d2691e',coral:'ff7f50',cornflowerblue:'6495ed',cornsilk:'fff8dc',crimson:'dc143c',cyan:'0ff',darkblue:'00008b',darkcyan:'008b8b',darkgoldenrod:'b8860b',darkgray:'a9a9a9',darkgreen:'006400',darkgrey:'a9a9a9',darkkhaki:'bdb76b',darkmagenta:'8b008b',darkolivegreen:'556b2f',darkorange:'ff8c00',darkorchid:'9932cc',darkred:'8b0000',darksalmon:'e9967a',darkseagreen:'8fbc8f',darkslateblue:'483d8b',darkslategray:'2f4f4f',darkslategrey:'2f4f4f',darkturquoise:'00ced1',darkviolet:'9400d3',deeppink:'ff1493',deepskyblue:'00bfff',dimgray:'696969',dimgrey:'696969',dodgerblue:'1e90ff',firebrick:'b22222',floralwhite:'fffaf0',forestgreen:'228b22',fuchsia:'f0f',gainsboro:'dcdcdc',ghostwhite:'f8f8ff',gold:'ffd700',goldenrod:'daa520',gray:'808080',green:'008000',greenyellow:'adff2f',grey:'808080',honeydew:'f0fff0',hotpink:'ff69b4',indianred:'cd5c5c',indigo:'4b0082',ivory:'fffff0',khaki:'f0e68c',lavender:'e6e6fa',lavenderblush:'fff0f5',lawngreen:'7cfc00',lemonchiffon:'fffacd',lightblue:'add8e6',lightcoral:'f08080',lightcyan:'e0ffff',lightgoldenrodyellow:'fafad2',lightgray:'d3d3d3',lightgreen:'90ee90',lightgrey:'d3d3d3',lightpink:'ffb6c1',lightsalmon:'ffa07a',lightseagreen:'20b2aa',lightskyblue:'87cefa',lightslategray:'789',lightslategrey:'789',lightsteelblue:'b0c4de',lightyellow:'ffffe0',lime:'0f0',limegreen:'32cd32',linen:'faf0e6',magenta:'f0f',maroon:'800000',mediumaquamarine:'66cdaa',mediumblue:'0000cd',mediumorchid:'ba55d3',mediumpurple:'9370db',mediumseagreen:'3cb371',mediumslateblue:'7b68ee',mediumspringgreen:'00fa9a',mediumturquoise:'48d1cc',mediumvioletred:'c71585',midnightblue:'191970',mintcream:'f5fffa',mistyrose:'ffe4e1',moccasin:'ffe4b5',navajowhite:'ffdead',navy:'000080',oldlace:'fdf5e6',olive:'808000',olivedrab:'6b8e23',orange:'ffa500',orangered:'ff4500',orchid:'da70d6',palegoldenrod:'eee8aa',palegreen:'98fb98',paleturquoise:'afeeee',palevioletred:'db7093',papayawhip:'ffefd5',peachpuff:'ffdab9',peru:'cd853f',pink:'ffc0cb',plum:'dda0dd',powderblue:'b0e0e6',purple:'800080',rebeccapurple:'663399',red:'f00',rosybrown:'bc8f8f',royalblue:'4169e1',saddlebrown:'8b4513',salmon:'fa8072',sandybrown:'f4a460',seagreen:'2e8b57',seashell:'fff5ee',sienna:'a0522d',silver:'c0c0c0',skyblue:'87ceeb',slateblue:'6a5acd',slategray:'708090',slategrey:'708090',snow:'fffafa',springgreen:'00ff7f',steelblue:'4682b4',tan:'d2b48c',teal:'008080',thistle:'d8bfd8',tomato:'ff6347',turquoise:'40e0d0',violet:'ee82ee',wheat:'f5deb3',white:'fff',whitesmoke:'f5f5f5',yellow:'ff0',yellowgreen:'9acd32'},x=y.hexNames=function(t){var e={};for(var n in t)t.hasOwnProperty(n)&&(e[t[n]]=n);return e}(w),S=(O='[\\s|\\(]+('+(_='(?:'+'[-\\+]?\\d*\\.\\d+%?'+')|(?:'+'[-\\+]?\\d+%?'+')')+')[,|\\s]+('+_+')[,|\\s]+('+_+')\\s*\\)?',b='[\\s|\\(]+('+_+')[,|\\s]+('+_+')[,|\\s]+('+_+')[,|\\s]+('+_+')\\s*\\)?',{rgb:new RegExp('rgb'+O),rgba:new RegExp('rgba'+b),hsl:new RegExp('hsl'+O),hsla:new RegExp('hsla'+b),hsv:new RegExp('hsv'+O),hsva:new RegExp('hsva'+b),hex3:/^([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex8:/^([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/});window.tinycolor=y,t((function(){t.fn.spectrum.load&&t.fn.spectrum.processNativeColorInputs()}))}function k(e,n,o,i){for(var r=[],a=0;a')}else{r.push(t('
').append(t('').attr('title',i.noColorSelectedText)).html())}}return"
"+r.join('')+'
'}function P(e,c){var u,h,p,d,f=function(e,n){var i=t.extend({},o,e);return i.callbacks={move:E(i.move,n),change:E(i.change,n),show:E(i.show,n),hide:E(i.hide,n),beforeShow:E(i.beforeShow,n)},i}(c,e),g=f.flat,m=f.showSelectionPalette,v=f.localStorageKey,_=f.theme,O=f.callbacks,b=(u=zt,h=10,function(){var t=this,e=arguments,n=function(){d=null,u.apply(t,e)};p&&clearTimeout(d),!p&&d||(d=setTimeout(n,h))}),w=!1,x=!1,S=!0,P=0,C=0,$=0,j=0,R=0,Z=0,M=0,V=0,D=0,I=0,N=1,W=[],X=[],L={},Y=f.selectionPalette.slice(0),z=f.maxSelectionSize,q='sp-dragging',U=null,B=e.ownerDocument,F=(B.body,t(e)),G=!1,H=t(l,B).addClass(_),K=H.find('.sp-picker-container'),J=H.find('.sp-color'),tt=H.find('.sp-dragger'),et=H.find('.sp-hue'),nt=H.find('.sp-slider'),ot=H.find('.sp-alpha-inner'),it=H.find('.sp-alpha'),rt=H.find('.sp-alpha-handle'),st=H.find('.sp-input'),at=H.find('.sp-palette'),lt=H.find('.sp-initial'),ct=H.find('.sp-cancel'),ut=H.find('.sp-clear'),ht=H.find('.sp-choose'),pt=H.find('.sp-palette-toggle'),dt=F.is('input'),ft=dt&&'color'===F.attr('type')&&A(),gt=dt&&!g,mt=gt?t(a).addClass(_).addClass(f.className).addClass(f.replacerClassName):t([]),vt=gt?mt:F,yt=mt.find('.sp-preview-inner'),_t=f.color||dt&&F.val(),Ot=!1,bt=f.preferredFormat,wt=!f.showButtons||f.clickoutFiresChange,xt=!_t,St=f.allowEmpty&&!ft;function kt(){if(f.showPaletteOnly&&(f.showPalette=!0),pt.text(f.showPaletteOnly?f.togglePaletteMoreText:f.togglePaletteLessText),f.palette){W=f.palette.slice(0),X=t.isArray(W[0])?W:[W],L={};for(var e=0;e1&&(delete window.localStorage[v],t.each(e,(function(t,e){Ct(e)})))}catch(t){}try{Y=window.localStorage[v].split(';')}catch(t){}}}function Ct(e){if(m){var n=y(e).toRgbString();if(!L[n]&&-1===t.inArray(n,Y))for(Y.push(n);Y.length>z;)Y.shift();if(v&&window.localStorage)try{window.localStorage[v]=Y.join(';')}catch(t){}}}function Tt(){var e=Nt(),n=t.map(X,(function(t,n){return k(t,e,'sp-palette-row sp-palette-row-'+n,f)}));Pt(),Y&&n.push(k(function(){var t=[];if(f.showPalette)for(var e=0;ed&&d>i?Math.abs(g.left+i-d):0),g.top-=Math.min(g.top,g.top+r>f&&f>r?Math.abs(r+s-o):o),g}(H,vt))),Lt(),f.showPalette&&Tt(),F.trigger('reflow.spectrum'))}function qt(){Vt(),G=!0,F.attr('disabled',!0),vt.addClass('sp-disabled')}!function(){if(r&&H.find('*:not(input)').attr('unselectable','on'),kt(),gt&&F.after(mt).hide(),St||ut.hide(),g)F.after(H).hide();else{var e='parent'===f.appendTo?F.parent():t(f.appendTo);1!==e.length&&(e=t('body')),e.append(H)}function n(e){return e.data&&e.data.ignore?(It(t(e.target).closest('.sp-thumb-el').data('color')),Wt()):(It(t(e.target).closest('.sp-thumb-el').data('color')),Wt(),f.hideAfterPaletteSelect&&(Yt(!0),Vt())),!1}Pt(),vt.bind('click.spectrum touchstart.spectrum',(function(e){G||jt(),e.stopPropagation(),t(e.target).is('input')||e.preventDefault()})),(F.is(':disabled')||!0===f.disabled)&&qt(),H.click(T),st.change($t),st.bind('paste',(function(){setTimeout($t,1)})),st.keydown((function(t){13==t.keyCode&&$t()})),ct.text(f.cancelText),ct.bind('click.spectrum',(function(t){t.stopPropagation(),t.preventDefault(),Dt(),Vt()})),ut.attr('title',f.clearText),ut.bind('click.spectrum',(function(t){t.stopPropagation(),t.preventDefault(),xt=!0,Wt(),g&&Yt(!0)})),ht.text(f.chooseText),ht.bind('click.spectrum',(function(t){t.stopPropagation(),t.preventDefault(),r&&st.is(':focus')&&st.trigger('change'),st.hasClass('sp-validation-error')||(Yt(!0),Vt())})),pt.text(f.showPaletteOnly?f.togglePaletteMoreText:f.togglePaletteLessText),pt.bind('click.spectrum',(function(t){t.stopPropagation(),t.preventDefault(),f.showPaletteOnly=!f.showPaletteOnly,f.showPaletteOnly||g||H.css('left','-='+(K.outerWidth(!0)+5)),kt()})),Q(it,(function(t,e,n){N=t/R,xt=!1,n.shiftKey&&(N=Math.round(10*N)/10),Wt()}),Qt,At),Q(et,(function(t,e){V=parseFloat(e/j),xt=!1,f.showAlpha||(N=1),Wt()}),Qt,At),Q(J,(function(t,e,n){if(n.shiftKey){if(!U){var o=D*P,i=C-I*C,r=Math.abs(t-o)>Math.abs(e-i);U=r?'x':'y'}}else U=null;var s=!U||'y'===U;(!U||'x'===U)&&(D=parseFloat(t/P)),s&&(I=parseFloat((C-e)/C)),xt=!1,f.showAlpha||(N=1),Wt()}),Qt,At),_t?(It(_t),Xt(),bt=f.preferredFormat||y(_t).getFormat(),Ct(_t)):Xt(),g&&Rt();var o=r?'mousedown.spectrum':'click.spectrum touchstart.spectrum';at.delegate('.sp-thumb-el',o,n),lt.delegate('.sp-thumb-el:nth-child(1)',o,{ignore:!0},n)}();var Ut={show:Rt,hide:Vt,toggle:jt,reflow:zt,option:function(e,o){return e===n?t.extend({},f):o===n?f[e]:(f[e]=o,'preferredFormat'===e&&(bt=f.preferredFormat),void kt())},enable:function(){G=!1,F.attr('disabled',!1),vt.removeClass('sp-disabled')},disable:qt,offset:function(t){f.offset=t,zt()},set:function(t){It(t),Yt()},get:Nt,destroy:function(){F.show(),vt.unbind('click.spectrum touchstart.spectrum'),H.remove(),mt.remove(),i[Ut.id]=null},container:H};return Ut.id=i.push(Ut)-1,Ut}function C(){}function T(t){t.stopPropagation()}function E(t,e){var n=Array.prototype.slice,o=n.call(arguments,2);return function(){return t.apply(e,o.concat(n.call(arguments)))}}function Q(e,n,o,i){n=n||function(){},o=o||function(){},i=i||function(){};var s=document,a=!1,l={},c=0,u=0,h='ontouchstart'in window,p={};function d(t){t.stopPropagation&&t.stopPropagation(),t.preventDefault&&t.preventDefault(),t.returnValue=!1}function f(t){if(a){if(r&&s.documentMode<9&&!t.button)return g();var o=t&&t.touches&&t.touches[0],i=o&&o.pageX||t.pageX,p=o&&o.pageY||t.pageY,f=Math.max(0,Math.min(i-l.left,u)),m=Math.max(0,Math.min(p-l.top,c));h&&d(t),n.apply(e,[f,m,t])}}function g(){a&&(t(s).unbind(p),t(s.body).removeClass('sp-dragging'),setTimeout((function(){i.apply(e,arguments)}),0)),a=!1}p['selectstart']=d,p['dragstart']=d,p['touchmove mousemove']=f,p['touchend mouseup']=g,t(e).bind('touchstart mousedown',(function(n){(n.which?3==n.which:2==n.button)||a||!1!==o.apply(e,arguments)&&(a=!0,c=t(e).height(),u=t(e).width(),l=t(e).offset(),t(s).bind(p),t(s.body).addClass('sp-dragging'),f(n),d(n))}))}function A(){return t.fn.spectrum.inputTypeColorSupport()}function $(t,e,n){t=G(t,255),e=G(e,255),n=G(n,255);var o,i,r=m(t,e,n),s=g(t,e,n),a=(r+s)/2;if(r==s)o=i=0;else{var l=r-s;switch(i=a>.5?l/(2-r-s):l/(r+s),r){case t:o=(e-n)/l+(e>1)+720)%360;--e;)o.h=(o.h+i)%360,r.push(y(o));return r}function B(t,e){e=e||6;for(var n=y(t).toHsv(),o=n.h,i=n.s,r=n.v,s=[],a=1/e;e--;)s.push(y({h:o,s:i,v:r})),r=(r+a)%1;return s}function F(t){return t=parseFloat(t),(isNaN(t)||t<0||t>1)&&(t=1),t}function G(t,e){(function(t){return'string'==typeof t&&-1!=t.indexOf('.')&&1===parseFloat(t)})(t)&&(t='100%');var n=function(t){return'string'==typeof t&&-1!=t.indexOf('%')}(t);return t=g(e,m(0,parseFloat(t))),n&&(t=parseInt(t*e,10)/100),d.abs(t-e)<1e-6?1:t%e/parseFloat(e)}function H(t){return g(1,m(0,t))}function K(t){return parseInt(t,16)}function J(t){return 1==t.length?'0'+t:''+t}function tt(t){return t<=1&&(t=100*t+'%'),t}function et(t){return K(t)/255}}var re=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),se=void 0&&(void 0).__assign||function(){return se=Object.assign||function(t){for(var e,n=1,o=arguments.length;n"));r.find(".".concat(this.holderClass())).append(a);var c=this.getColorEl();return r.find('[data-colorp-c]').append(c),a.val(t),this.$input=a,r.get(0)}return this.input},n.prototype.template=function(){var t=this.ppfx;return"\n
\n
\n
\n
\n
\n
\n ")},n.prototype.inputClass=function(){var t=this.ppfx;return"".concat(t,"field ").concat(t,"field-color")},n.prototype.holderClass=function(){return"".concat(this.ppfx,"input-holder")},n.prototype.remove=function(){return e.prototype.remove.call(this),this.colorEl.spectrum('destroy'),this},n.prototype.setValue=function(e,n){void 0===n&&(n={});var o=this.model,i=(0,t.isUndefined)(n.def)?o.get('defaults'):n.def,r=(0,t.isUndefined)(e)?(0,t.isUndefined)(i)?'':i:e,s=this.getInputEl(),a=this.getColorEl(),l='none'!=r?r:'';s.value=r,a.get(0).style.backgroundColor=l,(n.fromTarget||n.fromInput&&!n.avoidStore)&&(a.spectrum('set',l),this.noneColor='none'==r,this.movedColor=l)},n.prototype.getColorEl=function(){var t=this;if(!this.colorEl){var e=this.em,n=this.colorPicker,o=this.ppfx,i=(0,l["default"])("
")),r=i.get(0).style,s=e&&e.config?e.config.el:'',a=e&&e.getConfig&&e.getConfig().colorPicker||{};this.movedColor='';var c,u=!1,h=function(e){t.inputValue=e};i.spectrum(se(se(se({color:this.target.value||!1,containerClassName:"".concat(o,"one-bg ").concat(o,"two-color"),appendTo:s||'body',maxSelectionSize:8,showPalette:!0,showAlpha:!0,chooseText:'Ok',cancelText:'⨯',palette:[]},a),n||{}),{move:function(e){var n=ae(e);t.movedColor=n,r.backgroundColor=n,h(n)},change:function(e){u=!0;var n=ae(e);r.backgroundColor=n,h(n),t.noneColor=!1},show:function(e){u=!1,t.movedColor='',c=ae(e)},hide:function(){!u&&c&&(t.noneColor&&(c=''),r.backgroundColor=c,i.spectrum('set',c),h(c))}})),this.colorEl=i}return this.colorEl},n}(Wt);const ce=le;var ue=n(968),he=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),pe=function(e){function n(n,o){var i,r,s=e.call(this,n,o)||this;return s.type='number',(0,t.bindAll)(s,'moveIncrement','upIncrement'),s.step=null!==(i=null==o?void 0:o.step)&&void 0!==i?i:1,s.min=null==o?void 0:o.min,s.max=null==o?void 0:o.max,s.fixedValues=null!==(r=null==o?void 0:o.fixedValues)&&void 0!==r?r:[],s}return he(n,e),n.prototype.events=function(){return{'change input':'handleChange','change select':'handleUnitChange','click [data-arrow-up]':'upArrowClick','click [data-arrow-down]':'downArrowClick','mousedown [data-arrows]':'downIncrement',keydown:'handleKeyDown'}},Object.defineProperty(n.prototype,"inputNumberValue",{get:function(){var t,e=null===(t=this.$input)||void 0===t?void 0:t.get(0);return(null==e?void 0:e.value)?parseFloat(e.value):this.target.value},set:function(t){var e,n=null===(e=this.$input)||void 0===e?void 0:e.get(0);n&&(n.value=t)},enumerable:!1,configurable:!0}),n.prototype.getInputEl=function(){var t=this,e=(t.ppfx,t.target),n=t.type,o=t.paceholder,i=this.target.value;console.log(this.$el.get(0));var r=(0,l["default"])(document.createElement('div'));r.addClass(this.inputClass()),r.html(this.template());var s=o||e.value,a=(0,l["default"])(""));return r.find(".".concat("".concat(this.ppfx,"input-holder"))).append(a),console.log(r.get(0)),a.val(i),console.log(this.$el.get(0)),this.$input=a,r.get(0)},n.prototype.template=function(){var t=this.ppfx;return"\n \n \n
\n
\n
\n
\n ")},n.prototype.inputClass=function(){var t=this.ppfx;return"".concat(t,"field-int")||0},n.prototype.setValue=function(t){var e=this.validateInputValue(t,{deepCheck:1});this.inputNumberValue=e,console.log('SetValue'+this.inputValue),this.target.value=this.inputValue},n.prototype.handleChange=function(t){t.stopPropagation(),this.setValue(this.inputNumberValue)},n.prototype.handleKeyDown=function(t){'ArrowUp'===t.key&&(t.preventDefault(),this.upArrowClick()),'ArrowDown'===t.key&&(t.preventDefault(),this.downArrowClick())},n.prototype.upArrowClick=function(){var t=this.step,e=this.inputNumberValue;this.setValue(this.normalizeValue(e+t))},n.prototype.downArrowClick=function(){var t=this.step,e=this.inputNumberValue;this.setValue(this.normalizeValue(e-t))},n.prototype.downIncrement=function(t){t.preventDefault(),console.log('downIncrement'),this.moved=!1,this.inputNumberValue=this.inputNumberValue||0;var e=this.normalizeValue(this.inputNumberValue);this.setValue(e),this.current={y:t.pageY,val:e},(0,ue.on)(document,'mousemove',this.moveIncrement),(0,ue.on)(document,'mouseup',this.upIncrement)},n.prototype.moveIncrement=function(t){this.moved=!0,console.log('moveIncrement');var e=this.step,n=this.current,o=this.normalizeValue(n.val+(n.y-t.pageY)*e),i=this.validateInputValue(o);return this.prValue=i,this.inputNumberValue=i,!1},n.prototype.upIncrement=function(){if(console.log('upIncrement'),(0,ue.S1)(document,'mouseup',this.upIncrement),(0,ue.S1)(document,'mousemove',this.moveIncrement),this.prValue&&this.moved){var t=this.prValue;this.setValue(t)}},n.prototype.normalizeValue=function(t,e){void 0===e&&(e=0);var n=this.step,o=0;if(isNaN(t))return e;if(t=parseFloat(t),Math.floor(t)!==t){var i=n.toString().split('.')[1];o=i?i.length:0}return o?parseFloat(t.toFixed(o)):t},n.prototype.validateInputValue=function(e,n){void 0===n&&(n={});var o=this,i=o.min,r=o.max,s=o.fixedValues,a=n||{},l='',c=(0,t.isUndefined)(e)?l:e;if(a.deepCheck&&c){var u=new RegExp('^'+s.join('|'),'g');s.length&&u.test(c)?c=c.match(u)[0]:(c+='',c=parseFloat(c.replace(',','.')),c=isNaN(c)?l:c)}return(0,t.isUndefined)(r)||(c=c>r?r:c),(0,t.isUndefined)(i)||(c=c=0&&(i=e),n&&(n.value=i)},enumerable:!1,configurable:!0}),n.prototype.getInputEl=function(){var t=e.prototype.getInputEl.call(this);this.unitEl=void 0;var n=this.getUnitEl();return n&&(0,l["default"])(t).find(".".concat(this.ppfx,"field-units")).get(0).appendChild(n),t},n.prototype.handleUnitChange=function(t){t.stopPropagation(),console.log('Unit changed'),this.target.value=this.inputValue},n.prototype.getUnitEl=function(){var t=this;if(!this.unitEl){var e=this.units;if(e.length){var n=[''];e.forEach((function(e){var o=e==t.inputUnitValue?'selected':'';n.push(""))}));var o=document.createElement('div');o.innerHTML=""),this.unitEl=o.firstChild}}return this.unitEl},n}(pe),ge=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),me=function(e){function n(t,n){var o=e.call(this,t,n)||this;return o.type='select',o.options=n.options,o}return ge(n,e),n.prototype.getInputElem=function(){var t=this.input,e=this.$input;return t||e&&e.get&&e.get(0)||this.getElInput()},Object.defineProperty(n.prototype,"inputValue",{get:function(){var t,e=this.getInputElem();return null!==(t=null==e?void 0:e.value)&&void 0!==t?t:this.target.value},set:function(t){console.log('Text input value '+t);var e=this.getInputElem();e&&(e.value=t)},enumerable:!1,configurable:!0}),n.prototype.templateInput=function(){var t=this.ppfx,e=this.clsField;return"
\n
\n
\n
\n
\n
")},n.prototype.getInputEl=function(){if(!this.$input){var e=this,n=(e.name,e.options),o=e.em,i=[],r='',this.$input=(0,l["default"])(r);var s=this.target.value,a=i.indexOf(s)>=0?s:'';!(0,t.isUndefined)(a)&&this.$input.val(a)}return this.$input.get(0)},n}(Wt);const ve=me;var ye=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),_e=function(t){function e(e,n){var o=t.call(this,{model:e})||this;o.highlightedClass='gjs-three-bg',o.config=n;var i=o,r=i.pfx,s=i.ppfx;return o.className="".concat(s,"layer no-select ").concat(r,"two-color"),o}return ye(e,t),e.prototype.render=function(){var t=this.em;if(this.$el.empty(),this.$el.attr('class',this.className),this.model){var e=new de(t,{min:0});e.setTarget('name',this.model,{changeProp:!0}),this.$el.append(e.render().el);var n=new fe(t,{min:0,units:['px','%']});n.setTarget('name',this.model,{changeProp:!0}),this.$el.append(n.render().el),this.$el.append(new ve(t,{options:['px','%']}).setTarget('name',this.model,{changeProp:!0}).render().el),this.$el.append(new oe(t).setTarget('name',this.model,{changeProp:!0}).render().el),this.$el.append(new te(t,{text:'Ok',command:function(){console.log('click')},full:!0}).setTarget('name',this.model,{changeProp:!0}).render().el),this.$el.append(new ce(t,{}).setTarget('name',this.model,{changeProp:!0}).render().el);var o=new Yt(t,{}).setTarget('route',this.model,{changeProp:!0});this.$el.append(o.render().el)}return this},e.prototype.events=function(){var t=this;return{click:function(){return t.trigger('onClick',t)}}},e.prototype.changePage=function(t){this.model=t,this.render()},Object.defineProperty(e.prototype,"em",{get:function(){return this.config.em},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"ppfx",{get:function(){return this.em.getConfig().stylePrefix},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"pfx",{get:function(){return this.config.stylePrefix},enumerable:!1,configurable:!0}),e.prototype.setHighlighted=function(t){t?this.$el.addClass(this.highlightedClass):this.$el.removeClass(this.highlightedClass)},Object.defineProperty(e.prototype,"page",{get:function(){return this.model},enumerable:!1,configurable:!0}),e}(u.G7);const Oe=_e;var be=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),we=void 0&&(void 0).__assign||function(){return we=Object.assign||function(t){for(var e,n=1,o=arguments.length;n';if(n.stopDefault(),n.inAbsoluteMode()){var u=n.Components.getWrapper(),h=u.append({})[0],p=n.Commands.run('core:component-drag',{event:t,guidesInfo:1,center:1,target:h,onEnd:function(t,n,r){var s;if(!r.cancelled){s=u.append(c)[0];var a=o.getOffset(),l=h.getStyle(),p=l.top,d=l.left,f=l.position,g=(0,ue.GX)(t.target),m=parseInt("".concat(parseFloat(d)+g.x-a.left),10),v=parseInt("".concat(parseFloat(p)+g.y-a.top),10);s.addStyle({left:m+'px',top:v+'px',position:f})}e.handleDragEnd(s,i),h.remove()}});s=function(e){return p.stop(t,{cancel:e})},a=function(t){return c=t}}else{var d=new l.Sorter(an({em:n,wmargin:1,nested:1,canvasRelative:1,direction:'a',container:this.el,placer:o.getPlacerEl(),containerSel:'*',itemSel:'*',pfx:'gjs-',onEndMove:function(t){return e.handleDragEnd(t,i)},document:this.el.ownerDocument},this.sortOpts||{}));d.setDropContent(c),d.startSort(),this.sorter=d,s=function(t){t&&(d.moved=!1),d.endMove()},a=function(t){return d.setDropContent(t)}}this.dragStop=s,this.dragContent=a,n.trigger('canvas:dragenter',i,c)}},e.prototype.handleDragEnd=function(t,e){var n=this.em;this.over=!1,t&&(n.set('dragResult',t),n.trigger('canvas:drop',e,t)),n.runDefault({preserveSelected:1})},e.prototype.handleDragOver=function(t){t.preventDefault(),this.em.trigger('canvas:dragover',t)},e.prototype.handleDrop=function(t){t.preventDefault();var e=this.dragContent,n=t.dataTransfer,o=this.getContentByData(n).content;t.target.style.border='',o&&e&&e(o),this.endDrop(!o,t)},e.prototype.getContentByData=function(e){var n=this.em,o=e&&e.types,i=e&&e.files||[],r=n.get('dragContent'),s=e&&e.getData('text');if(i.length){s=[];for(var a=0;a=0)s=e&&e.getData('text/html').replace(/<\/?meta[^>]*>/g,'');else if((0,t.indexOf)(o,'text/uri-list')>=0)s={type:'link',attributes:{href:s},content:s};else if((0,t.indexOf)(o,'text/json')>=0){var u=e&&e.getData('text/json');u&&(s=JSON.parse(u))}else 1===o.length&&'text/plain'===o[0]&&(s="
".concat(s,"
"));var h={content:s};return n.trigger('canvas:dragdata',e,h),h},e}();const cn=ln;var un=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),hn=void 0&&(void 0).__assign||function(){return hn=Object.assign||function(t){for(var e,n=1,o=arguments.length;na&&(l+=r-a),!(0,t.isUndefined)(e)&&l!==i&&l>0&&l0){var l=n.shift(),u=(0,ue.ut)('script',hn({type:'text/javascript'},(0,t.isString)(l)?{src:l}:l));null===(i=o.contentDocument)||void 0===i||i.head.appendChild(u),u.hasAttribute('nomodule')&&'noModule'in HTMLScriptElement.prototype?c(n):u.onerror=u.onload=c.bind(null,n)}else null==r||r.trigger(qe.frameLoadHead,a),e.renderBody(),null==r||r.trigger(qe.frameLoadBody,a),null==r||r.trigger(s,a)};o.onload=function(){var t=e.config.frameContent;if(t){var n=e.getDoc();n.open(),n.write(t),n.close()}a.window=e.getWindow(),null==r||r.trigger("".concat(s,":before"),a),null==r||r.trigger(qe.frameLoad,a),c(pn([],l.get('scripts'),!0))}},o.prototype.renderStyles=function(e){void 0===e&&(e={});var n=this.getHead(),o=this.getCanvasModel(),i=function(e){return e.map((function(e){return{tag:'link',attributes:hn({rel:'stylesheet'},(0,t.isString)(e)?{href:e}:e)}}))},r=i(e.prev||o.previous('styles')),s=i(o.get('styles')),a=[],l=[],c=function(t,e,n){t.forEach((function(t){var o=t.attributes.href;!e.some((function(t){return t.attributes.href===o}))&&n.push(t)}))};c(s,r,l),c(r,s,a),a.forEach((function(t){var e,o=n.querySelector("link[href=\"".concat(t.attributes.href,"\"]"));null===(e=null==o?void 0:o.parentNode)||void 0===e||e.removeChild(o)})),(0,ue.SJ)(n,l)},o.prototype.renderBody=function(){var t,n,o=this,i=this,r=i.config,s=i.em,a=i.model,l=i.ppfx,c=this.getDoc(),u=this.getBody(),h=this.getWindow(),p=a.hasAutoHeight(),d=s.config;h._isEditor=!0,this.renderStyles({prev:[]});(0,ue.R3)(u,""));var f=a.root,g=s.Components.getType('wrapper').view;this.wrapper=new g({model:f,config:hn(hn({},f.config),{em:s,frameView:this})}).render(),(0,ue.R3)(u,null===(t=this.wrapper)||void 0===t?void 0:t.el),(0,ue.R3)(u,new sn({collection:a.getStyles(),config:hn(hn({},s.Css.getConfig()),{frameView:this})}).render().el),(0,ue.R3)(u,this.getJsContainer()),(0,ue.on)(u,'click',(function(t){var e;return t&&'A'==(null===(e=t.target)||void 0===e?void 0:e.tagName)&&t.preventDefault()})),(0,ue.on)(u,'submit',(function(t){return t&&t.preventDefault()})),[{event:'keydown keyup keypress',class:'KeyboardEvent'},{event:'mousedown mousemove mouseup',class:'MouseEvent'},{event:'pointerdown pointermove pointerup',class:'PointerEvent'},{event:'wheel',class:'WheelEvent',opts:{passive:!r.infiniteCanvas}}].forEach((function(t){return t.event.split(' ').forEach((function(e){c.addEventListener(e,(function(e){return o.el.dispatchEvent((0,ue.t3)(e,t.class))}),t.opts)}))})),this._toggleEffects(!0),(0,e.hasDnd)(s)&&(this.droppable=new cn(s,null===(n=this.wrapper)||void 0===n?void 0:n.el)),this.loaded=!0,a.trigger('loaded')},o.prototype._toggleEffects=function(t){var e=t?ue.on:ue.S1,n=this.getWindow();n&&e(n,"".concat(ue.G1," resize"),this._emitUpdate)},o.prototype._emitUpdate=function(){this.model._emitUpdated()},o}(Fe);const fn=dn;var gn=n(250),mn=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),vn=void 0&&(void 0).__assign||function(){return vn=Object.assign||function(t){for(var e,n=1,o=arguments.length;n\n
\n ").concat(r.get('name')||'',"\n
\n
\n
\n \n
\n
\n
\n
\n
\n
\n ")).append(e.el);var l=(0,ue.ut)('div',{class:"".concat(o,"tools"),style:'pointer-events:none; display: none'},"\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n "));this.elTools=l;var c=null==i?void 0:i.toolsWrapper;return c&&c.appendChild(l),a&&a({el:s,elTop:s.querySelector('[data-frame-top]'),elRight:s.querySelector('[data-frame-right]'),elBottom:s.querySelector('[data-frame-bottom]'),elLeft:s.querySelector('[data-frame-left]'),frame:r,frameWrapperView:this,remove:this.remove,startDrag:this.startDrag}),this},n}(Fe);const _n=yn;var On=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),bn=function(t){function e(e,n){void 0===e&&(e={});var o=t.call(this,e,!0)||this;return o.listenTo(o.collection,'reset',o.render),o.canvasView=n.canvasView,o._module=n.module,o}return On(e,t),e.prototype.onRemoveBefore=function(t,e){void 0===e&&(e={}),t.forEach((function(t){return t.remove(e)}))},e.prototype.onRender=function(){var t=this.$el,e=this.ppfx;t.attr({class:"".concat(e,"frames")})},e.prototype.clearItems=function(){(this.viewCollection||[]).forEach((function(t){return t.remove()})),this.viewCollection=[]},e.prototype.renderView=function(t,e){return new _n(t,this.canvasView)},e}(He);const wn=bn;var xn=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),Sn=void 0&&(void 0).__assign||function(){return Sn=Object.assign||function(t){for(var e,n=1,o=arguments.length;n\n
\n \n
\n \n ")},o.prototype._onFramesUpdate=function(){this._initFrames(),this._renderFrames()},o.prototype._initFrames=function(){var t=this,e=t.frames,n=t.model,o=t.config,i=t.em,r=n.frames;i.set('readyCanvas',0),r.once('loaded:all',(function(){return i.set('readyCanvas',1)})),null==e||e.remove(),this.frames=new wn({collection:r},Sn(Sn({},o),{canvasView:this}))},o.prototype.checkSelected=function(t,e){var n;void 0===e&&(e={});var o=e.scroll,i=this.em.getCurrentFrame();o&&(null===(n=t.views)||void 0===n||n.forEach((function(t){t.frameView===i&&t.scrollIntoView(o)})))},o.prototype.remove=function(){for(var t,e=[],n=0;n=k?k/2-x/2:-b)+b)*E,y:(-m.y+P/2-S/2+w)*E};if(y){var $=a.getZoomMultiplier(),j=(P*$-P)/2;A.y=(-m.y+w)*E-j/$}a.setCoords(A.x,A.y)},o.prototype.isElInViewport=function(t){var n=(0,e.getElement)(t),o=(0,ue.Ut)(n),i=this.getFrameOffset(n),r=o.top,s=o.left;return r>=0&&s>=0&&r<=i.height&&s<=i.width},o.prototype.offset=function(t,e){void 0===e&&(e={});var n=e.noScroll,o=(0,ue.Ut)(t),i=n?{x:0,y:0}:(0,ue.GX)(t);return{top:o.top+i.y,left:o.left+i.x,width:o.width,height:o.height}},o.prototype.getRectToScreen=function(t){var e,n,o,i,r=this.module.getZoomDecimal(),s=this.module.getCoords(),a=this.getViewportDelta();return{x:(null!==(e=t.x)&&void 0!==e?e:0)*r+s.x+a.x||0,y:(null!==(n=t.y)&&void 0!==n?n:0)*r+s.y+a.y||0,width:(null!==(o=t.width)&&void 0!==o?o:0)*r,height:(null!==(i=t.height)&&void 0!==i?i:0)*r}},o.prototype.getElBoxRect=function(t,n){var o,i,r;void 0===n&&(n={});var s=this.module,a=(0,ue.Ut)(t),l=a.width,c=a.height,u=a.left,h=a.top,p=null===(o=(0,e.getComponentView)(t))||void 0===o?void 0:o.frameView,d=null==p?void 0:p.getBoxRect(),f=s.getZoomMultiplier(),g=null!==(i=null==d?void 0:d.x)&&void 0!==i?i:0,m=null!==(r=null==d?void 0:d.y)&&void 0!==r?r:0,v=this.el,y=(0,ue.GX)(),_={x:u+g+(v.scrollLeft+y.x)*f,y:h+m+(v.scrollTop+y.y)*f,width:l,height:c};return n.local&&(_.x=u,_.y=h),n.toScreen?this.getRectToScreen(_):_},o.prototype.getViewportRect=function(t){void 0===t&&(t={});var e=this.getCanvasOffset(),n=e.top,o=e.left,i=e.width,r=e.height,s=this.module;if(t.toWorld){var a=s.getZoomMultiplier(),l=s.getCoords(),c=this.getViewportDelta();return{x:(-l.x-c.x||0)*a,y:(-l.y-c.y||0)*a,width:i*a,height:r*a}}return{x:o,y:n,width:i,height:r}},o.prototype.getViewportDelta=function(t){void 0===t&&(t={});var e=this.module.getZoomMultiplier(),n=this.getCanvasOffset(),o=n.width,i=n.height;return{x:(o*e-o)/2/e,y:(i*e-i)/2/e}},o.prototype.clearOff=function(){this.frmOff=void 0,this.cvsOff=void 0},o.prototype.getFrameOffset=function(t){var e;if(!this.frmOff||t){var n=null===(e=this.frame)||void 0===e?void 0:e.el,o=null==t?void 0:t.ownerDocument.defaultView,i=o?o.frameElement:n;this.frmOff=this.offset(i||n)}return this.frmOff},o.prototype.getCanvasOffset=function(){return this.cvsOff||(this.cvsOff=this.offset(this.el)),this.cvsOff},o.prototype.getElementPos=function(t,e){void 0===e&&(e={});var n=this.module.getZoomDecimal(),o=this.getFrameOffset(t),i=this.el,r=this.getCanvasOffset(),s=this.offset(t,e),a=e.avoidFrameOffset?0:o.top,l=e.avoidFrameOffset?0:o.left,c=e.avoidFrameZoom?s.top:s.top*n,u=e.avoidFrameZoom?s.left:s.left*n;return{top:e.avoidFrameOffset?c:c+a-r.top+i.scrollTop,left:e.avoidFrameOffset?u:u+l-r.left+i.scrollLeft,height:e.avoidFrameZoom?s.height:s.height*n,width:e.avoidFrameZoom?s.width:s.width*n,zoom:n,rect:s}},o.prototype.getElementOffsets=function(t){if(!t||(0,ue.BM)(t))return{};var e={},n=window.getComputedStyle(t),o=this.module.getZoomDecimal();return['marginTop','marginRight','marginBottom','marginLeft','paddingTop','paddingRight','paddingBottom','paddingLeft'].forEach((function(t){e[t]=parseFloat(n[t])*o})),e},o.prototype.getPosition=function(t){var e;void 0===t&&(t={});var n=null===(e=this.frame)||void 0===e?void 0:e.el.contentDocument;if(!n)return{top:0,left:0,width:0,height:0};var o=n.body,i=this.module.getZoomDecimal(),r=this.getFrameOffset(),s=this.getCanvasOffset(),a=t.noScroll;return{top:r.top+(a?0:o.scrollTop)*i-s.top,left:r.left+(a?0:o.scrollLeft)*i-s.left,width:s.width,height:s.height}},o.prototype.updateScript=function(t){var e=t.model,n=e.getId();if(!t.scriptContainer){t.scriptContainer=(0,ue.ut)('div',{'data-id':n});var o=this.getJsContainer();null==o||o.appendChild(t.scriptContainer)}t.el.id=n,t.scriptContainer.innerHTML='';var i=document.createElement('script'),r=e.getScriptString(),s=e.get('script-props')?r:"function(){\n".concat(r,"\n;}"),a=JSON.stringify(e.__getScriptProps());console.log(i),i.innerHTML="\n setTimeout(function() {\n var item = document.getElementById('".concat(n,"');\n if (!item) return;\n (").concat(s,".bind(item))(").concat(a,")\n }, 1);"),setTimeout((function(){var e=t.scriptContainer;null==e||e.appendChild(i)}),0)},o.prototype.getJsContainer=function(t){var e=this.getFrameView(t);return null==e?void 0:e.getJsContainer()},o.prototype.getFrameView=function(t){return(null==t?void 0:t.frameView)||this.em.getCurrentFrame()},o.prototype._renderFrames=function(){if(this.ready){var t=this,e=t.model,n=t.frames,o=t.em,i=t.framesArea,r=e.frames;r.listenToLoad(),n.render();var s=r.at(0),a=null==s?void 0:s.view;o.setCurrentFrame(a),null==i||i.appendChild(n.el),this.frame=a,this.updateFramesArea()}},o.prototype.renderFrames=function(){this._renderFrames()},o.prototype.render=function(){var t=this,n=t.el,o=t.$el,i=t.ppfx,r=t.config,s=t.em;o.html(this.template());var a=o.find('[data-frames]');this.framesArea=a.get(0);var l=o.find('[data-tools]');return this.toolsWrapper=l.get(0),l.append("\n
\n
\n
\n
\n
\n
\n ").concat(r.extHl?"
"):'',"\n
\n
\n
\n
\n
\n
\n
\n ")),this.toolsEl=n.querySelector("#".concat(i,"tools")),this.hlEl=n.querySelector(".".concat(i,"highlighter")),this.badgeEl=n.querySelector(".".concat(i,"badge")),this.placerEl=n.querySelector(".".concat(i,"placeholder")),this.ghostEl=n.querySelector(".".concat(i,"ghost")),this.toolbarEl=n.querySelector(".".concat(i,"toolbar")),this.resizerEl=n.querySelector(".".concat(i,"resizer")),this.offsetEl=n.querySelector(".".concat(i,"offset-v")),this.fixedOffsetEl=n.querySelector(".".concat(i,"offset-fixed-v")),this.toolsGlobEl=n.querySelector(".".concat(i,"tools-gl")),this.spotsEl=n.querySelector('[data-spots]'),this.cvStyle=n.querySelector('[data-canvas-style]'),this.el.className=(0,e.getUiClass)(s,this.className),this.ready=!0,this._renderFrames(),this},o}(Fe);const Pn=kn;var Cn=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),Tn=void 0&&(void 0).__assign||function(){return Tn=Object.assign||function(t){for(var e,n=1,o=arguments.length;nr.top+r.height?r.top+r.height:d,left:p,elementTop:r.top,elementLeft:r.left,elementWidth:r.width,elementHeight:r.height,targetWidth:t.offsetWidth,targetHeight:t.offsetHeight,canvasTop:i.top,canvasLeft:i.left,canvasWidth:i.width,canvasHeight:i.height};return c&&this.em&&this.em.trigger(c,f),f}},o.prototype.canvasRectOffset=function(t,e,n){var o=this;void 0===n&&(n={});var i=function(t,e,i){void 0===e&&(e=1);var r=o.em.getZoomDecimal(),s=e?'top':'left',a=t.ownerDocument,l=n.offset?function(t){var e=t.defaultView;return null==e?void 0:e.frameElement}(a):{},c=l.offsetTop,u=void 0===c?0:c,h=l.offsetLeft,p=void 0===h?0:h,d=a.body||{},f=d.scrollTop,g=void 0===f?0:f,m=d.scrollLeft,v=e?g:void 0===m?0:m,y=e?u:p;return i[s]-(v-y)*r};return{top:i(t,1,e),left:i(t,0,e)}},o.prototype.getTargetToElementFixed=function(e,n,o){void 0===o&&(o={});var i=o.pos||this.getElementPos(e,{noScroll:!0}),r=o.canvasOff||this.canvasRectOffset(e,i),s=n.offsetHeight||0,a=n.offsetWidth||0,l=i.left+i.width,c=this.getCanvasView(),u=c.getPosition(),h=c.getFrameOffset(e),p=o.event,d=-s,f=(0,t.isUndefined)(o.left)?i.width-a:o.left;if(f=i.left<-f?-i.left:f,f=l>u.width?f-(l-u.width):f,r.top=0;){var o=e.indexOf('/*'),i=e.indexOf('*/')+2;e=e.replace(e.slice(o,i),'')}for(var r=e.split(';'),s=0,a=r.length;s'!=="".concat(a.outerHTML).slice(-2)||(d.void=!0);var P=d.components;if(!d.type&&P){for(var C=1,T=0,E=0;E".concat(e,""),l=i.parseFromString(a,r);if(s){var c=l.head,u=l.body,h=c.querySelectorAll('script');(0,t.each)(h,(function(t){return u.appendChild(t)}));var p=[];(0,t.each)(c.children,(function(t){return p.push(t)})),(0,t.each)(p,(function(t,e){return u.insertBefore(t,u.children[e])})),o=u}else o=l.firstChild;return o}(o,u),p=h.querySelectorAll('script'),d=p.length;if(!((0,t.isUndefined)(a.allowScripts)?u.allowScripts:a.allowScripts))for(;d--;)p[d].parentNode.removeChild(p[d]);if(u.allowUnsafeAttr||this.__clearUnsafeAttr(h),i){for(var f=h.querySelectorAll('style'),g=f.length,m='';g--;)m=f[g].innerHTML+m,f[g].parentNode.removeChild(f[g]);m&&(l.css=i.parse(m))}e&&e.trigger("".concat(Vn,":root"),{input:o,root:h});var v=this.parseNode(h,c),y=1!==v.length||c.returnArray?v:v[0];return l.html=y,e&&e.trigger(Vn,{input:o,output:l}),l},__clearUnsafeAttr:function(e){var n=this,o=e.attributes||[],i=e.childNodes||[],r=[];(0,t.each)(o,(function(t){var e=t.nodeName||'';0===e.indexOf('on')&&r.push(e)})),r.map((function(t){return e.removeAttribute(t)})),(0,t.each)(i,(function(t){return n.__clearUnsafeAttr(t)}))}}};var In=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),Nn=void 0&&(void 0).__assign||function(){return Nn=Object.assign||function(t){for(var e,n=1,o=arguments.length;n=0:i;if('__'===e.substring(0,2))return"continue";var s=o[e];((0,t.isArray)(s)?s:[s]).forEach((function(t){var o="".concat(t).concat(r?' !important':'');o&&n.push("".concat(e,":").concat(o,";"))}))};for(var s in o)r(s);return n.join('')},o.prototype.getSelectors=function(){return this.get('selectors')||this.get('classes')},o.prototype.getSelectorsString=function(t){return this.selectorsToString?this.selectorsToString(t):this.getSelectors().getFullString()},o}(u.Hn);const Yn=Ln;var zn=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),qn=void 0&&(void 0).__assign||function(){return qn=Object.assign||function(t){for(var e,n=1,o=arguments.length;n0&&g.reset(f,o)}else p.components=f}return p}))},Hn=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return zn(n,e),n.prototype.initialize=function(t,e){void 0===e&&(e={}),this.opt=e,this.listenTo(this,'add',this.onAdd),this.listenTo(this,'remove',this.removeChildren),this.listenTo(this,'reset',this.resetChildren);var n=e.em,o=e.config;this.config=o,this.em=n,this.domc=e.domc||(null==n?void 0:n.Components)},n.prototype.resetChildren=function(t,e){var n=this;void 0===e&&(e={});var o=this,i=e.previousModels||[],r=i.filter((function(e){return!t.get(e.cid)})),s=Fn(t),a=Fn(i).filter((function(t){return s.indexOf(t)>=0}));e.keepIds=(e.keepIds||[]).concat(a),r.forEach((function(t){return n.removeChildren(t,o,e)})),t.each((function(t){return n.onAdd(t)}))},n.prototype.resetFromString=function(t,e){var n,o;void 0===t&&(t=''),void 0===e&&(e={}),e.keepIds=Fn(this);var i=this,r=i.domc,s=i.em,a=i.parent,l=null==s?void 0:s.Css,c=(null==r?void 0:r.allById())||{},u=this.parseString(t,e),h=Gn(u,c,e),p=e.visitedCmps,d=void 0===p?{}:p;Object.keys(d).forEach((function(t){var e=d[t];if(e.length){var n=(null==l?void 0:l.getRules("#".concat(t)))||[];n.length&&e.forEach((function(t){n.forEach((function(e){var n=e.clone();n.set('selectors',["#".concat(t.attributes.id)]),l.getAll().add(n)}))}))}})),this.reset(h,e),null==s||s.trigger('component:content',a,e,t),null===(o=(n=a).__checkInnerChilds)||void 0===o||o.call(n)},n.prototype.removeChildren=function(t,e,n){var o=this;if(void 0===n&&(n={}),t){var i=this.domc,r=this.em,s=n.temporary||n.fromUndo;if(t.prevColl=this,!s){var a=t.getId(),l=r.Selectors.getAll(),c=r.Css.getAll(),u=(n.keepIds||[]).indexOf(a)<0;delete(i?i.allById():{})[a];var h=u?c.remove(c.filter((function(t){return t.getSelectors().getFullString()==="#".concat(a)})),n):[];l.remove(h.map((function(t){return t.getSelectors().at(0)}))),t.opt.temporary||(r.Commands.run('core:component-style-clear',{target:t}),t.removed(),t.trigger('removed'),r.trigger('component:remove',t)),t.components().forEach((function(t){return o.removeChildren(t,e,n)}))}var p=t.components();r.stopListening(p),r.stopListening(t),r.stopListening(t.get('classes')),t.__postRemove()}},n.prototype.model=function(t,e){var n,o=e.collection.opt,i=o.em,r=i.Components.componentTypes;e.em=i,e.config=o.config,e.componentTypes=r,e.domc=o.domc;for(var s=0;s\n \n \n ").get(0)}return this.toolbarEl},n.prototype.renderItem=function(t){var e=this,n=e.em,o=e.ppfx,i=(e.label,null==n?void 0:n.getConfig().icons),r=(null==i?void 0:i.caret)||'',s=nx.buildView(t,n,co(co({},t.opts),{noLabel:!0})).render(),a=document.createElement('div');a.setAttribute('data-item-title',''),a.className="".concat(o,"title"),a.innerHTML="\n
").concat(r,"
\n \n "),console.log(a);var c=document.createElement('div');return c.className='data-item',c.setAttribute('item-id',t.name),c.append(s.el),console.log(a),(0,l["default"])(a).append(c)},n.prototype.renderItems=function(){var t=this;this.itemsEl=this.target.traits.map((function(e){return t.renderItem(e)}))},n.prototype.render=function(){var t,e=this,n=(e.$el,e.pfx),o=e.ppfx,i=(e.name,e.type);e.className;console.log('render');var r=this.hasLabel(),s="".concat(n,"trait"),a=document.createDocumentFragment();this.$el.empty(),this.renderItems(),null===(t=this.itemsEl)||void 0===t||t.forEach((function(t){return a.appendChild(t.get(0))}));var l=document.createElement('div');l.className="".concat(o,"field-").concat(i,"-items"),l.append(a);var c="
\n ").concat(r?"
"):'',"\n
\n\n
\n
");return this.$el.append(c),this.$el.find('[data-input]').append(this.renderToolbar()).append(l),console.log('render'),this.select(),this.setElement(this.el),this},n}(Vt);const ho=uo;var po=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),fo=void 0&&(void 0).__assign||function(){return fo=Object.assign||function(t){for(var e,n=1,o=arguments.length;nthis.length)throw new RangeError(`Invalid position ${t} in document of length ${this.length}`);return this.lineInner(t,!1,1,0)}line(t){if(t<1||t>this.lines)throw new RangeError(`Invalid line number ${t} in ${this.lines}-line document`);return this.lineInner(t,!0,1,0)}replace(t,e,n){[t,e]=Po(this,t,e);let o=[];return this.decompose(0,t,o,2),n.length&&n.decompose(0,n.length,o,1|2),this.decompose(e,this.length,o,1),_o.from(o,this.length-(e-t)+n.length)}append(t){return this.replace(this.length,this.length,t)}slice(t,e=this.length){[t,e]=Po(this,t,e);let n=[];return this.decompose(t,e,n,0),_o.from(n,e-t)}eq(t){if(t==this)return!0;if(t.length!=this.length||t.lines!=this.lines)return!1;let e=this.scanIdentical(t,1),n=this.length-this.scanIdentical(t,-1),o=new wo(this),i=new wo(t);for(let t=e,r=e;;){if(o.next(t),i.next(t),t=0,o.lineBreak!=i.lineBreak||o.done!=i.done||o.value!=i.value)return!1;if(r+=o.value.length,o.done||r>=n)return!0}}iter(t=1){return new wo(this,t)}iterRange(t,e=this.length){return new xo(this,t,e)}iterLines(t,e){let n;if(null==t)n=this.iter();else{null==e&&(e=this.lines+1);let o=this.line(t).from;n=this.iterRange(o,Math.max(o,e==this.lines+1?this.length:e<=1?0:this.line(e-1).to))}return new So(n)}toString(){return this.sliceString(0)}toJSON(){let t=[];return this.flatten(t),t}constructor(){}static of(t){if(0==t.length)throw new RangeError("A document must have at least one line");return 1!=t.length||t[0]?t.length<=32?new yo(t):_o.from(yo.split(t,[])):vo.empty}}class yo extends vo{constructor(t,e=function(t){let e=-1;for(let n of t)e+=n.length+1;return e}(t)){super(),this.text=t,this.length=e}get lines(){return this.text.length}get children(){return null}lineInner(t,e,n,o){for(let i=0;;i++){let r=this.text[i],s=o+r.length;if((e?n:s)>=t)return new ko(o,s,n,r);o=s+1,n++}}decompose(t,e,n,o){let i=t<=0&&e>=this.length?this:new yo(bo(this.text,t,e),Math.min(e,this.length)-Math.max(0,t));if(1&o){let t=n.pop(),e=Oo(i.text,t.text.slice(),0,i.length);if(e.length<=32)n.push(new yo(e,t.length+i.length));else{let t=e.length>>1;n.push(new yo(e.slice(0,t)),new yo(e.slice(t)))}}else n.push(i)}replace(t,e,n){if(!(n instanceof yo))return super.replace(t,e,n);[t,e]=Po(this,t,e);let o=Oo(this.text,Oo(n.text,bo(this.text,0,t)),e),i=this.length+n.length-(e-t);return o.length<=32?new yo(o,i):_o.from(yo.split(o,[]),i)}sliceString(t,e=this.length,n="\n"){[t,e]=Po(this,t,e);let o="";for(let i=0,r=0;i<=e&&rt&&r&&(o+=n),ti&&(o+=s.slice(Math.max(0,t-i),e-i)),i=a+1}return o}flatten(t){for(let e of this.text)t.push(e)}scanIdentical(){return 0}static split(t,e){let n=[],o=-1;for(let i of t)n.push(i),o+=i.length+1,32==n.length&&(e.push(new yo(n,o)),n=[],o=-1);return o>-1&&e.push(new yo(n,o)),e}}class _o extends vo{constructor(t,e){super(),this.children=t,this.length=e,this.lines=0;for(let e of t)this.lines+=e.lines}lineInner(t,e,n,o){for(let i=0;;i++){let r=this.children[i],s=o+r.length,a=n+r.lines-1;if((e?a:s)>=t)return r.lineInner(t,e,n,o);o=s+1,n=a+1}}decompose(t,e,n,o){for(let i=0,r=0;r<=e&&i=r){let i=o&((r<=t?1:0)|(a>=e?2:0));r>=t&&a<=e&&!i?n.push(s):s.decompose(t-r,e-r,n,i)}r=a+1}}replace(t,e,n){if([t,e]=Po(this,t,e),n.lines=i&&e<=s){let a=r.replace(t-i,e-i,n),l=this.lines-r.lines+a.lines;if(a.lines>5-1&&a.lines>l>>5+1){let i=this.children.slice();return i[o]=a,new _o(i,this.length-(e-t)+n.length)}return super.replace(i,s,a)}i=s+1}return super.replace(t,e,n)}sliceString(t,e=this.length,n="\n"){[t,e]=Po(this,t,e);let o="";for(let i=0,r=0;it&&i&&(o+=n),tr&&(o+=s.sliceString(t-r,e-r,n)),r=a+1}return o}flatten(t){for(let e of this.children)e.flatten(t)}scanIdentical(t,e){if(!(t instanceof _o))return 0;let n=0,[o,i,r,s]=e>0?[0,0,this.children.length,t.children.length]:[this.children.length-1,t.children.length-1,-1,-1];for(;;o+=e,i+=e){if(o==r||i==s)return n;let a=this.children[o],l=t.children[i];if(a!=l)return n+a.scanIdentical(l,e);n+=a.length+1}}static from(t,e=t.reduce(((t,e)=>t+e.length+1),-1)){let n=0;for(let e of t)n+=e.lines;if(n<32){let n=[];for(let e of t)e.flatten(n);return new yo(n,e)}let o=Math.max(32,n>>5),i=o<<1,r=o>>1,s=[],a=0,l=-1,c=[];function u(t){let e;if(t.lines>i&&t instanceof _o)for(let e of t.children)u(e);else t.lines>r&&(a>r||!a)?(h(),s.push(t)):t instanceof yo&&a&&(e=c[c.length-1])instanceof yo&&t.lines+e.lines<=32?(a+=t.lines,l+=t.length+1,c[c.length-1]=new yo(e.text.concat(t.text),e.length+1+t.length)):(a+t.lines>o&&h(),a+=t.lines,l+=t.length+1,c.push(t))}function h(){0!=a&&(s.push(1==c.length?c[0]:_o.from(c,l)),l=-1,a=c.length=0)}for(let e of t)u(e);return h(),1==s.length?s[0]:new _o(s,e)}}function Oo(t,e,n=0,o=1e9){for(let i=0,r=0,s=!0;r=n&&(l>o&&(a=a.slice(0,o-i)),i0?1:(t instanceof yo?t.text.length:t.children.length)<<1]}nextInner(t,e){for(this.done=this.lineBreak=!1;;){let n=this.nodes.length-1,o=this.nodes[n],i=this.offsets[n],r=i>>1,s=o instanceof yo?o.text.length:o.children.length;if(r==(e>0?s:0)){if(0==n)return this.done=!0,this.value="",this;e>0&&this.offsets[n-1]++,this.nodes.pop(),this.offsets.pop()}else if((1&i)==(e>0?0:1)){if(this.offsets[n]+=e,0==t)return this.lineBreak=!0,this.value="\n",this;t--}else if(o instanceof yo){let i=o.text[r+(e<0?-1:0)];if(this.offsets[n]+=e,i.length>Math.max(0,t))return this.value=0==t?i:e>0?i.slice(t):i.slice(0,i.length-t),this;t-=i.length}else{let i=o.children[r+(e<0?-1:0)];t>i.length?(t-=i.length,this.offsets[n]+=e):(e<0&&this.offsets[n]--,this.nodes.push(i),this.offsets.push(e>0?1:(i instanceof yo?i.text.length:i.children.length)<<1))}}}next(t=0){return t<0&&(this.nextInner(-t,-this.dir),t=this.value.length),this.nextInner(t,this.dir)}}class xo{constructor(t,e,n){this.value="",this.done=!1,this.cursor=new wo(t,e>n?-1:1),this.pos=e>n?t.length:0,this.from=Math.min(e,n),this.to=Math.max(e,n)}nextInner(t,e){if(e<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;t+=Math.max(0,e<0?this.pos-this.to:this.from-this.pos);let n=e<0?this.pos-this.from:this.to-this.pos;t>n&&(t=n),n-=t;let{value:o}=this.cursor.next(t);return this.pos+=(o.length+t)*e,this.value=o.length<=n?o:e<0?o.slice(o.length-n):o.slice(0,n),this.done=!this.value,this}next(t=0){return t<0?t=Math.max(t,this.from-this.pos):t>0&&(t=Math.min(t,this.to-this.pos)),this.nextInner(t,this.cursor.dir)}get lineBreak(){return this.cursor.lineBreak&&""!=this.value}}class So{constructor(t){this.inner=t,this.afterBreak=!0,this.value="",this.done=!1}next(t=0){let{done:e,lineBreak:n,value:o}=this.inner.next(t);return e&&this.afterBreak?(this.value="",this.afterBreak=!1):e?(this.done=!0,this.value=""):n?this.afterBreak?this.value="":(this.afterBreak=!0,this.next()):(this.value=o,this.afterBreak=!1),this}get lineBreak(){return!1}}"undefined"!=typeof Symbol&&(vo.prototype[Symbol.iterator]=function(){return this.iter()},wo.prototype[Symbol.iterator]=xo.prototype[Symbol.iterator]=So.prototype[Symbol.iterator]=function(){return this});class ko{constructor(t,e,n,o){this.from=t,this.to=e,this.number=n,this.text=o}get length(){return this.to-this.from}}function Po(t,e,n){return[e=Math.max(0,Math.min(t.length,e)),Math.max(e,Math.min(t.length,n))]}let Co="lc,34,7n,7,7b,19,,,,2,,2,,,20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,2,,,4,,40,4,2,2,4,,w,a,14,6,2,4,8,,9,6,2,3,1a,d,,2,ba,7,,6,,,2a,m,2,7,,2,,2,3e,6,3,,,2,,7,,,20,2,3,,,,9n,2,f0b,5,1n,7,t4,,1r,4,29,,f5k,2,43q,,,3,4,5,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o".split(",").map((t=>t?parseInt(t,36):1));for(let t=1;tt)return Co[e-1]<=t;return!1}function Eo(t){return t>=127462&&t<=127487}const Qo=8205;function Ao(t,e,n=!0,o=!0){return(n?$o:jo)(t,e,o)}function $o(t,e,n){if(e==t.length)return e;e&&Ro(t.charCodeAt(e))&&Zo(t.charCodeAt(e-1))&&e--;let o=Mo(t,e);for(e+=Do(o);e=0&&Eo(Mo(t,o));)n++,o-=2;if(n%2==0)break;e+=2}}}return e}function jo(t,e,n){for(;e>0;){let o=$o(t,e-2,n);if(o=56320&&t<57344}function Zo(t){return t>=55296&&t<56320}function Mo(t,e){let n=t.charCodeAt(e);if(!Zo(n)||e+1==t.length)return n;let o=t.charCodeAt(e+1);return Ro(o)?(n-55296<<10)+(o-56320)+65536:n}function Vo(t){return t<=65535?String.fromCharCode(t):(t-=65536,String.fromCharCode((t>>10)+55296,(1023&t)+56320))}function Do(t){return t<65536?1:2}const Io=/\r\n?|\n/;var No=function(t){return t[t["Simple"]=0]="Simple",t[t["TrackDel"]=1]="TrackDel",t[t["TrackBefore"]=2]="TrackBefore",t[t["TrackAfter"]=3]="TrackAfter",t}(No||(No={}));class Wo{constructor(t){this.sections=t}get length(){let t=0;for(let e=0;et)return i+(t-o);i+=s}else{if(n!=No.Simple&&l>=t&&(n==No.TrackDel&&ot||n==No.TrackBefore&&ot))return null;if(l>t||l==t&&e<0&&!s)return t==o||e<0?i:i+a;i+=a}o=l}if(t>o)throw new RangeError(`Position ${t} is out of range for changeset of length ${o}`);return i}touchesRange(t,e=t){for(let n=0,o=0;n=0&&o<=e&&i>=t)return!(oe)||"cover";o=i}return!1}toString(){let t="";for(let e=0;e=0?":"+o:"")}return t}toJSON(){return this.sections}static fromJSON(t){if(!Array.isArray(t)||t.length%2||t.some((t=>"number"!=typeof t)))throw new RangeError("Invalid JSON representation of ChangeDesc");return new Wo(t)}static create(t){return new Wo(t)}}class Xo extends Wo{constructor(t,e){super(t),this.inserted=e}apply(t){if(this.length!=t.length)throw new RangeError("Applying change set to a document with the wrong length");return zo(this,((e,n,o,i,r)=>t=t.replace(o,o+(n-e),r)),!1),t}mapDesc(t,e=!1){return qo(this,t,e,!0)}invert(t){let e=this.sections.slice(),n=[];for(let o=0,i=0;o=0){e[o]=s,e[o+1]=r;let a=o>>1;for(;n.length0&&Yo(n,e,i.text),i.forward(t),s+=t}let l=t[r++];for(;s>1].toJSON()))}return t}static of(t,e,n){let o=[],i=[],r=0,s=null;function a(t=!1){if(!t&&!o.length)return;rs||t<0||s>e)throw new RangeError(`Invalid change range ${t} to ${s} (in doc of length ${e})`);let u=c?"string"==typeof c?vo.of(c.split(n||Io)):c:vo.empty,h=u.length;if(t==s&&0==h)return;tr&&Lo(o,t-r,-1),Lo(o,s-t,h),Yo(i,o,u),r=s}}(t),a(!s),s}static empty(t){return new Xo(t?[t,-1]:[],[])}static fromJSON(t){if(!Array.isArray(t))throw new RangeError("Invalid JSON representation of ChangeSet");let e=[],n=[];for(let o=0;oe&&"string"!=typeof t)))throw new RangeError("Invalid JSON representation of ChangeSet");if(1==i.length)e.push(i[0],0);else{for(;n.length=0&&n<=0&&n==t[i+1]?t[i]+=e:0==e&&0==t[i]?t[i+1]+=n:o?(t[i]+=e,t[i+1]+=n):t.push(e,n)}function Yo(t,e,n){if(0==n.length)return;let o=e.length-2>>1;if(o>1])),!(n||s==t.sections.length||t.sections[s+1]<0);)a=t.sections[s++],l=t.sections[s++];e(i,c,r,u,h),i=c,r=u}}}function qo(t,e,n,o=!1){let i=[],r=o?[]:null,s=new Bo(t),a=new Bo(e);for(let t=-1;;)if(-1==s.ins&&-1==a.ins){let t=Math.min(s.len,a.len);Lo(i,t,-1),s.forward(t),a.forward(t)}else if(a.ins>=0&&(s.ins<0||t==s.i||0==s.off&&(a.len=0&&t=0)){if(s.done&&a.done)return r?Xo.createSet(i,r):Wo.create(i);throw new Error("Mismatched change set lengths")}{let e=0,n=s.len;for(;n;)if(-1==a.ins){let t=Math.min(n,a.len);e+=t,n-=t,a.forward(t)}else{if(!(0==a.ins&&a.lene||s.ins>=0&&s.len>e)&&(t||o.length>n),r.forward2(e),s.forward(e)}}else Lo(o,0,s.ins,t),i&&Yo(i,o,s.text),s.next()}}class Bo{constructor(t){this.set=t,this.i=0,this.next()}next(){let{sections:t}=this.set;this.i>1;return e>=t.length?vo.empty:t[e]}textBit(t){let{inserted:e}=this.set,n=this.i-2>>1;return n>=e.length&&!t?vo.empty:e[n].slice(this.off,null==t?void 0:this.off+t)}forward(t){t==this.len?this.next():(this.len-=t,this.off+=t)}forward2(t){-1==this.ins?this.forward(t):t==this.ins?this.next():(this.ins-=t,this.off+=t)}}class Fo{constructor(t,e,n){this.from=t,this.to=e,this.flags=n}get anchor(){return 32&this.flags?this.to:this.from}get head(){return 32&this.flags?this.from:this.to}get empty(){return this.from==this.to}get assoc(){return 8&this.flags?-1:16&this.flags?1:0}get bidiLevel(){let t=7&this.flags;return 7==t?null:t}get goalColumn(){let t=this.flags>>6;return 16777215==t?void 0:t}map(t,e=-1){let n,o;return this.empty?n=o=t.mapPos(this.from,e):(n=t.mapPos(this.from,1),o=t.mapPos(this.to,-1)),n==this.from&&o==this.to?this:new Fo(n,o,this.flags)}extend(t,e=t){if(t<=this.anchor&&e>=this.anchor)return Go.range(t,e);let n=Math.abs(t-this.anchor)>Math.abs(e-this.anchor)?t:e;return Go.range(this.anchor,n)}eq(t){return this.anchor==t.anchor&&this.head==t.head}toJSON(){return{anchor:this.anchor,head:this.head}}static fromJSON(t){if(!t||"number"!=typeof t.anchor||"number"!=typeof t.head)throw new RangeError("Invalid JSON representation for SelectionRange");return Go.range(t.anchor,t.head)}static create(t,e,n){return new Fo(t,e,n)}}class Go{constructor(t,e){this.ranges=t,this.mainIndex=e}map(t,e=-1){return t.empty?this:Go.create(this.ranges.map((n=>n.map(t,e))),this.mainIndex)}eq(t){if(this.ranges.length!=t.ranges.length||this.mainIndex!=t.mainIndex)return!1;for(let e=0;et.toJSON())),main:this.mainIndex}}static fromJSON(t){if(!t||!Array.isArray(t.ranges)||"number"!=typeof t.main||t.main>=t.ranges.length)throw new RangeError("Invalid JSON representation for EditorSelection");return new Go(t.ranges.map((t=>Fo.fromJSON(t))),t.main)}static single(t,e=t){return new Go([Go.range(t,e)],0)}static create(t,e=0){if(0==t.length)throw new RangeError("A selection needs at least one range");for(let n=0,o=0;ot?8:0)|i)}static normalized(t,e=0){let n=t[e];t.sort(((t,e)=>t.from-e.from)),e=t.indexOf(n);for(let n=1;no.head?Go.range(s,r):Go.range(r,s))}}return new Go(t,e)}}function Ho(t,e){for(let n of t.ranges)if(n.to>e)throw new RangeError("Selection points outside of document")}let Ko=0;class Jo{constructor(t,e,n,o,i){this.combine=t,this.compareInput=e,this.compare=n,this.isStatic=o,this.id=Ko++,this.default=t([]),this.extensions="function"==typeof i?i(this):i}get reader(){return this}static define(t={}){return new Jo(t.combine||(t=>t),t.compareInput||((t,e)=>t===e),t.compare||(t.combine?(t,e)=>t===e:ti),!!t.static,t.enables)}of(t){return new ei([],this,0,t)}compute(t,e){if(this.isStatic)throw new Error("Can't compute a static facet");return new ei(t,this,1,e)}computeN(t,e){if(this.isStatic)throw new Error("Can't compute a static facet");return new ei(t,this,2,e)}from(t,e){return e||(e=t=>t),this.compute([t],(n=>e(n.field(t))))}}function ti(t,e){return t==e||t.length==e.length&&t.every(((t,n)=>t===e[n]))}class ei{constructor(t,e,n,o){this.dependencies=t,this.facet=e,this.type=n,this.value=o,this.id=Ko++}dynamicSlot(t){var e;let n=this.value,o=this.facet.compareInput,i=this.id,r=t[i]>>1,s=2==this.type,a=!1,l=!1,c=[];for(let n of this.dependencies)"doc"==n?a=!0:"selection"==n?l=!0:0==(1&(null!==(e=t[n.id])&&void 0!==e?e:1))&&c.push(t[n.id]);return{create:t=>(t.values[r]=n(t),1),update(t,e){if(a&&e.docChanged||l&&(e.docChanged||e.selection)||oi(t,c)){let e=n(t);if(s?!ni(e,t.values[r],o):!o(e,t.values[r]))return t.values[r]=e,1}return 0},reconfigure:(t,e)=>{let a,l=e.config.address[i];if(null!=l){let i=yi(e,l);if(this.dependencies.every((n=>n instanceof Jo?e.facet(n)===t.facet(n):!(n instanceof si)||e.field(n,!1)==t.field(n,!1)))||(s?ni(a=n(t),i,o):o(a=n(t),i)))return t.values[r]=i,0}else a=n(t);return t.values[r]=a,1}}}}function ni(t,e,n){if(t.length!=e.length)return!1;for(let o=0;ot[e.id])),i=n.map((t=>t.type)),r=o.filter((t=>!(1&t))),s=t[e.id]>>1;function a(t){let n=[];for(let e=0;et===e),t);return t.provide&&(e.provides=t.provide(e)),e}create(t){let e=t.facet(ri).find((t=>t.field==this));return((null==e?void 0:e.create)||this.createF)(t)}slot(t){let e=t[this.id]>>1;return{create:t=>(t.values[e]=this.create(t),1),update:(t,n)=>{let o=t.values[e],i=this.updateF(o,n);return this.compareF(o,i)?0:(t.values[e]=i,1)},reconfigure:(t,n)=>null!=n.config.address[this.id]?(t.values[e]=n.field(this),0):(t.values[e]=this.create(t),1)}}init(t){return[this,ri.of({field:this,create:t})]}get extension(){return this}}const ai=4,li=3,ci=2,ui=1;function hi(t){return e=>new di(e,t)}const pi={highest:hi(0),high:hi(ui),default:hi(ci),low:hi(li),lowest:hi(ai)};class di{constructor(t,e){this.inner=t,this.prec=e}}class fi{of(t){return new gi(this,t)}reconfigure(t){return fi.reconfigure.of({compartment:this,extension:t})}get(t){return t.config.compartments.get(this)}}class gi{constructor(t,e){this.compartment=t,this.inner=e}}class mi{constructor(t,e,n,o,i,r){for(this.base=t,this.compartments=e,this.dynamicSlots=n,this.address=o,this.staticValues=i,this.facets=r,this.statusTemplate=[];this.statusTemplate.length>1]}static resolve(t,e,n){let o=[],i=Object.create(null),r=new Map;for(let n of function(t,e,n){let o=[[],[],[],[],[]],i=new Map;function r(t,s){let a=i.get(t);if(null!=a){if(a<=s)return;let e=o[a].indexOf(t);e>-1&&o[a].splice(e,1),t instanceof gi&&n.delete(t.compartment)}if(i.set(t,s),Array.isArray(t))for(let e of t)r(e,s);else if(t instanceof gi){if(n.has(t.compartment))throw new RangeError(`Duplicate use of compartment in extensions`);let o=e.get(t.compartment)||t.inner;n.set(t.compartment,o),r(o,s)}else if(t instanceof di)r(t.inner,t.prec);else if(t instanceof si)o[s].push(t),t.provides&&r(t.provides,s);else if(t instanceof ei)o[s].push(t),t.facet.extensions&&r(t.facet.extensions,ci);else{let e=t.extension;if(!e)throw new Error(`Unrecognized extension value in extension set (${t}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);r(e,s)}}return r(t,ci),o.reduce(((t,e)=>t.concat(e)))}(t,e,r))n instanceof si?o.push(n):(i[n.facet.id]||(i[n.facet.id]=[])).push(n);let s=Object.create(null),a=[],l=[];for(let t of o)s[t.id]=l.length<<1,l.push((e=>t.slot(e)));let c=null==n?void 0:n.config.facets;for(let t in i){let e=i[t],o=e[0].facet,r=c&&c[t]||[];if(e.every((t=>0==t.type)))if(s[o.id]=a.length<<1|1,ti(r,e))a.push(n.facet(o));else{let t=o.combine(e.map((t=>t.value)));a.push(n&&o.compare(t,n.facet(o))?n.facet(o):t)}else{for(let t of e)0==t.type?(s[t.id]=a.length<<1|1,a.push(t.value)):(s[t.id]=l.length<<1,l.push((e=>t.dynamicSlot(e))));s[o.id]=l.length<<1,l.push((t=>ii(t,o,e)))}}let u=l.map((t=>t(s)));return new mi(t,r,u,s,a,i)}}function vi(t,e){if(1&e)return 2;let n=e>>1,o=t.status[n];if(4==o)throw new Error("Cyclic dependency between fields and/or facets");if(2&o)return o;t.status[n]=4;let i=t.computeSlot(t,t.config.dynamicSlots[n]);return t.status[n]=2|i}function yi(t,e){return 1&e?t.config.staticValues[e>>1]:t.values[e>>1]}const _i=Jo.define(),Oi=Jo.define({combine:t=>t.some((t=>t)),static:!0}),bi=Jo.define({combine:t=>t.length?t[0]:void 0,static:!0}),wi=Jo.define(),xi=Jo.define(),Si=Jo.define(),ki=Jo.define({combine:t=>!!t.length&&t[0]});class Pi{constructor(t,e){this.type=t,this.value=e}static define(){return new Ci}}class Ci{of(t){return new Pi(this,t)}}class Ti{constructor(t){this.map=t}of(t){return new Ei(this,t)}}class Ei{constructor(t,e){this.type=t,this.value=e}map(t){let e=this.type.map(this.value,t);return void 0===e?void 0:e==this.value?this:new Ei(this.type,e)}is(t){return this.type==t}static define(t={}){return new Ti(t.map||(t=>t))}static mapEffects(t,e){if(!t.length)return t;let n=[];for(let o of t){let t=o.map(e);t&&n.push(t)}return n}}Ei.reconfigure=Ei.define(),Ei.appendConfig=Ei.define();class Qi{constructor(t,e,n,o,i,r){this.startState=t,this.changes=e,this.selection=n,this.effects=o,this.annotations=i,this.scrollIntoView=r,this._doc=null,this._state=null,n&&Ho(n,e.newLength),i.some((t=>t.type==Qi.time))||(this.annotations=i.concat(Qi.time.of(Date.now())))}static create(t,e,n,o,i,r){return new Qi(t,e,n,o,i,r)}get newDoc(){return this._doc||(this._doc=this.changes.apply(this.startState.doc))}get newSelection(){return this.selection||this.startState.selection.map(this.changes)}get state(){return this._state||this.startState.applyTransaction(this),this._state}annotation(t){for(let e of this.annotations)if(e.type==t)return e.value}get docChanged(){return!this.changes.empty}get reconfigured(){return this.startState.config!=this.state.config}isUserEvent(t){let e=this.annotation(Qi.userEvent);return!(!e||!(e==t||e.length>t.length&&e.slice(0,t.length)==t&&"."==e[t.length]))}}function Ai(t,e){let n=[];for(let o=0,i=0;;){let r,s;if(o=t[o]))r=t[o++],s=t[o++];else{if(!(i=0;i--){let r=n[i](t);r&&Object.keys(r).length&&(o=$i(o,ji(e,r,t.changes.newLength),!0))}return o==t?t:Qi.create(e,t.changes,t.selection,o.effects,o.annotations,o.scrollIntoView)}(n?function(t){let e=t.startState,n=!0;for(let o of e.facet(wi)){let e=o(t);if(!1===e){n=!1;break}Array.isArray(e)&&(n=!0===n?e:Ai(n,e))}if(!0!==n){let o,i;if(!1===n)i=t.changes.invertedDesc,o=Xo.empty(e.doc.length);else{let e=t.changes.filter(n);o=e.changes,i=e.filtered.mapDesc(e.changes).invertedDesc}t=Qi.create(e,o,t.selection&&t.selection.map(i),Ei.mapEffects(t.effects,i),t.annotations,t.scrollIntoView)}let o=e.facet(xi);for(let n=o.length-1;n>=0;n--){let i=o[n](t);t=i instanceof Qi?i:Array.isArray(i)&&1==i.length&&i[0]instanceof Qi?i[0]:Ri(e,Mi(i),!1)}return t}(i):i)}Qi.time=Pi.define(),Qi.userEvent=Pi.define(),Qi.addToHistory=Pi.define(),Qi.remote=Pi.define();const Zi=[];function Mi(t){return null==t?Zi:Array.isArray(t)?t:[t]}var Vi=function(t){return t[t["Word"]=0]="Word",t[t["Space"]=1]="Space",t[t["Other"]=2]="Other",t}(Vi||(Vi={}));const Di=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;let Ii;try{Ii=new RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch(t){}function Ni(t){return e=>{if(!/\S/.test(e))return Vi.Space;if(function(t){if(Ii)return Ii.test(t);for(let e=0;e"€"&&(n.toUpperCase()!=n.toLowerCase()||Di.test(n)))return!0}return!1}(e))return Vi.Word;for(let n=0;n-1)return Vi.Word;return Vi.Other}}class Wi{constructor(t,e,n,o,i,r){this.config=t,this.doc=e,this.selection=n,this.values=o,this.status=t.statusTemplate.slice(),this.computeSlot=i,r&&(r._state=this);for(let t=0;ti.set(e,t))),n=null),i.set(e.value.compartment,e.value.extension)):e.is(Ei.reconfigure)?(n=null,o=e.value):e.is(Ei.appendConfig)&&(n=null,o=Mi(o).concat(e.value));if(n)e=t.startState.values.slice();else{n=mi.resolve(o,i,this),e=new Wi(n,this.doc,this.selection,n.dynamicSlots.map((()=>null)),((t,e)=>e.reconfigure(t,this)),null).values}let r=t.startState.facet(Oi)?t.newSelection:t.newSelection.asSingle();new Wi(n,t.newDoc,r,e,((e,n)=>n.update(e,t)),t)}replaceSelection(t){return"string"==typeof t&&(t=this.toText(t)),this.changeByRange((e=>({changes:{from:e.from,to:e.to,insert:t},range:Go.cursor(e.from+t.length)})))}changeByRange(t){let e=this.selection,n=t(e.ranges[0]),o=this.changes(n.changes),i=[n.range],r=Mi(n.effects);for(let n=1;ni.spec.fromJSON(r,t))))}return Wi.create({doc:t.doc,selection:Go.fromJSON(t.selection),extensions:e.extensions?o.concat([e.extensions]):o})}static create(t={}){let e=mi.resolve(t.extensions||[],new Map),n=t.doc instanceof vo?t.doc:vo.of((t.doc||"").split(e.staticFacet(Wi.lineSeparator)||Io)),o=t.selection?t.selection instanceof Go?t.selection:Go.single(t.selection.anchor,t.selection.head):Go.single(0);return Ho(o,n.length),e.staticFacet(Oi)||(o=o.asSingle()),new Wi(e,n,o,e.dynamicSlots.map((()=>null)),((t,e)=>e.create(t)),null)}get tabSize(){return this.facet(Wi.tabSize)}get lineBreak(){return this.facet(Wi.lineSeparator)||"\n"}get readOnly(){return this.facet(ki)}phrase(t,...e){for(let e of this.facet(Wi.phrases))if(Object.prototype.hasOwnProperty.call(e,t)){t=e[t];break}return e.length&&(t=t.replace(/\$(\$|\d*)/g,((t,n)=>{if("$"==n)return"$";let o=+(n||1);return!o||o>e.length?t:e[o-1]}))),t}languageDataAt(t,e,n=-1){let o=[];for(let i of this.facet(_i))for(let r of i(this,e,n))Object.prototype.hasOwnProperty.call(r,t)&&o.push(r[t]);return o}charCategorizer(t){return Ni(this.languageDataAt("wordChars",t).join(""))}wordAt(t){let{text:e,from:n,length:o}=this.doc.lineAt(t),i=this.charCategorizer(t),r=t-n,s=t-n;for(;r>0;){let t=Ao(e,r,!1);if(i(e.slice(t,r))!=Vi.Word)break;r=t}for(;st.length?t[0]:4}),Wi.lineSeparator=bi,Wi.readOnly=ki,Wi.phrases=Jo.define({compare(t,e){let n=Object.keys(t),o=Object.keys(e);return n.length==o.length&&n.every((n=>t[n]==e[n]))}}),Wi.languageData=_i,Wi.changeFilter=wi,Wi.transactionFilter=xi,Wi.transactionExtender=Si,fi.reconfigure=Ei.define();class Li{eq(t){return this==t}range(t,e=t){return Yi.create(t,e,this)}}Li.prototype.startSide=Li.prototype.endSide=0,Li.prototype.point=!1,Li.prototype.mapMode=No.TrackDel;class Yi{constructor(t,e,n){this.from=t,this.to=e,this.value=n}static create(t,e,n){return new Yi(t,e,n)}}function zi(t,e){return t.from-e.from||t.value.startSide-e.value.startSide}class qi{constructor(t,e,n,o){this.from=t,this.to=e,this.value=n,this.maxPoint=o}get length(){return this.to[this.to.length-1]}findIndex(t,e,n,o=0){let i=n?this.to:this.from;for(let r=o,s=i.length;;){if(r==s)return r;let o=r+s>>1,a=i[o]-t||(n?this.value[o].endSide:this.value[o].startSide)-e;if(o==r)return a>=0?r:s;a>=0?s=o:r=o+1}}between(t,e,n,o){for(let i=this.findIndex(e,-1e9,!0),r=this.findIndex(n,1e9,!1,i);ic||l==c&&u.startSide>0&&u.endSide<=0)continue;(c-l||u.endSide-u.startSide)<0||(r<0&&(r=l),u.point&&(s=Math.max(s,c-l)),n.push(u),o.push(l-r),i.push(c-r))}return{mapped:n.length?new qi(o,i,n,s):null,pos:r}}}class Ui{constructor(t,e,n,o){this.chunkPos=t,this.chunk=e,this.nextLayer=n,this.maxPoint=o}static create(t,e,n,o){return new Ui(t,e,n,o)}get length(){let t=this.chunk.length-1;return t<0?0:Math.max(this.chunkEnd(t),this.nextLayer.length)}get size(){if(this.isEmpty)return 0;let t=this.nextLayer.size;for(let e of this.chunk)t+=e.value.length;return t}chunkEnd(t){return this.chunkPos[t]+this.chunk[t].length}update(t){let{add:e=[],sort:n=!1,filterFrom:o=0,filterTo:i=this.length}=t,r=t.filter;if(0==e.length&&!r)return this;if(n&&(e=e.slice().sort(zi)),this.isEmpty)return e.length?Ui.of(e):this;let s=new Gi(this,null,-1).goto(0),a=0,l=[],c=new Bi;for(;s.value||a=0){let t=e[a++];c.addInner(t.from,t.to,t.value)||l.push(t)}else 1==s.rangeIndex&&s.chunkIndexthis.chunkEnd(s.chunkIndex)||is.to||i=i&&t<=i+r.length&&!1===r.between(i,t-i,e-i,n))return}this.nextLayer.between(t,e,n)}}iter(t=0){return Hi.from([this]).goto(t)}get isEmpty(){return this.nextLayer==this}static iter(t,e=0){return Hi.from(t).goto(e)}static compare(t,e,n,o,i=-1){let r=t.filter((t=>t.maxPoint>0||!t.isEmpty&&t.maxPoint>=i)),s=e.filter((t=>t.maxPoint>0||!t.isEmpty&&t.maxPoint>=i)),a=Fi(r,s,n),l=new Ji(r,a,i),c=new Ji(s,a,i);n.iterGaps(((t,e,n)=>tr(l,t,c,e,n,o))),n.empty&&0==n.length&&tr(l,0,c,0,0,o)}static eq(t,e,n=0,o){null==o&&(o=1e9-1);let i=t.filter((t=>!t.isEmpty&&e.indexOf(t)<0)),r=e.filter((e=>!e.isEmpty&&t.indexOf(e)<0));if(i.length!=r.length)return!1;if(!i.length)return!0;let s=Fi(i,r),a=new Ji(i,s,0).goto(n),l=new Ji(r,s,0).goto(n);for(;;){if(a.to!=l.to||!er(a.active,l.active)||a.point&&(!l.point||!a.point.eq(l.point)))return!1;if(a.to>o)return!0;a.next(),l.next()}}static spans(t,e,n,o,i=-1){let r=new Ji(t,null,i).goto(e),s=e,a=r.openStart;for(;;){let t=Math.min(r.to,n);if(r.point){let n=r.activeForPoint(r.to),i=r.pointFroms&&(o.span(s,t,r.active,a),a=r.openEnd(t));if(r.to>n)return a+(r.point&&r.to>n?1:0);s=r.to,r.next()}}static of(t,e=!1){let n=new Bi;for(let o of t instanceof Yi?[t]:e?function(t){if(t.length>1)for(let e=t[0],n=1;n0)return t.slice().sort(zi);e=o}return t}(t):t)n.add(o.from,o.to,o.value);return n.finish()}}Ui.empty=new Ui([],[],null,-1),Ui.empty.nextLayer=Ui.empty;class Bi{finishChunk(t){this.chunks.push(new qi(this.from,this.to,this.value,this.maxPoint)),this.chunkPos.push(this.chunkStart),this.chunkStart=-1,this.setMaxPoint=Math.max(this.setMaxPoint,this.maxPoint),this.maxPoint=-1,t&&(this.from=[],this.to=[],this.value=[])}constructor(){this.chunks=[],this.chunkPos=[],this.chunkStart=-1,this.last=null,this.lastFrom=-1e9,this.lastTo=-1e9,this.from=[],this.to=[],this.value=[],this.maxPoint=-1,this.setMaxPoint=-1,this.nextLayer=null}add(t,e,n){this.addInner(t,e,n)||(this.nextLayer||(this.nextLayer=new Bi)).add(t,e,n)}addInner(t,e,n){let o=t-this.lastTo||n.startSide-this.last.endSide;if(o<=0&&(t-this.lastFrom||n.startSide-this.last.startSide)<0)throw new Error("Ranges must be added sorted by `from` position and `startSide`");return!(o<0)&&(250==this.from.length&&this.finishChunk(!0),this.chunkStart<0&&(this.chunkStart=t),this.from.push(t-this.chunkStart),this.to.push(e-this.chunkStart),this.last=n,this.lastFrom=t,this.lastTo=e,this.value.push(n),n.point&&(this.maxPoint=Math.max(this.maxPoint,e-t)),!0)}addChunk(t,e){if((t-this.lastTo||e.value[0].startSide-this.last.endSide)<0)return!1;this.from.length&&this.finishChunk(!0),this.setMaxPoint=Math.max(this.setMaxPoint,e.maxPoint),this.chunks.push(e),this.chunkPos.push(t);let n=e.value.length-1;return this.last=e.value[n],this.lastFrom=e.from[n]+t,this.lastTo=e.to[n]+t,!0}finish(){return this.finishInner(Ui.empty)}finishInner(t){if(this.from.length&&this.finishChunk(!1),0==this.chunks.length)return t;let e=Ui.create(this.chunkPos,this.chunks,this.nextLayer?this.nextLayer.finishInner(t):t,this.setMaxPoint);return this.from=null,e}}function Fi(t,e,n){let o=new Map;for(let e of t)for(let t=0;t=this.minPoint)break}}}setRangeIndex(t){if(t==this.layer.chunk[this.chunkIndex].value.length){if(this.chunkIndex++,this.skip)for(;this.chunkIndex=n&&o.push(new Gi(r,e,n,i));return 1==o.length?o[0]:new Hi(o)}get startSide(){return this.value?this.value.startSide:0}goto(t,e=-1e9){for(let n of this.heap)n.goto(t,e);for(let t=this.heap.length>>1;t>=0;t--)Ki(this.heap,t);return this.next(),this}forward(t,e){for(let n of this.heap)n.forward(t,e);for(let t=this.heap.length>>1;t>=0;t--)Ki(this.heap,t);(this.to-t||this.value.endSide-e)<0&&this.next()}next(){if(0==this.heap.length)this.from=this.to=1e9,this.value=null,this.rank=-1;else{let t=this.heap[0];this.from=t.from,this.to=t.to,this.value=t.value,this.rank=t.rank,t.value&&t.next(),Ki(this.heap,0)}}}function Ki(t,e){for(let n=t[e];;){let o=(e<<1)+1;if(o>=t.length)break;let i=t[o];if(o+1=0&&(i=t[o+1],o++),n.compare(i)<0)break;t[o]=n,t[e]=i,e=o}}class Ji{constructor(t,e,n){this.minPoint=n,this.active=[],this.activeTo=[],this.activeRank=[],this.minActive=-1,this.point=null,this.pointFrom=0,this.pointRank=0,this.to=-1e9,this.endSide=0,this.openStart=-1,this.cursor=Hi.from(t,e,n)}goto(t,e=-1e9){return this.cursor.goto(t,e),this.active.length=this.activeTo.length=this.activeRank.length=0,this.minActive=-1,this.to=t,this.endSide=e,this.openStart=-1,this.next(),this}forward(t,e){for(;this.minActive>-1&&(this.activeTo[this.minActive]-t||this.active[this.minActive].endSide-e)<0;)this.removeActive(this.minActive);this.cursor.forward(t,e)}removeActive(t){nr(this.active,t),nr(this.activeTo,t),nr(this.activeRank,t),this.minActive=ir(this.active,this.activeTo)}addActive(t){let e=0,{value:n,to:o,rank:i}=this.cursor;for(;e-1&&(this.activeTo[o]-this.cursor.from||this.active[o].endSide-this.cursor.startSide)<0){if(this.activeTo[o]>t){this.to=this.activeTo[o],this.endSide=this.active[o].endSide;break}this.removeActive(o),n&&nr(n,o)}else{if(!this.cursor.value){this.to=this.endSide=1e9;break}if(this.cursor.from>t){this.to=this.cursor.from,this.endSide=this.cursor.startSide;break}{let t=this.cursor.value;if(t.point){if(!(e&&this.cursor.to==this.to&&this.cursor.from=0&&n[e]=0&&!(this.activeRank[n]t||this.activeTo[n]==t&&this.active[n].endSide>=this.point.endSide)&&e.push(this.active[n]);return e.reverse()}openEnd(t){let e=0;for(let n=this.activeTo.length-1;n>=0&&this.activeTo[n]>t;n--)e++;return e}}function tr(t,e,n,o,i,r){t.goto(e),n.goto(o);let s=o+i,a=o,l=o-e;for(;;){let e=t.to+l-n.to||t.endSide-n.endSide,o=e<0?t.to+l:n.to,i=Math.min(o,s);if(t.point||n.point?t.point&&n.point&&(t.point==n.point||t.point.eq(n.point))&&er(t.activeForPoint(t.to),n.activeForPoint(n.to))||r.comparePoint(a,i,t.point,n.point):i>a&&!er(t.active,n.active)&&r.compareRange(a,i,t.active,n.active),o>s)break;a=o,e<=0&&t.next(),e>=0&&n.next()}}function er(t,e){if(t.length!=e.length)return!1;for(let n=0;n=e;n--)t[n+1]=t[n];t[e]=n}function ir(t,e){let n=-1,o=1e9;for(let i=0;i=e)return o;if(o==t.length)break;i+=9==t.charCodeAt(o)?n-i%n:1,o=Ao(t,o)}return!0===o?-1:t.length}function ar(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,o=new Array(e);n-1&&(this.modules.splice(s,1),o--,s=-1),-1==s){if(this.modules.splice(o++,0,r),e)for(var a=0;a",191:"?",192:"~",219:"{",220:"|",221:"}",222:"\""},xr="undefined"!=typeof navigator&&/Mac/.test(navigator.platform),Sr="undefined"!=typeof navigator&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),kr=0;kr<10;kr++)br[48+kr]=br[96+kr]=String(kr);for(kr=1;kr<=24;kr++)br[kr+111]="F"+kr;for(kr=65;kr<=90;kr++)br[kr]=String.fromCharCode(kr+32),wr[kr]=String.fromCharCode(kr);for(var Pr in br)wr.hasOwnProperty(Pr)||(wr[Pr]=br[Pr]);function Cr(t){let e;return e=11==t.nodeType?t.getSelection?t:t.ownerDocument:t,e.getSelection()}function Tr(t,e){return!!e&&(t==e||t.contains(1!=e.nodeType?e.parentNode:e))}function Er(t,e){if(!e.anchorNode)return!1;try{return Tr(t,e.anchorNode)}catch(t){return!1}}function Qr(t){return 3==t.nodeType?Xr(t,0,t.nodeValue.length).getClientRects():1==t.nodeType?t.getClientRects():[]}function Ar(t,e,n,o){return!!n&&(jr(t,e,n,o,-1)||jr(t,e,n,o,1))}function $r(t){for(var e=0;;e++)if(!(t=t.previousSibling))return e}function jr(t,e,n,o,i){for(;;){if(t==n&&e==o)return!0;if(e==(i<0?0:Rr(t))){if("DIV"==t.nodeName)return!1;let n=t.parentNode;if(!n||1!=n.nodeType)return!1;e=$r(t)+(i<0?0:1),t=n}else{if(1!=t.nodeType)return!1;if(1==(t=t.childNodes[e+(i<0?-1:0)]).nodeType&&"false"==t.contentEditable)return!1;e=i<0?Rr(t):0}}}function Rr(t){return 3==t.nodeType?t.nodeValue.length:t.childNodes.length}function Zr(t,e){let n=e?t.left:t.right;return{left:n,right:n,top:t.top,bottom:t.bottom}}function Mr(t){return{left:0,right:t.innerWidth,top:0,bottom:t.innerHeight}}function Vr(t,e){let n=e.width/t.offsetWidth,o=e.height/t.offsetHeight;return(n>.995&&n<1.005||!isFinite(n)||Math.abs(e.width-t.offsetWidth)<1)&&(n=1),(o>.995&&o<1.005||!isFinite(o)||Math.abs(e.height-t.offsetHeight)<1)&&(o=1),{scaleX:n,scaleY:o}}class Dr{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}eq(t){return this.anchorNode==t.anchorNode&&this.anchorOffset==t.anchorOffset&&this.focusNode==t.focusNode&&this.focusOffset==t.focusOffset}setRange(t){let{anchorNode:e,focusNode:n}=t;this.set(e,Math.min(t.anchorOffset,e?Rr(e):0),n,Math.min(t.focusOffset,n?Rr(n):0))}set(t,e,n,o){this.anchorNode=t,this.anchorOffset=e,this.focusNode=n,this.focusOffset=o}}let Ir,Nr=null;function Wr(t){if(t.setActive)return t.setActive();if(Nr)return t.focus(Nr);let e=[];for(let n=t;n&&(e.push(n,n.scrollTop,n.scrollLeft),n!=n.ownerDocument);n=n.parentNode);if(t.focus(null==Nr?{get preventScroll(){return Nr={preventScroll:!0},!0}}:void 0),!Nr){Nr=!1;for(let t=0;tMath.max(1,t.scrollHeight-t.clientHeight-4)}class qr{constructor(t,e,n=!0){this.node=t,this.offset=e,this.precise=n}static before(t,e){return new qr(t.parentNode,$r(t),e)}static after(t,e){return new qr(t.parentNode,$r(t)+1,e)}}const Ur=[];class Br{constructor(){this.parent=null,this.dom=null,this.flags=2}get overrideDOMText(){return null}get posAtStart(){return this.parent?this.parent.posBefore(this):0}get posAtEnd(){return this.posAtStart+this.length}posBefore(t){let e=this.posAtStart;for(let n of this.children){if(n==t)return e;e+=n.length+n.breakAfter}throw new RangeError("Invalid child in posBefore")}posAfter(t){return this.posBefore(t)+t.length}sync(t,e){if(2&this.flags){let n,o=this.dom,i=null;for(let r of this.children){if(7&r.flags){if(!r.dom&&(n=i?i.nextSibling:o.firstChild)){let t=Br.get(n);(!t||!t.parent&&t.canReuseDOM(r))&&r.reuseDOM(n)}r.sync(t,e),r.flags&=~7}if(n=i?i.nextSibling:o.firstChild,e&&!e.written&&e.node==o&&n!=r.dom&&(e.written=!0),r.dom.parentNode==o)for(;n&&n!=r.dom;)n=Fr(n);else o.insertBefore(r.dom,n);i=r.dom}for(n=i?i.nextSibling:o.firstChild,n&&e&&e.node==o&&(e.written=!0);n;)n=Fr(n)}else if(1&this.flags)for(let n of this.children)7&n.flags&&(n.sync(t,e),n.flags&=~7)}reuseDOM(t){}localPosFromDOM(t,e){let n;if(t==this.dom)n=this.dom.childNodes[e];else{let o=0==Rr(t)?0:0==e?-1:1;for(;;){let e=t.parentNode;if(e==this.dom)break;0==o&&e.firstChild!=e.lastChild&&(o=t==e.firstChild?-1:1),t=e}n=o<0?t:t.nextSibling}if(n==this.dom.firstChild)return 0;for(;n&&!Br.get(n);)n=n.nextSibling;if(!n)return this.length;for(let t=0,e=0;;t++){let o=this.children[t];if(o.dom==n)return e;e+=o.length+o.breakAfter}}domBoundsAround(t,e,n=0){let o=-1,i=-1,r=-1,s=-1;for(let a=0,l=n,c=n;ae)return n.domBoundsAround(t,e,l);if(u>=t&&-1==o&&(o=a,i=l),l>e&&n.dom.parentNode==this.dom){r=a,s=c;break}c=u,l=u+n.breakAfter}return{from:i,to:s<0?n+this.length:s,startDOM:(o?this.children[o-1].dom.nextSibling:null)||this.dom.firstChild,endDOM:r=0?this.children[r].dom:null}}markDirty(t=!1){this.flags|=2,this.markParentsDirty(t)}markParentsDirty(t){for(let e=this.parent;e;e=e.parent){if(t&&(e.flags|=2),1&e.flags)return;e.flags|=1,t=!1}}setParent(t){this.parent!=t&&(this.parent=t,7&this.flags&&this.markParentsDirty(!0))}setDOM(t){this.dom!=t&&(this.dom&&(this.dom.cmView=null),this.dom=t,t.cmView=this)}get rootView(){for(let t=this;;){let e=t.parent;if(!e)return t;t=e}}replaceChildren(t,e,n=Ur){this.markDirty();for(let o=t;othis.pos||t==this.pos&&(e>0||0==this.i||this.children[this.i-1].breakAfter))return this.off=t-this.pos,this;let n=this.children[--this.i];this.pos-=n.length+n.breakAfter}}}function Hr(t,e,n,o,i,r,s,a,l){let{children:c}=t,u=c.length?c[e]:null,h=r.length?r[r.length-1]:null,p=h?h.breakAfter:s;if(!(e==o&&u&&!s&&!p&&r.length<2&&u.merge(n,i,r.length?h:null,0==n,a,l))){if(o0&&(!s&&r.length&&u.merge(n,u.length,r[0],!1,a,0)?u.breakAfter=r.shift().breakAfter:(n2);var us={mac:cs||/Mac/.test(Jr.platform),windows:/Win/.test(Jr.platform),linux:/Linux|X11/.test(Jr.platform),ie:is,ie_version:ns?ts.documentMode||6:os?+os[1]:es?+es[1]:0,gecko:rs,gecko_version:rs?+(/Firefox\/(\d+)/.exec(Jr.userAgent)||[0,0])[1]:0,chrome:!!ss,chrome_version:ss?+ss[1]:0,ios:cs,android:/Android\b/.test(Jr.userAgent),webkit:as,safari:ls,webkit_version:as?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0,tabSize:null!=ts.documentElement.style.tabSize?"tab-size":"-moz-tab-size"};const hs=256;class ps extends Br{constructor(t){super(),this.text=t}get length(){return this.text.length}createDOM(t){this.setDOM(t||document.createTextNode(this.text))}sync(t,e){this.dom||this.createDOM(),this.dom.nodeValue!=this.text&&(e&&e.node==this.dom&&(e.written=!0),this.dom.nodeValue=this.text)}reuseDOM(t){3==t.nodeType&&this.createDOM(t)}merge(t,e,n){return!(8&this.flags||n&&(!(n instanceof ps)||this.length-(e-t)+n.length>hs||8&n.flags))&&(this.text=this.text.slice(0,t)+(n?n.text:"")+this.text.slice(e),this.markDirty(),!0)}split(t){let e=new ps(this.text.slice(t));return this.text=this.text.slice(0,t),this.markDirty(),e.flags|=8&this.flags,e}localPosFromDOM(t,e){return t==this.dom?e:e?this.text.length:0}domAtPos(t){return new qr(this.dom,t)}domBoundsAround(t,e,n){return{from:n,to:n+this.length,startDOM:this.dom,endDOM:this.dom.nextSibling}}coordsAt(t,e){return function(t,e,n){let o=t.nodeValue.length;e>o&&(e=o);let i=e,r=e,s=0;0==e&&n<0||e==o&&n>=0?us.chrome||us.gecko||(e?(i--,s=1):r=0)?0:a.length-1];us.safari&&!s&&0==l.width&&(l=Array.prototype.find.call(a,(t=>t.width))||l);return s?Zr(l,s<0):l||null}(this.dom,t,e)}}class ds extends Br{constructor(t,e=[],n=0){super(),this.mark=t,this.children=e,this.length=n;for(let t of e)t.setParent(this)}setAttrs(t){if(Yr(t),this.mark.class&&(t.className=this.mark.class),this.mark.attrs)for(let e in this.mark.attrs)t.setAttribute(e,this.mark.attrs[e]);return t}canReuseDOM(t){return super.canReuseDOM(t)&&!(8&(this.flags|t.flags))}reuseDOM(t){t.nodeName==this.mark.tagName.toUpperCase()&&(this.setDOM(t),this.flags|=4|2)}sync(t,e){this.dom?4&this.flags&&this.setAttrs(this.dom):this.setDOM(this.setAttrs(document.createElement(this.mark.tagName))),super.sync(t,e)}merge(t,e,n,o,i,r){return(!n||!(!(n instanceof ds&&n.mark.eq(this.mark))||t&&i<=0||et&&e.push(n=t&&(o=i),n=s,i++}let r=this.length-t;return this.length=t,o>-1&&(this.children.length=o,this.markDirty()),new ds(this.mark,e,r)}domAtPos(t){return ms(this,t)}coordsAt(t,e){return ys(this,t,e)}}class fs extends Br{static create(t,e,n){return new fs(t,e,n)}constructor(t,e,n){super(),this.widget=t,this.length=e,this.side=n,this.prevWidget=null}split(t){let e=fs.create(this.widget,this.length-t,this.side);return this.length-=t,e}sync(t){this.dom&&this.widget.updateDOM(this.dom,t)||(this.dom&&this.prevWidget&&this.prevWidget.destroy(this.dom),this.prevWidget=null,this.setDOM(this.widget.toDOM(t)),this.dom.contentEditable="false")}getSide(){return this.side}merge(t,e,n,o,i,r){return!(n&&(!(n instanceof fs&&this.widget.compare(n.widget))||t>0&&i<=0||e0)?qr.before(this.dom):qr.after(this.dom,t==this.length)}domBoundsAround(){return null}coordsAt(t,e){let n=this.widget.coordsAt(this.dom,t,e);if(n)return n;let o=this.dom.getClientRects(),i=null;if(!o.length)return null;let r=this.side?this.side<0:t>0;for(let e=r?o.length-1:0;i=o[e],!(t>0?0==e:e==o.length-1||i.top0?qr.before(this.dom):qr.after(this.dom)}localPosFromDOM(){return 0}domBoundsAround(){return null}coordsAt(t){return this.dom.getBoundingClientRect()}get overrideDOMText(){return vo.empty}get isHidden(){return!0}}function ms(t,e){let n=t.dom,{children:o}=t,i=0;for(let t=0;it&&e0;t--){let e=o[t-1];if(e.dom.parentNode==n)return e.domAtPos(e.length)}for(let t=i;t0&&e instanceof ds&&i.length&&(o=i[i.length-1])instanceof ds&&o.mark.eq(e.mark)?vs(o,e.children[0],n-1):(i.push(e),e.setParent(t)),t.length+=e.length}function ys(t,e,n){let o=null,i=-1,r=null,s=-1;!function t(e,a){for(let l=0,c=0;l=a&&(u.children.length?t(u,a-c):(!r||r.isHidden&&n>0)&&(h>a||c==h&&u.getSide()>0)?(r=u,s=a-c):(c-1?1:0)!=i.length-(n&&i.indexOf(n)>-1?1:0))return!1;for(let r of o)if(r!=n&&(-1==i.indexOf(r)||t[r]!==e[r]))return!1;return!0}function ws(t,e,n){let o=!1;if(e)for(let i in e)n&&i in n||(o=!0,"style"==i?t.style.cssText="":t.removeAttribute(i));if(n)for(let i in n)e&&e[i]==n[i]||(o=!0,"style"==i?t.style.cssText=n[i]:t.setAttribute(i,n[i]));return o}function xs(t){let e=Object.create(null);for(let n=0;n0&&0==this.children[n-1].length;)this.children[--n].destroy();return this.children.length=n,this.markDirty(),this.length=t,e}transferDOM(t){this.dom&&(this.markDirty(),t.setDOM(this.dom),t.prevAttrs=void 0===this.prevAttrs?this.attrs:this.prevAttrs,this.prevAttrs=void 0,this.dom=null)}setDeco(t){bs(this.attrs,t)||(this.dom&&(this.prevAttrs=this.attrs,this.markDirty()),this.attrs=t)}append(t,e){vs(this,t,e)}addLineDeco(t){let e=t.spec.attributes,n=t.spec.class;e&&(this.attrs=_s(e,this.attrs||{})),n&&(this.attrs=_s({class:n},this.attrs||{}))}domAtPos(t){return ms(this,t)}reuseDOM(t){"DIV"==t.nodeName&&(this.setDOM(t),this.flags|=4|2)}sync(t,e){var n;this.dom?4&this.flags&&(Yr(this.dom),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0):(this.setDOM(document.createElement("div")),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0),void 0!==this.prevAttrs&&(ws(this.dom,this.prevAttrs,this.attrs),this.dom.classList.add("cm-line"),this.prevAttrs=void 0),super.sync(t,e);let o=this.dom.lastChild;for(;o&&Br.get(o)instanceof ds;)o=o.lastChild;if(!(o&&this.length&&("BR"==o.nodeName||0!=(null===(n=Br.get(o))||void 0===n?void 0:n.isEditable)||us.ios&&this.children.some((t=>t instanceof ps))))){let t=document.createElement("BR");t.cmIgnore=!0,this.dom.appendChild(t)}}measureTextSize(){if(0==this.children.length||this.length>20)return null;let t,e=0;for(let n of this.children){if(!(n instanceof ps)||/[^ -~]/.test(n.text))return null;let o=Qr(n.dom);if(1!=o.length)return null;e+=o[0].width,t=o[0].height}return e?{lineHeight:this.dom.getBoundingClientRect().height,charWidth:e/this.length,textHeight:t}:null}coordsAt(t,e){let n=ys(this,t,e);if(!this.children.length&&n&&this.parent){let{heightOracle:t}=this.parent.view.viewState,e=n.bottom-n.top;if(Math.abs(e-t.lineHeight)<2&&t.textHeight=e){if(i instanceof Ss)return i;if(r>e)break}o=r+i.breakAfter}return null}}class ks extends Br{constructor(t,e,n){super(),this.widget=t,this.length=e,this.deco=n,this.breakAfter=0,this.prevWidget=null}merge(t,e,n,o,i,r){return!(n&&(!(n instanceof ks&&this.widget.compare(n.widget))||t>0&&i<=0||e0)}}class Ps{eq(t){return!1}updateDOM(t,e){return!1}compare(t){return this==t||this.constructor==t.constructor&&this.eq(t)}get estimatedHeight(){return-1}get lineBreaks(){return 0}ignoreEvent(t){return!0}coordsAt(t,e,n){return null}get isHidden(){return!1}destroy(t){}}var Cs=function(t){return t[t["Text"]=0]="Text",t[t["WidgetBefore"]=1]="WidgetBefore",t[t["WidgetAfter"]=2]="WidgetAfter",t[t["WidgetRange"]=3]="WidgetRange",t}(Cs||(Cs={}));class Ts extends Li{constructor(t,e,n,o){super(),this.startSide=t,this.endSide=e,this.widget=n,this.spec=o}get heightRelevant(){return!1}static mark(t){return new Es(t)}static widget(t){let e=Math.max(-1e4,Math.min(1e4,t.side||0)),n=!!t.block;return e+=n&&!t.inlineOrder?e>0?3e8:-4e8:e>0?1e8:-1e8,new As(t,e,e,n,t.widget||null,!1)}static replace(t){let e,n,o=!!t.block;if(t.isBlockGap)e=-5e8,n=4e8;else{let{start:i,end:r}=$s(t,o);e=(i?o?-3e8:-1:5e8)-1,n=(r?o?2e8:1:-6e8)+1}return new As(t,e,n,o,t.widget||null,!0)}static line(t){return new Qs(t)}static set(t,e=!1){return Ui.of(t,e)}hasHeight(){return!!this.widget&&this.widget.estimatedHeight>-1}}Ts.none=Ui.empty;class Es extends Ts{constructor(t){let{start:e,end:n}=$s(t);super(e?-1:5e8,n?1:-6e8,null,t),this.tagName=t.tagName||"span",this.class=t.class||"",this.attrs=t.attributes||null}eq(t){var e,n;return this==t||t instanceof Es&&this.tagName==t.tagName&&(this.class||(null===(e=this.attrs)||void 0===e?void 0:e.class))==(t.class||(null===(n=t.attrs)||void 0===n?void 0:n.class))&&bs(this.attrs,t.attrs,"class")}range(t,e=t){if(t>=e)throw new RangeError("Mark decorations may not be empty");return super.range(t,e)}}Es.prototype.point=!1;class Qs extends Ts{constructor(t){super(-2e8,-2e8,null,t)}eq(t){return t instanceof Qs&&this.spec.class==t.spec.class&&bs(this.spec.attributes,t.spec.attributes)}range(t,e=t){if(e!=t)throw new RangeError("Line decoration ranges must be zero-length");return super.range(t,e)}}Qs.prototype.mapMode=No.TrackBefore,Qs.prototype.point=!0;class As extends Ts{constructor(t,e,n,o,i,r){super(e,n,i,t),this.block=o,this.isReplace=r,this.mapMode=o?e<=0?No.TrackBefore:No.TrackAfter:No.TrackDel}get type(){return this.startSide!=this.endSide?Cs.WidgetRange:this.startSide<=0?Cs.WidgetBefore:Cs.WidgetAfter}get heightRelevant(){return this.block||!!this.widget&&(this.widget.estimatedHeight>=5||this.widget.lineBreaks>0)}eq(t){return t instanceof As&&function(t,e){return t==e||!!(t&&e&&t.compare(e))}(this.widget,t.widget)&&this.block==t.block&&this.startSide==t.startSide&&this.endSide==t.endSide}range(t,e=t){if(this.isReplace&&(t>e||t==e&&this.startSide>0&&this.endSide<=0))throw new RangeError("Invalid range for replacement decoration");if(!this.isReplace&&e!=t)throw new RangeError("Widget decorations can only have zero-length ranges");return super.range(t,e)}}function $s(t,e=!1){let{inclusiveStart:n,inclusiveEnd:o}=t;return null==n&&(n=t.inclusive),null==o&&(o=t.inclusive),{start:null!=n?n:e,end:null!=o?o:e}}function js(t,e,n,o=0){let i=n.length-1;i>=0&&n[i]+o>=t?n[i]=Math.max(n[i],e):n.push(t,e)}As.prototype.point=!0;class Rs{constructor(t,e,n,o){this.doc=t,this.pos=e,this.end=n,this.disallowBlockEffectsFor=o,this.content=[],this.curLine=null,this.breakAtStart=0,this.pendingBuffer=0,this.bufferMarks=[],this.atCursorPos=!0,this.openStart=-1,this.openEnd=-1,this.text="",this.textOff=0,this.cursor=t.iter(),this.skip=e}posCovered(){if(0==this.content.length)return!this.breakAtStart&&this.doc.lineAt(this.pos).from!=this.pos;let t=this.content[this.content.length-1];return!(t.breakAfter||t instanceof ks&&t.deco.endSide<0)}getLine(){return this.curLine||(this.content.push(this.curLine=new Ss),this.atCursorPos=!0),this.curLine}flushBuffer(t=this.bufferMarks){this.pendingBuffer&&(this.curLine.append(Zs(new gs(-1),t),t.length),this.pendingBuffer=0)}addBlockWidget(t){this.flushBuffer(),this.curLine=null,this.content.push(t)}finish(t){this.pendingBuffer&&t<=this.bufferMarks.length?this.flushBuffer():this.pendingBuffer=0,this.posCovered()||t&&this.content.length&&this.content[this.content.length-1]instanceof ks||this.getLine()}buildText(t,e,n){for(;t>0;){if(this.textOff==this.text.length){let{value:e,lineBreak:n,done:o}=this.cursor.next(this.skip);if(this.skip=0,o)throw new Error("Ran out of text content when drawing inline views");if(n){this.posCovered()||this.getLine(),this.content.length?this.content[this.content.length-1].breakAfter=1:this.breakAtStart=1,this.flushBuffer(),this.curLine=null,this.atCursorPos=!0,t--;continue}this.text=e,this.textOff=0}let o=Math.min(this.text.length-this.textOff,t,512);this.flushBuffer(e.slice(e.length-n)),this.getLine().append(Zs(new ps(this.text.slice(this.textOff,this.textOff+o)),e),n),this.atCursorPos=!0,this.textOff+=o,t-=o,n=0}}span(t,e,n,o){this.buildText(e-t,n,o),this.pos=e,this.openStart<0&&(this.openStart=o)}point(t,e,n,o,i,r){if(this.disallowBlockEffectsFor[r]&&n instanceof As){if(n.block)throw new RangeError("Block decorations may not be specified via plugins");if(e>this.doc.lineAt(this.pos).to)throw new RangeError("Decorations that replace line breaks may not be specified via plugins")}let s=e-t;if(n instanceof As)if(n.block)n.startSide>0&&!this.posCovered()&&this.getLine(),this.addBlockWidget(new ks(n.widget||new Ms("div"),s,n));else{let r=fs.create(n.widget||new Ms("span"),s,s?0:n.startSide),a=this.atCursorPos&&!r.isEditable&&i<=o.length&&(t0),l=!r.isEditable&&(to.length||n.startSide<=0),c=this.getLine();2!=this.pendingBuffer||a||r.isEditable||(this.pendingBuffer=0),this.flushBuffer(o),a&&(c.append(Zs(new gs(1),o),i),i=o.length+Math.max(0,i-o.length)),c.append(Zs(r,o),i),this.atCursorPos=l,this.pendingBuffer=l?to.length?1:2:0,this.pendingBuffer&&(this.bufferMarks=o.slice())}else this.doc.lineAt(this.pos).from==this.pos&&this.getLine().addLineDeco(n);s&&(this.textOff+s<=this.text.length?this.textOff+=s:(this.skip+=s-(this.text.length-this.textOff),this.text="",this.textOff=0),this.pos=e),this.openStart<0&&(this.openStart=i)}static build(t,e,n,o,i){let r=new Rs(t,e,n,i);return r.openEnd=Ui.spans(o,e,n,r),r.openStart<0&&(r.openStart=r.openEnd),r.finish(r.openEnd),r}}function Zs(t,e){for(let n of e)t=new ds(n,[t],t.length);return t}class Ms extends Ps{constructor(t){super(),this.tag=t}eq(t){return t.tag==this.tag}toDOM(){return document.createElement(this.tag)}updateDOM(t){return t.nodeName.toLowerCase()==this.tag}get isHidden(){return!0}}const Vs=Jo.define(),Ds=Jo.define(),Is=Jo.define(),Ns=Jo.define(),Ws=Jo.define(),Xs=Jo.define(),Ls=Jo.define(),Ys=Jo.define({combine:t=>t.some((t=>t))}),zs=Jo.define({combine:t=>t.some((t=>t))});class qs{constructor(t,e="nearest",n="nearest",o=5,i=5,r=!1){this.range=t,this.y=e,this.x=n,this.yMargin=o,this.xMargin=i,this.isSnapshot=r}map(t){return t.empty?this:new qs(this.range.map(t),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}clip(t){return this.range.to<=t.doc.length?this:new qs(Go.cursor(t.doc.length),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}}const Us=Ei.define({map:(t,e)=>t.map(e)});function Bs(t,e,n){let o=t.facet(Ns);o.length?o[0](e):window.onerror?window.onerror(String(e),n,void 0,void 0,e):n?console.error(n+":",e):console.error(e)}const Fs=Jo.define({combine:t=>!t.length||t[0]});let Gs=0;const Hs=Jo.define();class Ks{constructor(t,e,n,o,i){this.id=t,this.create=e,this.domEventHandlers=n,this.domEventObservers=o,this.extension=i(this)}static define(t,e){const{eventHandlers:n,eventObservers:o,provide:i,decorations:r}=e||{};return new Ks(Gs++,t,n,o,(t=>{let e=[Hs.of(t)];return r&&e.push(na.of((e=>{let n=e.plugin(t);return n?r(n):Ts.none}))),i&&e.push(i(t)),e}))}static fromClass(t,e){return Ks.define((e=>new t(e)),e)}}class Js{constructor(t){this.spec=t,this.mustUpdate=null,this.value=null}update(t){if(this.value){if(this.mustUpdate){let t=this.mustUpdate;if(this.mustUpdate=null,this.value.update)try{this.value.update(t)}catch(e){if(Bs(t.state,e,"CodeMirror plugin crashed"),this.value.destroy)try{this.value.destroy()}catch(t){}this.deactivate()}}}else if(this.spec)try{this.value=this.spec.create(t)}catch(e){Bs(t.state,e,"CodeMirror plugin crashed"),this.deactivate()}return this}destroy(t){var e;if(null===(e=this.value)||void 0===e?void 0:e.destroy)try{this.value.destroy()}catch(e){Bs(t.state,e,"CodeMirror plugin crashed")}}deactivate(){this.spec=this.value=null}}const ta=Jo.define(),ea=Jo.define(),na=Jo.define(),oa=Jo.define(),ia=Jo.define();function ra(t,e,n){let o=t.state.facet(ia);if(!o.length)return o;let i=o.map((e=>e instanceof Function?e(t):e)),r=[];return Ui.spans(i,e,n,{point(){},span(t,e,n,o){let i=r;for(let r=n.length-1;r>=0;r--,o--){let s,a=n[r].spec.bidiIsolate;if(null!=a)if(o>0&&i.length&&(s=i[i.length-1]).to==t&&s.direction==a)s.to=e,i=s.inner;else{let n={from:t,to:e,direction:a,inner:[]};i.push(n),i=n.inner}}}}),r}const sa=Jo.define();function aa(t){let e=0,n=0,o=0,i=0;for(let r of t.state.facet(sa)){let s=r(t);s&&(null!=s.left&&(e=Math.max(e,s.left)),null!=s.right&&(n=Math.max(n,s.right)),null!=s.top&&(o=Math.max(o,s.top)),null!=s.bottom&&(i=Math.max(i,s.bottom)))}return{left:e,right:n,top:o,bottom:i}}const la=Jo.define();class ca{constructor(t,e,n,o){this.fromA=t,this.toA=e,this.fromB=n,this.toB=o}join(t){return new ca(Math.min(this.fromA,t.fromA),Math.max(this.toA,t.toA),Math.min(this.fromB,t.fromB),Math.max(this.toB,t.toB))}addToSet(t){let e=t.length,n=this;for(;e>0;e--){let o=t[e-1];if(!(o.fromA>n.toA)){if(o.toAc)break;i+=2}if(!a)return n;new ca(a.fromA,a.toA,a.fromB,a.toB).addToSet(n),r=a.toA,s=a.toB}}}class ua{constructor(t,e,n){this.view=t,this.state=e,this.transactions=n,this.flags=0,this.startState=t.state,this.changes=Xo.empty(this.startState.doc.length);for(let t of n)this.changes=this.changes.compose(t.changes);let o=[];this.changes.iterChangedRanges(((t,e,n,i)=>o.push(new ca(t,e,n,i)))),this.changedRanges=o}static create(t,e,n){return new ua(t,e,n)}get viewportChanged(){return(4&this.flags)>0}get heightChanged(){return(2&this.flags)>0}get geometryChanged(){return this.docChanged||(this.flags&(8|2))>0}get focusChanged(){return(1&this.flags)>0}get docChanged(){return!this.changes.empty}get selectionSet(){return this.transactions.some((t=>t.selection))}get empty(){return 0==this.flags&&0==this.transactions.length}}var ha=function(t){return t[t["LTR"]=0]="LTR",t[t["RTL"]=1]="RTL",t}(ha||(ha={}));const pa=ha.LTR,da=ha.RTL;function fa(t){let e=[];for(let n=0;n=e){if(s.level==n)return r;(i<0||(0!=o?o<0?s.frome:t[i].level>s.level))&&(i=r)}}if(i<0)throw new RangeError("Index out of range");return i}}function ba(t,e){if(t.length!=e.length)return!1;for(let n=0;nl&&s.push(new Oa(l,f.from,p)),Sa(t,f.direction==pa!=!(p%2)?o+1:o,i,f.inner,f.from,f.to,s),l=f.to}d=f.to}else{if(d==n||(e?wa[d]!=a:wa[d]==a))break;d++}h?xa(t,l,d,o+1,i,h,s):le;){let n=!0,u=!1;if(!c||l>r[c-1].to){let t=wa[l-1];t!=a&&(n=!1,u=16==t)}let h=n||1!=a?null:[],p=n?o:o+1,d=l;t:for(;;)if(c&&d==r[c-1].to){if(u)break t;let f=r[--c];if(!n)for(let t=f.from,n=c;;){if(t==e)break t;if(!n||r[n-1].to!=t){if(wa[t-1]==a)break t;break}t=r[--n].from}if(h)h.push(f);else{f.to=0;t-=3)if(ya[t+1]==-n){let e=ya[t+2],n=2&e?i:4&e?1&e?r:i:0;n&&(wa[s]=wa[ya[t]]=n),a=t;break}}else{if(189==ya.length)break;ya[a++]=s,ya[a++]=e,ya[a++]=l}else if(2==(o=wa[s])||1==o){let t=o==i;l=t?0:1;for(let e=a-3;e>=0;e-=3){let n=ya[e+2];if(2&n)break;if(t)ya[e+2]|=2;else{if(4&n)break;ya[e+2]|=4}}}}}(t,i,r,o,a),function(t,e,n,o){for(let i=0,r=o;i<=n.length;i++){let s=i?n[i-1].to:t,a=il;)e==r&&(e=n[--o].from,r=o?n[o-1].to:t),wa[--e]=u;l=s}else r=s,l++}}}(i,r,o,a),xa(t,i,r,e,n,o,s)}function ka(t,e,n){if(!t)return[new Oa(0,0,e==da?1:0)];if(e==pa&&!n.length&&!_a.test(t))return Pa(t.length);if(n.length)for(;t.length>wa.length;)wa[wa.length]=256;let o=[],i=e==pa?0:1;return Sa(t,i,i,n,0,t.length,o),o}function Pa(t){return[new Oa(0,t,0)]}let Ca="";function Ta(t,e,n,o,i){var r;let s=o.head-t.from,a=-1;if(0==s){if(!i||!t.length)return null;e[0].level!=n&&(s=e[0].side(!1,n),a=0)}else if(s==t.length){if(i)return null;let t=e[e.length-1];t.level!=n&&(s=t.side(!0,n),a=e.length-1)}a<0&&(a=Oa.find(e,s,null!==(r=o.bidiLevel)&&void 0!==r?r:-1,o.assoc));let l=e[a];s==l.side(i,n)&&(l=e[a+=i?1:-1],s=l.side(!i,n));let c=i==(l.dir==n),u=Ao(t.text,s,c);if(Ca=t.text.slice(Math.min(s,u),Math.max(s,u)),u>l.from&&u0&&n.length&&(n.every((({fromA:t,toA:e})=>ethis.minWidthTo))?(this.minWidthFrom=t.changes.mapPos(this.minWidthFrom,1),this.minWidthTo=t.changes.mapPos(this.minWidthTo,1)):this.minWidth=this.minWidthFrom=this.minWidthTo=0);let o=-1;this.view.inputState.composing>=0&&((null===(e=this.domChanged)||void 0===e?void 0:e.newSel)?o=this.domChanged.newSel.head:function(t,e){let n=!1;e&&t.iterChangedRanges(((t,o)=>{te.from&&(n=!0)}));return n}(t.changes,this.hasComposition)||t.selectionSet||(o=t.state.selection.main.head));let i=o>-1?function(t,e,n){let o=Aa(t,n);if(!o)return null;let{node:i,from:r,to:s}=o,a=i.nodeValue;if(/[\n\r]/.test(a))return null;if(t.state.doc.sliceString(o.from,o.to)!=a)return null;let l=e.invertedDesc,c=new ca(l.mapPos(r),l.mapPos(s),r,s),u=[];for(let e=i.parentNode;;e=e.parentNode){let n=Br.get(e);if(n instanceof ds)u.push({node:e,deco:n.mark});else{if(n instanceof Ss||"DIV"==e.nodeName&&e.parentNode==t.contentDOM)return{range:c,text:i,marks:u,line:e};if(e==t.contentDOM)return null;u.push({node:e,deco:new Es({inclusive:!0,attributes:xs(e),tagName:e.tagName.toLowerCase()})})}}}(this.view,t.changes,o):null;if(this.domChanged=null,this.hasComposition){this.markedForComposition.clear();let{from:e,to:o}=this.hasComposition;n=new ca(e,o,t.changes.mapPos(e,-1),t.changes.mapPos(o,1)).addToSet(n.slice())}this.hasComposition=i?{from:i.range.fromB,to:i.range.toB}:null,(us.ie||us.chrome)&&!i&&t&&t.state.doc.lines!=t.startState.doc.lines&&(this.forceSelection=!0);let r=function(t,e,n){let o=new ja;return Ui.compare(t,e,n,o),o.changes}(this.decorations,this.updateDeco(),t.changes);return n=ca.extendWithRanges(n,r),!!(7&this.flags||0!=n.length)&&(this.updateInner(n,t.startState.doc.length,i),t.transactions.length&&(this.lastUpdate=Date.now()),!0)}updateInner(t,e,n){this.view.viewState.mustMeasureContent=!0,this.updateChildren(t,e,n);let{observer:o}=this.view;o.ignore((()=>{this.dom.style.height=this.view.viewState.contentHeight/this.view.scaleY+"px",this.dom.style.flexBasis=this.minWidth?this.minWidth+"px":"";let t=us.chrome||us.ios?{node:o.selectionRange.focusNode,written:!1}:void 0;this.sync(this.view,t),this.flags&=~7,t&&(t.written||o.selectionRange.focusNode!=t.node)&&(this.forceSelection=!0),this.dom.style.height=""})),this.markedForComposition.forEach((t=>t.flags&=~8));let i=[];if(this.view.viewport.from||this.view.viewport.to=0?o[t]:null;if(!e)break;let r,s,a,l,{fromA:c,toA:u,fromB:h,toB:p}=e;if(n&&n.range.fromBh){let t=Rs.build(this.view.state.doc,h,n.range.fromB,this.decorations,this.dynamicDecorationMap),e=Rs.build(this.view.state.doc,n.range.toB,p,this.decorations,this.dynamicDecorationMap);s=t.breakAtStart,a=t.openStart,l=e.openEnd;let o=this.compositionView(n);e.breakAtStart?o.breakAfter=1:e.content.length&&o.merge(o.length,o.length,e.content[0],!1,e.openStart,0)&&(o.breakAfter=e.content[0].breakAfter,e.content.shift()),t.content.length&&o.merge(0,0,t.content[t.content.length-1],!0,0,t.openEnd)&&t.content.pop(),r=t.content.concat(o).concat(e.content)}else({content:r,breakAtStart:s,openStart:a,openEnd:l}=Rs.build(this.view.state.doc,h,p,this.decorations,this.dynamicDecorationMap));let{i:d,off:f}=i.findPos(u,1),{i:g,off:m}=i.findPos(c,-1);Hr(this,g,m,d,f,r,s,a,l)}n&&this.fixCompositionDOM(n)}compositionView(t){let e=new ps(t.text.nodeValue);e.flags|=8;for(let{deco:n}of t.marks)e=new ds(n,[e],e.length);let n=new Ss;return n.append(e,0),n}fixCompositionDOM(t){let e=(t,e)=>{e.flags|=8|(e.children.some((t=>7&t.flags))?1:0),this.markedForComposition.add(e);let n=Br.get(t);n&&n!=e&&(n.dom=null),e.setDOM(t)},n=this.childPos(t.range.fromB,1),o=this.children[n.i];e(t.line,o);for(let i=t.marks.length-1;i>=-1;i--)n=o.childPos(n.off,1),o=o.children[n.i],e(i>=0?t.marks[i].node:t.text,o)}updateSelection(t=!1,e=!1){!t&&this.view.observer.selectionRange.focusNode||this.view.observer.readSelectionRange();let n=this.view.root.activeElement,o=n==this.dom,i=!o&&Er(this.dom,this.view.observer.selectionRange)&&!(n&&this.dom.contains(n));if(!(o||e||i))return;let r=this.forceSelection;this.forceSelection=!1;let s=this.view.state.selection.main,a=this.moveToLine(this.domAtPos(s.anchor)),l=s.empty?a:this.moveToLine(this.domAtPos(s.head));if(us.gecko&&s.empty&&!this.hasComposition&&(1==(c=a).node.nodeType&&c.node.firstChild&&(0==c.offset||"false"==c.node.childNodes[c.offset-1].contentEditable)&&(c.offset==c.node.childNodes.length||"false"==c.node.childNodes[c.offset].contentEditable))){let t=document.createTextNode("");this.view.observer.ignore((()=>a.node.insertBefore(t,a.node.childNodes[a.offset]||null))),a=l=new qr(t,0),r=!0}var c;let u=this.view.observer.selectionRange;!r&&u.focusNode&&Ar(a.node,a.offset,u.anchorNode,u.anchorOffset)&&Ar(l.node,l.offset,u.focusNode,u.focusOffset)||(this.view.observer.ignore((()=>{us.android&&us.chrome&&this.dom.contains(u.focusNode)&&function(t,e){for(let n=t;n&&n!=e;n=n.assignedSlot||n.parentNode)if(1==n.nodeType&&'false'==n.contentEditable)return!0;return!1}(u.focusNode,this.dom)&&(this.dom.blur(),this.dom.focus({preventScroll:!0}));let t=Cr(this.view.root);if(t)if(s.empty){if(us.gecko){let t=(e=a.node,o=a.offset,1!=e.nodeType?0:(o&&"false"==e.childNodes[o-1].contentEditable?1:0)|(os.head&&([a,l]=[l,a]),e.setEnd(l.node,l.offset),e.setStart(a.node,a.offset),t.removeAllRanges(),t.addRange(e)}else;var e,o;i&&this.view.root.activeElement==this.dom&&(this.dom.blur(),n&&n.focus())})),this.view.observer.setSelectionRange(a,l)),this.impreciseAnchor=a.precise?null:new qr(u.anchorNode,u.anchorOffset),this.impreciseHead=l.precise?null:new qr(u.focusNode,u.focusOffset)}enforceCursorAssoc(){if(this.hasComposition)return;let{view:t}=this,e=t.state.selection.main,n=Cr(t.root),{anchorNode:o,anchorOffset:i}=t.observer.selectionRange;if(!(n&&e.empty&&e.assoc&&n.modify))return;let r=Ss.find(this,e.head);if(!r)return;let s=r.posAtStart;if(e.head==s||e.head==s+r.length)return;let a=this.coordsAt(e.head,-1),l=this.coordsAt(e.head,1);if(!a||!l||a.bottom>l.top)return;let c=this.domAtPos(e.head+e.assoc);n.collapse(c.node,c.offset),n.modify("move",e.assoc<0?"forward":"backward","lineboundary"),t.observer.readSelectionRange();let u=t.observer.selectionRange;t.docView.posFromDOM(u.anchorNode,u.anchorOffset)!=e.from&&n.collapse(o,i)}moveToLine(t){let e,n=this.dom;if(t.node!=n)return t;for(let o=t.offset;!e&&o=0;o--){let t=Br.get(n.childNodes[o]);t instanceof Ss&&(e=t.domAtPos(t.length))}return e?new qr(e.node,e.offset,!0):t}nearest(t){for(let e=t;e;){let t=Br.get(e);if(t&&t.rootView==this)return t;e=e.parentNode}return null}posFromDOM(t,e){let n=this.nearest(t);if(!n)throw new RangeError("Trying to find position for a DOM position outside of the document");return n.localPosFromDOM(t,e)+n.posAtStart}domAtPos(t){let{i:e,off:n}=this.childCursor().findPos(t,-1);for(;e=0;r--){let s=this.children[r],a=i-s.breakAfter,l=a-s.length;if(at||s.covers(1))&&(!n||s instanceof Ss&&!(n instanceof Ss&&e>=0))&&(n=s,o=l),i=l}return n?n.coordsAt(t-o,e):null}coordsForChar(t){let{i:e,off:n}=this.childPos(t,1),o=this.children[e];if(!(o instanceof Ss))return null;for(;o.children.length;){let{i:t,off:e}=o.childPos(n,1);for(;;t++){if(t==o.children.length)return null;if((o=o.children[t]).length)break}n=e}if(!(o instanceof ps))return null;let i=Ao(o.text,n);if(i==n)return null;let r=Xr(o.dom,n,i).getClientRects();for(let t=0;tMath.max(this.view.scrollDOM.clientWidth,this.minWidth)+1,s=-1,a=this.view.textDirection==ha.LTR;for(let t=0,l=0;lo)break;if(t>=n){let n=c.dom.getBoundingClientRect();if(e.push(n.height),r){let e=c.dom.lastChild,o=e?Qr(e):[];if(o.length){let e=o[o.length-1],r=a?e.right-n.left:n.right-e.left;r>s&&(s=r,this.minWidth=i,this.minWidthFrom=t,this.minWidthTo=u)}}}t=u+c.breakAfter}return e}textDirectionAt(t){let{i:e}=this.childPos(t,1);return"rtl"==getComputedStyle(this.children[e].dom).direction?ha.RTL:ha.LTR}measureTextSize(){for(let t of this.children)if(t instanceof Ss){let e=t.measureTextSize();if(e)return e}let t,e,n,o=document.createElement("div");return o.className="cm-line",o.style.width="99999px",o.style.position="absolute",o.textContent="abc def ghi jkl mno pqr stu",this.view.observer.ignore((()=>{this.dom.appendChild(o);let i=Qr(o.firstChild)[0];t=o.getBoundingClientRect().height,e=i?i.width/27:7,n=i?i.height:t,o.remove()})),{lineHeight:t,charWidth:e,textHeight:n}}childCursor(t=this.length){let e=this.children.length;return e&&(t-=this.children[--e].length),new Gr(this.children,t,e)}computeBlockGapDeco(){let t=[],e=this.view.viewState;for(let n=0,o=0;;o++){let i=o==e.viewports.length?null:e.viewports[o],r=i?i.from-1:this.length;if(r>n){let o=(e.lineBlockAt(r).bottom-e.lineBlockAt(n).top)/this.view.scaleY;t.push(Ts.replace({widget:new Qa(o),block:!0,inclusive:!0,isBlockGap:!0}).range(n,r))}if(!i)break;n=i.to+1}return Ts.set(t)}updateDeco(){let t=this.view.state.facet(na).map(((t,e)=>(this.dynamicDecorationMap[e]="function"==typeof t)?t(this.view):t));for(let e=t.length;en.anchor?-1:1);if(!o)return;!n.empty&&(e=this.coordsAt(n.anchor,n.anchor>n.head?-1:1))&&(o={left:Math.min(o.left,e.left),top:Math.min(o.top,e.top),right:Math.max(o.right,e.right),bottom:Math.max(o.bottom,e.bottom)});let i=aa(this.view),r={left:o.left-i.left,top:o.top-i.top,right:o.right+i.right,bottom:o.bottom+i.bottom},{offsetWidth:s,offsetHeight:a}=this.view.scrollDOM;!function(t,e,n,o,i,r,s,a){let l=t.ownerDocument,c=l.defaultView||window;for(let u=t,h=!1;u&&!h;)if(1==u.nodeType){let t,p=u==l.body,d=1,f=1;if(p)t=Mr(c);else{if(/^(fixed|sticky)$/.test(getComputedStyle(u).position)&&(h=!0),u.scrollHeight<=u.clientHeight&&u.scrollWidth<=u.clientWidth){u=u.assignedSlot||u.parentNode;continue}let e=u.getBoundingClientRect();({scaleX:d,scaleY:f}=Vr(u,e)),t={left:e.left,right:e.left+u.clientWidth*d,top:e.top,bottom:e.top+u.clientHeight*f}}let g=0,m=0;if("nearest"==i)e.top0&&e.bottom>t.bottom+m&&(m=e.bottom-t.bottom+m+s)):e.bottom>t.bottom&&(m=e.bottom-t.bottom+s,n<0&&e.top-m0&&e.right>t.right+g&&(g=e.right-t.right+g+r)):e.right>t.right&&(g=e.right-t.right+r,n<0&&e.left0))break;n=n.childNodes[o-1],o=Rr(n)}if(n>=0)for(let o=t,i=e;;){if(3==o.nodeType)return{node:o,offset:i};if(!(1==o.nodeType&&i=0))break;o=o.childNodes[i],i=0}return null}let ja=class{constructor(){this.changes=[]}compareRange(t,e){js(t,e,this.changes)}comparePoint(t,e){js(t,e,this.changes)}};function Ra(t,e){return e.left>t?e.left-t:Math.max(0,t-e.right)}function Za(t,e){return e.top>t?e.top-t:Math.max(0,t-e.bottom)}function Ma(t,e){return t.tope.top+1}function Va(t,e){return et.bottom?{top:t.top,left:t.left,right:t.right,bottom:e}:t}function Ia(t,e,n){let o,i,r,s,a,l,c,u,h=!1;for(let p=t.firstChild;p;p=p.nextSibling){let t=Qr(p);for(let d=0;dm||s==m&&r>g){o=p,i=f,r=g,s=m;let a=m?n0?d0)}0==g?n>f.bottom&&(!c||c.bottomf.top)&&(l=p,u=f):c&&Ma(c,f)?c=Da(c,f.bottom):u&&Ma(u,f)&&(u=Va(u,f.top))}}if(c&&c.bottom>=n?(o=a,i=c):u&&u.top<=n&&(o=l,i=u),!o)return{node:t,offset:0};let p=Math.max(i.left,Math.min(i.right,e));return 3==o.nodeType?Na(o,p,n):h&&"false"!=o.contentEditable?Ia(o,p,n):{node:t,offset:Array.prototype.indexOf.call(t.childNodes,o)+(e>=(i.left+i.right)/2?1:0)}}function Na(t,e,n){let o=t.nodeValue.length,i=-1,r=1e9,s=0;for(let a=0;an?c.top-n:n-c.bottom)-1;if(c.left-1<=e&&c.right+1>=e&&u=(c.left+c.right)/2,o=n;if(us.chrome||us.gecko){Xr(t,a).getBoundingClientRect().left==c.right&&(o=!n)}if(u<=0)return{node:t,offset:a+(o?1:0)};i=a+(o?1:0),r=u}}}return{node:t,offset:i>-1?i:s>0?t.nodeValue.length:0}}function Wa(t,e,n,o=-1){var i,r;let s,a=t.contentDOM.getBoundingClientRect(),l=a.top+t.viewState.paddingTop,{docHeight:c}=t.viewState,{x:u,y:h}=e,p=h-l;if(p<0)return 0;if(p>c)return t.state.doc.length;for(let e=t.viewState.heightOracle.textHeight/2,i=!1;s=t.elementAtHeight(p),s.type!=Cs.Text;)for(;p=o>0?s.bottom+e:s.top-e,!(p>=0&&p<=c);){if(i)return n?null:0;i=!0,o=-o}h=l+p;let d=s.from;if(dt.viewport.to)return t.viewport.to==t.state.doc.length?t.state.doc.length:n?null:Xa(t,a,s,u,h);let f=t.dom.ownerDocument,g=t.root.elementFromPoint?t.root:f,m=g.elementFromPoint(u,h);m&&!t.contentDOM.contains(m)&&(m=null),m||(u=Math.max(a.left+1,Math.min(a.right-1,u)),m=g.elementFromPoint(u,h),m&&!t.contentDOM.contains(m)&&(m=null));let v,y=-1;if(m&&0!=(null===(i=t.docView.nearest(m))||void 0===i?void 0:i.isEditable))if(f.caretPositionFromPoint){let t=f.caretPositionFromPoint(u,h);t&&({offsetNode:v,offset:y}=t)}else if(f.caretRangeFromPoint){let e=f.caretRangeFromPoint(u,h);e&&(({startContainer:v,startOffset:y}=e),(!t.contentDOM.contains(v)||us.safari&&function(t,e,n){let o;if(3!=t.nodeType||e!=(o=t.nodeValue.length))return!1;for(let e=t.nextSibling;e;e=e.nextSibling)if(1!=e.nodeType||"BR"!=e.nodeName)return!1;return Xr(t,o-1,o).getBoundingClientRect().left>n}(v,y,u)||us.chrome&&function(t,e,n){if(0!=e)return!1;for(let e=t;;){let t=e.parentNode;if(!t||1!=t.nodeType||t.firstChild!=e)return!1;if(t.classList.contains("cm-line"))break;e=t}let o=1==t.nodeType?t.getBoundingClientRect():Xr(t,0,Math.max(t.nodeValue.length,1)).getBoundingClientRect();return n-o.left>5}(v,y,u))&&(v=void 0))}if(!v||!t.docView.dom.contains(v)){let e=Ss.find(t.docView,d);if(!e)return p>s.top+s.height/2?s.to:s.from;({node:v,offset:y}=Ia(e.dom,u,h))}let _=t.docView.nearest(v);if(!_)return null;if(_.isWidget&&1==(null===(r=_.dom)||void 0===r?void 0:r.nodeType)){let t=_.dom.getBoundingClientRect();return e.y1.5*t.defaultLineHeight){let e=t.viewState.heightOracle.textHeight;r+=Math.floor((i-n.top-.5*(t.defaultLineHeight-e))/e)*t.viewState.heightOracle.lineLength}let s=t.state.sliceDoc(n.from,n.to);return n.from+sr(s,r,t.state.tabSize)}function La(t,e){let n=t.lineBlockAt(e);if(Array.isArray(n.type))for(let t of n.type)if(t.to>e||t.to==e&&(t.to==n.to||t.type==Cs.Text))return t;return n}function Ya(t,e,n,o){let i=t.state.doc.lineAt(e.head),r=t.bidiSpans(i),s=t.textDirectionAt(i.from);for(let a=e,l=null;;){let e=Ta(i,r,s,a,n),c=Ca;if(!e){if(i.number==(n?t.state.doc.lines:1))return a;c="\n",i=t.state.doc.line(i.number+(n?1:-1)),r=t.bidiSpans(i),e=Go.cursor(n?i.from:i.to)}if(l){if(!l(c))return a}else{if(!o)return e;l=o(c)}a=e}}function za(t,e,n){for(;;){let o=0;for(let i of t)i.between(e-1,e+1,((t,i,r)=>{if(e>t&&ee(t))),n.from,e.head>n.from?-1:1);return o==n.from?n:Go.cursor(o,onull)),us.gecko&&function(t){bl.has(t)||(bl.add(t),t.addEventListener("copy",(()=>{})),t.addEventListener("cut",(()=>{})))}(t.contentDOM.ownerDocument)}handleEvent(t){(function(t,e){if(!e.bubbles)return!0;if(e.defaultPrevented)return!1;for(let n,o=e.target;o!=t.contentDOM;o=o.parentNode)if(!o||11==o.nodeType||(n=Br.get(o))&&n.ignoreEvent(e))return!1;return!0})(this.view,t)&&!this.ignoreDuringComposition(t)&&("keydown"==t.type&&this.keydown(t)||this.runHandlers(t.type,t))}runHandlers(t,e){let n=this.handlers[t];if(n){for(let t of n.observers)t(this.view,e);for(let t of n.handlers){if(e.defaultPrevented)break;if(t(this.view,e)){e.preventDefault();break}}}}ensureHandlers(t){let e=Fa(t),n=this.handlers,o=this.view.contentDOM;for(let t in e)if("scroll"!=t){let i=!e[t].handlers.length,r=n[t];r&&i!=!r.handlers.length&&(o.removeEventListener(t,this.handleEvent),r=null),r||o.addEventListener(t,this.handleEvent,{passive:i})}for(let t in n)"scroll"==t||e[t]||o.removeEventListener(t,this.handleEvent);this.handlers=e}keydown(t){if(this.lastKeyCode=t.keyCode,this.lastKeyTime=Date.now(),9==t.keyCode&&Date.now()e.keyCode==t.keyCode)))&&!t.ctrlKey||Ha.indexOf(t.key)>-1&&t.ctrlKey&&!t.shiftKey)?(229!=t.keyCode&&this.view.observer.forceFlush(),!1):(this.pendingIOSKey=e||t,setTimeout((()=>this.flushIOSKey()),250),!0)}flushIOSKey(){let t=this.pendingIOSKey;return!!t&&(this.pendingIOSKey=void 0,Lr(this.view.contentDOM,t.key,t.keyCode))}ignoreDuringComposition(t){return!!/^key/.test(t.type)&&(this.composing>0||!!(us.safari&&!us.ios&&this.compositionPendingKey&&Date.now()-this.compositionEndedAt<100)&&(this.compositionPendingKey=!1,!0))}startMouseSelection(t){this.mouseSelection&&this.mouseSelection.destroy(),this.mouseSelection=t}update(t){this.mouseSelection&&this.mouseSelection.update(t),this.draggedContent&&t.docChanged&&(this.draggedContent=this.draggedContent.map(t.changes)),t.transactions.length&&(this.lastKeyCode=this.lastSelectionTime=0)}destroy(){this.mouseSelection&&this.mouseSelection.destroy()}}function Ba(t,e){return(n,o)=>{try{return e.call(t,o,n)}catch(t){Bs(n.state,t)}}}function Fa(t){let e=Object.create(null);function n(t){return e[t]||(e[t]={observers:[],handlers:[]})}for(let e of t){let t=e.spec;if(t&&t.domEventHandlers)for(let o in t.domEventHandlers){let i=t.domEventHandlers[o];i&&n(o).handlers.push(Ba(e.value,i))}if(t&&t.domEventObservers)for(let o in t.domEventObservers){let i=t.domEventObservers[o];i&&n(o).observers.push(Ba(e.value,i))}}for(let t in nl)n(t).handlers.push(nl[t]);for(let t in ol)n(t).observers.push(ol[t]);return e}const Ga=[{key:"Backspace",keyCode:8,inputType:"deleteContentBackward"},{key:"Enter",keyCode:13,inputType:"insertParagraph"},{key:"Enter",keyCode:13,inputType:"insertLineBreak"},{key:"Delete",keyCode:46,inputType:"deleteContentForward"}],Ha="dthko",Ka=[16,17,18,20,91,92,224,225],Ja=6;function tl(t){return.7*Math.max(0,t)+8}class el{constructor(t,e,n,o){this.view=t,this.startEvent=e,this.style=n,this.mustSelect=o,this.scrollSpeed={x:0,y:0},this.scrolling=-1,this.lastEvent=e,this.scrollParent=function(t){let e=t.ownerDocument;for(let n=t.parentNode;n&&n!=e.body;)if(1==n.nodeType){if(n.scrollHeight>n.clientHeight||n.scrollWidth>n.clientWidth)return n;n=n.assignedSlot||n.parentNode}else{if(11!=n.nodeType)break;n=n.host}return null}(t.contentDOM),this.atoms=t.state.facet(oa).map((e=>e(t)));let i=t.contentDOM.ownerDocument;i.addEventListener("mousemove",this.move=this.move.bind(this)),i.addEventListener("mouseup",this.up=this.up.bind(this)),this.extend=e.shiftKey,this.multiple=t.state.facet(Wi.allowMultipleSelections)&&function(t,e){let n=t.state.facet(Vs);return n.length?n[0](e):us.mac?e.metaKey:e.ctrlKey}(t,e),this.dragging=!(!function(t,e){let{main:n}=t.state.selection;if(n.empty)return!1;let o=Cr(t.root);if(!o||0==o.rangeCount)return!0;let i=o.getRangeAt(0).getClientRects();for(let t=0;t=e.clientX&&n.top<=e.clientY&&n.bottom>=e.clientY)return!0}return!1}(t,e)||1!=gl(e))&&null}start(t){!1===this.dragging&&this.select(t)}move(t){var e;if(0==t.buttons)return this.destroy();if(this.dragging||null==this.dragging&&function(t,e){return Math.max(Math.abs(t.clientX-e.clientX),Math.abs(t.clientY-e.clientY))}(this.startEvent,t)<10)return;this.select(this.lastEvent=t);let n=0,o=0,i=(null===(e=this.scrollParent)||void 0===e?void 0:e.getBoundingClientRect())||{left:0,top:0,right:this.view.win.innerWidth,bottom:this.view.win.innerHeight},r=aa(this.view);t.clientX-r.left<=i.left+Ja?n=-tl(i.left-t.clientX):t.clientX+r.right>=i.right-Ja&&(n=tl(t.clientX-i.right)),t.clientY-r.top<=i.top+Ja?o=-tl(i.top-t.clientY):t.clientY+r.bottom>=i.bottom-Ja&&(o=tl(t.clientY-i.bottom)),this.setScrollSpeed(n,o)}up(t){null==this.dragging&&this.select(this.lastEvent),this.dragging||t.preventDefault(),this.destroy()}destroy(){this.setScrollSpeed(0,0);let t=this.view.contentDOM.ownerDocument;t.removeEventListener("mousemove",this.move),t.removeEventListener("mouseup",this.up),this.view.inputState.mouseSelection=this.view.inputState.draggedContent=null}setScrollSpeed(t,e){this.scrollSpeed={x:t,y:e},t||e?this.scrolling<0&&(this.scrolling=setInterval((()=>this.scroll()),50)):this.scrolling>-1&&(clearInterval(this.scrolling),this.scrolling=-1)}scroll(){this.scrollParent?(this.scrollParent.scrollLeft+=this.scrollSpeed.x,this.scrollParent.scrollTop+=this.scrollSpeed.y):this.view.win.scrollBy(this.scrollSpeed.x,this.scrollSpeed.y),!1===this.dragging&&this.select(this.lastEvent)}skipAtoms(t){let e=null;for(let n=0;nthis.select(this.lastEvent)),20)}}const nl=Object.create(null),ol=Object.create(null),il=us.ie&&us.ie_version<15||us.ios&&us.webkit_version<604;function rl(t,e){let n,{state:o}=t,i=1,r=o.toText(e),s=r.lines==o.selection.ranges.length;if(null!=vl&&o.selection.ranges.every((t=>t.empty))&&vl==r.toString()){let t=-1;n=o.changeByRange((n=>{let a=o.doc.lineAt(n.from);if(a.from==t)return{range:n};t=a.from;let l=o.toText((s?r.line(i++).text:e)+o.lineBreak);return{changes:{from:a.from,insert:l},range:Go.cursor(n.from+l.length)}}))}else n=s?o.changeByRange((t=>{let e=r.line(i++);return{changes:{from:t.from,to:t.to,insert:e.text},range:Go.cursor(t.from+e.length)}})):o.replaceSelection(r);t.dispatch(n,{userEvent:"input.paste",scrollIntoView:!0})}function sl(t,e,n,o){if(1==o)return Go.cursor(e,n);if(2==o)return function(t,e,n=1){let o=t.charCategorizer(e),i=t.doc.lineAt(e),r=e-i.from;if(0==i.length)return Go.cursor(e);0==r?n=1:r==i.length&&(n=-1);let s=r,a=r;n<0?s=Ao(i.text,r,!1):a=Ao(i.text,r);let l=o(i.text.slice(s,a));for(;s>0;){let t=Ao(i.text,s,!1);if(o(i.text.slice(t,s))!=l)break;s=t}for(;a{t.inputState.lastScrollTop=t.scrollDOM.scrollTop,t.inputState.lastScrollLeft=t.scrollDOM.scrollLeft},nl.keydown=(t,e)=>(t.inputState.setSelectionOrigin("select"),27==e.keyCode&&(t.inputState.lastEscPress=Date.now()),!1),ol.touchstart=(t,e)=>{t.inputState.lastTouchTime=Date.now(),t.inputState.setSelectionOrigin("select.pointer")},ol.touchmove=t=>{t.inputState.setSelectionOrigin("select.pointer")},nl.mousedown=(t,e)=>{if(t.observer.flush(),t.inputState.lastTouchTime>Date.now()-2e3)return!1;let n=null;for(let o of t.state.facet(Is))if(n=o(t,e),n)break;if(n||0!=e.button||(n=function(t,e){let n=ul(t,e),o=gl(e),i=t.state.selection;return{update(t){t.docChanged&&(n.pos=t.changes.mapPos(n.pos),i=i.map(t.changes))},get(e,r,s){let a,l=ul(t,e),c=sl(t,l.pos,l.bias,o);if(n.pos!=l.pos&&!r){let e=sl(t,n.pos,n.bias,o),i=Math.min(e.from,c.from),r=Math.max(e.to,c.to);c=i1&&(a=function(t,e){for(let n=0;n=e)return Go.create(t.ranges.slice(0,n).concat(t.ranges.slice(n+1)),t.mainIndex==n?0:t.mainIndex-(t.mainIndex>n?1:0))}return null}(i,l.pos))?a:s?i.addRange(c):Go.create([c])}}}(t,e)),n){let o=!t.hasFocus;t.inputState.startMouseSelection(new el(t,e,n,o)),o&&t.observer.ignore((()=>Wr(t.contentDOM)));let i=t.inputState.mouseSelection;if(i)return i.start(e),!1===i.dragging}return!1};let al=(t,e)=>t>=e.top&&t<=e.bottom,ll=(t,e,n)=>al(e,n)&&t>=n.left&&t<=n.right;function cl(t,e,n,o){let i=Ss.find(t.docView,e);if(!i)return 1;let r=e-i.posAtStart;if(0==r)return 1;if(r==i.length)return-1;let s=i.coordsAt(r,-1);if(s&&ll(n,o,s))return-1;let a=i.coordsAt(r,1);return a&&ll(n,o,a)?1:s&&al(o,s)?-1:1}function ul(t,e){let n=t.posAtCoords({x:e.clientX,y:e.clientY},!1);return{pos:n,bias:cl(t,n,e.clientX,e.clientY)}}const hl=us.ie&&us.ie_version<=11;let pl=null,dl=0,fl=0;function gl(t){if(!hl)return t.detail;let e=pl,n=fl;return pl=t,fl=Date.now(),dl=!e||n>Date.now()-400&&Math.abs(e.clientX-t.clientX)<2&&Math.abs(e.clientY-t.clientY)<2?(dl+1)%3:1}function ml(t,e,n,o){if(!n)return;let i=t.posAtCoords({x:e.clientX,y:e.clientY},!1),{draggedContent:r}=t.inputState,s=o&&r&&function(t,e){let n=t.state.facet(Ds);return n.length?n[0](e):us.mac?!e.altKey:!e.ctrlKey}(t,e)?{from:r.from,to:r.to}:null,a={from:i,insert:n},l=t.state.changes(s?[s,a]:a);t.focus(),t.dispatch({changes:l,selection:{anchor:l.mapPos(i,-1),head:l.mapPos(i,1)},userEvent:s?"move.drop":"input.drop"}),t.inputState.draggedContent=null}nl.dragstart=(t,e)=>{let{selection:{main:n}}=t.state;if(e.target.draggable){let o=t.docView.nearest(e.target);if(o&&o.isWidget){let t=o.posAtStart,e=t+o.length;(t>=n.to||e<=n.from)&&(n=Go.range(t,e))}}let{inputState:o}=t;return o.mouseSelection&&(o.mouseSelection.dragging=!0),o.draggedContent=n,e.dataTransfer&&(e.dataTransfer.setData("Text",t.state.sliceDoc(n.from,n.to)),e.dataTransfer.effectAllowed="copyMove"),!1},nl.dragend=t=>(t.inputState.draggedContent=null,!1),nl.drop=(t,e)=>{if(!e.dataTransfer)return!1;if(t.state.readOnly)return!0;let n=e.dataTransfer.files;if(n&&n.length){let o=Array(n.length),i=0,r=()=>{++i==n.length&&ml(t,e,o.filter((t=>null!=t)).join(t.state.lineBreak),!1)};for(let t=0;t{/[\x00-\x08\x0e-\x1f]{2}/.test(e.result)||(o[t]=e.result),r()},e.readAsText(n[t])}return!0}{let n=e.dataTransfer.getData("Text");if(n)return ml(t,e,n,!0),!0}return!1},nl.paste=(t,e)=>{if(t.state.readOnly)return!0;t.observer.flush();let n=il?null:e.clipboardData;return n?(rl(t,n.getData("text/plain")||n.getData("text/uri-text")),!0):(function(t){let e=t.dom.parentNode;if(!e)return;let n=e.appendChild(document.createElement("textarea"));n.style.cssText="position: fixed; left: -10000px; top: 10px",n.focus(),setTimeout((()=>{t.focus(),n.remove(),rl(t,n.value)}),50)}(t),!1)};let vl=null;nl.copy=nl.cut=(t,e)=>{let{text:n,ranges:o,linewise:i}=function(t){let e=[],n=[],o=!1;for(let o of t.selection.ranges)o.empty||(e.push(t.sliceDoc(o.from,o.to)),n.push(o));if(!e.length){let i=-1;for(let{from:o}of t.selection.ranges){let r=t.doc.lineAt(o);r.number>i&&(e.push(r.text),n.push({from:r.from,to:Math.min(t.doc.length,r.to+1)})),i=r.number}o=!0}return{text:e.join(t.lineBreak),ranges:n,linewise:o}}(t.state);if(!n&&!i)return!1;vl=i?n:null,"cut"!=e.type||t.state.readOnly||t.dispatch({changes:o,scrollIntoView:!0,userEvent:"delete.cut"});let r=il?null:e.clipboardData;return r?(r.clearData(),r.setData("text/plain",n),!0):(function(t,e){let n=t.dom.parentNode;if(!n)return;let o=n.appendChild(document.createElement("textarea"));o.style.cssText="position: fixed; left: -10000px; top: 10px",o.value=e,o.focus(),o.selectionEnd=e.length,o.selectionStart=0,setTimeout((()=>{o.remove(),t.focus()}),50)}(t,n),!1)};const yl=Pi.define();function _l(t,e){let n=[];for(let o of t.facet(Ls)){let i=o(t,e);i&&n.push(i)}return n?t.update({effects:n,annotations:yl.of(!0)}):null}function Ol(t){setTimeout((()=>{let e=t.hasFocus;if(e!=t.inputState.notifiedFocused){let n=_l(t.state,e);n?t.dispatch(n):t.update([])}}),10)}ol.focus=t=>{t.inputState.lastFocusTime=Date.now(),t.scrollDOM.scrollTop||!t.inputState.lastScrollTop&&!t.inputState.lastScrollLeft||(t.scrollDOM.scrollTop=t.inputState.lastScrollTop,t.scrollDOM.scrollLeft=t.inputState.lastScrollLeft),Ol(t)},ol.blur=t=>{t.observer.clearSelectionRange(),Ol(t)},ol.compositionstart=ol.compositionupdate=t=>{null==t.inputState.compositionFirstChange&&(t.inputState.compositionFirstChange=!0),t.inputState.composing<0&&(t.inputState.composing=0)},ol.compositionend=t=>{t.inputState.composing=-1,t.inputState.compositionEndedAt=Date.now(),t.inputState.compositionPendingKey=!0,t.inputState.compositionPendingChange=t.observer.pendingRecords().length>0,t.inputState.compositionFirstChange=null,us.chrome&&us.android?t.observer.flushSoon():t.inputState.compositionPendingChange?Promise.resolve().then((()=>t.observer.flush())):setTimeout((()=>{t.inputState.composing<0&&t.docView.hasComposition&&t.update([])}),50)},ol.contextmenu=t=>{t.inputState.lastContextMenu=Date.now()},nl.beforeinput=(t,e)=>{var n;let o;if(us.chrome&&us.android&&(o=Ga.find((t=>t.inputType==e.inputType)))&&(t.observer.delayAndroidKey(o.key,o.keyCode),"Backspace"==o.key||"Delete"==o.key)){let e=(null===(n=window.visualViewport)||void 0===n?void 0:n.height)||0;setTimeout((()=>{var n;((null===(n=window.visualViewport)||void 0===n?void 0:n.height)||0)>e+10&&t.hasFocus&&(t.contentDOM.blur(),t.focus())}),100)}return!1};const bl=new Set;const wl=["pre-wrap","normal","pre-line","break-spaces"];class xl{constructor(t){this.lineWrapping=t,this.doc=vo.empty,this.heightSamples={},this.lineHeight=14,this.charWidth=7,this.textHeight=14,this.lineLength=30,this.heightChanged=!1}heightForGap(t,e){let n=this.doc.lineAt(e).number-this.doc.lineAt(t).number+1;return this.lineWrapping&&(n+=Math.max(0,Math.ceil((e-t-n*this.lineLength*.5)/this.lineLength))),this.lineHeight*n}heightForLine(t){if(!this.lineWrapping)return this.lineHeight;return(1+Math.max(0,Math.ceil((t-this.lineLength)/(this.lineLength-5))))*this.lineHeight}setDoc(t){return this.doc=t,this}mustRefreshForWrapping(t){return wl.indexOf(t)>-1!=this.lineWrapping}mustRefreshForHeights(t){let e=!1;for(let n=0;n-1,a=Math.round(e)!=Math.round(this.lineHeight)||this.lineWrapping!=s;if(this.lineWrapping=s,this.lineHeight=e,this.charWidth=n,this.textHeight=o,this.lineLength=i,a){this.heightSamples={};for(let t=0;t0}set outdated(t){this.flags=(t?2:0)|~2&this.flags}setHeight(t,e){this.height!=e&&(Math.abs(this.height-e)>Cl&&(t.heightChanged=!0),this.height=e)}replace(t,e,n){return Tl.of(n)}decomposeLeft(t,e){e.push(this)}decomposeRight(t,e){e.push(this)}applyChanges(t,e,n,o){let i=this,r=n.doc;for(let s=o.length-1;s>=0;s--){let{fromA:a,toA:l,fromB:c,toB:u}=o[s],h=i.lineAt(a,Pl.ByPosNoHeight,n.setDoc(e),0,0),p=h.to>=l?h:i.lineAt(l,Pl.ByPosNoHeight,n,0,0);for(u+=p.to-l,l=p.to;s>0&&h.from<=o[s-1].toA;)a=o[s-1].fromA,c=o[s-1].fromB,s--,a2*i){let i=t[e-1];i.break?t.splice(--e,1,i.left,null,i.right):t.splice(--e,1,i.left,i.right),n+=1+i.break,o-=i.size}else{if(!(i>2*o))break;{let e=t[n];e.break?t.splice(n,1,e.left,null,e.right):t.splice(n,1,e.left,e.right),n+=2+e.break,i-=e.size}}else if(o=i&&r(this.blockAt(0,n,o,i))}updateHeight(t,e=0,n=!1,o){return o&&o.from<=e&&o.more&&this.setHeight(t,o.heights[o.index++]),this.outdated=!1,this}toString(){return`block(${this.length})`}}class Ql extends El{constructor(t,e){super(t,e,null),this.collapsed=0,this.widgetHeight=0,this.breaks=0}blockAt(t,e,n,o){return new kl(o,this.length,n,this.height,this.breaks)}replace(t,e,n){let o=n[0];return 1==n.length&&(o instanceof Ql||o instanceof Al&&4&o.flags)&&Math.abs(this.length-o.length)<10?(o instanceof Al?o=new Ql(o.length,this.height):o.height=this.height,this.outdated||(o.outdated=!1),o):Tl.of(n)}updateHeight(t,e=0,n=!1,o){return o&&o.from<=e&&o.more?this.setHeight(t,o.heights[o.index++]):(n||this.outdated)&&this.setHeight(t,Math.max(this.widgetHeight,t.heightForLine(this.length-this.collapsed))+this.breaks*t.lineHeight),this.outdated=!1,this}toString(){return`line(${this.length}${this.collapsed?-this.collapsed:""}${this.widgetHeight?":"+this.widgetHeight:""})`}}class Al extends Tl{constructor(t){super(t,0)}heightMetrics(t,e){let n,o=t.doc.lineAt(e).number,i=t.doc.lineAt(e+this.length).number,r=i-o+1,s=0;if(t.lineWrapping){let e=Math.min(this.height,t.lineHeight*r);n=e/r,this.length>r+1&&(s=(this.height-e)/(this.length-r-1))}else n=this.height/r;return{firstLine:o,lastLine:i,perLine:n,perChar:s}}blockAt(t,e,n,o){let{firstLine:i,lastLine:r,perLine:s,perChar:a}=this.heightMetrics(e,o);if(e.lineWrapping){let i=o+Math.round(Math.max(0,Math.min(1,(t-n)/this.height))*this.length),r=e.doc.lineAt(i),l=s+r.length*a,c=Math.max(n,t-l/2);return new kl(r.from,r.length,c,l,0)}{let o=Math.max(0,Math.min(r-i,Math.floor((t-n)/s))),{from:a,length:l}=e.doc.line(i+o);return new kl(a,l,n+s*o,s,0)}}lineAt(t,e,n,o,i){if(e==Pl.ByHeight)return this.blockAt(t,n,o,i);if(e==Pl.ByPosNoHeight){let{from:e,to:o}=n.doc.lineAt(t);return new kl(e,o-e,0,0,0)}let{firstLine:r,perLine:s,perChar:a}=this.heightMetrics(n,i),l=n.doc.lineAt(t),c=s+l.length*a,u=l.number-r,h=o+s*u+a*(l.from-i-u);return new kl(l.from,l.length,Math.max(o,Math.min(h,o+this.height-c)),c,0)}forEachLine(t,e,n,o,i,r){t=Math.max(t,i),e=Math.min(e,i+this.length);let{firstLine:s,perLine:a,perChar:l}=this.heightMetrics(n,i);for(let c=t,u=o;c<=e;){let e=n.doc.lineAt(c);if(c==t){let n=e.number-s;u+=a*n+l*(t-i-n)}let o=a+l*e.length;r(new kl(e.from,e.length,u,o,0)),u+=o,c=e.to+1}}replace(t,e,n){let o=this.length-e;if(o>0){let t=n[n.length-1];t instanceof Al?n[n.length-1]=new Al(t.length+o):n.push(null,new Al(o-1))}if(t>0){let e=n[0];e instanceof Al?n[0]=new Al(t+e.length):n.unshift(new Al(t-1),null)}return Tl.of(n)}decomposeLeft(t,e){e.push(new Al(t-1),null)}decomposeRight(t,e){e.push(null,new Al(this.length-t-1))}updateHeight(t,e=0,n=!1,o){let i=e+this.length;if(o&&o.from<=e+this.length&&o.more){let n=[],r=Math.max(e,o.from),s=-1;for(o.from>e&&n.push(new Al(o.from-e-1).updateHeight(t,e));r<=i&&o.more;){let e=t.doc.lineAt(r).length;n.length&&n.push(null);let i=o.heights[o.index++];-1==s?s=i:Math.abs(i-s)>=Cl&&(s=-2);let a=new Ql(e,i);a.outdated=!1,n.push(a),r+=e+1}r<=i&&n.push(null,new Al(i-r).updateHeight(t,r));let a=Tl.of(n);return(s<0||Math.abs(a.height-this.height)>=Cl||Math.abs(s-this.heightMetrics(t,e).perLine)>=Cl)&&(t.heightChanged=!0),a}return(n||this.outdated)&&(this.setHeight(t,t.heightForGap(e,e+this.length)),this.outdated=!1),this}toString(){return`gap(${this.length})`}}class $l extends Tl{constructor(t,e,n){super(t.length+e+n.length,t.height+n.height,e|(t.outdated||n.outdated?2:0)),this.left=t,this.right=n,this.size=t.size+n.size}get break(){return 1&this.flags}blockAt(t,e,n,o){let i=n+this.left.height;return ts))return l;let c=e==Pl.ByPosNoHeight?Pl.ByPosNoHeight:Pl.ByPos;return a?l.join(this.right.lineAt(s,c,n,r,s)):this.left.lineAt(s,c,n,o,i).join(l)}forEachLine(t,e,n,o,i,r){let s=o+this.left.height,a=i+this.left.length+this.break;if(this.break)t=a&&this.right.forEachLine(t,e,n,s,a,r);else{let l=this.lineAt(a,Pl.ByPos,n,o,i);t=t&&l.from<=e&&r(l),e>l.to&&this.right.forEachLine(l.to+1,e,n,s,a,r)}}replace(t,e,n){let o=this.left.length+this.break;if(ethis.left.length)return this.balanced(this.left,this.right.replace(t-o,e-o,n));let i=[];t>0&&this.decomposeLeft(t,i);let r=i.length;for(let t of n)i.push(t);if(t>0&&jl(i,r-1),e=n&&e.push(null)),t>n&&this.right.decomposeLeft(t-n,e)}decomposeRight(t,e){let n=this.left.length,o=n+this.break;if(t>=o)return this.right.decomposeRight(t-o,e);t2*e.size||e.size>2*t.size?Tl.of(this.break?[t,null,e]:[t,e]):(this.left=t,this.right=e,this.height=t.height+e.height,this.outdated=t.outdated||e.outdated,this.size=t.size+e.size,this.length=t.length+this.break+e.length,this)}updateHeight(t,e=0,n=!1,o){let{left:i,right:r}=this,s=e+i.length+this.break,a=null;return o&&o.from<=e+i.length&&o.more?a=i=i.updateHeight(t,e,n,o):i.updateHeight(t,e,n),o&&o.from<=s+r.length&&o.more?a=r=r.updateHeight(t,s,n,o):r.updateHeight(t,s,n),a?this.balanced(i,r):(this.height=this.left.height+this.right.height,this.outdated=!1,this)}toString(){return this.left+(this.break?" ":"-")+this.right}}function jl(t,e){let n,o;null==t[e]&&(n=t[e-1])instanceof Al&&(o=t[e+1])instanceof Al&&t.splice(e-1,3,new Al(n.length+1+o.length))}const Rl=5;class Zl{constructor(t,e){this.pos=t,this.oracle=e,this.nodes=[],this.lineStart=-1,this.lineEnd=-1,this.covering=null,this.writtenTo=t}get isCovered(){return this.covering&&this.nodes[this.nodes.length-1]==this.covering}span(t,e){if(this.lineStart>-1){let t=Math.min(e,this.lineEnd),n=this.nodes[this.nodes.length-1];n instanceof Ql?n.length+=t-this.pos:(t>this.pos||!this.isCovered)&&this.nodes.push(new Ql(t-this.pos,-1)),this.writtenTo=t,e>t&&(this.nodes.push(null),this.writtenTo++,this.lineStart=-1)}this.pos=e}point(t,e,n){if(t=Rl)&&this.addLineDeco(o,i,r)}else e>t&&this.span(t,e);this.lineEnd>-1&&this.lineEnd-1)return;let{from:t,to:e}=this.oracle.doc.lineAt(this.pos);this.lineStart=t,this.lineEnd=e,this.writtenTot&&this.nodes.push(new Ql(this.pos-t,-1)),this.writtenTo=this.pos}blankContent(t,e){let n=new Al(e-t);return this.oracle.doc.lineAt(t).to==e&&(n.flags|=4),n}ensureLine(){this.enterLine();let t=this.nodes.length?this.nodes[this.nodes.length-1]:null;if(t instanceof Ql)return t;let e=new Ql(0,-1);return this.nodes.push(e),e}addBlock(t){this.enterLine();let e=t.deco;e&&e.startSide>0&&!this.isCovered&&this.ensureLine(),this.nodes.push(t),this.writtenTo=this.pos=this.pos+t.length,e&&e.endSide>0&&(this.covering=t)}addLineDeco(t,e,n){let o=this.ensureLine();o.length+=n,o.collapsed+=n,o.widgetHeight=Math.max(o.widgetHeight,t),o.breaks+=e,this.writtenTo=this.pos=this.pos+n}finish(t){let e=0==this.nodes.length?null:this.nodes[this.nodes.length-1];!(this.lineStart>-1)||e instanceof Ql||this.isCovered?(this.writtenTon.clientHeight||n.scrollWidth>n.clientWidth)&&"visible"!=o.overflow){let o=n.getBoundingClientRect();r=Math.max(r,o.left),s=Math.min(s,o.right),a=Math.max(a,o.top),l=e==t.parentNode?o.bottom:Math.min(l,o.bottom)}e="absolute"==o.position||"fixed"==o.position?n.offsetParent:n.parentNode}else{if(11!=e.nodeType)break;e=e.host}return{left:r-n.left,right:Math.max(r,s)-n.left,top:a-(n.top+e),bottom:Math.max(a,l)-(n.top+e)}}function Dl(t,e){let n=t.getBoundingClientRect();return{left:0,right:n.right-n.left,top:e,bottom:n.bottom-(n.top+e)}}class Il{constructor(t,e,n){this.from=t,this.to=e,this.size=n}static same(t,e){if(t.length!=e.length)return!1;for(let n=0;n"function"!=typeof t&&"cm-lineWrapping"==t.class));this.heightOracle=new xl(e),this.stateDeco=t.facet(na).filter((t=>"function"!=typeof t)),this.heightMap=Tl.empty().applyChanges(this.stateDeco,vo.empty,this.heightOracle.setDoc(t.doc),[new ca(0,0,0,t.doc.length)]),this.viewport=this.getViewport(0,null),this.updateViewportLines(),this.updateForViewport(),this.lineGaps=this.ensureLineGaps([]),this.lineGapDeco=Ts.set(this.lineGaps.map((t=>t.draw(this,!1)))),this.computeVisibleRanges()}updateForViewport(){let t=[this.viewport],{main:e}=this.state.selection;for(let n=0;n<=1;n++){let o=n?e.head:e.anchor;if(!t.some((({from:t,to:e})=>o>=t&&o<=e))){let{from:e,to:n}=this.lineBlockAt(o);t.push(new Xl(e,n))}}this.viewports=t.sort(((t,e)=>t.from-e.from)),this.scaler=this.heightMap.height<=7e6?ql:new Ul(this.heightOracle,this.heightMap,this.viewports)}updateViewportLines(){this.viewportLines=[],this.heightMap.forEachLine(this.viewport.from,this.viewport.to,this.heightOracle.setDoc(this.state.doc),0,0,(t=>{this.viewportLines.push(1==this.scaler.scale?t:Bl(t,this.scaler))}))}update(t,e=null){this.state=t.state;let n=this.stateDeco;this.stateDeco=this.state.facet(na).filter((t=>"function"!=typeof t));let o=t.changedRanges,i=ca.extendWithRanges(o,function(t,e,n){let o=new Ml;return Ui.compare(t,e,n,o,0),o.changes}(n,this.stateDeco,t?t.changes:Xo.empty(this.state.doc.length))),r=this.heightMap.height,s=this.scrolledToBottom?null:this.scrollAnchorAt(this.scrollTop);this.heightMap=this.heightMap.applyChanges(this.stateDeco,t.startState.doc,this.heightOracle.setDoc(this.state.doc),i),this.heightMap.height!=r&&(t.flags|=2),s?(this.scrollAnchorPos=t.changes.mapPos(s.from,-1),this.scrollAnchorHeight=s.top):(this.scrollAnchorPos=-1,this.scrollAnchorHeight=this.heightMap.height);let a=i.length?this.mapViewport(this.viewport,t.changes):this.viewport;(e&&(e.range.heada.to)||!this.viewportIsAppropriate(a))&&(a=this.getViewport(0,e));let l=!t.changes.empty||2&t.flags||a.from!=this.viewport.from||a.to!=this.viewport.to;this.viewport=a,this.updateForViewport(),l&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>2e3<<1)&&this.updateLineGaps(this.ensureLineGaps(this.mapLineGaps(this.lineGaps,t.changes))),t.flags|=this.computeVisibleRanges(),e&&(this.scrollTarget=e),!this.mustEnforceCursorAssoc&&t.selectionSet&&t.view.lineWrapping&&t.state.selection.main.empty&&t.state.selection.main.assoc&&!t.state.facet(zs)&&(this.mustEnforceCursorAssoc=!0)}measure(t){let e=t.contentDOM,n=window.getComputedStyle(e),o=this.heightOracle,i=n.whiteSpace;this.defaultTextDirection="rtl"==n.direction?ha.RTL:ha.LTR;let r=this.heightOracle.mustRefreshForWrapping(i),s=e.getBoundingClientRect(),a=r||this.mustMeasureContent||this.contentDOMHeight!=s.height;this.contentDOMHeight=s.height,this.mustMeasureContent=!1;let l=0,c=0;if(s.width&&s.height){let{scaleX:t,scaleY:n}=Vr(e,s);this.scaleX==t&&this.scaleY==n||(this.scaleX=t,this.scaleY=n,l|=8,r=a=!0)}let u=(parseInt(n.paddingTop)||0)*this.scaleY,h=(parseInt(n.paddingBottom)||0)*this.scaleY;this.paddingTop==u&&this.paddingBottom==h||(this.paddingTop=u,this.paddingBottom=h,l|=8|2),this.editorWidth!=t.scrollDOM.clientWidth&&(o.lineWrapping&&(a=!0),this.editorWidth=t.scrollDOM.clientWidth,l|=8);let p=t.scrollDOM.scrollTop*this.scaleY;this.scrollTop!=p&&(this.scrollAnchorHeight=-1,this.scrollTop=p),this.scrolledToBottom=zr(t.scrollDOM);let d=(this.printing?Dl:Vl)(e,this.paddingTop),f=d.top-this.pixelViewport.top,g=d.bottom-this.pixelViewport.bottom;this.pixelViewport=d;let m=this.pixelViewport.bottom>this.pixelViewport.top&&this.pixelViewport.right>this.pixelViewport.left;if(m!=this.inView&&(this.inView=m,m&&(a=!0)),!this.inView&&!this.scrollTarget)return 0;let v=s.width;if(this.contentDOMWidth==v&&this.editorHeight==t.scrollDOM.clientHeight||(this.contentDOMWidth=s.width,this.editorHeight=t.scrollDOM.clientHeight,l|=8),a){let e=t.docView.measureVisibleLineHeights(this.viewport);if(o.mustRefreshForHeights(e)&&(r=!0),r||o.lineWrapping&&Math.abs(v-this.contentDOMWidth)>o.charWidth){let{lineHeight:n,charWidth:s,textHeight:a}=t.docView.measureTextSize();r=n>0&&o.refresh(i,n,s,a,v/s,e),r&&(t.docView.minWidth=0,l|=8)}f>0&&g>0?c=Math.max(f,g):f<0&&g<0&&(c=Math.min(f,g)),o.heightChanged=!1;for(let n of this.viewports){let i=n.from==this.viewport.from?e:t.docView.measureVisibleLineHeights(n);this.heightMap=(r?Tl.empty().applyChanges(this.stateDeco,vo.empty,this.heightOracle,[new ca(0,0,0,t.state.doc.length)]):this.heightMap).updateHeight(o,0,r,new Sl(n.from,i))}o.heightChanged&&(l|=2)}let y=!this.viewportIsAppropriate(this.viewport,c)||this.scrollTarget&&(this.scrollTarget.range.headthis.viewport.to);return y&&(this.viewport=this.getViewport(c,this.scrollTarget)),this.updateForViewport(),(2&l||y)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>2e3<<1)&&this.updateLineGaps(this.ensureLineGaps(r?[]:this.lineGaps,t)),l|=this.computeVisibleRanges(),this.mustEnforceCursorAssoc&&(this.mustEnforceCursorAssoc=!1,t.docView.enforceCursorAssoc()),l}get visibleTop(){return this.scaler.fromDOM(this.pixelViewport.top)}get visibleBottom(){return this.scaler.fromDOM(this.pixelViewport.bottom)}getViewport(t,e){let n=.5-Math.max(-.5,Math.min(.5,t/1e3/2)),o=this.heightMap,i=this.heightOracle,{visibleTop:r,visibleBottom:s}=this,a=new Xl(o.lineAt(r-1e3*n,Pl.ByHeight,i,0,0).from,o.lineAt(s+1e3*(1-n),Pl.ByHeight,i,0,0).to);if(e){let{head:t}=e.range;if(ta.to){let n,r=Math.min(this.editorHeight,this.pixelViewport.bottom-this.pixelViewport.top),s=o.lineAt(t,Pl.ByPos,i,0,0);n="center"==e.y?(s.top+s.bottom)/2-r/2:"start"==e.y||"nearest"==e.y&&t=s+Math.max(10,Math.min(n,250)))&&o>r-2*1e3&&i>1,r=o<<1;if(this.defaultTextDirection!=ha.LTR&&!n)return[];let s=[],a=(o,r,l,c)=>{if(r-oo&&tt.from>=l.from&&t.to<=l.to&&Math.abs(t.from-o)t.frome))));if(!p){if(rt.from<=r&&t.to>=r))){let t=e.moveToLineBoundary(Go.cursor(r),!1,!0).head;t>o&&(r=t)}p=new Il(o,r,this.gapSize(l,o,r,c))}s.push(p)};for(let t of this.viewportLines){if(t.lengtht.from&&a(t.from,i,t,e),st.draw(this,this.heightOracle.lineWrapping)))))}computeVisibleRanges(){let t=this.stateDeco;this.lineGaps.length&&(t=t.concat(this.lineGapDeco));let e=[];Ui.spans(t,this.viewport.from,this.viewport.to,{span(t,n){e.push({from:t,to:n})},point(){}},20);let n=e.length!=this.visibleRanges.length||this.visibleRanges.some(((t,n)=>t.from!=e[n].from||t.to!=e[n].to));return this.visibleRanges=e,n?4:0}lineBlockAt(t){return t>=this.viewport.from&&t<=this.viewport.to&&this.viewportLines.find((e=>e.from<=t&&e.to>=t))||Bl(this.heightMap.lineAt(t,Pl.ByPos,this.heightOracle,0,0),this.scaler)}lineBlockAtHeight(t){return Bl(this.heightMap.lineAt(this.scaler.fromDOM(t),Pl.ByHeight,this.heightOracle,0,0),this.scaler)}scrollAnchorAt(t){let e=this.lineBlockAtHeight(t+8);return e.from>=this.viewport.from||this.viewportLines[0].top-t>200?e:this.viewportLines[0]}elementAtHeight(t){return Bl(this.heightMap.blockAt(this.scaler.fromDOM(t),this.heightOracle,0,0),this.scaler)}get docHeight(){return this.scaler.toDOM(this.heightMap.height)}get contentHeight(){return this.docHeight+this.paddingTop+this.paddingBottom}}class Xl{constructor(t,e){this.from=t,this.to=e}}function Ll(t,e,n){let o=[],i=t,r=0;return Ui.spans(n,t,e,{span(){},point(t,e){t>i&&(o.push({from:i,to:t}),r+=t-i),i=e}},20),i=1)return e[e.length-1].to;let o=Math.floor(t*n);for(let t=0;;t++){let{from:n,to:i}=e[t],r=i-n;if(o<=r)return n+o;o-=r}}function zl(t,e){let n=0;for(let{from:o,to:i}of t.ranges){if(e<=i){n+=e-o;break}n+=i-o}return n/t.total}const ql={toDOM:t=>t,fromDOM:t=>t,scale:1};class Ul{constructor(t,e,n){let o=0,i=0,r=0;this.viewports=n.map((({from:n,to:i})=>{let r=e.lineAt(n,Pl.ByPos,t,0,0).top,s=e.lineAt(i,Pl.ByPos,t,0,0).bottom;return o+=s-r,{from:n,to:i,top:r,bottom:s,domTop:0,domBottom:0}})),this.scale=(7e6-o)/(e.height-o);for(let t of this.viewports)t.domTop=r+(t.top-i)*this.scale,r=t.domBottom=t.domTop+(t.bottom-t.top),i=t.bottom}toDOM(t){for(let e=0,n=0,o=0;;e++){let i=eBl(t,e))):t._content)}const Fl=Jo.define({combine:t=>t.join(" ")}),Gl=Jo.define({combine:t=>t.indexOf(!0)>-1}),Hl=yr.newName(),Kl=yr.newName(),Jl=yr.newName(),tc={"&light":"."+Kl,"&dark":"."+Jl};function ec(t,e,n){return new yr(e,{finish:e=>/&/.test(e)?e.replace(/&\w*/,(e=>{if("&"==e)return t;if(!n||!n[e])throw new RangeError(`Unsupported selector: ${e}`);return n[e]})):t+" "+e})}const nc=ec("."+Hl,{"&":{position:"relative !important",boxSizing:"border-box","&.cm-focused":{outline:"1px dotted #212121"},display:"flex !important",flexDirection:"column"},".cm-scroller":{display:"flex !important",alignItems:"flex-start !important",fontFamily:"monospace",lineHeight:1.4,height:"100%",overflowX:"auto",position:"relative",zIndex:0},".cm-content":{margin:0,flexGrow:2,flexShrink:0,display:"block",whiteSpace:"pre",wordWrap:"normal",boxSizing:"border-box",minHeight:"100%",padding:"4px 0",outline:"none","&[contenteditable=true]":{WebkitUserModify:"read-write-plaintext-only"}},".cm-lineWrapping":{whiteSpace_fallback:"pre-wrap",whiteSpace:"break-spaces",wordBreak:"break-word",overflowWrap:"anywhere",flexShrink:1},"&light .cm-content":{caretColor:"black"},"&dark .cm-content":{caretColor:"white"},".cm-line":{display:"block",padding:"0 2px 0 6px"},".cm-layer":{position:"absolute",left:0,top:0,contain:"size style","& > *":{position:"absolute"}},"&light .cm-selectionBackground":{background:"#d9d9d9"},"&dark .cm-selectionBackground":{background:"#222"},"&light.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#d7d4f0"},"&dark.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#233"},".cm-cursorLayer":{pointerEvents:"none"},"&.cm-focused > .cm-scroller > .cm-cursorLayer":{animation:"steps(1) cm-blink 1.2s infinite"},"@keyframes cm-blink":{"0%":{},"50%":{opacity:0},"100%":{}},"@keyframes cm-blink2":{"0%":{},"50%":{opacity:0},"100%":{}},".cm-cursor, .cm-dropCursor":{borderLeft:"1.2px solid black",marginLeft:"-0.6px",pointerEvents:"none"},".cm-cursor":{display:"none"},"&dark .cm-cursor":{borderLeftColor:"#444"},".cm-dropCursor":{position:"absolute"},"&.cm-focused > .cm-scroller > .cm-cursorLayer .cm-cursor":{display:"block"},".cm-announced":{position:"fixed",top:"-10000px"},"@media print":{".cm-announced":{display:"none"}},"&light .cm-activeLine":{backgroundColor:"#cceeff44"},"&dark .cm-activeLine":{backgroundColor:"#99eeff33"},"&light .cm-specialChar":{color:"red"},"&dark .cm-specialChar":{color:"#f78"},".cm-gutters":{flexShrink:0,display:"flex",height:"100%",boxSizing:"border-box",insetInlineStart:0,zIndex:200},"&light .cm-gutters":{backgroundColor:"#f5f5f5",color:"#6c6c6c",borderRight:"1px solid #ddd"},"&dark .cm-gutters":{backgroundColor:"#333338",color:"#ccc"},".cm-gutter":{display:"flex !important",flexDirection:"column",flexShrink:0,boxSizing:"border-box",minHeight:"100%",overflow:"hidden"},".cm-gutterElement":{boxSizing:"border-box"},".cm-lineNumbers .cm-gutterElement":{padding:"0 3px 0 5px",minWidth:"20px",textAlign:"right",whiteSpace:"nowrap"},"&light .cm-activeLineGutter":{backgroundColor:"#e2f2ff"},"&dark .cm-activeLineGutter":{backgroundColor:"#222227"},".cm-panels":{boxSizing:"border-box",position:"sticky",left:0,right:0},"&light .cm-panels":{backgroundColor:"#f5f5f5",color:"black"},"&light .cm-panels-top":{borderBottom:"1px solid #ddd"},"&light .cm-panels-bottom":{borderTop:"1px solid #ddd"},"&dark .cm-panels":{backgroundColor:"#333338",color:"white"},".cm-tab":{display:"inline-block",overflow:"hidden",verticalAlign:"bottom"},".cm-widgetBuffer":{verticalAlign:"text-top",height:"1em",width:0,display:"inline"},".cm-placeholder":{color:"#888",display:"inline-block",verticalAlign:"top"},".cm-highlightSpace:before":{content:"attr(data-display)",position:"absolute",pointerEvents:"none",color:"#888"},".cm-highlightTab":{backgroundImage:`url('data:image/svg+xml,')`,backgroundSize:"auto 100%",backgroundPosition:"right 90%",backgroundRepeat:"no-repeat"},".cm-trailingSpace":{backgroundColor:"#ff332255"},".cm-button":{verticalAlign:"middle",color:"inherit",fontSize:"70%",padding:".2em 1em",borderRadius:"1px"},"&light .cm-button":{backgroundImage:"linear-gradient(#eff1f5, #d9d9df)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#b4b4b4, #d0d3d6)"}},"&dark .cm-button":{backgroundImage:"linear-gradient(#393939, #111)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#111, #333)"}},".cm-textfield":{verticalAlign:"middle",color:"inherit",fontSize:"70%",border:"1px solid silver",padding:".2em .5em"},"&light .cm-textfield":{backgroundColor:"white"},"&dark .cm-textfield":{border:"1px solid #555",backgroundColor:"inherit"}},tc),oc="￿";class ic{constructor(t,e){this.points=t,this.text="",this.lineSeparator=e.facet(Wi.lineSeparator)}append(t){this.text+=t}lineBreak(){this.text+=oc}readRange(t,e){if(!t)return this;let n=t.parentNode;for(let o=t;;){this.findPointBefore(n,o);let t=this.text.length;this.readNode(o);let i=o.nextSibling;if(i==e)break;let r=Br.get(o),s=Br.get(i);(r&&s?r.breakAfter:(r?r.breakAfter:sc(o))||sc(i)&&("BR"!=o.nodeName||o.cmIgnore)&&this.text.length>t)&&this.lineBreak(),o=i}return this.findPointBefore(n,e),this}readTextNode(t){let e=t.nodeValue;for(let n of this.points)n.node==t&&(n.pos=this.text.length+Math.min(n.offset,e.length));for(let n=0,o=this.lineSeparator?null:/\r\n?|\n/g;;){let i,r=-1,s=1;if(this.lineSeparator?(r=e.indexOf(this.lineSeparator,n),s=this.lineSeparator.length):(i=o.exec(e))&&(r=i.index,s=i[0].length),this.append(e.slice(n,r<0?e.length:r)),r<0)break;if(this.lineBreak(),s>1)for(let e of this.points)e.node==t&&e.pos>this.text.length&&(e.pos-=s-1);n=r+s}}readNode(t){if(t.cmIgnore)return;let e=Br.get(t),n=e&&e.overrideDOMText;if(null!=n){this.findPointInside(t,n.length);for(let t=n.iter();!t.next().done;)t.lineBreak?this.lineBreak():this.append(t.value)}else 3==t.nodeType?this.readTextNode(t):"BR"==t.nodeName?t.nextSibling&&this.lineBreak():1==t.nodeType&&this.readRange(t.firstChild,null)}findPointBefore(t,e){for(let n of this.points)n.node==t&&t.childNodes[n.offset]==e&&(n.pos=this.text.length)}findPointInside(t,e){for(let n of this.points)(3==t.nodeType?n.node==t:t.contains(n.node))&&(n.pos=this.text.length+(rc(t,n.node,n.offset)?e:0))}}function rc(t,e,n){for(;;){if(!e||n-1)this.newSel=null;else if(e>-1&&(this.bounds=t.docView.domBoundsAround(e,n,0))){let e=i||r?[]:function(t){let e=[];if(t.root.activeElement!=t.contentDOM)return e;let{anchorNode:n,anchorOffset:o,focusNode:i,focusOffset:r}=t.observer.selectionRange;n&&(e.push(new ac(n,o)),i==n&&r==o||e.push(new ac(i,r)));return e}(t),n=new ic(e,t.state);n.readRange(this.bounds.startDOM,this.bounds.endDOM),this.text=n.text,this.newSel=function(t,e){if(0==t.length)return null;let n=t[0].pos,o=2==t.length?t[1].pos:n;return n>-1&&o>-1?Go.single(n+e,o+e):null}(e,this.bounds.from)}else{let e=t.observer.selectionRange,n=i&&i.node==e.focusNode&&i.offset==e.focusOffset||!Tr(t.contentDOM,e.focusNode)?t.state.selection.main.head:t.docView.posFromDOM(e.focusNode,e.focusOffset),o=r&&r.node==e.anchorNode&&r.offset==e.anchorOffset||!Tr(t.contentDOM,e.anchorNode)?t.state.selection.main.anchor:t.docView.posFromDOM(e.anchorNode,e.anchorOffset);this.newSel=Go.single(o,n)}}}function cc(t,e){let n,{newSel:o}=e,i=t.state.selection.main,r=t.inputState.lastKeyTime>Date.now()-100?t.inputState.lastKeyCode:-1;if(e.bounds){let{from:o,to:s}=e.bounds,a=i.from,l=null;(8===r||us.android&&e.text.length0&&a>0&&t.charCodeAt(s-1)==e.charCodeAt(a-1);)s--,a--;if("end"==o){n-=s+Math.max(0,r-Math.min(s,a))-r}if(s=s?r-n:0,a=r+(a-s),s=r}else if(a=a?r-n:0,s=r+(s-a),a=r}return{from:r,toA:s,toB:a}}(t.state.doc.sliceString(o,s,oc),e.text,a-o,l);c&&(us.chrome&&13==r&&c.toB==c.from+2&&e.text.slice(c.from,c.toB)==oc+oc&&c.toB--,n={from:o+c.from,to:o+c.toA,insert:vo.of(e.text.slice(c.from,c.toB).split(oc))})}else o&&(!t.hasFocus&&t.state.facet(Fs)||o.main.eq(i))&&(o=null);if(!n&&!o)return!1;if(!n&&e.typeOver&&!i.empty&&o&&o.main.empty?n={from:i.from,to:i.to,insert:t.state.doc.slice(i.from,i.to)}:n&&n.from>=i.from&&n.to<=i.to&&(n.from!=i.from||n.to!=i.to)&&i.to-i.from-(n.to-n.from)<=4?n={from:i.from,to:i.to,insert:t.state.doc.slice(i.from,n.from).append(n.insert).append(t.state.doc.slice(n.to,i.to))}:(us.mac||us.android)&&n&&n.from==n.to&&n.from==i.head-1&&/^\. ?$/.test(n.insert.toString())&&"off"==t.contentDOM.getAttribute("autocorrect")?(o&&2==n.insert.length&&(o=Go.single(o.main.anchor-1,o.main.head-1)),n={from:i.from,to:i.to,insert:vo.of([" "])}):us.chrome&&n&&n.from==n.to&&n.from==i.head&&"\n "==n.insert.toString()&&t.lineWrapping&&(o&&(o=Go.single(o.main.anchor-1,o.main.head-1)),n={from:i.from,to:i.to,insert:vo.of([" "])}),n){if(us.ios&&t.inputState.flushIOSKey())return!0;if(us.android&&(n.from==i.from&&n.to==i.to&&1==n.insert.length&&2==n.insert.lines&&Lr(t.contentDOM,"Enter",13)||(n.from==i.from-1&&n.to==i.to&&0==n.insert.length||8==r&&n.insert.lengthi.head)&&Lr(t.contentDOM,"Backspace",8)||n.from==i.from&&n.to==i.to+1&&0==n.insert.length&&Lr(t.contentDOM,"Delete",46)))return!0;let e,s=n.insert.toString();t.inputState.composing>=0&&t.inputState.composing++;let a=()=>e||(e=function(t,e,n){let o,i=t.state,r=i.selection.main;if(e.from>=r.from&&e.to<=r.to&&e.to-e.from>=(r.to-r.from)/3&&(!n||n.main.empty&&n.main.from==e.from+e.insert.length)&&t.inputState.composing<0){let n=r.frome.to?i.sliceDoc(e.to,r.to):"";o=i.replaceSelection(t.state.toText(n+e.insert.sliceString(0,void 0,t.state.lineBreak)+s))}else{let s=i.changes(e),a=n&&n.main.to<=s.newLength?n.main:void 0;if(i.selection.ranges.length>1&&t.inputState.composing>=0&&e.to<=r.to&&e.to>=r.to-10){let l,c=t.state.sliceDoc(e.from,e.to),u=n&&Aa(t,n.main.head);if(u){let t=e.insert.length-(e.to-e.from);l={from:u.from,to:u.to-t}}else l=t.state.doc.lineAt(r.head);let h=r.to-e.to,p=r.to-r.from;o=i.changeByRange((n=>{if(n.from==r.from&&n.to==r.to)return{changes:s,range:a||n.map(s)};let o=n.to-h,u=o-c.length;if(n.to-n.from!=p||t.state.sliceDoc(u,o)!=c||n.to>=l.from&&n.from<=l.to)return{range:n};let d=i.changes({from:u,to:o,insert:e.insert}),f=n.to-r.to;return{changes:d,range:a?Go.range(Math.max(0,a.anchor+f),Math.max(0,a.head+f)):n.map(d)}}))}else o={changes:s,selection:a&&i.selection.replaceRange(a)}}let s="input.type";(t.composing||t.inputState.compositionPendingChange&&t.inputState.compositionEndedAt>Date.now()-50)&&(t.inputState.compositionPendingChange=!1,s+=".compose",t.inputState.compositionFirstChange&&(s+=".start",t.inputState.compositionFirstChange=!1));return i.update(o,{userEvent:s,scrollIntoView:!0})}(t,n,o));return t.state.facet(Xs).some((e=>e(t,n.from,n.to,s,a)))||t.dispatch(a()),!0}if(o&&!o.main.eq(i)){let e=!1,n="select";return t.inputState.lastSelectionTime>Date.now()-50&&("select"==t.inputState.lastSelectionOrigin&&(e=!0),n=t.inputState.lastSelectionOrigin),t.dispatch({selection:o,scrollIntoView:e,userEvent:n}),!0}return!1}const uc={childList:!0,characterData:!0,subtree:!0,attributes:!0,characterDataOldValue:!0},hc=us.ie&&us.ie_version<=11;class pc{constructor(t){this.view=t,this.active=!1,this.selectionRange=new Dr,this.selectionChanged=!1,this.delayedFlush=-1,this.resizeTimeout=-1,this.queue=[],this.delayedAndroidKey=null,this.flushingAndroidKey=-1,this.lastChange=0,this.scrollTargets=[],this.intersection=null,this.resizeScroll=null,this.intersecting=!1,this.gapIntersection=null,this.gaps=[],this.parentCheck=-1,this.dom=t.contentDOM,this.observer=new MutationObserver((e=>{for(let t of e)this.queue.push(t);(us.ie&&us.ie_version<=11||us.ios&&t.composing)&&e.some((t=>"childList"==t.type&&t.removedNodes.length||"characterData"==t.type&&t.oldValue.length>t.target.nodeValue.length))?this.flushSoon():this.flush()})),hc&&(this.onCharData=t=>{this.queue.push({target:t.target,type:"characterData",oldValue:t.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this),this.onResize=this.onResize.bind(this),this.onPrint=this.onPrint.bind(this),this.onScroll=this.onScroll.bind(this),"function"==typeof ResizeObserver&&(this.resizeScroll=new ResizeObserver((()=>{var t;(null===(t=this.view.docView)||void 0===t?void 0:t.lastUpdate){this.parentCheck<0&&(this.parentCheck=setTimeout(this.listenForScroll.bind(this),1e3)),t.length>0&&t[t.length-1].intersectionRatio>0!=this.intersecting&&(this.intersecting=!this.intersecting,this.intersecting!=this.view.inView&&this.onScrollChanged(document.createEvent("Event")))}),{threshold:[0,.001]}),this.intersection.observe(this.dom),this.gapIntersection=new IntersectionObserver((t=>{t.length>0&&t[t.length-1].intersectionRatio>0&&this.onScrollChanged(document.createEvent("Event"))}),{})),this.listenForScroll(),this.readSelectionRange()}onScrollChanged(t){this.view.inputState.runHandlers("scroll",t),this.intersecting&&this.view.measure()}onScroll(t){this.intersecting&&this.flush(!1),this.onScrollChanged(t)}onResize(){this.resizeTimeout<0&&(this.resizeTimeout=setTimeout((()=>{this.resizeTimeout=-1,this.view.requestMeasure()}),50))}onPrint(){this.view.viewState.printing=!0,this.view.measure(),setTimeout((()=>{this.view.viewState.printing=!1,this.view.requestMeasure()}),500)}updateGaps(t){if(this.gapIntersection&&(t.length!=this.gaps.length||this.gaps.some(((e,n)=>e!=t[n])))){this.gapIntersection.disconnect();for(let e of t)this.gapIntersection.observe(e);this.gaps=t}}onSelectionChange(t){let e=this.selectionChanged;if(!this.readSelectionRange()||this.delayedAndroidKey)return;let{view:n}=this,o=this.selectionRange;if(n.state.facet(Fs)?n.root.activeElement!=this.dom:!Er(n.dom,o))return;let i=o.anchorNode&&n.docView.nearest(o.anchorNode);i&&i.ignoreEvent(t)?e||(this.selectionChanged=!1):(us.ie&&us.ie_version<=11||us.android&&us.chrome)&&!n.state.selection.main.empty&&o.focusNode&&Ar(o.focusNode,o.focusOffset,o.anchorNode,o.anchorOffset)?this.flushSoon():this.flush(!1)}readSelectionRange(){let{view:t}=this,e=us.safari&&11==t.root.nodeType&&function(t){let e=t.activeElement;for(;e&&e.shadowRoot;)e=e.shadowRoot.activeElement;return e}(this.dom.ownerDocument)==this.dom&&function(t){let e=null;function n(t){t.preventDefault(),t.stopImmediatePropagation(),e=t.getTargetRanges()[0]}if(t.contentDOM.addEventListener("beforeinput",n,!0),t.dom.ownerDocument.execCommand("indent"),t.contentDOM.removeEventListener("beforeinput",n,!0),!e)return null;let o=e.startContainer,i=e.startOffset,r=e.endContainer,s=e.endOffset,a=t.docView.domAtPos(t.state.selection.main.anchor);Ar(a.node,a.offset,r,s)&&([o,i,r,s]=[r,s,o,i]);return{anchorNode:o,anchorOffset:i,focusNode:r,focusOffset:s}}(this.view)||Cr(t.root);if(!e||this.selectionRange.eq(e))return!1;let n=Er(this.dom,e);return n&&!this.selectionChanged&&t.inputState.lastFocusTime>Date.now()-200&&t.inputState.lastTouchTime{let t=this.delayedAndroidKey;if(t){this.clearDelayedAndroidKey(),this.view.inputState.lastKeyCode=t.keyCode,this.view.inputState.lastKeyTime=Date.now(),!this.flush()&&t.force&&Lr(this.dom,t.key,t.keyCode)}};this.flushingAndroidKey=this.view.win.requestAnimationFrame(t)}this.delayedAndroidKey&&"Enter"!=t||(this.delayedAndroidKey={key:t,keyCode:e,force:this.lastChange{this.delayedFlush=-1,this.flush()})))}forceFlush(){this.delayedFlush>=0&&(this.view.win.cancelAnimationFrame(this.delayedFlush),this.delayedFlush=-1),this.flush()}pendingRecords(){for(let t of this.observer.takeRecords())this.queue.push(t);return this.queue}processRecords(){let t=this.pendingRecords();t.length&&(this.queue=[]);let e=-1,n=-1,o=!1;for(let i of t){let t=this.readMutation(i);t&&(t.typeOver&&(o=!0),-1==e?({from:e,to:n}=t):(e=Math.min(t.from,e),n=Math.max(t.to,n)))}return{from:e,to:n,typeOver:o}}readChange(){let{from:t,to:e,typeOver:n}=this.processRecords(),o=this.selectionChanged&&Er(this.dom,this.selectionRange);if(t<0&&!o)return null;t>-1&&(this.lastChange=Date.now()),this.view.inputState.lastFocusTime=0,this.selectionChanged=!1;let i=new lc(this.view,t,e,n);return this.view.docView.domChanged={newSel:i.newSel?i.newSel.main:null},i}flush(t=!0){if(this.delayedFlush>=0||this.delayedAndroidKey)return!1;t&&this.readSelectionRange();let e=this.readChange();if(!e)return this.view.requestMeasure(),!1;let n=this.view.state,o=cc(this.view,e);return this.view.state==n&&this.view.update([]),o}readMutation(t){let e=this.view.docView.nearest(t.target);if(!e||e.ignoreMutation(t))return null;if(e.markDirty("attributes"==t.type),"attributes"==t.type&&(e.flags|=4),"childList"==t.type){let n=dc(e,t.previousSibling||t.target.previousSibling,-1),o=dc(e,t.nextSibling||t.target.nextSibling,1);return{from:n?e.posAfter(n):e.posAtStart,to:o?e.posBefore(o):e.posAtEnd,typeOver:!1}}return"characterData"==t.type?{from:e.posAtStart,to:e.posAtEnd,typeOver:t.target.nodeValue==t.oldValue}:null}setWindow(t){t!=this.win&&(this.removeWindowListeners(this.win),this.win=t,this.addWindowListeners(this.win))}addWindowListeners(t){t.addEventListener("resize",this.onResize),t.addEventListener("beforeprint",this.onPrint),t.addEventListener("scroll",this.onScroll),t.document.addEventListener("selectionchange",this.onSelectionChange)}removeWindowListeners(t){t.removeEventListener("scroll",this.onScroll),t.removeEventListener("resize",this.onResize),t.removeEventListener("beforeprint",this.onPrint),t.document.removeEventListener("selectionchange",this.onSelectionChange)}destroy(){var t,e,n;this.stop(),null===(t=this.intersection)||void 0===t||t.disconnect(),null===(e=this.gapIntersection)||void 0===e||e.disconnect(),null===(n=this.resizeScroll)||void 0===n||n.disconnect();for(let t of this.scrollTargets)t.removeEventListener("scroll",this.onScroll);this.removeWindowListeners(this.win),clearTimeout(this.parentCheck),clearTimeout(this.resizeTimeout),this.win.cancelAnimationFrame(this.delayedFlush),this.win.cancelAnimationFrame(this.flushingAndroidKey)}}function dc(t,e,n){for(;e;){let o=Br.get(e);if(o&&o.parent==t)return o;let i=e.parentNode;e=i!=t.dom?i:n>0?e.nextSibling:e.previousSibling}return null}class fc{get state(){return this.viewState.state}get viewport(){return this.viewState.viewport}get visibleRanges(){return this.viewState.visibleRanges}get inView(){return this.viewState.inView}get composing(){return this.inputState.composing>0}get compositionStarted(){return this.inputState.composing>=0}get root(){return this._root}get win(){return this.dom.ownerDocument.defaultView||window}constructor(t={}){this.plugins=[],this.pluginMap=new Map,this.editorAttrs={},this.contentAttrs={},this.bidiCache=[],this.destroyed=!1,this.updateState=2,this.measureScheduled=-1,this.measureRequests=[],this.contentDOM=document.createElement("div"),this.scrollDOM=document.createElement("div"),this.scrollDOM.tabIndex=-1,this.scrollDOM.className="cm-scroller",this.scrollDOM.appendChild(this.contentDOM),this.announceDOM=document.createElement("div"),this.announceDOM.className="cm-announced",this.announceDOM.setAttribute("aria-live","polite"),this.dom=document.createElement("div"),this.dom.appendChild(this.announceDOM),this.dom.appendChild(this.scrollDOM),t.parent&&t.parent.appendChild(this.dom);let{dispatch:e}=t;this.dispatchTransactions=t.dispatchTransactions||e&&(t=>t.forEach((t=>e(t,this))))||(t=>this.update(t)),this.dispatch=this.dispatch.bind(this),this._root=t.root||function(t){for(;t;){if(t&&(9==t.nodeType||11==t.nodeType&&t.host))return t;t=t.assignedSlot||t.parentNode}return null}(t.parent)||document,this.viewState=new Wl(t.state||Wi.create(t)),t.scrollTo&&t.scrollTo.is(Us)&&(this.viewState.scrollTarget=t.scrollTo.value.clip(this.viewState.state)),this.plugins=this.state.facet(Hs).map((t=>new Js(t)));for(let t of this.plugins)t.update(this);this.observer=new pc(this),this.inputState=new Ua(this),this.inputState.ensureHandlers(this.plugins),this.docView=new Ea(this),this.mountStyles(),this.updateAttrs(),this.updateState=0,this.requestMeasure()}dispatch(...t){let e=1==t.length&&t[0]instanceof Qi?t:1==t.length&&Array.isArray(t[0])?t[0]:[this.state.update(...t)];this.dispatchTransactions(e,this)}update(t){if(0!=this.updateState)throw new Error("Calls to EditorView.update are not allowed while an update is in progress");let e,n=!1,o=!1,i=this.state;for(let e of t){if(e.startState!=i)throw new RangeError("Trying to update state with a transaction that doesn't start from the previous state.");i=e.state}if(this.destroyed)return void(this.viewState.state=i);let r=this.hasFocus,s=0,a=null;t.some((t=>t.annotation(yl)))?(this.inputState.notifiedFocused=r,s=1):r!=this.inputState.notifiedFocused&&(this.inputState.notifiedFocused=r,a=_l(i,r),a||(s=1));let l=this.observer.delayedAndroidKey,c=null;if(l?(this.observer.clearDelayedAndroidKey(),c=this.observer.readChange(),(c&&!this.state.doc.eq(i.doc)||!this.state.selection.eq(i.selection))&&(c=null)):this.observer.clear(),i.facet(Wi.phrases)!=this.state.facet(Wi.phrases))return this.setState(i);e=ua.create(this,i,t),e.flags|=s;let u=this.viewState.scrollTarget;try{this.updateState=2;for(let e of t){if(u&&(u=u.map(e.changes)),e.scrollIntoView){let{main:t}=e.state.selection;u=new qs(t.empty?t:Go.cursor(t.head,t.head>t.anchor?-1:1))}for(let t of e.effects)t.is(Us)&&(u=t.value.clip(this.state))}this.viewState.update(e,u),this.bidiCache=vc.update(this.bidiCache,e.changes),e.empty||(this.updatePlugins(e),this.inputState.update(e)),n=this.docView.update(e),this.state.facet(la)!=this.styleModules&&this.mountStyles(),o=this.updateAttrs(),this.showAnnouncements(t),this.docView.updateSelection(n,t.some((t=>t.isUserEvent("select.pointer"))))}finally{this.updateState=0}if(e.startState.facet(Fl)!=e.state.facet(Fl)&&(this.viewState.mustMeasureContent=!0),(n||o||u||this.viewState.mustEnforceCursorAssoc||this.viewState.mustMeasureContent)&&this.requestMeasure(),!e.empty)for(let t of this.state.facet(Ws))try{t(e)}catch(t){Bs(this.state,t,"update listener")}(a||c)&&Promise.resolve().then((()=>{a&&this.state==a.startState&&this.dispatch(a),c&&!cc(this,c)&&l.force&&Lr(this.contentDOM,l.key,l.keyCode)}))}setState(t){if(0!=this.updateState)throw new Error("Calls to EditorView.setState are not allowed while an update is in progress");if(this.destroyed)return void(this.viewState.state=t);this.updateState=2;let e=this.hasFocus;try{for(let t of this.plugins)t.destroy(this);this.viewState=new Wl(t),this.plugins=t.facet(Hs).map((t=>new Js(t))),this.pluginMap.clear();for(let t of this.plugins)t.update(this);this.docView.destroy(),this.docView=new Ea(this),this.inputState.ensureHandlers(this.plugins),this.mountStyles(),this.updateAttrs(),this.bidiCache=[]}finally{this.updateState=0}e&&this.focus(),this.requestMeasure()}updatePlugins(t){let e=t.startState.facet(Hs),n=t.state.facet(Hs);if(e!=n){let o=[];for(let i of n){let n=e.indexOf(i);if(n<0)o.push(new Js(i));else{let e=this.plugins[n];e.mustUpdate=t,o.push(e)}}for(let e of this.plugins)e.mustUpdate!=t&&e.destroy(this);this.plugins=o,this.pluginMap.clear()}else for(let e of this.plugins)e.mustUpdate=t;for(let t=0;t-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.observer.delayedAndroidKey)return this.measureScheduled=-1,void this.requestMeasure();this.measureScheduled=0,t&&this.observer.forceFlush();let e=null,n=this.scrollDOM,o=n.scrollTop*this.scaleY,{scrollAnchorPos:i,scrollAnchorHeight:r}=this.viewState;Math.abs(o-this.viewState.scrollTop)>1&&(r=-1),this.viewState.scrollAnchorHeight=-1;try{for(let t=0;;t++){if(r<0)if(zr(n))i=-1,r=this.viewState.heightMap.height;else{let t=this.viewState.scrollAnchorAt(o);i=t.from,r=t.top}this.updateState=1;let s=this.viewState.measure(this);if(!s&&!this.measureRequests.length&&null==this.viewState.scrollTarget)break;if(t>5){console.warn(this.measureRequests.length?"Measure loop restarted more than 5 times":"Viewport failed to stabilize");break}let a=[];4&s||([this.measureRequests,a]=[a,this.measureRequests]);let l=a.map((t=>{try{return t.read(this)}catch(t){return Bs(this.state,t),mc}})),c=ua.create(this,this.state,[]),u=!1;c.flags|=s,e?e.flags|=s:e=c,this.updateState=2,c.empty||(this.updatePlugins(c),this.inputState.update(c),this.updateAttrs(),u=this.docView.update(c));for(let t=0;t1||t<-1){o+=t,n.scrollTop=o/this.scaleY,r=-1;continue}}}break}}}finally{this.updateState=0,this.measureScheduled=-1}if(e&&!e.empty)for(let t of this.state.facet(Ws))t(e)}get themeClasses(){return Hl+" "+(this.state.facet(Gl)?Jl:Kl)+" "+this.state.facet(Fl)}updateAttrs(){let t=yc(this,ta,{class:"cm-editor"+(this.hasFocus?" cm-focused ":" ")+this.themeClasses}),e={spellcheck:"false",autocorrect:"off",autocapitalize:"off",translate:"no",contenteditable:this.state.facet(Fs)?"true":"false",class:"cm-content",style:`${us.tabSize}: ${this.state.tabSize}`,role:"textbox","aria-multiline":"true"};this.state.readOnly&&(e["aria-readonly"]="true"),yc(this,ea,e);let n=this.observer.ignore((()=>{let n=ws(this.contentDOM,this.contentAttrs,e),o=ws(this.dom,this.editorAttrs,t);return n||o}));return this.editorAttrs=t,this.contentAttrs=e,n}showAnnouncements(t){let e=!0;for(let n of t)for(let t of n.effects)if(t.is(fc.announce)){e&&(this.announceDOM.textContent=""),e=!1,this.announceDOM.appendChild(document.createElement("div")).textContent=t.value}}mountStyles(){this.styleModules=this.state.facet(la);let t=this.state.facet(fc.cspNonce);yr.mount(this.root,this.styleModules.concat(nc).reverse(),t?{nonce:t}:void 0)}readMeasured(){if(2==this.updateState)throw new Error("Reading the editor layout isn't allowed during an update");0==this.updateState&&this.measureScheduled>-1&&this.measure(!1)}requestMeasure(t){if(this.measureScheduled<0&&(this.measureScheduled=this.win.requestAnimationFrame((()=>this.measure()))),t){if(this.measureRequests.indexOf(t)>-1)return;if(null!=t.key)for(let e=0;ee.spec==t))||null),e&&e.update(this).value}get documentTop(){return this.contentDOM.getBoundingClientRect().top+this.viewState.paddingTop}get documentPadding(){return{top:this.viewState.paddingTop,bottom:this.viewState.paddingBottom}}get scaleX(){return this.viewState.scaleX}get scaleY(){return this.viewState.scaleY}elementAtHeight(t){return this.readMeasured(),this.viewState.elementAtHeight(t)}lineBlockAtHeight(t){return this.readMeasured(),this.viewState.lineBlockAtHeight(t)}get viewportLineBlocks(){return this.viewState.viewportLines}lineBlockAt(t){return this.viewState.lineBlockAt(t)}get contentHeight(){return this.viewState.contentHeight}moveByChar(t,e,n){return qa(this,t,Ya(this,t,e,n))}moveByGroup(t,e){return qa(this,t,Ya(this,t,e,(e=>function(t,e,n){let o=t.state.charCategorizer(e),i=o(n);return t=>{let e=o(t);return i==Vi.Space&&(i=e),i==e}}(this,t.head,e))))}moveToLineBoundary(t,e,n=!0){return function(t,e,n,o){let i=La(t,e.head),r=o&&i.type==Cs.Text&&(t.lineWrapping||i.widgetLineBreaks)?t.coordsAtPos(e.assoc<0&&e.head>i.from?e.head-1:e.head):null;if(r){let e=t.dom.getBoundingClientRect(),o=t.textDirectionAt(i.from),s=t.posAtCoords({x:n==(o==ha.LTR)?e.right-1:e.left+1,y:(r.top+r.bottom)/2});if(null!=s)return Go.cursor(s,n?-1:1)}return Go.cursor(n?i.to:i.from,n?-1:1)}(this,t,e,n)}moveVertically(t,e,n){return qa(this,t,function(t,e,n,o){let i=e.head,r=n?1:-1;if(i==(n?t.state.doc.length:0))return Go.cursor(i,e.assoc);let s,a=e.goalColumn,l=t.contentDOM.getBoundingClientRect(),c=t.coordsAtPos(i,e.assoc||-1),u=t.documentTop;if(c)null==a&&(a=c.left-l.left),s=r<0?c.top:c.bottom;else{let e=t.viewState.lineBlockAt(i);null==a&&(a=Math.min(l.right-l.left,t.defaultCharacterWidth*(i-e.from))),s=(r<0?e.top:e.bottom)+u}let h=l.left+a,p=null!=o?o:t.viewState.heightOracle.textHeight>>1;for(let e=0;;e+=10){let n=s+(p+e)*r,o=Wa(t,{x:h,y:n},!1,r);if(nl.bottom||(r<0?oi)){let e=t.docView.coordsForChar(o),i=!e||n0)}coordsForChar(t){return this.readMeasured(),this.docView.coordsForChar(t)}get defaultCharacterWidth(){return this.viewState.heightOracle.charWidth}get defaultLineHeight(){return this.viewState.heightOracle.lineHeight}get textDirection(){return this.viewState.defaultTextDirection}textDirectionAt(t){return!this.state.facet(Ys)||tthis.viewport.to?this.textDirection:(this.readMeasured(),this.docView.textDirectionAt(t))}get lineWrapping(){return this.viewState.heightOracle.lineWrapping}bidiSpans(t){if(t.length>gc)return Pa(t.length);let e,n=this.textDirectionAt(t.from);for(let o of this.bidiCache)if(o.from==t.from&&o.dir==n&&(o.fresh||ba(o.isolates,e=ra(this,t.from,t.to))))return o.order;e||(e=ra(this,t.from,t.to));let o=ka(t.text,n,e);return this.bidiCache.push(new vc(t.from,t.to,n,e,!0,o)),o}get hasFocus(){var t;return(this.dom.ownerDocument.hasFocus()||us.safari&&(null===(t=this.inputState)||void 0===t?void 0:t.lastContextMenu)>Date.now()-3e4)&&this.root.activeElement==this.contentDOM}focus(){this.observer.ignore((()=>{Wr(this.contentDOM),this.docView.updateSelection()}))}setRoot(t){this._root!=t&&(this._root=t,this.observer.setWindow((9==t.nodeType?t:t.ownerDocument).defaultView||window),this.mountStyles())}destroy(){for(let t of this.plugins)t.destroy(this);this.plugins=[],this.inputState.destroy(),this.docView.destroy(),this.dom.remove(),this.observer.destroy(),this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.destroyed=!0}static scrollIntoView(t,e={}){return Us.of(new qs("number"==typeof t?Go.cursor(t):t,e.y,e.x,e.yMargin,e.xMargin))}scrollSnapshot(){let{scrollTop:t,scrollLeft:e}=this.scrollDOM,n=this.viewState.scrollAnchorAt(t);return Us.of(new qs(Go.cursor(n.from),"start","start",n.top-t,e,!0))}static domEventHandlers(t){return Ks.define((()=>({})),{eventHandlers:t})}static domEventObservers(t){return Ks.define((()=>({})),{eventObservers:t})}static theme(t,e){let n=yr.newName(),o=[Fl.of(n),la.of(ec(`.${n}`,t))];return e&&e.dark&&o.push(Gl.of(!0)),o}static baseTheme(t){return pi.lowest(la.of(ec("."+Hl,t,tc)))}static findFromDOM(t){var e;let n=t.querySelector(".cm-content"),o=n&&Br.get(n)||Br.get(t);return(null===(e=null==o?void 0:o.rootView)||void 0===e?void 0:e.view)||null}}fc.styleModule=la,fc.inputHandler=Xs,fc.focusChangeEffect=Ls,fc.perLineTextDirection=Ys,fc.exceptionSink=Ns,fc.updateListener=Ws,fc.editable=Fs,fc.mouseSelectionStyle=Is,fc.dragMovesSelection=Ds,fc.clickAddsSelectionRange=Vs,fc.decorations=na,fc.atomicRanges=oa,fc.bidiIsolatedRanges=ia,fc.scrollMargins=sa,fc.darkTheme=Gl,fc.cspNonce=Jo.define({combine:t=>t.length?t[0]:""}),fc.contentAttributes=ea,fc.editorAttributes=ta,fc.lineWrapping=fc.contentAttributes.of({class:"cm-lineWrapping"}),fc.announce=Ei.define();const gc=4096,mc={};class vc{constructor(t,e,n,o,i,r){this.from=t,this.to=e,this.dir=n,this.isolates=o,this.fresh=i,this.order=r}static update(t,e){if(e.empty&&!t.some((t=>t.fresh)))return t;let n=[],o=t.length?t[t.length-1].dir:ha.LTR;for(let i=Math.max(0,t.length-10);i=0;i--){let e=o[i],r="function"==typeof e?e(t):e;r&&_s(r,n)}return n}const _c=us.mac?"mac":us.windows?"win":us.linux?"linux":"key";function Oc(t,e,n){return e.altKey&&(t="Alt-"+t),e.ctrlKey&&(t="Ctrl-"+t),e.metaKey&&(t="Meta-"+t),!1!==n&&e.shiftKey&&(t="Shift-"+t),t}const bc=pi.default(fc.domEventHandlers({keydown:(t,e)=>Cc(Sc(e.state),t,e,"editor")})),wc=Jo.define({enables:bc}),xc=new WeakMap;function Sc(t){let e=t.facet(wc),n=xc.get(e);return n||xc.set(e,n=function(t,e=_c){let n=Object.create(null),o=Object.create(null),i=(t,e)=>{let n=o[t];if(null==n)o[t]=e;else if(n!=e)throw new Error("Key binding "+t+" is used both as a regular binding and as a multi-stroke prefix")},r=(t,o,r,s,a)=>{var l,c;let u=n[t]||(n[t]=Object.create(null)),h=o.split(/ (?!$)/).map((t=>function(t,e){const n=t.split(/-(?!$)/);let o,i,r,s,a=n[n.length-1];"Space"==a&&(a=" ");for(let t=0;t{let o=kc={view:e,prefix:n,scope:t};return setTimeout((()=>{kc==o&&(kc=null)}),Pc),!0}]})}let p=h.join(" ");i(p,!1);let d=u[p]||(u[p]={preventDefault:!1,stopPropagation:!1,run:(null===(c=null===(l=u._any)||void 0===l?void 0:l.run)||void 0===c?void 0:c.slice())||[]});r&&d.run.push(r),s&&(d.preventDefault=!0),a&&(d.stopPropagation=!0)};for(let o of t){let t=o.scope?o.scope.split(" "):["editor"];if(o.any)for(let e of t){let t=n[e]||(n[e]=Object.create(null));t._any||(t._any={preventDefault:!1,stopPropagation:!1,run:[]});for(let e in t)t[e].run.push(o.any)}let i=o[e]||o.key;if(i)for(let e of t)r(e,i,o.run,o.preventDefault,o.stopPropagation),o.shift&&r(e,"Shift-"+i,o.shift,o.preventDefault,o.stopPropagation)}return n}(e.reduce(((t,e)=>t.concat(e)),[]))),n}let kc=null;const Pc=4e3;function Cc(t,e,n,o){let i=function(t){var e=!(xr&&t.metaKey&&t.shiftKey&&!t.ctrlKey&&!t.altKey||Sr&&t.shiftKey&&t.key&&1==t.key.length||"Unidentified"==t.key)&&t.key||(t.shiftKey?wr:br)[t.keyCode]||t.key||"Unidentified";return"Esc"==e&&(e="Escape"),"Del"==e&&(e="Delete"),"Left"==e&&(e="ArrowLeft"),"Up"==e&&(e="ArrowUp"),"Right"==e&&(e="ArrowRight"),"Down"==e&&(e="ArrowDown"),e}(e),r=Do(Mo(i,0))==i.length&&" "!=i,s="",a=!1,l=!1,c=!1;kc&&kc.view==n&&kc.scope==o&&(s=kc.prefix+" ",Ka.indexOf(e.keyCode)<0&&(l=!0,kc=null));let u,h,p=new Set,d=t=>{if(t){for(let o of t.run)if(!p.has(o)&&(p.add(o),o(n,e)))return t.stopPropagation&&(c=!0),!0;t.preventDefault&&(t.stopPropagation&&(c=!0),l=!0)}return!1},f=t[o];return f&&(d(f[s+Oc(i,e,!r)])?a=!0:r&&(e.altKey||e.metaKey||e.ctrlKey)&&!(us.windows&&e.ctrlKey&&e.altKey)&&(u=br[e.keyCode])&&u!=i?(d(f[s+Oc(u,e,!0)])||e.shiftKey&&(h=wr[e.keyCode])!=i&&h!=u&&d(f[s+Oc(h,e,!1)]))&&(a=!0):r&&e.shiftKey&&d(f[s+Oc(i,e,!0)])&&(a=!0),!a&&d(f._any)&&(a=!0)),l&&(a=!0),a&&c&&e.stopPropagation(),a}class Tc{constructor(t,e,n,o,i){this.className=t,this.left=e,this.top=n,this.width=o,this.height=i}draw(){let t=document.createElement("div");return t.className=this.className,this.adjust(t),t}update(t,e){return e.className==this.className&&(this.adjust(t),!0)}adjust(t){t.style.left=this.left+"px",t.style.top=this.top+"px",null!=this.width&&(t.style.width=this.width+"px"),t.style.height=this.height+"px"}eq(t){return this.left==t.left&&this.top==t.top&&this.width==t.width&&this.height==t.height&&this.className==t.className}static forRange(t,e,n){if(n.empty){let o=t.coordsAtPos(n.head,n.assoc||1);if(!o)return[];let i=Ec(t);return[new Tc(e,o.left-i.left,o.top-i.top,null,o.bottom-o.top)]}return function(t,e,n){if(n.to<=t.viewport.from||n.from>=t.viewport.to)return[];let o=Math.max(n.from,t.viewport.from),i=Math.min(n.to,t.viewport.to),r=t.textDirection==ha.LTR,s=t.contentDOM,a=s.getBoundingClientRect(),l=Ec(t),c=s.querySelector(".cm-line"),u=c&&window.getComputedStyle(c),h=a.left+(u?parseInt(u.paddingLeft)+Math.min(0,parseInt(u.textIndent)):0),p=a.right-(u?parseInt(u.paddingRight):0),d=La(t,o),f=La(t,i),g=d.type==Cs.Text?d:null,m=f.type==Cs.Text?f:null;g&&(t.lineWrapping||d.widgetLineBreaks)&&(g=Qc(t,o,g));m&&(t.lineWrapping||f.widgetLineBreaks)&&(m=Qc(t,i,m));if(g&&m&&g.from==m.from)return y(_(n.from,n.to,g));{let e=g?_(n.from,null,g):O(d,!1),o=m?_(null,n.to,m):O(f,!0),i=[];return(g||d).to<(m||f).from-(g&&m?1:0)||d.widgetLineBreaks>1&&e.bottom+t.defaultLineHeight/2c&&o.from=r)break;a>i&&l(Math.max(t,i),null==e&&t<=c,Math.min(a,r),null==n&&a>=u,s.dir)}if(i=o.to+1,i>=r)break}return 0==a.length&&l(c,null==e,u,null==n,t.textDirection),{top:i,bottom:s,horizontal:a}}function O(t,e){let n=a.top+(e?t.top:t.bottom);return{top:n,bottom:n,horizontal:[]}}}(t,e,n)}}function Ec(t){let e=t.scrollDOM.getBoundingClientRect();return{left:(t.textDirection==ha.LTR?e.left:e.right-t.scrollDOM.clientWidth*t.scaleX)-t.scrollDOM.scrollLeft*t.scaleX,top:e.top-t.scrollDOM.scrollTop*t.scaleY}}function Qc(t,e,n){let o=Go.cursor(e);return{from:Math.max(n.from,t.moveToLineBoundary(o,!1,!0).from),to:Math.min(n.to,t.moveToLineBoundary(o,!0,!0).from),type:Cs.Text}}class Ac{constructor(t,e){this.view=t,this.layer=e,this.drawn=[],this.scaleX=1,this.scaleY=1,this.measureReq={read:this.measure.bind(this),write:this.draw.bind(this)},this.dom=t.scrollDOM.appendChild(document.createElement("div")),this.dom.classList.add("cm-layer"),e.above&&this.dom.classList.add("cm-layer-above"),e.class&&this.dom.classList.add(e.class),this.scale(),this.dom.setAttribute("aria-hidden","true"),this.setOrder(t.state),t.requestMeasure(this.measureReq),e.mount&&e.mount(this.dom,t)}update(t){t.startState.facet($c)!=t.state.facet($c)&&this.setOrder(t.state),(this.layer.update(t,this.dom)||t.geometryChanged)&&(this.scale(),t.view.requestMeasure(this.measureReq))}setOrder(t){let e=0,n=t.facet($c);for(;e!function(t,e){return t.constructor==e.constructor&&t.eq(e)}(t,this.drawn[e])))){let e=this.dom.firstChild,n=0;for(let o of t)o.update&&e&&o.constructor&&this.drawn[n].constructor&&o.update(e,this.drawn[n])?(e=e.nextSibling,n++):this.dom.insertBefore(o.draw(),e);for(;e;){let t=e.nextSibling;e.remove(),e=t}this.drawn=t}}destroy(){this.layer.destroy&&this.layer.destroy(this.dom,this.view),this.dom.remove()}}const $c=Jo.define();function jc(t){return[Ks.define((e=>new Ac(e,t))),$c.of(t)]}const Rc=!us.ios,Zc=Jo.define({combine:t=>Xi(t,{cursorBlinkRate:1200,drawRangeCursor:!0},{cursorBlinkRate:(t,e)=>Math.min(t,e),drawRangeCursor:(t,e)=>t||e})});function Mc(t={}){return[Zc.of(t),Dc,Nc,Xc,zs.of(!0)]}function Vc(t){return t.startState.facet(Zc)!=t.state.facet(Zc)}const Dc=jc({above:!0,markers(t){let{state:e}=t,n=e.facet(Zc),o=[];for(let i of e.selection.ranges){let r=i==e.selection.main;if(i.empty?!r||Rc:n.drawRangeCursor){let e=r?"cm-cursor cm-cursor-primary":"cm-cursor cm-cursor-secondary",n=i.empty?i:Go.cursor(i.head,i.head>i.anchor?-1:1);for(let i of Tc.forRange(t,e,n))o.push(i)}}return o},update(t,e){t.transactions.some((t=>t.selection))&&(e.style.animationName="cm-blink"==e.style.animationName?"cm-blink2":"cm-blink");let n=Vc(t);return n&&Ic(t.state,e),t.docChanged||t.selectionSet||n},mount(t,e){Ic(e.state,t)},class:"cm-cursorLayer"});function Ic(t,e){e.style.animationDuration=t.facet(Zc).cursorBlinkRate+"ms"}const Nc=jc({above:!1,markers:t=>t.state.selection.ranges.map((e=>e.empty?[]:Tc.forRange(t,"cm-selectionBackground",e))).reduce(((t,e)=>t.concat(e))),update:(t,e)=>t.docChanged||t.selectionSet||t.viewportChanged||Vc(t),class:"cm-selectionLayer"}),Wc={".cm-line":{"& ::selection":{backgroundColor:"transparent !important"},"&::selection":{backgroundColor:"transparent !important"}}};Rc&&(Wc[".cm-line"].caretColor="transparent !important",Wc[".cm-content"]={caretColor:"transparent !important"});const Xc=pi.highest(fc.theme(Wc)),Lc=Ei.define({map:(t,e)=>null==t?null:e.mapPos(t)}),Yc=si.define({create:()=>null,update:(t,e)=>(null!=t&&(t=e.changes.mapPos(t)),e.effects.reduce(((t,e)=>e.is(Lc)?e.value:t),t))}),zc=Ks.fromClass(class{constructor(t){this.view=t,this.cursor=null,this.measureReq={read:this.readPos.bind(this),write:this.drawCursor.bind(this)}}update(t){var e;let n=t.state.field(Yc);null==n?null!=this.cursor&&(null===(e=this.cursor)||void 0===e||e.remove(),this.cursor=null):(this.cursor||(this.cursor=this.view.scrollDOM.appendChild(document.createElement("div")),this.cursor.className="cm-dropCursor"),(t.startState.field(Yc)!=n||t.docChanged||t.geometryChanged)&&this.view.requestMeasure(this.measureReq))}readPos(){let{view:t}=this,e=t.state.field(Yc),n=null!=e&&t.coordsAtPos(e);if(!n)return null;let o=t.scrollDOM.getBoundingClientRect();return{left:n.left-o.left+t.scrollDOM.scrollLeft*t.scaleX,top:n.top-o.top+t.scrollDOM.scrollTop*t.scaleY,height:n.bottom-n.top}}drawCursor(t){if(this.cursor){let{scaleX:e,scaleY:n}=this.view;t?(this.cursor.style.left=t.left/e+"px",this.cursor.style.top=t.top/n+"px",this.cursor.style.height=t.height/n+"px"):this.cursor.style.left="-100000px"}}destroy(){this.cursor&&this.cursor.remove()}setDropPos(t){this.view.state.field(Yc)!=t&&this.view.dispatch({effects:Lc.of(t)})}},{eventObservers:{dragover(t){this.setDropPos(this.view.posAtCoords({x:t.clientX,y:t.clientY}))},dragleave(t){t.target!=this.view.contentDOM&&this.view.contentDOM.contains(t.relatedTarget)||this.setDropPos(null)},dragend(){this.setDropPos(null)},drop(){this.setDropPos(null)}}});function qc(t,e,n,o,i){e.lastIndex=0;for(let r,s=t.iterRange(n,o),a=n;!s.next().done;a+=s.value.length)if(!s.lineBreak)for(;r=e.exec(s.value);)i(a+r.index,r)}class Uc{constructor(t){const{regexp:e,decoration:n,decorate:o,boundary:i,maxLength:r=1e3}=t;if(!e.global)throw new RangeError("The regular expression given to MatchDecorator should have its 'g' flag set");if(this.regexp=e,o)this.addMatch=(t,e,n,i)=>o(i,n,n+t[0].length,t,e);else if("function"==typeof n)this.addMatch=(t,e,o,i)=>{let r=n(t,e,o);r&&i(o,o+t[0].length,r)};else{if(!n)throw new RangeError("Either 'decorate' or 'decoration' should be provided to MatchDecorator");this.addMatch=(t,e,o,i)=>i(o,o+t[0].length,n)}this.boundary=i,this.maxLength=r}createDeco(t){let e=new Bi,n=e.add.bind(e);for(let{from:e,to:o}of function(t,e){let n=t.visibleRanges;if(1==n.length&&n[0].from==t.viewport.from&&n[0].to==t.viewport.to)return n;let o=[];for(let{from:i,to:r}of n)i=Math.max(t.state.doc.lineAt(i).from,i-e),r=Math.min(t.state.doc.lineAt(r).to,r+e),o.length&&o[o.length-1].to>=i?o[o.length-1].to=r:o.push({from:i,to:r});return o}(t,this.maxLength))qc(t.state.doc,this.regexp,e,o,((e,o)=>this.addMatch(o,t,e,n)));return e.finish()}updateDeco(t,e){let n=1e9,o=-1;return t.docChanged&&t.changes.iterChanges(((e,i,r,s)=>{s>t.view.viewport.from&&r1e3?this.createDeco(t.view):o>-1?this.updateRange(t.view,e.map(t.changes),n,o):e}updateRange(t,e,n,o){for(let i of t.visibleRanges){let r=Math.max(i.from,n),s=Math.min(i.to,o);if(s>r){let n=t.state.doc.lineAt(r),o=n.ton.from;r--)if(this.boundary.test(n.text[r-1-n.from])){a=r;break}for(;su.push(n.range(t,e));if(n==o)for(this.regexp.lastIndex=a-n.from;(c=this.regexp.exec(n.text))&&c.indexthis.addMatch(n,t,e,h)));e=e.update({filterFrom:a,filterTo:l,filter:(t,e)=>tl,add:u})}}return e}}const Bc=null!=/x/.unicode?"gu":"g",Fc=new RegExp("[\0-\b\n--Ÿ­؜​‎‏\u2028\u2029‭‮⁦⁧⁩\ufeff-]",Bc),Gc={0:"null",7:"bell",8:"backspace",10:"newline",11:"vertical tab",13:"carriage return",27:"escape",8203:"zero width space",8204:"zero width non-joiner",8205:"zero width joiner",8206:"left-to-right mark",8207:"right-to-left mark",8232:"line separator",8237:"left-to-right override",8238:"right-to-left override",8294:"left-to-right isolate",8295:"right-to-left isolate",8297:"pop directional isolate",8233:"paragraph separator",65279:"zero width no-break space",65532:"object replacement"};let Hc=null;const Kc=Jo.define({combine(t){let e=Xi(t,{render:null,specialChars:Fc,addSpecialChars:null});return(e.replaceTabs=!function(){var t;if(null==Hc&&"undefined"!=typeof document&&document.body){let e=document.body.style;Hc=null!=(null!==(t=e.tabSize)&&void 0!==t?t:e.MozTabSize)}return Hc||!1}())&&(e.specialChars=new RegExp("\t|"+e.specialChars.source,Bc)),e.addSpecialChars&&(e.specialChars=new RegExp(e.specialChars.source+"|"+e.addSpecialChars.source,Bc)),e}});function Jc(t={}){return[Kc.of(t),tu||(tu=Ks.fromClass(class{constructor(t){this.view=t,this.decorations=Ts.none,this.decorationCache=Object.create(null),this.decorator=this.makeDecorator(t.state.facet(Kc)),this.decorations=this.decorator.createDeco(t)}makeDecorator(t){return new Uc({regexp:t.specialChars,decoration:(e,n,o)=>{let{doc:i}=n.state,r=Mo(e[0],0);if(9==r){let t=i.lineAt(o),e=n.state.tabSize,r=rr(t.text,e,o-t.from);return Ts.replace({widget:new ou((e-r%e)*this.view.defaultCharacterWidth/this.view.scaleX)})}return this.decorationCache[r]||(this.decorationCache[r]=Ts.replace({widget:new nu(t,r)}))},boundary:t.replaceTabs?void 0:/[^]/})}update(t){let e=t.state.facet(Kc);t.startState.facet(Kc)!=e?(this.decorator=this.makeDecorator(e),this.decorations=this.decorator.createDeco(t.view)):this.decorations=this.decorator.updateDeco(t,this.decorations)}},{decorations:t=>t.decorations}))]}let tu=null;const eu="•";class nu extends Ps{constructor(t,e){super(),this.options=t,this.code=e}eq(t){return t.code==this.code}toDOM(t){let e=function(t){return t>=32?eu:10==t?"␤":String.fromCharCode(9216+t)}(this.code),n=t.state.phrase("Control character")+" "+(Gc[this.code]||"0x"+this.code.toString(16)),o=this.options.render&&this.options.render(this.code,n,e);if(o)return o;let i=document.createElement("span");return i.textContent=e,i.title=n,i.setAttribute("aria-label",n),i.className="cm-specialChar",i}ignoreEvent(){return!1}}class ou extends Ps{constructor(t){super(),this.width=t}eq(t){return t.width==this.width}toDOM(){let t=document.createElement("span");return t.textContent="\t",t.className="cm-tab",t.style.width=this.width+"px",t}ignoreEvent(){return!1}}null&&Ks.fromClass(class{constructor(){this.height=1e3,this.attrs={style:"padding-bottom: 1000px"}}update(t){let{view:e}=t,n=e.viewState.editorHeight*e.scaleY-e.defaultLineHeight-e.documentPadding.top-.5;n>=0&&n!=this.height&&(this.height=n,this.attrs={style:`padding-bottom: ${n}px`})}});const iu=Ts.line({class:"cm-activeLine"}),ru=Ks.fromClass(class{constructor(t){this.decorations=this.getDeco(t)}update(t){(t.docChanged||t.selectionSet)&&(this.decorations=this.getDeco(t.view))}getDeco(t){let e=-1,n=[];for(let o of t.state.selection.ranges){let i=t.lineBlockAt(o.head);i.from>e&&(n.push(iu.range(i.from)),e=i.from)}return Ts.set(n)}},{decorations:t=>t.decorations});const su=2e3;function au(t,e){let n=t.posAtCoords({x:e.clientX,y:e.clientY},!1),o=t.state.doc.lineAt(n),i=n-o.from,r=i>su?-1:i==o.length?function(t,e){let n=t.coordsAtPos(t.viewport.from);return n?Math.round(Math.abs((n.left-e)/t.defaultCharacterWidth)):-1}(t,e.clientX):rr(o.text,t.state.tabSize,n-o.from);return{line:o.number,col:r,off:i}}function lu(t,e){let n=au(t,e),o=t.state.selection;return n?{update(t){if(t.docChanged){let e=t.changes.mapPos(t.startState.doc.line(n.line).from),i=t.state.doc.lineAt(e);n={line:i.number,col:n.col,off:Math.min(n.off,i.length)},o=o.map(t.changes)}},get(e,i,r){let s=au(t,e);if(!s)return o;let a=function(t,e,n){let o=Math.min(e.line,n.line),i=Math.max(e.line,n.line),r=[];if(e.off>su||n.off>su||e.col<0||n.col<0){let s=Math.min(e.off,n.off),a=Math.max(e.off,n.off);for(let e=o;e<=i;e++){let n=t.doc.line(e);n.length<=a&&r.push(Go.range(n.from+s,n.to+a))}}else{let s=Math.min(e.col,n.col),a=Math.max(e.col,n.col);for(let e=o;e<=i;e++){let n=t.doc.line(e),o=sr(n.text,s,t.tabSize,!0);if(o<0)r.push(Go.cursor(n.to));else{let e=sr(n.text,a,t.tabSize);r.push(Go.range(n.from+o,n.from+e))}}}return r}(t.state,n,s);return a.length?r?Go.create(a.concat(o.ranges)):Go.create(a):o}}:null}function cu(t){let e=(null==t?void 0:t.eventFilter)||(t=>t.altKey&&0==t.button);return fc.mouseSelectionStyle.of(((t,n)=>e(n)?lu(t,n):null))}const uu={Alt:[18,t=>!!t.altKey],Control:[17,t=>!!t.ctrlKey],Shift:[16,t=>!!t.shiftKey],Meta:[91,t=>!!t.metaKey]},hu={style:"cursor: crosshair"};function pu(t={}){let[e,n]=uu[t.key||"Alt"],o=Ks.fromClass(class{constructor(t){this.view=t,this.isDown=!1}set(t){this.isDown!=t&&(this.isDown=t,this.view.update([]))}},{eventObservers:{keydown(t){this.set(t.keyCode==e||n(t))},keyup(t){t.keyCode!=e&&n(t)||this.set(!1)},mousemove(t){this.set(n(t))}}});return[o,fc.contentAttributes.of((t=>{var e;return(null===(e=t.plugin(o))||void 0===e?void 0:e.isDown)?hu:null}))]}const du="-10000px";class fu{constructor(t,e,n){this.facet=e,this.createTooltipView=n,this.input=t.state.facet(e),this.tooltips=this.input.filter((t=>t)),this.tooltipViews=this.tooltips.map(n)}update(t,e){var n;let o=t.state.facet(this.facet),i=o.filter((t=>t));if(o===this.input){for(let e of this.tooltipViews)e.update&&e.update(t);return!1}let r=[],s=e?[]:null;for(let n=0;ne[n]=t)),e.length=s.length),this.input=o,this.tooltips=i,this.tooltipViews=r,!0}}function gu(t){let{win:e}=t;return{top:0,left:0,bottom:e.innerHeight,right:e.innerWidth}}const mu=Jo.define({combine:t=>{var e,n,o;return{position:us.ios?"absolute":(null===(e=t.find((t=>t.position)))||void 0===e?void 0:e.position)||"fixed",parent:(null===(n=t.find((t=>t.parent)))||void 0===n?void 0:n.parent)||null,tooltipSpace:(null===(o=t.find((t=>t.tooltipSpace)))||void 0===o?void 0:o.tooltipSpace)||gu}}}),vu=new WeakMap,yu=Ks.fromClass(class{constructor(t){this.view=t,this.above=[],this.inView=!0,this.madeAbsolute=!1,this.lastTransaction=0,this.measureTimeout=-1;let e=t.state.facet(mu);this.position=e.position,this.parent=e.parent,this.classes=t.themeClasses,this.createContainer(),this.measureReq={read:this.readMeasure.bind(this),write:this.writeMeasure.bind(this),key:this},this.manager=new fu(t,bu,(t=>this.createTooltip(t))),this.intersectionObserver="function"==typeof IntersectionObserver?new IntersectionObserver((t=>{Date.now()>this.lastTransaction-50&&t.length>0&&t[t.length-1].intersectionRatio<1&&this.measureSoon()}),{threshold:[1]}):null,this.observeIntersection(),t.win.addEventListener("resize",this.measureSoon=this.measureSoon.bind(this)),this.maybeMeasure()}createContainer(){this.parent?(this.container=document.createElement("div"),this.container.style.position="relative",this.container.className=this.view.themeClasses,this.parent.appendChild(this.container)):this.container=this.view.dom}observeIntersection(){if(this.intersectionObserver){this.intersectionObserver.disconnect();for(let t of this.manager.tooltipViews)this.intersectionObserver.observe(t.dom)}}measureSoon(){this.measureTimeout<0&&(this.measureTimeout=setTimeout((()=>{this.measureTimeout=-1,this.maybeMeasure()}),50))}update(t){t.transactions.length&&(this.lastTransaction=Date.now());let e=this.manager.update(t,this.above);e&&this.observeIntersection();let n=e||t.geometryChanged,o=t.state.facet(mu);if(o.position!=this.position&&!this.madeAbsolute){this.position=o.position;for(let t of this.manager.tooltipViews)t.dom.style.position=this.position;n=!0}if(o.parent!=this.parent){this.parent&&this.container.remove(),this.parent=o.parent,this.createContainer();for(let t of this.manager.tooltipViews)this.container.appendChild(t.dom);n=!0}else this.parent&&this.view.themeClasses!=this.classes&&(this.classes=this.container.className=this.view.themeClasses);n&&this.maybeMeasure()}createTooltip(t){let e=t.create(this.view);if(e.dom.classList.add("cm-tooltip"),t.arrow&&!e.dom.querySelector(".cm-tooltip > .cm-tooltip-arrow")){let t=document.createElement("div");t.className="cm-tooltip-arrow",e.dom.appendChild(t)}return e.dom.style.position=this.position,e.dom.style.top=du,e.dom.style.left="0px",this.container.appendChild(e.dom),e.mount&&e.mount(this.view),e}destroy(){var t,e;this.view.win.removeEventListener("resize",this.measureSoon);for(let e of this.manager.tooltipViews)e.dom.remove(),null===(t=e.destroy)||void 0===t||t.call(e);this.parent&&this.container.remove(),null===(e=this.intersectionObserver)||void 0===e||e.disconnect(),clearTimeout(this.measureTimeout)}readMeasure(){let t=this.view.dom.getBoundingClientRect(),e=1,n=1,o=!1;if("fixed"==this.position&&this.manager.tooltipViews.length){let{dom:t}=this.manager.tooltipViews[0];if(us.gecko)o=t.offsetParent!=this.container.ownerDocument.body;else if(t.style.top==du&&"0px"==t.style.left){let e=t.getBoundingClientRect();o=Math.abs(e.top+1e4)>1||Math.abs(e.left)>1}}if(o||"absolute"==this.position)if(this.parent){let t=this.parent.getBoundingClientRect();t.width&&t.height&&(e=t.width/this.parent.offsetWidth,n=t.height/this.parent.offsetHeight)}else({scaleX:e,scaleY:n}=this.view.viewState);return{editor:t,parent:this.parent?this.container.getBoundingClientRect():t,pos:this.manager.tooltips.map(((t,e)=>{let n=this.manager.tooltipViews[e];return n.getCoords?n.getCoords(t.pos):this.view.coordsAtPos(t.pos)})),size:this.manager.tooltipViews.map((({dom:t})=>t.getBoundingClientRect())),space:this.view.state.facet(mu).tooltipSpace(this.view),scaleX:e,scaleY:n,makeAbsolute:o}}writeMeasure(t){var e;if(t.makeAbsolute){this.madeAbsolute=!0,this.position="absolute";for(let t of this.manager.tooltipViews)t.dom.style.position="absolute"}let{editor:n,space:o,scaleX:i,scaleY:r}=t,s=[];for(let a=0;a=Math.min(n.bottom,o.bottom)||h.rightMath.min(n.right,o.right)+.1){u.style.top=du;continue}let d=l.arrow?c.dom.querySelector(".cm-tooltip-arrow"):null,f=d?7:0,g=p.right-p.left,m=null!==(e=vu.get(c))&&void 0!==e?e:p.bottom-p.top,v=c.offset||Ou,y=this.view.textDirection==ha.LTR,_=p.width>o.right-o.left?y?o.left:o.right-p.width:y?Math.min(h.left-(d?14:0)+v.x,o.right-g):Math.max(o.left,h.left-g+(d?14:0)-v.x),O=this.above[a];!l.strictSide&&(O?h.top-(p.bottom-p.top)-v.yo.bottom)&&O==o.bottom-h.bottom>h.top-o.top&&(O=this.above[a]=!O);let b=(O?h.top-o.top:o.bottom-h.bottom)-f;if(b_&&t.topw&&(w=O?t.top-m-2-f:t.bottom+f+2);if("absolute"==this.position?(u.style.top=(w-t.parent.top)/r+"px",u.style.left=(_-t.parent.left)/i+"px"):(u.style.top=w/r+"px",u.style.left=_/i+"px"),d){let t=h.left+(y?v.x:-v.x)-(_+14-7);d.style.left=t/i+"px"}!0!==c.overlap&&s.push({left:_,top:w,right:x,bottom:w+m}),u.classList.toggle("cm-tooltip-above",O),u.classList.toggle("cm-tooltip-below",!O),c.positioned&&c.positioned(t.space)}}maybeMeasure(){if(this.manager.tooltips.length&&(this.view.inView&&this.view.requestMeasure(this.measureReq),this.inView!=this.view.inView&&(this.inView=this.view.inView,!this.inView)))for(let t of this.manager.tooltipViews)t.dom.style.top=du}},{eventObservers:{scroll(){this.maybeMeasure()}}}),_u=fc.baseTheme({".cm-tooltip":{zIndex:100,boxSizing:"border-box"},"&light .cm-tooltip":{border:"1px solid #bbb",backgroundColor:"#f5f5f5"},"&light .cm-tooltip-section:not(:first-child)":{borderTop:"1px solid #bbb"},"&dark .cm-tooltip":{backgroundColor:"#333338",color:"white"},".cm-tooltip-arrow":{height:`${7}px`,width:`${7*2}px`,position:"absolute",zIndex:-1,overflow:"hidden","&:before, &:after":{content:"''",position:"absolute",width:0,height:0,borderLeft:`${7}px solid transparent`,borderRight:`${7}px solid transparent`},".cm-tooltip-above &":{bottom:`-${7}px`,"&:before":{borderTop:`${7}px solid #bbb`},"&:after":{borderTop:`${7}px solid #f5f5f5`,bottom:"1px"}},".cm-tooltip-below &":{top:`-${7}px`,"&:before":{borderBottom:`${7}px solid #bbb`},"&:after":{borderBottom:`${7}px solid #f5f5f5`,top:"1px"}}},"&dark .cm-tooltip .cm-tooltip-arrow":{"&:before":{borderTopColor:"#333338",borderBottomColor:"#333338"},"&:after":{borderTopColor:"transparent",borderBottomColor:"transparent"}}}),Ou={x:0,y:0},bu=Jo.define({enables:[yu,_u]}),wu=Jo.define();class xu{static create(t){return new xu(t)}constructor(t){this.view=t,this.mounted=!1,this.dom=document.createElement("div"),this.dom.classList.add("cm-tooltip-hover"),this.manager=new fu(t,wu,(t=>this.createHostedView(t)))}createHostedView(t){let e=t.create(this.view);return e.dom.classList.add("cm-tooltip-section"),this.dom.appendChild(e.dom),this.mounted&&e.mount&&e.mount(this.view),e}mount(t){for(let e of this.manager.tooltipViews)e.mount&&e.mount(t);this.mounted=!0}positioned(t){for(let e of this.manager.tooltipViews)e.positioned&&e.positioned(t)}update(t){this.manager.update(t)}destroy(){var t;for(let e of this.manager.tooltipViews)null===(t=e.destroy)||void 0===t||t.call(e)}passProp(t){let e;for(let n of this.manager.tooltipViews){let o=n[t];if(void 0!==o)if(void 0===e)e=o;else if(e!==o)return}return e}get offset(){return this.passProp("offset")}get getCoords(){return this.passProp("getCoords")}get overlap(){return this.passProp("overlap")}get resize(){return this.passProp("resize")}}const Su=bu.compute([wu],(t=>{let e=t.facet(wu).filter((t=>t));return 0===e.length?null:{pos:Math.min(...e.map((t=>t.pos))),end:Math.max(...e.map((t=>{var e;return null!==(e=t.end)&&void 0!==e?e:t.pos}))),create:xu.create,above:e[0].above,arrow:e.some((t=>t.arrow))}}));class ku{constructor(t,e,n,o,i){this.view=t,this.source=e,this.field=n,this.setHover=o,this.hoverTime=i,this.hoverTimeout=-1,this.restartTimeout=-1,this.pending=null,this.lastMove={x:0,y:0,target:t.dom,time:0},this.checkHover=this.checkHover.bind(this),t.dom.addEventListener("mouseleave",this.mouseleave=this.mouseleave.bind(this)),t.dom.addEventListener("mousemove",this.mousemove=this.mousemove.bind(this))}update(){this.pending&&(this.pending=null,clearTimeout(this.restartTimeout),this.restartTimeout=setTimeout((()=>this.startHover()),20))}get active(){return this.view.state.field(this.field)}checkHover(){if(this.hoverTimeout=-1,this.active)return;let t=Date.now()-this.lastMove.time;tn.bottom||e.xn.right+t.defaultCharacterWidth)return;let r=t.bidiSpans(t.state.doc.lineAt(o)).find((t=>t.from<=o&&t.to>=o)),s=r&&r.dir==ha.RTL?-1:1;i=e.x{this.pending==e&&(this.pending=null,n&&t.dispatch({effects:this.setHover.of(n)}))}),(e=>Bs(t.state,e,"hover tooltip")))}else r&&t.dispatch({effects:this.setHover.of(r)})}get tooltip(){let t=this.view.plugin(yu),e=t?t.manager.tooltips.findIndex((t=>t.create==xu.create)):-1;return e>-1?t.manager.tooltipViews[e]:null}mousemove(t){var e;this.lastMove={x:t.clientX,y:t.clientY,target:t.target,time:Date.now()},this.hoverTimeout<0&&(this.hoverTimeout=setTimeout(this.checkHover,this.hoverTime));let{active:n,tooltip:o}=this;if(n&&o&&!function(t,e){let n=t.getBoundingClientRect();return e.clientX>=n.left-Pu&&e.clientX<=n.right+Pu&&e.clientY>=n.top-Pu&&e.clientY<=n.bottom+Pu}(o.dom,t)||this.pending){let{pos:o}=n||this.pending,i=null!==(e=null==n?void 0:n.end)&&void 0!==e?e:o;(o==i?this.view.posAtCoords(this.lastMove)==o:function(t,e,n,o,i,r){let s=t.scrollDOM.getBoundingClientRect(),a=t.documentTop+t.documentPadding.top+t.contentHeight;if(s.left>o||s.righti||Math.min(s.bottom,a)=e&&l<=n}(this.view,o,i,t.clientX,t.clientY))||(this.view.dispatch({effects:this.setHover.of(null)}),this.pending=null)}}mouseleave(t){clearTimeout(this.hoverTimeout),this.hoverTimeout=-1;let{active:e}=this;if(e){let{tooltip:e}=this;e&&e.dom.contains(t.relatedTarget)?this.watchTooltipLeave(e.dom):this.view.dispatch({effects:this.setHover.of(null)})}}watchTooltipLeave(t){let e=n=>{t.removeEventListener("mouseleave",e),this.active&&!this.view.dom.contains(n.relatedTarget)&&this.view.dispatch({effects:this.setHover.of(null)})};t.addEventListener("mouseleave",e)}destroy(){clearTimeout(this.hoverTimeout),this.view.dom.removeEventListener("mouseleave",this.mouseleave),this.view.dom.removeEventListener("mousemove",this.mousemove)}}const Pu=4;function Cu(t,e={}){let n=Ei.define(),o=si.define({create:()=>null,update(t,o){if(t&&(e.hideOnChange&&(o.docChanged||o.selection)||e.hideOn&&e.hideOn(o,t)))return null;if(t&&o.docChanged){let e=o.changes.mapPos(t.pos,-1,No.TrackDel);if(null==e)return null;let n=Object.assign(Object.create(null),t);n.pos=e,null!=t.end&&(n.end=o.changes.mapPos(t.end)),t=n}for(let e of o.effects)e.is(n)&&(t=e.value),e.is(Eu)&&(t=null);return t},provide:t=>wu.from(t)});return[o,Ks.define((i=>new ku(i,t,o,n,e.hoverTime||300))),Su]}function Tu(t,e){let n=t.plugin(yu);if(!n)return null;let o=n.manager.tooltips.indexOf(e);return o<0?null:n.manager.tooltipViews[o]}const Eu=Ei.define();null&&Eu.of(null);const Qu=Jo.define({combine(t){let e,n;for(let o of t)e=e||o.topContainer,n=n||o.bottomContainer;return{topContainer:e,bottomContainer:n}}});function Au(t,e){let n=t.plugin($u),o=n?n.specs.indexOf(e):-1;return o>-1?n.panels[o]:null}const $u=Ks.fromClass(class{constructor(t){this.input=t.state.facet(Zu),this.specs=this.input.filter((t=>t)),this.panels=this.specs.map((e=>e(t)));let e=t.state.facet(Qu);this.top=new ju(t,!0,e.topContainer),this.bottom=new ju(t,!1,e.bottomContainer),this.top.sync(this.panels.filter((t=>t.top))),this.bottom.sync(this.panels.filter((t=>!t.top)));for(let t of this.panels)t.dom.classList.add("cm-panel"),t.mount&&t.mount()}update(t){let e=t.state.facet(Qu);this.top.container!=e.topContainer&&(this.top.sync([]),this.top=new ju(t.view,!0,e.topContainer)),this.bottom.container!=e.bottomContainer&&(this.bottom.sync([]),this.bottom=new ju(t.view,!1,e.bottomContainer)),this.top.syncClasses(),this.bottom.syncClasses();let n=t.state.facet(Zu);if(n!=this.input){let e=n.filter((t=>t)),o=[],i=[],r=[],s=[];for(let n of e){let e,a=this.specs.indexOf(n);a<0?(e=n(t.view),s.push(e)):(e=this.panels[a],e.update&&e.update(t)),o.push(e),(e.top?i:r).push(e)}this.specs=e,this.panels=o,this.top.sync(i),this.bottom.sync(r);for(let t of s)t.dom.classList.add("cm-panel"),t.mount&&t.mount()}else for(let e of this.panels)e.update&&e.update(t)}destroy(){this.top.sync([]),this.bottom.sync([])}},{provide:t=>fc.scrollMargins.of((e=>{let n=e.plugin(t);return n&&{top:n.top.scrollMargin(),bottom:n.bottom.scrollMargin()}}))});class ju{constructor(t,e,n){this.view=t,this.top=e,this.container=n,this.dom=void 0,this.classes="",this.panels=[],this.syncClasses()}sync(t){for(let e of this.panels)e.destroy&&t.indexOf(e)<0&&e.destroy();this.panels=t,this.syncDOM()}syncDOM(){if(0==this.panels.length)return void(this.dom&&(this.dom.remove(),this.dom=void 0));if(!this.dom){this.dom=document.createElement("div"),this.dom.className=this.top?"cm-panels cm-panels-top":"cm-panels cm-panels-bottom",this.dom.style[this.top?"top":"bottom"]="0";let t=this.container||this.view.dom;t.insertBefore(this.dom,this.top?t.firstChild:null)}let t=this.dom.firstChild;for(let e of this.panels)if(e.dom.parentNode==this.dom){for(;t!=e.dom;)t=Ru(t);t=t.nextSibling}else this.dom.insertBefore(e.dom,t);for(;t;)t=Ru(t)}scrollMargin(){return!this.dom||this.container?0:Math.max(0,this.top?this.dom.getBoundingClientRect().bottom-Math.max(0,this.view.scrollDOM.getBoundingClientRect().top):Math.min(innerHeight,this.view.scrollDOM.getBoundingClientRect().bottom)-this.dom.getBoundingClientRect().top)}syncClasses(){if(this.container&&this.classes!=this.view.themeClasses){for(let t of this.classes.split(" "))t&&this.container.classList.remove(t);for(let t of(this.classes=this.view.themeClasses).split(" "))t&&this.container.classList.add(t)}}}function Ru(t){let e=t.nextSibling;return t.remove(),e}const Zu=Jo.define({enables:$u});class Mu extends Li{compare(t){return this==t||this.constructor==t.constructor&&this.eq(t)}eq(t){return!1}destroy(t){}}Mu.prototype.elementClass="",Mu.prototype.toDOM=void 0,Mu.prototype.mapMode=No.TrackBefore,Mu.prototype.startSide=Mu.prototype.endSide=-1,Mu.prototype.point=!0;const Vu=Jo.define(),Du={class:"",renderEmptyElements:!1,elementStyle:"",markers:()=>Ui.empty,lineMarker:()=>null,widgetMarker:()=>null,lineMarkerChange:null,initialSpacer:null,updateSpacer:null,domEventHandlers:{}},Iu=Jo.define();function Nu(t){return[Xu(),Iu.of(Object.assign(Object.assign({},Du),t))]}const Wu=Jo.define({combine:t=>t.some((t=>t))});function Xu(t){let e=[Lu];return t&&!1===t.fixed&&e.push(Wu.of(!0)),e}const Lu=Ks.fromClass(class{constructor(t){this.view=t,this.prevViewport=t.viewport,this.dom=document.createElement("div"),this.dom.className="cm-gutters",this.dom.setAttribute("aria-hidden","true"),this.dom.style.minHeight=this.view.contentHeight/this.view.scaleY+"px",this.gutters=t.state.facet(Iu).map((e=>new Uu(t,e)));for(let t of this.gutters)this.dom.appendChild(t.dom);this.fixed=!t.state.facet(Wu),this.fixed&&(this.dom.style.position="sticky"),this.syncGutters(!1),t.scrollDOM.insertBefore(this.dom,t.contentDOM)}update(t){if(this.updateGutters(t)){let e=this.prevViewport,n=t.view.viewport,o=Math.min(e.to,n.to)-Math.max(e.from,n.from);this.syncGutters(o<.8*(n.to-n.from))}t.geometryChanged&&(this.dom.style.minHeight=this.view.contentHeight+"px"),this.view.state.facet(Wu)!=!this.fixed&&(this.fixed=!this.fixed,this.dom.style.position=this.fixed?"sticky":""),this.prevViewport=t.view.viewport}syncGutters(t){let e=this.dom.nextSibling;t&&this.dom.remove();let n=Ui.iter(this.view.state.facet(Vu),this.view.viewport.from),o=[],i=this.gutters.map((t=>new qu(t,this.view.viewport,-this.view.documentPadding.top)));for(let t of this.view.viewportLineBlocks)if(o.length&&(o=[]),Array.isArray(t.type)){let e=!0;for(let r of t.type)if(r.type==Cs.Text&&e){zu(n,o,r.from);for(let t of i)t.line(this.view,r,o);e=!1}else if(r.widget)for(let t of i)t.widget(this.view,r)}else if(t.type==Cs.Text){zu(n,o,t.from);for(let e of i)e.line(this.view,t,o)}else if(t.widget)for(let e of i)e.widget(this.view,t);for(let t of i)t.finish();t&&this.view.scrollDOM.insertBefore(this.dom,e)}updateGutters(t){let e=t.startState.facet(Iu),n=t.state.facet(Iu),o=t.docChanged||t.heightChanged||t.viewportChanged||!Ui.eq(t.startState.facet(Vu),t.state.facet(Vu),t.view.viewport.from,t.view.viewport.to);if(e==n)for(let e of this.gutters)e.update(t)&&(o=!0);else{o=!0;let i=[];for(let o of n){let n=e.indexOf(o);n<0?i.push(new Uu(this.view,o)):(this.gutters[n].update(t),i.push(this.gutters[n]))}for(let t of this.gutters)t.dom.remove(),i.indexOf(t)<0&&t.destroy();for(let t of i)this.dom.appendChild(t.dom);this.gutters=i}return o}destroy(){for(let t of this.gutters)t.destroy();this.dom.remove()}},{provide:t=>fc.scrollMargins.of((e=>{let n=e.plugin(t);return n&&0!=n.gutters.length&&n.fixed?e.textDirection==ha.LTR?{left:n.dom.offsetWidth*e.scaleX}:{right:n.dom.offsetWidth*e.scaleX}:null}))});function Yu(t){return Array.isArray(t)?t:[t]}function zu(t,e,n){for(;t.value&&t.from<=n;)t.from==n&&e.push(t.value),t.next()}class qu{constructor(t,e,n){this.gutter=t,this.height=n,this.i=0,this.cursor=Ui.iter(t.markers,e.from)}addElement(t,e,n){let{gutter:o}=this,i=(e.top-this.height)/t.scaleY,r=e.height/t.scaleY;if(this.i==o.elements.length){let e=new Bu(t,r,i,n);o.elements.push(e),o.dom.appendChild(e.dom)}else o.elements[this.i].update(t,r,i,n);this.height=e.bottom,this.i++}line(t,e,n){let o=[];zu(this.cursor,o,e.from),n.length&&(o=o.concat(n));let i=this.gutter.config.lineMarker(t,e,o);i&&o.unshift(i);let r=this.gutter;(0!=o.length||r.config.renderEmptyElements)&&this.addElement(t,e,o)}widget(t,e){let n=this.gutter.config.widgetMarker(t,e.widget,e);n&&this.addElement(t,e,[n])}finish(){let t=this.gutter;for(;t.elements.length>this.i;){let e=t.elements.pop();t.dom.removeChild(e.dom),e.destroy()}}}class Uu{constructor(t,e){this.view=t,this.config=e,this.elements=[],this.spacer=null,this.dom=document.createElement("div"),this.dom.className="cm-gutter"+(this.config.class?" "+this.config.class:"");for(let n in e.domEventHandlers)this.dom.addEventListener(n,(o=>{let i,r=o.target;if(r!=this.dom&&this.dom.contains(r)){for(;r.parentNode!=this.dom;)r=r.parentNode;let t=r.getBoundingClientRect();i=(t.top+t.bottom)/2}else i=o.clientY;let s=t.lineBlockAtHeight(i-t.documentTop);e.domEventHandlers[n](t,s,o)&&o.preventDefault()}));this.markers=Yu(e.markers(t)),e.initialSpacer&&(this.spacer=new Bu(t,0,0,[e.initialSpacer(t)]),this.dom.appendChild(this.spacer.dom),this.spacer.dom.style.cssText+="visibility: hidden; pointer-events: none")}update(t){let e=this.markers;if(this.markers=Yu(this.config.markers(t.view)),this.spacer&&this.config.updateSpacer){let e=this.config.updateSpacer(this.spacer.markers[0],t);e!=this.spacer.markers[0]&&this.spacer.update(t.view,0,0,[e])}let n=t.view.viewport;return!Ui.eq(this.markers,e,n.from,n.to)||!!this.config.lineMarkerChange&&this.config.lineMarkerChange(t)}destroy(){for(let t of this.elements)t.destroy()}}class Bu{constructor(t,e,n,o){this.height=-1,this.above=0,this.markers=[],this.dom=document.createElement("div"),this.dom.className="cm-gutterElement",this.update(t,e,n,o)}update(t,e,n,o){this.height!=e&&(this.height=e,this.dom.style.height=e+"px"),this.above!=n&&(this.dom.style.marginTop=(this.above=n)?n+"px":""),function(t,e){if(t.length!=e.length)return!1;for(let n=0;nXi(t,{formatNumber:String,domEventHandlers:{}},{domEventHandlers(t,e){let n=Object.assign({},t);for(let t in e){let o=n[t],i=e[t];n[t]=o?(t,e,n)=>o(t,e,n)||i(t,e,n):i}return n}})});class Hu extends Mu{constructor(t){super(),this.number=t}eq(t){return this.number==t.number}toDOM(){return document.createTextNode(this.number)}}function Ku(t,e){return t.state.facet(Gu).formatNumber(e,t.state)}const Ju=Iu.compute([Gu],(t=>({class:"cm-lineNumbers",renderEmptyElements:!1,markers:t=>t.state.facet(Fu),lineMarker:(t,e,n)=>n.some((t=>t.toDOM))?null:new Hu(Ku(t,t.state.doc.lineAt(e.from).number)),widgetMarker:()=>null,lineMarkerChange:t=>t.startState.facet(Gu)!=t.state.facet(Gu),initialSpacer:t=>new Hu(Ku(t,eh(t.state.doc.lines))),updateSpacer(t,e){let n=Ku(e.view,eh(e.view.state.doc.lines));return n==t.number?t:new Hu(n)},domEventHandlers:t.facet(Gu).domEventHandlers})));function th(t={}){return[Gu.of(t),Xu(),Ju]}function eh(t){let e=9;for(;e{let e=[],n=-1;for(let o of t.selection.ranges){let i=t.doc.lineAt(o.head).from;i>n&&(n=i,e.push(nh.range(i)))}return Ui.of(e)}));var ih=function(){return ih=Object.assign||function(t){for(var e,n=1,o=arguments.length;n0&&(h=Math.max.apply(Math,u),p=Math.min.apply(Math,u));var d=Math.abs(h),f=Math.abs(p),g=Math.max(d,f)+1,m=-g;return o=o.map((function(t){return t.from=sh(t.from)?t.from:m,t.to=sh(t.to)?t.to:g,t})),i={from:sh(i.from)?i.from:m,to:sh(i.to)?i.to:g},s={from:sh(s.from)?s.from:m,to:sh(s.to)?s.to:g},o=o.slice().sort((function(t,e){var n=t.to-t.from,o=e.to-e.from;if(t.from>e.from)return 1;if(t.from===e.from){if(t.from+n>e.from+o)return-1;if(t.from+n===e.from+o)return 0;if(t.from+n=o.from}))).map((function(t){return function(t,e){return{from:t.frome.to?e.to:t.to}}(t,o)}));var r=e.to-e.from;if(e.from>=t[0].from&&e.from<=t[0].to)e.from+r<=t[0].to?e=null:e.from=t[0].to+1;else if(e.from=t[0].from){var s=e.to,a={from:e.from,to:t[0].from-1};n.push(a),s>t[0].to?e.from=t[0].to+1:e=null}return t.shift(),lh(t,e,n,o)},ch=function(t){return fc.domEventHandlers({paste:function(e,n){var o=(e.clipboardData||window.clipboardData).getData("Text"),i=n.state.selection.ranges.map((function(t){return{from:t.from,to:t.to}}));if(i.length>0){var r=t(n.state),s=ah(r,i[0],{from:0,to:n.state.doc.line(n.state.doc.lines).to});s.length>0&&n.dispatch({changes:{from:s[0].from,to:s[0].to,insert:o},annotations:Qi.userEvent.of("input.paste.smart")})}return!0}})};const uh=1024;let hh=0;class ph{constructor(t,e){this.from=t,this.to=e}}class dh{constructor(t={}){this.id=hh++,this.perNode=!!t.perNode,this.deserialize=t.deserialize||(()=>{throw new Error("This node type doesn't define a deserialize function")})}add(t){if(this.perNode)throw new RangeError("Can't add per-node props to node types");return"function"!=typeof t&&(t=mh.match(t)),e=>{let n=t(e);return void 0===n?null:[this,n]}}}dh.closedBy=new dh({deserialize:t=>t.split(" ")}),dh.openedBy=new dh({deserialize:t=>t.split(" ")}),dh.group=new dh({deserialize:t=>t.split(" ")}),dh.contextHash=new dh({perNode:!0}),dh.lookAhead=new dh({perNode:!0}),dh.mounted=new dh({perNode:!0});class fh{constructor(t,e,n){this.tree=t,this.overlay=e,this.parser=n}static get(t){return t&&t.props&&t.props[dh.mounted.id]}}const gh=Object.create(null);class mh{constructor(t,e,n,o=0){this.name=t,this.props=e,this.id=n,this.flags=o}static define(t){let e=t.props&&t.props.length?Object.create(null):gh,n=(t.top?1:0)|(t.skipped?2:0)|(t.error?4:0)|(null==t.name?8:0),o=new mh(t.name||"",e,t.id,n);if(t.props)for(let n of t.props)if(Array.isArray(n)||(n=n(o)),n){if(n[0].perNode)throw new RangeError("Can't store a per-node prop on a node type");e[n[0].id]=n[1]}return o}prop(t){return this.props[t.id]}get isTop(){return(1&this.flags)>0}get isSkipped(){return(2&this.flags)>0}get isError(){return(4&this.flags)>0}get isAnonymous(){return(8&this.flags)>0}is(t){if('string'==typeof t){if(this.name==t)return!0;let e=this.prop(dh.group);return!!e&&e.indexOf(t)>-1}return this.id==t}static match(t){let e=Object.create(null);for(let n in t)for(let o of n.split(" "))e[o]=t[n];return t=>{for(let n=t.prop(dh.group),o=-1;o<(n?n.length:0);o++){let i=e[o<0?t.name:n[o]];if(i)return i}}}}mh.none=new mh("",Object.create(null),0,8);class vh{constructor(t){this.types=t;for(let e=0;e=e){let s=new Ch(r.tree,r.overlay[0].from+t.from,-1,t);(i||(i=[o])).push(kh(s,e,n,!1))}}return i?$h(i):o}(this,t,e)}iterate(t){let{enter:e,leave:n,from:o=0,to:i=this.length}=t,r=t.mode||0,s=(r&Oh.IncludeAnonymous)>0;for(let t=this.cursor(r|Oh.IncludeAnonymous);;){let r=!1;if(t.from<=i&&t.to>=o&&(!s&&t.type.isAnonymous||!1!==e(t))){if(t.firstChild())continue;r=!0}for(;r&&n&&(s||!t.type.isAnonymous)&&n(t),!t.nextSibling();){if(!t.parent())return;r=!0}}}prop(t){return t.perNode?this.props?this.props[t.id]:void 0:this.type.prop(t)}get propValues(){let t=[];if(this.props)for(let e in this.props)t.push([+e,this.props[e]]);return t}balance(t={}){return this.children.length<=8?this:Dh(mh.none,this.children,this.positions,0,this.children.length,0,this.length,((t,e,n)=>new bh(this.type,t,e,n,this.propValues)),t.makeTree||((t,e,n)=>new bh(mh.none,t,e,n)))}static build(t){return function(t){var e;let{buffer:n,nodeSet:o,maxBufferLength:i=uh,reused:r=[],minRepeatType:s=o.types.length}=t,a=Array.isArray(n)?new wh(n,n.length):n,l=o.types,c=0,u=0;function h(t,e,n,y,_,O){let{id:b,start:w,end:x,size:S}=a,k=u;for(;S<0;){if(a.next(),-1==S){let e=r[b];return n.push(e),void y.push(w-t)}if(-3==S)return void(c=b);if(-4==S)return void(u=b);throw new RangeError(`Unrecognized record size: ${S}`)}let P,C,T=l[b],E=w-t;if(x-w<=i&&(C=m(a.pos-e,_))){let e=new Uint16Array(C.size-C.skip),n=a.pos-C.size,i=e.length;for(;a.pos>n;)i=v(C.start,e,i);P=new xh(e,x-C.start,o),E=C.start-t}else{let t=a.pos-S;a.next();let e=[],n=[],o=b>=s?b:-1,r=0,l=x;for(;a.pos>t;)o>=0&&a.id==o&&a.size>=0?(a.end<=l-i&&(f(e,n,w,r,a.end,l,o,k),r=e.length,l=a.end),a.next()):O>2500?p(w,t,e,n):h(w,t,e,n,o,O+1);if(o>=0&&r>0&&r-1&&r>0){let t=d(T);P=Dh(T,e,n,0,e.length,0,x-w,t,t)}else P=g(T,e,n,x-w,k-x)}n.push(P),y.push(E)}function p(t,e,n,r){let s=[],l=0,c=-1;for(;a.pos>e;){let{id:t,start:e,end:n,size:o}=a;if(o>4)a.next();else{if(c>-1&&e=0;t-=3)e[n++]=s[t],e[n++]=s[t+1]-i,e[n++]=s[t+2]-i,e[n++]=n;n.push(new xh(e,s[2]-i,o)),r.push(i-t)}}function d(t){return(e,n,o)=>{let i,r,s=0,a=e.length-1;if(a>=0&&(i=e[a])instanceof bh){if(!a&&i.type==t&&i.length==o)return i;(r=i.prop(dh.lookAhead))&&(s=n[a]+i.length+r)}return g(t,e,n,o,s)}}function f(t,e,n,i,r,s,a,l){let c=[],u=[];for(;t.length>i;)c.push(t.pop()),u.push(e.pop()+n-r);t.push(g(o.types[a],c,u,s-r,l-s)),e.push(r-n)}function g(t,e,n,o,i=0,r){if(c){let t=[dh.contextHash,c];r=r?[t].concat(r):[t]}if(i>25){let t=[dh.lookAhead,i];r=r?[t].concat(r):[t]}return new bh(t,e,n,o,r)}function m(t,e){let n=a.fork(),o=0,r=0,l=0,c=n.end-i,u={size:0,start:0,skip:0};t:for(let i=n.pos-t;n.pos>i;){let t=n.size;if(n.id==e&&t>=0){u.size=o,u.start=r,u.skip=l,l+=4,o+=4,n.next();continue}let a=n.pos-t;if(t<0||a=s?4:0,p=n.start;for(n.next();n.pos>a;){if(n.size<0){if(-3!=n.size)break t;h+=4}else n.id>=s&&(h+=4);n.next()}r=p,o+=t,l+=h}return(e<0||o==t)&&(u.size=o,u.start=r,u.skip=l),u.size>4?u:void 0}function v(t,e,n){let{id:o,start:i,end:r,size:l}=a;if(a.next(),l>=0&&o4){let o=a.pos-(l-4);for(;a.pos>o;)n=v(t,e,n)}e[--n]=s,e[--n]=r-t,e[--n]=i-t,e[--n]=o}else-3==l?c=o:-4==l&&(u=o);return n}let y=[],_=[];for(;a.pos>0;)h(t.start||0,t.bufferStart||0,y,_,-1,0);let O=null!==(e=t.length)&&void 0!==e?e:y.length?_[0]+y[0].length:0;return new bh(l[t.topID],y.reverse(),_.reverse(),O)}(t)}}bh.empty=new bh(mh.none,[],[],0);class wh{constructor(t,e){this.buffer=t,this.index=e}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}get pos(){return this.index}next(){this.index-=4}fork(){return new wh(this.buffer,this.index)}}class xh{constructor(t,e,n){this.buffer=t,this.length=e,this.set=n}get type(){return mh.none}toString(){let t=[];for(let e=0;e0));a=r[a+3]);return s}slice(t,e,n){let o=this.buffer,i=new Uint16Array(e-t),r=0;for(let s=t,a=0;s=e&&ne;case 1:return n<=e&&o>e;case 2:return o>e;case 4:return!0}}function kh(t,e,n,o){for(var i;t.from==t.to||(n<1?t.from>=e:t.from>e)||(n>-1?t.to<=e:t.to0?s.length:-1;t!=l;t+=e){let l=s[t],c=a[t]+r.from;if(Sh(o,n,c,c+l.length))if(l instanceof xh){if(i&Oh.ExcludeBuffers)continue;let s=l.findChild(0,l.buffer.length,e,n-c,o);if(s>-1)return new Ah(new Qh(r,l,t,c),null,s)}else if(i&Oh.IncludeAnonymous||!l.type.isAnonymous||Zh(l)){let s;if(!(i&Oh.IgnoreMounts)&&(s=fh.get(l))&&!s.overlay)return new Ch(s.tree,c,t,r);let a=new Ch(l,c,t,r);return i&Oh.IncludeAnonymous||!a.type.isAnonymous?a:a.nextChild(e<0?l.children.length-1:0,e,n,o)}}if(i&Oh.IncludeAnonymous||!r.type.isAnonymous)return null;if(t=r.index>=0?r.index+e:e<0?-1:r._parent._tree.children.length,r=r._parent,!r)return null}}get firstChild(){return this.nextChild(0,1,0,4)}get lastChild(){return this.nextChild(this._tree.children.length-1,-1,0,4)}childAfter(t){return this.nextChild(0,1,t,2)}childBefore(t){return this.nextChild(this._tree.children.length-1,-1,t,-2)}enter(t,e,n=0){let o;if(!(n&Oh.IgnoreOverlays)&&(o=fh.get(this._tree))&&o.overlay){let n=t-this.from;for(let{from:t,to:i}of o.overlay)if((e>0?t<=n:t=n:i>n))return new Ch(o.tree,o.overlay[0].from+this.from,-1,this)}return this.nextChild(0,1,t,e,n)}nextSignificantParent(){let t=this;for(;t.type.isAnonymous&&t._parent;)t=t._parent;return t}get parent(){return this._parent?this._parent.nextSignificantParent():null}get nextSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index+1,1,0,4):null}get prevSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index-1,-1,0,4):null}get tree(){return this._tree}toTree(){return this._tree}toString(){return this._tree.toString()}}function Th(t,e,n,o){let i=t.cursor(),r=[];if(!i.firstChild())return r;if(null!=n)for(;!i.type.is(n);)if(!i.nextSibling())return r;for(;;){if(null!=o&&i.type.is(o))return r;if(i.type.is(e)&&r.push(i.node),!i.nextSibling())return null==o?r:[]}}function Eh(t,e,n=e.length-1){for(let o=t.parent;n>=0;o=o.parent){if(!o)return!1;if(!o.type.isAnonymous){if(e[n]&&e[n]!=o.name)return!1;n--}}return!0}class Qh{constructor(t,e,n,o){this.parent=t,this.buffer=e,this.index=n,this.start=o}}class Ah extends Ph{get name(){return this.type.name}get from(){return this.context.start+this.context.buffer.buffer[this.index+1]}get to(){return this.context.start+this.context.buffer.buffer[this.index+2]}constructor(t,e,n){super(),this.context=t,this._parent=e,this.index=n,this.type=t.buffer.set.types[t.buffer.buffer[n]]}child(t,e,n){let{buffer:o}=this.context,i=o.findChild(this.index+4,o.buffer[this.index+3],t,e-this.context.start,n);return i<0?null:new Ah(this.context,this,i)}get firstChild(){return this.child(1,0,4)}get lastChild(){return this.child(-1,0,4)}childAfter(t){return this.child(1,t,2)}childBefore(t){return this.child(-1,t,-2)}enter(t,e,n=0){if(n&Oh.ExcludeBuffers)return null;let{buffer:o}=this.context,i=o.findChild(this.index+4,o.buffer[this.index+3],e>0?1:-1,t-this.context.start,e);return i<0?null:new Ah(this.context,this,i)}get parent(){return this._parent||this.context.parent.nextSignificantParent()}externalSibling(t){return this._parent?null:this.context.parent.nextChild(this.context.index+t,t,0,4)}get nextSibling(){let{buffer:t}=this.context,e=t.buffer[this.index+3];return e<(this._parent?t.buffer[this._parent.index+3]:t.buffer.length)?new Ah(this.context,this._parent,e):this.externalSibling(1)}get prevSibling(){let{buffer:t}=this.context,e=this._parent?this._parent.index+4:0;return this.index==e?this.externalSibling(-1):new Ah(this.context,this._parent,t.findChild(e,this.index,-1,0,4))}get tree(){return null}toTree(){let t=[],e=[],{buffer:n}=this.context,o=this.index+4,i=n.buffer[this.index+3];if(i>o){let r=n.buffer[this.index+1];t.push(n.slice(o,i,r)),e.push(0)}return new bh(this.type,t,e,this.to-this.from)}toString(){return this.context.buffer.childString(this.index)}}function $h(t){if(!t.length)return null;let e=0,n=t[0];for(let o=1;on.from||i.to0){if(this.index-1)for(let o=e+t,i=t<0?-1:n._tree.children.length;o!=i;o+=t){let t=n._tree.children[o];if(this.mode&Oh.IncludeAnonymous||t instanceof xh||!t.type.isAnonymous||Zh(t))return!1}return!0}move(t,e){if(e&&this.enterChild(t,0,4))return!0;for(;;){if(this.sibling(t))return!0;if(this.atLastNode(t)||!this.parent())return!1}}next(t=!0){return this.move(1,t)}prev(t=!0){return this.move(-1,t)}moveTo(t,e=0){for(;(this.from==this.to||(e<1?this.from>=t:this.from>t)||(e>-1?this.to<=t:this.to=0;){for(let r=t;r;r=r._parent)if(r.index==o){if(o==this.index)return r;e=r,n=i+1;break t}o=this.stack[--i]}for(let t=n;t=0;i--){if(i<0)return Eh(this.node,t,o);let r=n[e.buffer[this.stack[i]]];if(!r.isAnonymous){if(t[o]&&t[o]!=r.name)return!1;o--}}return!0}}function Zh(t){return t.children.some((t=>t instanceof xh||!t.type.isAnonymous||Zh(t)))}const Mh=new WeakMap;function Vh(t,e){if(!t.isAnonymous||e instanceof xh||e.type!=t)return 1;let n=Mh.get(e);if(null==n){n=1;for(let o of e.children){if(o.type!=t||!(o instanceof bh)){n=1;break}n+=Vh(t,o)}Mh.set(e,n)}return n}function Dh(t,e,n,o,i,r,s,a,l){let c=0;for(let n=o;n=u)break;f+=e}if(c==i+1){if(f>u){let t=n[i];e(t.children,t.positions,0,t.children.length,o[i]+a);continue}h.push(n[i])}else{let e=o[c-1]+n[c-1].length-d;h.push(Dh(t,n,o,i,c,d,e,null,l))}p.push(d+a-r)}}(e,n,o,i,0),(a||l)(h,p,s)}class Ih{constructor(){this.map=new WeakMap}setBuffer(t,e,n){let o=this.map.get(t);o||this.map.set(t,o=new Map),o.set(e,n)}getBuffer(t,e){let n=this.map.get(t);return n&&n.get(e)}set(t,e){t instanceof Ah?this.setBuffer(t.context.buffer,t.index,e):t instanceof Ch&&this.map.set(t.tree,e)}get(t){return t instanceof Ah?this.getBuffer(t.context.buffer,t.index):t instanceof Ch?this.map.get(t.tree):void 0}cursorSet(t,e){t.buffer?this.setBuffer(t.buffer.buffer,t.index,e):this.map.set(t.tree,e)}cursorGet(t){return t.buffer?this.getBuffer(t.buffer.buffer,t.index):this.map.get(t.tree)}}class Nh{constructor(t,e,n,o,i=!1,r=!1){this.from=t,this.to=e,this.tree=n,this.offset=o,this.open=(i?1:0)|(r?2:0)}get openStart(){return(1&this.open)>0}get openEnd(){return(2&this.open)>0}static addTree(t,e=[],n=!1){let o=[new Nh(0,t.length,t,0,!1,n)];for(let n of e)n.to>t.length&&o.push(n);return o}static applyChanges(t,e,n=128){if(!e.length)return t;let o=[],i=1,r=t.length?t[0]:null;for(let s=0,a=0,l=0;;s++){let c=s=n)for(;r&&r.from=e.from||u<=e.to||l){let t=Math.max(e.from,a)-l,n=Math.min(e.to,u)-l;e=t>=n?null:new Nh(t,n,e.tree,e.offset+l,s>0,!!c)}if(e&&o.push(e),r.to>u)break;r=inew ph(t.from,t.to))):[new ph(0,0)]:[new ph(0,t.length)],this.createParse(t,e||[],n)}parse(t,e,n){let o=this.startParse(t,e,n);for(;;){let t=o.advance();if(t)return t}}}class Xh{constructor(t){this.string=t}get length(){return this.string.length}chunk(t){return this.string.slice(t)}get lineChunks(){return!1}read(t,e){return this.string.slice(t,e)}}class Lh{constructor(t,e,n,o,i){this.parser=t,this.parse=e,this.overlay=n,this.target=o,this.from=i}}function Yh(t){if(!t.length||t.some((t=>t.from>=t.to)))throw new RangeError("Invalid inner parse ranges given: "+JSON.stringify(t))}class zh{constructor(t,e,n,o,i,r,s){this.parser=t,this.predicate=e,this.mounts=n,this.index=o,this.start=i,this.target=r,this.prev=s,this.depth=0,this.ranges=[]}}const qh=new dh({perNode:!0});class Uh{constructor(t,e,n,o,i){this.nest=e,this.input=n,this.fragments=o,this.ranges=i,this.inner=[],this.innerDone=0,this.baseTree=null,this.stoppedAt=null,this.baseParse=t}advance(){if(this.baseParse){let t=this.baseParse.advance();if(!t)return null;if(this.baseParse=null,this.baseTree=t,this.startInner(),null!=this.stoppedAt)for(let t of this.inner)t.parse.stopAt(this.stoppedAt)}if(this.innerDone==this.inner.length){let t=this.baseTree;return null!=this.stoppedAt&&(t=new bh(t.type,t.children,t.positions,t.length,t.propValues.concat([[qh,this.stoppedAt]]))),t}let t=this.inner[this.innerDone],e=t.parse.advance();if(e){this.innerDone++;let n=Object.assign(Object.create(null),t.target.props);n[dh.mounted.id]=new fh(e,t.overlay,t.parser),t.target.props=n}return null}get parsedPos(){if(this.baseParse)return 0;let t=this.input.length;for(let e=this.innerDone;e=this.stoppedAt)a=!1;else if(t.hasNode(o)){if(e){let t=e.mounts.find((t=>t.frag.from<=o.from&&t.frag.to>=o.to&&t.mount.overlay));if(t)for(let n of t.mount.overlay){let i=n.from+t.pos,r=n.to+t.pos;i>=o.from&&r<=o.to&&!e.ranges.some((t=>t.fromi))&&e.ranges.push({from:i,to:r})}}a=!1}else if(n&&(r=Bh(n.ranges,o.from,o.to)))a=2!=r;else if(!o.type.isAnonymous&&(i=this.nest(o,this.input))&&(o.fromnew ph(t.from-o.from,t.to-o.from))):null,o.tree,t.length?t[0].from:o.from)),i.overlay?t.length&&(n={ranges:t,depth:0,prev:n}):a=!1}}else e&&(s=e.predicate(o))&&(!0===s&&(s=new ph(o.from,o.to)),s.fromnew ph(t.from-e.start,t.to-e.start))),e.target,t[0].from))),e=e.prev}n&&! --n.depth&&(n=n.prev)}}}}function Bh(t,e,n){for(let o of t){if(o.from>=n)break;if(o.to>e)return o.from<=e&&o.to>=n?2:1}return 0}function Fh(t,e,n,o,i,r){if(e=t&&e.enter(n,1,Oh.IgnoreOverlays|Oh.ExcludeBuffers)||e.next(!1)||(this.done=!0)}hasNode(t){if(this.moveTo(t.from),!this.done&&this.cursor.from+this.offset==t.from&&this.cursor.tree)for(let e=this.cursor.tree;;){if(e==t.tree)return!0;if(!(e.children.length&&0==e.positions[0]&&e.children[0]instanceof bh))break;e=e.children[0]}return!1}}class Kh{constructor(t){var e;if(this.fragments=t,this.curTo=0,this.fragI=0,t.length){let n=this.curFrag=t[0];this.curTo=null!==(e=n.tree.prop(qh))&&void 0!==e?e:n.to,this.inner=new Hh(n.tree,-n.offset)}else this.curFrag=this.inner=null}hasNode(t){for(;this.curFrag&&t.from>=this.curTo;)this.nextFrag();return this.curFrag&&this.curFrag.from<=t.from&&this.curTo>=t.to&&this.inner.hasNode(t)}nextFrag(){var t;if(this.fragI++,this.fragI==this.fragments.length)this.curFrag=this.inner=null;else{let e=this.curFrag=this.fragments[this.fragI];this.curTo=null!==(t=e.tree.prop(qh))&&void 0!==t?t:e.to,this.inner=new Hh(e.tree,-e.offset)}}findMounts(t,e){var n;let o=[];if(this.inner){this.inner.cursor.moveTo(t,1);for(let t=this.inner.cursor.node;t;t=t.parent){let i=null===(n=t.tree)||void 0===n?void 0:n.prop(dh.mounted);if(i&&i.parser==e)for(let e=this.fragI;e=t.to)break;n.tree==this.curFrag.tree&&o.push({frag:n,pos:t.from-n.offset,mount:i})}}}return o}}function Jh(t,e){let n=null,o=e;for(let i=1,r=0;i=a)break;t.to<=s||(n||(o=n=e.slice()),t.froma&&n.splice(r+1,0,new ph(a,t.to))):t.to>a?n[r--]=new ph(a,t.to):n.splice(r--,1))}}return o}function tp(t,e,n,o){let i=0,r=0,s=!1,a=!1,l=-1e9,c=[];for(;;){let u=i==t.length?1e9:s?t[i].to:t[i].from,h=r==e.length?1e9:a?e[r].to:e[r].from;if(s!=a){let t=Math.max(l,n),e=Math.min(u,h,o);tnew ph(t.from+o,t.to+o))),a,l);for(let e=0,o=a;;e++){let a=e==s.length,c=a?l:s[e].from;if(c>o&&n.push(new Nh(o,c,i.tree,-t,r.from>=o||r.openStart,r.to<=c||r.openEnd)),a)break;o=s[e].to}}else n.push(new Nh(a,l,i.tree,-t,r.from>=t||r.openStart,r.to<=s||r.openEnd))}return n}let np=0;class op{constructor(t,e,n){this.set=t,this.base=e,this.modified=n,this.id=np++}static define(t){if(null==t?void 0:t.base)throw new Error("Can not derive from a modified tag");let e=new op([],null,[]);if(e.set.push(e),t)for(let n of t.set)e.set.push(n);return e}static defineModifier(){let t=new rp;return e=>e.modified.indexOf(t)>-1?e:rp.get(e.base||e,e.modified.concat(t).sort(((t,e)=>t.id-e.id)))}}let ip=0;class rp{constructor(){this.instances=[],this.id=ip++}static get(t,e){if(!e.length)return t;let n=e[0].instances.find((n=>n.base==t&&function(t,e){return t.length==e.length&&t.every(((t,n)=>t==e[n]))}(e,n.modified)));if(n)return n;let o=[],i=new op(o,t,e);for(let t of e)t.instances.push(i);let r=function(t){let e=[[]];for(let n=0;ne.length-t.length))}(e);for(let e of t.set)if(!e.modified.length)for(let t of r)o.push(rp.get(e,t));return i}}function sp(t){let e=Object.create(null);for(let n in t){let o=t[n];Array.isArray(o)||(o=[o]);for(let t of n.split(" "))if(t){let n=[],i=2,r=t;for(let e=0;;){if("..."==r&&e>0&&e+3==t.length){i=1;break}let o=/^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(r);if(!o)throw new RangeError("Invalid path: "+t);if(n.push("*"==o[0]?"":'"'==o[0][0]?JSON.parse(o[0]):o[0]),e+=o[0].length,e==t.length)break;let s=t[e++];if(e==t.length&&"!"==s){i=0;break}if("/"!=s)throw new RangeError("Invalid path: "+t);r=t.slice(e)}let s=n.length-1,a=n[s];if(!a)throw new RangeError("Invalid path: "+t);let l=new lp(o,i,s>0?n.slice(0,s):null);e[a]=l.sort(e[a])}}return ap.add(e)}const ap=new dh;class lp{constructor(t,e,n,o){this.tags=t,this.mode=e,this.context=n,this.next=o}get opaque(){return 0==this.mode}get inherit(){return 1==this.mode}sort(t){return!t||t.depth{let e=i;for(let o of t)for(let t of o.set){let o=n[t.id];if(o){e=e?e+" "+o:o;break}}return e},scope:o}}function up(t,e,n,o=0,i=t.length){let r=new hp(o,Array.isArray(e)?e:[e],n);r.highlightRange(t.cursor(),o,i,"",r.highlighters),r.flush(i)}lp.empty=new lp([],2,null);class hp{constructor(t,e,n){this.at=t,this.highlighters=e,this.span=n,this.class=""}startSpan(t,e){e!=this.class&&(this.flush(t),t>this.at&&(this.at=t),this.class=e)}flush(t){t>this.at&&this.class&&this.span(this.at,t,this.class)}highlightRange(t,e,n,o,i){let{type:r,from:s,to:a}=t;if(s>=n||a<=e)return;r.isTop&&(i=this.highlighters.filter((t=>!t.scope||t.scope(r))));let l=o,c=function(t){let e=t.type.prop(ap);for(;e&&e.context&&!t.matchContext(e.context);)e=e.next;return e||null}(t)||lp.empty,u=function(t,e){let n=null;for(let o of t){let t=o.style(e);t&&(n=n?n+" "+t:t)}return n}(i,c.tags);if(u&&(l&&(l+=" "),l+=u,1==c.mode&&(o+=(o?" ":"")+u)),this.startSpan(Math.max(e,s),l),c.opaque)return;let h=t.tree&&t.tree.prop(dh.mounted);if(h&&h.overlay){let r=t.node.enter(h.overlay[0].from+s,1),c=this.highlighters.filter((t=>!t.scope||t.scope(h.tree.type))),u=t.firstChild();for(let p=0,d=s;;p++){let f=p=g)&&t.nextSibling()););if(!f||g>n)break;d=f.to+s,d>e&&(this.highlightRange(r.cursor(),Math.max(e,f.from+s),Math.min(n,d),"",c),this.startSpan(Math.min(n,d),l))}u&&t.parent()}else if(t.firstChild()){h&&(o="");do{if(!(t.to<=e)){if(t.from>=n)break;this.highlightRange(t,e,n,o,i),this.startSpan(Math.min(n,t.to),l)}}while(t.nextSibling());t.parent()}}}const pp=op.define,dp=pp(),fp=pp(),gp=pp(fp),mp=pp(fp),vp=pp(),yp=pp(vp),_p=pp(vp),Op=pp(),bp=pp(Op),wp=pp(),xp=pp(),Sp=pp(),kp=pp(Sp),Pp=pp(),Cp={comment:dp,lineComment:pp(dp),blockComment:pp(dp),docComment:pp(dp),name:fp,variableName:pp(fp),typeName:gp,tagName:pp(gp),propertyName:mp,attributeName:pp(mp),className:pp(fp),labelName:pp(fp),namespace:pp(fp),macroName:pp(fp),literal:vp,string:yp,docString:pp(yp),character:pp(yp),attributeValue:pp(yp),number:_p,integer:pp(_p),float:pp(_p),bool:pp(vp),regexp:pp(vp),escape:pp(vp),color:pp(vp),url:pp(vp),keyword:wp,self:pp(wp),null:pp(wp),atom:pp(wp),unit:pp(wp),modifier:pp(wp),operatorKeyword:pp(wp),controlKeyword:pp(wp),definitionKeyword:pp(wp),moduleKeyword:pp(wp),operator:xp,derefOperator:pp(xp),arithmeticOperator:pp(xp),logicOperator:pp(xp),bitwiseOperator:pp(xp),compareOperator:pp(xp),updateOperator:pp(xp),definitionOperator:pp(xp),typeOperator:pp(xp),controlOperator:pp(xp),punctuation:Sp,separator:pp(Sp),bracket:kp,angleBracket:pp(kp),squareBracket:pp(kp),paren:pp(kp),brace:pp(kp),content:Op,heading:bp,heading1:pp(bp),heading2:pp(bp),heading3:pp(bp),heading4:pp(bp),heading5:pp(bp),heading6:pp(bp),contentSeparator:pp(Op),list:pp(Op),quote:pp(Op),emphasis:pp(Op),strong:pp(Op),link:pp(Op),monospace:pp(Op),strikethrough:pp(Op),inserted:pp(),deleted:pp(),changed:pp(),invalid:pp(),meta:Pp,documentMeta:pp(Pp),annotation:pp(Pp),processingInstruction:pp(Pp),definition:op.defineModifier(),constant:op.defineModifier(),function:op.defineModifier(),standard:op.defineModifier(),local:op.defineModifier(),special:op.defineModifier()};cp([{tag:Cp.link,class:"tok-link"},{tag:Cp.heading,class:"tok-heading"},{tag:Cp.emphasis,class:"tok-emphasis"},{tag:Cp.strong,class:"tok-strong"},{tag:Cp.keyword,class:"tok-keyword"},{tag:Cp.atom,class:"tok-atom"},{tag:Cp.bool,class:"tok-bool"},{tag:Cp.url,class:"tok-url"},{tag:Cp.labelName,class:"tok-labelName"},{tag:Cp.inserted,class:"tok-inserted"},{tag:Cp.deleted,class:"tok-deleted"},{tag:Cp.literal,class:"tok-literal"},{tag:Cp.string,class:"tok-string"},{tag:Cp.number,class:"tok-number"},{tag:[Cp.regexp,Cp.escape,Cp.special(Cp.string)],class:"tok-string2"},{tag:Cp.variableName,class:"tok-variableName"},{tag:Cp.local(Cp.variableName),class:"tok-variableName tok-local"},{tag:Cp.definition(Cp.variableName),class:"tok-variableName tok-definition"},{tag:Cp.special(Cp.variableName),class:"tok-variableName2"},{tag:Cp.definition(Cp.propertyName),class:"tok-propertyName tok-definition"},{tag:Cp.typeName,class:"tok-typeName"},{tag:Cp.namespace,class:"tok-namespace"},{tag:Cp.className,class:"tok-className"},{tag:Cp.macroName,class:"tok-macroName"},{tag:Cp.propertyName,class:"tok-propertyName"},{tag:Cp.operator,class:"tok-operator"},{tag:Cp.comment,class:"tok-comment"},{tag:Cp.meta,class:"tok-meta"},{tag:Cp.invalid,class:"tok-invalid"},{tag:Cp.punctuation,class:"tok-punctuation"}]);var Tp;const Ep=new dh;function Qp(t){return Jo.define({combine:t?e=>e.concat(t):void 0})}const Ap=new dh;class $p{constructor(t,e,n=[],o=""){this.data=t,this.name=o,Wi.prototype.hasOwnProperty("tree")||Object.defineProperty(Wi.prototype,"tree",{get(){return Zp(this)}}),this.parser=e,this.extension=[Yp.of(this),Wi.languageData.of(((t,e,n)=>{let o=jp(t,e,n),i=o.type.prop(Ep);if(!i)return[];let r=t.facet(i),s=o.type.prop(Ap);if(s){let i=o.resolve(e-o.from,n);for(let e of s)if(e.test(i,t)){let n=t.facet(e.facet);return"replace"==e.type?n:n.concat(r)}}return r}))].concat(n)}isActiveAt(t,e,n=-1){return jp(t,e,n).type.prop(Ep)==this.data}findRegions(t){let e=t.facet(Yp);if((null==e?void 0:e.data)==this.data)return[{from:0,to:t.doc.length}];if(!e||!e.allowsNesting)return[];let n=[],o=(t,e)=>{if(t.prop(Ep)==this.data)return void n.push({from:e,to:e+t.length});let i=t.prop(dh.mounted);if(i){if(i.tree.prop(Ep)==this.data){if(i.overlay)for(let t of i.overlay)n.push({from:t.from+e,to:t.to+e});else n.push({from:e,to:e+t.length});return}if(i.overlay){let t=n.length;if(o(i.tree,i.overlay[0].from+e),n.length>t)return}}for(let n=0;nt.isTop?e:void 0))]}),t.name)}configure(t,e){return new Rp(this.data,this.parser.configure(t),e||this.name)}get allowsNesting(){return this.parser.hasWrappers()}}function Zp(t){let e=t.field($p.state,!1);return e?e.tree:bh.empty}class Mp{constructor(t){this.doc=t,this.cursorPos=0,this.string="",this.cursor=t.iter()}get length(){return this.doc.length}syncTo(t){return this.string=this.cursor.next(t-this.cursorPos).value,this.cursorPos=t+this.string.length,this.cursorPos-this.string.length}chunk(t){return this.syncTo(t),this.string}get lineChunks(){return!0}read(t,e){let n=this.cursorPos-this.string.length;return t=this.cursorPos?this.doc.sliceString(t,e):this.string.slice(t-n,e-n)}}let Vp=null;class Dp{constructor(t,e,n=[],o,i,r,s,a){this.parser=t,this.state=e,this.fragments=n,this.tree=o,this.treeLen=i,this.viewport=r,this.skipped=s,this.scheduleOn=a,this.parse=null,this.tempSkipped=[]}static create(t,e,n){return new Dp(t,e,[],bh.empty,0,n,[],null)}startParse(){return this.parser.startParse(new Mp(this.state.doc),this.fragments)}work(t,e){return null!=e&&e>=this.state.doc.length&&(e=void 0),this.tree!=bh.empty&&this.isDone(null!=e?e:this.state.doc.length)?(this.takeTree(),!0):this.withContext((()=>{var n;if("number"==typeof t){let e=Date.now()+t;t=()=>Date.now()>e}for(this.parse||(this.parse=this.startParse()),null!=e&&(null==this.parse.stoppedAt||this.parse.stoppedAt>e)&&e=this.treeLen&&((null==this.parse.stoppedAt||this.parse.stoppedAt>t)&&this.parse.stopAt(t),this.withContext((()=>{for(;!(e=this.parse.advance()););})),this.treeLen=t,this.tree=e,this.fragments=this.withoutTempSkipped(Nh.addTree(this.tree,this.fragments,!0)),this.parse=null)}withContext(t){let e=Vp;Vp=this;try{return t()}finally{Vp=e}}withoutTempSkipped(t){for(let e;e=this.tempSkipped.pop();)t=Ip(t,e.from,e.to);return t}changes(t,e){let{fragments:n,tree:o,treeLen:i,viewport:r,skipped:s}=this;if(this.takeTree(),!t.empty){let e=[];if(t.iterChangedRanges(((t,n,o,i)=>e.push({fromA:t,toA:n,fromB:o,toB:i}))),n=Nh.applyChanges(n,e),o=bh.empty,i=0,r={from:t.mapPos(r.from,-1),to:t.mapPos(r.to,1)},this.skipped.length){s=[];for(let e of this.skipped){let n=t.mapPos(e.from,1),o=t.mapPos(e.to,-1);nt.from&&(this.fragments=Ip(this.fragments,n,o),this.skipped.splice(e--,1))}return!(this.skipped.length>=e)&&(this.reset(),!0)}reset(){this.parse&&(this.takeTree(),this.parse=null)}skipUntilInView(t,e){this.skipped.push({from:t,to:e})}static getSkippingParser(t){return new class extends Wh{createParse(e,n,o){let i=o[0].from,r=o[o.length-1].to;return{parsedPos:i,advance(){let e=Vp;if(e){for(let t of o)e.tempSkipped.push(t);t&&(e.scheduleOn=e.scheduleOn?Promise.all([e.scheduleOn,t]):t)}return this.parsedPos=r,new bh(mh.none,[],[],r-i)},stoppedAt:null,stopAt(){}}}}}isDone(t){t=Math.min(t,this.state.doc.length);let e=this.fragments;return this.treeLen>=t&&e.length&&0==e[0].from&&e[0].to>=t}static get(){return Vp}}function Ip(t,e,n){return Nh.applyChanges(t,[{fromA:e,toA:n,fromB:e,toB:n}])}class Np{constructor(t){this.context=t,this.tree=t.tree}apply(t){if(!t.docChanged&&this.tree==this.context.tree)return this;let e=this.context.changes(t.changes,t.state),n=this.context.treeLen==t.startState.doc.length?void 0:Math.max(t.changes.mapPos(this.context.treeLen),e.viewport.to);return e.work(20,n)||e.takeTree(),new Np(e)}static init(t){let e=Math.min(3e3,t.doc.length),n=Dp.create(t.facet(Yp).parser,t,{from:0,to:e});return n.work(20,e)||n.takeTree(),new Np(n)}}$p.state=si.define({create:Np.init,update(t,e){for(let t of e.effects)if(t.is($p.setState))return t.value;return e.startState.facet(Yp)!=e.state.facet(Yp)?Np.init(e.state):t.apply(e)}});let Wp=t=>{let e=setTimeout((()=>t()),500);return()=>clearTimeout(e)};"undefined"!=typeof requestIdleCallback&&(Wp=t=>{let e=-1,n=setTimeout((()=>{e=requestIdleCallback(t,{timeout:500-100})}),100);return()=>e<0?clearTimeout(n):cancelIdleCallback(e)});const Xp="undefined"!=typeof navigator&&(null===(Tp=navigator.scheduling)||void 0===Tp?void 0:Tp.isInputPending)?()=>navigator.scheduling.isInputPending():null,Lp=Ks.fromClass(class{constructor(t){this.view=t,this.working=null,this.workScheduled=0,this.chunkEnd=-1,this.chunkBudget=-1,this.work=this.work.bind(this),this.scheduleWork()}update(t){let e=this.view.state.field($p.state).context;(e.updateViewport(t.view.viewport)||this.view.viewport.to>e.treeLen)&&this.scheduleWork(),(t.docChanged||t.selectionSet)&&(this.view.hasFocus&&(this.chunkBudget+=50),this.scheduleWork()),this.checkAsyncSchedule(e)}scheduleWork(){if(this.working)return;let{state:t}=this.view,e=t.field($p.state);e.tree==e.context.tree&&e.context.isDone(t.doc.length)||(this.working=Wp(this.work))}work(t){this.working=null;let e=Date.now();if(this.chunkEndo+1e3,a=i.context.work((()=>Xp&&Xp()||Date.now()>r),o+(s?0:1e5));this.chunkBudget-=Date.now()-e,(a||this.chunkBudget<=0)&&(i.context.takeTree(),this.view.dispatch({effects:$p.setState.of(new Np(i.context))})),this.chunkBudget>0&&(!a||s)&&this.scheduleWork(),this.checkAsyncSchedule(i.context)}checkAsyncSchedule(t){t.scheduleOn&&(this.workScheduled++,t.scheduleOn.then((()=>this.scheduleWork())).catch((t=>Bs(this.view.state,t))).then((()=>this.workScheduled--)),t.scheduleOn=null)}destroy(){this.working&&this.working()}isWorking(){return!!(this.working||this.workScheduled>0)}},{eventHandlers:{focus(){this.scheduleWork()}}}),Yp=Jo.define({combine:t=>t.length?t[0]:null,enables:t=>[$p.state,Lp,fc.contentAttributes.compute([t],(e=>{let n=e.facet(t);return n&&n.name?{"data-language":n.name}:{}}))]});class zp{constructor(t,e=[]){this.language=t,this.support=e,this.extension=[t,e]}}const qp=Jo.define(),Up=Jo.define({combine:t=>{if(!t.length)return" ";let e=t[0];if(!e||/\S/.test(e)||Array.from(e).some((t=>t!=e[0])))throw new Error("Invalid indent unit: "+JSON.stringify(t[0]));return e}});function Bp(t){let e=t.facet(Up);return 9==e.charCodeAt(0)?t.tabSize*e.length:e.length}function Fp(t,e){let n="",o=t.tabSize,i=t.facet(Up)[0];if("\t"==i){for(;e>=o;)n+="\t",e-=o;i=" "}for(let t=0;t=e?function(t,e,n){let o=e.resolveStack(n),i=o.node.enterUnfinishedNodesBefore(n);if(i!=o.node){let t=[];for(let e=i;e!=o.node;e=e.parent)t.push(e);for(let e=t.length-1;e>=0;e--)o={node:t[e],next:o}}return Jp(o,t,n)}(t,n,e):null}class Hp{constructor(t,e={}){this.state=t,this.options=e,this.unit=Bp(t)}lineAt(t,e=1){let n=this.state.doc.lineAt(t),{simulateBreak:o,simulateDoubleBreak:i}=this.options;return null!=o&&o>=n.from&&o<=n.to?i&&o==t?{text:"",from:t}:(e<0?o-1&&(i+=r-this.countColumn(n,n.search(/\S|$/))),i}countColumn(t,e=t.length){return rr(t,this.state.tabSize,e)}lineIndent(t,e=1){let{text:n,from:o}=this.lineAt(t,e),i=this.options.overrideIndentation;if(i){let t=i(o);if(t>-1)return t}return this.countColumn(n,n.search(/\S|$/))}get simulatedBreak(){return this.options.simulateBreak||null}}const Kp=new dh;function Jp(t,e,n){for(let o=t;o;o=o.next){let t=td(o.node);if(t)return t(nd.create(e,n,o))}return 0}function td(t){let e=t.type.prop(Kp);if(e)return e;let n,o=t.firstChild;if(o&&(n=o.type.prop(dh.closedBy))){let e=t.lastChild,o=e&&n.indexOf(e.name)>-1;return t=>rd(t,!0,1,void 0,o&&!function(t){return t.pos==t.options.simulateBreak&&t.options.simulateDoubleBreak}(t)?e.from:void 0)}return null==t.parent?ed:null}function ed(){return 0}class nd extends Hp{constructor(t,e,n){super(t.state,t.options),this.base=t,this.pos=e,this.context=n}get node(){return this.context.node}static create(t,e,n){return new nd(t,e,n)}get textAfter(){return this.textAfterPos(this.pos)}get baseIndent(){return this.baseIndentFor(this.node)}baseIndentFor(t){let e=this.state.doc.lineAt(t.from);for(;;){let n=t.resolve(e.from);for(;n.parent&&n.parent.from==n.from;)n=n.parent;if(od(n,t))break;e=this.state.doc.lineAt(n.from)}return this.lineIndent(e.from)}continue(){return Jp(this.context.next,this.base,this.pos)}}function od(t,e){for(let n=e;n;n=n.parent)if(t==n)return!0;return!1}function id({closing:t,align:e=!0,units:n=1}){return o=>rd(o,e,n,t)}function rd(t,e,n,o,i){let r=t.textAfter,s=r.match(/^\s*/)[0].length,a=o&&r.slice(s,s+o.length)==o||i==t.pos+s,l=e?function(t){let e=t.node,n=e.childAfter(e.from),o=e.lastChild;if(!n)return null;let i=t.options.simulateBreak,r=t.state.doc.lineAt(n.from),s=null==i||i<=r.from?r.to:Math.min(r.to,i);for(let t=n.to;;){let i=e.childAfter(t);if(!i||i==o)return null;if(!i.type.isSkipped)return i.from{let o=t&&t.test(n.textAfter);return n.baseIndent+(o?0:e*n.unit)}}const ad=200;const ld=Jo.define(),cd=new dh;function ud(t){let e=t.firstChild,n=t.lastChild;return e&&e.ton)continue;if(i&&s.from=e&&o.to>n&&(i=o)}}return i}(t,e,n)}function dd(t,e){let n=e.mapPos(t.from,1),o=e.mapPos(t.to,-1);return n>=o?void 0:{from:n,to:o}}const fd=Ei.define({map:dd}),gd=Ei.define({map:dd});function md(t){let e=[];for(let{head:n}of t.state.selection.ranges)e.some((t=>t.from<=n&&t.to>=n))||e.push(t.lineBlockAt(n));return e}const vd=si.define({create:()=>Ts.none,update(t,e){t=t.map(e.changes);for(let n of e.effects)if(n.is(fd)&&!_d(t,n.value.from,n.value.to)){let{preparePlaceholder:o}=e.state.facet(Sd),i=o?Ts.replace({widget:new Td(o(e.state,n.value))}):Cd;t=t.update({add:[i.range(n.value.from,n.value.to)]})}else n.is(gd)&&(t=t.update({filter:(t,e)=>n.value.from!=t||n.value.to!=e,filterFrom:n.value.from,filterTo:n.value.to}));if(e.selection){let n=!1,{head:o}=e.selection.main;t.between(o,o,((t,e)=>{to&&(n=!0)})),n&&(t=t.update({filterFrom:o,filterTo:o,filter:(t,e)=>e<=o||t>=o}))}return t},provide:t=>fc.decorations.from(t),toJSON(t,e){let n=[];return t.between(0,e.doc.length,((t,e)=>{n.push(t,e)})),n},fromJSON(t){if(!Array.isArray(t)||t.length%2)throw new RangeError("Invalid JSON for fold state");let e=[];for(let n=0;n{(!i||i.from>t)&&(i={from:t,to:e})})),i}function _d(t,e,n){let o=!1;return t.between(e,e,((t,i)=>{t==e&&i==n&&(o=!0)})),o}function Od(t,e){return t.field(vd,!1)?e:e.concat(Ei.appendConfig.of(kd()))}function bd(t,e,n=!0){let o=t.state.doc.lineAt(e.from).number,i=t.state.doc.lineAt(e.to).number;return fc.announce.of(`${t.state.phrase(n?"Folded lines":"Unfolded lines")} ${o} ${t.state.phrase("to")} ${i}.`)}const wd=[{key:"Ctrl-Shift-[",mac:"Cmd-Alt-[",run:t=>{for(let e of md(t)){let n=pd(t.state,e.from,e.to);if(n)return t.dispatch({effects:Od(t.state,[fd.of(n),bd(t,n)])}),!0}return!1}},{key:"Ctrl-Shift-]",mac:"Cmd-Alt-]",run:t=>{if(!t.state.field(vd,!1))return!1;let e=[];for(let n of md(t)){let o=yd(t.state,n.from,n.to);o&&e.push(gd.of(o),bd(t,o,!1))}return e.length&&t.dispatch({effects:e}),e.length>0}},{key:"Ctrl-Alt-[",run:t=>{let{state:e}=t,n=[];for(let o=0;o{let e=t.state.field(vd,!1);if(!e||!e.size)return!1;let n=[];return e.between(0,t.state.doc.length,((t,e)=>{n.push(gd.of({from:t,to:e}))})),t.dispatch({effects:n}),!0}}],xd={placeholderDOM:null,preparePlaceholder:null,placeholderText:"…"},Sd=Jo.define({combine:t=>Xi(t,xd)});function kd(t){let e=[vd,$d];return t&&e.push(Sd.of(t)),e}function Pd(t,e){let{state:n}=t,o=n.facet(Sd),i=e=>{let n=t.lineBlockAt(t.posAtDOM(e.target)),o=yd(t.state,n.from,n.to);o&&t.dispatch({effects:gd.of(o)}),e.preventDefault()};if(o.placeholderDOM)return o.placeholderDOM(t,i,e);let r=document.createElement("span");return r.textContent=o.placeholderText,r.setAttribute("aria-label",n.phrase("folded code")),r.title=n.phrase("unfold"),r.className="cm-foldPlaceholder",r.onclick=i,r}const Cd=Ts.replace({widget:new class extends Ps{toDOM(t){return Pd(t,null)}}});class Td extends Ps{constructor(t){super(),this.value=t}eq(t){return this.value==t.value}toDOM(t){return Pd(t,this.value)}}const Ed={openText:"⌄",closedText:"›",markerDOM:null,domEventHandlers:{},foldingChanged:()=>!1};class Qd extends Mu{constructor(t,e){super(),this.config=t,this.open=e}eq(t){return this.config==t.config&&this.open==t.open}toDOM(t){if(this.config.markerDOM)return this.config.markerDOM(this.open);let e=document.createElement("span");return e.textContent=this.open?this.config.openText:this.config.closedText,e.title=t.state.phrase(this.open?"Fold line":"Unfold line"),e}}function Ad(t={}){let e=Object.assign(Object.assign({},Ed),t),n=new Qd(e,!0),o=new Qd(e,!1),i=Ks.fromClass(class{constructor(t){this.from=t.viewport.from,this.markers=this.buildMarkers(t)}update(t){(t.docChanged||t.viewportChanged||t.startState.facet(Yp)!=t.state.facet(Yp)||t.startState.field(vd,!1)!=t.state.field(vd,!1)||Zp(t.startState)!=Zp(t.state)||e.foldingChanged(t))&&(this.markers=this.buildMarkers(t.view))}buildMarkers(t){let e=new Bi;for(let i of t.viewportLineBlocks){let r=yd(t.state,i.from,i.to)?o:pd(t.state,i.from,i.to)?n:null;r&&e.add(i.from,i.from,r)}return e.finish()}}),{domEventHandlers:r}=e;return[i,Nu({class:"cm-foldGutter",markers(t){var e;return(null===(e=t.plugin(i))||void 0===e?void 0:e.markers)||Ui.empty},initialSpacer:()=>new Qd(e,!1),domEventHandlers:Object.assign(Object.assign({},r),{click:(t,e,n)=>{if(r.click&&r.click(t,e,n))return!0;let o=yd(t.state,e.from,e.to);if(o)return t.dispatch({effects:gd.of(o)}),!0;let i=pd(t.state,e.from,e.to);return!!i&&(t.dispatch({effects:fd.of(i)}),!0)}})}),kd()]}const $d=fc.baseTheme({".cm-foldPlaceholder":{backgroundColor:"#eee",border:"1px solid #ddd",color:"#888",borderRadius:".2em",margin:"0 1px",padding:"0 1px",cursor:"pointer"},".cm-foldGutter span":{padding:"0 1px",cursor:"pointer"}});class jd{constructor(t,e){let n;function o(t){let e=yr.newName();return(n||(n=Object.create(null)))["."+e]=t,e}this.specs=t;const i="string"==typeof e.all?e.all:e.all?o(e.all):void 0,r=e.scope;this.scope=r instanceof $p?t=>t.prop(Ep)==r.data:r?t=>t==r:void 0,this.style=cp(t.map((t=>({tag:t.tag,class:t.class||o(Object.assign({},t,{tag:null}))}))),{all:i}).style,this.module=n?new yr(n):null,this.themeType=e.themeType}static define(t,e){return new jd(t,e||{})}}const Rd=Jo.define(),Zd=Jo.define({combine:t=>t.length?[t[0]]:null});function Md(t){let e=t.facet(Rd);return e.length?e:t.facet(Zd)}function Vd(t,e){let n,o=[Id];return t instanceof jd&&(t.module&&o.push(fc.styleModule.of(t.module)),n=t.themeType),(null==e?void 0:e.fallback)?o.push(Zd.of(t)):n?o.push(Rd.computeN([fc.darkTheme],(e=>e.facet(fc.darkTheme)==("dark"==n)?[t]:[]))):o.push(Rd.of(t)),o}class Dd{constructor(t){this.markCache=Object.create(null),this.tree=Zp(t.state),this.decorations=this.buildDeco(t,Md(t.state))}update(t){let e=Zp(t.state),n=Md(t.state),o=n!=Md(t.startState);e.length{n.add(t,e,this.markCache[o]||(this.markCache[o]=Ts.mark({class:o})))}),o,i);return n.finish()}}const Id=pi.high(Ks.fromClass(Dd,{decorations:t=>t.decorations})),Nd=jd.define([{tag:Cp.meta,color:"#404740"},{tag:Cp.link,textDecoration:"underline"},{tag:Cp.heading,textDecoration:"underline",fontWeight:"bold"},{tag:Cp.emphasis,fontStyle:"italic"},{tag:Cp.strong,fontWeight:"bold"},{tag:Cp.strikethrough,textDecoration:"line-through"},{tag:Cp.keyword,color:"#708"},{tag:[Cp.atom,Cp.bool,Cp.url,Cp.contentSeparator,Cp.labelName],color:"#219"},{tag:[Cp.literal,Cp.inserted],color:"#164"},{tag:[Cp.string,Cp.deleted],color:"#a11"},{tag:[Cp.regexp,Cp.escape,Cp.special(Cp.string)],color:"#e40"},{tag:Cp.definition(Cp.variableName),color:"#00f"},{tag:Cp.local(Cp.variableName),color:"#30a"},{tag:[Cp.typeName,Cp.namespace],color:"#085"},{tag:Cp.className,color:"#167"},{tag:[Cp.special(Cp.variableName),Cp.macroName],color:"#256"},{tag:Cp.definition(Cp.propertyName),color:"#00c"},{tag:Cp.comment,color:"#940"},{tag:Cp.invalid,color:"#f00"}]),Wd=fc.baseTheme({"&.cm-focused .cm-matchingBracket":{backgroundColor:"#328c8252"},"&.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bb555544"}}),Xd=1e4,Ld="()[]{}",Yd=Jo.define({combine:t=>Xi(t,{afterCursor:!0,brackets:Ld,maxScanDistance:Xd,renderMatch:Ud})}),zd=Ts.mark({class:"cm-matchingBracket"}),qd=Ts.mark({class:"cm-nonmatchingBracket"});function Ud(t){let e=[],n=t.matched?zd:qd;return e.push(n.range(t.start.from,t.start.to)),t.end&&e.push(n.range(t.end.from,t.end.to)),e}const Bd=si.define({create:()=>Ts.none,update(t,e){if(!e.docChanged&&!e.selection)return t;let n=[],o=e.state.facet(Yd);for(let t of e.state.selection.ranges){if(!t.empty)continue;let i=tf(e.state,t.head,-1,o)||t.head>0&&tf(e.state,t.head-1,1,o)||o.afterCursor&&(tf(e.state,t.head,1,o)||t.headfc.decorations.from(t)}),Fd=[Bd,Wd];function Gd(t={}){return[Yd.of(t),Fd]}const Hd=new dh;function Kd(t,e,n){let o=t.prop(e<0?dh.openedBy:dh.closedBy);if(o)return o;if(1==t.name.length){let o=n.indexOf(t.name);if(o>-1&&o%2==(e<0?1:0))return[n[o+e]]}return null}function Jd(t){let e=t.type.prop(Hd);return e?e(t.node):t}function tf(t,e,n,o={}){let i=o.maxScanDistance||Xd,r=o.brackets||Ld,s=Zp(t),a=s.resolveInner(e,n);for(let o=a;o;o=o.parent){let i=Kd(o.type,n,r);if(i&&o.from0?e>=s.from&&es.from&&e<=s.to))return ef(t,e,n,o,s,i,r)}}return function(t,e,n,o,i,r,s){let a=n<0?t.sliceDoc(e-1,e):t.sliceDoc(e,e+1),l=s.indexOf(a);if(l<0||l%2==0!=n>0)return null;let c={from:n<0?e-1:e,to:n>0?e+1:e},u=t.doc.iterRange(e,n>0?t.doc.length:0),h=0;for(let t=0;!u.next().done&&t<=r;){let r=u.value;n<0&&(t+=r.length);let a=e+t*n;for(let t=n>0?0:r.length-1,e=n>0?r.length:-1;t!=e;t+=n){let e=s.indexOf(r[t]);if(!(e<0||o.resolveInner(a+t,1).type!=i))if(e%2==0==n>0)h++;else{if(1==h)return{start:c,end:{from:a+t,to:a+t+1},matched:e>>1==l>>1};h--}}n>0&&(t+=r.length)}return u.done?{start:c,matched:!1}:null}(t,e,n,s,a.type,i,r)}function ef(t,e,n,o,i,r,s){let a=o.parent,l={from:i.from,to:i.to},c=0,u=null==a?void 0:a.cursor();if(u&&(n<0?u.childBefore(o.from):u.childAfter(o.to)))do{if(n<0?u.to<=o.from:u.from>=o.to){if(0==c&&r.indexOf(u.type.name)>-1&&u.from-1||(rf.push(t),console.warn(e))}function cf(t,e){let n=[];for(let o of e.split(" ")){let e=[];for(let n of o.split(".")){let o=t[n]||Cp[n];o?"function"==typeof o?e.length?e=e.map(o):lf(n,`Modifier ${n} used at start of tag`):e.length?lf(n,`Tag ${n} used as modifier`):e=Array.isArray(o)?o:[o]:lf(n,`Unknown highlighting tag ${n}`)}for(let t of e)n.push(t)}if(!n.length)return 0;let o=e.replace(/ /g,"_"),i=o+" "+n.map((t=>t.id)),r=sf[i];if(r)return r.id;let s=sf[i]=mh.define({id:of.length,name:o,props:[sp({[o]:n})]});return of.push(s),s.id}function uf(t,e){return({state:n,dispatch:o})=>{if(n.readOnly)return!1;let i=t(e,n);return!!i&&(o(n.update(i)),!0)}}const hf=uf(vf,0),pf=(null&&uf(vf,1),null&&uf(vf,2),uf(mf,0)),df=(null&&uf(mf,1),null&&uf(mf,2),uf(((t,e)=>mf(t,e,function(t){let e=[];for(let n of t.selection.ranges){let o=t.doc.lineAt(n.from),i=n.to<=o.to?o:t.doc.lineAt(n.to),r=e.length-1;r>=0&&e[r].to>o.from?e[r].to=i.to:e.push({from:o.from+/^\s*/.exec(o.text)[0].length,to:i.to})}return e}(e))),0));function ff(t,e){let n=t.languageDataAt("commentTokens",e);return n.length?n[0]:{}}const gf=50;function mf(t,e,n=e.selection.ranges){let o=n.map((t=>ff(e,t.from).block));if(!o.every((t=>t)))return null;let i=n.map(((t,n)=>function(t,{open:e,close:n},o,i){let r,s,a=t.sliceDoc(o-gf,o),l=t.sliceDoc(i,i+gf),c=/\s*$/.exec(a)[0].length,u=/^\s*/.exec(l)[0].length,h=a.length-c;if(a.slice(h-e.length,h)==e&&l.slice(u,u+n.length)==n)return{open:{pos:o-c,margin:c&&1},close:{pos:i+u,margin:u&&1}};i-o<=2*gf?r=s=t.sliceDoc(o,i):(r=t.sliceDoc(o,o+gf),s=t.sliceDoc(i-gf,i));let p=/^\s*/.exec(r)[0].length,d=/\s*$/.exec(s)[0].length,f=s.length-d-n.length;return r.slice(p,p+e.length)==e&&s.slice(f,f+n.length)==n?{open:{pos:o+p+e.length,margin:/\s/.test(r.charAt(p+e.length))?1:0},close:{pos:i-d-n.length,margin:/\s/.test(s.charAt(f-1))?1:0}}:null}(e,o[n],t.from,t.to)));if(2!=t&&!i.every((t=>t)))return{changes:e.changes(n.map(((t,e)=>i[e]?[]:[{from:t.from,insert:o[e].open+" "},{from:t.to,insert:" "+o[e].close}])))};if(1!=t&&i.some((t=>t))){let t=[];for(let e,n=0;ni&&(t==r||r>l.from)){i=l.from;let t=/^\s*/.exec(l.text)[0].length,e=t==l.length,n=l.text.slice(t,t+a.length)==a?t:-1;tt.comment<0&&(!t.empty||t.single)))){let t=[];for(let{line:e,token:n,indent:i,empty:r,single:s}of o)!s&&r||t.push({from:e.from+i,insert:n+" "});let n=e.changes(t);return{changes:n,selection:e.selection.map(n,1)}}if(1!=t&&o.some((t=>t.comment>=0))){let t=[];for(let{line:e,comment:n,token:i}of o)if(n>=0){let o=e.from+n,r=o+i.length;" "==e.text[r-e.from]&&r++,t.push({from:o,to:r})}return{changes:t}}return null}const yf=Pi.define(),_f=Pi.define(),Of=Jo.define(),bf=Jo.define({combine:t=>Xi(t,{minDepth:100,newGroupDelay:500,joinToEvent:(t,e)=>e},{minDepth:Math.max,newGroupDelay:Math.min,joinToEvent:(t,e)=>(n,o)=>t(n,o)||e(n,o)})}),wf=si.define({create:()=>Nf.empty,update(t,e){let n=e.state.facet(bf),o=e.annotation(yf);if(o){let i=Qf.fromTransaction(e,o.selection),r=o.side,s=0==r?t.undone:t.done;return s=i?Af(s,s.length,n.minDepth,i):Zf(s,e.startState.selection),new Nf(0==r?o.rest:s,0==r?s:o.rest)}let i=e.annotation(_f);if("full"!=i&&"before"!=i||(t=t.isolate()),!1===e.annotation(Qi.addToHistory))return e.changes.empty?t:t.addMapping(e.changes.desc);let r=Qf.fromTransaction(e),s=e.annotation(Qi.time),a=e.annotation(Qi.userEvent);return r?t=t.addChanges(r,s,a,n,e):e.selection&&(t=t.addSelection(e.startState.selection,s,a,n.newGroupDelay)),"full"!=i&&"after"!=i||(t=t.isolate()),t},toJSON:t=>({done:t.done.map((t=>t.toJSON())),undone:t.undone.map((t=>t.toJSON()))}),fromJSON:t=>new Nf(t.done.map(Qf.fromJSON),t.undone.map(Qf.fromJSON))});function xf(t={}){return[wf,bf.of(t),fc.domEventHandlers({beforeinput(t,e){let n="historyUndo"==t.inputType?kf:"historyRedo"==t.inputType?Pf:null;return!!n&&(t.preventDefault(),n(e))}})]}function Sf(t,e){return function({state:n,dispatch:o}){if(!e&&n.readOnly)return!1;let i=n.field(wf,!1);if(!i)return!1;let r=i.pop(t,n,e);return!!r&&(o(r),!0)}}const kf=Sf(0,!1),Pf=Sf(1,!1),Cf=Sf(0,!0),Tf=Sf(1,!0);function Ef(t){return function(e){let n=e.field(wf,!1);if(!n)return 0;let o=0==t?n.done:n.undone;return o.length-(o.length&&!o[0].changes?1:0)}}null&&Ef(0),null&&Ef(1);class Qf{constructor(t,e,n,o,i){this.changes=t,this.effects=e,this.mapped=n,this.startSelection=o,this.selectionsAfter=i}setSelAfter(t){return new Qf(this.changes,this.effects,this.mapped,this.startSelection,t)}toJSON(){var t,e,n;return{changes:null===(t=this.changes)||void 0===t?void 0:t.toJSON(),mapped:null===(e=this.mapped)||void 0===e?void 0:e.toJSON(),startSelection:null===(n=this.startSelection)||void 0===n?void 0:n.toJSON(),selectionsAfter:this.selectionsAfter.map((t=>t.toJSON()))}}static fromJSON(t){return new Qf(t.changes&&Xo.fromJSON(t.changes),[],t.mapped&&Wo.fromJSON(t.mapped),t.startSelection&&Go.fromJSON(t.startSelection),t.selectionsAfter.map(Go.fromJSON))}static fromTransaction(t,e){let n=jf;for(let e of t.startState.facet(Of)){let o=e(t);o.length&&(n=n.concat(o))}return!n.length&&t.changes.empty?null:new Qf(t.changes.invert(t.startState.doc),n,void 0,e||t.startState.selection,jf)}static selection(t){return new Qf(void 0,jf,void 0,void 0,t)}}function Af(t,e,n,o){let i=e+1>n+20?e-n-1:0,r=t.slice(i,e);return r.push(o),r}function $f(t,e){return t.length?e.length?t.concat(e):t:e}const jf=[],Rf=200;function Zf(t,e){if(t.length){let n=t[t.length-1],o=n.selectionsAfter.slice(Math.max(0,n.selectionsAfter.length-Rf));return o.length&&o[o.length-1].eq(e)?t:(o.push(e),Af(t,t.length-1,1e9,n.setSelAfter(o)))}return[Qf.selection([e])]}function Mf(t){let e=t[t.length-1],n=t.slice();return n[t.length-1]=e.setSelAfter(e.selectionsAfter.slice(0,e.selectionsAfter.length-1)),n}function Vf(t,e){if(!t.length)return t;let n=t.length,o=jf;for(;n;){let i=Df(t[n-1],e,o);if(i.changes&&!i.changes.empty||i.effects.length){let e=t.slice(0,n);return e[n-1]=i,e}e=i.mapped,n--,o=i.selectionsAfter}return o.length?[Qf.selection(o)]:jf}function Df(t,e,n){let o=$f(t.selectionsAfter.length?t.selectionsAfter.map((t=>t.map(e))):jf,n);if(!t.changes)return Qf.selection(o);let i=t.changes.map(e),r=e.mapDesc(t.changes,!0),s=t.mapped?t.mapped.composeDesc(r):r;return new Qf(i,Ei.mapEffects(t.effects,e),s,t.startSelection.map(r),o)}const If=/^(input\.type|delete)($|\.)/;class Nf{constructor(t,e,n=0,o=void 0){this.done=t,this.undone=e,this.prevTime=n,this.prevUserEvent=o}isolate(){return this.prevTime?new Nf(this.done,this.undone):this}addChanges(t,e,n,o,i){let r=this.done,s=r[r.length-1];return r=s&&s.changes&&!s.changes.empty&&t.changes&&(!n||If.test(n))&&(!s.selectionsAfter.length&&e-this.prevTimen.push(t,e))),e.iterChangedRanges(((t,e,i,r)=>{for(let t=0;t=e&&i<=s&&(o=!0)}})),o}(s.changes,t.changes))||"input.type.compose"==n)?Af(r,r.length-1,o.minDepth,new Qf(t.changes.compose(s.changes),$f(t.effects,s.effects),s.mapped,s.startSelection,jf)):Af(r,r.length,o.minDepth,t),new Nf(r,jf,e,n)}addSelection(t,e,n,o){let i=this.done.length?this.done[this.done.length-1].selectionsAfter:jf;return i.length>0&&e-this.prevTimet.empty!=e.ranges[n].empty)).length}(i[i.length-1],t)?this:new Nf(Zf(this.done,t),this.undone,e,n)}addMapping(t){return new Nf(Vf(this.done,t),Vf(this.undone,t),this.prevTime,this.prevUserEvent)}pop(t,e,n){let o=0==t?this.done:this.undone;if(0==o.length)return null;let i=o[o.length-1],r=i.selectionsAfter[0]||e.selection;if(n&&i.selectionsAfter.length)return e.update({selection:i.selectionsAfter[i.selectionsAfter.length-1],annotations:yf.of({side:t,rest:Mf(o),selection:r}),userEvent:0==t?"select.undo":"select.redo",scrollIntoView:!0});if(i.changes){let n=1==o.length?jf:o.slice(0,o.length-1);return i.mapped&&(n=Vf(n,i.mapped)),e.update({changes:i.changes,selection:i.startSelection,effects:i.effects,annotations:yf.of({side:t,rest:n,selection:r}),filter:!1,userEvent:0==t?"undo":"redo",scrollIntoView:!0})}return null}}Nf.empty=new Nf(jf,jf);const Wf=[{key:"Mod-z",run:kf,preventDefault:!0},{key:"Mod-y",mac:"Mod-Shift-z",run:Pf,preventDefault:!0},{linux:"Ctrl-Shift-z",run:Pf,preventDefault:!0},{key:"Mod-u",run:Cf,preventDefault:!0},{key:"Alt-u",mac:"Mod-Shift-u",run:Tf,preventDefault:!0}];function Xf(t,e){return Go.create(t.ranges.map(e),t.mainIndex)}function Lf(t,e){return t.update({selection:e,scrollIntoView:!0,userEvent:"select"})}function Yf({state:t,dispatch:e},n){let o=Xf(t.selection,n);return!o.eq(t.selection)&&(e(Lf(t,o)),!0)}function zf(t,e){return Go.cursor(e?t.to:t.from)}function qf(t,e){return Yf(t,(n=>n.empty?t.moveByChar(n,e):zf(n,e)))}function Uf(t){return t.textDirectionAt(t.state.selection.main.head)==ha.LTR}const Bf=t=>qf(t,!Uf(t)),Ff=t=>qf(t,Uf(t));function Gf(t,e){return Yf(t,(n=>n.empty?t.moveByGroup(n,e):zf(n,e)))}"undefined"!=typeof Intl&&Intl.Segmenter;function Hf(t,e,n){if(e.type.prop(n))return!0;let o=e.to-e.from;return o&&(o>2||/[^\s,.;:]/.test(t.sliceDoc(e.from,e.to)))||e.firstChild}function Kf(t,e,n){let o,i,r=Zp(t).resolveInner(e.head),s=n?dh.closedBy:dh.openedBy;for(let o=e.head;;){let e=n?r.childAfter(o):r.childBefore(o);if(!e)break;Hf(t,e,s)?r=e:o=n?e.to:e.from}return i=r.type.prop(s)&&(o=n?tf(t,r.from,1):tf(t,r.to,-1))&&o.matched?n?o.end.to:o.end.from:n?r.to:r.from,Go.cursor(i,n?-1:1)}function Jf(t,e){return Yf(t,(n=>{if(!n.empty)return zf(n,e);let o=t.moveVertically(n,e);return o.head!=n.head?o:t.moveToLineBoundary(n,e)}))}const tg=t=>Jf(t,!1),eg=t=>Jf(t,!0);function ng(t){let e,n=t.scrollDOM.clientHeightn.empty?t.moveVertically(n,e,o.height):zf(n,e)));if(r.eq(i.selection))return!1;if(o.selfScroll){let e=t.coordsAtPos(i.selection.main.head),s=t.scrollDOM.getBoundingClientRect(),a=s.top+o.marginTop,l=s.bottom-o.marginBottom;e&&e.top>a&&e.bottomog(t,!1),rg=t=>og(t,!0);function sg(t,e,n){let o=t.lineBlockAt(e.head),i=t.moveToLineBoundary(e,n);if(i.head==e.head&&i.head!=(n?o.to:o.from)&&(i=t.moveToLineBoundary(e,n,!1)),!n&&i.head==o.from&&o.length){let n=/^\s*/.exec(t.state.sliceDoc(o.from,Math.min(o.from+100,o.to)))[0].length;n&&e.head!=o.from+n&&(i=Go.cursor(o.from+n))}return i}function ag(t,e,n){let o=!1,i=Xf(t.selection,(e=>{let i=tf(t,e.head,-1)||tf(t,e.head,1)||e.head>0&&tf(t,e.head-1,1)||e.head{let n=e(t);return Go.range(t.anchor,n.head,n.goalColumn,n.bidiLevel||void 0)}));return!n.eq(t.state.selection)&&(t.dispatch(Lf(t.state,n)),!0)}function cg(t,e){return lg(t,(n=>t.moveByChar(n,e)))}const ug=t=>cg(t,!Uf(t)),hg=t=>cg(t,Uf(t));function pg(t,e){return lg(t,(n=>t.moveByGroup(n,e)))}function dg(t,e){return lg(t,(n=>t.moveVertically(n,e)))}const fg=t=>dg(t,!1),gg=t=>dg(t,!0);function mg(t,e){return lg(t,(n=>t.moveVertically(n,e,ng(t).height)))}const vg=t=>mg(t,!1),yg=t=>mg(t,!0),_g=({state:t,dispatch:e})=>(e(Lf(t,{anchor:0})),!0),Og=({state:t,dispatch:e})=>(e(Lf(t,{anchor:t.doc.length})),!0),bg=({state:t,dispatch:e})=>(e(Lf(t,{anchor:t.selection.main.anchor,head:0})),!0),wg=({state:t,dispatch:e})=>(e(Lf(t,{anchor:t.selection.main.anchor,head:t.doc.length})),!0);function xg(t,e){if(t.state.readOnly)return!1;let n="delete.selection",{state:o}=t,i=o.changeByRange((o=>{let{from:i,to:r}=o;if(i==r){let s=e(o);si&&(n="delete.forward",s=Sg(t,s,!0)),i=Math.min(i,s),r=Math.max(r,s)}else i=Sg(t,i,!1),r=Sg(t,r,!0);return i==r?{range:o}:{changes:{from:i,to:r},range:Go.cursor(i,ie(t))))o.between(e,e,((t,o)=>{te&&(e=n?o:t)}));return e}const kg=(t,e)=>xg(t,(n=>{let o,i,r=n.from,{state:s}=t,a=s.doc.lineAt(r);if(!e&&r>a.from&&rkg(t,!1),Cg=t=>kg(t,!0),Tg=(t,e)=>xg(t,(n=>{let o=n.head,{state:i}=t,r=i.doc.lineAt(o),s=i.charCategorizer(o);for(let t=null;;){if(o==(e?r.to:r.from)){o==n.head&&r.number!=(e?i.doc.lines:1)&&(o+=e?1:-1);break}let a=Ao(r.text,o-r.from,e)+r.from,l=r.text.slice(Math.min(o,a)-r.from,Math.max(o,a)-r.from),c=s(l);if(null!=t&&c!=t)break;" "==l&&o==n.head||(t=c),o=a}return o})),Eg=t=>Tg(t,!1);function Qg(t){let e=[],n=-1;for(let o of t.selection.ranges){let i=t.doc.lineAt(o.from),r=t.doc.lineAt(o.to);if(o.empty||o.to!=r.from||(r=t.doc.lineAt(o.to-1)),n>=i.number){let t=e[e.length-1];t.to=r.to,t.ranges.push(o)}else e.push({from:i.from,to:r.to,ranges:[o]});n=r.number+1}return e}function Ag(t,e,n){if(t.readOnly)return!1;let o=[],i=[];for(let e of Qg(t)){if(n?e.to==t.doc.length:0==e.from)continue;let r=t.doc.lineAt(n?e.to+1:e.from-1),s=r.length+1;if(n){o.push({from:e.to,to:r.to},{from:e.from,insert:r.text+t.lineBreak});for(let n of e.ranges)i.push(Go.range(Math.min(t.doc.length,n.anchor+s),Math.min(t.doc.length,n.head+s)))}else{o.push({from:r.from,to:e.from},{from:e.to,insert:t.lineBreak+r.text});for(let t of e.ranges)i.push(Go.range(t.anchor-s,t.head-s))}}return!!o.length&&(e(t.update({changes:o,scrollIntoView:!0,selection:Go.create(i,t.selection.mainIndex),userEvent:"move.line"})),!0)}function $g(t,e,n){if(t.readOnly)return!1;let o=[];for(let e of Qg(t))n?o.push({from:e.from,insert:t.doc.slice(e.from,e.to)+t.lineBreak}):o.push({from:e.to,insert:t.lineBreak+t.doc.slice(e.from,e.to)});return e(t.update({changes:o,scrollIntoView:!0,userEvent:"input.copyline"})),!0}const jg=Zg(!1),Rg=Zg(!0);function Zg(t){return({state:e,dispatch:n})=>{if(e.readOnly)return!1;let o=e.changeByRange((n=>{let{from:o,to:i}=n,r=e.doc.lineAt(o),s=!t&&o==i&&function(t,e){if(/\(\)|\[\]|\{\}/.test(t.sliceDoc(e-1,e+1)))return{from:e,to:e};let n,o=Zp(t).resolveInner(e),i=o.childBefore(e),r=o.childAfter(e);return i&&r&&i.to<=e&&r.from>=e&&(n=i.type.prop(dh.closedBy))&&n.indexOf(r.name)>-1&&t.doc.lineAt(i.to).from==t.doc.lineAt(r.from).from&&!/\S/.test(t.sliceDoc(i.to,r.from))?{from:i.to,to:r.from}:null}(e,o);t&&(o=i=(i<=r.to?r:e.doc.lineAt(i)).to);let a=new Hp(e,{simulateBreak:o,simulateDoubleBreak:!!s}),l=Gp(a,o);for(null==l&&(l=rr(/^\s*/.exec(e.doc.lineAt(o).text)[0],e.tabSize));ir.from&&o{let i=[];for(let r=o.from;r<=o.to;){let s=t.doc.lineAt(r);s.number>n&&(o.empty||o.to>s.from)&&(e(s,i,o),n=s.number),r=s.to+1}let r=t.changes(i);return{changes:i,range:Go.range(r.mapPos(o.anchor,1),r.mapPos(o.head,1))}}))}const Vg=({state:t,dispatch:e})=>!t.readOnly&&(e(t.update(Mg(t,((e,n)=>{n.push({from:e.from,insert:t.facet(Up)})})),{userEvent:"input.indent"})),!0),Dg=({state:t,dispatch:e})=>!t.readOnly&&(e(t.update(Mg(t,((e,n)=>{let o=/^\s*/.exec(e.text)[0];if(!o)return;let i=rr(o,t.tabSize),r=0,s=Fp(t,Math.max(0,i-Bp(t)));for(;rYf(t,(e=>Go.cursor(t.lineBlockAt(e.head).from,1))),shift:t=>lg(t,(e=>Go.cursor(t.lineBlockAt(e.head).from)))},{key:"Ctrl-e",run:t=>Yf(t,(e=>Go.cursor(t.lineBlockAt(e.head).to,-1))),shift:t=>lg(t,(e=>Go.cursor(t.lineBlockAt(e.head).to)))},{key:"Ctrl-d",run:Cg},{key:"Ctrl-h",run:Pg},{key:"Ctrl-k",run:t=>xg(t,(e=>{let n=t.lineBlockAt(e.head).to;return e.head{if(t.readOnly)return!1;let n=t.changeByRange((t=>({changes:{from:t.from,to:t.to,insert:vo.of(["",""])},range:Go.cursor(t.from)})));return e(t.update(n,{scrollIntoView:!0,userEvent:"input"})),!0}},{key:"Ctrl-t",run:({state:t,dispatch:e})=>{if(t.readOnly)return!1;let n=t.changeByRange((e=>{if(!e.empty||0==e.from||e.from==t.doc.length)return{range:e};let n=e.from,o=t.doc.lineAt(n),i=n==o.from?n-1:Ao(o.text,n-o.from,!1)+o.from,r=n==o.to?n+1:Ao(o.text,n-o.from,!0)+o.from;return{changes:{from:i,to:r,insert:t.doc.slice(n,r).append(t.doc.slice(i,n))},range:Go.cursor(r)}}));return!n.changes.empty&&(e(t.update(n,{scrollIntoView:!0,userEvent:"move.character"})),!0)}},{key:"Ctrl-v",run:rg}],Ng=[{key:"ArrowLeft",run:Bf,shift:ug,preventDefault:!0},{key:"Mod-ArrowLeft",mac:"Alt-ArrowLeft",run:t=>Gf(t,!Uf(t)),shift:t=>pg(t,!Uf(t)),preventDefault:!0},{mac:"Cmd-ArrowLeft",run:t=>Yf(t,(e=>sg(t,e,!Uf(t)))),shift:t=>lg(t,(e=>sg(t,e,!Uf(t)))),preventDefault:!0},{key:"ArrowRight",run:Ff,shift:hg,preventDefault:!0},{key:"Mod-ArrowRight",mac:"Alt-ArrowRight",run:t=>Gf(t,Uf(t)),shift:t=>pg(t,Uf(t)),preventDefault:!0},{mac:"Cmd-ArrowRight",run:t=>Yf(t,(e=>sg(t,e,Uf(t)))),shift:t=>lg(t,(e=>sg(t,e,Uf(t)))),preventDefault:!0},{key:"ArrowUp",run:tg,shift:fg,preventDefault:!0},{mac:"Cmd-ArrowUp",run:_g,shift:bg},{mac:"Ctrl-ArrowUp",run:ig,shift:vg},{key:"ArrowDown",run:eg,shift:gg,preventDefault:!0},{mac:"Cmd-ArrowDown",run:Og,shift:wg},{mac:"Ctrl-ArrowDown",run:rg,shift:yg},{key:"PageUp",run:ig,shift:vg},{key:"PageDown",run:rg,shift:yg},{key:"Home",run:t=>Yf(t,(e=>sg(t,e,!1))),shift:t=>lg(t,(e=>sg(t,e,!1))),preventDefault:!0},{key:"Mod-Home",run:_g,shift:bg},{key:"End",run:t=>Yf(t,(e=>sg(t,e,!0))),shift:t=>lg(t,(e=>sg(t,e,!0))),preventDefault:!0},{key:"Mod-End",run:Og,shift:wg},{key:"Enter",run:jg},{key:"Mod-a",run:({state:t,dispatch:e})=>(e(t.update({selection:{anchor:0,head:t.doc.length},userEvent:"select"})),!0)},{key:"Backspace",run:Pg,shift:Pg},{key:"Delete",run:Cg},{key:"Mod-Backspace",mac:"Alt-Backspace",run:Eg},{key:"Mod-Delete",mac:"Alt-Delete",run:t=>Tg(t,!0)},{mac:"Mod-Backspace",run:t=>xg(t,(e=>{let n=t.moveToLineBoundary(e,!1).head;return e.head>n?n:Math.max(0,e.head-1)}))},{mac:"Mod-Delete",run:t=>xg(t,(e=>{let n=t.moveToLineBoundary(e,!0).head;return e.head({mac:t.key,run:t.run,shift:t.shift})))),Wg=[{key:"Alt-ArrowLeft",mac:"Ctrl-ArrowLeft",run:t=>Yf(t,(e=>Kf(t.state,e,!Uf(t)))),shift:t=>lg(t,(e=>Kf(t.state,e,!Uf(t))))},{key:"Alt-ArrowRight",mac:"Ctrl-ArrowRight",run:t=>Yf(t,(e=>Kf(t.state,e,Uf(t)))),shift:t=>lg(t,(e=>Kf(t.state,e,Uf(t))))},{key:"Alt-ArrowUp",run:({state:t,dispatch:e})=>Ag(t,e,!1)},{key:"Shift-Alt-ArrowUp",run:({state:t,dispatch:e})=>$g(t,e,!1)},{key:"Alt-ArrowDown",run:({state:t,dispatch:e})=>Ag(t,e,!0)},{key:"Shift-Alt-ArrowDown",run:({state:t,dispatch:e})=>$g(t,e,!0)},{key:"Escape",run:({state:t,dispatch:e})=>{let n=t.selection,o=null;return n.ranges.length>1?o=Go.create([n.main]):n.main.empty||(o=Go.create([Go.cursor(n.main.head)])),!!o&&(e(Lf(t,o)),!0)}},{key:"Mod-Enter",run:Rg},{key:"Alt-l",mac:"Ctrl-l",run:({state:t,dispatch:e})=>{let n=Qg(t).map((({from:e,to:n})=>Go.range(e,Math.min(n+1,t.doc.length))));return e(t.update({selection:Go.create(n),userEvent:"select"})),!0}},{key:"Mod-i",run:({state:t,dispatch:e})=>{let n=Xf(t.selection,(e=>{var n;for(let o=Zp(t).resolveStack(e.from,1);o;o=o.next){let{node:t}=o;if((t.from=e.to||t.to>e.to&&t.from<=e.from)&&(null===(n=t.parent)||void 0===n?void 0:n.parent))return Go.range(t.to,t.from)}return e}));return e(Lf(t,n)),!0},preventDefault:!0},{key:"Mod-[",run:Dg},{key:"Mod-]",run:Vg},{key:"Mod-Alt-\\",run:({state:t,dispatch:e})=>{if(t.readOnly)return!1;let n=Object.create(null),o=new Hp(t,{overrideIndentation:t=>{let e=n[t];return null==e?-1:e}}),i=Mg(t,((e,i,r)=>{let s=Gp(o,e.from);if(null==s)return;/\S/.test(e.text)||(s=0);let a=/^\s*/.exec(e.text)[0],l=Fp(t,s);(a!=l||r.from{if(t.state.readOnly)return!1;let{state:e}=t,n=e.changes(Qg(e).map((({from:t,to:n})=>(t>0?t--:nt.moveVertically(e,!0))).map(n);return t.dispatch({changes:n,selection:o,scrollIntoView:!0,userEvent:"delete.line"}),!0}},{key:"Shift-Mod-\\",run:({state:t,dispatch:e})=>ag(t,e,!1)},{key:"Mod-/",run:t=>{let{state:e}=t,n=e.doc.lineAt(e.selection.main.from),o=ff(t.state,n.from);return o.line?hf(t):!!o.block&&df(t)}},{key:"Alt-A",run:pf}].concat(Ng);function Xg(){var t=arguments[0];"string"==typeof t&&(t=document.createElement(t));var e=1,n=arguments[1];if(n&&"object"==typeof n&&null==n.nodeType&&!Array.isArray(n)){for(var o in n)if(Object.prototype.hasOwnProperty.call(n,o)){var i=n[o];"string"==typeof i?t.setAttribute(o,i):null!=i&&(t[o]=i)}e++}for(;et.normalize("NFKD"):t=>t;class zg{constructor(t,e,n=0,o=t.length,i,r){this.test=r,this.value={from:0,to:0},this.done=!1,this.matches=[],this.buffer="",this.bufferPos=0,this.iter=t.iterRange(n,o),this.bufferStart=n,this.normalize=i?t=>i(Yg(t)):Yg,this.query=this.normalize(e)}peek(){if(this.bufferPos==this.buffer.length){if(this.bufferStart+=this.buffer.length,this.iter.next(),this.iter.done)return-1;this.bufferPos=0,this.buffer=this.iter.value}return Mo(this.buffer,this.bufferPos)}next(){for(;this.matches.length;)this.matches.pop();return this.nextOverlapping()}nextOverlapping(){for(;;){let t=this.peek();if(t<0)return this.done=!0,this;let e=Vo(t),n=this.bufferStart+this.bufferPos;this.bufferPos+=Do(t);let o=this.normalize(e);for(let t=0,i=n;;t++){let r=o.charCodeAt(t),s=this.match(r,i);if(t==o.length-1){if(s)return this.value=s,this;break}i==n&&tthis.to&&(this.curLine=this.curLine.slice(0,this.to-this.curLineStart)),this.iter.next())}nextLine(){this.curLineStart=this.curLineStart+this.curLine.length+1,this.curLineStart>this.to?this.curLine="":this.getLine(0)}next(){for(let t=this.matchPos-this.curLineStart;;){this.re.lastIndex=t;let e=this.matchPos<=this.to&&this.re.exec(this.curLine);if(e){let n=this.curLineStart+e.index,o=n+e[0].length;if(this.matchPos=Kg(this.text,o+(n==o?1:0)),n==this.curLineStart+this.curLine.length&&this.nextLine(),(nthis.value.to)&&(!this.test||this.test(n,o,e)))return this.value={from:n,to:o,match:e},this;t=this.matchPos-this.curLineStart}else{if(!(this.curLineStart+this.curLine.length=n||o.to<=e){let o=new Gg(e,t.sliceString(e,n));return Fg.set(t,o),o}if(o.from==e&&o.to==n)return o;let{text:i,from:r}=o;return r>e&&(i=t.sliceString(e,r)+i,r=e),o.to=this.to?this.to:this.text.lineAt(t).to}next(){for(;;){let t=this.re.lastIndex=this.matchPos-this.flat.from,e=this.re.exec(this.flat.text);if(e&&!e[0]&&e.index==t&&(this.re.lastIndex=t+1,e=this.re.exec(this.flat.text)),e){let t=this.flat.from+e.index,n=t+e[0].length;if((this.flat.to>=this.to||e.index+e[0].length<=this.flat.text.length-10)&&(!this.test||this.test(t,n,e)))return this.value={from:t,to:n,match:e},this.matchPos=Kg(this.text,n+(t==n?1:0)),this}if(this.flat.to==this.to)return this.done=!0,this;this.flat=Gg.get(this.text,this.flat.from,this.chunkEnd(this.flat.from+2*this.flat.text.length))}}}function Kg(t,e){if(e>=t.length)return e;let n,o=t.lineAt(e);for(;e=56320&&n<57344;)e++;return e}function Jg(t){let e=Xg("input",{class:"cm-textfield",name:"line",value:String(t.state.doc.lineAt(t.state.selection.main.head).number)});function n(){let n=/^([+-])?(\d+)?(:\d+)?(%)?$/.exec(e.value);if(!n)return;let{state:o}=t,i=o.doc.lineAt(o.selection.main.head),[,r,s,a,l]=n,c=a?+a.slice(1):0,u=s?+s:i.number;if(s&&l){let t=u/100;r&&(t=t*("-"==r?-1:1)+i.number/o.doc.lines),u=Math.round(o.doc.lines*t)}else s&&r&&(u=u*("-"==r?-1:1)+i.number);let h=o.doc.line(Math.max(1,Math.min(o.doc.lines,u))),p=Go.cursor(h.from+Math.max(0,Math.min(c,h.length)));t.dispatch({effects:[tm.of(!1),fc.scrollIntoView(p.from,{y:'center'})],selection:p}),t.focus()}return{dom:Xg("form",{class:"cm-gotoLine",onkeydown:e=>{27==e.keyCode?(e.preventDefault(),t.dispatch({effects:tm.of(!1)}),t.focus()):13==e.keyCode&&(e.preventDefault(),n())},onsubmit:t=>{t.preventDefault(),n()}},Xg("label",t.state.phrase("Go to line"),": ",e)," ",Xg("button",{class:"cm-button",type:"submit"},t.state.phrase("go")))}}"undefined"!=typeof Symbol&&(Bg.prototype[Symbol.iterator]=Hg.prototype[Symbol.iterator]=function(){return this});const tm=Ei.define(),em=si.define({create:()=>!0,update(t,e){for(let n of e.effects)n.is(tm)&&(t=n.value);return t},provide:t=>Zu.from(t,(t=>t?Jg:null))}),nm=fc.baseTheme({".cm-panel.cm-gotoLine":{padding:"2px 6px 4px","& label":{fontSize:"80%"}}}),om={highlightWordAroundCursor:!1,minSelectionLength:1,maxMatches:100,wholeWords:!1},im=Jo.define({combine:t=>Xi(t,om,{highlightWordAroundCursor:(t,e)=>t||e,minSelectionLength:Math.min,maxMatches:Math.min})});function rm(t){let e=[um,cm];return t&&e.push(im.of(t)),e}const sm=Ts.mark({class:"cm-selectionMatch"}),am=Ts.mark({class:"cm-selectionMatch cm-selectionMatch-main"});function lm(t,e,n,o){return!(0!=n&&t(e.sliceDoc(n-1,n))==Vi.Word||o!=e.doc.length&&t(e.sliceDoc(o,o+1))==Vi.Word)}const cm=Ks.fromClass(class{constructor(t){this.decorations=this.getDeco(t)}update(t){(t.selectionSet||t.docChanged||t.viewportChanged)&&(this.decorations=this.getDeco(t.view))}getDeco(t){let e=t.state.facet(im),{state:n}=t,o=n.selection;if(o.ranges.length>1)return Ts.none;let i,r=o.main,s=null;if(r.empty){if(!e.highlightWordAroundCursor)return Ts.none;let t=n.wordAt(r.head);if(!t)return Ts.none;s=n.charCategorizer(r.head),i=n.sliceDoc(t.from,t.to)}else{let t=r.to-r.from;if(t200)return Ts.none;if(e.wholeWords){if(i=n.sliceDoc(r.from,r.to),s=n.charCategorizer(r.head),!lm(s,n,r.from,r.to)||!function(t,e,n,o){return t(e.sliceDoc(n,n+1))==Vi.Word&&t(e.sliceDoc(o-1,o))==Vi.Word}(s,n,r.from,r.to))return Ts.none}else if(i=n.sliceDoc(r.from,r.to).trim(),!i)return Ts.none}let a=[];for(let o of t.visibleRanges){let t=new zg(n.doc,i,o.from,o.to);for(;!t.next().done;){let{from:o,to:i}=t.value;if((!s||lm(s,n,o,i))&&(r.empty&&o<=r.from&&i>=r.to?a.push(am.range(o,i)):(o>=r.to||i<=r.from)&&a.push(sm.range(o,i)),a.length>e.maxMatches))return Ts.none}}return Ts.set(a)}},{decorations:t=>t.decorations}),um=fc.baseTheme({".cm-selectionMatch":{backgroundColor:"#99ff7780"},".cm-searchMatch .cm-selectionMatch":{backgroundColor:"transparent"}});const hm=Jo.define({combine:t=>Xi(t,{top:!1,caseSensitive:!1,literal:!1,regexp:!1,wholeWord:!1,createPanel:t=>new Nm(t),scrollToMatch:t=>fc.scrollIntoView(t)})});class pm{constructor(t){this.search=t.search,this.caseSensitive=!!t.caseSensitive,this.literal=!!t.literal,this.regexp=!!t.regexp,this.replace=t.replace||"",this.valid=!!this.search&&(!this.regexp||function(t){try{return new RegExp(t,Ug),!0}catch(t){return!1}}(this.search)),this.unquoted=this.unquote(this.search),this.wholeWord=!!t.wholeWord}unquote(t){return this.literal?t:t.replace(/\\([nrt\\])/g,((t,e)=>"n"==e?"\n":"r"==e?"\r":"t"==e?"\t":"\\"))}eq(t){return this.search==t.search&&this.replace==t.replace&&this.caseSensitive==t.caseSensitive&&this.regexp==t.regexp&&this.wholeWord==t.wholeWord}create(){return this.regexp?new _m(this):new gm(this)}getCursor(t,e=0,n){let o=t.doc?t:Wi.create({doc:t});return null==n&&(n=o.doc.length),this.regexp?mm(this,o,e,n):fm(this,o,e,n)}}class dm{constructor(t){this.spec=t}}function fm(t,e,n,o){return new zg(e.doc,t.unquoted,n,o,t.caseSensitive?void 0:t=>t.toLowerCase(),t.wholeWord?function(t,e){return(n,o,i,r)=>((r>n||r+i.length=e)return null;o.push(n.value)}return o}highlight(t,e,n,o){let i=fm(this.spec,t,Math.max(0,e-this.spec.unquoted.length),Math.min(n+this.spec.unquoted.length,t.doc.length));for(;!i.next().done;)o(i.value.from,i.value.to)}}function mm(t,e,n,o){return new Bg(e.doc,t.search,{ignoreCase:!t.caseSensitive,test:t.wholeWord?(i=e.charCategorizer(e.selection.main.head),(t,e,n)=>!n[0].length||(i(vm(n.input,n.index))!=Vi.Word||i(ym(n.input,n.index))!=Vi.Word)&&(i(ym(n.input,n.index+n[0].length))!=Vi.Word||i(vm(n.input,n.index+n[0].length))!=Vi.Word)):void 0},n,o);var i}function vm(t,e){return t.slice(Ao(t,e,!1),e)}function ym(t,e){return t.slice(e,Ao(t,e))}class _m extends dm{nextMatch(t,e,n){let o=mm(this.spec,t,n,t.doc.length).next();return o.done&&(o=mm(this.spec,t,0,e).next()),o.done?null:o.value}prevMatchInRange(t,e,n){for(let o=1;;o++){let i=Math.max(e,n-1e4*o),r=mm(this.spec,t,i,n),s=null;for(;!r.next().done;)s=r.value;if(s&&(i==e||s.from>i+10))return s;if(i==e)return null}}prevMatch(t,e,n){return this.prevMatchInRange(t,0,e)||this.prevMatchInRange(t,n,t.doc.length)}getReplacement(t){return this.spec.unquote(this.spec.replace).replace(/\$([$&\d+])/g,((e,n)=>"$"==n?"$":"&"==n?t.match[0]:"0"!=n&&+n=e)return null;o.push(n.value)}return o}highlight(t,e,n,o){let i=mm(this.spec,t,Math.max(0,e-250),Math.min(n+250,t.doc.length));for(;!i.next().done;)o(i.value.from,i.value.to)}}const Om=Ei.define(),bm=Ei.define(),wm=si.define({create:t=>new xm(Rm(t).create(),null),update(t,e){for(let n of e.effects)n.is(Om)?t=new xm(n.value.create(),t.panel):n.is(bm)&&(t=new xm(t.query,n.value?jm:null));return t},provide:t=>Zu.from(t,(t=>t.panel))});class xm{constructor(t,e){this.query=t,this.panel=e}}const Sm=Ts.mark({class:"cm-searchMatch"}),km=Ts.mark({class:"cm-searchMatch cm-searchMatch-selected"}),Pm=Ks.fromClass(class{constructor(t){this.view=t,this.decorations=this.highlight(t.state.field(wm))}update(t){let e=t.state.field(wm);(e!=t.startState.field(wm)||t.docChanged||t.selectionSet||t.viewportChanged)&&(this.decorations=this.highlight(e))}highlight({query:t,panel:e}){if(!e||!t.spec.valid)return Ts.none;let{view:n}=this,o=new Bi;for(let e=0,i=n.visibleRanges,r=i.length;ei[e+1].from-2*250;)a=i[++e].to;t.highlight(n.state,s,a,((t,e)=>{let i=n.state.selection.ranges.some((n=>n.from==t&&n.to==e));o.add(t,e,i?km:Sm)}))}return o.finish()}},{decorations:t=>t.decorations});function Cm(t){return e=>{let n=e.state.field(wm,!1);return n&&n.query.spec.valid?t(e,n):Vm(e)}}const Tm=Cm(((t,{query:e})=>{let{to:n}=t.state.selection.main,o=e.nextMatch(t.state,n,n);if(!o)return!1;let i=Go.single(o.from,o.to),r=t.state.facet(hm);return t.dispatch({selection:i,effects:[Ym(t,o),r.scrollToMatch(i.main,t)],userEvent:"select.search"}),Mm(t),!0})),Em=Cm(((t,{query:e})=>{let{state:n}=t,{from:o}=n.selection.main,i=e.prevMatch(n,o,o);if(!i)return!1;let r=Go.single(i.from,i.to),s=t.state.facet(hm);return t.dispatch({selection:r,effects:[Ym(t,i),s.scrollToMatch(r.main,t)],userEvent:"select.search"}),Mm(t),!0})),Qm=Cm(((t,{query:e})=>{let n=e.matchAll(t.state,1e3);return!(!n||!n.length)&&(t.dispatch({selection:Go.create(n.map((t=>Go.range(t.from,t.to)))),userEvent:"select.search.matches"}),!0)})),Am=Cm(((t,{query:e})=>{let{state:n}=t,{from:o,to:i}=n.selection.main;if(n.readOnly)return!1;let r=e.nextMatch(n,o,o);if(!r)return!1;let s,a,l=[],c=[];if(r.from==o&&r.to==i&&(a=n.toText(e.getReplacement(r)),l.push({from:r.from,to:r.to,insert:a}),r=e.nextMatch(n,r.from,r.to),c.push(fc.announce.of(n.phrase("replaced match on line $",n.doc.lineAt(o).number)+"."))),r){let e=0==l.length||l[0].from>=r.to?0:r.to-r.from-a.length;s=Go.single(r.from-e,r.to-e),c.push(Ym(t,r)),c.push(n.facet(hm).scrollToMatch(s.main,t))}return t.dispatch({changes:l,selection:s,effects:c,userEvent:"input.replace"}),!0})),$m=Cm(((t,{query:e})=>{if(t.state.readOnly)return!1;let n=e.matchAll(t.state,1e9).map((t=>{let{from:n,to:o}=t;return{from:n,to:o,insert:e.getReplacement(t)}}));if(!n.length)return!1;let o=t.state.phrase("replaced $ matches",n.length)+".";return t.dispatch({changes:n,effects:fc.announce.of(o),userEvent:"input.replace.all"}),!0}));function jm(t){return t.state.facet(hm).createPanel(t)}function Rm(t,e){var n,o,i,r,s;let a=t.selection.main,l=a.empty||a.to>a.from+100?"":t.sliceDoc(a.from,a.to);if(e&&!l)return e;let c=t.facet(hm);return new pm({search:(null!==(n=null==e?void 0:e.literal)&&void 0!==n?n:c.literal)?l:l.replace(/\n/g,"\\n"),caseSensitive:null!==(o=null==e?void 0:e.caseSensitive)&&void 0!==o?o:c.caseSensitive,literal:null!==(i=null==e?void 0:e.literal)&&void 0!==i?i:c.literal,regexp:null!==(r=null==e?void 0:e.regexp)&&void 0!==r?r:c.regexp,wholeWord:null!==(s=null==e?void 0:e.wholeWord)&&void 0!==s?s:c.wholeWord})}function Zm(t){let e=Au(t,jm);return e&&e.dom.querySelector("[main-field]")}function Mm(t){let e=Zm(t);e&&e==t.root.activeElement&&e.select()}const Vm=t=>{let e=t.state.field(wm,!1);if(e&&e.panel){let n=Zm(t);if(n&&n!=t.root.activeElement){let o=Rm(t.state,e.query.spec);o.valid&&t.dispatch({effects:Om.of(o)}),n.focus(),n.select()}}else t.dispatch({effects:[bm.of(!0),e?Om.of(Rm(t.state,e.query.spec)):Ei.appendConfig.of(qm)]});return!0},Dm=t=>{let e=t.state.field(wm,!1);if(!e||!e.panel)return!1;let n=Au(t,jm);return n&&n.dom.contains(t.root.activeElement)&&t.focus(),t.dispatch({effects:bm.of(!1)}),!0},Im=[{key:"Mod-f",run:Vm,scope:"editor search-panel"},{key:"F3",run:Tm,shift:Em,scope:"editor search-panel",preventDefault:!0},{key:"Mod-g",run:Tm,shift:Em,scope:"editor search-panel",preventDefault:!0},{key:"Escape",run:Dm,scope:"editor search-panel"},{key:"Mod-Shift-l",run:({state:t,dispatch:e})=>{let n=t.selection;if(n.ranges.length>1||n.main.empty)return!1;let{from:o,to:i}=n.main,r=[],s=0;for(let e=new zg(t.doc,t.sliceDoc(o,i));!e.next().done;){if(r.length>1e3)return!1;e.value.from==o&&(s=r.length),r.push(Go.range(e.value.from,e.value.to))}return e(t.update({selection:Go.create(r,s),userEvent:"select.search.matches"})),!0}},{key:"Mod-Alt-g",run:t=>{let e=Au(t,Jg);if(!e){let n=[tm.of(!0)];null==t.state.field(em,!1)&&n.push(Ei.appendConfig.of([em,nm])),t.dispatch({effects:n}),e=Au(t,Jg)}return e&&e.dom.querySelector("input").select(),!0}},{key:"Mod-d",run:({state:t,dispatch:e})=>{let{ranges:n}=t.selection;if(n.some((t=>t.from===t.to)))return(({state:t,dispatch:e})=>{let{selection:n}=t,o=Go.create(n.ranges.map((e=>t.wordAt(e.head)||Go.cursor(e.head))),n.mainIndex);return!o.eq(n)&&(e(t.update({selection:o})),!0)})({state:t,dispatch:e});let o=t.sliceDoc(n[0].from,n[0].to);if(t.selection.ranges.some((e=>t.sliceDoc(e.from,e.to)!=o)))return!1;let i=function(t,e){let{main:n,ranges:o}=t.selection,i=t.wordAt(n.head),r=i&&i.from==n.from&&i.to==n.to;for(let n=!1,i=new zg(t.doc,e,o[o.length-1].to);;){if(i.next(),!i.done){if(n&&o.some((t=>t.from==i.value.from)))continue;if(r){let e=t.wordAt(i.value.from);if(!e||e.from!=i.value.from||e.to!=i.value.to)continue}return i.value}if(n)return null;i=new zg(t.doc,e,0,Math.max(0,o[o.length-1].from-1)),n=!0}}(t,o);return!!i&&(e(t.update({selection:t.selection.addRange(Go.range(i.from,i.to),!1),effects:fc.scrollIntoView(i.to)})),!0)},preventDefault:!0}];class Nm{constructor(t){this.view=t;let e=this.query=t.state.field(wm).query.spec;function n(t,e,n){return Xg("button",{class:"cm-button",name:t,onclick:e,type:"button"},n)}this.commit=this.commit.bind(this),this.searchField=Xg("input",{value:e.search,placeholder:Wm(t,"Find"),"aria-label":Wm(t,"Find"),class:"cm-textfield",name:"search",form:"","main-field":"true",onchange:this.commit,onkeyup:this.commit}),this.replaceField=Xg("input",{value:e.replace,placeholder:Wm(t,"Replace"),"aria-label":Wm(t,"Replace"),class:"cm-textfield",name:"replace",form:"",onchange:this.commit,onkeyup:this.commit}),this.caseField=Xg("input",{type:"checkbox",name:"case",form:"",checked:e.caseSensitive,onchange:this.commit}),this.reField=Xg("input",{type:"checkbox",name:"re",form:"",checked:e.regexp,onchange:this.commit}),this.wordField=Xg("input",{type:"checkbox",name:"word",form:"",checked:e.wholeWord,onchange:this.commit}),this.dom=Xg("div",{onkeydown:t=>this.keydown(t),class:"cm-search"},[this.searchField,n("next",(()=>Tm(t)),[Wm(t,"next")]),n("prev",(()=>Em(t)),[Wm(t,"previous")]),n("select",(()=>Qm(t)),[Wm(t,"all")]),Xg("label",null,[this.caseField,Wm(t,"match case")]),Xg("label",null,[this.reField,Wm(t,"regexp")]),Xg("label",null,[this.wordField,Wm(t,"by word")]),...t.state.readOnly?[]:[Xg("br"),this.replaceField,n("replace",(()=>Am(t)),[Wm(t,"replace")]),n("replaceAll",(()=>$m(t)),[Wm(t,"replace all")])],Xg("button",{name:"close",onclick:()=>Dm(t),"aria-label":Wm(t,"close"),type:"button"},["×"])])}commit(){let t=new pm({search:this.searchField.value,caseSensitive:this.caseField.checked,regexp:this.reField.checked,wholeWord:this.wordField.checked,replace:this.replaceField.value});t.eq(this.query)||(this.query=t,this.view.dispatch({effects:Om.of(t)}))}keydown(t){var e,n,o;e=this.view,n=t,o="search-panel",Cc(Sc(e.state),n,e,o)?t.preventDefault():13==t.keyCode&&t.target==this.searchField?(t.preventDefault(),(t.shiftKey?Em:Tm)(this.view)):13==t.keyCode&&t.target==this.replaceField&&(t.preventDefault(),Am(this.view))}update(t){for(let e of t.transactions)for(let t of e.effects)t.is(Om)&&!t.value.eq(this.query)&&this.setQuery(t.value)}setQuery(t){this.query=t,this.searchField.value=t.search,this.replaceField.value=t.replace,this.caseField.checked=t.caseSensitive,this.reField.checked=t.regexp,this.wordField.checked=t.wholeWord}mount(){this.searchField.select()}get pos(){return 80}get top(){return this.view.state.facet(hm).top}}function Wm(t,e){return t.state.phrase(e)}const Xm=30,Lm=/[\s\.,:;?!]/;function Ym(t,{from:e,to:n}){let o=t.state.doc.lineAt(e),i=t.state.doc.lineAt(n).to,r=Math.max(o.from,e-Xm),s=Math.min(i,n+Xm),a=t.state.sliceDoc(r,s);if(r!=o.from)for(let t=0;ta.length-Xm;t--)if(!Lm.test(a[t-1])&&Lm.test(a[t])){a=a.slice(0,t);break}return fc.announce.of(`${t.state.phrase("current match")}. ${a} ${t.state.phrase("on line")} ${o.number}.`)}const zm=fc.baseTheme({".cm-panel.cm-search":{padding:"2px 6px 4px",position:"relative","& [name=close]":{position:"absolute",top:"0",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",padding:0,margin:0},"& input, & button, & label":{margin:".2em .6em .2em 0"},"& input[type=checkbox]":{marginRight:".2em"},"& label":{fontSize:"80%",whiteSpace:"pre"}},"&light .cm-searchMatch":{backgroundColor:"#ffff0054"},"&dark .cm-searchMatch":{backgroundColor:"#00ffff8a"},"&light .cm-searchMatch-selected":{backgroundColor:"#ff6a0054"},"&dark .cm-searchMatch-selected":{backgroundColor:"#ff00ff8a"}}),qm=[wm,pi.low(Pm),zm];class Um{constructor(t,e,n){this.state=t,this.pos=e,this.explicit=n,this.abortListeners=[]}tokenBefore(t){let e=Zp(this.state).resolveInner(this.pos,-1);for(;e&&t.indexOf(e.name)<0;)e=e.parent;return e?{from:e.from,to:this.pos,text:this.state.sliceDoc(e.from,this.pos),type:e.type}:null}matchBefore(t){let e=this.state.doc.lineAt(this.pos),n=Math.max(e.from,this.pos-250),o=e.text.slice(n-e.from,this.pos-e.from),i=o.search(Km(t,!1));return i<0?null:{from:n+i,to:this.pos,text:o.slice(i)}}get aborted(){return null==this.abortListeners}addEventListener(t,e){"abort"==t&&this.abortListeners&&this.abortListeners.push(e)}}function Bm(t){let e=Object.keys(t).join(""),n=/\w/.test(e);return n&&(e=e.replace(/\w/g,"")),`[${n?"\\w":""}${e.replace(/[^\w\s]/g,"\\$&")}]`}function Fm(t){let e=t.map((t=>"string"==typeof t?{label:t}:t)),[n,o]=e.every((t=>/^\w+$/.test(t.label)))?[/\w*$/,/\w+$/]:function(t){let e=Object.create(null),n=Object.create(null);for(let{label:o}of t){e[o[0]]=!0;for(let t=1;t{let i=t.matchBefore(o);return i||t.explicit?{from:i?i.from:t.pos,options:e,validFor:n}:null}}class Gm{constructor(t,e,n,o){this.completion=t,this.source=e,this.match=n,this.score=o}}function Hm(t){return t.selection.main.from}function Km(t,e){var n;let{source:o}=t,i=e&&"^"!=o[0],r="$"!=o[o.length-1];return i||r?new RegExp(`${i?"^":""}(?:${o})${r?"$":""}`,null!==(n=t.flags)&&void 0!==n?n:t.ignoreCase?"i":""):t}const Jm=Pi.define();const tv=new WeakMap;function ev(t){if(!Array.isArray(t))return t;let e=tv.get(t);return e||tv.set(t,e=Fm(t)),e}const nv=Ei.define(),ov=Ei.define();class iv{constructor(t){this.pattern=t,this.chars=[],this.folded=[],this.any=[],this.precise=[],this.byWord=[],this.score=0,this.matched=[];for(let e=0;e=48&&l<=57||l>=97&&l<=122?2:l>=65&&l<=90?1:0:(y=Vo(l))!=y.toLowerCase()?1:y!=y.toUpperCase()?2:0;(!o||1==_&&g||0==v&&0!=_)&&(e[u]==l||n[u]==l&&(h=!0)?r[u++]=o:r.length&&(m=!1)),v=_,o+=Do(l)}return u==a&&0==r[0]&&m?this.result(-100+(h?-200:0),r,t):p==a&&0==d?this.ret(-200-t.length+(f==t.length?0:-100),[0,f]):s>-1?this.ret(-700-t.length,[s,s+this.pattern.length]):p==a?this.ret(-200+-700-t.length,[d,f]):u==a?this.result(-100+(h?-200:0)+-700+(m?0:-1100),r,t):2!=e.length&&this.result((o[0]?-700:0)+-200+-1100,o,t)}result(t,e,n){let o=[],i=0;for(let t of e){let e=t+(this.astral?Do(Mo(n,t)):1);i&&o[i-1]==t?o[i-1]=e:(o[i++]=t,o[i++]=e)}return this.ret(t-n.length,o)}}const rv=Jo.define({combine:t=>Xi(t,{activateOnTyping:!0,selectOnOpen:!0,override:null,closeOnBlur:!0,maxRenderedOptions:100,defaultKeymap:!0,tooltipClass:()=>"",optionClass:()=>"",aboveCursor:!1,icons:!0,addToOptions:[],positionInfo:av,compareCompletions:(t,e)=>t.label.localeCompare(e.label),interactionDelay:75,updateSyncTime:100},{defaultKeymap:(t,e)=>t&&e,closeOnBlur:(t,e)=>t&&e,icons:(t,e)=>t&&e,tooltipClass:(t,e)=>n=>sv(t(n),e(n)),optionClass:(t,e)=>n=>sv(t(n),e(n)),addToOptions:(t,e)=>t.concat(e)})});function sv(t,e){return t?e?t+" "+e:t:e}function av(t,e,n,o,i,r){let s,a,l=t.textDirection==ha.RTL,c=l,u=!1,h="top",p=e.left-i.left,d=i.right-e.right,f=o.right-o.left,g=o.bottom-o.top;if(c&&p=g||t>e.top?s=n.bottom-e.top:(h="bottom",s=e.bottom-n.top)}return{style:`${h}: ${s/((e.bottom-e.top)/r.offsetHeight)}px; max-width: ${a/((e.right-e.left)/r.offsetWidth)}px`,class:"cm-completionInfo-"+(u?l?"left-narrow":"right-narrow":c?"left":"right")}}function lv(t,e,n){if(t<=n)return{from:0,to:t};if(e<0&&(e=0),e<=t>>1){let t=Math.floor(e/n);return{from:t*n,to:(t+1)*n}}let o=Math.floor((t-e)/n);return{from:t-(o+1)*n,to:t-o*n}}class cv{constructor(t,e,n){this.view=t,this.stateField=e,this.applyCompletion=n,this.info=null,this.infoDestroy=null,this.placeInfoReq={read:()=>this.measureInfo(),write:t=>this.placeInfo(t),key:this},this.space=null,this.currentClass="";let o=t.state.field(e),{options:i,selected:r}=o.open,s=t.state.facet(rv);this.optionContent=function(t){let e=t.addToOptions.slice();return t.icons&&e.push({render(t){let e=document.createElement("div");return e.classList.add("cm-completionIcon"),t.type&&e.classList.add(...t.type.split(/\s+/g).map((t=>"cm-completionIcon-"+t))),e.setAttribute("aria-hidden","true"),e},position:20}),e.push({render(t,e,n,o){let i=document.createElement("span");i.className="cm-completionLabel";let r=t.displayLabel||t.label,s=0;for(let t=0;ts&&i.appendChild(document.createTextNode(r.slice(s,e)));let a=i.appendChild(document.createElement("span"));a.appendChild(document.createTextNode(r.slice(e,n))),a.className="cm-completionMatchedText",s=n}return st.position-e.position)).map((t=>t.render))}(s),this.optionClass=s.optionClass,this.tooltipClass=s.tooltipClass,this.range=lv(i.length,r,s.maxRenderedOptions),this.dom=document.createElement("div"),this.dom.className="cm-tooltip-autocomplete",this.updateTooltipClass(t.state),this.dom.addEventListener("mousedown",(n=>{let{options:o}=t.state.field(e).open;for(let e,i=n.target;i&&i!=this.dom;i=i.parentNode)if("LI"==i.nodeName&&(e=/-(\d+)$/.exec(i.id))&&+e[1]{let n=t.state.field(this.stateField,!1);n&&n.tooltip&&t.state.facet(rv).closeOnBlur&&e.relatedTarget!=t.contentDOM&&t.dispatch({effects:ov.of(null)})})),this.showOptions(i,o.id)}mount(){this.updateSel()}showOptions(t,e){this.list&&this.list.remove(),this.list=this.dom.appendChild(this.createListBox(t,e,this.range)),this.list.addEventListener("scroll",(()=>{this.info&&this.view.requestMeasure(this.placeInfoReq)}))}update(t){var e;let n=t.state.field(this.stateField),o=t.startState.field(this.stateField);if(this.updateTooltipClass(t.state),n!=o){let{options:i,selected:r,disabled:s}=n.open;o.open&&o.open.options==i||(this.range=lv(i.length,r,t.state.facet(rv).maxRenderedOptions),this.showOptions(i,n.id)),this.updateSel(),s!=(null===(e=o.open)||void 0===e?void 0:e.disabled)&&this.dom.classList.toggle("cm-tooltip-autocomplete-disabled",!!s)}}updateTooltipClass(t){let e=this.tooltipClass(t);if(e!=this.currentClass){for(let t of this.currentClass.split(" "))t&&this.dom.classList.remove(t);for(let t of e.split(" "))t&&this.dom.classList.add(t);this.currentClass=e}}positioned(t){this.space=t,this.info&&this.view.requestMeasure(this.placeInfoReq)}updateSel(){let t=this.view.state.field(this.stateField),e=t.open;if((e.selected>-1&&e.selected=this.range.to)&&(this.range=lv(e.options.length,e.selected,this.view.state.facet(rv).maxRenderedOptions),this.showOptions(e.options,t.id)),this.updateSelectedOption(e.selected)){this.destroyInfo();let{completion:n}=e.options[e.selected],{info:o}=n;if(!o)return;let i="string"==typeof o?document.createTextNode(o):o(n);if(!i)return;"then"in i?i.then((e=>{e&&this.view.state.field(this.stateField,!1)==t&&this.addInfoPane(e,n)})).catch((t=>Bs(this.view.state,t,"completion info"))):this.addInfoPane(i,n)}}addInfoPane(t,e){this.destroyInfo();let n=this.info=document.createElement("div");if(n.className="cm-tooltip cm-completionInfo",null!=t.nodeType)n.appendChild(t),this.infoDestroy=null;else{let{dom:e,destroy:o}=t;n.appendChild(e),this.infoDestroy=o||null}this.dom.appendChild(n),this.view.requestMeasure(this.placeInfoReq)}updateSelectedOption(t){let e=null;for(let n=this.list.firstChild,o=this.range.from;n;n=n.nextSibling,o++)"LI"==n.nodeName&&n.id?o==t?n.hasAttribute("aria-selected")||(n.setAttribute("aria-selected","true"),e=n):n.hasAttribute("aria-selected")&&n.removeAttribute("aria-selected"):o--;return e&&function(t,e){let n=t.getBoundingClientRect(),o=e.getBoundingClientRect(),i=n.height/t.offsetHeight;o.topn.bottom&&(t.scrollTop+=(o.bottom-n.bottom)/i)}(this.list,e),e}measureInfo(){let t=this.dom.querySelector("[aria-selected]");if(!t||!this.info)return null;let e=this.dom.getBoundingClientRect(),n=this.info.getBoundingClientRect(),o=t.getBoundingClientRect(),i=this.space;if(!i){let t=this.dom.ownerDocument.defaultView||window;i={left:0,top:0,right:t.innerWidth,bottom:t.innerHeight}}return o.top>Math.min(i.bottom,e.bottom)-10||o.bottomn.from||0==n.from))if(i=t,"string"!=typeof l&&l.header)o.appendChild(l.header(l));else{o.appendChild(document.createElement("completion-section")).textContent=t}}const c=o.appendChild(document.createElement("li"));c.id=e+"-"+r,c.setAttribute("role","option");let u=this.optionClass(s);u&&(c.className=u);for(let t of this.optionContent){let e=t(s,this.view.state,this.view,a);e&&c.appendChild(e)}}return n.from&&o.classList.add("cm-completionListIncompleteTop"),n.tonew cv(n,t,e)}function hv(t){return 100*(t.boost||0)+(t.apply?10:0)+(t.info?5:0)+(t.type?1:0)}class pv{constructor(t,e,n,o,i,r){this.options=t,this.attrs=e,this.tooltip=n,this.timestamp=o,this.selected=i,this.disabled=r}setSelected(t,e){return t==this.selected||t>=this.options.length?this:new pv(this.options,gv(e,t),this.tooltip,this.timestamp,t,this.disabled)}static build(t,e,n,o,i){let r=function(t,e){let n=[],o=null,i=t=>{n.push(t);let{section:e}=t.completion;if(e){o||(o=[]);let t="string"==typeof e?e:e.name;o.some((e=>e.name==t))||o.push("string"==typeof e?{name:t}:e)}};for(let o of t)if(o.hasResult()){let t=o.result.getMatch;if(!1===o.result.filter)for(let e of o.result.options)i(new Gm(e,o.source,t?t(e):[],1e9-n.length));else{let n=new iv(e.sliceDoc(o.from,o.to));for(let e of o.result.options)if(n.match(e.label)){let r=e.displayLabel?t?t(e,n.matched):[]:n.matched;i(new Gm(e,o.source,r,n.score+(e.boost||0)))}}}if(o){let t=Object.create(null),e=0,i=(t,e)=>{var n,o;return(null!==(n=t.rank)&&void 0!==n?n:1e9)-(null!==(o=e.rank)&&void 0!==o?o:1e9)||(t.namee.score-t.score||a(t.completion,e.completion)))){let e=t.completion;!s||s.label!=e.label||s.detail!=e.detail||null!=s.type&&null!=e.type&&s.type!=e.type||s.apply!=e.apply||s.boost!=e.boost?r.push(t):hv(t.completion)>hv(s)&&(r[r.length-1]=t),s=t.completion}return r}(t,e);if(!r.length)return o&&t.some((t=>1==t.state))?new pv(o.options,o.attrs,o.tooltip,o.timestamp,o.selected,!0):null;let s=e.facet(rv).selectOnOpen?0:-1;if(o&&o.selected!=s&&-1!=o.selected){let t=o.options[o.selected].completion;for(let e=0;ee.hasResult()?Math.min(t,e.from):t),1e8),create:Sv,above:i.aboveCursor},o?o.timestamp:Date.now(),s,!1)}map(t){return new pv(this.options,this.attrs,Object.assign(Object.assign({},this.tooltip),{pos:t.mapPos(this.tooltip.pos)}),this.timestamp,this.selected,this.disabled)}}class dv{constructor(t,e,n){this.active=t,this.id=e,this.open=n}static start(){return new dv(mv,"cm-ac-"+Math.floor(2e6*Math.random()).toString(36),null)}update(t){let{state:e}=t,n=e.facet(rv),o=(n.override||e.languageDataAt("autocomplete",Hm(e)).map(ev)).map((e=>{let o=this.active.find((t=>t.source==e))||new yv(e,this.active.some((t=>0!=t.state))?1:0);return o.update(t,n)}));o.length==this.active.length&&o.every(((t,e)=>t==this.active[e]))&&(o=this.active);let i=this.open;i&&t.docChanged&&(i=i.map(t.changes)),t.selection||o.some((e=>e.hasResult()&&t.changes.touchesRange(e.from,e.to)))||!function(t,e){if(t==e)return!0;for(let n=0,o=0;;){for(;n1==t.state))&&(i=null),!i&&o.every((t=>1!=t.state))&&o.some((t=>t.hasResult()))&&(o=o.map((t=>t.hasResult()?new yv(t.source,0):t)));for(let e of t.effects)e.is(bv)&&(i=i&&i.setSelected(e.value,this.id));return o==this.active&&i==this.open?this:new dv(o,this.id,i)}get tooltip(){return this.open?this.open.tooltip:null}get attrs(){return this.open?this.open.attrs:fv}}const fv={"aria-autocomplete":"list"};function gv(t,e){let n={"aria-autocomplete":"list","aria-haspopup":"listbox","aria-controls":t};return e>-1&&(n["aria-activedescendant"]=t+"-"+e),n}const mv=[];function vv(t){return t.isUserEvent("input.type")?"input":t.isUserEvent("delete.backward")?"delete":null}class yv{constructor(t,e,n=-1){this.source=t,this.state=e,this.explicitPos=n}hasResult(){return!1}update(t,e){let n=vv(t),o=this;n?o=o.handleUserEvent(t,n,e):t.docChanged?o=o.handleChange(t):t.selection&&0!=o.state&&(o=new yv(o.source,0));for(let e of t.effects)if(e.is(nv))o=new yv(o.source,1,e.value?Hm(t.state):-1);else if(e.is(ov))o=new yv(o.source,0);else if(e.is(Ov))for(let t of e.value)t.source==o.source&&(o=t);return o}handleUserEvent(t,e,n){return"delete"!=e&&n.activateOnTyping?new yv(this.source,1):this.map(t.changes)}handleChange(t){return t.changes.touchesRange(Hm(t.startState))?new yv(this.source,0):this.map(t.changes)}map(t){return t.empty||this.explicitPos<0?this:new yv(this.source,this.state,t.mapPos(this.explicitPos))}}class _v extends yv{constructor(t,e,n,o,i){super(t,2,e),this.result=n,this.from=o,this.to=i}hasResult(){return!0}handleUserEvent(t,e,n){var o;let i=t.changes.mapPos(this.from),r=t.changes.mapPos(this.to,1),s=Hm(t.state);if((this.explicitPos<0?s<=i:sr||"delete"==e&&Hm(t.startState)==this.from)return new yv(this.source,"input"==e&&n.activateOnTyping?1:0);let a,l=this.explicitPos<0?-1:t.changes.mapPos(this.explicitPos);return function(t,e,n,o){if(!t)return!1;let i=e.sliceDoc(n,o);return"function"==typeof t?t(i,n,o,e):Km(t,!0).test(i)}(this.result.validFor,t.state,i,r)?new _v(this.source,l,this.result,i,r):this.result.update&&(a=this.result.update(this.result,i,r,new Um(t.state,s,l>=0)))?new _v(this.source,l,a,a.from,null!==(o=a.to)&&void 0!==o?o:Hm(t.state)):new yv(this.source,1,l)}handleChange(t){return t.changes.touchesRange(this.from,this.to)?new yv(this.source,0):this.map(t.changes)}map(t){return t.empty?this:new _v(this.source,this.explicitPos<0?-1:t.mapPos(this.explicitPos),this.result,t.mapPos(this.from),t.mapPos(this.to,1))}}const Ov=Ei.define({map:(t,e)=>t.map((t=>t.map(e)))}),bv=Ei.define(),wv=si.define({create:()=>dv.start(),update:(t,e)=>t.update(e),provide:t=>[bu.from(t,(t=>t.tooltip)),fc.contentAttributes.from(t,(t=>t.attrs))]});function xv(t,e){const n=e.completion.apply||e.completion.label;let o=t.state.field(wv).active.find((t=>t.source==e.source));return o instanceof _v&&("string"==typeof n?t.dispatch(Object.assign(Object.assign({},function(t,e,n,o){let{main:i}=t.selection,r=n-i.from,s=o-i.from;return Object.assign(Object.assign({},t.changeByRange((a=>a!=i&&n!=o&&t.sliceDoc(a.from+r,a.from+s)!=t.sliceDoc(n,o)?{range:a}:{changes:{from:a.from+r,to:o==i.from?a.to:a.from+s,insert:e},range:Go.cursor(a.from+r+e.length)}))),{scrollIntoView:!0,userEvent:"input.complete"})}(t.state,n,o.from,o.to)),{annotations:Jm.of(e.completion)})):n(t,e.completion,o.from,o.to),!0)}const Sv=uv(wv,xv);function kv(t,e="option"){return n=>{let o=n.state.field(wv,!1);if(!o||!o.open||o.open.disabled||Date.now()-o.open.timestamp-1?o.open.selected+r*(t?1:-1):t?0:s-1;return a<0?a="page"==e?0:s-1:a>=s&&(a="page"==e?s-1:0),n.dispatch({effects:bv.of(a)}),!0}}class Pv{constructor(t,e){this.active=t,this.context=e,this.time=Date.now(),this.updates=[],this.done=void 0}}const Cv=50,Tv=1e3,Ev=Ks.fromClass(class{constructor(t){this.view=t,this.debounceUpdate=-1,this.running=[],this.debounceAccept=-1,this.composing=0;for(let e of t.state.field(wv).active)1==e.state&&this.startQuery(e)}update(t){let e=t.state.field(wv);if(!t.selectionSet&&!t.docChanged&&t.startState.field(wv)==e)return;let n=t.transactions.some((t=>(t.selection||t.docChanged)&&!vv(t)));for(let e=0;eCv&&Date.now()-o.time>Tv){for(let t of o.context.abortListeners)try{t()}catch(t){Bs(this.view.state,t)}o.context.abortListeners=null,this.running.splice(e--,1)}else o.updates.push(...t.transactions)}if(this.debounceUpdate>-1&&clearTimeout(this.debounceUpdate),this.debounceUpdate=e.active.some((t=>1==t.state&&!this.running.some((e=>e.active.source==t.source))))?setTimeout((()=>this.startUpdate()),50):-1,0!=this.composing)for(let e of t.transactions)"input"==vv(e)?this.composing=2:2==this.composing&&e.selection&&(this.composing=3)}startUpdate(){this.debounceUpdate=-1;let{state:t}=this.view,e=t.field(wv);for(let t of e.active)1!=t.state||this.running.some((e=>e.active.source==t.source))||this.startQuery(t)}startQuery(t){let{state:e}=this.view,n=Hm(e),o=new Um(e,n,t.explicitPos==n),i=new Pv(t,o);this.running.push(i),Promise.resolve(t.source(o)).then((t=>{i.context.aborted||(i.done=t||null,this.scheduleAccept())}),(t=>{this.view.dispatch({effects:ov.of(null)}),Bs(this.view.state,t)}))}scheduleAccept(){this.running.every((t=>void 0!==t.done))?this.accept():this.debounceAccept<0&&(this.debounceAccept=setTimeout((()=>this.accept()),this.view.state.facet(rv).updateSyncTime))}accept(){var t;this.debounceAccept>-1&&clearTimeout(this.debounceAccept),this.debounceAccept=-1;let e=[],n=this.view.state.facet(rv);for(let o=0;ot.source==i.active.source));if(r&&1==r.state)if(null==i.done){let t=new yv(i.active.source,0);for(let e of i.updates)t=t.update(e,n);1!=t.state&&e.push(t)}else this.startQuery(r)}e.length&&this.view.dispatch({effects:Ov.of(e)})}},{eventHandlers:{blur(t){let e=this.view.state.field(wv,!1);if(e&&e.tooltip&&this.view.state.facet(rv).closeOnBlur){let n=e.open&&Tu(this.view,e.open.tooltip);n&&n.dom.contains(t.relatedTarget)||this.view.dispatch({effects:ov.of(null)})}},compositionstart(){this.composing=1},compositionend(){3==this.composing&&setTimeout((()=>this.view.dispatch({effects:nv.of(!1)})),20),this.composing=0}}}),Qv=fc.baseTheme({".cm-tooltip.cm-tooltip-autocomplete":{"& > ul":{fontFamily:"monospace",whiteSpace:"nowrap",overflow:"hidden auto",maxWidth_fallback:"700px",maxWidth:"min(700px, 95vw)",minWidth:"250px",maxHeight:"10em",height:"100%",listStyle:"none",margin:0,padding:0,"& > li, & > completion-section":{padding:"1px 3px",lineHeight:1.2},"& > li":{overflowX:"hidden",textOverflow:"ellipsis",cursor:"pointer"},"& > completion-section":{display:"list-item",borderBottom:"1px solid silver",paddingLeft:"0.5em",opacity:.7}}},"&light .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#17c",color:"white"},"&light .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#777"},"&dark .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#347",color:"white"},"&dark .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#444"},".cm-completionListIncompleteTop:before, .cm-completionListIncompleteBottom:after":{content:'"···"',opacity:.5,display:"block",textAlign:"center"},".cm-tooltip.cm-completionInfo":{position:"absolute",padding:"3px 9px",width:"max-content",maxWidth:`${400}px`,boxSizing:"border-box"},".cm-completionInfo.cm-completionInfo-left":{right:"100%"},".cm-completionInfo.cm-completionInfo-right":{left:"100%"},".cm-completionInfo.cm-completionInfo-left-narrow":{right:`${30}px`},".cm-completionInfo.cm-completionInfo-right-narrow":{left:`${30}px`},"&light .cm-snippetField":{backgroundColor:"#00000022"},"&dark .cm-snippetField":{backgroundColor:"#ffffff22"},".cm-snippetFieldPosition":{verticalAlign:"text-top",width:0,height:"1.15em",display:"inline-block",margin:"0 -0.7px -.7em",borderLeft:"1.4px dotted #888"},".cm-completionMatchedText":{textDecoration:"underline"},".cm-completionDetail":{marginLeft:"0.5em",fontStyle:"italic"},".cm-completionIcon":{fontSize:"90%",width:".8em",display:"inline-block",textAlign:"center",paddingRight:".6em",opacity:"0.6",boxSizing:"content-box"},".cm-completionIcon-function, .cm-completionIcon-method":{"&:after":{content:"'ƒ'"}},".cm-completionIcon-class":{"&:after":{content:"'○'"}},".cm-completionIcon-interface":{"&:after":{content:"'◌'"}},".cm-completionIcon-variable":{"&:after":{content:"'𝑥'"}},".cm-completionIcon-constant":{"&:after":{content:"'𝐶'"}},".cm-completionIcon-type":{"&:after":{content:"'𝑡'"}},".cm-completionIcon-enum":{"&:after":{content:"'∪'"}},".cm-completionIcon-property":{"&:after":{content:"'□'"}},".cm-completionIcon-keyword":{"&:after":{content:"'🔑︎'"}},".cm-completionIcon-namespace":{"&:after":{content:"'▢'"}},".cm-completionIcon-text":{"&:after":{content:"'abc'",fontSize:"50%",verticalAlign:"middle"}}});class Av{constructor(t,e,n,o){this.field=t,this.line=e,this.from=n,this.to=o}}class $v{constructor(t,e,n){this.field=t,this.from=e,this.to=n}map(t){let e=t.mapPos(this.from,-1,No.TrackDel),n=t.mapPos(this.to,1,No.TrackDel);return null==e||null==n?null:new $v(this.field,e,n)}}class jv{constructor(t,e){this.lines=t,this.fieldPositions=e}instantiate(t,e){let n=[],o=[e],i=t.doc.lineAt(e),r=/^\s*/.exec(i.text)[0];for(let i of this.lines){if(n.length){let n=r,s=/^\t*/.exec(i)[0].length;for(let e=0;enew $v(t.field,o[t.line]+t.from,o[t.line]+t.to)));return{text:n,ranges:s}}static parse(t){let e,n=[],o=[],i=[];for(let r of t.split(/\r\n?|\n/)){for(;e=/[#$]\{(?:(\d+)(?::([^}]*))?|([^}]*))\}/.exec(r);){let t=e[1]?+e[1]:null,s=e[2]||e[3]||"",a=-1;for(let e=0;e=a&&t.field++}i.push(new Av(a,o.length,e.index,e.index+s.length)),r=r.slice(0,e.index)+s+r.slice(e.index+e[0].length)}for(let t;t=/\\([{}])/.exec(r);){r=r.slice(0,t.index)+t[1]+r.slice(t.index+t[0].length);for(let e of i)e.line==o.length&&e.from>t.index&&(e.from--,e.to--)}o.push(r)}return new jv(o,i)}}let Rv=Ts.widget({widget:new class extends Ps{toDOM(){let t=document.createElement("span");return t.className="cm-snippetFieldPosition",t}ignoreEvent(){return!1}}}),Zv=Ts.mark({class:"cm-snippetField"});class Mv{constructor(t,e){this.ranges=t,this.active=e,this.deco=Ts.set(t.map((t=>(t.from==t.to?Rv:Zv).range(t.from,t.to))))}map(t){let e=[];for(let n of this.ranges){let o=n.map(t);if(!o)return null;e.push(o)}return new Mv(e,this.active)}selectionInsideField(t){return t.ranges.every((t=>this.ranges.some((e=>e.field==this.active&&e.from<=t.from&&e.to>=t.to))))}}const Vv=Ei.define({map:(t,e)=>t&&t.map(e)}),Dv=Ei.define(),Iv=si.define({create:()=>null,update(t,e){for(let n of e.effects){if(n.is(Vv))return n.value;if(n.is(Dv)&&t)return new Mv(t.ranges,n.value)}return t&&e.docChanged&&(t=t.map(e.changes)),t&&e.selection&&!t.selectionInsideField(e.selection)&&(t=null),t},provide:t=>fc.decorations.from(t,(t=>t?t.deco:Ts.none))});function Nv(t,e){return Go.create(t.filter((t=>t.field==e)).map((t=>Go.range(t.from,t.to))))}function Wv(t){let e=jv.parse(t);return(t,n,o,i)=>{let{text:r,ranges:s}=e.instantiate(t.state,o),a={changes:{from:o,to:i,insert:vo.of(r)},scrollIntoView:!0,annotations:n?Jm.of(n):void 0};if(s.length&&(a.selection=Nv(s,0)),s.length>1){let e=new Mv(s,0),n=a.effects=[Vv.of(e)];void 0===t.state.field(Iv,!1)&&n.push(Ei.appendConfig.of([Iv,zv,Uv,Qv]))}t.dispatch(t.state.update(a))}}function Xv(t){return({state:e,dispatch:n})=>{let o=e.field(Iv,!1);if(!o||t<0&&0==o.active)return!1;let i=o.active+t,r=t>0&&!o.ranges.some((e=>e.field==i+t));return n(e.update({selection:Nv(o.ranges,i),effects:Vv.of(r?null:new Mv(o.ranges,i)),scrollIntoView:!0})),!0}}const Lv=[{key:"Tab",run:Xv(1),shift:Xv(-1)},{key:"Escape",run:({state:t,dispatch:e})=>!!t.field(Iv,!1)&&(e(t.update({effects:Vv.of(null)})),!0)}],Yv=Jo.define({combine:t=>t.length?t[0]:Lv}),zv=pi.highest(wc.compute([Yv],(t=>t.facet(Yv))));function qv(t,e){return Object.assign(Object.assign({},e),{apply:Wv(t)})}const Uv=fc.domEventHandlers({mousedown(t,e){let n,o=e.state.field(Iv,!1);if(!o||null==(n=e.posAtCoords({x:t.clientX,y:t.clientY})))return!1;let i=o.ranges.find((t=>t.from<=n&&t.to>=n));return!(!i||i.field==o.active)&&(e.dispatch({selection:Nv(o.ranges,i.field),effects:Vv.of(o.ranges.some((t=>t.field>i.field))?new Mv(o.ranges,i.field):null),scrollIntoView:!0}),!0)}});null&&Object.create(null);const Bv={brackets:["(","[","{","'",'"'],before:")]}:;>",stringPrefixes:[]},Fv=Ei.define({map(t,e){let n=e.mapPos(t,-1,No.TrackAfter);return null==n?void 0:n}}),Gv=new class extends Li{};Gv.startSide=1,Gv.endSide=-1;const Hv=si.define({create:()=>Ui.empty,update(t,e){if(t=t.map(e.changes),e.selection){let n=e.state.doc.lineAt(e.selection.main.head);t=t.update({filter:t=>t>=n.from&&t<=n.to})}for(let n of e.effects)n.is(Fv)&&(t=t.update({add:[Gv.range(n.value,n.value+1)]}));return t}});const Kv="()[]{}<>";function Jv(t){for(let e=0;e{if((ey?t.composing:t.compositionStarted)||t.state.readOnly)return!1;let i=t.state.selection.main;if(o.length>2||2==o.length&&1==Do(Mo(o,0))||e!=i.from||n!=i.to)return!1;let r=function(t,e){let n=ty(t,t.selection.main.head),o=n.brackets||Bv.brackets;for(let i of o){let r=Jv(Mo(i,0));if(e==i)return r==i?ly(t,i,o.indexOf(i+i+i)>-1,n):sy(t,i,r,n.before||Bv.before);if(e==r&&iy(t,t.selection.main.from))return ay(t,i,r)}return null}(t.state,o);return!!r&&(t.dispatch(r),!0)})),oy=[{key:"Backspace",run:({state:t,dispatch:e})=>{if(t.readOnly)return!1;let n=ty(t,t.selection.main.head).brackets||Bv.brackets,o=null,i=t.changeByRange((e=>{if(e.empty){let o=function(t,e){let n=t.sliceString(e-2,e);return Do(Mo(n,0))==n.length?n:n.slice(1)}(t.doc,e.head);for(let i of n)if(i==o&&ry(t.doc,e.head)==Jv(Mo(i,0)))return{changes:{from:e.head-i.length,to:e.head+i.length},range:Go.cursor(e.head-i.length)}}return{range:o=e}}));return o||e(t.update(i,{scrollIntoView:!0,userEvent:"delete.backward"})),!o}}];function iy(t,e){let n=!1;return t.field(Hv).between(0,t.doc.length,(t=>{t==e&&(n=!0)})),n}function ry(t,e){let n=t.sliceString(e,e+2);return n.slice(0,Do(Mo(n,0)))}function sy(t,e,n,o){let i=null,r=t.changeByRange((r=>{if(!r.empty)return{changes:[{insert:e,from:r.from},{insert:n,from:r.to}],effects:Fv.of(r.to+e.length),range:Go.range(r.anchor+e.length,r.head+e.length)};let s=ry(t.doc,r.head);return!s||/\s/.test(s)||o.indexOf(s)>-1?{changes:{insert:e+n,from:r.head},effects:Fv.of(r.head+e.length),range:Go.cursor(r.head+e.length)}:{range:i=r}}));return i?null:t.update(r,{scrollIntoView:!0,userEvent:"input.type"})}function ay(t,e,n){let o=null,i=t.changeByRange((e=>e.empty&&ry(t.doc,e.head)==n?{changes:{from:e.head,to:e.head+n.length,insert:n},range:Go.cursor(e.head+n.length)}:o={range:e}));return o?null:t.update(i,{scrollIntoView:!0,userEvent:"input.type"})}function ly(t,e,n,o){let i=o.stringPrefixes||Bv.stringPrefixes,r=null,s=t.changeByRange((o=>{if(!o.empty)return{changes:[{insert:e,from:o.from},{insert:e,from:o.to}],effects:Fv.of(o.to+e.length),range:Go.range(o.anchor+e.length,o.head+e.length)};let s,a=o.head,l=ry(t.doc,a);if(l==e){if(cy(t,a))return{changes:{insert:e+e,from:a},effects:Fv.of(a+e.length),range:Go.cursor(a+e.length)};if(iy(t,a)){let o=n&&t.sliceDoc(a,a+3*e.length)==e+e+e?e+e+e:e;return{changes:{from:a,to:a+o.length,insert:o},range:Go.cursor(a+o.length)}}}else{if(n&&t.sliceDoc(a-2*e.length,a)==e+e&&(s=uy(t,a-2*e.length,i))>-1&&cy(t,s))return{changes:{insert:e+e+e+e,from:a},effects:Fv.of(a+e.length),range:Go.cursor(a+e.length)};if(t.charCategorizer(a)(l)!=Vi.Word&&uy(t,a,i)>-1&&!function(t,e,n,o){let i=Zp(t).resolveInner(e,-1),r=o.reduce(((t,e)=>Math.max(t,e.length)),0);for(let s=0;s<5;s++){let s=t.sliceDoc(i.from,Math.min(i.to,i.from+n.length+r)),a=s.indexOf(n);if(!a||a>-1&&o.indexOf(s.slice(0,a))>-1){let e=i.firstChild;for(;e&&e.from==i.from&&e.to-e.from>n.length+a;){if(t.sliceDoc(e.to-n.length,e.to)==n)return!1;e=e.firstChild}return!0}let l=i.to==e&&i.parent;if(!l)break;i=l}return!1}(t,a,e,i))return{changes:{insert:e+e,from:a},effects:Fv.of(a+e.length),range:Go.cursor(a+e.length)}}return{range:r=o}}));return r?null:t.update(s,{scrollIntoView:!0,userEvent:"input.type"})}function cy(t,e){let n=Zp(t).resolveInner(e+1);return n.parent&&n.from==e}function uy(t,e,n){let o=t.charCategorizer(e);if(o(t.sliceDoc(e-1,e))!=Vi.Word)return e;for(let i of n){let n=e-i.length;if(t.sliceDoc(n,e)==i&&o(t.sliceDoc(n-1,n))!=Vi.Word)return n}return-1}function hy(t={}){return[wv,rv.of(t),Ev,dy,Qv]}const py=[{key:"Ctrl-Space",run:t=>!!t.state.field(wv,!1)&&(t.dispatch({effects:nv.of(!0)}),!0)},{key:"Escape",run:t=>{let e=t.state.field(wv,!1);return!(!e||!e.active.some((t=>0!=t.state)))&&(t.dispatch({effects:ov.of(null)}),!0)}},{key:"ArrowDown",run:kv(!0)},{key:"ArrowUp",run:kv(!1)},{key:"PageDown",run:kv(!0,"page")},{key:"PageUp",run:kv(!1,"page")},{key:"Enter",run:t=>{let e=t.state.field(wv,!1);return!(t.state.readOnly||!e||!e.open||e.open.selected<0||e.open.disabled||Date.now()-e.open.timestampt.facet(rv).defaultKeymap?[py]:[])));class fy{constructor(t,e,n){this.from=t,this.to=e,this.diagnostic=n}}class gy{constructor(t,e,n){this.diagnostics=t,this.panel=e,this.selected=n}static init(t,e,n){let o=t,i=n.facet(Ty).markerFilter;i&&(o=i(o));let r=Ts.set(o.map((t=>t.from==t.to||t.from==t.to-1&&n.doc.lineAt(t.from).to==t.from?Ts.widget({widget:new Ay(t),diagnostic:t}).range(t.from):Ts.mark({attributes:{class:"cm-lintRange cm-lintRange-"+t.severity+(t.markClass?" "+t.markClass:"")},diagnostic:t}).range(t.from,t.to))),!0);return new gy(r,e,my(r))}}function my(t,e=null,n=0){let o=null;return t.between(n,1e9,((t,n,{spec:i})=>{if(!e||i.diagnostic==e)return o=new fy(t,n,i.diagnostic),!1})),o}function vy(t,e){let n=t.startState.doc.lineAt(e.pos);return!(!t.effects.some((t=>t.is(_y)))&&!t.changes.touchesRange(n.from,n.to))}function yy(t,e){return t.field(wy,!1)?e:e.concat(Ei.appendConfig.of(Vy))}const _y=Ei.define(),Oy=Ei.define(),by=Ei.define(),wy=si.define({create:()=>new gy(Ts.none,null,null),update(t,e){if(e.docChanged){let n=t.diagnostics.map(e.changes),o=null;if(t.selected){let i=e.changes.mapPos(t.selected.from,1);o=my(n,t.selected.diagnostic,i)||my(n,null,i)}t=new gy(n,t.panel,o)}for(let n of e.effects)n.is(_y)?t=gy.init(n.value,t.panel,e.state):n.is(Oy)?t=new gy(t.diagnostics,n.value?jy.open:null,t.selected):n.is(by)&&(t=new gy(t.diagnostics,t.panel,n.value));return t},provide:t=>[Zu.from(t,(t=>t.panel)),fc.decorations.from(t,(t=>t.diagnostics))]});const xy=Ts.mark({class:"cm-lintRange cm-lintRange-active"});function Sy(t,e,n){let{diagnostics:o}=t.state.field(wy),i=[],r=2e8,s=0;o.between(e-(n<0?1:0),e+(n>0?1:0),((t,o,{spec:a})=>{e>=t&&e<=o&&(t==o||(e>t||n>0)&&(e({dom:ky(t,i)})}:null}function ky(t,e){return Xg("ul",{class:"cm-tooltip-lint"},e.map((e=>Qy(t,e,!1))))}const Py=t=>{let e=t.state.field(wy,!1);return!(!e||!e.panel)&&(t.dispatch({effects:Oy.of(!1)}),!0)},Cy=[{key:"Mod-Shift-m",run:t=>{let e=t.state.field(wy,!1);e&&e.panel||t.dispatch({effects:yy(t.state,[Oy.of(!0)])});let n=Au(t,jy.open);return n&&n.dom.querySelector(".cm-panel-lint ul").focus(),!0},preventDefault:!0},{key:"F8",run:t=>{let e=t.state.field(wy,!1);if(!e)return!1;let n=t.state.selection.main,o=e.diagnostics.iter(n.to+1);return!(!o.value&&(o=e.diagnostics.iter(0),!o.value||o.from==n.from&&o.to==n.to))&&(t.dispatch({selection:{anchor:o.from,head:o.to},scrollIntoView:!0}),!0)}}],Ty=(null&&ViewPlugin.fromClass(class{constructor(t){this.view=t,this.timeout=-1,this.set=!0;let{delay:e}=t.state.facet(Ty);this.lintTime=Date.now()+e,this.run=this.run.bind(this),this.timeout=setTimeout(this.run,e)}run(){let t=Date.now();if(tPromise.resolve(t(this.view))))).then((e=>{let n=e.reduce(((t,e)=>t.concat(e)));this.view.state.doc==t.doc&&this.view.dispatch(function(t,e){return{effects:yy(t,[_y.of(e)])}}(this.view.state,n))}),(t=>{logException(this.view.state,t)}))}}update(t){let e=t.state.facet(Ty);(t.docChanged||e!=t.startState.facet(Ty)||e.needsRefresh&&e.needsRefresh(t))&&(this.lintTime=Date.now()+e.delay,this.set||(this.set=!0,this.timeout=setTimeout(this.run,e.delay)))}force(){this.set&&(this.lintTime=Date.now(),this.run())}destroy(){clearTimeout(this.timeout)}}),Jo.define({combine:t=>Object.assign({sources:t.map((t=>t.source))},Xi(t.map((t=>t.config)),{delay:750,markerFilter:null,tooltipFilter:null,needsRefresh:null},{needsRefresh:(t,e)=>t?e?n=>t(n)||e(n):t:e}))}));function Ey(t){let e=[];if(t)t:for(let{name:n}of t){for(let t=0;tt.toLowerCase()==o.toLowerCase()))){e.push(o);continue t}}e.push("")}return e}function Qy(t,e,n){var o;let i=n?Ey(e.actions):[];return Xg("li",{class:"cm-diagnostic cm-diagnostic-"+e.severity},Xg("span",{class:"cm-diagnosticText"},e.renderMessage?e.renderMessage():e.message),null===(o=e.actions)||void 0===o?void 0:o.map(((n,o)=>{let r=!1,s=o=>{if(o.preventDefault(),r)return;r=!0;let i=my(t.state.field(wy).diagnostics,e);i&&n.apply(t,i.from,i.to)},{name:a}=n,l=i[o]?a.indexOf(i[o]):-1,c=l<0?a:[a.slice(0,l),Xg("u",a.slice(l,l+1)),a.slice(l+1)];return Xg("button",{type:"button",class:"cm-diagnosticAction",onclick:s,onmousedown:s,"aria-label":` Action: ${a}${l<0?"":` (access key "${i[o]})"`}.`},c)})),e.source&&Xg("div",{class:"cm-diagnosticSource"},e.source))}class Ay extends Ps{constructor(t){super(),this.diagnostic=t}eq(t){return t.diagnostic==this.diagnostic}toDOM(){return Xg("span",{class:"cm-lintPoint cm-lintPoint-"+this.diagnostic.severity})}}class $y{constructor(t,e){this.diagnostic=e,this.id="item_"+Math.floor(4294967295*Math.random()).toString(16),this.dom=Qy(t,e,!0),this.dom.id=this.id,this.dom.setAttribute("role","option")}}class jy{constructor(t){this.view=t,this.items=[];this.list=Xg("ul",{tabIndex:0,role:"listbox","aria-label":this.view.state.phrase("Diagnostics"),onkeydown:e=>{if(27==e.keyCode)Py(this.view),this.view.focus();else if(38==e.keyCode||33==e.keyCode)this.moveSelection((this.selectedIndex-1+this.items.length)%this.items.length);else if(40==e.keyCode||34==e.keyCode)this.moveSelection((this.selectedIndex+1)%this.items.length);else if(36==e.keyCode)this.moveSelection(0);else if(35==e.keyCode)this.moveSelection(this.items.length-1);else if(13==e.keyCode)this.view.focus();else{if(!(e.keyCode>=65&&e.keyCode<=90&&this.selectedIndex>=0))return;{let{diagnostic:n}=this.items[this.selectedIndex],o=Ey(n.actions);for(let i=0;i{for(let e=0;ePy(this.view)},"×")),this.update()}get selectedIndex(){let t=this.view.state.field(wy).selected;if(!t)return-1;for(let e=0;e{let a,l=-1;for(let t=n;tn&&(this.items.splice(n,l-n),o=!0)),e&&a.diagnostic==e.diagnostic?a.dom.hasAttribute("aria-selected")||(a.dom.setAttribute("aria-selected","true"),i=a):a.dom.hasAttribute("aria-selected")&&a.dom.removeAttribute("aria-selected"),n++}));n({sel:i.dom.getBoundingClientRect(),panel:this.list.getBoundingClientRect()}),write:({sel:t,panel:e})=>{let n=e.height/this.list.offsetHeight;t.tope.bottom&&(this.list.scrollTop+=(t.bottom-e.bottom)/n)}})):this.selectedIndex<0&&this.list.removeAttribute("aria-activedescendant"),o&&this.sync()}sync(){let t=this.list.firstChild;function e(){let e=t;t=e.nextSibling,e.remove()}for(let n of this.items)if(n.dom.parentNode==this.list){for(;t!=n.dom;)e();t=n.dom.nextSibling}else this.list.insertBefore(n.dom,t);for(;t;)e()}moveSelection(t){if(this.selectedIndex<0)return;let e=my(this.view.state.field(wy).diagnostics,this.items[t].diagnostic);e&&this.view.dispatch({selection:{anchor:e.from,head:e.to},scrollIntoView:!0,effects:by.of(e)})}static open(t){return new jy(t)}}function Ry(t,e=`viewBox="0 0 40 40"`){return`url('data:image/svg+xml,${encodeURIComponent(t)}')`}function Zy(t){return Ry(``,`width="6" height="3"`)}const My=fc.baseTheme({".cm-diagnostic":{padding:"3px 6px 3px 8px",marginLeft:"-1px",display:"block",whiteSpace:"pre-wrap"},".cm-diagnostic-error":{borderLeft:"5px solid #d11"},".cm-diagnostic-warning":{borderLeft:"5px solid orange"},".cm-diagnostic-info":{borderLeft:"5px solid #999"},".cm-diagnostic-hint":{borderLeft:"5px solid #66d"},".cm-diagnosticAction":{font:"inherit",border:"none",padding:"2px 4px",backgroundColor:"#444",color:"white",borderRadius:"3px",marginLeft:"8px",cursor:"pointer"},".cm-diagnosticSource":{fontSize:"70%",opacity:.7},".cm-lintRange":{backgroundPosition:"left bottom",backgroundRepeat:"repeat-x",paddingBottom:"0.7px"},".cm-lintRange-error":{backgroundImage:Zy("#d11")},".cm-lintRange-warning":{backgroundImage:Zy("orange")},".cm-lintRange-info":{backgroundImage:Zy("#999")},".cm-lintRange-hint":{backgroundImage:Zy("#66d")},".cm-lintRange-active":{backgroundColor:"#ffdd9980"},".cm-tooltip-lint":{padding:0,margin:0},".cm-lintPoint":{position:"relative","&:after":{content:'""',position:"absolute",bottom:0,left:"-2px",borderLeft:"3px solid transparent",borderRight:"3px solid transparent",borderBottom:"4px solid #d11"}},".cm-lintPoint-warning":{"&:after":{borderBottomColor:"orange"}},".cm-lintPoint-info":{"&:after":{borderBottomColor:"#999"}},".cm-lintPoint-hint":{"&:after":{borderBottomColor:"#66d"}},".cm-panel.cm-panel-lint":{position:"relative","& ul":{maxHeight:"100px",overflowY:"auto","& [aria-selected]":{backgroundColor:"#ddd","& u":{textDecoration:"underline"}},"&:focus [aria-selected]":{background_fallback:"#bdf",backgroundColor:"Highlight",color_fallback:"white",color:"HighlightText"},"& u":{textDecoration:"none"},padding:0,margin:0},"& [name=close]":{position:"absolute",top:"0",right:"2px",background:"inherit",border:"none",font:"inherit",padding:0,margin:0}}});const Vy=[wy,fc.decorations.compute([wy],(t=>{let{selected:e,panel:n}=t.field(wy);return e&&n&&e.from!=e.to?Ts.set([xy.range(e.from,e.to)]):Ts.none})),Cu(Sy,{hideOn:vy}),My];const Dy=(()=>[th(),oh,Jc(),xf(),Ad(),Mc(),[Yc,zc],Wi.allowMultipleSelections.of(!0),Wi.transactionFilter.of((t=>{if(!t.docChanged||!t.isUserEvent("input.type")&&!t.isUserEvent("input.complete"))return t;let e=t.startState.languageDataAt("indentOnInput",t.startState.selection.main.head);if(!e.length)return t;let n=t.newDoc,{head:o}=t.newSelection.main,i=n.lineAt(o);if(o>i.from+ad)return t;let r=n.sliceString(i.from,o);if(!e.some((t=>t.test(r))))return t;let{state:s}=t,a=-1,l=[];for(let{head:t}of s.selection.ranges){let e=s.doc.lineAt(t);if(e.from==a)continue;a=e.from;let n=Gp(s,e.from);if(null==n)continue;let o=/^\s*/.exec(e.text)[0],i=Fp(s,n);o!=i&&l.push({from:e.from,to:e.from+o.length,insert:i})}return l.length?[t,{changes:l,sequential:!0}]:t})),Vd(Nd,{fallback:!0}),Gd(),[ny,Hv],hy(),cu(),pu(),ru,rm(),wc.of([...oy,...Wg,...Im,...Wf,...wd,...py,...Cy])])(),Iy=(null&&(highlightSpecialChars(),history(),drawSelection(),syntaxHighlighting(defaultHighlightStyle,{fallback:!0}),keymap.of([...defaultKeymap,...historyKeymap])),"#e5c07b"),Ny="#e06c75",Wy="#56b6c2",Xy="#ffffff",Ly="#abb2bf",Yy="#7d8799",zy="#61afef",qy="#98c379",Uy="#d19a66",By="#c678dd",Fy="#21252b",Gy="#2c313a",Hy="#282c34",Ky="#353a42",Jy="#3E4451",t_="#528bff",e_=fc.theme({"&":{color:Ly,backgroundColor:Hy},".cm-content":{caretColor:t_},".cm-cursor, .cm-dropCursor":{borderLeftColor:t_},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:Jy},".cm-panels":{backgroundColor:Fy,color:Ly},".cm-panels.cm-panels-top":{borderBottom:"2px solid black"},".cm-panels.cm-panels-bottom":{borderTop:"2px solid black"},".cm-searchMatch":{backgroundColor:"#72a1ff59",outline:"1px solid #457dff"},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:"#6199ff2f"},".cm-activeLine":{backgroundColor:"#6699ff0b"},".cm-selectionMatch":{backgroundColor:"#aafe661a"},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bad0f847"},".cm-gutters":{backgroundColor:Hy,color:Yy,border:"none"},".cm-activeLineGutter":{backgroundColor:Gy},".cm-foldPlaceholder":{backgroundColor:"transparent",border:"none",color:"#ddd"},".cm-tooltip":{border:"none",backgroundColor:Ky},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:"transparent",borderBottomColor:"transparent"},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:Ky,borderBottomColor:Ky},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{backgroundColor:Gy,color:Ly}}},{dark:!0}),n_=jd.define([{tag:Cp.keyword,color:By},{tag:[Cp.name,Cp.deleted,Cp.character,Cp.propertyName,Cp.macroName],color:Ny},{tag:[Cp.function(Cp.variableName),Cp.labelName],color:zy},{tag:[Cp.color,Cp.constant(Cp.name),Cp.standard(Cp.name)],color:Uy},{tag:[Cp.definition(Cp.name),Cp.separator],color:Ly},{tag:[Cp.typeName,Cp.className,Cp.number,Cp.changed,Cp.annotation,Cp.modifier,Cp.self,Cp.namespace],color:Iy},{tag:[Cp.operator,Cp.operatorKeyword,Cp.url,Cp.escape,Cp.regexp,Cp.link,Cp.special(Cp.string)],color:Wy},{tag:[Cp.meta,Cp.comment],color:Yy},{tag:Cp.strong,fontWeight:"bold"},{tag:Cp.emphasis,fontStyle:"italic"},{tag:Cp.strikethrough,textDecoration:"line-through"},{tag:Cp.link,color:Yy,textDecoration:"underline"},{tag:Cp.heading,fontWeight:"bold",color:Ny},{tag:[Cp.atom,Cp.bool,Cp.special(Cp.variableName)],color:Uy},{tag:[Cp.processingInstruction,Cp.string,Cp.inserted],color:qy},{tag:Cp.invalid,color:Xy}]);class o_{constructor(t,e,n,o,i,r,s,a,l,c=0,u){this.p=t,this.stack=e,this.state=n,this.reducePos=o,this.pos=i,this.score=r,this.buffer=s,this.bufferBase=a,this.curContext=l,this.lookAhead=c,this.parent=u}toString(){return`[${this.stack.filter(((t,e)=>e%3==0)).concat(this.state)}]@${this.pos}${this.score?"!"+this.score:""}`}static start(t,e,n=0){let o=t.parser.context;return new o_(t,[],e,n,n,0,[],0,o?new i_(o,o.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(t,e){this.stack.push(this.state,e,this.bufferBase+this.buffer.length),this.state=t}reduce(t){var e;let n=t>>19,o=65535&t,{parser:i}=this.p,r=i.dynamicPrecedence(o);if(r&&(this.score+=r),0==n)return this.pushState(i.getGoto(this.state,o,!0),this.reducePos),o=2e3&&!(null===(e=this.p.parser.nodeSet.types[o])||void 0===e?void 0:e.isAnonymous)&&(a==this.p.lastBigReductionStart?(this.p.bigReductionCount++,this.p.lastBigReductionSize=l):this.p.lastBigReductionSizes;)this.stack.pop();this.reduceContext(o,a)}storeNode(t,e,n,o=4,i=!1){if(0==t&&(!this.stack.length||this.stack[this.stack.length-1]0&&0==t.buffer[o-4]&&t.buffer[o-1]>-1){if(e==n)return;if(t.buffer[o-2]>=e)return void(t.buffer[o-2]=n)}}if(i&&this.pos!=n){let i=this.buffer.length;if(i>0&&0!=this.buffer[i-4])for(;i>0&&this.buffer[i-2]>n;)this.buffer[i]=this.buffer[i-4],this.buffer[i+1]=this.buffer[i-3],this.buffer[i+2]=this.buffer[i-2],this.buffer[i+3]=this.buffer[i-1],i-=4,o>4&&(o-=4);this.buffer[i]=t,this.buffer[i+1]=e,this.buffer[i+2]=n,this.buffer[i+3]=o}else this.buffer.push(t,e,n,o)}shift(t,e,n,o){if(131072&t)this.pushState(65535&t,this.pos);else if(0==(262144&t)){let i=t,{parser:r}=this.p;(o>this.pos||e<=r.maxNode)&&(this.pos=o,r.stateFlag(i,1)||(this.reducePos=o)),this.pushState(i,n),this.shiftContext(e,n),e<=r.maxNode&&this.buffer.push(e,n,o,4)}else this.pos=o,this.shiftContext(e,n),e<=this.p.parser.maxNode&&this.buffer.push(e,n,o,4)}apply(t,e,n,o){65536&t?this.reduce(t):this.shift(t,e,n,o)}useNode(t,e){let n=this.p.reused.length-1;(n<0||this.p.reused[n]!=t)&&(this.p.reused.push(t),n++);let o=this.pos;this.reducePos=this.pos=o+t.length,this.pushState(e,o),this.buffer.push(n,o,this.reducePos,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,t,this,this.p.stream.reset(this.pos-t.length)))}split(){let t=this,e=t.buffer.length;for(;e>0&&t.buffer[e-2]>t.reducePos;)e-=4;let n=t.buffer.slice(e),o=t.bufferBase+e;for(;t&&o==t.bufferBase;)t=t.parent;return new o_(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,n,o,this.curContext,this.lookAhead,t)}recoverByDelete(t,e){let n=t<=this.p.parser.maxNode;n&&this.storeNode(t,this.pos,e,4),this.storeNode(0,this.pos,e,n?8:4),this.pos=this.reducePos=e,this.score-=190}canShift(t){for(let e=new r_(this);;){let n=this.p.parser.stateSlot(e.state,4)||this.p.parser.hasAction(e.state,t);if(0==n)return!1;if(0==(65536&n))return!0;e.reduce(n)}}recoverByInsert(t){if(this.stack.length>=300)return[];let e=this.p.parser.nextStates(this.state);if(e.length>4<<1||this.stack.length>=120){let n=[];for(let o,i=0;i1&e&&t==o))||n.push(e[t],o)}e=n}let n=[];for(let t=0;t>19,o=65535&e,i=this.stack.length-3*n;if(i<0||t.getGoto(this.stack[i],o,!1)<0){let t=this.findForcedReduction();if(null==t)return!1;e=t}this.storeNode(0,this.pos,this.pos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(e),!0}findForcedReduction(){let{parser:t}=this.p,e=[],n=(o,i)=>{if(!e.includes(o))return e.push(o),t.allActions(o,(e=>{if(e&(262144|131072));else if(65536&e){let n=(e>>19)-i;if(n>1){let o=65535&e,i=this.stack.length-3*n;if(i>=0&&t.getGoto(this.stack[i],o,!1)>=0)return n<<19|65536|o}}else{let t=n(e,i+1);if(null!=t)return t}}))};return n(this.state,0)}forceAll(){for(;!this.p.parser.stateFlag(this.state,2);)if(!this.forceReduce()){this.storeNode(0,this.pos,this.pos,4,!0);break}return this}get deadEnd(){if(3!=this.stack.length)return!1;let{parser:t}=this.p;return 65535==t.data[t.stateSlot(this.state,1)]&&!t.stateSlot(this.state,4)}restart(){this.storeNode(0,this.pos,this.pos,4,!0),this.state=this.stack[0],this.stack.length=0}sameState(t){if(this.state!=t.state||this.stack.length!=t.stack.length)return!1;for(let e=0;ethis.lookAhead&&(this.emitLookAhead(),this.lookAhead=t)}close(){this.curContext&&this.curContext.tracker.strict&&this.emitContext(),this.lookAhead>0&&this.emitLookAhead()}}class i_{constructor(t,e){this.tracker=t,this.context=e,this.hash=t.strict?t.hash(e):0}}class r_{constructor(t){this.start=t,this.state=t.state,this.stack=t.stack,this.base=this.stack.length}reduce(t){let e=65535&t,n=t>>19;0==n?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=3*(n-1);let o=this.start.p.parser.getGoto(this.stack[this.base-3],e,!0);this.state=o}}class s_{constructor(t,e,n){this.stack=t,this.pos=e,this.index=n,this.buffer=t.buffer,0==this.index&&this.maybeNext()}static create(t,e=t.bufferBase+t.buffer.length){return new s_(t,e,e-t.bufferBase)}maybeNext(){let t=this.stack.parent;null!=t&&(this.index=this.stack.bufferBase-t.bufferBase,this.stack=t,this.buffer=t.buffer)}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}next(){this.index-=4,this.pos-=4,0==this.index&&this.maybeNext()}fork(){return new s_(this.stack,this.pos,this.index)}}function a_(t,e=Uint16Array){if("string"!=typeof t)return t;let n=null;for(let o=0,i=0;o=92&&e--,e>=34&&e--;let i=e-32;if(i>=46&&(i-=46,n=!0),r+=i,n)break;r*=46}n?n[i++]=r:n=new e(r)}return n}class l_{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}}const c_=new l_;class u_{constructor(t,e){this.input=t,this.ranges=e,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=c_,this.rangeIndex=0,this.pos=this.chunkPos=e[0].from,this.range=e[0],this.end=e[e.length-1].to,this.readNext()}resolveOffset(t,e){let n=this.range,o=this.rangeIndex,i=this.pos+t;for(;in.to:i>=n.to;){if(o==this.ranges.length-1)return null;let t=this.ranges[++o];i+=t.from-n.to,n=t}return i}clipPos(t){if(t>=this.range.from&&tt)return Math.max(t,e.from);return this.end}peek(t){let e,n,o=this.chunkOff+t;if(o>=0&&o=this.chunk2Pos&&eo.to&&(this.chunk2=this.chunk2.slice(0,o.to-e)),n=this.chunk2.charCodeAt(0)}}return e>=this.token.lookAhead&&(this.token.lookAhead=e+1),n}acceptToken(t,e=0){let n=e?this.resolveOffset(e,-1):this.pos;if(null==n||n=this.chunk2Pos&&this.posthis.range.to?t.slice(0,this.range.to-this.pos):t,this.chunkPos=this.pos,this.chunkOff=0}}readNext(){return this.chunkOff>=this.chunk.length&&(this.getChunk(),this.chunkOff==this.chunk.length)?this.next=-1:this.next=this.chunk.charCodeAt(this.chunkOff)}advance(t=1){for(this.chunkOff+=t;this.pos+t>=this.range.to;){if(this.rangeIndex==this.ranges.length-1)return this.setDone();t-=this.range.to-this.pos,this.range=this.ranges[++this.rangeIndex],this.pos=this.range.from}return this.pos+=t,this.pos>=this.token.lookAhead&&(this.token.lookAhead=this.pos+1),this.readNext()}setDone(){return this.pos=this.chunkPos=this.end,this.range=this.ranges[this.rangeIndex=this.ranges.length-1],this.chunk="",this.next=-1}reset(t,e){if(e?(this.token=e,e.start=t,e.lookAhead=t+1,e.value=e.extended=-1):this.token=c_,this.pos!=t){if(this.pos=t,t==this.end)return this.setDone(),this;for(;t=this.range.to;)this.range=this.ranges[++this.rangeIndex];t>=this.chunkPos&&t=this.chunkPos&&e<=this.chunkPos+this.chunk.length)return this.chunk.slice(t-this.chunkPos,e-this.chunkPos);if(t>=this.chunk2Pos&&e<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(t-this.chunk2Pos,e-this.chunk2Pos);if(t>=this.range.from&&e<=this.range.to)return this.input.read(t,e);let n="";for(let o of this.ranges){if(o.from>=e)break;o.to>t&&(n+=this.input.read(Math.max(o.from,t),Math.min(o.to,e)))}return n}}class h_{constructor(t,e){this.data=t,this.id=e}token(t,e){let{parser:n}=e.p;f_(this.data,t,e,this.id,n.data,n.tokenPrecTable)}}h_.prototype.contextual=h_.prototype.fallback=h_.prototype.extend=!1;class p_{constructor(t,e,n){this.precTable=e,this.elseToken=n,this.data="string"==typeof t?a_(t):t}token(t,e){let n=t.pos,o=0;for(;;){let n=t.next<0,i=t.resolveOffset(1,1);if(f_(this.data,t,e,0,this.data,this.precTable),t.token.value>-1)break;if(null==this.elseToken)return;if(n||o++,null==i)break;t.reset(i,t.token)}o&&(t.reset(n,t.token),t.acceptToken(this.elseToken,o))}}p_.prototype.contextual=h_.prototype.fallback=h_.prototype.extend=!1;class d_{constructor(t,e={}){this.token=t,this.contextual=!!e.contextual,this.fallback=!!e.fallback,this.extend=!!e.extend}}function f_(t,e,n,o,i,r){let s=0,a=1<0){let n=t[o];if(l.allows(n)&&(-1==e.token.value||e.token.value==n||m_(n,e.token.value,i,r))){e.acceptToken(n);break}}let o=e.next,c=0,u=t[s+2];if(!(e.next<0&&u>c&&65535==t[n+3*u-3])){for(;c>1,r=n+i+(i<<1),a=t[r],l=t[r+1]||65536;if(o=l)){s=t[r+2],e.advance();continue t}c=i+1}}break}s=t[n+3*u-1]}}function g_(t,e,n){for(let o,i=e;65535!=(o=t[i]);i++)if(o==n)return i-e;return-1}function m_(t,e,n,o){let i=g_(n,o,e);return i<0||g_(n,o,t)e)&&!o.type.isError)return n<0?Math.max(0,Math.min(o.to-1,e-25)):Math.min(t.length,Math.max(o.from+1,e+25));if(n<0?o.prevSibling():o.nextSibling())break;if(!o.parent())return n<0?0:t.length}}class O_{constructor(t,e){this.fragments=t,this.nodeSet=e,this.i=0,this.fragment=null,this.safeFrom=-1,this.safeTo=-1,this.trees=[],this.start=[],this.index=[],this.nextFragment()}nextFragment(){let t=this.fragment=this.i==this.fragments.length?null:this.fragments[this.i++];if(t){for(this.safeFrom=t.openStart?__(t.tree,t.from+t.offset,1)-t.offset:t.from,this.safeTo=t.openEnd?__(t.tree,t.to+t.offset,-1)-t.offset:t.to;this.trees.length;)this.trees.pop(),this.start.pop(),this.index.pop();this.trees.push(t.tree),this.start.push(-t.offset),this.index.push(0),this.nextStart=this.safeFrom}else this.nextStart=1e9}nodeAt(t){if(tt)return this.nextStart=r,null;if(i instanceof bh){if(r==t){if(r=Math.max(this.safeFrom,t)&&(this.trees.push(i),this.start.push(r),this.index.push(0))}else this.index[e]++,this.nextStart=r+i.length}}}class b_{constructor(t,e){this.stream=e,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=t.tokenizers.map((t=>new l_))}getActions(t){let e=0,n=null,{parser:o}=t.p,{tokenizers:i}=o,r=o.stateSlot(t.state,3),s=t.curContext?t.curContext.hash:0,a=0;for(let o=0;oc.end+25&&(a=Math.max(c.lookAhead,a)),0!=c.value)){let o=e;if(c.extended>-1&&(e=this.addActions(t,c.extended,c.end,e)),e=this.addActions(t,c.value,c.end,e),!l.extend&&(n=c,e>o))break}}for(;this.actions.length>e;)this.actions.pop();return a&&t.setLookAhead(a),n||t.pos!=this.stream.end||(n=new l_,n.value=t.p.parser.eofTerm,n.start=n.end=t.pos,e=this.addActions(t,n.value,n.end,e)),this.mainToken=n,this.actions}getMainToken(t){if(this.mainToken)return this.mainToken;let e=new l_,{pos:n,p:o}=t;return e.start=n,e.end=Math.min(n+1,o.stream.end),e.value=n==o.stream.end?o.parser.eofTerm:0,e}updateCachedToken(t,e,n){let o=this.stream.clipPos(n.pos);if(e.token(this.stream.reset(o,t),n),t.value>-1){let{parser:e}=n.p;for(let o=0;o=0&&n.p.parser.dialect.allows(i>>1)){0==(1&i)?t.value=i>>1:t.extended=i>>1;break}}}else t.value=0,t.end=this.stream.clipPos(o+1)}putAction(t,e,n,o){for(let e=0;e4*t.bufferLength?new O_(n,t.nodeSet):null}get parsedPos(){return this.minStackPos}advance(){let t,e,n=this.stacks,o=this.minStackPos,i=this.stacks=[];if(this.bigReductionCount>300&&1==n.length){let[t]=n;for(;t.forceReduce()&&t.stack.length&&t.stack[t.stack.length-2]>=this.lastBigReductionStart;);this.bigReductionCount=this.lastBigReductionSize=0}for(let r=0;ro)i.push(s);else{if(this.advanceStack(s,i,n))continue;{t||(t=[],e=[]),t.push(s);let n=this.tokens.getMainToken(s);e.push(n.value,n.end)}}break}}if(!i.length){let e=t&&function(t){let e=null;for(let n of t){let t=n.p.stoppedAt;(n.pos==n.p.stream.end||null!=t&&n.pos>t)&&n.p.parser.stateFlag(n.state,2)&&(!e||e.scorethis.stoppedAt?t[0]:this.runRecovery(t,e,i);if(n)return v_&&console.log("Force-finish "+this.stackID(n)),this.stackToTree(n.forceAll())}if(this.recovering){let t=1==this.recovering?1:3*this.recovering;if(i.length>t)for(i.sort(((t,e)=>e.score-t.score));i.length>t;)i.pop();i.some((t=>t.reducePos>o))&&this.recovering--}else if(i.length>1){t:for(let t=0;t500&&o.buffer.length>500){if(!((e.score-o.score||e.buffer.length-o.buffer.length)>0)){i.splice(t--,1);continue t}i.splice(n--,1)}}}i.length>12&&i.splice(12,i.length-12)}this.minStackPos=i[0].pos;for(let t=1;t ":"";if(null!=this.stoppedAt&&o>this.stoppedAt)return t.forceReduce()?t:null;if(this.fragments){let e=t.curContext&&t.curContext.tracker.strict,n=e?t.curContext.hash:0;for(let s=this.fragments.nodeAt(o);s;){let o=this.parser.nodeSet.types[s.type.id]==s.type?i.getGoto(t.state,s.type.id):-1;if(o>-1&&s.length&&(!e||(s.prop(dh.contextHash)||0)==n))return t.useNode(s,o),v_&&console.log(r+this.stackID(t)+` (via reuse of ${i.getName(s.type.id)})`),!0;if(!(s instanceof bh)||0==s.children.length||s.positions[0]>0)break;let a=s.children[0];if(!(a instanceof bh&&0==s.positions[0]))break;s=a}}let s=i.stateSlot(t.state,4);if(s>0)return t.reduce(s),v_&&console.log(r+this.stackID(t)+` (via always-reduce ${i.getName(65535&s)})`),!0;if(t.stack.length>=8400)for(;t.stack.length>6e3&&t.forceReduce(););let a=this.tokens.getActions(t);for(let s=0;so?e.push(p):n.push(p)}return!1}advanceFully(t,e){let n=t.pos;for(;;){if(!this.advanceStack(t,null,null))return!1;if(t.pos>n)return x_(t,e),!0}}runRecovery(t,e,n){let o=null,i=!1;for(let r=0;r ":"";if(s.deadEnd){if(i)continue;if(i=!0,s.restart(),v_&&console.log(c+this.stackID(s)+" (restarted)"),this.advanceFully(s,n))continue}let u=s.split(),h=c;for(let t=0;u.forceReduce()&&t<10;t++){if(v_&&console.log(h+this.stackID(u)+" (via force-reduce)"),this.advanceFully(u,n))break;v_&&(h=this.stackID(u)+" -> ")}for(let t of s.recoverByInsert(a))v_&&console.log(c+this.stackID(t)+" (via recover-insert)"),this.advanceFully(t,n);this.stream.end>s.pos?(l==s.pos&&(l++,a=0),s.recoverByDelete(a,l),v_&&console.log(c+this.stackID(s)+` (via recover-delete ${this.parser.getName(a)})`),x_(s,n)):(!o||o.scoret;class P_{constructor(t){this.start=t.start,this.shift=t.shift||k_,this.reduce=t.reduce||k_,this.reuse=t.reuse||k_,this.hash=t.hash||(()=>0),this.strict=!1!==t.strict}}class C_ extends Wh{constructor(t){if(super(),this.wrappers=[],14!=t.version)throw new RangeError(`Parser version (${t.version}) doesn't match runtime version (${14})`);let e=t.nodeNames.split(" ");this.minRepeatTerm=e.length;for(let n=0;nt.topRules[e][1])),o=[];for(let t=0;t=0)i(o,t,e[n++]);else{let r=e[n+-o];for(let s=-o;s>0;s--)i(e[n++],t,r);n++}}}this.nodeSet=new vh(e.map(((e,i)=>mh.define({name:i>=this.minRepeatTerm?void 0:e,id:i,props:o[i],top:n.indexOf(i)>-1,error:0==i,skipped:t.skippedNodes&&t.skippedNodes.indexOf(i)>-1})))),t.propSources&&(this.nodeSet=this.nodeSet.extend(...t.propSources)),this.strict=!1,this.bufferLength=uh;let r=a_(t.tokenData);this.context=t.context,this.specializerSpecs=t.specialized||[],this.specialized=new Uint16Array(this.specializerSpecs.length);for(let t=0;t"number"==typeof t?new h_(r,t):t)),this.topRules=t.topRules,this.dialects=t.dialects||{},this.dynamicPrecedences=t.dynamicPrecedences||null,this.tokenPrecTable=t.tokenPrec,this.termNames=t.termNames||null,this.maxNode=this.nodeSet.types.length-1,this.dialect=this.parseDialect(),this.top=this.topRules[Object.keys(this.topRules)[0]]}createParse(t,e,n){let o=new w_(this,t,e,n);for(let i of this.wrappers)o=i(o,t,e,n);return o}getGoto(t,e,n=!1){let o=this.goto;if(e>=o[0])return-1;for(let i=o[e+1];;){let e=o[i++],r=1&e,s=o[i++];if(r&&n)return s;for(let n=i+(e>>1);i0}validAction(t,e){return!!this.allActions(t,(t=>t==e||null))}allActions(t,e){let n=this.stateSlot(t,4),o=n?e(n):void 0;for(let n=this.stateSlot(t,1);null==o;n+=3){if(65535==this.data[n]){if(1!=this.data[n+1])break;n=T_(this.data,n+2)}o=e(T_(this.data,n+1))}return o}nextStates(t){let e=[];for(let n=this.stateSlot(t,1);;n+=3){if(65535==this.data[n]){if(1!=this.data[n+1])break;n=T_(this.data,n+2)}if(0==(this.data[n+2]&65536>>16)){let t=this.data[n+1];e.some(((e,n)=>1&n&&e==t))||e.push(this.data[n],t)}}return e}configure(t){let e=Object.assign(Object.create(C_.prototype),this);if(t.props&&(e.nodeSet=this.nodeSet.extend(...t.props)),t.top){let n=this.topRules[t.top];if(!n)throw new RangeError(`Invalid top rule name ${t.top}`);e.top=n}return t.tokenizers&&(e.tokenizers=this.tokenizers.map((e=>{let n=t.tokenizers.find((t=>t.from==e));return n?n.to:e}))),t.specializers&&(e.specializers=this.specializers.slice(),e.specializerSpecs=this.specializerSpecs.map(((n,o)=>{let i=t.specializers.find((t=>t.from==n.external));if(!i)return n;let r=Object.assign(Object.assign({},n),{external:i.to});return e.specializers[o]=E_(r),r}))),t.contextTracker&&(e.context=t.contextTracker),t.dialect&&(e.dialect=this.parseDialect(t.dialect)),null!=t.strict&&(e.strict=t.strict),t.wrap&&(e.wrappers=e.wrappers.concat(t.wrap)),null!=t.bufferLength&&(e.bufferLength=t.bufferLength),e}hasWrappers(){return this.wrappers.length>0}getName(t){return this.termNames?this.termNames[t]:String(t<=this.maxNode&&this.nodeSet.types[t].name||t)}get eofTerm(){return this.maxNode+1}get topNode(){return this.nodeSet.types[this.top[1]]}dynamicPrecedence(t){let e=this.dynamicPrecedences;return null==e?0:e[t]||0}parseDialect(t){let e=Object.keys(this.dialects),n=e.map((()=>!1));if(t)for(let o of t.split(" ")){let t=e.indexOf(o);t>=0&&(n[t]=!0)}let o=null;for(let t=0;tt.external(n,o)<<1|e}return t.get}const Q_=96,A_=1,$_=97,j_=98,R_=2,Z_=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288],M_=58,V_=40,D_=95,I_=91,N_=45,W_=46,X_=35,L_=37,Y_=38,z_=92,q_=10;function U_(t){return t>=65&&t<=90||t>=97&&t<=122||t>=161}const B_=new d_(((t,e)=>{for(let o=!1,i=0,r=0;;r++){let{next:s}=t;if(U_(s)||s==N_||s==D_||o&&((n=s)>=48&&n<=57))!o&&(s!=N_||r>0)&&(o=!0),i===r&&s==N_&&i++,t.advance();else{if(s!=z_||t.peek(1)==q_){o&&t.acceptToken(s==V_?$_:2==i&&e.canShift(R_)?R_:j_);break}t.advance(),t.next>-1&&t.advance(),o=!0}}var n})),F_=new d_((t=>{if(Z_.includes(t.peek(-1))){let{next:e}=t;(U_(e)||e==D_||e==X_||e==W_||e==I_||e==M_||e==N_||e==Y_)&&t.acceptToken(Q_)}})),G_=new d_((t=>{if(!Z_.includes(t.peek(-1))){let{next:e}=t;if(e==L_&&(t.advance(),t.acceptToken(A_)),U_(e)){do{t.advance()}while(U_(t.next));t.acceptToken(A_)}}})),H_=sp({"AtKeyword import charset namespace keyframes media supports":Cp.definitionKeyword,"from to selector":Cp.keyword,NamespaceName:Cp.namespace,KeyframeName:Cp.labelName,KeyframeRangeName:Cp.operatorKeyword,TagName:Cp.tagName,ClassName:Cp.className,PseudoClassName:Cp.constant(Cp.className),IdName:Cp.labelName,"FeatureName PropertyName":Cp.propertyName,AttributeName:Cp.attributeName,NumberLiteral:Cp.number,KeywordQuery:Cp.keyword,UnaryQueryOp:Cp.operatorKeyword,"CallTag ValueName":Cp.atom,VariableName:Cp.variableName,Callee:Cp.operatorKeyword,Unit:Cp.unit,"UniversalSelector NestingSelector":Cp.definitionOperator,MatchOp:Cp.compareOperator,"ChildOp SiblingOp, LogicOp":Cp.logicOperator,BinOp:Cp.arithmeticOperator,Important:Cp.modifier,Comment:Cp.blockComment,ColorLiteral:Cp.color,"ParenthesizedContent StringLiteral":Cp.string,":":Cp.punctuation,"PseudoOp #":Cp.derefOperator,"; ,":Cp.separator,"( )":Cp.paren,"[ ]":Cp.squareBracket,"{ }":Cp.brace}),K_={__proto__:null,lang:32,"nth-child":32,"nth-last-child":32,"nth-of-type":32,"nth-last-of-type":32,dir:32,"host-context":32,url:60,"url-prefix":60,domain:60,regexp:60,selector:134},J_={__proto__:null,"@import":114,"@media":138,"@charset":142,"@namespace":146,"@keyframes":152,"@supports":164},tO={__proto__:null,not:128,only:128},eO=C_.deserialize({version:14,states:"9bQYQ[OOO#_Q[OOP#fOWOOOOQP'#Cd'#CdOOQP'#Cc'#CcO#kQ[O'#CfO$_QXO'#CaO$fQ[O'#ChO$qQ[O'#DPO$vQ[O'#DTOOQP'#Ej'#EjO${QdO'#DeO%gQ[O'#DrO${QdO'#DtO%xQ[O'#DvO&TQ[O'#DyO&]Q[O'#EPO&kQ[O'#ERO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^;'S;=`%o<%lO%^bB{S^Qo`Oy%^z;'S%^;'S;=`%o<%lO%^nC^S!W^Oy%^z;'S%^;'S;=`%o<%lO%^dCoSzSOy%^z;'S%^;'S;=`%o<%lO%^bDQU|QOy%^z!`%^!`!aDd!a;'S%^;'S;=`%o<%lO%^bDkS|Qo`Oy%^z;'S%^;'S;=`%o<%lO%^bDzWOy%^z!c%^!c!}Ed!}#T%^#T#oEd#o;'S%^;'S;=`%o<%lO%^bEk[!YQo`Oy%^z}%^}!OEd!O!Q%^!Q![Ed![!c%^!c!}Ed!}#T%^#T#oEd#o;'S%^;'S;=`%o<%lO%^bFfSxQOy%^z;'S%^;'S;=`%o<%lO%^lFwSv[Oy%^z;'S%^;'S;=`%o<%lO%^bGWUOy%^z#b%^#b#cGj#c;'S%^;'S;=`%o<%lO%^bGoUo`Oy%^z#W%^#W#XHR#X;'S%^;'S;=`%o<%lO%^bHYS!`Qo`Oy%^z;'S%^;'S;=`%o<%lO%^bHiUOy%^z#f%^#f#gHR#g;'S%^;'S;=`%o<%lO%^fIQS!RUOy%^z;'S%^;'S;=`%o<%lO%^nIcS!Q^Oy%^z;'S%^;'S;=`%o<%lO%^fItU!PQOy%^z!_%^!_!`6y!`;'S%^;'S;=`%o<%lO%^`JZP;=`<%l$}",tokenizers:[F_,G_,B_,1,2,3,4,new p_("m~RRYZ[z{a~~g~aO#Z~~dP!P!Qg~lO#[~~",28,102)],topRules:{StyleSheet:[0,4],Styles:[1,84]},specialized:[{term:97,get:t=>K_[t]||-1},{term:56,get:t=>J_[t]||-1},{term:98,get:t=>tO[t]||-1}],tokenPrec:1169});let nO=null;function oO(){if(!nO&&"object"==typeof document&&document.body){let{style:t}=document.body,e=[],n=new Set;for(let o in t)"cssText"!=o&&"cssFloat"!=o&&"string"==typeof t[o]&&(/[A-Z]/.test(o)&&(o=o.replace(/[A-Z]/g,(t=>"-"+t.toLowerCase()))),n.has(o)||(e.push(o),n.add(o)));nO=e.sort().map((t=>({type:"property",label:t})))}return nO||[]}const iO=["active","after","any-link","autofill","backdrop","before","checked","cue","default","defined","disabled","empty","enabled","file-selector-button","first","first-child","first-letter","first-line","first-of-type","focus","focus-visible","focus-within","fullscreen","has","host","host-context","hover","in-range","indeterminate","invalid","is","lang","last-child","last-of-type","left","link","marker","modal","not","nth-child","nth-last-child","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","part","placeholder","placeholder-shown","read-only","read-write","required","right","root","scope","selection","slotted","target","target-text","valid","visited","where"].map((t=>({type:"class",label:t}))),rO=["above","absolute","activeborder","additive","activecaption","after-white-space","ahead","alias","all","all-scroll","alphabetic","alternate","always","antialiased","appworkspace","asterisks","attr","auto","auto-flow","avoid","avoid-column","avoid-page","avoid-region","axis-pan","background","backwards","baseline","below","bidi-override","blink","block","block-axis","bold","bolder","border","border-box","both","bottom","break","break-all","break-word","bullets","button","button-bevel","buttonface","buttonhighlight","buttonshadow","buttontext","calc","capitalize","caps-lock-indicator","caption","captiontext","caret","cell","center","checkbox","circle","cjk-decimal","clear","clip","close-quote","col-resize","collapse","color","color-burn","color-dodge","column","column-reverse","compact","condensed","contain","content","contents","content-box","context-menu","continuous","copy","counter","counters","cover","crop","cross","crosshair","currentcolor","cursive","cyclic","darken","dashed","decimal","decimal-leading-zero","default","default-button","dense","destination-atop","destination-in","destination-out","destination-over","difference","disc","discard","disclosure-closed","disclosure-open","document","dot-dash","dot-dot-dash","dotted","double","down","e-resize","ease","ease-in","ease-in-out","ease-out","element","ellipse","ellipsis","embed","end","ethiopic-abegede-gez","ethiopic-halehame-aa-er","ethiopic-halehame-gez","ew-resize","exclusion","expanded","extends","extra-condensed","extra-expanded","fantasy","fast","fill","fill-box","fixed","flat","flex","flex-end","flex-start","footnotes","forwards","from","geometricPrecision","graytext","grid","groove","hand","hard-light","help","hidden","hide","higher","highlight","highlighttext","horizontal","hsl","hsla","hue","icon","ignore","inactiveborder","inactivecaption","inactivecaptiontext","infinite","infobackground","infotext","inherit","initial","inline","inline-axis","inline-block","inline-flex","inline-grid","inline-table","inset","inside","intrinsic","invert","italic","justify","keep-all","landscape","large","larger","left","level","lighter","lighten","line-through","linear","linear-gradient","lines","list-item","listbox","listitem","local","logical","loud","lower","lower-hexadecimal","lower-latin","lower-norwegian","lowercase","ltr","luminosity","manipulation","match","matrix","matrix3d","medium","menu","menutext","message-box","middle","min-intrinsic","mix","monospace","move","multiple","multiple_mask_images","multiply","n-resize","narrower","ne-resize","nesw-resize","no-close-quote","no-drop","no-open-quote","no-repeat","none","normal","not-allowed","nowrap","ns-resize","numbers","numeric","nw-resize","nwse-resize","oblique","opacity","open-quote","optimizeLegibility","optimizeSpeed","outset","outside","outside-shape","overlay","overline","padding","padding-box","painted","page","paused","perspective","pinch-zoom","plus-darker","plus-lighter","pointer","polygon","portrait","pre","pre-line","pre-wrap","preserve-3d","progress","push-button","radial-gradient","radio","read-only","read-write","read-write-plaintext-only","rectangle","region","relative","repeat","repeating-linear-gradient","repeating-radial-gradient","repeat-x","repeat-y","reset","reverse","rgb","rgba","ridge","right","rotate","rotate3d","rotateX","rotateY","rotateZ","round","row","row-resize","row-reverse","rtl","run-in","running","s-resize","sans-serif","saturation","scale","scale3d","scaleX","scaleY","scaleZ","screen","scroll","scrollbar","scroll-position","se-resize","self-start","self-end","semi-condensed","semi-expanded","separate","serif","show","single","skew","skewX","skewY","skip-white-space","slide","slider-horizontal","slider-vertical","sliderthumb-horizontal","sliderthumb-vertical","slow","small","small-caps","small-caption","smaller","soft-light","solid","source-atop","source-in","source-out","source-over","space","space-around","space-between","space-evenly","spell-out","square","start","static","status-bar","stretch","stroke","stroke-box","sub","subpixel-antialiased","svg_masks","super","sw-resize","symbolic","symbols","system-ui","table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row","table-row-group","text","text-bottom","text-top","textarea","textfield","thick","thin","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","to","top","transform","translate","translate3d","translateX","translateY","translateZ","transparent","ultra-condensed","ultra-expanded","underline","unidirectional-pan","unset","up","upper-latin","uppercase","url","var","vertical","vertical-text","view-box","visible","visibleFill","visiblePainted","visibleStroke","visual","w-resize","wait","wave","wider","window","windowframe","windowtext","words","wrap","wrap-reverse","x-large","x-small","xor","xx-large","xx-small"].map((t=>({type:"keyword",label:t}))).concat(["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","grey","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"].map((t=>({type:"constant",label:t})))),sO=["a","abbr","address","article","aside","b","bdi","bdo","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","dd","del","details","dfn","dialog","div","dl","dt","em","figcaption","figure","footer","form","header","hgroup","h1","h2","h3","h4","h5","h6","hr","html","i","iframe","img","input","ins","kbd","label","legend","li","main","meter","nav","ol","output","p","pre","ruby","section","select","small","source","span","strong","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","tr","u","ul"].map((t=>({type:"type",label:t}))),aO=/^(\w[\w-]*|-\w[\w-]*|)$/,lO=/^-(-[\w-]*)?$/;const cO=new Ih,uO=["Declaration"];function hO(t){for(let e=t;;){if(e.type.isTop)return e;if(!(e=e.parent))return t}}function pO(t,e,n){if(e.to-e.from>4096){let o=cO.get(e);if(o)return o;let i=[],r=new Set,s=e.cursor(Oh.IncludeAnonymous);if(s.firstChild())do{for(let e of pO(t,s.node,n))r.has(e.label)||(r.add(e.label),i.push(e))}while(s.nextSibling());return cO.set(e,i),i}{let o=[],i=new Set;return e.cursor().iterate((e=>{var r;if(n(e)&&e.matchContext(uO)&&":"==(null===(r=e.node.nextSibling)||void 0===r?void 0:r.name)){let n=t.sliceString(e.from,e.to);i.has(n)||(i.add(n),o.push({label:n,type:"variable"}))}})),o}}const dO=t=>e=>{let{state:n,pos:o}=e,i=Zp(n).resolveInner(o,-1),r=i.type.isError&&i.from==i.to-1&&"-"==n.doc.sliceString(i.from,i.to);if("PropertyName"==i.name||(r||"TagName"==i.name)&&/^(Block|Styles)$/.test(i.resolve(i.to).name))return{from:i.from,options:oO(),validFor:aO};if("ValueName"==i.name)return{from:i.from,options:rO,validFor:aO};if("PseudoClassName"==i.name)return{from:i.from,options:iO,validFor:aO};if(t(i)||(e.explicit||r)&&function(t,e){var n;if(("("==t.name||t.type.isError)&&(t=t.parent||t),"ArgList"!=t.name)return!1;let o=null===(n=t.parent)||void 0===n?void 0:n.firstChild;return"Callee"==(null==o?void 0:o.name)&&"var"==e.sliceString(o.from,o.to)}(i,n.doc))return{from:t(i)||r?i.from:o,options:pO(n.doc,hO(i),t),validFor:lO};if("TagName"==i.name){for(let{parent:t}=i;t;t=t.parent)if("Block"==t.name)return{from:i.from,options:oO(),validFor:aO};return{from:i.from,options:sO,validFor:aO}}if(!e.explicit)return null;let s=i.resolve(o),a=s.childBefore(o);return a&&":"==a.name&&"PseudoClassSelector"==s.name?{from:o,options:iO,validFor:aO}:a&&":"==a.name&&"Declaration"==s.name||"ArgList"==s.name?{from:o,options:rO,validFor:aO}:"Block"==s.name||"Styles"==s.name?{from:o,options:oO(),validFor:aO}:null},fO=dO((t=>"VariableName"==t.name)),gO=Rp.define({name:"css",parser:eO.configure({props:[Kp.add({Declaration:sd()}),cd.add({"Block KeyframeList":ud})]}),languageData:{commentTokens:{block:{open:"/*",close:"*/"}},indentOnInput:/^\s*\}$/,wordChars:"-"}});function mO(){return new zp(gO,gO.data.of({autocomplete:fO}))}const vO=4,yO=5,_O=6,OO=7,bO=8,wO=9,xO=10,SO=11,kO=12,PO=13,CO=57,TO=14,EO=58,QO=20,AO=22,$O=23,jO=24,RO=26,ZO=27,MO=28,VO=31,DO=34,IO=36,NO=37,WO=0,XO=1,LO={area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},YO={dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},zO={dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}};function qO(t){return 9==t||10==t||13==t||32==t}let UO=null,BO=null,FO=0;function GO(t,e){let n=t.pos+e;if(FO==n&&BO==t)return UO;let o=t.peek(e);for(;qO(o);)o=t.peek(++e);let i="";for(;45==(r=o)||46==r||58==r||r>=65&&r<=90||95==r||r>=97&&r<=122||r>=161;)i+=String.fromCharCode(o),o=t.peek(++e);var r;return BO=t,FO=n,UO=i?i.toLowerCase():o==tb||o==eb?void 0:null}const HO=60,KO=62,JO=47,tb=63,eb=33,nb=45;function ob(t,e){this.name=t,this.parent=e,this.hash=e?e.hash:0;for(let e=0;eib.indexOf(e)>-1?new ob(GO(o,1)||"",t):t,reduce:(t,e)=>e==QO&&t?t.parent:t,reuse(t,e,n,o){let i=e.type.id;return i==_O||i==IO?new ob(GO(o,1)||"",t):t},hash:t=>t?t.hash:0,strict:!1}),sb=new d_(((t,e)=>{if(t.next!=HO)return void(t.next<0&&e.context&&t.acceptToken(CO));t.advance();let n=t.next==JO;n&&t.advance();let o=GO(t,0);if(void 0===o)return;if(!o)return t.acceptToken(n?TO:_O);let i=e.context?e.context.name:null;if(n){if(o==i)return t.acceptToken(SO);if(i&&YO[i])return t.acceptToken(CO,-2);if(e.dialectEnabled(WO))return t.acceptToken(kO);for(let t=e.context;t;t=t.parent)if(t.name==o)return;t.acceptToken(PO)}else{if("script"==o)return t.acceptToken(OO);if("style"==o)return t.acceptToken(bO);if("textarea"==o)return t.acceptToken(wO);if(LO.hasOwnProperty(o))return t.acceptToken(xO);i&&zO[i]&&zO[i][o]?t.acceptToken(CO,-1):t.acceptToken(_O)}}),{contextual:!0}),ab=new d_((t=>{for(let e=0,n=0;;n++){if(t.next<0){n&&t.acceptToken(EO);break}if(t.next==nb)e++;else{if(t.next==KO&&e>=2){n>=3&&t.acceptToken(EO,-2);break}e=0}t.advance()}}));const lb=new d_(((t,e)=>{if(t.next==JO&&t.peek(1)==KO){let n=e.dialectEnabled(XO)||function(t){for(;t;t=t.parent)if("svg"==t.name||"math"==t.name)return!0;return!1}(e.context);t.acceptToken(n?yO:vO,2)}else t.next==KO&&t.acceptToken(vO,1)}));function cb(t,e,n){let o=2+t.length;return new d_((i=>{for(let r=0,s=0,a=0;;a++){if(i.next<0){a&&i.acceptToken(e);break}if(0==r&&i.next==HO||1==r&&i.next==JO||r>=2&&rs?i.acceptToken(e,-s):i.acceptToken(n,-(s-2));break}if((10==i.next||13==i.next)&&a){i.acceptToken(e,1);break}r=s=0}else s++;i.advance()}}))}const ub=cb("script",54,1),hb=cb("style",55,2),pb=cb("textarea",56,3),db=sp({"Text RawText":Cp.content,"StartTag StartCloseTag SelfClosingEndTag EndTag":Cp.angleBracket,TagName:Cp.tagName,"MismatchedCloseTag/TagName":[Cp.tagName,Cp.invalid],AttributeName:Cp.attributeName,"AttributeValue UnquotedAttributeValue":Cp.attributeValue,Is:Cp.definitionOperator,"EntityReference CharacterReference":Cp.character,Comment:Cp.blockComment,ProcessingInst:Cp.processingInstruction,DoctypeDecl:Cp.documentMeta}),fb=C_.deserialize({version:14,states:",xOVO!rOOO!WQ#tO'#CqO!]Q#tO'#CzO!bQ#tO'#C}O!gQ#tO'#DQO!lQ#tO'#DSO!qOaO'#CpO!|ObO'#CpO#XOdO'#CpO$eO!rO'#CpOOO`'#Cp'#CpO$lO$fO'#DTO$tQ#tO'#DVO$yQ#tO'#DWOOO`'#Dk'#DkOOO`'#DY'#DYQVO!rOOO%OQ&rO,59]O%WQ&rO,59fO%`Q&rO,59iO%hQ&rO,59lO%sQ&rO,59nOOOa'#D^'#D^O%{OaO'#CxO&WOaO,59[OOOb'#D_'#D_O&`ObO'#C{O&kObO,59[OOOd'#D`'#D`O&sOdO'#DOO'OOdO,59[OOO`'#Da'#DaO'WO!rO,59[O'_Q#tO'#DROOO`,59[,59[OOOp'#Db'#DbO'dO$fO,59oOOO`,59o,59oO'lQ#|O,59qO'qQ#|O,59rOOO`-E7W-E7WO'vQ&rO'#CsOOQW'#DZ'#DZO(UQ&rO1G.wOOO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`!oO!b!pO~OS!rO~OS!sO~OS!tO~Oa!uOb!uOc!uO!`!wO!a!uO~Oa!xOb!xOc!xO!b!wO!c!xO~Oa!uOb!uOc!uO!`!{O!a!uO~Oa!xOb!xOc!xO!b!{O!c!xO~OT~bac!dx{!d~",goto:"%p!`PPPPPPPPPPPPPPPPPPPP!a!gP!mPP!yP!|#P#S#Y#]#`#f#i#l#r#x!aP!a!aP$O$U$l$r$x%O%U%[%bPPPPPPPP%hX^OX`pXUOX`pezabcde{}!P!R!UR!q!dRhUR!XhXVOX`pRkVR!XkXWOX`pRnWR!XnXXOX`pQrXR!XpXYOX`pQ`ORx`Q{aQ}bQ!PcQ!RdQ!UeZ!e{}!P!R!UQ!v!oR!z!vQ!y!pR!|!yQgUR!VgQjVR!YjQmWR![mQpXR!^pQtZR!`tS_O`ToXp",nodeNames:"⚠ StartCloseTag StartCloseTag StartCloseTag EndTag SelfClosingEndTag StartTag StartTag StartTag StartTag StartTag StartCloseTag StartCloseTag StartCloseTag IncompleteCloseTag Document Text EntityReference CharacterReference InvalidEntity Element OpenTag TagName Attribute AttributeName Is AttributeValue UnquotedAttributeValue ScriptText CloseTag OpenTag StyleText CloseTag OpenTag TextareaText CloseTag OpenTag CloseTag SelfClosingTag Comment ProcessingInst MismatchedCloseTag CloseTag DoctypeDecl",maxTerm:67,context:rb,nodeProps:[["closedBy",-10,1,2,3,7,8,9,10,11,12,13,"EndTag",6,"EndTag SelfClosingEndTag",-4,21,30,33,36,"CloseTag"],["openedBy",4,"StartTag StartCloseTag",5,"StartTag",-4,29,32,35,37,"OpenTag"],["group",-9,14,17,18,19,20,39,40,41,42,"Entity",16,"Entity TextContent",-3,28,31,34,"TextContent Entity"]],propSources:[db],skippedNodes:[0],repeatNodeCount:9,tokenData:"!]tw8twx7Sx!P8t!P!Q5u!Q!]8t!]!^/^!^!a7S!a#S8t#S#T;{#T#s8t#s$f5u$f;'S8t;'S;=`>V<%l?Ah8t?Ah?BY5u?BY?Mn8t?MnO5u!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=`<%l!6Vq!7]V!cpOv!5kvx!6Vx!`!5k!`!a!7r!a;'S!5k;'S;=`!8V<%lO!5kq!7yS!cpxPOv(Vx;'S(V;'S;=`(h<%lO(Vq!8YP;=`<%l!5ka!8bX!a`Or!8]rs!6Vsv!8]vw!6Vw!a!8]!a!b!8}!b;'S!8];'S;=`!:V<%lO!8]a!9SX!a`Or!8]rs!6Vsv!8]vw!6Vw!`!8]!`!a!9o!a;'S!8];'S;=`!:V<%lO!8]a!9vT!a`xPOr)esv)ew;'S)e;'S;=`)y<%lO)ea!:YP;=`<%l!8]!R!:dY!a`!cpOr!4trs!5ksv!4tvw!6Vwx!8]x!`!4t!`!a!;S!a;'S!4t;'S;=`!;r<%lO!4t!R!;]V!a`!cpxPOr*Vrs(Vsv*Vwx)ex;'S*V;'S;=`*s<%lO*V!R!;uP;=`<%l!4t!V!{let a=t.type.id;if(a==MO)return vb(t,e,n);if(a==VO)return vb(t,e,o);if(a==DO)return vb(t,e,i);if(a==QO&&r.length){let n,o=t.node,i=o.firstChild,s=i&&mb(i,e);if(s)for(let t of r)if(t.tag==s&&(!t.attrs||t.attrs(n||(n=gb(o,e))))){let e=o.lastChild,n=e.type.id==NO?e.from:o.to;if(n>i.to)return{parser:t.parser,overlay:[{from:i.to,to:n}]}}}if(s&&a==$O){let n,o=t.node;if(n=o.firstChild){let t=s[e.read(n.from,n.to)];if(t)for(let n of t){if(n.tagName&&n.tagName!=mb(o.parent,e))continue;let t=o.lastChild;if(t.type.id==RO){let e=t.from+1,o=t.lastChild,i=t.to-(o&&o.isError?0:1);if(i>e)return{parser:n.parser,overlay:[{from:e,to:i}]}}else if(t.type.id==ZO)return{parser:n.parser,overlay:[{from:t.from,to:t.to}]}}}}return null},(t,e,n,o)=>new Uh(t,a,e,n,o);var a}const _b=309,Ob=1,bb=2,wb=3,xb=310,Sb=312,kb=313,Pb=4,Cb=5,Tb=0,Eb=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288],Qb=125,Ab=59,$b=47,jb=42,Rb=43,Zb=45,Mb=60,Vb=44,Db=new P_({start:!1,shift:(t,e)=>e==Pb||e==Cb||e==Sb?t:e==kb,strict:!1}),Ib=new d_(((t,e)=>{let{next:n}=t;(n==Qb||-1==n||e.context)&&t.acceptToken(xb)}),{contextual:!0,fallback:!0}),Nb=new d_(((t,e)=>{let n,{next:o}=t;Eb.indexOf(o)>-1||(o!=$b||(n=t.peek(1))!=$b&&n!=jb)&&(o==Qb||o==Ab||-1==o||e.context||t.acceptToken(_b))}),{contextual:!0}),Wb=new d_(((t,e)=>{let{next:n}=t;if((n==Rb||n==Zb)&&(t.advance(),n==t.next)){t.advance();let n=!e.context&&e.canShift(Ob);t.acceptToken(n?Ob:bb)}}),{contextual:!0});function Xb(t,e){return t>=65&&t<=90||t>=97&&t<=122||95==t||t>=192||!e&&t>=48&&t<=57}const Lb=new d_(((t,e)=>{if(t.next!=Mb||!e.dialectEnabled(Tb))return;if(t.advance(),t.next==$b)return;let n=0;for(;Eb.indexOf(t.next)>-1;)t.advance(),n++;if(Xb(t.next,!0)){for(t.advance(),n++;Xb(t.next,!1);)t.advance(),n++;for(;Eb.indexOf(t.next)>-1;)t.advance(),n++;if(t.next==Vb)return;for(let e=0;;e++){if(7==e){if(!Xb(t.next,!0))return;break}if(t.next!="extends".charCodeAt(e))break;t.advance(),n++}}t.acceptToken(wb,-n)})),Yb=sp({"get set async static":Cp.modifier,"for while do if else switch try catch finally return throw break continue default case":Cp.controlKeyword,"in of await yield void typeof delete instanceof":Cp.operatorKeyword,"let var const using function class extends":Cp.definitionKeyword,"import export from":Cp.moduleKeyword,"with debugger as new":Cp.keyword,TemplateString:Cp.special(Cp.string),super:Cp.atom,BooleanLiteral:Cp.bool,this:Cp.self,null:Cp.null,Star:Cp.modifier,VariableName:Cp.variableName,"CallExpression/VariableName TaggedTemplateExpression/VariableName":Cp.function(Cp.variableName),VariableDefinition:Cp.definition(Cp.variableName),Label:Cp.labelName,PropertyName:Cp.propertyName,PrivatePropertyName:Cp.special(Cp.propertyName),"CallExpression/MemberExpression/PropertyName":Cp.function(Cp.propertyName),"FunctionDeclaration/VariableDefinition":Cp.function(Cp.definition(Cp.variableName)),"ClassDeclaration/VariableDefinition":Cp.definition(Cp.className),PropertyDefinition:Cp.definition(Cp.propertyName),PrivatePropertyDefinition:Cp.definition(Cp.special(Cp.propertyName)),UpdateOp:Cp.updateOperator,"LineComment Hashbang":Cp.lineComment,BlockComment:Cp.blockComment,Number:Cp.number,String:Cp.string,Escape:Cp.escape,ArithOp:Cp.arithmeticOperator,LogicOp:Cp.logicOperator,BitOp:Cp.bitwiseOperator,CompareOp:Cp.compareOperator,RegExp:Cp.regexp,Equals:Cp.definitionOperator,Arrow:Cp.function(Cp.punctuation),": Spread":Cp.punctuation,"( )":Cp.paren,"[ ]":Cp.squareBracket,"{ }":Cp.brace,"InterpolationStart InterpolationEnd":Cp.special(Cp.brace),".":Cp.derefOperator,", ;":Cp.separator,"@":Cp.meta,TypeName:Cp.typeName,TypeDefinition:Cp.definition(Cp.typeName),"type enum interface implements namespace module declare":Cp.definitionKeyword,"abstract global Privacy readonly override":Cp.modifier,"is keyof unique infer":Cp.operatorKeyword,JSXAttributeValue:Cp.attributeValue,JSXText:Cp.content,"JSXStartTag JSXStartCloseTag JSXSelfCloseEndTag JSXEndTag":Cp.angleBracket,"JSXIdentifier JSXNameSpacedName":Cp.tagName,"JSXAttribute/JSXIdentifier JSXAttribute/JSXNameSpacedName":Cp.attributeName,"JSXBuiltin/JSXIdentifier":Cp.standard(Cp.tagName)}),zb={__proto__:null,export:18,as:23,from:31,default:34,async:39,function:40,extends:52,this:56,true:64,false:64,null:76,void:80,typeof:84,super:102,new:136,delete:152,yield:161,await:165,class:170,public:227,private:227,protected:227,readonly:229,instanceof:248,satisfies:251,in:252,const:254,import:286,keyof:339,unique:343,infer:349,is:385,abstract:405,implements:407,type:409,let:412,var:414,using:417,interface:423,enum:427,namespace:433,module:435,declare:439,global:443,for:462,of:471,while:474,with:478,do:482,if:486,else:488,switch:492,case:498,try:504,catch:508,finally:512,return:516,throw:520,break:524,continue:528,debugger:532},qb={__proto__:null,async:123,get:125,set:127,declare:187,public:189,private:189,protected:189,static:191,abstract:193,override:195,readonly:201,accessor:203,new:389},Ub={__proto__:null,"<":143},Bb=C_.deserialize({version:14,states:"$RQWO'#CdO>cQWO'#H[O>kQWO'#HbO>kQWO'#HdO`Q^O'#HfO>kQWO'#HhO>kQWO'#HkO>pQWO'#HqO>uQ07iO'#HwO%[Q^O'#HyO?QQ07iO'#H{O?]Q07iO'#H}O9kQ07hO'#IPO?hQ08SO'#ChO@jQ`O'#DiQOQWOOO%[Q^O'#EPOAQQWO'#ESO:RQ7[O'#EjOA]QWO'#EjOAhQpO'#FbOOQU'#Cf'#CfOOQ07`'#Dn'#DnOOQ07`'#Jm'#JmO%[Q^O'#JmOOQO'#Jq'#JqOOQO'#Ib'#IbOBhQ`O'#EcOOQ07`'#Eb'#EbOCdQ07pO'#EcOCnQ`O'#EVOOQO'#Jp'#JpODSQ`O'#JqOEaQ`O'#EVOCnQ`O'#EcPEnO!0LbO'#CaPOOO)CDu)CDuOOOO'#IX'#IXOEyO!bO,59TOOQ07b,59T,59TOOOO'#IY'#IYOFXO#tO,59TO%[Q^O'#D`OOOO'#I['#I[OFgO?MpO,59xOOQ07b,59x,59xOFuQ^O'#I]OGYQWO'#JkOI[QrO'#JkO+}Q^O'#JkOIcQWO,5:OOIyQWO'#ElOJWQWO'#JyOJcQWO'#JxOJcQWO'#JxOJkQWO,5;YOJpQWO'#JwOOQ07f,5:Z,5:ZOJwQ^O,5:ZOLxQ08SO,5:eOMiQWO,5:mONSQ07hO'#JvONZQWO'#JuO9ZQWO'#JuONoQWO'#JuONwQWO,5;XON|QWO'#JuO!#UQrO'#JjOOQ07b'#Ch'#ChO%[Q^O'#ERO!#tQpO,5:rOOQO'#Jr'#JrOOQO-EmOOQU'#J`'#J`OOQU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[$m'S)n,y,|.{2]3p5W6S9W9i:c:f:g:j:k:l:m:n:o:p:q:r:s:t:u:v:w:{;Y;Z;[;^;e;f;o;p<]Q*u%ZQ+k%{Q,Z&bQ,b&jQ.c;QQ0h+^Q0l+`Q0w+lQ1n,`Q2{.[Q4v0rQ5k1gQ6i3PQ6u;RQ7h4wR8m6j&|kOPWXYZstuvw!Z!`!g!o#R#V#Y#c#n#t#x#{$O$P$Q$R$S$T$U$V$W$X$Y$[$a$e$m%j%p%}&f&i&j&m&o&p&r&v'O'S']'m'}(P(V(^(r(v(z)n)y+O+S+^,e,h,m,y,|-^-f-t-z.[.l.s.{0[0a0q1_1o1p1r1t1w1z1|2]2m2s3P3Z3p5W5Y5d5t5u5x6S6]6j7w7|8]8g9W9i:c:f:g:j:k:l:m:n:o:p:q:r:s:t:u:v:w:{;Y;Z;[;^;e;f;o;p<]t!nQ!r!u!x!y'R'Y'Z'g'h'i-Q-W-Y-j1[5]5_$v$si#u#w$c$d$x${%O%Q%[%]%a)u){)}*P*R*Y*`*p*q+]+`+w+z.Z.i/Z/j/k/m0Q0S0^1R1U1^3O3x4S4[4f4n4p5c6g7T7^7y8j8w9[9n:O:W:y:z:|:};O;P;S;T;U;V;W;X;_;`;a;b;c;d;g;h;i;j;k;l;m;n;q;r < TypeParamList TypeDefinition extends ThisType this LiteralType ArithOp Number BooleanLiteral TemplateType InterpolationEnd Interpolation InterpolationStart NullType null VoidType void TypeofType typeof MemberExpression . ?. PropertyName [ TemplateString Escape Interpolation super RegExp ] ArrayExpression Spread , } { ObjectExpression Property async get set PropertyDefinition Block : NewExpression new TypeArgList CompareOp < ) ( ArgList UnaryExpression delete LogicOp BitOp YieldExpression yield AwaitExpression await ParenthesizedExpression ClassExpression class ClassBody MethodDeclaration Decorator @ MemberExpression PrivatePropertyName CallExpression declare Privacy static abstract override PrivatePropertyDefinition PropertyDeclaration readonly accessor Optional TypeAnnotation Equals StaticBlock FunctionExpression ArrowFunction ParamList ParamList ArrayPattern ObjectPattern PatternProperty Privacy readonly Arrow MemberExpression BinaryExpression ArithOp ArithOp ArithOp ArithOp BitOp CompareOp instanceof satisfies in const CompareOp BitOp BitOp BitOp LogicOp LogicOp ConditionalExpression LogicOp LogicOp AssignmentExpression UpdateOp PostfixExpression CallExpression TaggedTemplateExpression DynamicImport import ImportMeta JSXElement JSXSelfCloseEndTag JSXSelfClosingTag JSXIdentifier JSXBuiltin JSXIdentifier JSXNamespacedName JSXMemberExpression JSXSpreadAttribute JSXAttribute JSXAttributeValue JSXEscape JSXEndTag JSXOpenTag JSXFragmentTag JSXText JSXEscape JSXStartCloseTag JSXCloseTag PrefixCast ArrowFunction TypeParamList SequenceExpression KeyofType keyof UniqueType unique ImportType InferredType infer TypeName ParenthesizedType FunctionSignature ParamList NewSignature IndexedType TupleType Label ArrayType ReadonlyType ObjectType MethodType PropertyType IndexSignature PropertyDefinition CallSignature TypePredicate is NewSignature new UnionType LogicOp IntersectionType LogicOp ConditionalType ParameterizedType ClassDeclaration abstract implements type VariableDeclaration let var using TypeAliasDeclaration InterfaceDeclaration interface EnumDeclaration enum EnumBody NamespaceDeclaration namespace module AmbientDeclaration declare GlobalDeclaration global ClassDeclaration ClassBody AmbientFunctionDeclaration ExportGroup VariableName VariableName ImportDeclaration ImportGroup ForStatement for ForSpec ForInSpec ForOfSpec of WhileStatement while WithStatement with DoStatement do IfStatement if else SwitchStatement switch SwitchBody CaseLabel case DefaultLabel TryStatement try CatchClause catch FinallyClause finally ReturnStatement return ThrowStatement throw BreakStatement break ContinueStatement continue DebuggerStatement debugger LabeledStatement ExpressionStatement SingleExpression SingleClassItem",maxTerm:371,context:Db,nodeProps:[["group",-26,8,16,18,65,201,205,209,210,212,215,218,228,230,236,238,240,242,245,251,257,259,261,263,265,267,268,"Statement",-32,12,13,28,31,32,38,48,51,52,54,59,67,75,79,81,83,84,106,107,116,117,134,137,139,140,141,142,144,145,164,165,167,"Expression",-23,27,29,33,37,39,41,168,170,172,173,175,176,177,179,180,181,183,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#P;'S!GY;'S;=`!JZ<%lO!GY!f!HZb(R!b!USOY'}Zw'}x#O'}#P#Z'}#Z#[!HS#[#]'}#]#^!HS#^#a'}#a#b!HS#b#g'}#g#h!HS#h#i'}#i#j!HS#j#m'}#m#n!HS#n;'S'};'S;=`(f<%lO'}!f!IhX(R!bOY!IcZw!Icwx!Acx#O!Ic#O#P!A{#P#Q!GY#Q;'S!Ic;'S;=`!JT<%lO!Ic!f!JWP;=`<%l!Ic!f!J^P;=`<%l!GY(Q!Jh^$f&j(R!bOY!JaYZ&cZw!Jawx!Bwx!^!Ja!^!_!Ic!_#O!Ja#O#P!Cr#P#Q!Q#V#X%Z#X#Y!4|#Y#b%Z#b#c#Zd$f&j(Op(R!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q!R#?i!R!S#?i!S!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S#?i#S#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z$/l#?tf$f&j(Op(R!bo$'|OY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q!R#?i!R!S#?i!S!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S#?i#S#b%Z#b#c#zb[t]||-1},{term:334,get:t=>qb[t]||-1},{term:70,get:t=>Ub[t]||-1}],tokenPrec:14626}),Fb=[qv("function ${name}(${params}) {\n\t${}\n}",{label:"function",detail:"definition",type:"keyword"}),qv("for (let ${index} = 0; ${index} < ${bound}; ${index}++) {\n\t${}\n}",{label:"for",detail:"loop",type:"keyword"}),qv("for (let ${name} of ${collection}) {\n\t${}\n}",{label:"for",detail:"of loop",type:"keyword"}),qv("do {\n\t${}\n} while (${})",{label:"do",detail:"loop",type:"keyword"}),qv("while (${}) {\n\t${}\n}",{label:"while",detail:"loop",type:"keyword"}),qv("try {\n\t${}\n} catch (${error}) {\n\t${}\n}",{label:"try",detail:"/ catch block",type:"keyword"}),qv("if (${}) {\n\t${}\n}",{label:"if",detail:"block",type:"keyword"}),qv("if (${}) {\n\t${}\n} else {\n\t${}\n}",{label:"if",detail:"/ else block",type:"keyword"}),qv("class ${name} {\n\tconstructor(${params}) {\n\t\t${}\n\t}\n}",{label:"class",detail:"definition",type:"keyword"}),qv("import {${names}} from \"${module}\"\n${}",{label:"import",detail:"named",type:"keyword"}),qv("import ${name} from \"${module}\"\n${}",{label:"import",detail:"default",type:"keyword"})],Gb=Fb.concat([qv("interface ${name} {\n\t${}\n}",{label:"interface",detail:"definition",type:"keyword"}),qv("type ${name} = ${type}",{label:"type",detail:"definition",type:"keyword"}),qv("enum ${name} {\n\t${}\n}",{label:"enum",detail:"definition",type:"keyword"})]),Hb=new Ih,Kb=new Set(["Script","Block","FunctionExpression","FunctionDeclaration","ArrowFunction","MethodDeclaration","ForStatement"]);function Jb(t){return(e,n)=>{let o=e.node.getChild("VariableDefinition");return o&&n(o,t),!0}}const tw=["FunctionDeclaration"],ew={FunctionDeclaration:Jb("function"),ClassDeclaration:Jb("class"),ClassExpression:()=>!0,EnumDeclaration:Jb("constant"),TypeAliasDeclaration:Jb("type"),NamespaceDeclaration:Jb("namespace"),VariableDefinition(t,e){t.matchContext(tw)||e(t,"variable")},TypeDefinition(t,e){e(t,"type")},__proto__:null};function nw(t,e){let n=Hb.get(e);if(n)return n;let o=[],i=!0;function r(e,n){let i=t.sliceString(e.from,e.to);o.push({label:i,type:n})}return e.cursor(Oh.IncludeAnonymous).iterate((e=>{if(i)i=!1;else if(e.name){let t=ew[e.name];if(t&&t(e,r)||Kb.has(e.name))return!1}else if(e.to-e.from>8192){for(let n of nw(t,e.node))o.push(n);return!1}})),Hb.set(e,o),o}const ow=/^[\w$\xa1-\uffff][\w$\d\xa1-\uffff]*$/,iw=["TemplateString","String","RegExp","LineComment","BlockComment","VariableDefinition","TypeDefinition","Label","PropertyDefinition","PropertyName","PrivatePropertyDefinition","PrivatePropertyName",".","?."];function rw(t){let e=Zp(t.state).resolveInner(t.pos,-1);if(iw.indexOf(e.name)>-1)return null;let n="VariableName"==e.name||e.to-e.from<20&&ow.test(t.state.sliceDoc(e.from,e.to));if(!n&&!t.explicit)return null;let o=[];for(let n=e;n;n=n.parent)Kb.has(n.name)&&(o=o.concat(nw(t.state.doc,n)));return{options:o,from:n?e.from:t.pos,validFor:ow}}const sw=Rp.define({name:"javascript",parser:Bb.configure({props:[Kp.add({IfStatement:sd({except:/^\s*({|else\b)/}),TryStatement:sd({except:/^\s*({|catch\b|finally\b)/}),LabeledStatement:t=>t.baseIndent,SwitchBody:t=>{let e=t.textAfter,n=/^\s*\}/.test(e),o=/^\s*(case|default)\b/.test(e);return t.baseIndent+(n?0:o?1:2)*t.unit},Block:id({closing:"}"}),ArrowFunction:t=>t.baseIndent+t.unit,"TemplateString BlockComment":()=>null,"Statement Property":sd({except:/^{/}),JSXElement(t){let e=/^\s*<\//.test(t.textAfter);return t.lineIndent(t.node.from)+(e?0:t.unit)},JSXEscape(t){let e=/\s*\}/.test(t.textAfter);return t.lineIndent(t.node.from)+(e?0:t.unit)},"JSXOpenTag JSXSelfClosingTag":t=>t.column(t.node.from)+t.unit}),cd.add({"Block ClassBody SwitchBody EnumBody ObjectExpression ArrayExpression ObjectType":ud,BlockComment:t=>({from:t.from+2,to:t.to-2})})]}),languageData:{closeBrackets:{brackets:["(","[","{","'",'"',"`"]},commentTokens:{line:"//",block:{open:"/*",close:"*/"}},indentOnInput:/^\s*(?:case |default:|\{|\}|<\/)$/,wordChars:"$"}}),aw={test:t=>/^JSX/.test(t.name),facet:Qp({commentTokens:{block:{open:"{/*",close:"*/}"}}})},lw=sw.configure({dialect:"ts"},"typescript"),cw=sw.configure({dialect:"jsx",props:[Ap.add((t=>t.isTop?[aw]:void 0))]}),uw=sw.configure({dialect:"jsx ts",props:[Ap.add((t=>t.isTop?[aw]:void 0))]},"typescript");let hw=t=>({label:t,type:"keyword"});const pw="break case const continue default delete export extends false finally in instanceof let new return static super switch this throw true typeof var yield".split(" ").map(hw),dw=pw.concat(["declare","implements","private","protected","public"].map(hw));function fw(t={}){let e=t.jsx?t.typescript?uw:cw:t.typescript?lw:sw,n=t.typescript?Gb.concat(dw):Fb.concat(pw);return new zp(e,[sw.data.of({autocomplete:(o=iw,i=Fm(n),t=>{for(let e=Zp(t.state).resolveInner(t.pos,-1);e;e=e.parent){if(o.indexOf(e.name)>-1)return null;if(e.type.isTop)break}return i(t)})}),sw.data.of({autocomplete:rw}),t.jsx?vw:[]]);var o,i}function gw(t,e,n=t.length){for(let o=null==e?void 0:e.firstChild;o;o=o.nextSibling)if("JSXIdentifier"==o.name||"JSXBuiltin"==o.name||"JSXNamespacedName"==o.name||"JSXMemberExpression"==o.name)return t.sliceString(o.from,Math.min(o.to,n));return""}const mw="object"==typeof navigator&&/Android\b/.test(navigator.userAgent),vw=fc.inputHandler.of(((t,e,n,o,i)=>{if((mw?t.composing:t.compositionStarted)||t.state.readOnly||e!=n||">"!=o&&"/"!=o||!sw.isActiveAt(t.state,e,-1))return!1;let r=i(),{state:s}=r,a=s.changeByRange((t=>{var e;let n,{head:i}=t,r=Zp(s).resolveInner(i-1,-1);if("JSXStartTag"==r.name&&(r=r.parent),s.doc.sliceString(i-1,i)!=o||"JSXAttributeValue"==r.name&&r.to>i);else{if(">"==o&&"JSXFragmentTag"==r.name)return{range:t,changes:{from:i,insert:``}};if("/"==o&&"JSXStartCloseTag"==r.name){let t=r.parent,o=t.parent;if(o&&t.from==i-2&&((n=gw(s.doc,o.firstChild,i))||"JSXFragmentTag"==(null===(e=o.firstChild)||void 0===e?void 0:e.name))){let t=`${n}>`;return{range:Go.cursor(i+t.length,-1),changes:{from:i,insert:t}}}}else if(">"==o){let e=function(t){for(;;){if("JSXOpenTag"==t.name||"JSXSelfClosingTag"==t.name||"JSXFragmentTag"==t.name)return t;if("JSXEscape"==t.name||!t.parent)return null;t=t.parent}}(r);if(e&&!/^\/?>|^<\//.test(s.doc.sliceString(i,i+2))&&(n=gw(s.doc,e,i)))return{range:t,changes:{from:i,insert:``}}}}return{range:t}}));return!a.changes.empty&&(t.dispatch([r,s.update(a,{userEvent:"input.complete",scrollIntoView:!0})]),!0)}));const yw=["_blank","_self","_top","_parent"],_w=["ascii","utf-8","utf-16","latin1","latin1"],Ow=["get","post","put","delete"],bw=["application/x-www-form-urlencoded","multipart/form-data","text/plain"],ww=["true","false"],xw={},Sw={a:{attrs:{href:null,ping:null,type:null,media:null,target:yw,hreflang:null}},abbr:xw,address:xw,area:{attrs:{alt:null,coords:null,href:null,target:null,ping:null,media:null,hreflang:null,type:null,shape:["default","rect","circle","poly"]}},article:xw,aside:xw,audio:{attrs:{src:null,mediagroup:null,crossorigin:["anonymous","use-credentials"],preload:["none","metadata","auto"],autoplay:["autoplay"],loop:["loop"],controls:["controls"]}},b:xw,base:{attrs:{href:null,target:yw}},bdi:xw,bdo:xw,blockquote:{attrs:{cite:null}},body:xw,br:xw,button:{attrs:{form:null,formaction:null,name:null,value:null,autofocus:["autofocus"],disabled:["autofocus"],formenctype:bw,formmethod:Ow,formnovalidate:["novalidate"],formtarget:yw,type:["submit","reset","button"]}},canvas:{attrs:{width:null,height:null}},caption:xw,center:xw,cite:xw,code:xw,col:{attrs:{span:null}},colgroup:{attrs:{span:null}},command:{attrs:{type:["command","checkbox","radio"],label:null,icon:null,radiogroup:null,command:null,title:null,disabled:["disabled"],checked:["checked"]}},data:{attrs:{value:null}},datagrid:{attrs:{disabled:["disabled"],multiple:["multiple"]}},datalist:{attrs:{data:null}},dd:xw,del:{attrs:{cite:null,datetime:null}},details:{attrs:{open:["open"]}},dfn:xw,div:xw,dl:xw,dt:xw,em:xw,embed:{attrs:{src:null,type:null,width:null,height:null}},eventsource:{attrs:{src:null}},fieldset:{attrs:{disabled:["disabled"],form:null,name:null}},figcaption:xw,figure:xw,footer:xw,form:{attrs:{action:null,name:null,"accept-charset":_w,autocomplete:["on","off"],enctype:bw,method:Ow,novalidate:["novalidate"],target:yw}},h1:xw,h2:xw,h3:xw,h4:xw,h5:xw,h6:xw,head:{children:["title","base","link","style","meta","script","noscript","command"]},header:xw,hgroup:xw,hr:xw,html:{attrs:{manifest:null}},i:xw,iframe:{attrs:{src:null,srcdoc:null,name:null,width:null,height:null,sandbox:["allow-top-navigation","allow-same-origin","allow-forms","allow-scripts"],seamless:["seamless"]}},img:{attrs:{alt:null,src:null,ismap:null,usemap:null,width:null,height:null,crossorigin:["anonymous","use-credentials"]}},input:{attrs:{alt:null,dirname:null,form:null,formaction:null,height:null,list:null,max:null,maxlength:null,min:null,name:null,pattern:null,placeholder:null,size:null,src:null,step:null,value:null,width:null,accept:["audio/*","video/*","image/*"],autocomplete:["on","off"],autofocus:["autofocus"],checked:["checked"],disabled:["disabled"],formenctype:bw,formmethod:Ow,formnovalidate:["novalidate"],formtarget:yw,multiple:["multiple"],readonly:["readonly"],required:["required"],type:["hidden","text","search","tel","url","email","password","datetime","date","month","week","time","datetime-local","number","range","color","checkbox","radio","file","submit","image","reset","button"]}},ins:{attrs:{cite:null,datetime:null}},kbd:xw,keygen:{attrs:{challenge:null,form:null,name:null,autofocus:["autofocus"],disabled:["disabled"],keytype:["RSA"]}},label:{attrs:{for:null,form:null}},legend:xw,li:{attrs:{value:null}},link:{attrs:{href:null,type:null,hreflang:null,media:null,sizes:["all","16x16","16x16 32x32","16x16 32x32 64x64"]}},map:{attrs:{name:null}},mark:xw,menu:{attrs:{label:null,type:["list","context","toolbar"]}},meta:{attrs:{content:null,charset:_w,name:["viewport","application-name","author","description","generator","keywords"],"http-equiv":["content-language","content-type","default-style","refresh"]}},meter:{attrs:{value:null,min:null,low:null,high:null,max:null,optimum:null}},nav:xw,noscript:xw,object:{attrs:{data:null,type:null,name:null,usemap:null,form:null,width:null,height:null,typemustmatch:["typemustmatch"]}},ol:{attrs:{reversed:["reversed"],start:null,type:["1","a","A","i","I"]},children:["li","script","template","ul","ol"]},optgroup:{attrs:{disabled:["disabled"],label:null}},option:{attrs:{disabled:["disabled"],label:null,selected:["selected"],value:null}},output:{attrs:{for:null,form:null,name:null}},p:xw,param:{attrs:{name:null,value:null}},pre:xw,progress:{attrs:{value:null,max:null}},q:{attrs:{cite:null}},rp:xw,rt:xw,ruby:xw,samp:xw,script:{attrs:{type:["text/javascript"],src:null,async:["async"],defer:["defer"],charset:_w}},section:xw,select:{attrs:{form:null,name:null,size:null,autofocus:["autofocus"],disabled:["disabled"],multiple:["multiple"]}},slot:{attrs:{name:null}},small:xw,source:{attrs:{src:null,type:null,media:null}},span:xw,strong:xw,style:{attrs:{type:["text/css"],media:null,scoped:null}},sub:xw,summary:xw,sup:xw,table:xw,tbody:xw,td:{attrs:{colspan:null,rowspan:null,headers:null}},template:xw,textarea:{attrs:{dirname:null,form:null,maxlength:null,name:null,placeholder:null,rows:null,cols:null,autofocus:["autofocus"],disabled:["disabled"],readonly:["readonly"],required:["required"],wrap:["soft","hard"]}},tfoot:xw,th:{attrs:{colspan:null,rowspan:null,headers:null,scope:["row","col","rowgroup","colgroup"]}},thead:xw,time:{attrs:{datetime:null}},title:xw,tr:xw,track:{attrs:{src:null,label:null,default:null,kind:["subtitles","captions","descriptions","chapters","metadata"],srclang:null}},ul:{children:["li","script","template","ul","ol"]},var:xw,video:{attrs:{src:null,poster:null,width:null,height:null,crossorigin:["anonymous","use-credentials"],preload:["auto","metadata","none"],autoplay:["autoplay"],mediagroup:["movie"],muted:["muted"],controls:["controls"]}},wbr:xw},kw={accesskey:null,class:null,contenteditable:ww,contextmenu:null,dir:["ltr","rtl","auto"],draggable:["true","false","auto"],dropzone:["copy","move","link","string:","file:"],hidden:["hidden"],id:null,inert:["inert"],itemid:null,itemprop:null,itemref:null,itemscope:["itemscope"],itemtype:null,lang:["ar","bn","de","en-GB","en-US","es","fr","hi","id","ja","pa","pt","ru","tr","zh"],spellcheck:ww,autocorrect:ww,autocapitalize:ww,style:null,tabindex:null,title:null,translate:["yes","no"],rel:["stylesheet","alternate","author","bookmark","help","license","next","nofollow","noreferrer","prefetch","prev","search","tag"],role:"alert application article banner button cell checkbox complementary contentinfo dialog document feed figure form grid gridcell heading img list listbox listitem main navigation region row rowgroup search switch tab table tabpanel textbox timer".split(" "),"aria-activedescendant":null,"aria-atomic":ww,"aria-autocomplete":["inline","list","both","none"],"aria-busy":ww,"aria-checked":["true","false","mixed","undefined"],"aria-controls":null,"aria-describedby":null,"aria-disabled":ww,"aria-dropeffect":null,"aria-expanded":["true","false","undefined"],"aria-flowto":null,"aria-grabbed":["true","false","undefined"],"aria-haspopup":ww,"aria-hidden":ww,"aria-invalid":["true","false","grammar","spelling"],"aria-label":null,"aria-labelledby":null,"aria-level":null,"aria-live":["off","polite","assertive"],"aria-multiline":ww,"aria-multiselectable":ww,"aria-owns":null,"aria-posinset":null,"aria-pressed":["true","false","mixed","undefined"],"aria-readonly":ww,"aria-relevant":null,"aria-required":ww,"aria-selected":["true","false","undefined"],"aria-setsize":null,"aria-sort":["ascending","descending","none","other"],"aria-valuemax":null,"aria-valuemin":null,"aria-valuenow":null,"aria-valuetext":null},Pw=("beforeunload copy cut dragstart dragover dragleave dragenter dragend "+"drag paste focus blur change click load mousedown mouseenter mouseleave "+"mouseup keydown keyup resize scroll unload").split(" ").map((t=>"on"+t));for(let t of Pw)kw[t]=null;class Cw{constructor(t,e){this.tags=Object.assign(Object.assign({},Sw),t),this.globalAttrs=Object.assign(Object.assign({},kw),e),this.allTags=Object.keys(this.tags),this.globalAttrNames=Object.keys(this.globalAttrs)}}function Tw(t,e,n=t.length){if(!e)return"";let o=e.firstChild,i=o&&o.getChild("TagName");return i?t.sliceString(i.from,Math.min(i.to,n)):""}function Ew(t,e=!1){for(;t;t=t.parent)if("Element"==t.name){if(!e)return t;e=!1}return null}function Qw(t,e,n){let o=n.tags[Tw(t,Ew(e))];return(null==o?void 0:o.children)||n.allTags}function Aw(t,e){let n=[];for(let o=Ew(e);o&&!o.type.isTop;o=Ew(o.parent)){let i=Tw(t,o);if(i&&"CloseTag"==o.lastChild.name)break;i&&n.indexOf(i)<0&&("EndTag"==e.name||e.from>=o.firstChild.to)&&n.push(i)}return n}Cw.default=new Cw;const $w=/^[:\-\.\w\u00b7-\uffff]*$/;function jw(t,e,n,o,i){let r=/\s*>/.test(t.sliceDoc(i,i+5))?"":">",s=Ew(n,!0);return{from:o,to:i,options:Qw(t.doc,s,e).map((t=>({label:t,type:"type"}))).concat(Aw(t.doc,n).map(((t,e)=>({label:"/"+t,apply:"/"+t+r,type:"type",boost:99-e})))),validFor:/^\/?[:\-\.\w\u00b7-\uffff]*$/}}function Rw(t,e,n,o){let i=/\s*>/.test(t.sliceDoc(o,o+5))?"":">";return{from:n,to:o,options:Aw(t.doc,e).map(((t,e)=>({label:t,apply:t+i,type:"type",boost:99-e}))),validFor:$w}}function Zw(t,e){let{state:n,pos:o}=e,i=Zp(n).resolveInner(o,-1),r=i.resolve(o);for(let t,e=o;r==i&&(t=i.childBefore(e));){let n=t.lastChild;if(!n||!n.type.isError||n.from({label:t,type:"property"}))),validFor:$w}}(n,t,i,"AttributeName"==i.name?i.from:o,o):"Is"==i.name||"AttributeValue"==i.name||"UnquotedAttributeValue"==i.name?function(t,e,n,o,i){var r;let s,a=null===(r=n.parent)||void 0===r?void 0:r.getChild("AttributeName"),l=[];if(a){let r=t.sliceDoc(a.from,a.to),c=e.globalAttrs[r];if(!c){let o=Ew(n),i=o?e.tags[Tw(t.doc,o)]:null;c=(null==i?void 0:i.attrs)&&i.attrs[r]}if(c){let e=t.sliceDoc(o,i).toLowerCase(),n='"',r='"';/^['"]/.test(e)?(s='"'==e[0]?/^[^"]*$/:/^[^']*$/,n="",r=t.sliceDoc(i,i+1)==e[0]?"":e[0],e=e.slice(1),o++):s=/^[^\s<>='"]*$/;for(let t of c)l.push({label:t,apply:n+t+r,type:"constant"})}}return{from:o,to:i,options:l,validFor:s}}(n,t,i,"Is"==i.name?o:i.from,o):!e.explicit||"Element"!=r.name&&"Text"!=r.name&&"Document"!=r.name?null:function(t,e,n,o){let i=[],r=0;for(let o of Qw(t.doc,n,e))i.push({label:"<"+o,type:"type"});for(let e of Aw(t.doc,n))i.push({label:"",type:"type",boost:99-r++});return{from:o,to:o,options:i,validFor:/^<\/?[:\-\.\w\u00b7-\uffff]*$/}}(n,t,i,o)}function Mw(t){let{extraTags:e,extraGlobalAttributes:n}=t,o=n||e?new Cw(e,n):Cw.default;return t=>Zw(o,t)}const Vw=sw.parser.configure({top:"SingleExpression"}),Dw=[{tag:"script",attrs:t=>"text/typescript"==t.type||"ts"==t.lang,parser:lw.parser},{tag:"script",attrs:t=>"text/babel"==t.type||"text/jsx"==t.type,parser:cw.parser},{tag:"script",attrs:t=>"text/typescript-jsx"==t.type,parser:uw.parser},{tag:"script",attrs:t=>/^(importmap|speculationrules|application\/(.+\+)?json)$/i.test(t.type),parser:Vw},{tag:"script",attrs:t=>!t.type||/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/i.test(t.type),parser:sw.parser},{tag:"style",attrs:t=>(!t.lang||"css"==t.lang)&&(!t.type||/^(text\/)?(x-)?(stylesheet|css)$/i.test(t.type)),parser:gO.parser}],Iw=[{name:"style",parser:gO.parser.configure({top:"Styles"})}].concat(Pw.map((t=>({name:t,parser:sw.parser})))),Nw=Rp.define({name:"html",parser:fb.configure({props:[Kp.add({Element(t){let e=/^(\s*)(<\/)?/.exec(t.textAfter);return t.node.to<=t.pos+e[0].length?t.continue():t.lineIndent(t.node.from)+(e[2]?0:t.unit)},"OpenTag CloseTag SelfClosingTag":t=>t.column(t.node.from)+t.unit,Document(t){if(t.pos+/\s*/.exec(t.textAfter)[0].lengtht.getChild("TagName")})]}),languageData:{commentTokens:{block:{open:"\x3c!--",close:"--\x3e"}},indentOnInput:/^\s*<\/\w+\W$/,wordChars:"-._"}}),Ww=Nw.configure({wrap:yb(Dw,Iw)});const Xw=new Set("area base br col command embed frame hr img input keygen link meta param source track wbr menuitem".split(" ")),Lw=fc.inputHandler.of(((t,e,n,o,i)=>{if(t.composing||t.state.readOnly||e!=n||">"!=o&&"/"!=o||!Ww.isActiveAt(t.state,e,-1))return!1;let r=i(),{state:s}=r,a=s.changeByRange((t=>{var e,n,i;let r,a=s.doc.sliceString(t.from-1,t.to)==o,{head:l}=t,c=Zp(s).resolveInner(l-1,-1);if("TagName"!=c.name&&"StartTag"!=c.name||(c=c.parent),a&&">"==o&&"OpenTag"==c.name){if("CloseTag"!=(null===(n=null===(e=c.parent)||void 0===e?void 0:e.lastChild)||void 0===n?void 0:n.name)&&(r=Tw(s.doc,c.parent,l))&&!Xw.has(r)){return{range:t,changes:{from:l,to:l+(">"===s.doc.sliceString(l,l+1)?1:0),insert:``}}}}else if(a&&"/"==o&&"IncompleteCloseTag"==c.name){let t=c.parent;if(c.from==l-2&&"CloseTag"!=(null===(i=t.lastChild)||void 0===i?void 0:i.name)&&(r=Tw(s.doc,t,l))&&!Xw.has(r)){let t=l+(">"===s.doc.sliceString(l,l+1)?1:0),e=`${r}>`;return{range:Go.cursor(l+e.length,-1),changes:{from:l,to:t,insert:e}}}}return{range:t}}));return!a.changes.empty&&(t.dispatch([r,s.update(a,{userEvent:"input.complete",scrollIntoView:!0})]),!0)}));var Yw=n(921);function zw(t,{state:e,dispatch:n}){var o;let i=e.doc.iterRange(t.from,t.to),r='';for(;!i.done;)r+=i.value,i=i.next();const s=null!==(o=e.facet(qw))&&void 0!==o?o:{},a=function(t){const e=t.facet(Yp);return e===gO?(t,e)=>(0,Yw.css_beautify)(t,e):e===Ww?(t,e)=>(0,Yw.html_beautify)(t,e):e===sw?(t,e)=>(0,Yw.js_beautify)(t,e):(t,e)=>t}(e)(e.doc.toString(),Object.assign({indent_size:Bp(e)},s));return e.selection.asSingle().main==t?n(e.update(e.replaceSelection(a))):n({changes:{from:t.from,to:t.to,insert:a}}),!0}const qw=Jo.define();var Uw=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),Bw=void 0&&(void 0).__assign||function(){return Bw=Object.assign||function(t){for(var e,n=1,o=arguments.length;n0){var o=n(t.startState);return ah(o,e[0],{from:0,to:t.startState.doc.line(t.startState.doc.lines).to}).map((function(e){return t.startState.update({changes:{from:e.from,to:e.to},annotations:Qi.userEvent.of("".concat(t.annotation(Qi.userEvent),".smart"))})}))}}return t}))),(e=t,Wi.changeFilter.of((function(t){var n,o,i,r;try{for(var s=e(t.startState),a=e(t.state),l=0;l{zw(Go.range(0,t.doc.length),{state:t,dispatch:e})})(this.editor),this.setReadonlyState(n)}},n}(u.Hn);const Gw=Fw;Fw.prototype.CodeMirror=fc;var Hw=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),Kw=function(t){function e(e,n){var o=t.call(this,e,n)||this;return o.type='function',o.variables=null==n?void 0:n.variables,o}return Hw(e,t),Object.defineProperty(e.prototype,"clsLabel",{get:function(){var t=this.ppfx;return"".concat(t,"field")},enumerable:!1,configurable:!0}),e.prototype.getInputElem=function(){var t=this.input,e=this.$input;return t||e&&e.get&&e.get(0)||this.getElInput()},Object.defineProperty(e.prototype,"inputValue",{get:function(){var t,e=this.getInputElem();return null!==(t=null==e?void 0:e.value)&&void 0!==t?t:this.target.value},set:function(t){var e=this.getInputElem();e&&(e.value=t)},enumerable:!1,configurable:!0}),e.prototype.templateInput=function(){return''},e.prototype.codeUpdated=function(){var t=this.editor;t&&(this.target.value=t.getContent().toString())},e.prototype.renderField=function(){var t,e=this.$el,n=this.variables,o=e.find('[data-input]'),i=o[o.length-1],r=document.createElement('textarea');r.value="function(".concat(null!==(t=null==n?void 0:n.join(", "))&&void 0!==t?t:'',"){ \n //TODO: implementing it \n}"),i.appendChild(r);var s=new Gw({el:r,readOnly:!1,lineNumbers:!1,codeName:'js',readOnlyRanges:function(t){return[{to:t.doc.line(1).to},{from:t.doc.line(t.doc.lines).from}]}});s.init(r),s.on('update',this.codeUpdated,this)},e}(Wt);const Jw=Kw;var tx=void 0&&(void 0).__assign||function(){return tx=Object.assign||function(t){for(var e,n=1,o=arguments.length;n=0&&this.set('void',!0),n.em=r,this.opt=n,this.em=r,this.frame=n.frame,this.config=n.config||{},this.set('attributes',ix(ix({},(0,t.result)(this,'defaults').attributes||{}),this.get('attributes')||{})),this.ccid=o.createId(this,n),this.initClasses(),this.initComponents(),this.initTraits(),this.initToolbar(),this.initScriptProps(),this.listenTo(this,'change:script',this.scriptUpdated),this.listenTo(this,'change:tagName',this.tagUpdated),this.listenTo(this,'change:attributes',this.attrUpdated),this.listenTo(this,'change:attributes:id',this._idUpdated),this.on('change:toolbar',this.__emitUpdateTlb),this.on('change',this.__onChange),this.on(fx,this.__propToParent),this.set('status',''),this.views=[],['classes','components'].forEach((function(t){var e="add remove ".concat('components'!==t?'change':'');i.listenTo(i.get(t),e.trim(),(function(){for(var e=[],n=0;n=0}))},o.prototype.__getSymbToUp=function(t){var e=this;void 0===t&&(t={});var n=[],o=t.changed;if(t.fromInstance||t.noPropagate||t.fromUndo||o&&this.__isSymbOvrd(o))return n;var i=this.__getSymbols()||[],r=this.__getSymbol();return n=(r?sx([r],r.__getSymbols()||[],!0):i).filter((function(t){return t!==e})).filter((function(t){return!(o&&t.__isSymbOvrd(o))}))},o.prototype.__getSymbTop=function(t){for(var e=this,n=this.parent(t);n&&(n.__isSymbol()||n.__getSymbol());)e=n,n=n.parent(t);return e},o.prototype.__upSymbProps=function(n,o){var i=this;void 0===o&&(o={});var r=this.changedAttributes()||{},s=r.attributes||{};if(delete r.status,delete r.open,delete r[ux],delete r[hx],delete r[px],delete r.attributes,delete s.id,(0,e.isEmptyObj)(s)||(r.attributes=s),!(0,e.isEmptyObj)(r)){var a=this.__getSymbToUp(o);(0,t.keys)(r).map((function(t){i.__isSymbOvrd(t)&&delete r[t]})),this.__logSymbol('props',a,{opts:o,changed:r}),a.forEach((function(e){var n=ix({},r);(0,t.keys)(n).map((function(t){e.__isSymbOvrd(t)&&delete n[t]})),e.set(n,ix({fromInstance:i},o))}))}},o.prototype.__upSymbCls=function(t,e,n){var o=this;void 0===n&&(n={});var i=this.__getSymbToUp(n);this.__logSymbol('classes',i,{opts:n}),i.forEach((function(t){t.set('classes',o.get('classes'),{fromInstance:o})})),this.__changesUp(n)},o.prototype.__upSymbComps=function(t,e,n){var o=this,i=n||e||{},r={fromInstance:i.fromInstance,fromUndo:i.fromUndo},s=t.opt.temporary;if(n)if(n.add){var a=[],l=!!this.__getSymbols();if((v=this.__getSymbToUp(ix(ix({},r),{changed:'components:add'}))).length){var c=t.__getSymbol();a=(c?c.__getSymbols():t.__getSymbols())||[],(a=sx([],a,!0)).push(c||t)}!s&&this.__logSymbol('add',v,{opts:n,addedInstances:a.map((function(t){return t.cid})),added:t.cid}),v.forEach((function(e){var i=e.__getSymbTop(),r=a.filter((function(t){var e=t.__getSymbTop({prev:1});return i&&e&&e===i}))[0]||t.clone({symbol:!0,symbolInv:l});e.append(r,ix({fromInstance:o},n))}))}else{var u=t.__getSymbol();if(u&&!n.temporary&&u.set(ux,u.__getSymbols().filter((function(e){return e!==t}))),!t.__isSymbolTop()){var h='components:remove',p=n.index,d=t.parent(),f=ix({fromInstance:t},n),g=t.__isSymbolNested(),m=function(t){var e=t.parent();e&&!e.__isSymbOvrd(h)&&t.remove(f)};v=(null==d?void 0:d.__isSymbOvrd(h))?[]:t.__getSymbToUp(r);g&&(v=null==d?void 0:d.__getSymbToUp(ix(ix({},r),{changed:h})),m=function(t){var e=t.components().at(p);e&&e.remove(ix({fromInstance:d},f))}),!s&&this.__logSymbol('remove',v,{opts:n,removed:t.cid,isSymbNested:g}),v.forEach(m)}}else{var v=this.__getSymbToUp(ix(ix({},r),{changed:'components:reset'})),y=t.models;this.__logSymbol('reset',v,{components:y}),v.forEach((function(t){var n=y.map((function(t){return t.clone({symbol:!0})}));t.components().reset(n,ix({fromInstance:o},e))}))}this.__changesUp(i)},o.prototype.initClasses=function(e,n,o){void 0===o&&(o={});var i=this.get('attributes')||{},r=i.class,s=rx(i,["class"]),a=[this,'change:classes',this.initClasses],l=this.get('classes')||r||[],c=(0,t.isString)(l)?l.split(' '):l;this.stopListening.apply(this,a);var u=this.normalizeClasses(c),h=new ao([]);return this.set('classes',h,o),h.add(u),h.on('add remove reset',this.__upSymbCls),r&&u.length&&this.set('attributes',s),this.listenTo.apply(this,a),this},o.prototype.initComponents=function(){var e=[this,'change:components',this.initComponents];this.stopListening.apply(this,e);var n=new Kn([],this.opt);n.parent=this;var o=this.get('components'),i=!this.opt.avoidChildren;return this.set('components',n),i&&o&&n.add((0,t.isFunction)(o)?o(this):o,this.opt),n.on('add remove reset',this.__upSymbComps),this.listenTo.apply(this,e),this},o.prototype.initTraits=function(t){var e=this.em,n='change:traits';return this.off(n,this.initTraits),this.__loadTraits(),this.on(n,this.initTraits),t&&e&&e.trigger('component:toggled'),this},o.prototype.initScriptProps=function(){if(!this.opt.temporary){var t='script-props',e=["change:".concat(t),this.initScriptProps];this.off.apply(this,e);var n=this.previous(t)||[],o=this.get(t)||[],i=n.map((function(t){return"change:".concat(t)})).join(' '),r=o.map((function(t){return"change:".concat(t)})).join(' ');i&&this.off(i,this.__scriptPropsChange),r&&this.on(r,this.__scriptPropsChange),this.on.apply(this,e)}},o.prototype.__scriptPropsChange=function(t,e,n){void 0===n&&(n={}),n.avoidStore||this.trigger('rerender')},o.prototype.append=function(e,n){void 0===n&&(n={});var o=((0,t.isArray)(e)?sx([],e,!0):[e]).map((function(e){return(0,t.isString)(e)||e.collection&&e.collection.remove(e,{temporary:!0}),e})),i=this.components().add(o,n);return(0,t.isArray)(i)?i:[i]},o.prototype.components=function(e,n){void 0===n&&(n={});var o=this.get('components');return(0,t.isUndefined)(e)?o:(o.reset(void 0,n),e?this.append(e,n):[])},o.prototype.getChildAt=function(t){return this.components().at(t||0)||void 0},o.prototype.getLastChild=function(){var t=this.components();return t.at(t.length-1)||null},o.prototype.empty=function(t){return void 0===t&&(t={}),this.components().reset(void 0,t),this},o.prototype.parent=function(t){void 0===t&&(t={});var e=this.collection||t.prev&&this.prevColl;return e?e.parent:void 0},o.prototype.parents=function(){var t=this.parent();return t?[t].concat(t.parents()):[]},o.prototype.scriptUpdated=function(){this.set('scriptUpdated',1)},o.prototype.initToolbar=function(){var t=this.em,e=this,n=t&&t.getConfig().stylePrefix||'';if(!e.get('toolbar')&&t){var o=[];e.collection&&o.push({label:t.getIcon('arrowUp'),command:function(t){return t.runCommand('core:component-exit',{force:1})}}),e.get('draggable')&&o.push({attributes:{class:"".concat(n,"no-touch-actions"),draggable:!0},label:t.getIcon('move'),command:'tlb-move'}),e.get('copyable')&&o.push({label:t.getIcon('copy'),command:'tlb-clone'}),e.get('removable')&&o.push({label:t.getIcon('delete'),command:'tlb-delete'}),e.set('toolbar',o)}},o.prototype.__loadTraits=function(t){var e=this,n=t||this.traits;this.set('traits',n.map((function(t){return nx.build(e,t)})));var o=ix({},this.get('attributes'));return this.traits.forEach((function(t){if(!t.changeProp){var e=t.name,n=t.value;e&&n&&(o[e]=n)}})),n.length&&this.set('attributes',o),this},o.prototype.getTraits=function(){return this.traits},o.prototype.setTraits=function(e){var n=(0,t.isArray)(e)?e:[e];return this.__loadTraits(n),this.getTraits()},o.prototype.getTrait=function(t){return this.traits.find((function(e){return e.name===t}))||null},o.prototype.updateTrait=function(t,e){var n,o=this.getTrait(t);return null==o||o.updateOpts(e),null===(n=this.em)||void 0===n||n.trigger('component:toggled'),this},o.prototype.getTraitIndex=function(t){var e=this.getTrait(t);return e?this.traits.indexOf(e):-1},o.prototype.removeTrait=function(e){var n,o=this,i=((0,t.isArray)(e)?e:[e]).map((function(t){var e=o.getTraitIndex(t);if(-1!=e)return o.traits.splice(e,1)[0]}));return null===(n=this.em)||void 0===n||n.trigger('component:toggled'),(0,t.isArray)(i)?i:[i]},o.prototype.addTrait=function(e,n){var o,i=this;void 0===n&&(n={});var r=((0,t.isArray)(e)?e:[e]).map((function(t){var e=nx.build(i,t);return i.traits.push(e),e}));return null===(o=this.em)||void 0===o||o.trigger('component:toggled'),r},o.prototype.normalizeClasses=function(t){var e=[],n=this.em,o=null==n?void 0:n.Selectors;return o?t.models?sx([],t.models,!0):(t.forEach((function(t){return e.push(o.add(t))})),e):[]},o.prototype.clone=function(t){void 0===t&&(t={});var e=this.em,n=ix({},this.attributes),o=ix({},this.opt),i=this.getId(),r=null==e?void 0:e.Css;n.attributes=ix({},n.attributes),delete n.attributes.id,n.components=[],n.classes=[],n.traits=[],this.__isSymbolTop()&&(t.symbol=!0),this.get('components').each((function(e,o){n.components[o]=e.clone(ix(ix({},t),{_inner:1}))})),this.traits.forEach((function(t,e){n.traits[e]=ix(ix({},t.opts),{name:t.name})})),this.get('classes').each((function(t,e){n.classes[e]=t.get('name')})),n.status='',o.collection=null;var s=new this.constructor(n,o),a="#".concat(s.getId());(r?r.getRules("#".concat(i)):[]).forEach((function(t){var e=t.clone();e.set('selectors',[a]),r.getAll().add(e)})),s.set(ux,0);var l=this.__getSymbol(),c=this.__getSymbols();t.symbol||!l&&!c?l?(l.set(ux,sx(sx([],l.__getSymbols(),!0),[s],!1)),s.__initSymb()):t.symbol&&(this.__isSymbol()?(this.set(ux,sx(sx([],c,!0),[s],!1)),s.set(hx,this),s.__initSymb()):t.symbolInv?(this.set(ux,[s]),s.set(hx,this),[this,s].map((function(t){return t.__initSymb()}))):(s.set(ux,[this]),[this,s].map((function(t){return t.__initSymb()})),this.set(hx,s))):(s.set(hx,0),s.set(ux,0));var u='component:clone';return e&&e.trigger(u,s),this.trigger(u,s),s},o.prototype.getName=function(t){void 0===t&&(t={});var n=this.em,o=this.attributes,i=o.type,r=o.tagName,s=o.name,a=i||r,l=i?'':r,c='domComponents.names.',u=s&&(null==n?void 0:n.t("".concat(c).concat(s))),h=l&&(null==n?void 0:n.t("".concat(c).concat(l))),p=n&&(n.t("".concat(c).concat(i))||n.t("".concat(c).concat(r))),d=this.get('custom-name');return(t.noCustom?'':d)||u||s||h||(0,e.capitalize)(l)||p||(0,e.capitalize)(a)},o.prototype.getIcon=function(){var t=this.get('icon');return t?t+' ':''},o.prototype.toHTML=function(n){void 0===n&&(n={});var o=this,i=[],r=n.tag||o.get('tagName'),s=o.get('void'),a=n.attributes,l=this.getAttrToHTML();if(delete n.tag,a&&((0,t.isFunction)(a)?l=a(o,l)||{}:(0,e.isObject)(a)&&(l=a)),n.withProps){var c=this.toJSON();(0,t.forEach)(c,(function(n,o){'_'!==o[0]&&['classes','attributes','components'].indexOf(o)<0&&(l["data-gjs-".concat(o)]=(0,t.isArray)(n)||(0,e.isObject)(n)?JSON.stringify(n):n)}))}for(var u in l){var h=l[u];if(!(0,t.isUndefined)(h)&&null!==h)if((0,t.isBoolean)(h))h&&i.push(u);else{var p='';if(n.altQuoteAttr&&(0,t.isString)(h)&&h.indexOf('"')>=0)p="'".concat(h.replace(/'/g,'''),"'");else{var d=(0,t.isString)(h)?h.replace(/"/g,'"'):h;p="\"".concat(d,"\"")}i.push("".concat(u,"=").concat(p))}}var f=i.length?" ".concat(i.join(' ')):'',g=o.getInnerHTML(n),m="<".concat(r).concat(f).concat(s?'/':'',">").concat(g);return!s&&(m+="")),m},o.prototype.getInnerHTML=function(t){return this.__innerHTML(t)},o.prototype.__innerHTML=function(t){void 0===t&&(t={});var e=this.components();return e.length?e.map((function(e){return e.toHTML(t)})).join(''):this.content},o.prototype.getAttrToHTML=function(){var t=this.getAttributes();return lx(this.em)&&delete t.style,t},o.prototype.toJSON=function(e){void 0===e&&(e={});var n=s.Model.prototype.toJSON.call(this,e);if(n.attributes=this.getAttributes(),delete n.attributes.class,delete n.toolbar,delete n.traits,delete n.status,delete n.open,delete n._undoexc,delete n.delegate,!e.fromUndo){var o=n[hx],i=n[ux];i&&(0,t.isArray)(i)&&(n[ux]=i.filter((function(t){return t})).map((function(t){return t.getId?t.getId():t}))),o&&!(0,t.isString)(o)&&(n[hx]=o.getId())}return this.em.getConfig().avoidDefaults&&this.getChangedProps(n),n},o.prototype.getChangedProps=function(e){var n=e||s.Model.prototype.toJSON.apply(this),o=(0,t.result)(this,'defaults');return(0,t.forEach)(o,(function(t,e){-1===['type'].indexOf(e)&&n[e]===t&&delete n[e]})),(0,t.isEmpty)(n.type)&&delete n.type,(0,t.forEach)(['attributes','style'],(function(e){(0,t.isEmpty)(o[e])&&(0,t.isEmpty)(n[e])&&delete n[e]})),(0,t.forEach)(['classes','components'],(function(e){(!n[e]||(0,t.isEmpty)(o[e])&&!n[e].length)&&delete n[e]})),n},o.prototype.getId=function(){return(this.get('attributes')||{}).id||this.ccid||this.cid},o.prototype.setId=function(t,e){var n=ix({},this.get('attributes'));return n.id=t,this.set('attributes',n,e),this},o.prototype.getEl=function(t){var e=this.getView(t);return e&&e.el},o.prototype.getView=function(t){var e=this,n=e.view,o=e.views,i=e.em,r=t||(null==i?void 0:i.getCurrentFrameModel());return r&&(n=o.filter((function(t){return t.frameView===r.view}))[0]),n},o.prototype.getCurrentView=function(){var t=this.em.getCurrentFrame(),e=null==t?void 0:t.model;return this.getView(e)},o.prototype.__getScriptProps=function(){var t=this.props();return(this.get('script-props')||[]).reduce((function(e,n){return e[n]=t[n],e}),{})},o.prototype.getScriptString=function(e){var n=this,o=e||this.get('script')||'';if(!o)return o;if(this.get('script-props'))o=o.toString().trim();else{if((0,t.isFunction)(o)){var i=o.toString().trim();o=(i=i.slice(i.indexOf('{')+1,i.lastIndexOf('}'))).trim()}var r=this.em.getConfig(),s=ax(r.tagVarStart||'{[ '),a=ax(r.tagVarEnd||' ]}'),l=new RegExp("".concat(s,"([\\w\\d-]*)").concat(a),'g');o=o.replace(l,(function(e,o){n.scriptUpdated();var i=n.attributes[o]||'';return(0,t.isArray)(i)||'object'==typeof i?JSON.stringify(i):i}))}return o},o.prototype.emitUpdate=function(t){for(var e,n=[],o=1;o=0&&this.__propSelfToParent({component:this,changed:(e={},e[t]=s,e),options:n[2]||n[1]||{}})},o.prototype.onAll=function(e){return(0,t.isFunction)(e)&&(e(this),this.components().forEach((function(t){return t.onAll(e)}))),this},o.prototype.forEachChild=function(e){(0,t.isFunction)(e)&&this.components().forEach((function(t){e(t),t.forEachChild(e)}))},o.prototype.remove=function(t){var e=this;void 0===t&&(t={});var n=this.em,o=this.collection,i=function(){o&&o.remove(e,ix(ix({},t),{action:'remove-component'})),o||(e.components('',t),e.components().removeChildren(e,void 0,t))},r=ix({},t);return[this,n].map((function(t){return t.trigger('component:remove:before',e,i,r)})),!r.abort&&i(),this},o.prototype.move=function(t,e){if(void 0===e&&(e={}),t){var n=e.at,o=this.index(),i=t===this.parent();i&&(o===n||o===n-1)||(i&&n&&n>o&&(e.at=n-1),this.remove({temporary:1}),t.append(this,e),this.emitUpdate())}return this},o.prototype.isInstanceOf=function(t){var e,n,o=null===(n=null===(e=this.em)||void 0===e?void 0:e.Components.getType(t))||void 0===n?void 0:n.model;return!!o&&this instanceof o},o.prototype.isChildOf=function(e){for(var n=(0,t.isString)(e),o=this.parent();o;){if(n){if(o.isInstanceOf(e))return!0}else if(o===e)return!0;o=o.parent()}return!1},o.prototype.resetId=function(t){void 0===t&&(t={});var e=this.em,n=this.getId();if(!n)return this;var i=o.createId(this);this.setId(i);var r=null==e?void 0:e.Css.getIdRule(n),s=null==r?void 0:r.get('selectors').at(0);return null==s||s.set('name',i),this},o.prototype._getStyleRule=function(t){var e=(void 0===t?{}:t).id,n=this.em,o=e||this.getId();return null==n?void 0:n.Css.getIdRule(o)},o.prototype._getStyleSelector=function(t){var e=this._getStyleRule(t);return null==e?void 0:e.get('selectors').at(0)},o.prototype._idUpdated=function(t,e,n){if(void 0===n&&(n={}),!n.idUpdate){var i=this.ccid,r=(this.get('attributes')||{}).id,s=(this.previous('attributes')||{}).id||i,a=o.getList(this);if(a[r]||!r&&s)return this.setId(s,{idUpdate:!0});delete a[s],a[r]=this,this.ccid=r;var l=this._getStyleSelector({id:s});l&&l.set({name:r,label:r})}},o.getDefaults=function(){return(0,t.result)(this.prototype,'defaults')},o.isComponent=function(t){return{tagName:(0,e.toLowerCase)(t.tagName)}},o.ensureInList=function(t){var e=o.getList(t),n=t.getId(),i=e[n];if(i){if(i!==t){var r=o.getIncrementId(n,e);t.setId(r),e[r]=t}}else e[n]=t;t.components().forEach((function(t){return o.ensureInList(t)}))},o.createId=function(t,e){void 0===e&&(e={});var n,i=o.getList(t),r=e.idMap,s=void 0===r?{}:r,a=t.get('attributes').id;return a?(n=o.getIncrementId(a,i,e),t.setId(n),a!==n&&(s[a]=n)):n=o.getNewId(i),i[n]=t,n},o.getNewId=function(t){for(var e=Object.keys(t).length.toString().length+2,n=(Math.random()+1.1).toString(36).slice(-e),i="i".concat(n);t[i];)i=o.getNewId(t);return i},o.getIncrementId=function(t,e,n){void 0===n&&(n={});var o=n.keepIds,i=1,r=t;if((void 0===o?[]:o).indexOf(t)<0)for(;e[r];)i++,r="".concat(t,"-").concat(i);return r},o.getList=function(t){var e=t.opt,n=void 0===e?{}:e,o=n.domc,i=n.em,r=o||(null==i?void 0:i.Components);return r?r.componentsById:{}},o.checkId=function(e,n,i,r){void 0===n&&(n=[]),void 0===i&&(i={}),void 0===r&&(r={});var s=(0,t.isArray)(e)?e:[e],a=r.keepIds,l=void 0===a?[]:a,c=r.idMap,u=void 0===c?{}:c;s.forEach((function(e){e.attributes;var s=e.attributes,a=void 0===s?{}:s,c=e.components,h=a.id;if(h&&i[h]&&l.indexOf(h)<0){var p=o.getIncrementId(h,i);u[h]=p,a.id=p,(0,t.isArray)(n)&&n.forEach((function(t){var e=t.selectors;e.forEach((function(t,n){t==="#".concat(h)&&(e[n]="#".concat(p))}))}))}c&&o.checkId(c,n,i,r)}))},o}(Yn);const vx=mx;var yx=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),_x=void 0&&(void 0).__assign||function(){return _x=Object.assign||function(t){for(var e,n=1,o=arguments.length;n\n \n "),fallback:"\n \n "),file:''})},enumerable:!1,configurable:!0}),o.prototype.initialize=function(o,i){n.prototype.initialize.call(this,o,i);var r=this.get('attributes').src;r&&(0,e.buildBase64UrlFromSvg)((0,t.result)(this,'defaults').src)!==r&&this.set('src',r,{silent:!0})},o.prototype.initToolbar=function(){n.prototype.initToolbar.call(this);var t=this.em;if(t){var e='image-editor';if(t.Commands.has(e)){for(var o=!1,i=this.get('toolbar'),r=0;r=0)&&delete i.editable}))}return i},o}(Vx);const qx=zx;var Ux=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),Bx=void 0&&(void 0).__assign||function(){return Bx=Object.assign||function(t){for(var e,n=1,o=arguments.length;n=0},n}(vx);var _S=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),OS=void 0&&(void 0).__assign||function(){return OS=Object.assign||function(t){for(var e,n=1,o=arguments.length;n=0&&l0&&u=0&&h0&&c<=a)},o.prototype.scrollIntoView=function(t){var e;if(void 0===t&&(t={}),!this.isInViewport()||t.force){var n=this.el;if('smooth'!==t.behavior){var o=this.getOffsetRect();null===(e=n.ownerDocument.defaultView)||void 0===e||e.scrollTo(0,o.top)}else n.scrollIntoView(FS({behavior:'smooth',block:'nearest'},t))}},o.prototype.reset=function(){var t=this.el;this.el='',this._ensureElement(),this._setData(),(0,ue.dL)(t,this.el),this.render()},o.prototype._setData=function(){var t=this.model,e=t.components();this.$el.data({model:t,collection:e,view:this})},o.prototype._createElement=function(t){return this.createDoc.createElement(t)},o.prototype.renderChildren=function(){this.updateContent();var t=this.getChildrenContainer(),e=this.childrenView||new US({collection:this.model.get('components'),config:this.config,componentTypes:this.opts.componentTypes});e.render(t),this.childrenView=e;for(var n=Array.prototype.slice.call(e.el.childNodes),o=0,i=n.length;o0&&i[i.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]-1;return Lk(Lk({},r),!u||h?{reason:Wk.TargetReject}:{result:!0})},o.prototype.allById=function(){return this.componentsById},o.prototype.getById=function(t){return this.componentsById[t]||null},o.prototype.destroy=function(){var t,e=this.allById();Object.keys(e).forEach((function(t){return e[t]&&e[t].remove()})),null===(t=this.componentView)||void 0===t||t.remove(),[this.em,this.componentsById,this.componentView].forEach((function(t){return{}}))},o}(O);const qk=zk;const Uk={stylePrefix:'css-',rules:[]};var Bk=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),Fk=Number.MAX_VALUE,Gk=function(n){function o(){var e=n.call(this)||this;return(0,t.bindAll)(e,'sortRules'),e.compCls=[],e.ids=[],e}return Bk(o,n),o.prototype.buildFromModel=function(t,e){var n=this;void 0===e&&(e={});var o='',i=this.em,r=i&&i.getConfig().avoidInlineStyle,s=t.styleToString(),a=t.classes;return this.ids.push("#".concat(t.getId())),a.forEach((function(t){return n.compCls.push(t.getFullName())})),!r&&s&&(o="#".concat(t.getId(),"{").concat(s,"}")),t.components().forEach((function(t){return o+=n.buildFromModel(t,e)})),o},o.prototype.build=function(n,o){var i=this;void 0===o&&(o={});var r=o.json,s=o.em,a=o.cssc||(null==s?void 0:s.Css);this.em=s,this.compCls=[],this.ids=[],this.model=n;var l=[],c=n?this.buildFromModel(n,o):'',u=(0,t.isUndefined)(o.clearStyles)&&s?s.getConfig().clearStyles:o.clearStyles;if(a){var h=o.rules||a.getAll(),p={},d=[];o.onlyMatched&&n&&(0,e.hasWin)()&&(h=this.matchedRules(n,h)),h.forEach((function(t){var e=t.getAtRule();if(e){var n=p[e];n?n.push(t):p[e]=[t]}else{var s=i.buildFromRule(t,d,o);r?l.push(s):c+=s}})),this.sortMediaObject(p).forEach((function(t){var e='',n=t.key;t.value.forEach((function(t){var s=i.buildFromRule(t,d,o);t.get('singleAtRule')?c+="".concat(n,"{").concat(s,"}"):e+=s,r&&l.push(s)})),e&&(c+="".concat(n,"{").concat(e,"}"))})),s&&u&&h.remove&&h.remove(d)}return r?l.filter((function(t){return t})):c},o.prototype.buildFromRule=function(t,e,n){var o,i=this;void 0===n&&(n={});var r,s='',a=this.model,l=t.selectorsToString({skipAdd:1}),c=t.get('selectorsAdd'),u=t.get('singleAtRule');if(null===(o=t.get('selectors'))||void 0===o||o.forEach((function(t){var e=t.getFullName();(i.compCls.indexOf(e)>=0||i.ids.indexOf(e)>=0||n.keepUnusedStyles)&&(r=1)})),l&&r||c||u||!a){var h=t.getDeclaration({body:1});h&&(n.json?s=t:s+=h)}else e.push(t);return s},o.prototype.matchedRules=function(t,e){var n=this,o=t.getEl(),i=[];return e.forEach((function(t){try{t.selectorsToString().split(',').some((function(t){return null==o?void 0:o.matches(n.__cleanSelector(t))}))&&i.push(t)}catch(t){}})),t.components().forEach((function(t){i=i.concat(n.matchedRules(t,e))})),i=i.filter((function(t,e){return i.indexOf(t)===e})),i},o.prototype.getQueryLength=function(t){var e=/(-?\d*\.?\d+)\w{0,}/.exec(t);return e?parseFloat(e[1]):Fk},o.prototype.sortMediaObject=function(e){var n=this;void 0===e&&(e={});var o=[];return(0,t.each)(e,(function(t,e){return o.push({key:e,value:t})})),o.sort((function(t,e){var o=[t.key,e.key].every((function(t){return-1!==t.indexOf('min-width')})),i=o?t.key:e.key,r=o?e.key:t.key;return n.getQueryLength(i)-n.getQueryLength(r)}))},o.prototype.sortRules=function(t,e){var n=function(t){return t.get('mediaText')||''},o=[n(t),n(e)].every((function(t){return-1!==t.indexOf('min-width')})),i=n(o?t:e),r=n(o?e:t);return this.getQueryLength(i)-this.getQueryLength(r)},o.prototype.__cleanSelector=function(t){return t.split(' ').map((function(t){return t.split(':')[0]})).join(' ')},o}(u.Hn);const Hk=Gk;var Kk=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),Jk=void 0&&(void 0).__assign||function(){return Jk=Object.assign||function(t){for(var e,n=1,o=arguments.length;n=0}))},o.prototype.setIdRule=function(e,n,o){void 0===n&&(n={}),void 0===o&&(o={});var i=o.addOpts,r=void 0===i?{}:i,s=o.mediaText,a=o.state||'',l=(0,t.isUndefined)(s)?this.em.getCurrentMedia():s,c=this.em.Selectors.add({name:e,type:oo.TYPE_ID},r),u=this.add(c,a,l,{},r);return u.setStyle(n,lP(lP({},o),r)),u},o.prototype.getIdRule=function(e,n){void 0===n&&(n={});var o=n.mediaText,i=n.state||'',r=(0,t.isUndefined)(o)?this.em.getCurrentMedia():o,s=this.em.Selectors.get(e,oo.TYPE_ID);return s&&this.get(s,i,r)},o.prototype.setClassRule=function(t,e,n){void 0===e&&(e={}),void 0===n&&(n={});var o=n.state||'',i=n.mediaText||this.em.getCurrentMedia(),r=this.em.Selectors.add({name:t,type:oo.TYPE_CLASS}),s=this.add(r,o,i);return s.setStyle(e,n),s},o.prototype.getClassRule=function(t,e){void 0===e&&(e={});var n=e.state||'',o=e.mediaText||this.em.getCurrentMedia(),i=this.em.Selectors.get(t,oo.TYPE_CLASS);return i&&this.get(i,n,o)},o.prototype.remove=function(e,n){var o=(0,t.isString)(e)?this.getRules(e):e,i=this.getAll().remove(o,n);return(0,t.isArray)(i)?i:[i]},o.prototype.clear=function(t){return void 0===t&&(t={}),this.getAll().reset([],t),this},o.prototype.getComponentRules=function(e,n){void 0===n&&(n={});var o=n.state,i=n.mediaText;n.current&&(o=this.em.get('state')||'',i=this.em.getCurrentMedia());var r=e.getId();return this.getAll().filter((function(e){return!(!(0,t.isUndefined)(o)&&e.get('state')!==o)&&(!(!(0,t.isUndefined)(i)&&e.get('mediaText')!==i)&&e.getSelectorsString()==="#".concat(r))}))},o.prototype.render=function(){var t;return null===(t=this.rulesView)||void 0===t||t.remove(),this.rulesView=new sn({collection:this.rules,config:this.config}),this.rulesView.render().el},o.prototype.checkId=function(e,n){void 0===n&&(n={});var o=n.idMap,i=void 0===o?{}:o,r=[];return Object.keys(i).length?((Array.isArray(e)?e:[e]).forEach((function(e){var n=e.selectors;if(n&&1==n.length){var o=n[0];if((0,t.isString)(o)){if('#'===o[0]){var s=o.substring(1),a=i[s];s&&a&&(n[0]="#".concat(a),r.push(e))}}else if(o.name&&o.type===oo.TYPE_ID){(a=i[o.name])&&(o.name=a,r.push(e))}}})),r):r},o.prototype.destroy=function(){var t;this.rules.reset(),this.rules.stopListening(),null===(t=this.rulesView)||void 0===t||t.remove()},o}(O);const hP=uP;const pP={appendTo:'',blocks:[],appendOnClick:!1,custom:!1};var dP=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}();const fP=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return dP(n,e),n.prototype.defaults=function(){return{label:'',content:'',media:'',category:'',activate:!1,select:void 0,resetId:!1,disable:!1,onClick:void 0,attributes:{}}},n.prototype.getId=function(){return this.id},n.prototype.getLabel=function(){return this.get('label')},n.prototype.getMedia=function(){return this.get('media')},n.prototype.getContent=function(){return this.get('content')},n.prototype.getCategoryLabel=function(){var e=this.get('category');return(0,t.isFunction)(null==e?void 0:e.get)?e.get('label'):(null==e?void 0:e.label)?null==e?void 0:e.label:e},n}(u.Hn);var gP=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),mP=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return gP(e,t),e}(u.FE);const vP=mP;mP.prototype.model=fP;var yP=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}();const _P=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return yP(e,t),e.prototype.defaults=function(){return{id:'',label:'',open:!0,attributes:{}}},e}(u.Hn);var OP=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),bP=function(n){function o(){return null!==n&&n.apply(this,arguments)||this}return OP(o,n),o.prototype.add=function(o,i){return((0,t.isArray)(o)?o:[o]).forEach((function(t){return t&&(t.id=(0,e.normalizeKey)("".concat(t.id)))})),n.prototype.add.call(this,o,i)},o.prototype.get=function(o){return n.prototype.get.call(this,(0,t.isString)(o)?(0,e.normalizeKey)(o):o)},o}(u.FE);const wP=bP;var xP;bP.prototype.model=_P,function(t){t["add"]="block:add",t["remove"]="block:remove",t["removeBefore"]="block:remove:before",t["update"]="block:update",t["dragStart"]="block:drag:start",t["drag"]="block:drag",t["dragEnd"]="block:drag:stop",t["custom"]="block:custom",t["all"]="block"}(xP||(xP={}));var SP=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),kP=function(n){function o(t,e){void 0===e&&(e={});var o=n.call(this,t)||this,i=o.model;return o.em=e.em,o.config=e,o.endDrag=o.endDrag.bind(o),o.ppfx=e.pStylePrefix||'',o.listenTo(i,'destroy remove',o.remove),o.listenTo(i,'change',o.render),o}return SP(o,n),o.prototype.events=function(){return{click:'handleClick',mousedown:'startDrag',dragstart:'handleDragStart',drag:'handleDrag',dragend:'handleDragEnd'}},o.prototype.__getModule=function(){return this.em.Blocks},o.prototype.handleClick=function(e){var n=this,o=n.config,i=n.model,r=n.em,s=i.get('onClick')||o.appendOnClick;if(r.trigger('block:click',i,e),s){if((0,t.isFunction)(s))return s(i,null==r?void 0:r.getEditor(),{event:e});var a,l,c=o.getSorter(),u=i.get('content'),h=r.getSelected();if(c.setDropContent(u),h)if(c.validTarget(h.getEl(),u).valid)a=h;else{var p=h.parent();p&&c.validTarget(p.getEl(),u).valid&&(a=p,l=p.components().indexOf(h)+1)}if(!a){var d=r.getWrapper();c.validTarget(d.getEl(),u).valid&&(a=d)}var f=a&&a.append(u,{at:l})[0];f&&r.setSelected(f,{scroll:1})}},o.prototype.startDrag=function(t){var e=this,n=e.config,o=e.em,i=e.model,r=i.get('disable');if(0===t.button&&n.getSorter&&!this.el.draggable&&!r){o.refreshCanvas();var s=n.getSorter();s.__currentBlock=i,s.setDragHelper(this.el,t),s.setDropContent(this.model.get('content')),s.startSort(this.el),(0,ue.on)(document,'mouseup',this.endDrag)}},o.prototype.handleDragStart=function(t){this.__getModule().__startDrag(this.model,t)},o.prototype.handleDrag=function(t){this.__getModule().__drag(t)},o.prototype.handleDragEnd=function(){this.__getModule().__endDrag()},o.prototype.endDrag=function(){(0,ue.S1)(document,'mouseup',this.endDrag);var t=this.config.getSorter();t.moved=0,t.endMove()},o.prototype.render=function(){var t,n=this,o=n.em,i=n.el,r=n.$el,s=n.ppfx,a=n.model,l=a.get('disable'),c=a.get('attributes')||{},u=c.class||'',h="".concat(s,"block"),p=o&&o.t("blockManager.labels.".concat(a.id))||a.get('label'),d=a.get('render'),f=a.get('media'),g=l?"".concat(h,"--disable"):"".concat(s,"four-color-h");r.attr(c),i.className="".concat(u," ").concat(h," ").concat(s,"one-bg ").concat(g).trim(),i.innerHTML="\n ".concat(f?"
").concat(f,"
"):'',"\n
").concat(p,"
\n "),i.title=c.title||(null===(t=i.textContent)||void 0===t?void 0:t.trim()),i.setAttribute('draggable',"".concat(!(!(0,e.hasDnd)(o)||l)));var m=d&&d({el:i,model:a,className:h,prefix:s});return m&&(i.innerHTML=m),this},o}(u.G7);const PP=kP;var CP=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),TP=void 0&&(void 0).__makeTemplateObject||function(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t},EP=function(t){function e(e,n){var o=t.call(this,e)||this;o.config=n;var i=n.pStylePrefix||'';return o.em=n.em,o.pfx=i,o.caretR='fa fa-caret-right',o.caretD='fa fa-caret-down',o.iconClass="".concat(i,"caret-icon"),o.activeClass="".concat(i,"open"),o.className="".concat(i,"block-category"),o.listenTo(o.model,'change:open',o.updateVisibility),o.model.view=o,o}return CP(e,t),e.prototype.events=function(){return{'click [data-title]':'toggle'}},e.prototype.template=function(t){var e=t.pfx,n=t.label;return i(AP||(AP=TP(["\n
\n \n ","\n
\n
\n "],["\n
\n \n ","\n
\n
\n "])),e,e,n,e)},e.prototype.attributes=function(){return this.model.get('attributes')||{}},e.prototype.updateVisibility=function(){this.model.get('open')?this.open():this.close()},e.prototype.open=function(){this.$el.addClass(this.activeClass),this.getIconEl().className="".concat(this.iconClass," ").concat(this.caretD),this.getBlocksEl().style.display=''},e.prototype.close=function(){this.$el.removeClass(this.activeClass),this.getIconEl().className="".concat(this.iconClass," ").concat(this.caretR),this.getBlocksEl().style.display='none'},e.prototype.toggle=function(){var t=this.model;t.set('open',!t.get('open'))},e.prototype.getIconEl=function(){return this.iconEl||(this.iconEl=this.el.querySelector(".".concat(this.iconClass))),this.iconEl},e.prototype.getBlocksEl=function(){return this.blocksEl||(this.blocksEl=this.el.querySelector(".".concat(this.pfx,"blocks-c"))),this.blocksEl},e.prototype.append=function(t){this.getBlocksEl().appendChild(t)},e.prototype.render=function(){var t=this,e=t.em,n=t.el,o=t.$el,i=t.model,r=t.pfx,s=e.t("blockManager.categories.".concat(i.id))||i.get('label');return n.innerHTML=this.template({pfx:r,label:s}),o.addClass(this.className),o.css({order:i.get('order')}),this.updateVisibility(),this},e}(u.G7);const QP=EP;var AP,$P=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),jP=void 0&&(void 0).__assign||function(){return jP=Object.assign||function(t){for(var e,n=1,o=arguments.length;n\n
\n
\n
\n "),this.collection.each((function(e){return t.add(e,n)})),this.append(n);var o="".concat(this.blockContClass,"s ").concat(e,"one-bg ").concat(e,"two-color");return this.$el.addClass(o),this.rendered=!0,this},n}(u.G7);const ZP=RP;var MP=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),VP=void 0&&(void 0).__assign||function(){return VP=Object.assign||function(t){for(var e,n=1,o=arguments.length;n',iconSync:'',iconTagOn:'',iconTagOff:'',iconTagRemove:'',componentFirst:!1,custom:!1};var WP=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),XP=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return WP(e,t),e.prototype.defaults=function(){return{name:'',label:''}},e.prototype.getName=function(){return this.get('name')},e.prototype.getLabel=function(){return this.get('label')||this.getName()},e}(u.Hn);const LP=XP;XP.prototype.idAttribute='name';var YP=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),zP=void 0&&(void 0).__makeTemplateObject||function(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t},qP='contentEditable',UP=function(t){function e(e){void 0===e&&(e={});var n=t.call(this,e)||this,o=e.config||{};return n.config=o,n.module=e.module,n.coll=e.coll||null,n.pfx=o.stylePrefix||'',n.ppfx=o.pStylePrefix||'',n.em=o.em,n.listenTo(n.model,'change:active',n.updateStatus),n}return YP(e,t),e.prototype.template=function(){var t=this,e=t.pfx,n=t.model,o=t.config,r=n.get('label')||'';return i(FP||(FP=zP(["\n \n ","\n $"," \n "],["\n \n ","\n $"," \n "])),e,e,e,r,e,e,o.iconTagRemove)},e.prototype.events=function(){return{'click [data-tag-remove]':'removeTag','click [data-tag-status]':'changeStatus','dblclick [data-tag-name]':'startEditTag','focusout [data-tag-name]':'endEditTag'}},e.prototype.getInputEl=function(){return this.inputEl||(this.inputEl=this.el.querySelector('[data-tag-name]')),this.inputEl},e.prototype.startEditTag=function(){var t=this.em,e=this.getInputEl();e[qP]='true',e.focus(),null==t||t.setEditing(!0)},e.prototype.endEditTag=function(){var t=this.model,e=this.em,n=this.getInputEl(),o=n.textContent||'',i=null==e?void 0:e.Selectors;n[qP]='false',null==e||e.setEditing(!1),i&&i.rename(t,o)!==t&&(n.innerText=t.getLabel())},e.prototype.changeStatus=function(){var t=this.model;t.set('active',!t.getActive())},e.prototype.removeTag=function(){this.module.removeSelected(this.model)},e.prototype.updateStatus=function(){var t=this,e=t.model,n=t.$el,o=t.config,i=o.iconTagOn,r=o.iconTagOff,s=n.find('[data-tag-status]');e.get('active')?(s.html(i),n.removeClass('opac50')):(s.html(r),n.addClass('opac50'))},e.prototype.render=function(){var t=this,e=t.pfx,n=t.ppfx,o=t.$el,i=t.model,r="".concat(e,"tag"),s=["".concat(r," ").concat(n,"three-bg")];return i.get('protected')&&s.push("".concat(r,"-protected")),o.html(this.template()),o.attr('class',s.join(' ')),this.updateStatus(),this},e}(u.G7);const BP=UP;var FP,GP=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),HP=void 0&&(void 0).__makeTemplateObject||function(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t},KP=function(e){function n(n){void 0===n&&(n={});var o=e.call(this,n)||this;o.config=n.config||{},o.pfx=o.config.stylePrefix||'',o.ppfx=o.config.pStylePrefix||'',o.className=o.pfx+'tags',o.stateInputId=o.pfx+'states',o.stateInputC=o.pfx+'input-c',o.states=o.config.states||[];var i=o.config.em,r=o.collection;o.target=i;var s=i.Selectors;o.module=s,o.em=i,o.componentChanged=(0,t.debounce)(o.componentChanged.bind(o),0),o.checkSync=(0,t.debounce)(o.checkSync.bind(o),0);return o.listenTo(i,'component:toggled component:update:classes',o.componentChanged),o.listenTo(i,'styleManager:update',o.componentChanged),o.listenTo(i,'component:update:classes change:state',o.__handleStateChange),o.listenTo(i,'styleable:change change:device',o.checkSync),o.listenTo(r,'add',o.addNew),o.listenTo(r,'reset',o.renderClasses),o.listenTo(r,'remove',o.tagRemoved),o.listenTo(s.getAll(),s.events.state,(0,t.debounce)((function(){return o.renderStates()}),0)),o.delegateEvents(),o}return GP(n,e),n.prototype.template=function(t){var e=t.labelInfo,n=t.labelHead,o=t.iconSync,r=t.iconAdd,s=t.pfx,a=t.ppfx;return i(tC||(tC=HP(["
\n
","
\n
\n \n
\n \n \n \n
\n
\n
\n
\n
\n
\n
\n
\n
\n \n $"," \n $"," \n
\n
\n
",":
\n
\n
"],["
\n
","
\n
\n \n
\n \n \n \n
\n
\n
\n
\n
\n
\n
\n
\n
\n \n $"," \n $"," \n
\n
\n
",":
\n
\n
"])),s,s,s,s,n,s,s,s,a,a,a,s,a,a,s,a,s,s,s,s,s,r,s,s,o,s,s,e,s)},n.prototype.events=function(){return{'change [data-states]':'stateChanged','click [data-add]':'startNewTag','focusout [data-input]':'endNewTag','keyup [data-input]':'onInputKeyUp','click [data-sync-style]':'syncStyle'}},n.prototype.syncStyle=function(){var t,e=this.em,n=this.getTarget(),o=e.Css,i=this.getCommonSelectors({opts:{noDisabled:1}}),r=e.get('state'),s=e.getCurrentMedia(),a=[],l=o.get(i,r,s)||o.add(i,r,s);this.getTargets().forEach((function(e){var n=o.getIdRule(e.getId(),{state:r,mediaText:s});t=n.getStyle(),n.setStyle({}),a.push(n)})),t&&l.addStyle(t),e.trigger('component:toggled'),e.trigger('component:sync-style',{component:n,selectors:i,mediaText:s,rule:l,ruleComponents:a,state:r})},n.prototype.tagRemoved=function(t){this.updateStateVis()},n.prototype.addNew=function(t){this.addToClasses(t)},n.prototype.startNewTag=function(){var t,e;null===(t=this.$addBtn)||void 0===t||t.css({display:'none'}),null===(e=this.$input)||void 0===e||e.show().focus()},n.prototype.endNewTag=function(){var t,e;null===(t=this.$addBtn)||void 0===t||t.css({display:''}),null===(e=this.$input)||void 0===e||e.hide().val('')},n.prototype.onInputKeyUp=function(t){var e;13===t.keyCode?(t.preventDefault(),this.addNewTag(null===(e=this.$input)||void 0===e?void 0:e.val())):27===t.keyCode&&this.endNewTag()},n.prototype.checkStates=function(){var t=this.em.getState(),e=this.getStates();e&&e.val(t)},n.prototype.componentChanged=function(t){var e=(void 0===t?{}:t).targets;this.updateSelection(e)},n.prototype.updateSelection=function(e){var n=e||this.getTargets(),o=[];return(n=(0,t.isArray)(n)?n:[n])&&n.length&&(o=this.getCommonSelectors({targets:n}),this.checkSync({validSelectors:o})),this.collection.reset(o),this.updateStateVis(n),this.module.__trgCustom(),o},n.prototype.getCommonSelectors=function(t){var e=void 0===t?{}:t,n=e.targets,o=e.opts,i=void 0===o?{}:o,r=n||this.getTargets();return this.module.__getCommonSelectors(r,i)},n.prototype._commonSelectors=function(){for(var t,e=[],n=0;n",""],["",""])),r,e);else{var u=null==e?void 0:e.getSelectors();if(!u)return'';var h=u.getStyleable(),p=a.get('state'),d=e.getId?i(nC||(nC=HP(["","\n #",""],["","\n #",""])),r,e.getName(),r,e.getId()):'';n=(n=this.collection.getFullString(h))?i(oC||(oC=HP(["",""],["",""])),r,n):e.get('selectorsAdd')||d,n=c&&d?d:n,n+=p?i(iC||(iC=HP([":",""],[":",""])),r,p):'',n=l?l({result:n,state:p,target:e}):n}return n&&"").concat(n,"")},n.prototype.stateChanged=function(t){var e=this.em,n=t.target.value;e.set('state',n)},n.prototype.addNewTag=function(t){var e=t.trim();e&&(this.module.addSelected({label:e}),this.endNewTag())},n.prototype.addToClasses=function(t,e){var n=e,o=this.getClasses(),i=new BP({model:t,config:this.config,coll:this.collection,module:this.module}).render().el;return n?n.appendChild(i):o.append(i),i},n.prototype.renderClasses=function(){var t=this,e=document.createDocumentFragment(),n=this.getClasses();n.empty(),this.collection.each((function(n){return t.addToClasses(n,e)})),n.append(e)},n.prototype.getClasses=function(){return this.$el.find('[data-selectors]')},n.prototype.getStates=function(){if(!this.$states){var t=this.$el.find('[data-states]');this.$states=t[0]&&t}return this.$states},n.prototype.getStatesC=function(){return this.$statesC||(this.$statesC=this.$el.find('#'+this.stateInputC)),this.$statesC},n.prototype.renderStates=function(){var t=this.module,e=this.em,n=e.t('selectorManager.emptyState'),o=t.getStates().map((function(t){var n=e.t("selectorManager.states.".concat(t.id))||t.getLabel()||t.id;return"")})).join(''),i=this.getStates();i&&i.html("").concat(o)),this.checkStates()},n.prototype.render=function(){var t=this,e=t.em,n=t.pfx,o=t.ppfx,i=t.config,r=t.$el,s=t.el,a=i.render,l={iconSync:i.iconSync,iconAdd:i.iconAdd,labelHead:e.t('selectorManager.label'),labelInfo:e.t('selectorManager.selected'),ppfx:o,pfx:n,el:s};r.html(this.template(l));var c=a&&a(l);return c&&c!==s&&r.empty().append(c),this.$input=r.find('[data-input]'),this.$addBtn=r.find('[data-add]'),this.$classes=r.find('#'+n+'tags-c'),this.$btnSyncEl=r.find('[data-sync-style]'),this.$input.hide(),this.renderStates(),this.renderClasses(),r.attr('class',"".concat(this.className," ").concat(o,"one-bg ").concat(o,"two-color")),this},n}(u.G7);const JP=KP;var tC,eC,nC,oC,iC,rC=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),sC=void 0&&(void 0).__assign||function(){return sC=Object.assign||function(t){for(var e,n=1,o=arguments.length;n=0})):e.slice(1).reduce((function(e,n){return t.__common(e,n)}),e[0]):[]},o.prototype.__updateSelectedByComponents=function(){this.selected.reset(this.__getCommon())},o}(O);const OC=_C;const bC={textTags:['br','b','i','u','a','ul','ol'],parserCss:void 0,parserHtml:void 0,optionsHtml:{htmlType:'text/html',allowScripts:!1,allowUnsafeAttr:!1,keepEmptyTextNodes:!1}};var wC,xC=5,SC=6,kC=7,PC=11,CC=12,TC=13,EC=14,QC=15,AC=((wC={})[4]='media',wC[xC]='font-face',wC[SC]='page',wC[kC]='keyframes',wC[PC]='counter-style',wC[CC]='supports',wC[TC]='document',wC[EC]='font-feature-values',wC[QC]='viewport',wC),$C=(0,t.keys)(AC),jC=[xC,SC,PC,QC],RC=$C.filter((function(t){return jC.indexOf(Number(t))<0})).map((function(t){return AC[t]})).concat(['container','layer']),ZC=jC.map((function(t){return AC[t]})),MC=function(t){void 0===t&&(t='');for(var e=[],n=[],o=t.split(','),i=0,r=o.length;i=0&&(o.singleAtRule=!0),l&&(o.atRuleType=l),c&&(o.selectorsAdd=c),u&&(o.mediaText=u),a&&(t[i-1]=s[0],o.state=a,s.splice(s.length-1,1)),o.selectors=t,o.style=e,o},NC=function(t){var e=t.cssText,n=void 0===e?'':e;return RC.find((function(t){return 0===n.indexOf("@".concat(t))}))},WC=function(t){for(var e=[],n=t.cssRules||[],o=0,i=n.length;o=0;if(h)a=!0,l=AC[s],c=DC(r);else if($C.indexOf("".concat(s))>=0||!s&&NC(r)){var p=WC(r),d=AC[s]||NC(r);c=DC(r);for(var f=0,g=p.length;f0&&i[i.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]0&&i[i.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]0&&i[i.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]\n
\n ").concat(c?"\n ").concat(w,"\n ").concat(x,"\n "):'',"\n
\n
\n
\n ").concat(S,"\n ").concat(y?"").concat(y,""):'',"\n ").concat(v,"\n
\n
\n
\n
\n
\n ").concat(u?"
").concat(u||'',"
"):'',"\n
").concat(b||'',"
\n
\n \n
\n ")},Object.defineProperty(o.prototype,"em",{get:function(){return this.module.em},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"ppfx",{get:function(){return this.em.getConfig().stylePrefix},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"pfx",{get:function(){return this.config.stylePrefix},enumerable:!1,configurable:!0}),o.prototype.initComponent=function(){var t=this,e=this.model,n=this.config.onInit,o=e.components();this.listenTo(o,'remove add reset',this.checkChildren),[['change:status',this.updateStatus],['change:open',this.updateOpening],['change:layerable',this.updateLayerable],['change:style:display',this.updateVisibility],['rerender:layer',this.render],['change:name change:custom-name',this.updateName]].forEach((function(n){return t.listenTo(e,n[0],n[1])})),this.$el.data('model',e),this.$el.data('collection',o),e.viewLayer=this,n.bind(this)({component:e,render:this.__render,listenTo:this.listenTo})},o.prototype.updateName=function(){this.getInputName().innerText=this.model.getName()},o.prototype.getVisibilityEl=function(){return this.eyeEl||(this.eyeEl=this.$el.children('[data-toggle-select]').find('[data-toggle-visible]')),this.eyeEl},o.prototype.updateVisibility=function(){var t=this,e=t.pfx,n=t.model,o=t.module,i="".concat(e,"layer-hidden"),r=!o.isVisible(n)?'addClass':'removeClass';this.$el[r](i),this.getVisibilityEl()[r]("".concat(e,"layer-off"))},o.prototype.toggleVisibility=function(t){null==t||t.stopImmediatePropagation();var e=this.module,n=this.model;e.setVisible(n,!e.isVisible(n))},o.prototype.handleEdit=function(t){null==t||t.stopPropagation();var e=this,n=e.em,o=e.$el,i=e.clsNoEdit,r=e.clsEdit,s=this.getInputName();s[HT]='true',s.focus(),document.execCommand('selectAll',!1),n.setEditing(!0),o.find(".".concat(this.inputNameCls)).removeClass(i).addClass(r)},o.prototype.handleEditKey=function(t){t.stopPropagation(),((0,ue.kl)(t)||(0,ue.r$)(t))&&this.handleEditEnd(t)},o.prototype.handleEditEnd=function(t){null==t||t.stopPropagation();var e=this,n=e.em,o=e.$el,i=e.clsNoEdit,r=e.clsEdit,s=this.getInputName(),a=s.textContent;s.scrollLeft=0,s[HT]='false',this.setName(a,{component:this.model,propName:'custom-name'}),n.setEditing(!1),o.find(".".concat(this.inputNameCls)).addClass(i).removeClass(r),this.updateName()},o.prototype.setName=function(t,e){var n=e.propName;this.model.set(n,t)},o.prototype.getInputName=function(){return this.inputName||(this.inputName=this.el.querySelector(".".concat(this.inputNameCls))),this.inputName},o.prototype.updateOpening=function(){var t=this,e=t.$el,n=t.model,o=t.pfx,i='open',r="".concat(o,"layer-open"),s=this.getCaret();this.module.isOpen(n)?(e.addClass(i),s.addClass(r)):(e.removeClass(i),s.removeClass(r))},o.prototype.toggleOpening=function(t){var e=this.model,n=this.module;null==t||t.stopImmediatePropagation(),e.get('components').length&&n.setOpen(e,!n.isOpen(e))},o.prototype.handleSelect=function(t){null==t||t.stopPropagation();var e=this.module,n=this.model;e.setLayerData(n,{selected:!0},{event:t})},o.prototype.handleHover=function(t){null==t||t.stopPropagation();var e=this.module,n=this.model;e.setLayerData(n,{hovered:!0})},o.prototype.handleHoverOut=function(t){null==t||t.stopPropagation();var e=this.module,n=this.model;e.setLayerData(n,{hovered:!1})},o.prototype.startSort=function(t){var e,n,o;t.stopPropagation();var i=this,r=i.em,s=i.sorter,a=i.model;if((!t.button||0===t.button)&&s){var l=(null===(n=null===(e=a.delegate)||void 0===e?void 0:e.move)||void 0===n?void 0:n.call(e,a))||a;s.onStart=zT(r),s.onMoveClb=qT(r),s.onEndMove=UT(r,[l]);var c=(null===(o=l.viewLayer)||void 0===o?void 0:o.el)||t.target;s.startSort(c)}},o.prototype.updateStatus=function(){HS.prototype.updateStatus.apply(this,[{avoidHover:!this.config.highlightHover,noExtHl:!0}])},o.prototype.checkChildren=function(){var t=this,e=t.model,n=t.clsNoChild,o=t.$el,i=t.module,r=i.getComponents(e).length,s=o.children(".".concat(this.clsTitleC)).children(".".concat(this.clsTitle)),a=this.cnt;a||(a=o.children('[data-count]').get(0),this.cnt=a),s[r?'removeClass':'addClass'](n),a&&(a.innerHTML=r||''),!r&&i.setOpen(e,!1)},o.prototype.getCaret=function(){return this.caret&&this.caret.length||(this.caret=this.$el.children(".".concat(this.clsTitleC)).find(".".concat(this.clsCaret))),this.caret},o.prototype.setRoot=function(n){var o;n=(0,t.isString)(n)?null===(o=this.em.getWrapper())||void 0===o?void 0:o.find(n)[0]:n;var i=(0,e.getModel)(n);i&&(this.stopListening(),this.model=i,this.initComponent(),this._rendered&&this.render())},o.prototype.updateLayerable=function(){(this.parentView||this).render()},o.prototype.__clearItems=function(){var t;null===(t=this.items)||void 0===t||t.remove()},o.prototype.remove=function(){for(var t=[],e=0;e\n ").concat(this.getPreview(),"\n \n
\n ").concat(this.getInfo(),"\n
\n
\n ⨯\n
\n ")},n.prototype.updateTarget=function(e){e&&e.set&&(e.set('attributes',(0,t.clone)(e.get('attributes'))),e.set('src',this.model.get('src')))},n.prototype.getPreview=function(){return''},n.prototype.getInfo=function(){return''},n.prototype.render=function(){var t=this.el;return t.innerHTML=this.template(this,this.model),t.className=this.className,this},n}(u.G7);const bE=OE;var wE=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),xE=void 0&&(void 0).__makeTemplateObject||function(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t},SE=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return wE(n,e),n.prototype.getPreview=function(){var t=this,e=t.pfx,n=t.ppfx,o=t.model.get('src');return i(PE||(PE=xE(["\n
\n
\n "],["\n
\n
\n "])),e,o,e,n)},n.prototype.getInfo=function(){var t=this.pfx,e=this.model,n=e.get('name'),o=e.get('width'),r=e.get('height'),s=e.get('unitDim'),a=o&&r?"".concat(o,"x").concat(r).concat(s):'';return n=n||e.getFilename(),i(CE||(CE=xE(["\n
","
\n
","
\n "],["\n
","
\n
","
\n "])),t,n,t,a)},n.prototype.init=function(t){var e=this.pfx;this.className+=" ".concat(e,"asset-image")},n.prototype.onClick=function(){var e=this.model,n=this.pfx,o=this.__getBhv().select,i=this.config.onClick,r=this.collection;r.trigger('deselectAll'),this.$el.addClass(n+'highlight'),(0,t.isFunction)(o)?o(e,!1):(0,t.isFunction)(i)?i(e):this.updateTarget(r.target)},n.prototype.onDblClick=function(){var e=this.em,n=this.model,o=this.__getBhv().select,i=this.config.onDblClick,r=this.collection,s=r.target,a=r.onSelect;(0,t.isFunction)(o)?o(n,!0):(0,t.isFunction)(i)?i(n):(this.updateTarget(s),null==e||e.Modal.close()),(0,t.isFunction)(a)&&a(n)},n.prototype.onRemove=function(t){t.stopImmediatePropagation(),this.model.collection.remove(this.model)},n}(bE);const kE=SE;var PE,CE;SE.prototype.events={'click [data-toggle=asset-remove]':'onRemove',click:'onClick',dblclick:'onDblClick'};var TE=void 0&&(void 0).__assign||function(){return TE=Object.assign||function(t){for(var e,n=1,o=arguments.length;n\n
\n \n
\n \n
\n \n ")),"\n
\n
\n ").concat(i,"\n
\n
\n
\n
\n ")},e.prototype.handleSubmit=function(t){t.preventDefault();var e=this.getAddInput(),n=e&&e.value.trim(),o=this.config.handleAdd;if(n){e.value='';var i=this.getAssetsEl();i&&(i.scrollTop=0),o?o.bind(this)(n):this.options.globalCollection.add(n,{at:0})}},e.prototype.getAssetsEl=function(){return this.el.querySelector(".".concat(this.pfx,"assets"))},e.prototype.getAddInput=function(){return this.inputUrl&&this.inputUrl.value||(this.inputUrl=this.el.querySelector(".".concat(this.pfx,"add-asset input"))),this.inputUrl},e.prototype.removedAsset=function(t){this.collection.length||this.toggleNoAssets()},e.prototype.addToAsset=function(t){1==this.collection.length&&this.toggleNoAssets(!0),this.addAsset(t)},e.prototype.addAsset=function(t,e){void 0===e&&(e=null);var n=e,o=this.collection,i=this.config,r=new t.typeView({model:t,collection:o,config:i}).render().el;if(n)n.appendChild(r);else{var s=this.getAssetsEl();s&&s.insertBefore(r,s.firstChild)}return r},e.prototype.toggleNoAssets=function(t){void 0===t&&(t=!1);var e=this.$el.find(".".concat(this.pfx,"assets"));if(t)e.empty();else{var n=this.config.noAssets;n&&e.append(n)}},e.prototype.deselectAll=function(){var t=this.pfx;this.$el.find(".".concat(t,"highlight")).removeClass("".concat(t,"highlight"))},e.prototype.renderAssets=function(){var t=this,e=document.createDocumentFragment(),n=this.$el.find(".".concat(this.pfx,"assets"));n.empty(),this.toggleNoAssets(!!this.collection.length),this.collection.each((function(n){return t.addAsset(n,e)})),n.append(e)},e.prototype.render=function(){var t=this.options.fu.render().el;return this.$el.empty(),this.$el.append(t).append(this.template(this)),this.el.className="".concat(this.ppfx,"asset-manager"),this.renderAssets(),this},e}(u.G7);const ME=ZE;ZE.prototype.events={submit:'handleSubmit'};var VE=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),DE=void 0&&(void 0).__makeTemplateObject||function(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t},IE=function(t){function e(n){void 0===n&&(n={});var o=t.call(this,n)||this;o.options=n;var i=n.config||{};o.module=n.module,o.config=i,o.em=o.config.em,o.pfx=i.stylePrefix||'',o.ppfx=i.pStylePrefix||'',o.target=o.options.globalCollection||{},o.uploadId=o.pfx+'uploadFile',o.disabled=void 0!==i.disableUpload?i.disableUpload:!i.upload&&!i.embedAsBase64,o.multiUpload=void 0===i.multiUpload||i.multiUpload;var r=i.uploadFile;return r?o.uploadFile=r.bind(o):!i.upload&&i.embedAsBase64&&(o.uploadFile=e.embedAsBase64),o.delegateEvents(),o}return VE(e,t),e.prototype.template=function(t){var e=t.pfx,n=t.title,o=t.uploadId,r=t.disabled,s=t.multiUpload;return i(WE||(WE=DE(["\n
\n
","
\n \n
\n \n "],["\n
\n
","
\n \n
\n \n "])),e,n,o,r?'disabled':'',s?'multiple':'')},e.prototype.events=function(){return{'change [data-input]':'uploadFile'}},e.prototype.onUploadStart=function(){var t=this.module;t&&t.__propEv('asset:upload:start')},e.prototype.onUploadEnd=function(t){var e=this.$el,n=this.module;n&&n.__propEv('asset:upload:end',t);var o=e.find('input');o&&o.val('')},e.prototype.onUploadError=function(t){var e=this.module;console.error(t),this.onUploadEnd(t),e&&e.__propEv('asset:upload:error',t)},e.prototype.onUploadResponse=function(t,e){var n,o=this,i=o.module,r=o.config,s=o.target;try{n='string'==typeof t?JSON.parse(t):t}catch(e){n=t}i&&i.__propEv('asset:upload:response',n),r.autoAdd&&s&&s.add(n.data,{at:0}),this.onUploadEnd(t),null==e||e(n)},e.prototype.uploadFile=function(t,e){var n=this,o=t.dataTransfer?t.dataTransfer.files:t.target.files,i=this.config,r=i.beforeUpload;if(!1!==(r&&r(o))){var s=new FormData,a=i.params,l=i.customFetch,c=i.fetchOptions;for(var u in a)s.append(u,a[u]);if(this.multiUpload)for(var h=0;h").concat(o.dropzoneContent,"")),h(),'draggable'in r&&[r,a].forEach((function(t){t.ondragover=p,t.ondragleave=d,t.ondrop=f}))},e.prototype.render=function(){var t=this,e=t.$el,n=t.pfx,o=t.em;return e.html(this.template({title:o&&o.t('assetManager.uploadTitle'),uploadId:this.uploadId,disabled:this.disabled,multiUpload:this.multiUpload,pfx:n})),this.initDrop(),e.attr('class',n+'file-uploader'),this},e.embedAsBase64=function(t,e){var n=this,o=t.dataTransfer?t.dataTransfer.files:t.target.files,i={data:[]};if(FileReader){for(var r=[],s=/^(.+)\/(.+)$/,a=function(t){var e=new Promise((function(e,n){var o=new FileReader;o.addEventListener('load',(function(i){var r,a=t.name,l=s.exec(t.type);if('image'===(r=l?l[1]:t.type)){var c={src:o.result,name:a,type:r,height:0,width:0},u=new Image;u.addEventListener('error',(function(t){n(t)})),u.addEventListener('load',(function(){c.height=u.height,c.width=u.width,e(c)})),u.src=c.src}else e(r?{src:o.result,name:a,type:r}:o.result)})),o.addEventListener('error',(function(t){n(t)})),o.addEventListener('abort',(function(t){n('Aborted')})),o.readAsDataURL(t)}));r.push(e)},l=0,c=o;l0&&(r=e.split('.').reduce((function(e,n){if(!(0,t.isUndefined)(e))return e[n]}),i)),r}},o.prototype._debug=function(t,e){void 0===e&&(e={});var n=this.em,o=this.config;(e.debug||o.debug)&&n&&n.logWarning(t)},o.prototype.destroy=function(){},o}(_);const fQ=dQ;var gQ=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),mQ=void 0&&(void 0).__assign||function(){return mQ=Object.assign||function(t){for(var e,n=1,o=arguments.length;na+u-e||rl+c-e)return 1},o.prototype.getCurrentPos=function(){var t=this.eventMove;return{x:(null==t?void 0:t.pageX)||0,y:(null==t?void 0:t.pageY)||0}},o.prototype.getDim=function(t){var e,n,o,i,r=this.em,s=this.canvasRelative,a=null==r?void 0:r.Canvas,l=a?a.getElementOffsets(t):{};if(s&&r){var c=a.getElementPos(t,{noScroll:1});e=c.top,n=c.left,o=c.height,i=c.width}else{var u=this.offset(t);e=this.relative?t.offsetTop:u.top-(this.wmargin?-1:1)*this.elT,n=this.relative?t.offsetLeft:u.left-(this.wmargin?-1:1)*this.elL,o=t.offsetHeight,i=t.offsetWidth}return{top:e,left:n,height:o,width:i,offsets:l}},o.prototype.getChildrenDim=function(n){var o=this,i=[];if(!n)return i;var r=this.getTargetModel(n);if(r&&r.view&&!this.ignoreViewChildren){var s=r.getCurrentView?r.getCurrentView():r.view;n=s.getChildrenContainer()}return(0,t.each)(n.children,(function(t,r){var s=t,a=(0,e.getModel)(s,l["default"]),c=a&&a.index?a.index():r;if((0,ue.BM)(s)||o.matches(s,o.itemSel)){var u,h=o.getDim(s),p=o.direction;u='v'==p||'h'!=p&&o.isInFlow(s,n),h.dir=u,h.el=s,h.indexEl=c,i.push(h)}})),i},o.prototype.nearBorders=function(t,e,n){var o=!1,i=this.borderOffset,r=e||0,s=n||0,a=t.top,l=t.left,c=t.height,u=t.width;return(a+i>s||s>a+c-i||l+i>r||r>l+u-i)&&(o=!0),o},o.prototype.findPosition=function(t,e,n){for(var o,i={index:0,indexEl:0,method:'before'},r=0,s=0,a=0,l=0,c=0,u=0,h=0,p=t.length;hs||a&&c>=a||r&&f+mw&&(O.at=d-1))}r&&(b?(delete O.at,s=m.getView().insertComponent(r,O)):s=g.add(r,O)),delete this.dropContent,delete this.prevTarget}else if(a){var S=f.dropInfo||(null==m?void 0:m.get('droppable')),k=f.dragInfo||(null==v?void 0:v.get('draggable'));!g&&p.push('Target collection not found'),!_&&S&&p.push("Target is not droppable, accepts [".concat(S,"]")),!y&&k&&p.push("Component not draggable, acceptable by [".concat(k,"]")),a.logWarning('Invalid target position',{errors:p,model:v,context:'sorter',target:m})}return null==a||a.trigger('sorter:drag:end',{targetCollection:g,modelToDrop:r,warns:p,validResult:f,dst:n,srcEl:h}),s},o.prototype.rollback=function(t){(0,ue.S1)(this.getDocuments(),'keydown',this.rollback),27==(t.which||t.keyCode)&&(this.moved=!1,this.endMove())},o}(u.G7);const OQ=_Q;var bQ=void 0&&(void 0).__assign||function(){return bQ=Object.assign||function(t){for(var e,n=1,o=arguments.length;n_?m.h=Math.round(m.w/_):m.w=Math.round(m.h*_)}for(var O in~v.indexOf('l')&&(m.l+=r.w-m.w),~v.indexOf('t')&&(m.t+=r.h-m.h),m){var b=O;m[b]=parseInt("".concat(m[b]),10)}return m}},n}();const xQ=wQ;var SQ=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),kQ=void 0&&(void 0).__assign||function(){return kQ=Object.assign||function(t){for(var e,n=1,o=arguments.length;n=0&&RQ.splice(o,1),93!=n&&224!=n||(n=91),n in EQ)for(e in EQ[n]=!1,AQ)AQ[e]==n&&(WQ[e]=!1)}function NQ(){for(CQ in EQ)EQ[CQ]=!1;for(CQ in AQ)WQ[CQ]=!1}function WQ(t,e,n){var o,i;o=LQ(t),void 0===n&&(n=e,e='all');for(var r=0;r1&&(i=YQ(t),t=[t[t.length-1]]),t=t[0],(t=jQ(t))in TQ||(TQ[t]=[]),TQ[t].push({shortcut:o[r],scope:e,method:n,key:o[r],mods:i})}for(CQ in AQ)WQ[CQ]=!1;function XQ(){return QQ||'all'}function LQ(t){var e;return''==(e=(t=t.replace(/\s/g,'')).split(','))[e.length-1]&&(e[e.length-2]+=','),e}function YQ(t){for(var e=t.slice(0,t.length-1),n=0;n1&&(a=YQ(o)),t=o[o.length-1],t=jQ(t),void 0===e&&(e=XQ()),!TQ[t])return;for(i=0;i0,EQ)(!EQ[o]&&ZQ(n.mods,+o)>-1||EQ[o]&&-1==ZQ(n.mods,+o))&&(r=!1);(0!=n.mods.length||EQ[16]||EQ[18]||EQ[17]||EQ[91])&&!r||!1===n.method(t,n)&&(t.preventDefault?t.preventDefault():t.returnValue=!1,t.stopPropagation&&t.stopPropagation(),t.cancelBubble&&(t.cancelBubble=!0))}}(t)})),zQ(t.document,'keyup',IQ),zQ(t,'focus',NQ)};const qQ=WQ;const UQ={defaults:{'core:undo':{keys:'⌘+z, ctrl+z',handler:'core:undo',opts:{prevent:!0}},'core:redo':{keys:'⌘+shift+z, ctrl+shift+z',handler:'core:redo',opts:{prevent:!0}},'core:copy':{keys:'⌘+c, ctrl+c',handler:'core:copy'},'core:paste':{keys:'⌘+v, ctrl+v',handler:'core:paste'},'core:component-next':{keys:'s',handler:'core:component-next'},'core:component-prev':{keys:'w',handler:'core:component-prev'},'core:component-enter':{keys:'d',handler:'core:component-enter'},'core:component-exit':{keys:'a',handler:'core:component-exit'},'core:component-delete':{keys:'backspace, delete',handler:'core:component-delete',opts:{prevent:!0}}}};var BQ=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),FQ=void 0&&(void 0).__spreadArray||function(t,e,n){if(n||2===arguments.length)for(var o,i=0,r=e.length;i\n
\n
").concat(i,"
\n
\n
\n
\n
").concat(o,"
\n
\n
\n \n
")},e.prototype.events=function(){return{click:'onClick','click [data-close-modal]':'hide'}},e.prototype.onClick=function(t){this.config.backdrop&&t.target===this.el&&this.hide()},e.prototype.getCollector=function(){return this.$collector||(this.$collector=this.$el.find('.'+this.pfx+'collector')),this.$collector},e.prototype.getContent=function(){var t=this.pfx;return this.$content||(this.$content=this.$el.find(".".concat(t,"content #").concat(t,"c"))),this.$content},e.prototype.getTitle=function(t){return void 0===t&&(t={}),this.$title||(this.$title=this.$el.find('.'+this.pfx+'title')),t.$?this.$title:this.$title.get(0)},e.prototype.updateContent=function(){var t=this.getContent(),e=t.children(),n=this.getCollector(),o=this.model.get('content');e.length&&n.append(e),t.empty().append(o)},e.prototype.updateTitle=function(){var t=this.getTitle({$:!0});t&&t.empty().append(this.model.get('title'))},e.prototype.updateOpen=function(){this.el.style.display=this.model.get('open')?'':'none'},e.prototype.hide=function(){this.model.close()},e.prototype.show=function(){this.model.open()},e.prototype.updateAttr=function(t){var e=this,n=e.pfx,o=e.$el,i=e.el,r=[].slice.call(i.attributes).map((function(t){return t.name}));o.removeAttr(r.join(' ')),o.attr(nA(nA({},t||{}),{class:"".concat(n,"container ").concat(t&&t.class||'').trim()}))},e.prototype.render=function(){var t=this.$el,e=this.model.toJSON();return e.pfx=this.pfx,e.ppfx=this.ppfx,t.html(this.template(e)),this.updateAttr(),this.updateOpen(),this},e}(Fe);const iA=oA;var rA=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),sA=function(e){function n(n){var o=e.call(this,n,'Modal',KQ)||this;return o.model=new tA(o),o.model.on('change:open',(function(t,e){n.trigger("modal:".concat(e?'open':'close'))})),o.model.on('change',(0,t.debounce)((function(){var e=o._evData(),i=o.config.custom;(0,t.isFunction)(i)&&i(e),n.trigger('modal',e)}),0)),o}return rA(n,e),n.prototype._evData=function(){var e=this,n=this.getTitle(),o=this.getContent(),i=this.model.attributes;return{open:i.open,attributes:i.attributes,title:(0,t.isString)(n)?(0,ue.rw)(n):n,content:(0,t.isString)(o)?(0,ue.rw)(o):o.get?o.get(0):o,close:function(){e.close()}}},n.prototype.postRender=function(t){var e=t.model.config.el||t.el,n=this.render();n&&(null==e||e.appendChild(n))},n.prototype.open=function(t){void 0===t&&(t={});var e=t.attributes||{};return t.title&&this.setTitle(t.title),t.content&&this.setContent(t.content),this.model.set('attributes',e),this.model.open(),this.modal&&this.modal.updateAttr(e),this},n.prototype.close=function(){return this.model.close(),this},n.prototype.onceClose=function(t){return this.em.once('modal:close',t),this},n.prototype.onceOpen=function(t){return this.em.once('modal:open',t),this},n.prototype.isOpen=function(){return!!this.model.get('open')},n.prototype.setTitle=function(t){return this.model.set('title',t),this},n.prototype.getTitle=function(){return this.model.get('title')},n.prototype.setContent=function(t){return this.model.set('content',' '),this.model.set('content',t),this},n.prototype.getContent=function(){return this.model.get('content')},n.prototype.getContentEl=function(){var t;return null===(t=this.modal)||void 0===t?void 0:t.getContent().get(0)},n.prototype.getModel=function(){return this.model},n.prototype.render=function(){var t;if(!this.config.custom){var e=iA.extend(this.config.extend),n=this.modal&&this.modal.el;return this.modal=new e({el:n,model:this.model,config:this.config}),null===(t=this.modal)||void 0===t?void 0:t.render().el}},n.prototype.destroy=function(){var t;null===(t=this.modal)||void 0===t||t.remove()},n}(_);const aA=sA;var lA='sw-visibility',cA='export-template',uA='open-sm',hA='open-tm',pA='open-layers',dA='open-blocks',fA='open-pages',gA='fullscreen',mA='preview';const vA={stylePrefix:'pn-',defaults:[{id:'commands',buttons:[{}]},{id:'options',buttons:[{active:!0,id:lA,className:'fa fa-square-o',command:'core:component-outline',context:lA,attributes:{title:'View components'}},{id:mA,className:'fa fa-eye',command:mA,context:mA,attributes:{title:'Preview'}},{id:gA,className:'fa fa-arrows-alt',command:gA,context:gA,attributes:{title:'Fullscreen'}},{id:cA,className:'fa fa-code',command:cA,attributes:{title:'View code'}}]},{id:'views',buttons:[{id:uA,className:'fa fa-paint-brush',command:uA,active:!0,togglable:!1,attributes:{title:'Open Style Manager'}},{id:hA,className:'fa fa-cog',command:hA,togglable:!1,attributes:{title:'Settings'}},{id:pA,className:'fa fa-bars',command:pA,togglable:!1,attributes:{title:'Open Layer Manager'}},{id:dA,className:'fa fa-th-large',command:dA,togglable:!1,attributes:{title:'Open Blocks'}},{id:fA,className:'fa fa-th-large',command:fA,togglable:!1,attributes:{title:'Open Pages'}}]}]};var yA=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}();const _A=function(t){function e(e,n){var o=t.call(this,e,n)||this;return o.get('buttons').length&&o.set('buttons',new wA(o.module,o.get('buttons'))),o}return yA(e,t),e.prototype.defaults=function(){return{id:'',label:'',tagName:'span',className:'',command:'',context:'',buttons:[],attributes:{},options:{},active:!1,dragDrop:!1,togglable:!0,runDefaultCommand:!0,stopDefaultCommand:!1,disable:!1}},Object.defineProperty(e.prototype,"className",{get:function(){return this.get('className')},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"command",{get:function(){return this.get('command')},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"active",{get:function(){return this.get('active')},set:function(t){this.set('active',t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"togglable",{get:function(){return this.get('togglable')},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"runDefaultCommand",{get:function(){return this.get('runDefaultCommand')},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"stopDefaultCommand",{get:function(){return this.get('stopDefaultCommand')},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"disable",{get:function(){return this.get('disable')},enumerable:!1,configurable:!0}),e}(w.Z);var OA=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),bA=function(t){function e(e,n){return t.call(this,e,n,_A)||this}return OA(e,t),e.prototype.deactivateAllExceptOne=function(t,e){this.forEach((function(n,o){n!==t&&(n.set('active',!1),e&&n.get('buttons').length&&n.get('buttons').deactivateAllExceptOne(t,e))}))},e.prototype.deactivateAll=function(t,e){var n=t||'';this.forEach((function(t){t.get('context')==n&&t!==e&&t.set('active',!1,{fromCollection:!0})}))},e.prototype.disableAllButtons=function(t){var e=t||'';this.forEach((function(t,n){t.get('context')==e&&t.set('disable',!0)}))},e.prototype.disableAllButtonsExceptOne=function(t,e){this.forEach((function(n,o){n!==t&&(n.set('disable',!0),e&&n.get('buttons').length&&n.get('buttons').disableAllButtonsExceptOne(t,e))}))},e}(G);const wA=bA;bA.prototype.model=_A;var xA=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}();const SA=function(t){function e(e,n){var o=t.call(this,e,n)||this,i=o.get('buttons')||[];return o.buttons=new wA(e,i),o}return xA(e,t),e.prototype.defaults=function(){return{id:'',content:'',visible:!0,buttons:[],attributes:{}}},Object.defineProperty(e.prototype,"buttons",{get:function(){return this.get('buttons')},set:function(t){this.set('buttons',t)},enumerable:!1,configurable:!0}),e}(w.Z);var kA=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),PA=function(t){function e(e,n){return t.call(this,e,n,SA)||this}return kA(e,t),e}(G);const CA=PA;PA.prototype.model=SA;var TA=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),EA=void 0&&(void 0).__assign||function(){return EA=Object.assign||function(t){for(var e,n=1,o=arguments.length;n\n
","
\n
\n \n "],["\n
\n
","
\n
\n
\n "])),e,e,n,e,o,e)},e.prototype.initialize=function(t){this.config=t.config||{},this.pfx=this.config.stylePrefix},e.prototype.render=function(){var t,e,n=this,o=n.model,i=n.pfx,r=n.$el,s=o.toJSON(),a=o.get('input')||(null===(e=(t=o).getElement)||void 0===e?void 0:e.call(t));return s.pfx=i,r.html(this.template(s)),r.attr('class',"".concat(i,"editor-c")),r.find("#".concat(i,"code")).append(a),this},e}(u.G7);const i$=o$;var r$,s$=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),a$=void 0&&(void 0).__assign||function(){return a$=Object.assign||function(t){for(var e,n=1,o=arguments.length;n=0})))return!1;if((0,t.isBoolean)(n))return!0;if((0,t.isArray)(n)&&y$(e).some((function(t){return n.indexOf(t)>=0})))return!0}return!1},on:function(e,n,o){var r=this;!this.beforeCache&&(this.beforeCache=e.previousAttributes());var s=o||n||{};if(s.noUndo&&setTimeout((function(){r.beforeCache=null})),!v$(s)){var a=e.toJSON({fromUndo:i}),l={object:e,before:this.beforeCache,after:a};if(this.beforeCache=null,!(0,t.isEmpty)(a))return l}}}),o.um.changeUndoType('add',{on:function(t,e,n){if(void 0===n&&(n={}),!v$(n)&&o.isRegistered(e))return{object:e,before:void 0,after:t,options:g$(g$({},n),{fromUndo:i})}}}),o.um.changeUndoType('remove',{on:function(t,e,n){if(void 0===n&&(n={}),!v$(n)&&o.isRegistered(e))return{object:e,before:t,after:void 0,options:g$(g$({},n),{fromUndo:i})}}}),o.um.changeUndoType('reset',{undo:function(t,e){t.reset(e,{fromUndo:i})},redo:function(t,e,n){t.reset(n,{fromUndo:i})},on:function(t,e){if(void 0===e&&(e={}),!v$(e)&&o.isRegistered(t))return{object:t,before:e.previousModels,after:m$([],t.models,!0),options:g$(g$({},e),{fromUndo:i})}}}),o.um.on('undo redo',(function(){n.trigger('change:canvasOffset'),n.getSelectedAll().map((function(t){return t.trigger('rerender:layer')}))})),['undo','redo'].forEach((function(t){return o.um.on(t,(function(){return n.trigger(t)}))})),o}return f$(n,e),n.prototype.postLoad=function(){var t=this.config,e=this.em;t.trackSelection&&e&&this.add(e.get('selected'))},n.prototype.add=function(t){return this.um.register(t),this},n.prototype.remove=function(t){return this.um.unregister(t),this},n.prototype.removeAll=function(){return this.um.unregisterAll(),this},n.prototype.start=function(){return this.um.startTracking(),this},n.prototype.stop=function(){return this.um.stopTracking(),this},n.prototype.undo=function(t){void 0===t&&(t=!0);var e=this.em,n=this.um;return!e.isEditing()&&n.undo(t),this},n.prototype.undoAll=function(){return this.um.undoAll(),this},n.prototype.redo=function(t){void 0===t&&(t=!0);var e=this.em,n=this.um;return!e.isEditing()&&n.redo(t),this},n.prototype.redoAll=function(){return this.um.redoAll(),this},n.prototype.hasUndo=function(){return!!this.um.isAvailable('undo')},n.prototype.hasRedo=function(){return!!this.um.isAvailable('redo')},n.prototype.isRegistered=function(t){return!!this.getInstance().objectRegistry.isRegistered(t)},n.prototype.getStack=function(){return this.um.stack},n.prototype.getStackGroup=function(){var t=[],e=[];return this.getStack().forEach((function(n){var o=n.get('magicFusionIndex');e.indexOf(o)<0&&(e.push(o),t.push(n))})),t},n.prototype.skip=function(t){var e=!!this.um.isTracking();e&&this.stop(),t(),e&&this.start()},n.prototype.getGroupedStack=function(){var e={},n=this.getStack();return n.forEach((function(t,n){var o=t.get('magicFusionIndex'),i=function(t,e){var n=t.attributes,o=n.type,i=n.after,r=n.before,s=n.object,a=n.options;return{index:e,type:o,after:i,before:r,object:s,options:void 0===a?{}:a}}(t,n);e[o]?e[o].push(i):e[o]=[i]})),Object.keys(e).map((function(n){var o=e[n];return{index:o[o.length-1].index,actions:o,labels:(0,t.unique)(o.reduce((function(t,e){var n,o=null===(n=e.options)||void 0===n?void 0:n.action;return o&&t.push(o),t}),[]))}}))},n.prototype.goToGroup=function(e){var n=this;if(e){var o=this.getPointer(),i=e.index-o;(0,t.times)(Math.abs(i),(function(){n[i<0?'undo':'redo'](!1)}))}},n.prototype.getPointer=function(){return this.getStack().pointer},n.prototype.clear=function(){return this.um.clear(),this},n.prototype.getInstance=function(){return this.um},n.prototype.destroy=function(){this.clear().removeAll()},n}(_);const O$=_$;const b$={stylePrefix:'rte-',adjustToolbar:!0,actions:['bold','italic','underline','strikethrough','link','wrap'],custom:!1};var w$,x$=void 0&&(void 0).__assign||function(){return x$=Object.assign||function(t){for(var e,n=1,o=arguments.length;nB',attributes:{title:'Bold'},result:function(t){return t.exec('bold')}},italic:{name:'italic',icon:'I',attributes:{title:'Italic'},result:function(t){return t.exec('italic')}},underline:{name:'underline',icon:'U',attributes:{title:'Underline'},result:function(t){return t.exec('underline')}},strikethrough:{name:'strikethrough',icon:'S',attributes:{title:'Strike-through'},result:function(t){return t.exec('strikeThrough')}},link:{icon:"\n \n ",name:'link',attributes:{style:'font-size:1.4rem;padding:0 4px 2px;',title:'Link'},state:function(t){return t&&t.selection()&&T$(t)?k$:P$},result:function(t){T$(t)?t.exec('unlink'):t.insertHTML("").concat(t.selection(),""),{select:!0})}},wrap:{name:'wrap',icon:"\n \n ",attributes:{title:'Wrap for style'},state:function(t){return(null==t?void 0:t.selection())&&T$(t,'SPAN')?C$:P$},result:function(t){!T$(t,'SPAN')&&t.insertHTML("").concat(t.selection(),""),{select:!0})}}},A$=function(){function n(e,n,o){void 0===o&&(o={});var i=this;if(this.em=e,this.settings=o,n[S$])return n[S$];n[S$]=this,this.setEl(n),this.updateActiveActions=this.updateActiveActions.bind(this),this.__onKeydown=this.__onKeydown.bind(this),this.__onPaste=this.__onPaste.bind(this);var r=(o.actions||[]).map((function(e){var n=e;return(0,t.isString)(e)?n=x$({},Q$[e]):Q$[e.name]&&(n=x$(x$({},Q$[e.name]),e)),n})),s=r.length?r:Object.keys(Q$).map((function(t){return Q$[t]}));o.classes=x$({actionbar:'actionbar',button:'action',active:'active',disabled:'disabled',inactive:'inactive'},o.classes);var a=o.classes,l=o.actionbar;if(this.actionbar=l,this.classes=a,this.actions=s,!l){if(!this.isCustom(o.module)){var c=o.actionbarContainer;(l=document.createElement('div')).className=a.actionbar,null==c||c.appendChild(l),this.actionbar=l}s.forEach((function(t){return i.addAction(t)}))}return o.styleWithCSS&&this.exec('styleWithCSS'),this}return n.prototype.isCustom=function(t){var e=t||this.em.RichTextEditor;return!(!(null==e?void 0:e.config.custom)&&!(null==e?void 0:e.customRte))},n.prototype.destroy=function(){},n.prototype.setEl=function(t){this.el=t,this.doc=t.ownerDocument},n.prototype.updateActiveActions=function(){var t=this,e=this.getActions();e.forEach((function(e){var n=e.update,o=e.btn,i=t.classes,r=i.active,s=i.inactive,a=i.disabled,l=e.state,c=e.name,u=t.doc,h=w$.INACTIVE;if(o&&(o.className=o.className.replace(r,'').trim(),o.className=o.className.replace(s,'').trim(),o.className=o.className.replace(a,'').trim()),l){var p=l(t,u);if(h=p,o)switch(p){case k$:o.className+=" ".concat(r);break;case P$:o.className+=" ".concat(s);break;case C$:o.className+=" ".concat(a)}}else u.queryCommandSupported(c)&&u.queryCommandState(c)&&(o&&(o.className+=" ".concat(r)),h=w$.ACTIVE);e.currentState=h,null==n||n(t,e)})),e.length&&this.em.RichTextEditor.__dbdTrgCustom()},n.prototype.enable=function(t){return this.enabled?this:this.__toggleEffects(!0,t)},n.prototype.disable=function(){return this.__toggleEffects(!1)},n.prototype.__toggleEffects=function(t,e){void 0===t&&(t=!1),void 0===e&&(e={});var n=t?ue.on:ue.S1,o=this.el,i=this.doc,r=this.actionbarEl();if(r&&(r.style.display=t?'':'none'),o.contentEditable="".concat(!!t),n(o,'mouseup keyup',this.updateActiveActions),n(i,'keydown',this.__onKeydown),n(i,'paste',this.__onPaste),this.enabled=t,t){var s=e.event;if(this.syncActions(),this.updateActiveActions(),s){var a=null;if(i.caretRangeFromPoint){var l=(0,ue.VB)(s);a=i.caretRangeFromPoint(l.clientX,l.clientY)}else s.rangeParent&&(a=i.createRange()).setStart(s.rangeParent,s.rangeOffset);var c=i.getSelection();null==c||c.removeAllRanges(),a&&(null==c||c.addRange(a))}o.focus()}return this},n.prototype.__onKeydown=function(t){var e=t,n=this.doc;'Enter'!==e.key||['insertOrderedList','insertUnorderedList'].some((function(t){return n.queryCommandState(t)}))||(n.execCommand('insertLineBreak'),e.preventDefault())},n.prototype.__onPaste=function(t){var e=t.clipboardData||window.clipboardData,n=e.getData('text'),o=e.getData('text/html');if(n&&!o){t.preventDefault();var i=n.replace(/(?:\r\n|\r|\n)/g,'
');this.doc.execCommand('insertHTML',!1,i)}},n.prototype.syncActions=function(){var t=this;this.getActions().forEach((function(e){if(t.actionbar&&(!e.state||e.state&&e.state(t,t.doc)>=0)){var n=e.event||'click',o=e.btn;o&&(o["on".concat(n)]=function(){e.result(t,e),t.updateActiveActions()})}}))},n.prototype.addAction=function(t,e){void 0===e&&(e={});var n=e.sync,o=this.actionbarEl();if(o){var i=t.icon,r=t.attributes,s=void 0===r?{}:r,a=document.createElement('span');for(var l in a.className=this.classes.button,t.btn=a,s)a.setAttribute(l,s[l]);'string'==typeof i?a.innerHTML=i:a.appendChild(i),o.appendChild(a)}n&&(this.actions.push(t),this.syncActions())},n.prototype.getActions=function(){return this.actions},n.prototype.selection=function(){return this.doc.getSelection()},n.prototype.exec=function(t,e){this.doc.execCommand(t,!1,e)},n.prototype.actionbarEl=function(){return this.actionbar},n.prototype.insertHTML=function(n,o){var i=(void 0===o?{}:o).select,r=this,s=r.em,a=r.doc,l=r.el,c=a.getSelection();if(c&&c.rangeCount){var u=(0,e.getComponentModel)(l)||s.getSelected(),h=a.createElement('div'),p=c.getRangeAt(0);p.deleteContents(),(0,t.isString)(n)?h.innerHTML=n:n&&h.appendChild(n),Array.prototype.slice.call(h.childNodes).forEach((function(t){p.insertNode(t)})),c.removeAllRanges(),c.addRange(p),l.focus(),i&&u&&(u.once('rte:disable',(function(){var t=u.find("[".concat(E$,"]"))[0];t&&(s.setSelected(t),t.removeAttributes(E$))})),u.trigger('disable'))}},n}();const $$=A$;var j$=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),R$=void 0&&(void 0).__awaiter||function(t,e,n,o){return new(n||(n=Promise))((function(i,r){function s(t){try{l(o.next(t))}catch(t){r(t)}}function a(t){try{l(o["throw"](t))}catch(t){r(t)}}function l(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,a)}l((o=o.apply(t,e||[])).next())}))},Z$=void 0&&(void 0).__generator||function(t,e){var n,o,i,r,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return r={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function a(a){return function(l){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;r&&(r=0,a[0]&&(s=0)),s;)try{if(n=1,o&&(i=2&a[0]?o["return"]:a[0]?o["throw"]||((i=o["return"])&&i.call(o),0):o.next)&&!(i=i.call(o,a[1])).done)return i;switch(o=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,o=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!(i=s.trys,(i=i.length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]=0}))),g=this.get('onChange'),m={property:this,from:h,to:u,value:l,opts:n};r.__trgEv(r.events.propertyUpdate,m),g&&g(m),f&&this.__upTargetsStyle(((o={})[s]=l,o),n)},o.prototype.__upTargetsStyle=function(t,e){var n,o=null===(n=this.em)||void 0===n?void 0:n.get('StyleManager');null==o||o.addStyleTargets(L$(L$({},t),{__p:!!e.avoidStore}),e)},o.prototype._up=function(t,e){void 0===e&&(e={}),e.noTarget&&(e.__up=!0);var n=e.partial,o=Y$(e,["partial"]);return t.__p=!(!o.avoidStore&&!n),this.set(t,L$(L$({},o),{avoidStore:t.__p}))},o.prototype.up=function(t,e){void 0===e&&(e={}),this.set(t,L$(L$({},e),{__up:!0}))},o.prototype.init=function(){},o.prototype.getId=function(){return this.get('id')},o.prototype.getType=function(){return this.get('type')},o.prototype.getName=function(){return this.get('property')},o.prototype.getLabel=function(t){var e;void 0===t&&(t={});var n=t.locale,o=void 0===n||n,i=this.getId(),r=this.get('name')||this.get('label');return o&&(null===(e=this.em)||void 0===e?void 0:e.t("styleManager.properties.".concat(i)))||r},o.prototype.getValue=function(t){void 0===t&&(t={});var e=t.noDefault,n=this.get('value');return this.hasValue()||e?n:this.getDefaultValue()},o.prototype.hasValue=function(e){void 0===e&&(e={});var n=e.noParent&&this.getParentTarget(),o=this.get('value');return!(0,t.isUndefined)(o)&&''!==o&&!n},o.prototype.hasValueParent=function(){return this.hasValue()&&!this.hasValue({noParent:!0})},o.prototype.getStyle=function(t){var n;void 0===t&&(t={});var o=this.getName();return(n={})[t.camelCase?(0,e.camelCase)(o):o]=this.__getFullValue(t),n},o.prototype.getDefaultValue=function(){var e=this.get('default');return"".concat((0,t.isUndefined)(e)?this.get('defaults'):e)},o.prototype.upValue=function(t,e){void 0===e&&(e={});var n=null===t||''===t?this.__getClearProps():this.__parseValue(t,e);return this._up(n,e)},o.prototype.isVisible=function(){return!!this.get('visible')},o.prototype.clear=function(t){return void 0===t&&(t={}),this._up(this.__getClearProps(),L$(L$({},t),{__clear:!0})),this},o.prototype.canClear=function(){var t=this.getParent();return t?t.__canClearProp(this):this.hasValue({noParent:!0})},o.prototype.getParent=function(){return this.__getParentProp()},o.prototype.isFull=function(){return!!this.get('full')},o.prototype.__parseValue=function(t,e){return this.parseValue(t,e)},o.prototype.__getClearProps=function(){return{value:''}},o.prototype.setValue=function(t,e,n){void 0===e&&(e=!0),void 0===n&&(n={});var o=this.parseValue(t),i=!e;!i&&this.set({value:void 0},{avoidStore:i,silent:!0}),this.set(o,L$({avoidStore:i},n))},o.prototype.setValueFromInput=function(t,e,n){void 0===n&&(n={}),this.setValue(t,e,L$(L$({},n),{fromInput:1}))},o.prototype.parseValue=function(e,n){void 0===n&&(n={});var o={value:e},i='!important',r=this.get('functionName')||'';if((0,t.isString)(e)&&-1!==e.indexOf(i)&&(o.value=e.replace(i,'').trim(),o.important=!0),!r&&!n.complete)return o;var s=[],a="".concat(o.value).trim(),l=a.indexOf('(')+1,c=r||a.substring(0,l-1);if(c&&(o.functionName=c),!r||0===a.indexOf("".concat(r,"("))){var u=a.lastIndexOf(')');s.push(l),u>=0&&s.push(u),o.value=String.prototype.substring.apply(a,s)}if(n.numeric){var h=parseFloat(o.value);o.unit=o.value.replace(h,''),o.value=h}return o},o.prototype.__getFullValue=function(t){var e=(void 0===t?{}:t).withDefault;return!this.hasValue()&&e?this.getDefaultValue():this.getFullValue()},o.prototype.getFullValue=function(e,n){void 0===n&&(n={});var o=this.get('functionName'),i=this.getDefaultValue(),r=(0,t.isUndefined)(e)?this.get('value'):e,s=!(0,t.isUndefined)(r)&&''!==r;if(r&&i&&r===i)return i;if(o&&s){var a='url'===o?"'".concat(r.replace(/'|"/g,''),"'"):r;r="".concat(o,"(").concat(a,")")}return s&&this.get('important')&&!n.skipImportant&&(r="".concat(r," !important")),r||''},o.prototype.__setParentTarget=function(t){this.up({parentTarget:t})},o.prototype.getParentTarget=function(){return this.get('parentTarget')||null},o.prototype.__parseFn=function(t){void 0===t&&(t='');var e=t.indexOf('(')+1,n=t.lastIndexOf(')');return{name:t.substring(0,e-1).trim(),value:String.prototype.substring.apply(t,[e,n>=0?n:void 0]).trim()}},o.prototype.__checkVisibility=function(n){var o=n.target,i=n.component,r=n.sectors,s=i||o;if(!s)return!1;var a=this.getId(),l=this.getName(),c=this.get('toRequire'),u=this.get('requires'),h=this.get('requiresParent'),p=s.get('unstylable'),d=s.get('stylable-require'),f=s.get('stylable');if((0,t.isArray)(f)&&(f=f.indexOf(l)>=0),(0,t.isArray)(p)&&(f=p.indexOf(l)<0),c&&(f=!o||d&&(d.indexOf(a)>=0||d.indexOf(l)>=0)),r&&u){var g=(0,t.keys)(u);r.forEach((function(e){e.getProperties().forEach((function(e){if((0,t.includes)(g,e.id)){var n=u[e.id];f=f&&(0,t.includes)(n,e.get('value'))}}))}))}if(h){var m=i&&i.parent(),v=m&&m.getEl();if(v){var y=(0,e.hasWin)()?window.getComputedStyle(v):{};(0,t.each)(h,(function(e,n){f=f&&y[n]&&(0,t.includes)(e,y[n])}))}else f=!1}return!!f},o}(u.Hn);const U$=q$;q$.callParentInit=function(t,e,n,o){void 0===o&&(o={}),t.prototype.initialize.apply(e,[n,L$(L$({},o),{skipInit:1})])},q$.callInit=function(t,e,n){void 0===n&&(n={}),!n.skipInit&&t.init(e,n)};var B$=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),F$=void 0&&(void 0).__assign||function(){return F$=Object.assign||function(t){for(var e,n=1,o=arguments.length;n=0?t:void 0},o.prototype.selectLayer=function(t){return this.set('selectedLayer',t,{__select:!0})},o.prototype.selectLayerAt=function(t){void 0===t&&(t=0);var e=this.getLayer(t);return e&&this.selectLayer(e)},o.prototype.moveLayer=function(e,n){void 0===n&&(n=0);var o=e?e.getIndex():-1;o>=0&&(0,t.isNumber)(n)&&n>=0&&n0&&!e},o.prototype.clear=function(t){return void 0===t&&(t={}),this.__getLayers().reset(),this.__upTargetsStyleProps(t),U$.prototype.clear.call(this),this},o.prototype.__canClearProp=function(){return!1},o}(sj);const dj=pj;var fj=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),gj=void 0&&(void 0).__assign||function(){return gj=Object.assign||function(t){for(var e,n=1,o=arguments.length;n\n
\n ")},o.prototype.templateLabel=function(t){var e=this.pfx,n=this.em,o=t.parent,i=t.attributes,r=i.icon,s=void 0===r?'':r,a=i.info,l=void 0===a?'':a,c=null==n?void 0:n.getConfig().icons,u=(null==c?void 0:c.close)||'';return"\n \n ").concat(t.getLabel(),"\n \n ").concat(o?'':"
").concat(u,"
"),"\n ")},o.prototype.templateInput=function(t){return"\n
\n \n
\n ")},o.prototype.remove=function(){var t=this;return u.G7.prototype.remove.apply(this,arguments),['em','input','$input','view'].forEach((function(e){return t[e]=null})),this.__destroyFn(this._getClbOpts()),this},o.prototype.updateStatus=function(){var t,e=this,n=e.model,o=e.pfx,i=e.ppfx,r=e.config,s="".concat(i,"four-color"),a="".concat(i,"color-warn"),l=this.$el.children(".".concat(o,"label")),c=this.getClearEl(),u=c?c.style:{};l.removeClass("".concat(s," ").concat(a)),u.display='none',n.hasValue({noParent:!0})&&r.highlightChanged?(l.addClass(s),r.clearProperties&&(u.display='')):n.hasValue()&&r.highlightComputed&&l.addClass(a),null===(t=this.parent)||void 0===t||t.updateStatus()},o.prototype.clear=function(t){t&&t.stopPropagation(),this.model.clear()},o.prototype.getClearEl=function(){return this.clearEl||(this.clearEl=this.el.querySelector("[".concat(yj,"]"))),this.clearEl},o.prototype.inputValueChanged=function(t){t&&t.stopPropagation(),this.emit||this.model.upValue(t.target.value)},o.prototype.onValueChange=function(t,e,n){void 0===n&&(n={}),this.setValue(this.model.getFullValue(void 0,{skipImportant:!0})),this.updateStatus()},o.prototype.setValue=function(e){var n=this.model,o=(0,t.isUndefined)(e)||''===e?n.getDefaultValue():e;if(this.update)return this.__update(o);this.__setValueInput(o)},o.prototype.__setValueInput=function(t){var e=this.getInputEl();e&&(e.value=t)},o.prototype.getInputEl=function(){return this.input||(this.input=this.el.querySelector('input')),this.input},o.prototype.updateVisibility=function(){this.el.style.display=this.model.isVisible()?'':'none'},o.prototype.clearCached=function(){delete this.clearEl,delete this.input,delete this.$input},o.prototype.__unset=function(){var t=this.unset&&this.unset.bind(this);t&&t(this._getClbOpts())},o.prototype.__update=function(t){var e=this.update&&this.update.bind(this);e&&e(gj(gj({},this._getClbOpts()),{value:t}))},o.prototype.__change=function(){for(var t=[],e=0;e\n \n \n ")},e.prototype.remove=function(){var t;return null===(t=this.props)||void 0===t||t.remove(),Oj.prototype.remove.apply(this,arguments),this},e.prototype.onValueChange=function(){},e.prototype.onRender=function(){var t=this.pfx,e=this.model,n=e.get('properties');if(n.length&&!this.props){var o=e.isDetached(),i=new xj({config:kj(kj({},this.config),{highlightComputed:o,highlightChanged:o}),collection:n,parent:this});i.render(),this.$el.find("#".concat(t,"input-holder")).append(i.el),this.props=i}},e.prototype.clearCached=function(){Oj.prototype.clearCached.apply(this,arguments),delete this.props},e}(Oj);const Cj=Pj;var Tj=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),Ej=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return Tj(n,e),n.prototype.events=function(){return{click:'select','click [data-close-layer]':'removeItem','mousedown [data-move-layer]':'initSorter','touchstart [data-move-layer]':'initSorter'}},n.prototype.template=function(){var t=this,e=t.pfx,n=t.ppfx,o=t.em,i=null==o?void 0:o.getConfig().icons,r=(null==i?void 0:i.close)||'',s=(null==i?void 0:i.move)||'';return"\n
\n
\n ").concat(s,"\n
\n
\n
\n
\n
\n
\n ").concat(r,"\n
\n
\n
\n ")},n.prototype.initialize=function(t){void 0===t&&(t={});var e=this.model,n=t.config||{};this.em=n.em,this.config=n,this.sorter=t.sorter,this.pfx=n.stylePrefix||'',this.ppfx=n.pStylePrefix||'',this.propertyView=t.propertyView;var o=this.propertyView.model;this.listenTo(e,'destroy remove',this.remove),this.listenTo(e,'change:values',this.updateLabel),this.listenTo(o,'change:selectedLayer',this.updateVisibility),e.view=this,e.set({droppable:0,draggable:1}),this.$el.data('model',e)},n.prototype.initSorter=function(){var t;null===(t=this.sorter)||void 0===t||t.startSort(this.el)},n.prototype.removeItem=function(t){t&&t.stopPropagation(),this.model.remove()},n.prototype.select=function(){this.model.select()},n.prototype.getPropertiesWrapper=function(){return this.propsWrapEl||(this.propsWrapEl=this.el.querySelector('[data-properties]')),this.propsWrapEl},n.prototype.getPreviewEl=function(){return this.previewEl||(this.previewEl=this.el.querySelector('[data-preview]')),this.previewEl},n.prototype.getLabelEl=function(){return this.labelEl||(this.labelEl=this.el.querySelector('[data-label]')),this.labelEl},n.prototype.updateLabel=function(){var e=this.model,n=e.getLabel();if(this.getLabelEl().innerHTML=n,e.hasPreview()){var o=this.getPreviewEl(),i=e.getStylePreview({number:{min:-3,max:3}}),r=(0,t.keys)(i).map((function(t){return"".concat(t,":").concat(i[t])})).join(';');o.setAttribute('style',r)}},n.prototype.updateVisibility=function(){var t,e=this,n=e.pfx,o=e.model,i=e.propertyView,r=this.getPropertiesWrapper(),s=o.isSelected();r.style.display=s?'':'none',this.$el[s?'addClass':'removeClass']("".concat(n,"active")),s&&r.appendChild(null===(t=i.props)||void 0===t?void 0:t.el)},n.prototype.render=function(){var t=this,e=t.el,n=t.pfx,o=t.model;return e.innerHTML=this.template(),e.className="".concat(n,"layer"),o.hasPreview()&&(e.querySelector('[data-preview-box]').style.display=''),this.updateLabel(),this.updateVisibility(),this},n}(u.G7);const Qj=Ej;var Aj=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),$j=function(t){function e(e){var n=t.call(this,e)||this,o=n.collection,i=e.config||{},r=i.em,s=i.stylePrefix||'',a=i.pStylePrefix||'';n.config=i,n.pfx=s,n.ppfx=a,n.propertyView=e.propertyView,n.className="".concat(s,"layers ").concat(a,"field"),n.listenTo(o,'add',n.addTo),n.listenTo(o,'reset',n.reset),n.items=[];var l=null==r?void 0:r.Utils;return n.sorter=l?new l.Sorter({container:n.el,ignoreViewChildren:1,containerSel:".".concat(s,"layers"),itemSel:".".concat(s,"layer"),pfx:i.pStylePrefix,em:r}):'',o.view=n,n.$el.data('model',o),n.$el.data('collection',o),n}return Aj(e,t),e.prototype.addTo=function(t){var e=this.collection.indexOf(t);this.addToCollection(t,null,e)},e.prototype.addToCollection=function(t,e,n){var o=e||null,i=this,r=i.propertyView,s=i.config,a=i.sorter,l=i.$el,c=new Qj({model:t,config:s,sorter:a,propertyView:r}),u=c.render().el;if(this.items.push(c),o)o.appendChild(u);else if(void 0!==n){var h='before';l.children().length===n&&(n--,h='after'),n<0?l.append(u):l.children().eq(n)[h](u)}else l.append(u);return u},e.prototype.reset=function(t,e){this.clearItems(),this.render()},e.prototype.remove=function(){return this.clearItems(),u.G7.prototype.remove.apply(this,arguments),this},e.prototype.clearItems=function(){this.items.forEach((function(t){return t.remove()})),this.items=[]},e.prototype.render=function(){var t=this,e=this.$el,n=this.sorter,o=document.createDocumentFragment();return e.empty(),this.collection.forEach((function(e){return t.addToCollection(e,o)})),e.append(o),e.attr('class',this.className),n&&(n.plh=null),this},e}(u.G7);const jj=$j;var Rj=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),Zj=void 0&&(void 0).__assign||function(){return Zj=Object.assign||function(t){for(var e,n=1,o=arguments.length;n\n \n
\n \n ")},e.prototype.init=function(){var t=this.model;this.listenTo(t.__getLayers(),'change reset',this.updateStatus)},e.prototype.addLayer=function(){this.model.addLayer({},{at:0})},e.prototype.setValue=function(){},e.prototype.remove=function(){var t;return null===(t=this.layersView)||void 0===t||t.remove(),Cj.prototype.remove.apply(this,arguments),this},e.prototype.clearCached=function(){Cj.prototype.clearCached.apply(this,arguments),delete this.layersView},e.prototype.onRender=function(){var t=this,e=t.model,n=t.el,o=t.config,i=e.get('properties');if(i.length&&!this.props){var r=new xj({config:Zj(Zj({},o),{highlightComputed:!1,highlightChanged:!1}),collection:i,parent:this});r.render();var s=new jj({collection:e.__getLayers(),config:o,propertyView:this});s.render(),n.querySelector('[data-layers-wrapper]').appendChild(s.el),this.props=r,this.layersView=s}},e}(Cj);const Vj=Mj;var Dj=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),Ij=void 0&&(void 0).__assign||function(){return Ij=Object.assign||function(t){for(var e,n=1,o=arguments.length;n\n
\n
\n \n
\n
\n
\n
\n
\n
").concat(i,"
\n
\n \n ")},n.prototype.__setValueInput=function(t){var e=this.model,n=this.el,o=e.getDefaultValue(),i=n.querySelector('[data-preview-box]'),r=n.querySelector('[data-preview]');i.style.display=t&&t!==o?'':'none',r.style.backgroundImage=t||e.getDefaultValue()},n.prototype.openAssetManager=function(){var e,n=this,o=null===(e=this.em)||void 0===e?void 0:e.Assets;null==o||o.open({select:function(e,i){var r=(0,t.isString)(e)?e:e.get('src');n.model.upValue(r,{partial:!i}),i&&o.close()},types:['image'],accept:'image/*'})},n}(Oj);const Wj=Nj;var Xj=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),Lj=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Xj(e,t),e.prototype.templateInput=function(t){return''},e.prototype.init=function(){var t=this.model;this.listenTo(t,'change:unit',this.onValueChange),this.listenTo(t,'change:units',this.render)},e.prototype.setValue=function(t){},e.prototype.onRender=function(){var t=this,e=t.ppfx,n=t.model,o=t.el;if(!this.inputInst){var i=n.input;i.ppfx=e,i.render(),o.querySelector(".".concat(e,"fields")).appendChild(i.el),this.input=i.inputEl.get(0),this.inputInst=i}},e.prototype.clearCached=function(){Oj.prototype.clearCached.apply(this,arguments),this.inputInst=null},e}(Oj);const Yj=Lj;var zj=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),qj=function(t){function e(e){void 0===e&&(e={});var n=t.call(this,e)||this,o=e.ppfx||'';return n.opts=e,n.ppfx=o,n.em=e.target||{},!e.onChange&&n.listenTo(n.model,'change:value',n.handleModelChange),n}return zj(e,t),e.prototype.template=function(){return"")},e.prototype.inputClass=function(){return"".concat(this.ppfx,"field")},e.prototype.holderClass=function(){return"".concat(this.ppfx,"input-holder")},e.prototype.elementUpdated=function(){this.model.trigger('el:change')},e.prototype.setValue=function(t,e){var n=this.model,o=t||n.get('defaults'),i=this.getInputEl();i&&(i.value=o)},e.prototype.handleModelChange=function(t,e,n){this.setValue(e,n)},e.prototype.handleChange=function(t){t.stopPropagation();var e=this.getInputEl().value;this.__onInputChange(e),this.elementUpdated()},e.prototype.__onInputChange=function(t){this.model.set({value:t},{fromInput:1})},e.prototype.getInputEl=function(){if(!this.inputEl){var t=this.model,e=this.opts.type||'text',n=t.get('placeholder')||t.get('defaults')||t.get('default')||'';this.inputEl=(0,l["default"])(""))}return this.inputEl.get(0)},e.prototype.render=function(){this.inputEl=null;var t=this.$el;return t.addClass(this.inputClass()),t.html(this.template()),t.find(".".concat(this.holderClass())).append(this.getInputEl()),this},e}(u.G7);const Uj=qj;qj.prototype.events={change:'handleChange'};var Bj=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),Fj=void 0&&(void 0).__assign||function(){return Fj=Object.assign||function(t){for(var e,n=1,o=arguments.length;n\n
\n
\n
\n
\n
\n ")},n.prototype.inputClass=function(){var t=this.ppfx;return"".concat(t,"field ").concat(t,"field-color")},n.prototype.holderClass=function(){return"".concat(this.ppfx,"input-holder")},n.prototype.remove=function(){return e.prototype.remove.call(this),this.colorEl.spectrum('destroy'),this},n.prototype.handleChange=function(e){e.stopPropagation();var n=e.target.value;(0,t.isUndefined)(n)||this.__onInputChange(n)},n.prototype.__onInputChange=function(t){var e=this.model,n=this.opts.onChange,o=t,i=this.getColorEl();if(i){i.spectrum('set',o);var r=i.spectrum('get'),s=o&&Gj(r);s&&(o=s)}n?n(o):e.set({value:o},{fromInput:1})},n.prototype.setValue=function(e,n){void 0===n&&(n={});var o=this.model,i=(0,t.isUndefined)(n.def)?o.get('defaults'):n.def,r=(0,t.isUndefined)(e)?(0,t.isUndefined)(i)?'':i:e,s=this.getInputEl(),a=this.getColorEl(),l='none'!=r?r:'';s.value=r,a.get(0).style.backgroundColor=l,(n.fromTarget||n.fromInput&&!n.avoidStore)&&(a.spectrum('set',l),this.noneColor='none'==r,this.movedColor=l)},n.prototype.getColorEl=function(){var t=this;if(!this.colorEl){var e=this,n=e.em,o=e.model,i=e.opts,r=this.ppfx,s=i.onChange,a=(0,l["default"])("
")),c=a.get(0).style,u=n&&n.config?n.config.el:'',h=n&&n.getConfig&&n.getConfig().colorPicker||{};this.movedColor='';var p,d=!1;this.$el.find('[data-colorp-c]').append(a);var f=function(t,e){void 0===e&&(e=!0),s?s(t,!e):(e&&o.setValueFromInput(0,!1),o.setValueFromInput(t,e))};a.spectrum(Fj(Fj(Fj({color:o.getValue()||!1,containerClassName:"".concat(r,"one-bg ").concat(r,"two-color"),appendTo:u||'body',maxSelectionSize:8,showPalette:!0,showAlpha:!0,chooseText:'Ok',cancelText:'⨯',palette:[]},h),o.get('colorPicker')||{}),{move:function(e){var n=Gj(e);t.movedColor=n,c.backgroundColor=n,f(n,!1)},change:function(e){d=!0;var n=Gj(e);c.backgroundColor=n,f(n),t.noneColor=!1},show:function(e){d=!1,t.movedColor='',p=s?o.getValue({noDefault:!0}):Gj(e)},hide:function(){d||!p&&!s||(t.noneColor&&(p=''),c.backgroundColor=p,a.spectrum('set',p),f(p,!1))}})),n&&n.on&&this.listenTo(n,'component:selected',(function(){t.movedColor&&f(t.movedColor),d=!0,t.movedColor='',a.spectrum('hide')})),this.colorEl=a}return this.colorEl},n.prototype.render=function(){return Uj.prototype.render.call(this),this.getColorEl(),this},n}(Uj);const Kj=Hj;var Jj=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),tR=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Jj(e,t),e.prototype.setValue=function(t){var e;null===(e=this.inputInst)||void 0===e||e.setValue(t,{fromTarget:1,def:this.model.getDefaultValue()})},e.prototype.remove=function(){var t=this;Yj.prototype.remove.apply(this,arguments);var e=this.inputInst;return e&&e.remove&&e.remove(),['inputInst','$color'].forEach((function(e){return t[e]=null})),this},e.prototype.__handleChange=function(t,e){this.model.upValue(t,{partial:e})},e.prototype.onRender=function(){var t;if(!this.inputInst){this.__handleChange=this.__handleChange.bind(this);var e=this,n=e.ppfx,o=e.model,i=e.em,r=e.el,s=new Kj({target:i,model:o,ppfx:n,onChange:this.__handleChange}).render();r.querySelector(".".concat(n,"fields")).appendChild(s.el),this.input=null===(t=s.inputEl)||void 0===t?void 0:t.get(0),this.inputInst=s}},e}(Yj);const eR=tR;var nR=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),oR=void 0&&(void 0).__assign||function(){return oR=Object.assign||function(t){for(var e,n=1,o=arguments.length;n\n \n
\n
\n
\n \n ")},e.prototype.updateOptions=function(){delete this.input,this.onRender()},e.prototype.onRender=function(){var t=this.pfx,e=this.model,n=e.getOptions();if(!this.input){var o=[];n.forEach((function(t){var n=e.getOptionId(t),i=e.getOptionLabel(n),r=t.style?t.style.replace(/"/g,'"'):'',s=r?"style=\"".concat(r,"\""):'',a=n.replace(/"/g,'"');o.push(""))}));var i=this.el.querySelector("#".concat(t,"input-holder"));i.innerHTML=""),this.input=i.firstChild}},e.prototype.__setValueInput=function(t){var e=this.model,n=this.getInputEl(),o=e.getOptions()[0],i=o?e.getOptionId(o):'';n&&(n.value=t||i)},e}(Oj);const cR=lR;var uR=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),hR=void 0&&(void 0).__assign||function(){return hR=Object.assign||function(t){for(var e,n=1,o=arguments.length;n")},e.prototype.onRender=function(){var t=this.pfx,e=this.ppfx,n=this.model,o="".concat(e,"radio-item-label"),i=n.getName(),r=n.getOptions(),s="".concat(t,"radio ").concat(t,"radio-").concat(i),a=n.cid;if(!this.input){var l=[];r.forEach((function(r){var c=r.className?"".concat(r.className," ").concat(t,"icon ").concat(o):'',u=n.getOptionId(r),h="".concat(i,"-").concat(u,"-").concat(a),p=c?'':n.getOptionLabel(u),d=r.title?"title=\"".concat(r.title,"\""):'',f=n.getValue()===u?'checked':'';l.push("\n
\n \n \n
\n "))}));var c=this.el.querySelector(".".concat(e,"field"));c.innerHTML="
").concat(l.join(''),"
"),this.input=c.firstChild}},e.prototype.__setValueInput=function(t){var e,n=this.model,o=t||n.getDefaultValue(),i=null===(e=this.getInputEl())||void 0===e?void 0:e.querySelector("[value=\"".concat(o,"\"]"));i&&(i.checked=!0)},e}(cR);const gR=fR;var mR=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),vR=function(e){function n(n){void 0===n&&(n={});var o=e.call(this,n)||this;return(0,t.bindAll)(o,'moveIncrement','upIncrement'),o.doc=document,o.listenTo(o.model,'change:unit',o.handleModelChange),o}return mR(n,e),n.prototype.template=function(){var t=this.ppfx;return"\n \n \n
\n
\n
\n
\n ")},n.prototype.inputClass=function(){var t=this.ppfx;return this.opts.contClass||"".concat(t,"field ").concat(t,"field-integer")},n.prototype.setValue=function(t,e){var n=e||{},o=this.validateInputValue(t,{deepCheck:1}),i={value:o.value,unit:''};(o.unit||o.force)&&(i.unit=o.unit),this.model.set(i,n),n.silent&&this.handleModelChange()},n.prototype.handleChange=function(t){t.stopPropagation(),this.setValue(this.getInputEl().value),this.elementUpdated()},n.prototype.handleUnitChange=function(t){t.stopPropagation();var e=this.getUnitEl().value;this.model.set('unit',e),this.elementUpdated()},n.prototype.handleKeyDown=function(t){'ArrowUp'===t.key&&(t.preventDefault(),this.upArrowClick()),'ArrowDown'===t.key&&(t.preventDefault(),this.downArrowClick())},n.prototype.elementUpdated=function(){this.model.trigger('el:change')},n.prototype.handleModelChange=function(){var t=this.model;this.getInputEl().value=t.get('value');var e=this.getUnitEl();e&&(e.value=t.get('unit')||'')},n.prototype.getUnitEl=function(){if(!this.unitEl){var t=this.model,e=t.get('units')||[];if(e.length){var n=[''];e.forEach((function(e){var o=e==t.get('unit')?'selected':'';n.push(""))}));var o=document.createElement('div');o.innerHTML=""),this.unitEl=o.firstChild}}return this.unitEl},n.prototype.upArrowClick=function(){var t=this.model,e=t.get('step'),n=parseFloat(t.get('value'));this.setValue(this.normalizeValue(n+e)),this.elementUpdated()},n.prototype.downArrowClick=function(){var t=this.model,e=t.get('step'),n=parseFloat(t.get('value'));this.setValue(this.normalizeValue(n-e)),this.elementUpdated()},n.prototype.downIncrement=function(t){t.preventDefault(),this.moved=!1;var e=this.model.get('value')||0;e=this.normalizeValue(e),this.current={y:t.pageY,val:e},(0,ue.on)(this.doc,'mousemove',this.moveIncrement),(0,ue.on)(this.doc,'mouseup',this.upIncrement)},n.prototype.moveIncrement=function(t){this.moved=!0;var e=this.model,n=e.get('step'),o=this.current,i=this.normalizeValue(o.val+(o.y-t.pageY)*n),r=this.validateInputValue(i),s=r.value,a=r.unit;return this.prValue=s,e.set({value:s,unit:a},{avoidStore:1}),!1},n.prototype.upIncrement=function(){var t=this.model,e=t.get('step');if((0,ue.S1)(this.doc,'mouseup',this.upIncrement),(0,ue.S1)(this.doc,'mousemove',this.moveIncrement),this.prValue&&this.moved){var n=this.prValue-e;t.set('value',n,{avoidStore:1}).set('value',n+e),this.elementUpdated()}},n.prototype.normalizeValue=function(t,e){void 0===e&&(e=0);var n=this.model.get('step'),o=0;if(isNaN(t))return e;if(t=parseFloat(t),Math.floor(t)!==t){var i=n.toString().split('.')[1];o=i?i.length:0}return o?parseFloat(t.toFixed(o)):t},n.prototype.validateInputValue=function(e,n){void 0===n&&(n={});var o=0,i=n||{},r=this.model,s='',a=(0,t.isUndefined)(e)?s:e,l=n.units||r.get('units')||[],c=r.get('unit')||l.length&&l[0]||'',u=(0,t.isUndefined)(n.max)?r.get('max'):n.max,h=(0,t.isUndefined)(n.min)?r.get('min'):n.min,p=!!r.get('limitlessMax'),d=!!r.get('limitlessMin');if(i.deepCheck){var f=r.get('fixedValues')||[];if(''===a&&(c=''),a){var g=new RegExp('^'+f.join('|'),'g');if(f.length&&g.test(a))a=a.match(g)[0],c='',o=1;else{var m=a+'';a+='',a=parseFloat(a.replace(',','.')),a=isNaN(a)?s:a;var v=m.replace(a,'');(0,t.indexOf)(l,v)>=0&&(c=v)}}}return p||(0,t.isUndefined)(u)||''===u||(a=a>u?u:a),d||(0,t.isUndefined)(h)||''===h||(a=a\n \n \n ")},e.prototype.getSliderEl=function(){return this.slider||(this.slider=this.el.querySelector('input[type=range]')),this.slider},e.prototype.inputValueChanged=function(t){t.stopPropagation(),this.model.upValue(this.getSliderEl().value)},e.prototype.inputValueChangedSoft=function(t){t.stopPropagation(),this.model.upValue(this.getSliderEl().value,{partial:!0})},e.prototype.setValue=function(t){var e=this.model,n=e.parseValue(t);this.getSliderEl().value=''===t?e.getDefaultValue():parseFloat(n.value),Yj.prototype.setValue.apply(this,arguments)},e.prototype.onRender=function(){Yj.prototype.onRender.apply(this,arguments),this.model.get('showInput')||(this.inputInst.el.style.display='none')},e.prototype.clearCached=function(){Yj.prototype.clearCached.apply(this,arguments),delete this.slider},e}(Yj);const ER=u.FE.extend(QE).extend({extendViewApi:1,init:function(){var t=this.opts,e=this.em,n=t.module||(null==e?void 0:e.get('StyleManager'));n&&(n.__listenAdd(this,n.events.propertyAdd),n.__listenRemove(this,n.events.propertyRemove))},types:[{id:'stack',model:dj,view:Vj,isType:function(t){if(t&&'stack'==t.type)return t}},{id:'composite',model:sj,view:Cj,isType:function(t){if(t&&'composite'==t.type)return t}},{id:'file',model:U$,view:Wj,isType:function(t){if(t&&'file'==t.type)return t}},{id:'color',model:U$,view:eR,isType:function(t){if(t&&'color'==t.type)return t}},{id:'select',model:sR,view:cR,isType:function(t){if(t&&'select'==t.type)return t}},{id:'radio',model:pR,view:gR,isType:function(t){if(t&&'radio'==t.type)return t}},{id:'slider',model:kR,view:TR,isType:function(t){if(t&&'slider'==t.type)return t}},{id:'integer',model:wR,view:Yj,isType:function(t){if(t&&'integer'==t.type)return t}},{id:'number',model:wR,view:Yj,isType:function(t){if(t&&'number'==t.type)return t}},{id:'base',model:U$,view:Oj,isType:function(t){return t.type='base',t}}]});var QR=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),AR=void 0&&(void 0).__assign||function(){return AR=Object.assign||function(t){for(var e,n=1,o=arguments.length;n\n
$","
\n
","
\n \n "],["\n
\n
$","
\n
","
\n
\n "])),a,a,s,a,o)},e.prototype.events=function(){return{'click [data-sector-title]':'toggle'}},e.prototype.updateOpen=function(){var t=this,e=t.$el,n=t.model,o=t.pfx,i=n.isOpen();e[i?'addClass':'removeClass']("".concat(o,"open")),this.getPropertiesEl().style.display=i?'':'none'},e.prototype.updateVisibility=function(){this.el.style.display=this.model.isVisible()?'':'none'},e.prototype.getPropertiesEl=function(){var t=this.$el,e=this.pfx;return t.find(".".concat(e,"properties")).get(0)},e.prototype.toggle=function(){var t=this.model;t.setOpen(!t.get('open'))},e.prototype.renderProperties=function(){var t=this.model,e=this.config,n=t.get('properties');if(n){var o=new xj({collection:n,config:e});this.$el.append(o.render().el)}},e.prototype.render=function(){var t=this,e=t.pfx,n=t.model,o=t.$el,i=n.getId(),r=n.getName();return o.html(this.template({pfx:e,label:r})),this.renderProperties(),o.attr('class',"".concat(e,"sector ").concat(e,"sector__").concat(i," no-select")),this.updateOpen(),this},e}(u.G7);const BR=UR;var FR,GR=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),HR=function(t){function e(e){void 0===e&&(e={});var n=t.call(this,e)||this,o=e.module,i=e.config,r=n.collection;return n.pfx=(null==i?void 0:i.stylePrefix)||'',n.ppfx=(null==i?void 0:i.pStylePrefix)||'',n.config=i,n.module=o,n.listenTo(r,'add',n.addTo),n.listenTo(r,'reset',n.render),n}return GR(e,t),e.prototype.remove=function(){var t=this;return u.G7.prototype.remove.apply(this,arguments),['config','module','em'].forEach((function(e){return t[e]={}})),this},e.prototype.addTo=function(t,e,n){void 0===n&&(n={}),this.addToCollection(t,null,n)},e.prototype.addToCollection=function(t,e,n){void 0===n&&(n={});var o=this.config,i=this.el,r=e||i,s=new BR({model:t,config:o}).render().el;return(0,ue.$Q)(r,s,n.at),s},e.prototype.render=function(){var t=this,e=this,n=e.$el,o=e.pfx,i=e.ppfx;n.empty();var r=document.createDocumentFragment();return this.collection.each((function(e){return t.addToCollection(e,r)})),n.append(r),n.addClass("".concat(o,"sectors ").concat(i,"one-bg ").concat(i,"two-color")),this},e}(u.G7);const KR=HR;var JR=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),tZ=void 0&&(void 0).__assign||function(){return tZ=Object.assign||function(t){for(var e,n=1,o=arguments.length;n=0}))}))};h?(d=c.getRules("#".concat(h.getId())),g=(f=l?m(l.getSelectors().getFullName(p)):[]).concat(d)):(d=l?c.getRules("#".concat(l.getId())):[],f=m(e.getSelectors().getFullName(p)),g=d.concat(f));var v=g.filter((function(e){return(0,t.isUndefined)(i)?1:e.get('state')===i})).sort(u.sortRules).reverse();a=v.slice(v.indexOf(e)+1)}return a},o.prototype.addType=function(t,e){this.properties.addType(t,e)},o.prototype.getType=function(t){return this.properties.getType(t)},o.prototype.getTypes=function(){return this.properties.getTypes()},o.prototype.createType=function(t,e){var n=void 0===e?{}:e,o=n.model,i=void 0===o?{}:o,r=n.view,s=void 0===r?{}:r,a=this.config,l=this.getType(t);if(l)return new l.view(tZ({model:new l.model(i),config:a},s))},o.prototype.render=function(){var t=this,e=t.config,n=t.em,o=t.SectView,i=o&&o.el;return this.SectView=new KR({el:i,em:n,config:e,module:this,collection:this.sectors}),this.SectView.render().el},o.prototype._logNoSector=function(t){var e=this.em;e&&e.logWarning("'".concat(t,"' sector not found"))},o.prototype.__emitCmpStyleUpdate=function(t,e){void 0===e&&(e={});var n=this.em;if(!t.__p){var o=this.getSelectedAll(),i=e.components||n.getSelectedAll(),r=Array.isArray(i)?i:[i],s=tZ({},t);delete s.__p,r.forEach((function(t){return!o.includes(t)&&t.__onStyleChange(s)}))}},o.prototype.__upProps=function(t){var e=this;void 0===t&&(t={});var n=this.getSelected();if(n){var o=this.sectors,i=this.model.get('component'),r=this.getSelectedParents(),s=n.getStyle(),a=r.map((function(t){return{target:t,style:t.getStyle()}}));o.map((function(n){n.getProperties().map((function(n){e.__upProp(n,s,a,t)}))})),o.forEach((function(t){var e=t.getProperties();e.forEach((function(t){var e=t.__checkVisibility({target:n,component:i,sectors:o});t.set('visible',e)}));var r=e.some((function(t){return t.isVisible()}));t.set('visible',r)}))}},o.prototype.__upProp=function(t,e,n,o){var i=this,r=t.getName(),s=e[r],a=gZ(s),l='stack'===t.getType(),c='composite'===t.getType(),u=tZ(tZ({},o),{__up:!0}),h=!c&&!l,p=l?t.__getLayersFromStyle(e):[],d=c?t.__getPropsFromStyle(e):{},f=a?s:null,g=null;if(l&&null===p||c&&null===d){var m=l?'__getLayersFromStyle':'__getPropsFromStyle';if(y=n.filter((function(e){return null!==t[m](e.style)}))[0]){f=y.style[r],g=y.target;var v=t[m](y.style);l?p=v:d=v}}else if(!a){var y;f=null,(y=n.filter((function(t){return gZ(t.style[r])}))[0])&&(f=y.style[r],g=y.target)}if(t.__setParentTarget(g),h&&t.__getFullValue()!==f&&t.upValue(f,u),l&&t.__setLayers(p||[]),c){var _=t.getProperties();if(t.isDetached()){var O=t.__getPropsFromStyle(e,{byName:!0})||{},b=n.map((function(e){return tZ(tZ({},e),{style:t.__getPropsFromStyle(e.style,{byName:!0})||{}})}));_.map((function(t){return i.__upProp(t,O,b,o)}))}else t.__setProperties(d||{},u),t.getProperties().map((function(t){return t.__setParentTarget(g)}))}},o.prototype.destroy=function(){var t;[this.properties,this.sectors].forEach((function(t){t.reset(),t.stopListening()})),null===(t=this.SectView)||void 0===t||t.remove(),this.model.stopListening(),this.upAll.cancel()},o}(O);const yZ=vZ;var _Z=void 0&&(void 0).__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),OZ=void 0&&(void 0).__assign||function(){return OZ=Object.assign||function(t){for(var e,n=1,o=arguments.length;n0&&i[i.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]=i.getStepsBeforeSave()&&this.store().catch((function(t){return o.logError(t)}))},o.prototype.loadModule=function(t){var e=new t(this);return this.set(e.name,e),e.onLoad&&this.toLoad.push(e),this.modules.push(e),e},o.prototype.loadStorableModule=function(t){var e=this.loadModule(t);return this.storables.push(e),e},o.prototype.init=function(t,e){void 0===e&&(e={}),this.destroyed&&(this.initialize(e),this.destroyed=!1),this.set('Editor',t)},o.prototype.getEditor=function(){return this.get('Editor')},o.prototype.handleUpdates=function(t,e,n){var o=this;void 0===n&&(n={}),this.__skip||n.temporary||n.noCount||n.avoidStore||!this.get('ready')||(this.timedInterval&&clearTimeout(this.timedInterval),this.timedInterval=setTimeout((function(){var t=o.getDirtyCount()||0,e=(n.unset,xZ(n,["unset"]));o.set('changesCount',t+1,e)}),0))},o.prototype.changesUp=function(t){this.handleUpdates(0,0,t)},o.prototype.componentHovered=function(t,e,n){var o=this.previous('componentHovered');o&&this.trigger('component:unhovered',o,n),e&&this.trigger('component:hovered',e,n)},o.prototype.getSelected=function(){return this.selected.lastComponent()},o.prototype.getSelectedAll=function(){return this.selected.allComponents()},o.prototype.setSelected=function(e,n){var o=this;void 0===n&&(n={});var i=n.event,r=i&&(i.ctrlKey||i.metaKey),s=(i||{}).shiftKey,a=((0,t.isArray)(e)?e:[e]).map((function(t){var e,n;return(null===(n=null===(e=null==t?void 0:t.delegate)||void 0===e?void 0:e.select)||void 0===n?void 0:n.call(e,t))||t})).filter(Boolean),l=this.getSelectedAll(),c=this.getConfig().multipleSelection,u=(0,t.isArray)(e);u&&this.removeSelected(l.filter((function(e){return!(0,t.contains)(a,e)}))),a.forEach((function(e){if(e&&(o.trigger('component:select:before',e,n),!e.get('selectable')||n.abort)){if(!n.useValid)return;for(var i=e.parent();i&&!i.get('selectable');)i=i.parent();e=i}if(r&&c)return o.toggleSelected(e);if(s&&c){o.clearSelection(o.Canvas.getWindow());var a,h,p=e.collection,d=e.index();if(o.getSelectedAll().forEach((function(e){var n=e.collection,o=e.index();n===p&&(od&&(h=(0,t.isUndefined)(h)?o:Math.min(h,o)))})),!(0,t.isUndefined)(a))for(;a!==d;)o.addSelected(p.at(a)),a++;if(!(0,t.isUndefined)(h))for(;h!==d;)o.addSelected(p.at(h)),h--;return o.addSelected(e)}!u&&o.removeSelected(l.filter((function(t){return t!==e}))),o.addSelected(e,n)}))},o.prototype.addSelected=function(e,n){var o=this;void 0===n&&(n={}),((0,t.isArray)(e)?e:[e]).forEach((function(e){var i=o.selected;e&&e.get('selectable')&&!e.parents().some((function(t){return i.hasComponent(t)}))&&(n.forceChange&&o.removeSelected(e,n),i.allComponents().filter((function(n){return(0,t.contains)(n.parents(),e)})).forEach((function(t){return o.removeSelected(t,n)})),i.addComponent(e,n),o.trigger('component:select',e,n),o.Canvas.addSpot({type:We.q.Select,component:e}))}))},o.prototype.removeSelected=function(e,n){var o=this;void 0===n&&(n={}),this.selected.removeComponent(e,n),((0,t.isArray)(e)?e:[e]).forEach((function(t){return o.Canvas.removeSpots({type:We.q.Select,component:t})}))},o.prototype.toggleSelected=function(e,n){var o=this;void 0===n&&(n={}),((0,t.isArray)(e)?e:[e]).forEach((function(t){o.selected.hasComponent(t)?o.removeSelected(t,n):o.addSelected(t,n)}))},o.prototype.setHovered=function(t,e){var n=this;void 0===e&&(e={});var o=function(t,e){var o=n,i=o.config,r=o.Canvas,s=n.getHovered(),a=n.getSelectedAll(),l=We.q.Hover,c=We.q.Spacing;n.set('componentHovered',t||null,e),s&&(r.removeSpots({type:l,component:s}),r.removeSpots({type:c,component:s})),t&&(r.addSpot({type:l,component:t}),a.includes(t)&&!i.showOffsetsSelected||r.addSpot({type:c,component:t}))};if(!t)return o();var i='component:hover';if(e.forceChange&&o(),this.trigger("".concat(i,":before"),t,e),!t.get('hoverable')){if(!e.useValid||e.abort)return;for(var r=t.parent();r&&!r.get('hoverable');)r=r.parent();t=r}e.abort||(o(t,e),this.trigger(i,t,e))},o.prototype.getHovered=function(){return this.get('componentHovered')},o.prototype.setComponents=function(t,e){return void 0===e&&(e={}),this.Components.setComponents(t,e)},o.prototype.getComponents=function(){var t=this.Components,e=this.CodeManager;if(t&&e){var n=t.getComponents();return e.getCode(n,'json')}},o.prototype.setStyle=function(t,e){void 0===e&&(e={});var n=this.Css;return n.clear(e),n.getAll().add(t,e),this},o.prototype.addStyle=function(e,n){void 0===n&&(n={});var o=this.getStyle().add(e,n);return(0,t.isArray)(o)?o:[o]},o.prototype.getStyle=function(){return this.Css.getAll()},o.prototype.setState=function(t){return this.set('state',t),this},o.prototype.getState=function(){return this.get('state')||''},o.prototype.getHtml=function(t){void 0===t&&(t={});var e=this.config,n=e.optsHtml,o=e.jsInHtml?this.getJs(t):'',i=t.component||this.Components.getComponent(),r=i?this.CodeManager.getCode(i,'html',OZ(OZ({},n),t)):'';return r+=o?"` : '';\n return html;\n }\n\n /**\n * Returns CSS built inside canvas\n * @param {Object} [opts={}] Options\n * @returns {string} CSS string\n * @public\n */\n getCss(opts: { component?: Component; avoidProtected?: boolean } & CssGeneratorBuildOptions = {}) {\n const { config } = this;\n const { optsCss } = config;\n const avoidProt = opts.avoidProtected;\n const keepUnusedStyles = !isUndefined(opts.keepUnusedStyles) ? opts.keepUnusedStyles : config.keepUnusedStyles;\n const cssc = this.Css;\n const wrp = opts.component || this.Components.getComponent();\n const protCss = !avoidProt ? config.protectedCss! : '';\n const css =\n wrp &&\n this.CodeManager.getCode(wrp, 'css', {\n cssc,\n keepUnusedStyles,\n ...optsCss,\n ...opts,\n });\n return wrp ? (opts.json ? css : protCss + css) : '';\n }\n\n /**\n * Returns JS of all components\n * @return {string} JS string\n * @public\n */\n getJs(opts: { component?: Component } = {}) {\n var wrp = opts.component || this.Components.getWrapper();\n return wrp ? this.CodeManager.getCode(wrp, 'js').trim() : '';\n }\n\n /**\n * Store data to the current storage.\n * @public\n */\n async store(options?: T) {\n const data = this.storeData();\n await this.Storage.store(data, options);\n this.clearDirtyCount();\n return data;\n }\n\n /**\n * Load data from the current storage.\n * @public\n */\n async load(options?: T, loadOptions: EditorLoadOptions = {}) {\n const result = await this.Storage.load(options);\n this.loadData(result);\n // Wait in order to properly update the dirty counter (#5385)\n await wait();\n\n if (loadOptions.clear) {\n this.UndoManager.clear();\n this.clearDirtyCount();\n }\n\n return result;\n }\n\n storeData(): ProjectData {\n let result = {};\n // Sync content if there is an active RTE\n const editingCmp = this.getEditing();\n editingCmp && editingCmp.trigger('sync:content', { noCount: true });\n\n this.storables.forEach(m => {\n result = { ...result, ...m.store(1) };\n });\n return JSON.parse(JSON.stringify(result));\n }\n\n loadData(data: ProjectData = {}): ProjectData {\n if (!isEmptyObj(data)) {\n this.storables.forEach(module => module.clear());\n this.storables.forEach(module => module.load(data));\n }\n return data;\n }\n\n /**\n * Returns device model by name\n * @return {Device|null}\n * @private\n */\n getDeviceModel() {\n const name = this.get('device');\n return this.Devices.get(name);\n }\n\n /**\n * Run default command if setted\n * @param {Object} [opts={}] Options\n * @private\n */\n runDefault(opts = {}) {\n const command = this.get('Commands').get(this.config.defaultCommand);\n if (!command || this.defaultRunning) return;\n command.stop(this, this, opts);\n command.run(this, this, opts);\n this.defaultRunning = true;\n }\n\n /**\n * Stop default command\n * @param {Object} [opts={}] Options\n * @private\n */\n stopDefault(opts = {}) {\n const commands = this.get('Commands');\n const command = commands.get(this.config.defaultCommand);\n if (!command || !this.defaultRunning) return;\n command.stop(this, this, opts);\n this.defaultRunning = false;\n }\n\n /**\n * Update canvas dimensions and refresh data useful for tools positioning\n * @public\n */\n refreshCanvas(opts: any = {}) {\n this.set('canvasOffset', null);\n this.set('canvasOffset', this.Canvas.getOffset());\n opts.tools && this.trigger('canvas:updateTools');\n }\n\n /**\n * Clear all selected stuf inside the window, sometimes is useful to call before\n * doing some dragging opearation\n * @param {Window} win If not passed the current one will be used\n * @private\n */\n clearSelection(win?: Window) {\n var w = win || window;\n w.getSelection()?.removeAllRanges();\n }\n\n /**\n * Get the current media text\n * @return {string}\n */\n getCurrentMedia() {\n const config = this.config;\n const device = this.getDeviceModel();\n const condition = config.mediaCondition;\n const preview = config.devicePreviewMode;\n const width = device && device.get('widthMedia');\n return device && width && !preview ? `(${condition}: ${width})` : '';\n }\n\n /**\n * Return the component wrapper\n * @return {Component}\n */\n getWrapper(): ComponentWrapper | undefined {\n return this.Components.getWrapper();\n }\n\n setCurrentFrame(frameView?: FrameView) {\n return this.set('currentFrame', frameView);\n }\n\n getCurrentFrame(): FrameView | undefined {\n return this.get('currentFrame');\n }\n\n getCurrentFrameModel() {\n return (this.getCurrentFrame() || {})?.model;\n }\n\n getIcon(icon: string) {\n const icons = this.config.icons || {};\n return icons[icon] || '';\n }\n\n /**\n * Return the count of changes made to the content and not yet stored.\n * This count resets at any `store()`\n * @return {number}\n */\n getDirtyCount(): number {\n return this.get('changesCount');\n }\n\n clearDirtyCount() {\n return this.set({ changesCount: 0 }, { isClear: true });\n }\n\n getZoomDecimal() {\n return this.Canvas.getZoomDecimal();\n }\n\n getZoomMultiplier() {\n return this.Canvas.getZoomMultiplier();\n }\n\n setDragMode(value: DragMode) {\n return this.set('dmode', value);\n }\n\n getDragMode(component?: Component): DragMode {\n const mode = component?.getDragMode() || this.get('dmode');\n return mode || '';\n }\n\n t(...args: any[]) {\n const i18n = this.get('I18n');\n return i18n?.t(...args);\n }\n\n /**\n * Returns true if the editor is in absolute mode\n * @returns {Boolean}\n */\n inAbsoluteMode(component?: Component) {\n return this.getDragMode(component) === 'absolute';\n }\n\n /**\n * Destroy editor\n */\n destroyAll() {\n const { config, view } = this;\n const editor = this.getEditor();\n // @ts-ignore\n const { editors = [] } = config.grapesjs || {};\n const shallow = this.get('shallow');\n this._storageTimeout && clearTimeout(this._storageTimeout);\n shallow?.destroyAll();\n this.stopListening();\n this.stopDefault();\n this.modules\n .slice()\n .reverse()\n .forEach(mod => mod.destroy());\n view && view.remove();\n this.clear({ silent: true });\n this.destroyed = true;\n ['_config', 'view', '_previousAttributes', '_events', '_listeners'].forEach(\n //@ts-ignore\n i => (this[i] = {})\n );\n editors.splice(editors.indexOf(editor), 1);\n //@ts-ignore\n hasWin() && $(config.el).empty().attr(this.attrsOrig);\n }\n\n getEditing(): Component | undefined {\n const res = this.get('editing');\n return (res && res.model) || undefined;\n }\n\n setEditing(value: boolean | ComponentView) {\n this.set('editing', value);\n return this;\n }\n\n isEditing() {\n return !!this.get('editing');\n }\n\n log(msg: string, opts: any = {}) {\n const { ns, level = 'debug' } = opts;\n this.trigger('log', msg, opts);\n level && this.trigger(`log:${level}`, msg, opts);\n\n if (ns) {\n const logNs = `log-${ns}`;\n this.trigger(logNs, msg, opts);\n level && this.trigger(`${logNs}:${level}`, msg, opts);\n }\n }\n\n logInfo(msg: string, opts?: any) {\n this.log(msg, { ...opts, level: 'info' });\n }\n\n logWarning(msg: string, opts?: any) {\n this.log(msg, { ...opts, level: 'warning' });\n }\n\n logError(msg: string, opts?: any) {\n this.log(msg, { ...opts, level: 'error' });\n }\n\n initBaseColorPicker(el: any, opts = {}) {\n const { config } = this;\n const { colorPicker = {} } = config;\n const elToAppend = config.el;\n const ppfx = config.stylePrefix;\n\n //@ts-ignore\n return $(el).spectrum({\n containerClassName: `${ppfx}one-bg ${ppfx}two-color`,\n appendTo: elToAppend || 'body',\n maxSelectionSize: 8,\n showPalette: true,\n palette: [],\n showAlpha: true,\n chooseText: 'Ok',\n cancelText: '⨯',\n ...opts,\n ...colorPicker,\n });\n }\n\n /**\n * Execute actions without triggering the storage and undo manager.\n * @param {Function} clb\n * @private\n */\n skip(clb: Function) {\n this.__skip = true;\n const um = this.UndoManager;\n um ? um.skip(clb) : clb();\n this.__skip = false;\n }\n\n /**\n * Set/get data from the HTMLElement\n * @param {HTMLElement} el\n * @param {string} name Data name\n * @param {any} value Date value\n * @return {any}\n * @private\n */\n data(el: any, name: string, value: any) {\n const varName = '_gjs-data';\n\n if (!el[varName]) {\n el[varName] = {};\n }\n\n if (isUndefined(value)) {\n return el[varName][name];\n } else {\n el[varName][name] = value;\n }\n }\n}\n","import { isObject } from 'underscore';\n\nexport default ({ $ }: { $: any }) => {\n if ($ && $.prototype && $.prototype.constructor.name !== 'jQuery') {\n const fn = $.fn;\n\n // Additional helpers\n\n fn.hide = function () {\n return this.css('display', 'none');\n };\n\n fn.show = function () {\n return this.css('display', 'block');\n };\n\n fn.focus = function () {\n const el = this.get(0);\n el && el.focus();\n return this;\n };\n\n // For spectrum compatibility\n\n fn.bind = function (ev: any, h: any) {\n return this.on(ev, h);\n };\n\n fn.unbind = function (ev: any, h: any) {\n if (isObject(ev)) {\n for (let name in ev) {\n ev.hasOwnProperty(name) && this.off(name, ev[name]);\n }\n\n return this;\n } else {\n return this.off(ev, h);\n }\n };\n\n fn.click = function (h: any) {\n return h ? this.on('click', h) : this.trigger('click');\n };\n\n fn.change = function (h: any) {\n return h ? this.on('change', h) : this.trigger('change');\n };\n\n fn.keydown = function (h: any) {\n return h ? this.on('keydown', h) : this.trigger('keydown');\n };\n\n fn.delegate = function (selector: any, events: any, data: any, handler: any) {\n if (!handler) {\n handler = data;\n }\n\n return this.on(events, selector, function (e: any) {\n e.data = data;\n handler(e);\n });\n };\n\n fn.scrollLeft = function () {\n let el = this.get(0);\n el = el.nodeType == 9 ? el.defaultView : el;\n let win = el instanceof Window ? el : null;\n return win ? win.pageXOffset : el.scrollLeft || 0;\n };\n\n fn.scrollTop = function () {\n let el = this.get(0);\n el = el.nodeType == 9 ? el.defaultView : el;\n let win = el instanceof Window ? el : null;\n return win ? win.pageYOffset : el.scrollTop || 0;\n };\n\n const offset = $.prototype.offset;\n fn.offset = function (coords: any) {\n let top, left;\n\n if (coords) {\n top = coords.top;\n left = coords.left;\n }\n\n if (typeof top != 'undefined') {\n this.css('top', `${top}px`);\n }\n if (typeof left != 'undefined') {\n this.css('left', `${left}px`);\n }\n\n return offset.call(this);\n };\n\n $.map = function (items: any, clb: any) {\n const ar = [];\n\n for (var i = 0; i < items.length; i++) {\n ar.push(clb(items[i], i));\n }\n\n return ar;\n };\n\n const indexOf = Array.prototype.indexOf;\n\n $.inArray = function (val: any, arr: any, i: any) {\n return arr == null ? -1 : indexOf.call(arr, val, i);\n };\n\n $.Event = function (src: any, props: any) {\n if (!(this instanceof $.Event)) {\n return new $.Event(src, props);\n }\n\n this.type = src;\n this.isDefaultPrevented = () => false;\n };\n }\n};\n","import { View, $ } from '../../common';\nimport { appendStyles } from '../../utils/mixins';\nimport EditorModel from '../model/Editor';\n\nexport default class EditorView extends View {\n constructor(model: EditorModel) {\n super({ model });\n //const { model } = this;\n const { Panels, UndoManager } = model.attributes;\n model.view = this;\n model.once('change:ready', () => {\n Panels.active();\n Panels.disableButtons();\n UndoManager.clear();\n setTimeout(() => {\n model.trigger('load', model.get('Editor'));\n model.clearDirtyCount();\n });\n });\n }\n\n render() {\n const { $el, model } = this;\n const { Panels, Canvas } = model.attributes;\n const { config, modules } = model;\n const pfx = config.stylePrefix;\n const classNames = [`${pfx}editor`];\n !config.customUI && classNames.push(`${pfx}one-bg ${pfx}two-color`);\n\n // @ts-ignore\n const contEl = $(config.el || `body ${config.container}`);\n config.cssIcons && appendStyles(config.cssIcons, { unique: true, prepand: true });\n $el.empty();\n\n // @ts-ignore\n if (config.width) contEl.css('width', config.width);\n // @ts-ignore\n if (config.height) contEl.css('height', config.height);\n\n $el.append(Canvas.render());\n $el.append(Panels.render());\n\n // Load shallow editor\n const shallow = model.get('shallow');\n const shallowCanvasEl = shallow.get('Canvas').render();\n shallowCanvasEl.style.display = 'none';\n $el.append(shallowCanvasEl);\n\n $el.attr('class', classNames.join(' '));\n // @ts-ignore\n contEl.addClass(`${pfx}editor-cont`).empty().append($el);\n modules.forEach(md => md.postRender && md.postRender(this));\n\n return this;\n }\n}\n","/**\n * Editor contains the top level API which you'll probably use to customize the editor or extend it with plugins.\n * You get the Editor instance on init method and you can pass options via its [Configuration Object](https://github.com/GrapesJS/grapesjs/blob/master/src/editor/config/config.ts)\n *\n * ```js\n * const editor = grapesjs.init({\n * // options\n * });\n * ```\n *\n * ## Available Events\n *\n * You can make use of available events in this way\n * ```js\n * editor.on('EVENT-NAME', (some, argument) => {\n * // do something\n * })\n * ```\n *\n * * `update` - The structure of the template is updated (its HTML/CSS)\n * * `undo` - Undo executed\n * * `redo` - Redo executed\n * * `load` - Editor is loaded\n *\n * ### Components\n * Check the [Components](/api/components.html) module.\n * ### Keymaps\n * Check the [Keymaps](/api/keymaps.html) module.\n * ### Style Manager\n * Check the [Style Manager](/api/style_manager.html) module.\n * ### Storage\n * Check the [Storage](/api/storage_manager.html) module.\n * ### Canvas\n * Check the [Canvas](/api/canvas.html) module.\n * ### RTE\n * Check the [Rich Text Editor](/api/rich_text_editor.html) module.\n * ### Commands\n * Check the [Commands](/api/commands.html) module.\n * ### Selectors\n * Check the [Selectors](/api/selector_manager.html) module.\n * ### Blocks\n * Check the [Blocks](/api/block_manager.html) module.\n * ### Assets\n * Check the [Assets](/api/assets.html) module.\n * ### Modal\n * Check the [Modal](/api/modal_dialog.html) module.\n * ### Devices\n * Check the [Devices](/api/device_manager.html) module.\n * ### Parser\n * Check the [Parser](/api/parser.html) module.\n * ### Pages\n * Check the [Pages](/api/pages.html) module.\n *\n * ## Methods\n * @module docsjs.Editor\n */\nimport { IBaseModule } from '../abstract/Module';\nimport AssetManager, { AssetEvent } from '../asset_manager';\nimport BlockManager, { BlockEvent } from '../block_manager';\nimport CanvasModule, { CanvasEvent } from '../canvas';\nimport CodeManagerModule from '../code_manager';\nimport CommandsModule, { CommandEvent } from '../commands';\nimport { AddOptions, EventHandler, LiteralUnion } from '../common';\nimport CssComposer from '../css_composer';\nimport CssRule from '../css_composer/model/CssRule';\nimport CssRules from '../css_composer/model/CssRules';\nimport DeviceManager from '../device_manager';\nimport ComponentManager, { ComponentEvent } from '../dom_components';\nimport Component from '../dom_components/model/Component';\nimport Components from '../dom_components/model/Components';\nimport ComponentWrapper from '../dom_components/model/ComponentWrapper';\nimport { ComponentAdd, DragMode } from '../dom_components/model/types';\nimport I18nModule from '../i18n';\nimport KeymapsModule, { KeymapEvent } from '../keymaps';\nimport ModalModule, { ModalEvent } from '../modal_dialog';\nimport LayerManager from '../navigator';\nimport PageManager from '../pages';\nimport PanelManager from '../panels';\nimport ParserModule from '../parser';\nimport { CustomParserCss } from '../parser/config/config';\nimport RichTextEditorModule, { RichTextEditorEvent } from '../rich_text_editor';\nimport { CustomRTE } from '../rich_text_editor/config/config';\nimport SelectorManager, { SelectorEvent } from '../selector_manager';\nimport StorageManager, { StorageEvent, StorageOptions, ProjectData } from '../storage_manager';\nimport StyleManager, { StyleManagerEvent } from '../style_manager';\nimport TraitManager from '../trait_manager';\nimport UndoManagerModule from '../undo_manager';\nimport UtilsModule from '../utils';\nimport html from '../utils/html';\nimport defaults, { EditorConfig, EditorConfigKeys } from './config/config';\nimport EditorModel, { EditorLoadOptions } from './model/Editor';\nimport EditorView from './view/EditorView';\n\nexport type ParsedRule = {\n selectors: string;\n style: Record;\n atRule?: string;\n params?: string;\n};\n\ntype GeneralEvent = 'canvasScroll' | 'undo' | 'redo' | 'load' | 'update';\n\ntype EditorBuiltInEvents =\n | ComponentEvent\n | BlockEvent\n | AssetEvent\n | KeymapEvent\n | StyleManagerEvent\n | StorageEvent\n | CanvasEvent\n | SelectorEvent\n | RichTextEditorEvent\n | ModalEvent\n | CommandEvent\n | GeneralEvent;\n\ntype EditorEvent = LiteralUnion;\n\ntype EditorConfigType = EditorConfig & { pStylePrefix?: string };\n\ntype EditorModelParam = Parameters[N];\n\nexport type EditorParam = Parameters[N];\n\nexport default class Editor implements IBaseModule {\n editorView?: EditorView;\n editor: EditorModel;\n $: any;\n em: EditorModel;\n config: EditorConfigType;\n\n constructor(config: EditorConfig = {}, opts: any = {}) {\n this.config = {\n ...defaults,\n ...config,\n pStylePrefix: config.stylePrefix ?? defaults.stylePrefix,\n };\n this.em = new EditorModel(this.config);\n this.$ = opts.$;\n this.em.init(this);\n this.editor = this.em;\n }\n\n get Config() {\n return this.em.config;\n }\n get I18n(): I18nModule {\n return this.em.I18n;\n }\n get Utils(): UtilsModule {\n return this.em.Utils;\n }\n get Commands(): CommandsModule {\n return this.em.Commands;\n }\n get Keymaps(): KeymapsModule {\n return this.em.Keymaps;\n }\n get Modal(): ModalModule {\n return this.em.Modal;\n }\n get Panels(): PanelManager {\n return this.em.Panels;\n }\n get Canvas(): CanvasModule {\n return this.em.Canvas;\n }\n get Parser(): ParserModule {\n return this.em.Parser;\n }\n get CodeManager(): CodeManagerModule {\n return this.em.CodeManager;\n }\n get UndoManager(): UndoManagerModule {\n return this.em.UndoManager;\n }\n get RichTextEditor(): RichTextEditorModule {\n return this.em.RichTextEditor;\n }\n get Pages(): PageManager {\n return this.em.Pages;\n }\n get Components(): ComponentManager {\n return this.em.Components;\n }\n get DomComponents(): ComponentManager {\n return this.em.Components;\n }\n get Layers(): LayerManager {\n return this.em.Layers;\n }\n get LayerManager(): LayerManager {\n return this.em.Layers;\n }\n get Css(): CssComposer {\n return this.em.Css;\n }\n get CssComposer(): CssComposer {\n return this.em.Css;\n }\n get Storage(): StorageManager {\n return this.em.Storage;\n }\n get StorageManager(): StorageManager {\n return this.em.Storage;\n }\n get Assets(): AssetManager {\n return this.em.Assets;\n }\n get AssetManager(): AssetManager {\n return this.em.Assets;\n }\n get Blocks(): BlockManager {\n return this.em.Blocks;\n }\n get BlockManager(): BlockManager {\n return this.em.Blocks;\n }\n get Traits(): TraitManager {\n return this.em.Traits;\n }\n get TraitManager(): TraitManager {\n return this.em.Traits;\n }\n get Selectors(): SelectorManager {\n return this.em.Selectors;\n }\n get SelectorManager(): SelectorManager {\n return this.em.Selectors;\n }\n get Styles(): StyleManager {\n return this.em.Styles;\n }\n get StyleManager(): StyleManager {\n return this.em.Styles;\n }\n get Devices(): DeviceManager {\n return this.em.Devices;\n }\n get DeviceManager(): DeviceManager {\n return this.em.Devices;\n }\n\n get EditorModel() {\n return this.em;\n }\n\n /**\n * Returns configuration object\n * @returns {any} Returns the configuration object or the value of the specified property\n */\n getConfig<\n P extends EditorConfigKeys | undefined = undefined,\n R = P extends EditorConfigKeys ? EditorConfig[P] : EditorConfig\n >(prop?: P): R {\n return this.em.getConfig(prop);\n }\n\n /**\n * Returns HTML built inside canvas\n * @param {Object} [opts={}] Options\n * @param {Component} [opts.component] Return the HTML of a specific Component\n * @param {Boolean} [opts.cleanId=false] Remove unnecessary IDs (eg. those created automatically)\n * @returns {string} HTML string\n */\n getHtml(opts?: EditorModelParam<'getHtml', 0>) {\n return this.em.getHtml(opts);\n }\n\n /**\n * Returns CSS built inside canvas\n * @param {Object} [opts={}] Options\n * @param {Component} [opts.component] Return the CSS of a specific Component\n * @param {Boolean} [opts.json=false] Return an array of CssRules instead of the CSS string\n * @param {Boolean} [opts.avoidProtected=false] Don't include protected CSS\n * @param {Boolean} [opts.onlyMatched=false] Return only rules matched by the passed component.\n * @param {Boolean} [opts.keepUnusedStyles=false] Force keep all defined rules. Toggle on in case output looks different inside/outside of the editor.\n * @returns {String|Array} CSS string or array of CssRules\n */\n getCss(opts?: EditorModelParam<'getCss', 0>) {\n return this.em.getCss(opts);\n }\n\n /**\n * Returns JS of all components\n * @param {Object} [opts={}] Options\n * @param {Component} [opts.component] Get the JS of a specific component\n * @returns {String} JS string\n */\n getJs(opts?: EditorModelParam<'getJs', 0>) {\n return this.em.getJs(opts);\n }\n\n /**\n * Return the complete tree of components. Use `getWrapper` to include also the wrapper\n * @return {Components}\n */\n getComponents(): Components {\n return this.Components.getComponents();\n }\n\n /**\n * Return the wrapper and its all components\n * @return {Component}\n */\n getWrapper(): ComponentWrapper | undefined {\n return this.Components.getWrapper();\n }\n\n /**\n * Set components inside editor's canvas. This method overrides actual components\n * @param {Array|Object|string} components HTML string or components model\n * @param {Object} opt the options object to be used by the [setComponents]{@link em#setComponents} method\n * @return {this}\n * @example\n * editor.setComponents('
New component
');\n * // or\n * editor.setComponents({\n * type: 'text',\n * classes:['cls'],\n * content: 'New component'\n * });\n */\n setComponents(components: ComponentAdd, opt: AddOptions = {}) {\n this.em.setComponents(components, opt);\n return this;\n }\n\n /**\n * Add components\n * @param {Array|Object|string} components HTML string or components model\n * @param {Object} opts Options\n * @param {Boolean} [opts.avoidUpdateStyle=false] If the HTML string contains styles,\n * by default, they will be created and, if already exist, updated. When this option\n * is true, styles already created will not be updated.\n * @return {Array}\n * @example\n * editor.addComponents('
New component
');\n * // or\n * editor.addComponents({\n * type: 'text',\n * classes:['cls'],\n * content: 'New component'\n * });\n */\n addComponents(components: ComponentAdd, opts?: AddOptions): Component[] {\n return this.getWrapper()!.append(components, opts);\n }\n\n /**\n * Returns style in JSON format object\n * @return {Object}\n */\n getStyle(): CssRules {\n return this.em.Css.getAll();\n }\n\n /**\n * Set style inside editor's canvas. This method overrides actual style\n * @param {Array|Object|string} style CSS string or style model\n * @return {this}\n * @example\n * editor.setStyle('.cls{color: red}');\n * //or\n * editor.setStyle({\n * selectors: ['cls'],\n * style: { color: 'red' }\n * });\n */\n setStyle(style: any, opt: any = {}) {\n this.em.setStyle(style, opt);\n return this;\n }\n\n /**\n * Add styles to the editor\n * @param {Array|Object|string} style CSS string or style model\n * @returns {Array} Array of created CssRule instances\n * @example\n * editor.addStyle('.cls{color: red}');\n */\n addStyle(style: any, opts = {}): CssRule[] {\n return this.em.addStyle(style, opts);\n }\n\n /**\n * Returns the last selected component, if there is one\n * @return {Model}\n */\n getSelected() {\n return this.em.getSelected();\n }\n\n /**\n * Returns an array of all selected components\n * @return {Array}\n */\n getSelectedAll() {\n return this.em.getSelectedAll();\n }\n\n /**\n * Get a stylable entity from the selected component.\n * If you select a component without classes the entity is the Component\n * itself and all changes will go inside its 'style' attribute. Otherwise,\n * if the selected component has one or more classes, the function will\n * return the corresponding CSS Rule\n * @return {Model}\n */\n getSelectedToStyle() {\n let selected = this.em.getSelected();\n\n if (selected) {\n return this.StyleManager.getModelToStyle(selected);\n }\n }\n\n /**\n * Select a component\n * @param {Component|HTMLElement} el Component to select\n * @param {Object} [opts] Options\n * @param {Boolean} [opts.scroll] Scroll canvas to the selected element\n * @return {this}\n * @example\n * // Select dropped block\n * editor.on('block:drag:stop', function(model) {\n * editor.select(model);\n * });\n */\n select(el?: EditorModelParam<'setSelected', 0>, opts?: { scroll?: boolean }) {\n this.em.setSelected(el, opts);\n return this;\n }\n\n /**\n * Add component to selection\n * @param {Component|HTMLElement|Array} el Component to select\n * @return {this}\n * @example\n * editor.selectAdd(model);\n */\n // selectAdd(el: Parameters[0]) {\n selectAdd(el: EditorModelParam<'addSelected', 0>) {\n this.em.addSelected(el);\n return this;\n }\n\n /**\n * Remove component from selection\n * @param {Component|HTMLElement|Array} el Component to select\n * @return {this}\n * @example\n * editor.selectRemove(model);\n */\n selectRemove(el: EditorModelParam<'removeSelected', 0>) {\n this.em.removeSelected(el);\n return this;\n }\n\n /**\n * Toggle component selection\n * @param {Component|HTMLElement|Array} el Component to select\n * @return {this}\n * @example\n * editor.selectToggle(model);\n */\n selectToggle(el: EditorModelParam<'toggleSelected', 0>) {\n this.em.toggleSelected(el);\n return this;\n }\n\n /**\n * Returns, if active, the Component enabled in rich text editing mode.\n * @returns {Component|null}\n * @example\n * const textComp = editor.getEditing();\n * if (textComp) {\n * console.log('HTML: ', textComp.toHTML());\n * }\n */\n getEditing() {\n return this.em.getEditing();\n }\n\n /**\n * Set device to the editor. If the device exists it will\n * change the canvas to the proper width\n * @param {string} name Name of the device\n * @return {this}\n * @example\n * editor.setDevice('Tablet');\n */\n setDevice(name: string) {\n this.em.set('device', name);\n return this;\n }\n\n /**\n * Return the actual active device\n * @return {string} Device name\n * @example\n * var device = editor.getDevice();\n * console.log(device);\n * // 'Tablet'\n */\n getDevice(): string {\n return this.em.get('device');\n }\n\n /**\n * Execute command\n * @param {string} id Command ID\n * @param {Object} options Custom options\n * @return {*} The return is defined by the command\n * @example\n * editor.runCommand('myCommand', {someValue: 1});\n */\n runCommand(id: string, options: Record = {}) {\n return this.Commands.run(id, options);\n }\n\n /**\n * Stop the command if stop method was provided\n * @param {string} id Command ID\n * @param {Object} options Custom options\n * @return {*} The return is defined by the command\n * @example\n * editor.stopCommand('myCommand', {someValue: 1});\n */\n stopCommand(id: string, options: Record = {}) {\n return this.Commands.stop(id, options);\n }\n\n /**\n * Store data to the current storage.\n * This will reset the counter of changes (`editor.getDirtyCount()`).\n * @param {Object} [options] Storage options.\n * @returns {Object} Stored data.\n * @example\n * const storedData = await editor.store();\n */\n async store(options?: T) {\n return await this.em.store(options);\n }\n\n /**\n * Load data from the current storage.\n * @param {Object} [options] Storage options.\n * @param {Object} [loadOptions={}] Load options.\n * @param {Boolean} [loadOptions.clear=false] Clear the editor state (eg. dirty counter, undo manager, etc.).\n * @returns {Object} Loaded data.\n * @example\n * const data = await editor.load();\n */\n async load(options?: T, loadOptions: EditorLoadOptions = {}) {\n return await this.em.load(options, loadOptions);\n }\n\n /**\n * Get the JSON project data, which could be stored and loaded back with `editor.loadProjectData(json)`\n * @returns {Object}\n * @example\n * console.log(editor.getProjectData());\n * // { pages: [...], styles: [...], ... }\n */\n getProjectData() {\n return this.em.storeData();\n }\n\n /**\n * Load data from the JSON project\n * @param {Object} data Project to load\n * @example\n * editor.loadProjectData({ pages: [...], styles: [...], ... })\n */\n loadProjectData(data: ProjectData) {\n return this.em.loadData(data);\n }\n\n storeData() {\n return this.em.storeData();\n }\n\n loadData(data: any) {\n return this.em.loadData(data);\n }\n\n /**\n * Returns container element. The one which was indicated as 'container'\n * on init method\n * @return {HTMLElement}\n */\n getContainer() {\n return this.config.el;\n }\n\n /**\n * Return the count of changes made to the content and not yet stored.\n * This count resets at any `store()`\n * @return {number}\n */\n getDirtyCount() {\n return this.em.getDirtyCount();\n }\n\n /**\n * Reset the counter of changes.\n */\n clearDirtyCount() {\n return this.em.clearDirtyCount();\n }\n\n /**\n * Update editor dimension offsets\n *\n * This method could be useful when you update, for example, some position\n * of the editor element (eg. canvas, panels, etc.) with CSS, where without\n * refresh you'll get misleading position of tools\n * @param {Object} [options] Options\n * @param {Boolean} [options.tools=false] Update the position of tools (eg. rich text editor, component highlighter, etc.)\n */\n refresh(opts?: { tools?: boolean }) {\n this.em.refreshCanvas(opts);\n }\n\n /**\n * Replace the built-in Rich Text Editor with a custom one.\n * @param {Object} obj Custom RTE Interface\n * @example\n * editor.setCustomRte({\n * // Function for enabling custom RTE\n * // el is the HTMLElement of the double clicked Text Component\n * // rte is the same instance you have returned the first time you call\n * // enable(). This is useful if need to check if the RTE is already enabled so\n * // ion this case you'll need to return the RTE and the end of the function\n * enable: function(el, rte) {\n * rte = new MyCustomRte(el, {}); // this depends on the Custom RTE API\n * ...\n * return rte; // return the RTE instance\n * }\n *\n * // Disable the editor, called for example when you unfocus the Text Component\n * disable: function(el, rte) {\n * rte.blur(); // this depends on the Custom RTE API\n * }\n *\n * // Called when the Text Component is focused again. If you returned the RTE instance\n * // from the enable function, the enable won't be called again instead will call focus,\n * // in this case to avoid double binding of the editor\n * focus: function (el, rte) {\n * rte.focus(); // this depends on the Custom RTE API\n * }\n * });\n */\n setCustomRte(obj: CustomRTE & ThisType) {\n this.RichTextEditor.customRte = obj;\n }\n\n /**\n * Replace the default CSS parser with a custom one.\n * The parser function receives a CSS string as a parameter and expects\n * an array of CSSRule objects as a result. If you need to remove the\n * custom parser, pass `null` as the argument\n * @param {Function|null} parser Parser function\n * @return {this}\n * @example\n * editor.setCustomParserCss(css => {\n * const result = [];\n * // ... parse the CSS string\n * result.push({\n * selectors: '.someclass, div .otherclass',\n * style: { color: 'red' }\n * })\n * // ...\n * return result;\n * });\n */\n setCustomParserCss(parser: CustomParserCss) {\n this.Parser.getConfig().parserCss = parser;\n return this;\n }\n\n /**\n * Change the global drag mode of components.\n * To get more about this feature read: https://github.com/GrapesJS/grapesjs/issues/1936\n * @param {String} value Drag mode, options: 'absolute' | 'translate'\n * @returns {this}\n */\n setDragMode(value: DragMode) {\n this.em.setDragMode(value);\n return this;\n }\n\n /**\n * Trigger event log message\n * @param {*} msg Message to log\n * @param {Object} [opts={}] Custom options\n * @param {String} [opts.ns=''] Namespace of the log (eg. to use in plugins)\n * @param {String} [opts.level='debug'] Level of the log, `debug`, `info`, `warning`, `error`\n * @return {this}\n * @example\n * editor.log('Something done!', { ns: 'from-plugin-x', level: 'info' });\n * // This will trigger following events\n * // `log`, `log:info`, `log-from-plugin-x`, `log-from-plugin-x:info`\n * // Callbacks of those events will always receive the message and\n * // options, as arguments, eg:\n * // editor.on('log:info', (msg, opts) => console.info(msg, opts))\n */\n log(msg: string, opts: { ns?: string; level?: string } = {}) {\n this.em.log(msg, opts);\n return this;\n }\n\n /**\n * Translate label\n * @param {String} key Label to translate\n * @param {Object} [opts] Options for the translation\n * @param {Object} [opts.params] Params for the translation\n * @param {Boolean} [opts.noWarn] Avoid warnings in case of missing resources\n * @returns {String}\n * @example\n * editor.t('msg');\n * // use params\n * editor.t('msg2', { params: { test: 'hello' } });\n * // custom local\n * editor.t('msg2', { params: { test: 'hello' } l: 'it' });\n */\n t(...args: any[]) {\n return this.em.t(...args);\n }\n\n /**\n * Attach event\n * @param {string} event Event name\n * @param {Function} callback Callback function\n * @return {this}\n */\n on(event: EditorEvent, callback: EventHandler) {\n this.em.on(event, callback);\n return this;\n }\n\n /**\n * Attach event and detach it after the first run\n * @param {string} event Event name\n * @param {Function} callback Callback function\n * @return {this}\n */\n once(event: EditorEvent, callback: EventHandler) {\n this.em.once(event, callback);\n return this;\n }\n\n /**\n * Detach event\n * @param {string} event Event name\n * @param {Function} callback Callback function\n * @return {this}\n */\n off(event: EditorEvent, callback: EventHandler) {\n this.em.off(event, callback);\n return this;\n }\n\n /**\n * Trigger event\n * @param {string} event Event to trigger\n * @return {this}\n */\n trigger(event: EditorEvent, ...args: any[]) {\n this.em.trigger.apply(this.em, [event, ...args]);\n return this;\n }\n\n /**\n * Destroy the editor\n */\n destroy() {\n if (!this.em) return;\n this.em.destroyAll();\n this.editorView = undefined;\n }\n\n /**\n * Returns editor element\n * @return {HTMLElement}\n * @private\n */\n getEl() {\n return this.editorView?.el;\n }\n\n /**\n * Returns editor model\n * @return {Model}\n * @private\n */\n getModel() {\n return this.em;\n }\n\n /**\n * Render editor\n * @return {HTMLElement}\n */\n render() {\n this.editorView?.remove();\n this.editorView = new EditorView(this.em);\n return this.editorView.render().el;\n }\n\n /**\n * Trigger a callback once the editor is loaded and rendered.\n * The callback will be executed immediately if the method is called on the already rendered editor.\n * @param {Function} clb Callback to trigger\n * @example\n * editor.onReady(() => {\n * // perform actions\n * });\n */\n onReady(clb: EventHandler) {\n this.em.get('ready') ? clb(this) : this.em.on('load', clb);\n }\n\n /**\n * Print safe HTML by using ES6 tagged template strings.\n * @param {Array} literals\n * @param {Array} substs\n * @returns {String}\n * @example\n * const unsafeStr = '';\n * const safeStr = 'Hello';\n * // Use `$${var}` to avoid escaping\n * const strHtml = editor.html`Escaped ${unsafeStr} unescaped $${safeStr}`;\n */\n html = html;\n}\n","import { isString } from 'underscore';\nimport Editor from '../editor';\nimport { getGlobal } from '../utils/mixins';\n\ntype PluginOptions = Record;\n\nexport type Plugin = (editor: Editor, config: T) => void;\n\nconst getPluginById = (pluginId: string, plugins: PluginManager) => {\n let result = plugins.get(pluginId);\n\n // Try to search in global context\n if (!result) {\n const wplg = (getGlobal() as any)[pluginId];\n result = wplg?.default || wplg;\n }\n\n return result;\n};\n\nexport const getPlugin = (plugin: string | Plugin, plugins: PluginManager) => {\n return isString(plugin)\n ? getPluginById(plugin, plugins)\n : (plugin as unknown as { default: Plugin })?.default || plugin;\n};\n\nexport const logPluginWarn = (editor: Editor, plugin: string) => {\n editor.getModel().logWarning(`Plugin ${plugin} not found`, {\n context: 'plugins',\n plugin,\n });\n};\n\nexport default class PluginManager {\n plugins: Record = {};\n\n /**\n * Add new plugin. Plugins could not be overwritten\n * @param {string} id Plugin ID\n * @param {Function} plugin Function which contains all plugin logic\n * @return {Function} The plugin function\n * @deprecated Don't use named plugins, create plugins as simple functions. More about [Plugins](https://grapesjs.com/docs/modules/Plugins.html)\n * @example\n * PluginManager.add('some-plugin', function(editor) {\n * editor.Commands.add('new-command', {\n * run: function(editor, senderBtn){\n * console.log('Executed new-command');\n * }\n * })\n * });\n */\n add(id: string, plugin: Plugin) {\n const plg = this.get(id);\n\n if (plg) {\n return plg;\n }\n\n // @ts-ignore\n this.plugins[id] = plugin;\n\n return plugin;\n }\n\n /**\n * Returns plugin by ID\n * @param {string} id Plugin ID\n * @return {Function|undefined} Plugin\n * @example\n * var plugin = PluginManager.get('some-plugin');\n * plugin(editor);\n */\n get(id: string): Plugin | undefined {\n return this.plugins[id];\n }\n\n /**\n * Returns object with all plugins\n */\n getAll() {\n return this.plugins;\n }\n}\n","/**\n * File made for IE/Edge support\n * https://github.com/GrapesJS/grapesjs/issues/214\n */\nimport { hasWin } from './mixins';\n\nexport default () => {\n /**\n * Check if IE/Edge\n * @return {Boolean}\n */\n const isIE = () => {\n let match;\n const agent = window.navigator.userAgent;\n const rules: [string, RegExp][] = [\n ['edge', /Edge\\/([0-9\\._]+)/],\n ['ie', /MSIE\\s(7\\.0)/],\n ['ie', /MSIE\\s([0-9\\.]+);.*Trident\\/[4-7].0/],\n ['ie', /Trident\\/7\\.0.*rv\\:([0-9\\.]+).*\\).*Gecko$/],\n ];\n\n for (let i = 0; i < rules.length; i++) {\n const rule = rules[i];\n match = rule[1].exec(agent);\n if (match) break;\n }\n\n return !!match;\n };\n\n if (hasWin() && isIE()) {\n const originalCreateHTMLDocument = DOMImplementation.prototype.createHTMLDocument;\n DOMImplementation.prototype.createHTMLDocument = title => {\n if (!title) title = '';\n return originalCreateHTMLDocument.apply(document.implementation, [title]);\n };\n }\n};\n","import { isElement } from 'underscore';\nimport Editor from './editor';\nimport { EditorConfig } from './editor/config/config';\nimport PluginManager, { Plugin, getPlugin, logPluginWarn } from './plugin_manager';\nimport $ from './utils/cash-dom';\nimport polyfills from './utils/polyfills';\n\ninterface InitEditorConfig extends EditorConfig {\n grapesjs?: typeof grapesjs;\n}\n\npolyfills();\n\nconst plugins = new PluginManager();\nconst editors: Editor[] = [];\n\nexport const usePlugin =

| string>(plugin: P, opts?: P extends Plugin ? C : {}) => {\n let pluginResult = getPlugin(plugin, plugins);\n\n return (editor: Editor) => {\n if (pluginResult) {\n pluginResult(editor, opts || {});\n } else {\n logPluginWarn(editor, plugin as string);\n }\n };\n};\n\nexport const grapesjs = {\n $,\n\n editors,\n\n plugins,\n\n usePlugin,\n\n // @ts-ignore Will be replaced on build\n version: __GJS_VERSION__,\n\n /**\n * Initialize the editor with passed options\n * @param {Object} config Configuration object\n * @param {string|HTMLElement} config.container Selector which indicates where render the editor\n * @param {Boolean} [config.autorender=true] If true, auto-render the content\n * @param {Array} [config.plugins=[]] Array of plugins to execute on start\n * @param {Object} [config.pluginsOpts={}] Custom options for plugins\n * @param {Boolean} [config.headless=false] Init headless editor\n * @return {Editor} Editor instance\n * @example\n * var editor = grapesjs.init({\n * container: '#myeditor',\n * components: '

Hello world
',\n * style: '.hello{color: red}',\n * })\n */\n init(config: EditorConfig = {}) {\n const { headless } = config;\n const els = config.container;\n if (!els && !headless) throw new Error(\"'container' is required\");\n const initConfig: InitEditorConfig = {\n autorender: true,\n plugins: [],\n pluginsOpts: {},\n ...config,\n grapesjs: this,\n el: headless ? undefined : isElement(els) ? els : (document.querySelector(els!) as HTMLElement),\n };\n const editor = new Editor(initConfig, { $ });\n const em = editor.getModel();\n\n // Load plugins\n initConfig.plugins!.forEach(pluginId => {\n const plugin = getPlugin(pluginId, plugins);\n const plgOptions = initConfig.pluginsOpts![pluginId as string] || {};\n\n if (plugin) {\n plugin(editor, plgOptions);\n } else {\n logPluginWarn(editor, pluginId as string);\n }\n });\n\n // Execute `onLoad` on modules once all plugins are initialized.\n // A plugin might have extended/added some custom type so this\n // is a good point to load stuff like components, css rules, etc.\n em.loadOnStart();\n initConfig.autorender && !headless && editor.render();\n editors.push(editor);\n\n return editor;\n },\n};\n\n// Exports for TS\nexport type { default as Asset } from './asset_manager/model/Asset';\nexport type { default as Assets } from './asset_manager/model/Assets';\nexport type { default as Block } from './block_manager/model/Block';\nexport type { default as Blocks } from './block_manager/model/Blocks';\nexport type { default as Categories } from './block_manager/model/Categories';\nexport type { default as Category } from './block_manager/model/Category';\nexport type { default as Canvas } from './canvas/model/Canvas';\nexport type { default as CanvasSpot } from './canvas/model/CanvasSpot';\nexport type { default as CanvasSpots } from './canvas/model/CanvasSpots';\nexport type { default as Frame } from './canvas/model/Frame';\nexport type { default as Frames } from './canvas/model/Frames';\nexport type { default as CssRule } from './css_composer/model/CssRule';\nexport type { default as CssRules } from './css_composer/model/CssRules';\nexport type { default as Device } from './device_manager/model/Device';\nexport type { default as Devices } from './device_manager/model/Devices';\nexport type { default as ComponentManager } from './dom_components';\nexport type { default as Component } from './dom_components/model/Component';\nexport type { default as Components } from './dom_components/model/Components';\nexport type { default as ComponentView } from './dom_components/view/ComponentView';\nexport type { default as Editor } from './editor';\nexport type { default as Modal } from './modal_dialog/model/Modal';\nexport type { default as Page } from './pages/model/Page';\nexport type { default as Pages } from './pages/model/Pages';\nexport type { default as Button } from './panels/model/Button';\nexport type { default as Buttons } from './panels/model/Buttons';\nexport type { default as Panel } from './panels/model/Panel';\nexport type { default as Panels } from './panels/model/Panels';\nexport type { default as Selector } from './selector_manager/model/Selector';\nexport type { default as Selectors } from './selector_manager/model/Selectors';\nexport type { default as State } from './selector_manager/model/State';\nexport type { default as Properties } from './style_manager/model/Properties';\nexport type { default as Property } from './style_manager/model/Property';\nexport type { default as PropertyRadio } from './style_manager/model/PropertyRadio';\nexport type { default as PropertySelect } from './style_manager/model/PropertySelect';\nexport type { default as PropertyNumber } from './style_manager/model/PropertyNumber';\nexport type { default as PropertySlider } from './style_manager/model/PropertySlider';\nexport type { default as PropertyComposite } from './style_manager/model/PropertyComposite';\nexport type { default as PropertyStack } from './style_manager/model/PropertyStack';\nexport type { default as Sector } from './style_manager/model/Sector';\nexport type { default as Sectors } from './style_manager/model/Sectors';\n\nexport default grapesjs;\n"],"names":["root","factory","exports","module","define","amd","globalThis","window","this","js_beautify","css_beautify","html_beautify","beautify","src","config","js","css","html","get_beautify","legacy_beautify_css","__webpack_modules__","OutputLine","parent","__parent","__character_count","__indent_count","__alignment_count","__wrap_point_index","__wrap_point_character_count","__wrap_point_indent_count","__wrap_point_alignment_count","__items","IndentStringCache","options","baseIndentString","__cache","__indent_size","indent_size","__indent_string","indent_char","indent_with_tabs","Array","join","indent_level","__base_string","__base_string_length","length","Output","__indent_cache","raw","_end_with_newline","end_with_newline","wrap_line_length","indent_empty_lines","__lines","previous_line","current_line","next_line","space_before_token","non_breaking_space","previous_token_wrapped","__add_outputline","prototype","clone_empty","line","set_indent","item","index","has_match","pattern","lastCheckedOutput","match","indent","alignment","is_empty","get_indent_size","_set_wrap_point","_should_wrap","_allow_wrap","add_new_line","next","slice","splice","last","push","last_newline_index","lastIndexOf","pop","_remove_indent","_remove_wrap_indent","trim","toString","result","get_indent_string","column","__ensure_cache","__add_column","Math","floor","get_line_number","force_newline","just_added_newline","get_code","eol","last_item","replace","sweet_code","set_wrap_point","add_raw_token","token","x","newlines","whitespace_before","text","add_token","printable_token","__add_space_before_token","remove_indent","output_length","eat_newlines","undefined","just_added_blankline","ensure_empty_line_above","starts_with","ends_with","potentialEmptyLine","indexOf","Options","merge_child_field","raw_options","_mergeOpts","disabled","_get_boolean","_get_characters","_get_number","preserve_newlines","max_preserve_newlines","templating","_get_selection_list","allOptions","childFieldName","name","finalOpts","_normalizeOpts","key","convertedOpts","_get_array","default_value","option_value","concat","split","parseInt","isNaN","_get_selection","selection_list","Error","_is_valid_selection","some","normalizeOpts","mergeOpts","regexp_has_sticky","RegExp","hasOwnProperty","InputScanner","input_string","__input","__input_length","__position","restart","back","hasNext","val","charAt","peek","__match","lastIndex","pattern_match","exec","sticky","test","testChar","read","starting_pattern","until_pattern","until_after","readUntil","match_index","substring","readUntilAfter","get_regexp","match_from","flags","source","get_literal_regexp","literal_string","peekUntilAfter","start","lookBack","testVal","toLowerCase","Directives","start_block_pattern","end_block_pattern","__directives_block_pattern","__directive_pattern","__directives_end_ignore_pattern","get_directives","directives","directive_match","readIgnored","input","__unused_webpack_exports","Beautifier","source_text","defaultOptions","directives_core","lineBreak","allLineBreaks","whitespaceChar","whitespacePattern","block_comment_pattern","comment_pattern","_source_text","_options","_ch","_input","NESTED_AT_RULE","CONDITIONAL_GROUP_RULE","NON_SEMICOLON_NEWLINE_PROPERTY","eatString","endChars","eatWhitespace","allowAtLeastOneNewLine","newline_count","_output","foundNestedPseudoClass","openParen","i","ch","print_string","output_string","_indentLevel","preserveSingleSpace","isAfterSpace","outdent","_nestedLevel","previous_ch","parenLevel","insideRule","insidePropertyValue","enteringConditionalGroup","insideNonNestedAtRule","insideScssMap","topCharacter","insideNonSemiColonValues","comment","ignore","variable","variableOrRule","newline_between_rules","brace_style","preserveQuoteSpace","space_needed","selector_separator_newline","preserveAfterSpace","space_around_combinator","BaseOptions","call","space_around_selector_separator","brace_style_split","bs","__webpack_module_cache__","moduleId","cachedModule","legacy_beautify_html","Token","type","comments_before","previous","opened","closed","TokenStream","WhitespacePattern","TOKEN","START","RAW","EOF","Tokenizer","__tokens","_patterns","whitespace","tokenize","current","_reset","open_token","open_stack","comments","_get_next_token","_is_comment","add","isEmpty","_is_opening","_is_closing","_is_first_token","previous_token","_readWhitespace","resulting_string","_create_token","current_token","whitespace_before_token","parent_token","__tokens_length","__parent_token","Pattern","input_scanner","_line_regexp","__set_whitespace_patterns","whitespace_chars","newline_chars","_match_pattern","_newline_regexp","matches","__split","matching","_create","_update","regexp","start_index","next_match","_starting_pattern","_until_pattern","_until_after","read_match","until","starting_with","template_names","django","erb","handlebars","php","smarty","TemplatablePattern","__template_pattern","_disabled","Object","assign","_excluded","__patterns","handlebars_comment","handlebars_unescaped","django_value","django_comment","smarty_comment","smarty_literal","__set_templated_pattern","disable","language","read_options","exclude","_read_template","items","c","peek1","html_source","Printer","base_indent_string","alignment_size","current_line_has_match","set_space_before_token","value","non_breaking","print_preserved_newlines","raw_token","TEXT","n","print_newline","traverse_whitespace","force","print_token","get_full_indent","level","get_custom_beautifier_name","tag_check","typeAttribute","start_token","ATTRIBUTE","EQUALS","VALUE","get_type_attribute","search","in_array","what","arr","TagFrame","parser_token","tag","tag_name","TagStack","printer","_printer","_current_frame","_js_beautify","_css_beautify","_tag_stack","optionHtml","_is_wrap_attributes_force","wrap_attributes","substr","_is_wrap_attributes_force_expand_multiline","_is_wrap_attributes_force_aligned","_is_wrap_attributes_aligned_multiple","_is_wrap_attributes_preserve","_is_wrap_attributes_preserve_aligned","get_parser_token","record_tag","new_frame","_try_pop_frame","frame","_get_frame","tag_list","stop_list","try_pop","indent_to_tag","last_token","last_tag_token","TagOpenParserToken","tokens","TAG_OPEN","COMMENT","_handle_tag_open","tag_complete","_handle_inside_tag","TAG_CLOSE","_handle_tag_close","_handle_text","is_unformatted","tag_start_char","has_wrapped_attrs","indent_content","is_content_unformatted","is_inline_element","wrapped","attr_count","wrap_attributes_min_attrs","custom_beautifier_name","_print_custom_beatifier_text","local","_beautifier","script_indent_level","pre","post","indent_scripts","indentation","matched","Child_options","white","_get_tag_open_token","is_empty_element","is_start_tag","_set_tag_position","start_tag_token","peek_token","peek_index","is_end_tag","multiline_content","tag_check_match","startsWith","handlebar_starts","wrap_attributes_indent_size","void_elements","unformatted","content_unformatted","inline","inline_custom_elements","includes","_do_optional_end_element","extra_liners","_calcluate_parent_multiline","do_end_expand","indent_inner_html","indent_head_inner_html","indent_body_inner_html","p_closers","p_parent_excludes","p_parent","indent_handlebars","unformatted_content_delimiter","BaseTokenizer","BASETOKEN","UNKNOWN","_current_tag_name","templatable_reader","pattern_reader","word","single_quote","double_quote","attribute","element_name","handlebars_open","handlebars_raw_close","cdata","conditional_comment","processing","_unformatted_content_delimiter","literal_regexp","_read_open_handlebars","_read_attribute","_read_close","_read_raw_content","_read_content_word","_read_comment_or_cdata","_read_processing","_read_open","content","_is_content_unformatted","style_html","requireamd","legacy_beautify_js","js_source_text","acorn","line_starters","positionable_operators","reserved_word","RESERVED","reserved_array","words","special_words","OPERATOR_POSITION","list","generateMapFromStrings","OPERATOR_POSITION_BEFORE_OR_PRESERVE","before_newline","preserve_newline","MODE","remove_redundant_indentation","output","multiline_frame","mode","start_line_index","is_array","is_expression","_tokens","_last_last_text","_flags","_previous_flags","_flag_store","create_flags","flags_base","next_indent_level","indentation_level","line_indent_level","START_BLOCK","last_word","declaration_statement","declaration_assignment","inline_frame","if_block","else_block","class_start_block","do_block","do_while","import_block","in_case_statement","in_case","case_body","case_block","ternary_depth","test_output_raw","set_mode","tokenizer","handle_token","preserve_statement_flags","START_EXPR","handle_start_expr","END_EXPR","handle_end_expr","handle_start_block","END_BLOCK","handle_end_block","WORD","handle_word","SEMICOLON","handle_semicolon","STRING","handle_string","handle_equals","OPERATOR","handle_operator","COMMA","handle_comma","BLOCK_COMMENT","handle_block_comment","handle_comment","DOT","handle_dot","handle_eof","handle_unknown","handle_whitespace_and_comments","keep_whitespace","keep_array_indentation","comment_token","j","newline_restricted_tokens","allow_wrap_or_preserved_newline","force_linewrap","shouldPreserveOrForce","shouldPrintOperatorNewline","operator_position","next_token","restore_mode","print_token_line_indentation","comma_first","popped","deindent","start_of_object_property","start_of_statement","next_mode","space_in_paren","space_before_conditional","peek_back_two","space_after_named_function","peek_back_three","space_after_anon_function","space_in_empty_paren","second_token","empty_braces","empty_anonymous_function","brace_preserve_inline","check_token","jslint_happy","prefix","isGeneratorAsterisk","isUnary","space_before","space_after","in_ternary","isColon","isTernaryColon","isOtherColon","after_newline","new_line_needed","preserve","newline","print_block_commment","lines","s","out","idx","split_linebreaks","javadoc","starless","lastIndent","lastIndentLength","all_lines_start_with","len","each_line_matches_indent","break_chained_methods","unindent_chained_methods","__unused_webpack_module","baseASCIIidentifierChars","nonASCIIidentifierStartChars","nonASCIIidentifierChars","unicodeEscapeOrCodePoint","identifierStart","identifierChars","identifier","identifierMatch","validPositionValues","raw_brace_style","braces_on_own_line","unescape_strings","e4x","number_pattern","digit","dot_pattern","punct","in_html_comment","punct_pattern","reserved_words","reserved_word_pattern","templatable","template","number","block_comment","html_comment_start","html_comment_end","include","shebang","xml","template_text","template_expression","_read_non_javascript","_read_string","_read_pair","_read_word","_read_singles","_read_comment","_read_regexp","_read_xml","_read_punctuation","d","sharp","has_char_escapes","_read_string_recursive","escaped","input_scan","String","fromCharCode","unescape_string","_allow_regexp_or_xml","esc","in_char_class","xmlStr","rootTag","isCurlyRoot","depth","isEndTag","tagName","delimiter","allow_unescaped_newlines","start_sub","current_char","_","Backbone","core_slice","apply","fn","ctx","args","hasKeys","obj","keys","isArray","arguments","all","getMagicFusionIndex","callstackWasIndexed","magicFusionIndex","indexCycle","defer","ObjectRegistry","registeredObjects","cidIndexes","onoff","which","objects","l","objectRegistry","register","unregister","isFunction","actionUndoRedo","action","undoTypes","object","before","after","managerUndoRedo","manager","stack","magic","everything","isCurrentlyUndoRedoing","pointer","actions","isUndo","clone","models","at","where","get","shift","trigger","validateUndoActionCreation","undoTypesType","condition","addToStack","track","res","diff","maximumStackLength","isRegistered","cid","contains","map","UndoTypes","collection","model","remove","each","unset","set","unsetData","afterAttributes","changedAttributes","keysAfter","previousAttributes","pick","keysPrevious","reset","previousModels","OwnedUndoTypes","manipulateUndoType","manipType","undoType","fns","undoTypesInstance","isObject","extend","Action","Model","defaults","undo","attributes","redo","UndoStack","Collection","Infinity","setMaxLength","UndoManager","initialize","attr","on","startTracking","isArguments","stopTracking","isTracking","_addToStack","unregisterAll","undoAll","redoAll","isAvailable","merge","undoManager","addUndoType","changeUndoType","removeUndoType","clear","defaultAttributes","self","g","global","$","previousBackbone","VERSION","noConflict","emulateHTTP","emulateJSON","_listening","Events","eventSplitter","eventsApi","iteratee","events","callback","opts","names","context","_events","onApi","listening","_listeners","id","interop","listenTo","_listenId","uniqueId","listeningTo","_listeningTo","Listening","error","tryCatchOn","handlers","count","e","off","offApi","listeners","stopListening","ids","remaining","handler","_callback","cleanup","once","onceMap","bind","listenToOnce","offer","max","triggerApi","objEvents","allEvents","triggerEvents","ev","a1","a2","a3","listener","unbind","attrs","preinitialize","cidPrefix","parse","changed","validationError","idAttribute","toJSON","sync","escape","has","_validate","silent","changes","changing","_changing","_previousAttributes","prev","isEqual","prevId","_pending","hasChanged","old","fetch","success","resp","serverAttrs","wrapError","save","wait","validate","method","isNew","patch","xhr","destroy","url","base","urlError","encodeURIComponent","constructor","isValid","comparator","setOptions","addOptions","array","insert","min","tail","singular","removed","_removeModels","added","merged","_isModel","toAdd","toMerge","toRemove","modelMap","sort","sortable","sortAttr","isString","existing","_prepareModel","_addReference","orderChanged","m","_removeReference","unshift","_byId","modelId","first","findWhere","sortBy","pluck","create","callbackOpts","values","CollectionIterator","ITERATOR_VALUES","ITERATOR_KEYS","entries","ITERATOR_KEYSVALUES","_onModelEvent","event","$$iterator","Symbol","iterator","kind","_collection","_kind","_index","done","View","viewOptions","_ensureElement","delegateEventSplitter","selector","$el","find","render","_removeElement","setElement","element","undelegateEvents","_setElement","delegateEvents","el","delegate","eventName","undelegate","_createElement","document","createElement","className","_setAttributes","addMethod","cb","defaultVal","addUnderscoreMethods","Class","methods","instance","modelMatcher","matcher","collectionMethods","forEach","collect","reduce","foldl","inject","reduceRight","foldr","detect","filter","select","reject","every","any","invoke","toArray","size","head","take","initial","rest","drop","without","difference","shuffle","chain","sample","partition","groupBy","countBy","indexBy","findIndex","findLastIndex","modelMethods","pairs","invert","omit","Base","mixin","mappings","functions","memo","methodMap","params","dataType","data","contentType","JSON","stringify","_method","beforeSend","setRequestHeader","processData","textStatus","errorThrown","ajax","Router","routes","_bindRoutes","optionalParam","namedParam","splatParam","escapeRegExp","route","isRegExp","_routeToRegExp","router","history","fragment","_extractParameters","execute","navigate","optional","param","decodeURIComponent","History","checkUrl","location","routeStripper","rootStripper","pathStripper","started","interval","atRoot","pathname","getSearch","matchRoot","decodeFragment","decodeURI","href","getHash","getPath","path","getFragment","_usePushState","_wantsHashChange","hashChange","_hasHashChange","documentMode","_useHashChange","_wantsPushState","pushState","_hasPushState","rootPath","iframe","style","display","tabIndex","body","iWindow","insertBefore","firstChild","contentWindow","open","close","hash","addEventListener","attachEvent","_checkUrlInterval","setInterval","loadUrl","stop","removeEventListener","detachEvent","removeChild","clearInterval","decodedFragment","title","_updateHash","protoProps","staticProps","child","__super__","_module","em","CanvasSpotBuiltInTypes","getView","componentView","getBoxRect","cvView","Canvas","getCanvasView","boxRect","getElBoxRect","y","width","height","getStyle","top","left","position","translate","isType","run","ed","Components","Css","bindAll","editor","canvasModel","canvas","toggleMove","disableDragger","onKeyUp","stopCommand","enableDragger","toggleDragger","enable","dragger","methodCls","getCanvas","classList","ppfx","getPosition","setPosition","onStart","onDrag","onEnd","methodEv","methodsEv","classes","cls","defineCommand","def","o","pfx","stylePrefix","pStylePrefix","hoverClass","badgeClass","plhClass","freezClass","init","onFrameScroll","getElement","getCanvasBody","getBody","getCanvasTools","getToolsEl","offset","rect","getBoundingClientRect","ownerDocument","scrollTop","scrollLeft","callRun","abort","sender","callStop","Commands","toSelect","components","component","getSelectedAll","Boolean","logWarning","evName","target","getEl","doc","guidesStatic","guidesTarget","setupGuides","getModel","isTran","guidesContainer","getGuidesContainer","getGuidesTarget","getGuidesStatic","drg","toggleDrag","getEventOpts","guides","guide","parentNode","guidesEl","getConfig","elInfoX","elInfoY","guideContent","innerHTML","appendChild","getGlobalToolsEl","elGuideInfoX","elGuideInfoY","elGuideInfoContentX","querySelector","elGuideInfoContentY","debounce","updateGuides","debug","renderGuide","children","getElementGuides","lastEl","lastPos","origin","pos","getElementPos","getGuidePosUpdate","originRect","un","guideSize","active","numEl","noScroll","getTranslate","transform","axis","itemStr","toUpperCase","parseFloat","setTranslate","end","unit","__p","styleUp","addStyle","avoidStore","prop","Styles","__emitCmpStyleUpdate","getSelected","_getDragData","center","relPos","parentRel","pStyle","getMouseRelativeCanvas","offsetP","guidesInfo","renderGuideInfo","opt","hideGuidesInfo","rectOrigin","isUndefined","isY","origEdge1","origEdge1Raw","origEdge2","origEdge2Raw","elGuideInfo","elGuideInfoCnt","guideInfoStyle","stat","statEdge2","gap","a","b","isEdge1","statEdge1","statEdge1Raw","statEdge2Raw","posFirst","posSecond","pos2","sizeRaw","round","hasFocus","coll","snd","cmp","incr","getChildAt","wrappers","Pages","getAllWrappers","flatten","wrp","findType","rules","CssComposer","getAll","rule","md","copy","modal","Modal","cm","CodeManager","editors","oHtmlEd","buildEditor","oCsslEd","htmlEditor","cssEditor","class","textViewCode","setContent","getHtml","optsHtml","getCss","optsCss","codeName","theme","label","createViewer","EditorView","isEnabled","fullscreenElement","webkitFullscreenElement","mozFullScreenElement","requestFullscreen","webkitRequestFullscreen","mozRequestFullScreen","msRequestFullscreen","exitFullscreen","webkitExitFullscreen","mozCancelFullScreen","msExitFullscreen","fsChanged","targetEl","isElement","getContainer","noSelClass","getBadgeEl","addClass","getHighlighterEl","wp","$wrapper","initSorter","toggleClipboard","drag","cacheEl","startSelectPosition","frameEl","contentDocument","sorter","draggable","onEndMove","stopSelectComponent","getContentWindow","rollback","initSorterFromModel","view","onEndMoveFromModel","initSorterFromModels","lastModel","frameView","getCurrentFrame","toMove","onMoveClb","onSelect","keyCode","moved","endMove","$badge","getBadge","$hl","getHighlighter","removeClass","am","custom","__customData","onceClose","AssetManager","types","accept","modalTitle","t","setTarget","onClick","onDblClick","__behaviour","rendered","container","__trgCustom","assets","uploadEl","setAttribute","bm","appendTo","firstRender","pn","Panels","getPanel","addPanel","Blocks","lm","LayerManager","lmConfig","layers","panels","pm","$cnt","DeviceManager","SelectorManager","StyleManager","trgEvCnt","$cntInner","$cntSlm","$cntSm","append","showDevices","devicePanel","dvEl","slmConfig","sm","smConfig","$header","pnCnt","toggleSm","show","hide","panelC","Config","tm","TraitManager","confTm","$cn","$cn2","toggleTm","clp","lastSelected","sel","selected","addOpts","doAdd","pageBody","getMainComponent","emitUpdate","pasteable","cop","canMove","cmdOutline","getPanels","preventDrag","tglEffects","mthEv","tlb","getToolbarEl","elP","querySelectorAll","pointerEvents","shouldRunSwVisibility","isActive","stopDefault","editorEl","helper","onclick","panel","canvasS","padding","margin","refresh","runCommand","runDefault","canvasView","getResizerEl","posFetcher","mousePosFetcher","getMouseRelativePos","canvasResizer","forceNew","Utils","Resizer","blur","focus","command","Toolbar","autoAdd","itemsView","itemType","reuseView","addTo","itemViewNotFound","ns","warn","frag","itemView","typeField","createDocumentFragment","clearItems","empty","onRender","onRemoveBefore","onRemove","DomainViews","props","mousedown","handleClick","preventDefault","stopPropagation","getFrameEl","clientX","clientY","execCommand","Editor","ToolbarView","showOffsets","frameOff","canvasOff","adjScroll","startSelectComponent","toggleSelectComponent","listenToEl","onFrameUpdated","onContainerChange","onHovered","updateGlobalPos","_upToolbar","updateAttached","getFrames","win","getWindow","onHover","onOut","onFrameResize","getComponentView","parentEl","getComponentModel","currentDoc","setHovered","useValid","setCurrentFrame","updateLocalPos","views","getViewEl","elHovered","updateToolsLocal","toggleToolsEl","currentFrame","elSelected","updateToolsGlobal","initResize","getElSelected","getElHovered","showElementOffset","elPos","hideElementOffset","showFixedElementOffset","state","hideFixedElementOffset","hideHighlighter","opacity","isEditing","isChildOf","updateBadge","badge","bStyle","posOnly","icon","getIcon","clsBadge","customeLabel","customBadgeLabel","badgeLabel","getName","getTargetToElementFixed","leftOff","showHighlighter","elem","resizable","spotTypeResize","CanvasSpot","Resize","hasCustomResize","hasCustomSpot","removeSpots","addSpot","docs","resizer","keyHeight","keyWidth","currentUnit","keepAutoHeight","keepAutoWidth","getModelToStyle","toggleFramesEvents","computedStyle","getComputedStyle","modelStyle","currentWidth","autoWidth","currentHeight","autoHeight","startDim","w","h","unitHeight","getUnitFromValue","unitWidth","onMove","updateTarget","store","selectedHandler","onlyHeight","onlyWidth","bodyw","offsetWidth","getDragMode","finalStyle","updateToolbar","mod","toolbarEl","toolbarStyle","toolbar","showToolbar","noCustomSpotSelect","Select","toolbarView","updateToolbarPos","getCanvasPosition","updateTools","refreshSpots","isCompSelected","comp","isHoverEn","isNewEl","lastHovered","badgeOpts","customHoverSpot","Hover","showOffsetsSelected","toolsEl","canvasRectOffset","topOff","_trgToolUp","targetToElem","canvasOffsetTop","canvasOffsetLeft","refreshCanvas","hideBadge","cleanPrevious","status","hasWin","preserveSelected","setSelected","trg","isPointed","utils","Sorter","placer","getPlacerEl","containerSel","itemSel","direction","wmargin","nested","canvasRelative","scale","getZoomDecimal","startSort","getOffsetDim","stopSelectPosition","posTargetCollection","posIndex","posMethod","cDim","posIsLastEl","posTargetEl","outsideElem","posTargetModel","nearFloat","dims","isLast","getOffsetMethod","zoom","Spacing","stateVar","offsetViewer","marginT","marginB","marginL","marginR","padT","padB","padL","padR","childNodes","stateLow","marginName","paddingName","marginV","paddingV","paddingEls","fullMargName","fullPadName","marginLeftSt","marginLeft","marginRightSt","marginRight","marginTopSt","marginTop","marginBottomSt","marginBottom","mtStyle","mbStyle","mlStyle","mrStyle","ptStyle","pbStyle","plStyle","prStyle","posLeft","widthEl","marginSideH","marginSideT","padTop","paddingTop","padBot","paddingBottom","padSideH","padSideT","paddingLeft","padRight","paddingRight","toggleVis","cv","mth","_onFramesChange","handleFrames","frames","loaded","_upFrame","__ol","isDef","CoordinatesTypes","DEFAULT_COORDS","xyArr","snapOffset","delta","lastScroll","lastScrollDiff","startPointer","startPosition","globScrollDiff","currentPointer","getDocumentEl","getContainerEl","getWindowEl","keyHandle","handleScroll","actualScroll","getScrollInfo","scrollDiff","move","getPointerPos","getStartPosition","currentPos","glDiff","lockedAxis","shiftKey","detectAxisLock","moveDelta","co","deltaPre","snapGuides","newDelta","trgX","trgY","axs","trgPoint","statPoint","deltaPoint","trgGuide","isPointIn","trgValue","setGuideLock","lock","ofst","trgName","cancelled","cancel","xPos","yPos","defaultView","parentWindow","getPos","getPointerPosition","pEv","relX","relY","absX","abs","absY","_Array$prototype","reverse","idRe","classRe","htmlRe","tagRe","getElementsByClassName","getElementsByTagName","Cash","__cash","eles","getElementById","parseHTML","ready","nodeType","cash","eq","ele","camelCaseRe","camelCaseWhitespaceRe","camelCase","str","letter","removeProp","guid","webkitMatchesSelector","mozMatchesSelector","msMatchesSelector","oMatchesSelector","isNumeric","isFinite","getCompareFunction","is","splitValuesRe","getSplitValues","unique","computeStyle","isVariable","getPropertyValue","computeStyleInt","hasClass","check","removeAttr","removeAttribute","_value","getAttribute","toggleClass","isForce","toggle","cssVariableRe","isCSSVariable","prefixedProps","docEl","vendorsPrefixes","getPrefixedProp","propCC","propUC","p","prefixedProp","numericProps","animationIterationCount","columnCount","flexGrow","flexShrink","fontWeight","lineHeight","order","orphans","widows","zIndex","getSuffixedValue","setProperty","dataNamespace","dataAttributeRe","getDataCache","getData","cache","dataset","getExtraSpace","xAxis","hasNamespaces","ns1","ns2","removeEventListeners","_ref","hasData","_this","setData","removeData","boxSizing","includeMargins","eventsNamespace","eventsNamespacesSeparator","getEventsCache","parseEventName","parts","removeEvent","namespaces","eventCache","_ref2","eventFullName","_this2","_parseEventName","_one","_this3","_parseEventName2","finalCallback","namespace","thisArg","returnValue","addEvent","one","readyState","setTimeout","evt","_parseEventName3","createEvent","initEvent","dispatchEvent","selectOneRe","selectMultipleRe","getValue","selectedIndex","getValueSelectSingle","option","getValueSelectMultiple","queryEncodeSpaceRe","skippableRe","checkableRe","serialize","query","elements","checked","queryEncode","isMultiple","eleValue","cloneNode","detach","containers","fragmentRe","singleTagRe","table","tr","td","th","thead","tbody","tfoot","initContainers","$1","insertContent","prepend","isStr","insertAdjacentHTML","insertElement","_this4","outerHTML","insertAfter","_this5","nextSibling","_this6","_this7","_this8","_this9","prependTo","replaceWith","_this10","$eles","replaceChild","replaceAll","textContent","docEle","documentElement","pageYOffset","clientTop","pageXOffset","clientLeft","offsetParent","offsetLeft","offsetTop","contents","found","nextElementSibling","not","closest","parents","previousElementSibling","siblings","KEY_TAG","KEY_ATTR","motionsEv","isDoc","Node","DOCUMENT_NODE","removeEl","cx","inputs","attrUp","isVisible","offsetHeight","getClientRects","oldEl","newEl","appendAtIndex","total","lastChild","createEl","createText","createTextNode","createCustomEvent","oEvent","err","_parentEvent","keyCodeVal","defineProperty","appendVNodes","node","vNodes","vnode","isTextNode","TEXT_NODE","isTaggableNode","COMMENT_NODE","isCommentNode","getElRect","rectText","range","createRange","selectNode","getDocumentScroll","getKeyCode","getKeyChar","getPointerEvent","touches","isEscKey","isEnterKey","hasModifierKey","ctrlKey","hasCtrlKey","metaKey","evs","els","isBultInMethod","normalizeKey","mls","Promise","getGlobal","elProt","Element","getUiClass","defCls","appendStyles","styles","stls","link","rel","prepand","shallowDiff","objOrig","objNew","keysNew","origValue","newValue","upFirst","normalizeFloat","step","valueDef","stepDecimals","side","toFixed","hasDnd","nativeDnD","escapeNodeContent","deepMerge","targValue","srcValue","__cashData","isEmptyObj","capitalize","isRule","toCSS","__gjsv","isComponent","toHTML","setViewEl","createId","chars","random","buildBase64UrlFromSvg","svg","base64Str","btoa","Buffer","from","webpackContext","req","webpackContextResolve","__webpack_require__","code","resolve","Function","ArrayProto","ObjProto","SymbolProto","supportsArrayBuffer","ArrayBuffer","supportsDataView","DataView","nativeIsArray","nativeKeys","nativeCreate","nativeIsView","isView","_isNaN","_isFinite","hasEnumBug","propertyIsEnumerable","nonEnumerableProps","MAX_ARRAY_INDEX","pow","restArguments","func","startIndex","isNull","isBoolean","tagTester","nodelist","Int8Array","hasStringTagBug","isIE11","Map","isDataView","getInt8","isArrayBuffer","buffer","isSymbol","isNumber","constant","createSizePropertyCheck","getSizeProperty","sizeProperty","shallowProperty","typedArrayPattern","collectNonEnumProps","emulatedSet","nonEnumIdx","proto","isMatch","_keys","_wrapped","toBufferView","bufferSource","Uint8Array","byteOffset","valueOf","tagDataView","aStack","bStack","deepEq","areArrays","aCtor","bCtor","allKeys","ie11fingerprint","weakMapMethods","forEachName","hasName","commonInit","mapTail","mapMethods","setMethods","createAssigner","keysFunc","baseCreate","Ctor","extendOwn","tap","interceptor","toPath","deepGet","defaultValue","identity","property","optimizeCb","argCount","accumulator","baseIteratee","mapObject","results","currentKey","noop","propertyOf","times","accum","Date","now","getTime","createEscaper","escaper","testRegexp","replaceRegexp","string","templateSettings","evaluate","interpolate","noMatch","escapes","escapeChar","bareIdentifier","settings","oldSettings","argument","fallback","idCounter","_chain","executeBound","sourceFunc","boundFunc","callingContext","partial","boundArgs","placeholder","bound","TypeError","callArgs","strict","memoize","hasher","address","delay","throttle","timeout","later","leading","throttled","_now","clearTimeout","trailing","immediate","passed","debounced","_args","wrap","wrapper","negate","predicate","compose","findKey","createPredicateIndexFinder","dir","sortedIndex","low","high","mid","createIndexFinder","predicateFind","createReduce","reducer","fromIndex","guard","contextPath","computed","lastComputed","v","reStrSymbol","rand","temp","criteria","right","group","behavior","pass","keyInObj","compact","otherArrays","uniq","isSorted","seen","arrays","intersection","argsLength","unzip","ceil","chunk","chainResult","getter","__esModule","definition","enumerable","r","toStringTag","literals","acc","lit","subst","substs","fromElement","projectData","noticeOnUnload","forceClass","log","baseCss","protectedCss","canvasCss","defaultCommand","devicePreviewMode","mediaCondition","tagVarStart","tagVarEnd","keepEmptyTextNodes","jsInHtml","multipleSelection","avoidInlineStyle","avoidDefaults","clearStyles","cssIcons","icons","plus","caret","delete","arrowUp","chevron","eye","eyeOff","i18n","assetManager","layerManager","storageManager","richTextEditor","domComponents","codeManager","commands","cssComposer","selectorManager","deviceManager","styleManager","blockManager","traitManager","keepUnusedStyles","customUI","getByComponent","getComponent","addComponent","hasComponent","Selectable","lastComponent","allComponents","removeComponent","moduleName","_em","_name","cfgParent","cfg","_disable","_config","postLoad","__logWarn","__appendTo","elTo","private","skipListen","__initListen","getProjectData","storageKey","loadProjectData","onResult","getAllMap","update","__catchAllEvent","collections","propagate","entity","__remove","rm","removeBefore","__onAllEvent","renderProps","_createId","ln","allMap","__listenAdd","__listenRemove","__listenUpdate","__destroy","Module","scripts","autoscrollLimit","extHl","frameContent","frameStyle","notTextable","allowExternalDrop","default","devices","widthMedia","priority","checkUnit","pr","getWidthMedia","Devices","updateSelect","change","startAdd","updateDevice","devEl","devicesEl","getDeviceModel","device","getOptions","evAll","evPfx","evSelect","evUpdate","evAdd","evRemove","evRemoveBefore","chnSel","deviceEvents","Device","_onSelect","deviceId","newDevice","getDevices","ItemManagerModule","modelConstructor","newModel","keyAutoW","keyAutoH","getDimension","dim","viewDim","endsWith","domc","conf","allRules","idMap","modOpts","Wrapper","getType","newStyles","Parser","parseCss","checkId","changesCount","refFrame","_undo","_undoexc","initRefs","framesById","changesUp","temporary","noCount","getStyles","getHead","setHead","addHeadItem","getHeadByAttr","removeHeadByAttr","addLink","removeLink","addScript","removeScript","getPage","page","_emitUpdated","hasAutoHeight","infiniteCanvas","ModuleModel","fromUndo","loadedItems","itemsToLoad","onAdd","onReset","itemLoaded","listenToLoadItems","listenToLoad","defFrame","frms","getId","setName","getAllFrames","getMainFrame","updatingValue","registerForUpdateEvent","changeProp","setValue","setValueFromModel","onUpdateEvent","updateOpts","console","getParentValue","setParentValue","templates","traits","initTrait","build","trait","Traits","_label","noLabel","TraitFactory","getLabelText","hasLabel","appendInput","onChange","templateLabel","getLabel","templateInput","clsField","inputValue","renderLabel","tpl","getInputEl","$input","i18nAttr","paceholder","getElInput","elInput","renderField","rerender","clsLabel","tmpl","getInputElem","highlightedClass","click","setHighlighted","buttonAddId","buttonRemoveEvent","__addPage","__removePage","__getModule","selectedView","getCommandsNav","buttonRemoveId","optionsTarget","full","defaultOpts","beforeShow","color","flat","showInput","allowEmpty","showButtons","clickoutFiresChange","showInitial","showPalette","showPaletteOnly","hideAfterPaletteSelect","togglePaletteOnly","showSelectionPalette","localStorageKey","maxSelectionSize","cancelText","chooseText","togglePaletteMoreText","togglePaletteLessText","clearText","noColorSelectedText","preferredFormat","containerClassName","replacerClassName","showAlpha","palette","selectionPalette","spectrums","IE","navigator","userAgent","rgbaSupport","cssText","backgroundColor","replaceInput","markup","gradientFix","dataID","spectrum","extra","spect","load","loadOpts","inputTypeColorSupport","_cachedResult","colorInput","localization","palettes","processNativeColorInputs","colorInputs","trimLeft","trimRight","tinyCounter","math","mathRound","mathMin","mathMax","mathRandom","tinycolor","rgb","ok","format","named","matchers","rgba","hsl","hsla","hsv","hsva","hex8","convertHexToDecimal","parseIntFromHex","hex6","hex3","stringInputToObject","bound01","convertToPercentage","f","q","hsvToRgb","hue2rgb","hslToRgb","boundAlpha","inputToRGB","_originalInput","_r","_g","_b","_a","_roundA","_format","_gradientType","gradientType","_ok","_tc_id","isDark","getBrightness","isLight","getOriginalInput","getFormat","getAlpha","toRgb","setAlpha","toHsv","rgbToHsv","toHsvString","toHsl","rgbToHsl","toHslString","toHex","allow3Char","rgbToHex","toHexString","toHex8","rgbaToHex","toHex8String","toRgbString","toPercentageRgb","toPercentageRgbString","toName","hexNames","toFilter","secondColor","hex8String","secondHex8String","formatSet","formattedString","hasAlpha","_applyModification","lighten","brighten","darken","desaturate","saturate","greyscale","spin","_applyCombination","analogous","complement","monochromatic","splitcomplement","triad","tetrad","fromRatio","newColor","equals","color1","color2","mix","amount","w1","rgb1","rgb2","w2","readability","c1","c2","brightnessA","brightnessB","colorDiff","brightness","isReadable","mostReadable","baseColor","colorList","bestColor","bestScore","bestIsReadable","readable","score","CSS_UNIT","PERMISSIVE_MATCH3","PERMISSIVE_MATCH4","aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","burntsienna","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkgrey","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkslategrey","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dimgrey","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","green","greenyellow","grey","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightgrey","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightslategrey","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","slategrey","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","whitesmoke","yellow","yellowgreen","flipped","flip","paletteTemplate","tiny","swatchStyle","callbackContext","callbacks","instanceOptions","resize","reflow","throttler","visible","isDragging","isDefault","dragWidth","dragHeight","dragHelperHeight","slideHeight","alphaWidth","alphaSlideHelperWidth","slideHelperHeight","currentHue","currentSaturation","currentValue","currentAlpha","paletteArray","paletteLookup","draggingClass","shiftMovementDirection","boundElement","pickerContainer","dragHelper","slider","slideHelper","alphaSliderInner","alphaSlider","alphaSlideHelper","textInput","paletteContainer","initialColorContainer","cancelButton","clearButton","chooseButton","toggleButton","isInput","isInputTypeColor","shouldReplace","replacer","offsetElement","previewElement","initialColor","colorOnShow","currentPreferredFormat","applyOptions","updateSelectionPaletteFromStorage","localStorage","oldPalette","addColorToSelectionPalette","inArray","drawPalette","currentColor","getUniqueSelectionPalette","drawInitial","dragStart","dragStop","setFromTextInput","updateOriginalInput","Event","isDefaultPrevented","hideAll","$doc","onkeydown","clickout","updateUI","button","revert","ignoreFormatChange","newHsv","updateHelperLocations","flatColor","realColor","displayColor","realHex","realRgb","alpha","realAlpha","gradient","dragX","dragY","alphaX","slideY","fireCallback","picker","extraY","dpWidth","outerWidth","dpHeight","outerHeight","inputHeight","docElem","cW","clientWidth","cH","clientHeight","scL","scT","viewWidth","viewHeight","getOffset","paletteElementClick","keydown","oldDragX","oldDragY","furtherFromX","paletteEvent","optionName","optionValue","coord","onmove","onstart","onstop","dragging","maxHeight","maxWidth","hasTouch","duringDragEvents","prevent","t0","pageX","pageY","hex","pad2","clamp01","hue","slices","part","ret","modification","isOnePointZero","processPercent","isPercentage","ColorPicker","getColor","cl","colorEl","getColorEl","valueClr","tc","noneColor","movedColor","inputClass","plh","inputEl","holderClass","fromTarget","fromInput","colorPicker","cpStyle","elToAppend","colorPickerConfig","fixedValues","valid","validateInputValue","deepCheck","inputNumberValue","handleChange","handleKeyDown","upArrowClick","downArrowClick","normalizeValue","downIncrement","moveIncrement","upIncrement","prValue","defValue","regFixed","TraitNumberView","TraitNumberViewAbstract","units","inputUnitValue","valueString","numberRegexp","unitEl","getUnitEl","handleUnitChange","resultName","valResult","input3","TraitNumberUnitView","input2","changePage","evPageSelect","evPageSelectBefore","evPageUpdate","evPageAdd","evPageAddBefore","evPageRemove","evPageRemoveBefore","typeMain","pageEvents","selectBefore","addBefore","pages","__onChange","_onPageChange","onLoad","configPages","mainPage","getMain","Layers","mainComp","setRoot","um","pg","pagesMap","onZoomChange","onCoordsChange","onPointerChange","_pageUpdated","rulers","pointerScreen","getCurrentFrameModel","noUndo","coords","getPointerCoords","World","refreshDbn","spot","__trgEvent","spotAdd","spotUpdate","spotRemove","CanvasEvents","viewCollection","renderView","important","getDeclaration","getBlockId","atRules","addToCollection","fragmentEl","renderStarted","atRule","getAtRule","atRuleEl","styleEl","appendData","clsName","mediaText","defaultBlockId","blockId","getMediaWidth","contRules","sortRules","isMobFirst","prs","rootEl","counter","toggleEffects","handleDragEnter","handleDragOver","handleDrop","handleDragLeave","__customTglEff","frameElement","sortOpts","customTarget","elementFromPoint","startCustom","endCustom","over","endDrop","updateCounter","dt","dataTransfer","dragContentOrigin","dragContent","inAbsoluteMode","getWrapper","canvasOffset","postLeft","posTop","handleDragEnd","cnt","setDropContent","getContentByData","border","files","file","alt","json","lastMaxHeight","tools","frameWrapView","showGlobalTools","cvModel","getCanvasModel","updateHead","renderStyles","allowfullscreen","getCoords","frameRect","canvasRect","getCanvasOffset","vwDelta","getViewportDelta","zoomM","getZoomMultiplier","headEl","attrStr","stl","getDoc","getJsContainer","jsContainer","elTools","_getTool","getOffsetViewerEl","getRect","getOffsetRect","scrollBottom","scrollRight","_toggleEffects","startAutoscroll","_toggleAutoscrollFx","requestAnimationFrame","autoscroll","lastClientY","actualTop","limitTop","limitBottom","nextTop","scrollTo","spots","updateClientY","stopAutoscroll","mt","renderScripts","evLoad","evOpts","appendScript","scriptEl","hasAttribute","HTMLScriptElement","onerror","onload","frameLoadHead","renderBody","frameLoadBody","write","frameLoad","normalize","prevStyles","_isEditor","passive","droppable","_emitUpdate","classAnim","updateOffset","updateSize","frameLoaded","updatePos","setupDragger","Dragger","posOpts","startDrag","__clear","destroyed","updateDim","__handleSize","noChanges","onScroll","onscroll","currW","currH","newW","newH","newWidth","newHeight","observer","ResizeObserver","scrollHeight","observe","sizeObserver","disconnect","twrp","toolsWrapper","elTop","elRight","elBottom","elLeft","frameWrapperView","clsUnscale","_initFrames","clearOff","checkSelected","updateFrames","_onFramesUpdate","toggleListeners","_renderFrames","scroll","currFrame","scrollIntoView","onKeyPress","onWheel","onPointer","screenToWorld","docScroll","screenCoords","isInputFocused","deltaX","deltaY","isZooming","newZoom","setZoom","Screen","pointerX","pointerY","zoomDelta","setCoords","toolsWrpEl","defOpts","updateFramesArea","timerZoom","framesArea","cvStyle","mpl","zoomDc","fitViewport","elFrame","elRect","noHeight","ignoreHeight","gapIsNum","gapX","gapY","boxWidth","boxHeight","canvasWidth","canvasHeight","widthRatio","heightRatio","zoomRatio","zoomMltp","yDelta","isElInViewport","getFrameOffset","rTop","rLeft","getRectToScreen","zoomMlt","frameX","frameY","canvasEl","toScreen","getViewportRect","toWorld","frmOff","cvsOff","winEl","frEl","frameOffset","frameTop","avoidFrameOffset","frameLeft","avoidFrameZoom","getElementOffsets","bEl","fo","updateScript","scriptContainer","jsEl","script","scriptFn","getScriptString","scriptFnStr","scriptProps","__getScriptProps","scr","getFrameView","mainFrame","renderFrames","$frames","toolsWrp","hlEl","badgeEl","placerEl","ghostEl","resizerEl","offsetEl","fixedOffsetEl","toolsGlobEl","spotsEl","getFrame","getFramesEl","getDocument","_getLocalEl","globalEl","compView","getGhostEl","getFixedOffsetViewerEl","getSpotsEl","setCustomBadgeLabel","topScroll","leftScroll","getTargetToElementDim","canvasPos","toRight","targetHeight","targetWidth","eventToTrigger","leftPos","topPos","elementTop","elementLeft","elementWidth","elementHeight","canvasTop","canvasLeft","rectOff","getFrameElFromDoc","fullHeight","subWinOffset","yOffset","xOffset","addTop","addLeft","toIgnore","focused","activeElement","fr","getZoom","hasX","hasY","getPointer","screen","addFrame","getLastDragResult","spotProps","getSpots","cmpView","customSpots","getWorldRectToScreen","draggableComponents","disableTextInnerChilds","processor","useFrameDoc","voidElements","htmlType","defaultType","modelAttrStart","compTypes","getPropAttribute","attrName","attrValue","valueLen","firstChar","lastChar","splitPropsFromAttr","propsResult","parseStyle","decls","decl","parseClass","parseNode","nodes","attrsLen","nodePrev","nodeChild","ct","compType","namespaceURI","nodeName","nodeValue","inSvg","void","comps","allTxt","foundTextNode","ci","cType","textTags","parserCss","cf","optionsHtml","parserHtml","parser","DOMParser","mimeType","strF","parseFromString","BrowserParserHtml","allowScripts","allowUnsafeAttr","__clearUnsafeAttr","styleStr","resHtml","returnArray","getLastStyleValue","extendStyle","setStyle","propOrig","propNew","newStyle","noEvent","removeStyle","styleToString","imp","getSelectors","getSelectorsString","selectorsToString","getFullString","getComponentIds","getComponentsFromDefs","visitedCmps","restAttr","getNewId","addAttributes","newComponents","cmps","removeChildren","resetChildren","newIds","idsToKeep","keepIds","resetFromString","cssc","allByID","allById","parsed","parseString","newCmps","getRules","newRule","__checkInnerChilds","isTemp","prevColl","sels","Selectors","canRemoveStyle","rulesRemoved","it","inner","__postRemove","df","componentTypes","parseHtml","componentsById","optsToPass","addCollection","isMult","processDef","__firstAdd","mdl","ccid","modelPr","$$typeof","avoidInline","Component","ensureInList","setClassRule","__postAdd","recursive","TYPE_CLASS","TYPE_ID","namePreEsc","escapeName","nameEsc","Selector","protected","isId","isClass","getFullName","setLabel","getActive","setActive","objLen","combine","curr","getStyleable","getValid","noDisabled","combination","addItem","removeItem","selectedEl","itemsEl","renderToolbar","renderItem","iconCaret","buildView","itemEl","itemDataEl","renderItems","Text","lineAt","RangeError","lineInner","to","clip","decompose","TextNode","other","scanIdentical","RawTextCursor","skip","iter","iterRange","PartialTextCursor","iterLines","LineCursor","sliceString","of","TextLeaf","textLength","super","isLine","Line","sliceText","joined","appendText","newLen","lineSep","endLine","childOpen","updated","totalLines","iA","iB","eA","eB","chA","chB","maxChunk","minChunk","chunked","currentLines","currentLen","currentChunk","flush","offsets","nextInner","offsetValue","cursor","limit","afterBreak","isExtendingChar","isRegionalIndicator","ZWJ","findClusterBreak","forward","includeExtending","nextClusterBreak","prevClusterBreak","surrogateLow","charCodeAt","surrogateHigh","codePointAt","codePointSize","countBefore","code0","code1","fromCodePoint","DefaultSplit","MapMode","ChangeDesc","sections","newLength","ins","iterGaps","posA","posB","iterChangedRanges","individual","iterChanges","invertedDesc","composeDesc","composeSets","mapDesc","mapSet","mapPos","assoc","Simple","endA","TrackDel","TrackBefore","TrackAfter","touchesRange","fromJSON","ChangeSet","inserted","fromA","toA","fromB","_toB","desc","ranges","resultSections","resultInserted","filteredSections","SectionIter","addSection","addInsert","filtered","process","spec","sub","insText","insLen","createSet","forceJoin","endB","setA","setB","mkSet","piece","len2","sectionLen","insB","textBit","forward2","SelectionRange","anchor","bidiLevel","goalColumn","mainIndex","main","asSingle","addRange","replaceRange","single","normalized","checkSelection","selection","docLength","nextID","Facet","compareInput","compare","isStatic","enables","extensions","reader","sameArray","static","FacetProvider","compute","deps","computeN","field","dependencies","facet","dynamicSlot","addresses","multi","depDoc","depSel","depAddrs","dep","docChanged","ensureAll","newVal","compareArray","reconfigure","oldState","oldAddr","oldVal","getAddr","StateField","addrs","addr","ensureAddr","dynamicFacetSlot","providers","providerAddrs","providerTypes","dynamic","depChanged","oldProviders","facets","oldValue","initField","createF","updateF","compareF","provides","provide","slot","extension","Prec_","prec","ext","PrecExtension","Prec","highest","lowest","Compartment","CompartmentInstance","compartment","compartments","Configuration","dynamicSlots","staticValues","statusTemplate","staticFacet","fields","newCompartments","known","oldFacets","computeSlot","languageData","allowMultipleSelections","lineSeparator","changeFilter","transactionFilter","transactionExtender","readOnly","Annotation","AnnotationType","StateEffectType","StateEffect","mapping","mapped","mapEffects","effects","effect","appendConfig","Transaction","startState","annotations","_doc","_state","time","newDoc","newSelection","applyTransaction","annotation","ann","reconfigured","isUserEvent","userEvent","joinRanges","mergeTransaction","sequential","mapForA","mapForB","resolveTransactionInner","docSize","asArray","resolveTransaction","specs","seq","extenders","extendTransaction","filters","filterTransaction","addToHistory","remote","none","CharCategory","nonASCIISingleCaseWordChar","wordChar","makeCategorizer","wordChars","char","Space","hasWordChar","Word","Other","EditorState","require","startValues","replaceSelection","toText","changeByRange","result1","newChanges","newMapped","mapBy","sliceDoc","fieldInit","configuration","tabSize","phrase","phrases","languageDataAt","provider","charCategorizer","wordAt","cat","combineConfig","configs","kA","kB","k","RangeValue","Range","startSide","endSide","point","mapMode","cmpRange","Chunk","maxPoint","startAt","lo","hi","between","newPos","newFrom","newTo","curFrom","curTo","chunkPos","nextLayer","chunkEnd","updateSpec","filterFrom","filterTo","cur","LayerCursor","goto","spill","builder","RangeSetBuilder","addInner","rangeIndex","chunkIndex","addChunk","nextChunk","finishInner","chunks","touch","HeapCursor","sets","oldSets","newSets","textDiff","minPointSize","sharedChunks","findSharedChunks","sideA","SpanCursor","sideB","sameValues","spans","openRanges","openStart","activeForPoint","openCount","pointFrom","pointRank","openEnd","span","lazySort","finish","finishChunk","newArrays","chunkStart","setMaxPoint","lastFrom","lastTo","inA","shared","Set","layer","minPoint","rank","gotoInner","setRangeIndex","heap","heapBubble","childIndex","activeTo","activeRank","minActive","removeActive","findMinIndex","addActive","trackOpen","wasPoint","nextVal","startA","startB","dPos","clipEnd","comparePoint","compareRange","foundPos","countColumn","findColumn","col","_arrayLikeToArray","arr2","_toConsumableArray","minLen","_typeof","_classCallCheck","Constructor","_toPropertyKey","arg","hint","prim","toPrimitive","Number","_defineProperties","descriptor","configurable","writable","_createClass","C","COUNT","for","SET","StyleModule","splitSelector","selectors","isKeyframes","isAt","keyframes","modules","nonce","setNonce","StyleSet","mount","adoptedSet","adoptedStyleSheets","CSSStyleSheet","adopted","sheet","styleTag","insertRule","mac","platform","ie","getSelection","dom","hasSelection","anchorNode","clientRectsFor","textRange","isEquivalentPosition","targetNode","targetOff","scanFor","domIndex","previousSibling","maxOffset","contentEditable","flattenRect","bottom","windowRect","innerWidth","innerHeight","getScale","elt","scaleX","scaleY","DOMSelectionState","anchorOffset","focusNode","focusOffset","domSel","setRange","scratchRange","preventScrollSupported","focusPreventScroll","preventScroll","setEnd","setStart","dispatchKey","cancelable","down","KeyboardEvent","synthetic","up","defaultPrevented","clearAttributes","removeAttributeNode","isScrolledToBottom","DOMPos","precise","noChildren","ContentView","overrideDOMText","posAtStart","posBefore","posAtEnd","breakAfter","posAfter","contentView","canReuseDOM","reuseDOM","written","rm$1","_dom","localPosFromDOM","bias","domBoundsAround","fromI","fromStart","toI","toEnd","prevEnd","startDOM","endDOM","markDirty","andParent","markParentsDirty","childList","setParent","setDOM","cmView","rootView","replaceChildren","ignoreMutation","_rec","ignoreEvent","_event","childCursor","ChildCursor","childPos","findPos","isEditable","isWidget","isHidden","hasStart","become","getSide","fromOff","toOff","breakAtStart","breakAtEnd","mergeChildrenInto","dLen","nav","vendor","ie_edge","ie_upto10","ie_11up","gecko","chrome","webkit","safari","ios","maxTouchPoints","browser","windows","linux","ie_version","gecko_version","chrome_version","android","webkit_version","MaxJoinLen","TextView","createDOM","textDOM","domAtPos","_from","_to","coordsAt","rects","textCoords","MarkView","mark","setAttrs","_hasStart","detachFrom","inlineDOMAtPos","coordsInChildren","WidgetView","widget","prevWidget","updateDOM","toDOM","fromBack","WidgetBufferView","joinInlineInto","beforePos","afterPos","scan","fallbackRect","combineAttrs","noAttrs","attrsEq","keysA","keysB","updateAttrs","getAttrs","LineView","prevAttrs","transferDOM","setDeco","addLineDeco","deco","hack","cmIgnore","measureTextSize","textHeight","totalWidth","charWidth","heightOracle","viewState","dist","_other","covers","docView","block","BlockWidgetView","_takeDeco","WidgetType","estimatedHeight","lineBreaks","BlockType","Decoration","heightRelevant","MarkDecoration","inlineOrder","PointDecoration","isBlockGap","getInclusive","LineDecoration","hasHeight","isReplace","WidgetRange","WidgetBefore","WidgetAfter","widgetsEq","inclusiveStart","inclusiveEnd","inclusive","ContentBuilder","disallowBlockEffectsFor","curLine","pendingBuffer","bufferMarks","atCursorPos","textOff","posCovered","getLine","flushBuffer","wrapMarks","addBlockWidget","buildText","NullWidget","cursorBefore","cursorAfter","decorations","dynamicDecorationMap","clickAddsSelectionRange","dragMovesSelection$1","mouseSelectionStyle","exceptionSink","updateListener","inputHandler","focusChangeEffect","perLineTextDirection","nativeSelectionHidden","ScrollTarget","yMargin","xMargin","isSnapshot","exception","editable","nextPluginID","viewPlugin","domEventHandlers","domEventObservers","buildExtensions","eventHandlers","eventObservers","plugin","pluginInst","fromClass","PluginInstance","mustUpdate","deactivate","editorAttributes","contentAttributes","atomicRanges","bidiIsolatedRanges","getIsolatedRanges","isolates","iso","bidiIsolate","scrollMargins","getScrollMargins","styleModule","ChangedRange","toB","addToSet","me","extendWithRanges","dI","rI","ViewUpdate","transactions","changedRanges","viewportChanged","heightChanged","geometryChanged","focusChanged","selectionSet","Direction","LTR","RTL","dec","LowTypes","ArabicTypes","Brackets","BracketStack","BidiRE","BidiSpan","maybe","isolatesEq","emitSpans","baseLevel","ourType","iCh","iI","sameDir","isNum","recurse","localLevel","iScan","upto","jI","computeSectionOrder","outerType","rFrom","rTo","prevType","prevStrong","computeCharTypes","oppositeType","sI","br","sJ","embed","processBracketPairs","beforeL","fromJ","processNeutrals","computeOrder","trivialOrder","movedOver","moveVisually","spanI","indexForward","nextIndex","nextSpan","DocView","domChanged","hasComposition","markedForComposition","minWidth","minWidthFrom","minWidthTo","impreciseAnchor","impreciseHead","forceSelection","lastUpdate","contentDOM","updateDeco","updateInner","readCompositionAt","inputState","composing","newSel","composition","touched","touchesComposition","headPos","findCompositionNode","textNode","inv","marks","parentView","findCompositionRange","decoDiff","DecorationComparator$1","findChangedDeco","oldLength","mustMeasureContent","updateChildren","contentHeight","flexBasis","selectionRange","cView","gaps","viewport","BlockGapWidget","updateGaps","compLine","compositionView","fixCompositionDOM","fix","updateSelection","mustRead","fromPointer","readSelectionRange","activeElt","selectionNotFocus","moveToLine","dummy","inside","assignedSlot","inUneditable","rawSel","nextTo","nearbyTextNode","collapse","caretBidiLevel","removeAllRanges","setSelectionRange","enforceCursorAssoc","modify","lineStart","newRange","posFromDOM","nearest","domView","best","bestPos","coordsForChar","childOff","measureVisibleLineHeights","contentWidth","isWider","scrollDOM","widest","ltr","textDirection","childRect","textDirectionAt","measure","computeBlockGapDeco","vs","viewports","lineBlockAt","allDeco","lineGapDeco","ref","margins","targetRect","bounding","scrollWidth","moveX","moveY","rectHeight","boundingHeight","scrollBy","movedX","movedY","host","scrollRectIntoView","startNode","startOffset","getdx","getdy","yOverlap","upTop","upBot","domPosAtCoords","closestRect","closestX","closestY","above","below","aboveRect","belowRect","closestOverlap","dx","dy","domPosInText","clipX","closestOffset","closestDY","generalSide","posAtCoords","docTop","docHeight","halfLine","bounced","elementAtHeight","posAtCoordsImprecise","caretPositionFromPoint","offsetNode","caretRangeFromPoint","startContainer","isSuspiciousSafariCaretResult","isSuspiciousChromeCaretResult","contentRect","into","defaultCharacterWidth","lineWrapping","defaultLineHeight","lineLength","blockAt","moveByChar","by","bidiSpans","skipAtomicRanges","atoms","skipAtoms","oldPos","InputState","setSelectionOrigin","lastSelectionOrigin","lastSelectionTime","lastKeyCode","lastKeyTime","lastTouchTime","lastFocusTime","lastScrollTop","lastScrollLeft","pendingIOSKey","lastEscPress","lastContextMenu","scrollHandlers","compositionFirstChange","compositionEndedAt","compositionPendingKey","compositionPendingChange","mouseSelection","draggedContent","handleEvent","notifiedFocused","appliedFirefoxHack","firefoxCopyCutHack","bubbles","eventBelongsToEditor","ignoreDuringComposition","runHandlers","observers","ensureHandlers","plugins","computeHandlers","exists","modifierCodes","delayAndroidKey","pending","altKey","PendingKeys","EmacsyPendingKeys","forceFlush","flushIOSKey","startMouseSelection","bindHandler","record","inputType","dragScrollMargin","dragScrollSpeed","MouseSelection","startEvent","mustSelect","scrollSpeed","scrolling","lastEvent","scrollParent","scrollableParent","multiple","addsSelectionRange","rangeCount","getRangeAt","isInPrimarySelection","getClickType","buttons","sx","sy","setScrollSpeed","dispatch","brokenClipboardAPI","doPaste","byLine","lastLinewiseCopy","lastLine","rangeForClick","categorize","linePos","groupAt","visual","touchstart","touchmove","makeStyle","queryPos","startSel","startRange","removeRangeAround","basicMouseSelection","mustFocus","mouseSel","insideY","findPositionSide","BadMouseDetail","lastMouseDown","lastMouseDownCount","lastMouseDownTime","detail","lastTime","dropText","direct","dropPos","del","dragMovesSelection","dragstart","effectAllowed","dragend","finishFile","FileReader","readAsText","paste","clipboardData","capturePaste","cut","linewise","copiedRange","clearData","selectionEnd","selectionStart","captureCopy","isFocusChange","focusChangeTransaction","getEffect","updateForFocusChange","clearSelectionRange","compositionstart","compositionupdate","compositionend","pendingRecords","flushSoon","then","contextmenu","beforeinput","startViewHeight","visualViewport","wrappingWhiteSpace","HeightOracle","heightSamples","heightForGap","heightForLine","setDoc","mustRefreshForWrapping","whiteSpace","mustRefreshForHeights","lineHeights","knownHeights","MeasuredHeights","heights","more","BlockInfo","_content","widgetLineBreaks","QueryType","Epsilon","HeightMap","outdated","setHeight","oracle","decomposeLeft","decomposeRight","applyChanges","oldDoc","ByPosNoHeight","NodeBuilder","updateHeight","HeightMapText","break","brk","HeightMapBranch","HeightMapBlock","_height","_oracle","_type","forEachLine","_force","measured","collapsed","widgetHeight","breaks","HeightMapGap","heightMetrics","perLine","firstLine","perChar","totalPerLine","guess","lineTop","ByHeight","linesAbove","singleHeight","rightTop","rightOffset","subQuery","ByPos","rightStart","balanced","mergeGaps","rebalance","around","relevantWidgetHeight","lineEnd","covering","writtenTo","isCovered","addBlock","enterLine","blankContent","ensureLine","DecorationComparator","visiblePixelRange","overflow","parentRect","fullPixelRange","LineGap","same","gA","gB","draw","wrapping","LineGapWidget","vertical","ViewState","pixelViewport","inView","contentDOMWidth","contentDOMHeight","editorHeight","editorWidth","scrolledToBottom","scrollAnchorPos","scrollAnchorHeight","scaler","IdScaler","scrollTarget","printing","defaultTextDirection","visibleRanges","mustEnforceCursorAssoc","guessWrapping","stateDeco","heightMap","getViewport","updateViewportLines","updateForViewport","lineGaps","ensureLineGaps","computeVisibleRanges","Viewport","BigScaler","viewportLines","scaleBlock","prevDeco","contentChanges","heightChanges","heightRelevantDecoChanges","prevHeight","scrollAnchor","scrollAnchorAt","mapViewport","viewportIsAppropriate","updateLines","updateLineGaps","mapLineGaps","domRect","measureContent","dTop","dBottom","vp","viewportChange","visibleTop","fromDOM","visibleBottom","mayMeasure","halfMargin","doubleMargin","addGap","structure","avoid","moveToLineBoundary","gapSize","lineStructure","viewFrom","viewTo","bot","marginHeight","targetFrac","findFraction","spaceFrac","findPosition","marginWidth","fraction","lineBlockAtHeight","ratio","counted","vpHeight","domBase","domTop","domBottom","bTop","bBottom","strs","darkTheme","baseThemeID","newName","baseLightID","baseDarkID","lightDarkIDs","buildTheme","scopes","baseTheme$1","outline","flexDirection","alignItems","fontFamily","overflowX","wordWrap","minHeight","WebkitUserModify","whiteSpace_fallback","wordBreak","overflowWrap","caretColor","contain","background","animation","borderLeft","borderLeftColor","insetInlineStart","borderRight","textAlign","borderBottom","borderTop","verticalAlign","backgroundImage","backgroundSize","backgroundPosition","backgroundRepeat","fontSize","borderRadius","LineBreakPlaceholder","DOMReader","points","readRange","findPointBefore","oldLen","readNode","nextView","isBlockElement","readTextNode","re","nextBreak","breakSize","fromView","findPointInside","isAtEnd","DOMPoint","DOMChange","typeOver","bounds","iHead","iAnchor","selPoints","selectionPoints","selectionFromPoints","applyDOMChange","domChange","lastKey","preferredPos","preferredSide","findDiff","defaultTr","defaultInsert","mainSel","compositionRange","replaced","rangeChanges","selOff","applyDefaultInsert","observeOptions","characterData","subtree","characterDataOldValue","useCharData","DOMObserver","selectionChanged","delayedFlush","resizeTimeout","queue","delayedAndroidKey","flushingAndroidKey","lastChange","scrollTargets","resizeScroll","intersecting","gapIntersection","parentCheck","MutationObserver","mutations","mut","removedNodes","onCharData","prevValue","onSelectionChange","onResize","onPrint","addWindowListeners","IntersectionObserver","listenForScroll","intersectionRatio","onScrollChanged","threshold","requestMeasure","wasChanged","shadowRoot","deepActiveElement","stopImmediatePropagation","getTargetRanges","endContainer","endOffset","curAnchor","safariSelectionRangeHack","atElementStart","processRecords","clearDelayedAndroidKey","cancelAnimationFrame","takeRecords","records","readMutation","readChange","readSelection","handled","rec","childBefore","findChild","childAfter","setWindow","removeWindowListeners","_c","curView","compositionStarted","_root","pluginMap","editorAttrs","contentAttrs","bidiCache","updateState","measureScheduled","measureRequests","announceDOM","dispatchTransactions","trs","getRoot","mountStyles","redrawn","attrsChanged","focusFlag","dispatchFocus","pendingKey","setState","CachedOrder","updatePlugins","styleModules","showAnnouncements","newState","hadFocus","prevSpecs","newPlugins","sDOM","measuring","BadMeasure","themeClasses","attrsFromFacet","spellcheck","autocorrect","autocapitalize","contenteditable","role","changedContent","changedEditor","announce","cspNonce","readMeasured","request","documentTop","documentPadding","viewportLineBlocks","moveByGroup","nextCat","byGroup","includeWrap","coordsAtPos","editorRect","moveVertically","distance","startPos","startY","goal","startCoords","resolvedGoal","curY","charRect","posAtDOM","MaxBidiLine","entry","fresh","scrollSnapshot","dark","baseTheme","findFromDOM","lastDir","sources","currentPlatform","modifiers","handleKeyEvents","getKeymap","Keymaps","WeakMap","bindings","isPrefix","checkPrefix","scope","scopeObj","ctrl","meta","normalizeKeyName","ourObj","storedPrefix","PrefixTimeout","binding","_any","buildKeymap","keyName","isChar","prevented","baseName","shiftName","ran","runFor","cmd","RectangleMarker","adjust","forRange","getBase","lineElt","lineStyle","leftSide","textIndent","rightSide","startBlock","endBlock","visualStart","visualEnd","wrappedLine","pieces","drawForLine","drawForWidget","horizontal","addSpan","fromOpen","toOpen","fromCoords","toCoords","endPos","docLine","spanFrom","spanTo","rectanglesForRange","LayerView","drawn","measureReq","setOrder","layerOrder","markers","sameMarker","oldI","marker","CanHidePrimary","selectionConfig","cursorBlinkRate","drawRangeCursor","cursorLayer","selectionLayer","hideNativeSelection","configChanged","cursors","animationName","confChange","setBlinkRate","animationDuration","themeSpec","setDropCursorPos","dropCursorPos","drawDropCursor","readPos","drawCursor","cursorPos","outer","setDropPos","dragover","dragleave","relatedTarget","iterMatches","MatchDecorator","decoration","decorate","boundary","maxLength","addMatch","_view","createDeco","matchRanges","changeFrom","changeTo","_f","_t","updateRange","updateFrom","updateTo","fromLine","toLine","UnicodeRegexpSupport","unicode","Specials","Names","_supportsTabSize","specialCharConfig","specialChars","addSpecialChars","replaceTabs","MozTabSize","supportsTabSize","_plugin","decorationCache","decorator","makeDecorator","TabWidget","SpecialCharWidget","DefaultPlaceholder","ph","placeholder$1","lineDeco","activeLineHighlighter","getDeco","lastLineStart","MaxOff","absoluteColumn","rectangleSelectionStyle","newStart","newLine","_extend","startLine","startOff","endOff","startCol","endCol","rectangleFor","rectangularSelection","eventFilter","Alt","Control","Shift","Meta","showCrosshair","crosshairCursor","isDown","keyup","mousemove","Outside","TooltipViewManager","createTooltipView","tooltips","tooltipViews","newAbove","tip","tooltipView","windowSpace","tooltipConfig","tooltipSpace","knownHeight","tooltipPlugin","madeAbsolute","lastTransaction","measureTimeout","createContainer","readMeasure","writeMeasure","showTooltip","createTooltip","intersectionObserver","measureSoon","observeIntersection","maybeMeasure","tooltip","shouldMeasure","newConfig","arrow","makeAbsolute","tv","space","others","tView","arrowHeight","noOffset","strictSide","spaceVert","overlap","arrowLeft","positioned","borderTopColor","borderBottomColor","showHoverTooltip","HoverTooltipHost","mounted","createHostedView","hostedView","passProp","given","showHoverTooltipHost","HoverPlugin","setHover","hoverTime","hoverTimeout","restartTimeout","lastMove","checkHover","mouseleave","startHover","hovered","posCoords","bidi","rtl","tooltipMargin","isInTooltip","docBottom","isOverRange","watchTooltipLeave","watch","hoverTooltip","hoverState","hideOnChange","hideOn","closeHoverTooltipEffect","getTooltip","panelConfig","topContainer","bottomContainer","panelPlugin","showPanel","PanelGroup","syncClasses","scrollMargin","syncDOM","curDOM","GutterMarker","elementClass","gutterLineClass","renderEmptyElements","elementStyle","lineMarker","widgetMarker","lineMarkerChange","initialSpacer","updateSpacer","activeGutters","gutter","gutters","unfixGutters","gutterView","fixed","prevViewport","SingleGutterView","syncGutters","updateGutters","vpA","vpB","vpOverlap","lineClasses","classSet","contexts","UpdateContext","advanceCursor","addElement","newElt","GutterElement","extraMarkers","localMarkers","forLine","spacer","prevMarkers","sameMarkers","setMarkers","domPos","iNew","iOld","skipTo","lineNumberMarkers","lineNumberConfig","formatNumber","NumberMarker","lineNumberGutter","maxLineNumber","lineNumbers","activeLineGutterMarker","activeLineGutterHighlighter","u","M","S","DefaultBufferLength","nextPropID","perNode","deserialize","closedBy","openedBy","contextHash","lookAhead","MountedTree","tree","overlay","noProps","skipped","isTop","isSkipped","isError","isAnonymous","groups","NodeSet","newTypes","newProps","CachedNode","CachedInnerNode","IterMode","positions","TreeCursor","topNode","cursorAt","moveTo","_tree","TreeNode","resolveNode","resolveInner","resolveStack","iterStack","stackIterator","iterate","enter","leave","anon","IncludeAnonymous","entered","propValues","balance","balanceRange","makeTree","nodeSet","maxBufferLength","reused","minRepeatType","FlatBufferCursor","takeNode","parentStart","minPos","inRepeat","lookAheadAtStart","findBufferSize","Uint16Array","copyToBuffer","TreeBuffer","localChildren","localPositions","localInRepeat","lastGroup","lastEnd","makeRepeatLeaf","takeFlatNode","make","makeBalanced","nodeCount","stopAt","lookAheadProp","lastI","pair","maxSize","fork","minStart","nodeSize","localSkipped","nodeStart","bufferStart","topID","buildTree","childString","endIndex","checkSide","startI","endI","overlays","IgnoreOverlays","BaseNode","getChild","getChildren","matchContext","matchNodeContext","enterUnfinishedNodesBefore","prevSibling","_parent","nextChild","ExcludeBuffers","BufferNode","BufferContext","hasChild","IgnoreMounts","rPos","nextSignificantParent","toTree","externalSibling","heads","picked","newHeads","StackIterator","bufferNode","yieldNode","yieldBuf","yield","enterChild","sibling","atLastNode","mustLeave","nodeSizeCache","balanceType","mkTop","mkTree","maxChild","divide","groupFrom","groupStart","groupSize","nextSize","only","NodeWeakMap","setBuffer","getBuffer","cursorSet","cursorGet","TreeFragment","addTree","fragments","minGap","fI","nextF","cI","nextC","nextPos","fFrom","fTo","startParse","StringInput","createParse","advance","lineChunks","InnerParse","checkRanges","ActiveOverlay","mounts","stoppedInner","MixedParse","nest","innerDone","baseTree","stoppedAt","baseParse","startInner","parsedPos","fragmentCursor","FragmentCursor","covered","hasNode","checkCover","materialize","oldMounts","findMounts","punchRanges","enterFragments","sliceBuf","buf","newStack","innerOffset","stackPos","targetI","StructureCursor","fragI","curFrag","nextFrag","gapFrom","gapTo","findCoverChanges","inB","nextA","nextB","nextTagID","Tag","modified","defineModifier","Modifier","nextModifierID","instances","mods","powerSet","styleTags","byName","tags","Rule","ruleNodeProp","opaque","inherit","tagHighlighter","tagClass","highlightTree","highlighter","putStyle","HighlightBuilder","highlightRange","highlighters","startSpan","inheritedClass","getStyleTags","tagCls","highlightTags","innerHighlighters","rangeFrom","rangeTo","typeName","propertyName","literal","heading","keyword","operator","punctuation","bracket","lineComment","blockComment","docComment","variableName","attributeName","labelName","macroName","docString","character","attributeValue","integer","float","bool","null","atom","modifier","operatorKeyword","controlKeyword","definitionKeyword","moduleKeyword","derefOperator","arithmeticOperator","logicOperator","bitwiseOperator","compareOperator","updateOperator","definitionOperator","typeOperator","controlOperator","separator","angleBracket","squareBracket","paren","brace","heading1","heading2","heading3","heading4","heading5","heading6","contentSeparator","quote","emphasis","strong","monospace","strikethrough","deleted","invalid","documentMeta","processingInstruction","function","standard","special","languageDataProp","defineLanguageFacet","baseData","sublanguageProp","Language","extraExtensions","topNodeAt","innerNode","sublang","isActiveAt","findRegions","lang","allowsNesting","explore","topLang","LRLanguage","configure","hasWrappers","DocInput","syncTo","stringStart","currentContext","ParseContext","treeLen","scheduleOn","tempSkipped","work","isDone","takeTree","withContext","endTime","withoutTempSkipped","cutFragments","updateViewport","startLen","skipUntilInView","getSkippingParser","frags","LanguageState","newCx","vpTo","parseState","requestIdle","requestIdleCallback","idle","cancelIdleCallback","isInputPending","scheduling","parseWorker","working","workScheduled","chunkBudget","scheduleWork","checkAsyncSchedule","deadline","timeRemaining","viewportFirst","catch","isWorking","languages","LanguageSupport","support","indentService","indentUnit","getIndentUnit","indentString","cols","ts","getIndentation","IndentContext","service","ast","indentFor","syntaxIndentation","simulateBreak","simulateDoubleBreak","textAfterPos","override","overrideIndentation","lineIndent","overriden","simulatedBreak","indentNodeProp","strategy","indentStrategy","TreeIndentContext","delimitedStrategy","ignoreClosed","topIndent","textAfter","baseIndent","baseIndentFor","atBreak","isParent","delimitedIndent","closing","align","closedAt","aligned","openToken","sim","openLine","bracketedAligned","continuedIndent","except","matchExcept","DontIndentBeyond","foldService","foldNodeProp","foldInside","isUnfinished","foldable","syntaxFolding","mapRange","foldEffect","unfoldEffect","selectedLines","foldState","folded","foldExists","preparePlaceholder","foldConfig","PreparedFoldWidget","foldWidget","onSelection","findFold","maybeEnable","codeFolding","announceFold","fold","lineFrom","lineTo","foldKeymap","defaultConfig","placeholderDOM","placeholderText","widgetToDOM","prepared","foldGutterDefaults","openText","closedText","markerDOM","foldingChanged","FoldMarker","foldGutter","fullConfig","canFold","canUnfold","buildMarkers","HighlightStyle","modSpec","scopeOpt","themeType","highlighterFacet","fallbackHighlighter","getHighlighters","treeHighlighter","TreeHighlighter","markCache","buildDeco","styleChange","textDecoration","fontStyle","DefaultScanDist","DefaultBrackets","bracketMatchingConfig","afterCursor","brackets","maxScanDistance","renderMatch","defaultRenderMatch","matchingMark","nonmatchingMark","bracketMatchingState","matchBrackets","bracketMatchingUnique","bracketMatching","bracketMatchingHandle","matchingNodes","byProp","findHandle","hasHandle","handle","matchMarkedBrackets","tokenType","startCh","startToken","basePos","matchPlainBrackets","_pos","firstToken","endHandle","noTokens","typeArray","warned","byTag","defaultTable","legacyName","createTokenType","warnForPart","msg","tagStr","tags$1","toggleLineComment","changeLineComment","toggleBlockComment","changeBlockComment","toggleBlockCommentByLine","selectedLineRanges","SearchMargin","startText","endText","textBefore","spaceBefore","spaceAfter","beforeOff","startSpace","endSpace","findBlockComment","prevLine","minIndent","changeSet","fromHistory","isolateHistory","invertedEffects","historyConfig","minDepth","newGroupDelay","joinToEvent","isAdjacent","adj","historyField_","HistoryState","fromHist","HistEvent","fromTransaction","undone","updateBranch","addSelection","isolate","addMapping","addChanges","historyState","undoSelection","redoSelection","histState","branch","startSelection","selectionsAfter","setSelAfter","selections","maxLen","newEvent","newBranch","conc","MaxSelectionsPerEvent","popSelection","addMappingToBranch","mapEvent","extraSelections","mappedChanges","fullMapping","joinableUserEvent","prevTime","prevUserEvent","eqSelectionShape","onlySelection","updateSel","setSel","moveSel","how","rangeEnd","cursorByChar","ltrAtCursor","cursorCharLeft","cursorCharRight","cursorByGroup","Intl","Segmenter","interestingNode","bracketProp","moveBySyntax","cursorByLine","cursorLineUp","cursorLineDown","pageInfo","selfScroll","cursorByPage","scrollRect","cursorPageUp","cursorPageDown","moveByLineBoundary","toMatchingBracket","extendSel","selectByChar","selectCharLeft","selectCharRight","selectByGroup","selectByLine","selectLineUp","selectLineDown","selectByPage","selectPageUp","selectPageDown","cursorDocStart","cursorDocEnd","selectDocStart","selectDocEnd","deleteBy","towards","skipAtomic","deleteByChar","targetPos","deleteCharBackward","deleteCharForward","deleteByGroup","nextChar","deleteGroupBackward","selectedLineBlocks","blocks","moveLine","nextLine","copyLine","insertNewlineAndIndent","newlineAndIndent","insertBlankLine","atEof","explode","isBetweenBrackets","changeBySelectedLine","atLine","indentMore","indentLess","keep","emacsStyleKeymap","standardKeymap","norm","crelt","basicNormalize","SearchCursor","bufferPos","nextOverlapping","baseFlags","RegExpCursor","MultilineRegExpCursor","ignoreCase","curLineStart","matchPos","toCharEnd","flattened","FlattenedDoc","cached","cachedFrom","createLineDialog","go","sign","percent","pc","dialogEffect","onsubmit","dialogField","defaultHighlightOptions","highlightWordAroundCursor","minSelectionLength","maxMatches","wholeWords","highlightConfig","highlightSelectionMatches","defaultTheme","matchHighlighter","matchDeco","mainMatchDeco","insideWordBoundaries","insideWord","searchConfigFacet","caseSensitive","wholeWord","createPanel","SearchPanel","scrollToMatch","SearchQuery","validRegExp","unquoted","unquote","RegExpQuery","StringQuery","getCursor","st","regexpCursor","stringCursor","categorizer","bufPos","charBefore","charAfter","stringWordTest","nextMatch","prevMatchInRange","prevMatch","getReplacement","_result","matchAll","highlight","setSearchQuery","togglePanel","searchState","SearchState","defaultQuery","createSearchPanel","matchMark","selectedMatchMark","searchHighlighter","searchCommand","openSearchPanel","findNext","announceMatch","selectSearchInput","findPrevious","selectMatches","replaceNext","replacement","announceText","_d","_e","selText","getSearchInput","searchInput","searchExtensions","closeSearchPanel","searchKeymap","selectWord","searchedText","fullWord","cycled","findNextOccurrence","commit","searchField","form","onchange","onkeyup","replaceField","caseField","reField","wordField","setQuery","AnnounceMargin","Break","font","CompletionContext","explicit","abortListeners","tokenBefore","matchBefore","expr","ensureAnchor","aborted","toSet","completeFromList","validFor","prefixMatch","Option","completion","addStart","addEnd","pickedCompletion","SourceCache","asSource","startCompletionEffect","closeCompletionEffect","FuzzyMatcher","byWord","upper","astral","firstSize","anyTo","preciseTo","byWordTo","byWordFolded","adjacentTo","adjacentStart","adjacentEnd","hasLower","wordAdjacent","completionConfig","activateOnTyping","selectOnOpen","closeOnBlur","maxRenderedOptions","defaultKeymap","tooltipClass","optionClass","aboveCursor","addToOptions","positionInfo","defaultPositionInfo","compareCompletions","localeCompare","interactionDelay","updateSyncTime","joinClass","info","narrow","spaceLeft","spaceRight","infoWidth","infoHeight","spaceBelow","rangeAroundSelected","CompletionTooltip","stateField","applyCompletion","infoDestroy","placeInfoReq","measureInfo","placeInfo","currentClass","cState","optionContent","_s","_v","labelElt","displayLabel","detailElt","updateTooltipClass","showOptions","createListBox","prevState","updateSelectedOption","destroyInfo","infoResult","addInfoPane","listRect","infoRect","selRect","ul","curSection","section","header","li","completionTooltip","boost","CompletionDialog","timestamp","makeAttrs","addOption","hasResult","getMatch","sectionOrder","sortOptions","selectedValue","CompletionState","ActiveSource","sameResults","setSelectedEffect","baseAttrs","getUserEvent","explicitPos","handleUserEvent","setActiveEffect","ActiveResult","checkValid","completionState","insertCompletionText","moveCompletionSelection","RunningQuery","updates","MaxUpdateCount","MinAbortTime","completionPlugin","debounceUpdate","running","debounceAccept","startQuery","doesReset","startUpdate","scheduleAccept","dialog","maxWidth_fallback","listStyle","textOverflow","FieldPos","FieldRange","Snippet","fieldPositions","instantiate","lineObj","tabs","fieldMarker","fieldRange","ActiveSnippet","selectionInsideField","moveToField","snippetState","fieldSelection","snippet","addSnippetKeymap","snippetPointerHandler","moveField","defaultSnippetKeymap","snippetKeymap","maps","snippetCompletion","stringPrefixes","closeBracketEffect","closedBracket","bracketState","definedClosing","tok","handleSame","handleOpen","closedBracketAt","handleClose","insertBracket","closeBracketsKeymap","dont","prevChar","closeBefore","_open","allowTriple","canStartStringAt","quoteToken","prefixes","maxPrefix","quotePos","probablyInString","charCat","autocompletion","completionKeymapExt","completionKeymap","SelectedDiagnostic","diagnostic","LintState","diagnostics","markedDiagnostics","diagnosticFilter","lintConfig","markerFilter","DiagnosticWidget","severity","markClass","findDiagnostic","hideTooltip","setDiagnosticsEffect","maybeEnableLint","lintState","lintExtensions","movePanelSelection","selPos","LintPanel","activeMark","lintTooltip","stackStart","stackEnd","tooltipFilter","diagnosticsTooltip","renderDiagnostic","closeLintPanel","lintKeymap","ViewPlugin","lintTime","setDiagnostics","logException","needsRefresh","assignKeys","assigned","inPanel","renderMessage","message","fired","keyIndex","nameElt","onmousedown","PanelItem","moveSelection","needsSync","newSelectedItem","_start","_end","underline","overflowY","background_fallback","color_fallback","basicSetup","chalky","highlightSpecialChars","drawSelection","syntaxHighlighting","defaultHighlightStyle","keymap","historyKeymap","stone","malibu","sage","whiskey","darkBackground","highlightBackground","tooltipBackground","oneDarkTheme","oneDarkHighlightStyle","Stack","reducePos","bufferBase","curContext","StackContext","dPrec","dynamicPrecedence","getGoto","minRepeatTerm","storeNode","reduceContext","lastBigReductionStart","bigReductionCount","lastBigReductionSize","stateFlag","baseStateID","term","isReduce","nextState","maxNode","shiftContext","nextStart","nextEnd","useNode","updateContext","tracker","reuse","stream","recoverByDelete","isNode","canShift","SimulatedStack","stateSlot","hasAction","recoverByInsert","nextStates","forceReduce","validAction","backup","findForcedReduction","allActions","rDepth","forceAll","deadEnd","sameState","dialectEnabled","dialectID","dialect","emitContext","emitLookAhead","setLookAhead","StackBufferCursor","maybeNext","decodeArray","Type","CachedToken","extended","mask","nullToken","InputStream","chunkOff","chunk2","chunk2Pos","readNext","resolveOffset","clipPos","resolved","acceptToken","getChunk","setDone","TokenGroup","tokenPrecTable","contextual","LocalTokenGroup","precTable","elseToken","ExternalTokenizer","precOffset","groupMask","accEnd","allows","overrides","findOffset","tableData","tableOffset","iPrev","verbose","env","LOG","stackIDs","cutAt","safeFrom","safeTo","trees","nextFragment","nodeAt","TokenCache","mainToken","tokenizers","getActions","actionIndex","updateCachedToken","addActions","eofTerm","getMainToken","specialized","specializers","putAction","recovering","nextStackID","minStackPos","topTerm","stacks","bufferLength","stopped","stoppedTokens","newStacks","advanceStack","finished","findFinished","stackID","stackToTree","SyntaxError","runRecovery","maxRemaining","strictCx","cxHash","defaultReduce","localStack","advanceFully","pushStackDedup","restarted","tokenEnd","forceBase","Dialect","ContextTracker","LRParser","version","nodeNames","repeatNodeCount","topTerms","topRules","nodeProps","setProp","nodeID","propSpec","skippedNodes","propSources","tokenArray","tokenData","specializerSpecs","getSpecializer","states","Uint32Array","stateData","maxTerm","dialects","dynamicPrecedences","tokenPrec","termNames","parseDialect","loose","groupTag","terminal","flag","deflt","external","contextTracker","descendantOp","Unit","callee","VariableName","colon","parenL","underscore","bracketL","dash","period","ampersand","backslash","isAlpha","identifiers","dashes","descendant","unitToken","cssHighlighting","NamespaceName","KeyframeName","KeyframeRangeName","TagName","ClassName","PseudoClassName","IdName","AttributeName","NumberLiteral","KeywordQuery","UnaryQueryOp","Callee","MatchOp","BinOp","Important","Comment","ColorLiteral","spec_callee","__proto__","domain","spec_AtKeyword","spec_identifier","_properties","properties","pseudoClasses","VariablesByNode","declSelector","astTop","variableNames","defineCSSCompletionSource","isDash","isVarArg","cssCompletionSource","cssLanguage","Declaration","commentTokens","indentOnInput","autocomplete","EndTag","SelfClosingEndTag","StartTag","StartScriptTag","StartStyleTag","StartTextareaTag","StartSelfClosingTag","StartCloseTag","NoMatchStartCloseTag","MismatchedStartCloseTag","missingCloseTag","IncompleteCloseTag","commentContent$1","Attribute","AttributeValue","UnquotedAttributeValue","ScriptText","StyleText","TextareaText","OpenTag","CloseTag","Dialect_noMatch","Dialect_selfClosing","selfClosers","area","hr","img","keygen","wbr","menuitem","implicitlyClosed","dd","optgroup","rp","rt","closeOnOpen","article","aside","blockquote","div","dl","fieldset","footer","h1","h2","h3","h4","h5","h6","hgroup","menu","ol","isSpace","cachedName","cachedInput","cachedPos","tagNameAfter","question","bang","lessThan","greaterThan","slash","ElementContext","startTagTerms","elementContext","tagStart","commentContent","endTag","selfClosing","inForeignElement","contentTokenizer","textToken","endToken","lastState","matchedLen","scriptTokens","styleTokens","textareaTokens","htmlHighlighting","Is","ProcessingInst","DoctypeDecl","openTag","att","findTagName","tagNameNode","maybeNest","configureNesting","textarea","nameNode","noSemi","incdec","incdecPrefix","JSXStartTag","insertSemi","spaces","LineComment","BlockComment","Dialect_jsx","braceR","semicolon","star","minus","lt","comma","trackNewline","insertSemicolon","noSemicolon","incdecToken","mayPostfix","identifierChar","jsx","jsHighlight","TemplateString","BooleanLiteral","Star","VariableDefinition","Label","PropertyName","PrivatePropertyName","PropertyDefinition","PrivatePropertyDefinition","UpdateOp","Escape","ArithOp","LogicOp","BitOp","CompareOp","Equals","Arrow","TypeName","TypeDefinition","JSXAttributeValue","JSXText","export","as","async","extends","true","false","typeof","new","await","public","readonly","instanceof","satisfies","in","const","import","keyof","infer","abstract","implements","let","var","using","interface","enum","declare","while","with","do","if","else","switch","case","try","finally","return","throw","continue","debugger","spec_word","accessor","spec_LessThan","snippets","typescriptSnippets","ScopeNodes","defID","functionContext","gatherCompletions","FunctionDeclaration","ClassDeclaration","ClassExpression","EnumDeclaration","TypeAliasDeclaration","NamespaceDeclaration","getScope","completions","gather","Identifier","dontComplete","localCompletionSource","isWord","javascriptLanguage","IfStatement","TryStatement","LabeledStatement","SwitchBody","isCase","Block","ArrowFunction","JSXElement","JSXEscape","closeBrackets","jsxSublanguage","typescriptLanguage","jsxLanguage","tsxLanguage","kwCompletion","keywords","typescriptKeywords","javascript","typescript","autoCloseTags","elementName","closeTags","findOpenTag","Targets","Charsets","Methods","Encs","Bool","Tags","ping","media","hreflang","abbr","shape","audio","mediagroup","crossorigin","preload","autoplay","loop","controls","bdi","bdo","cite","formaction","autofocus","formenctype","formmethod","formnovalidate","formtarget","caption","colgroup","radiogroup","datagrid","datalist","datetime","details","dfn","eventsource","figcaption","figure","enctype","novalidate","manifest","srcdoc","sandbox","seamless","ismap","usemap","dirname","maxlength","required","kbd","challenge","keytype","legend","sizes","charset","meter","optimum","noscript","typemustmatch","reversed","progress","ruby","samp","small","scoped","summary","sup","colspan","rowspan","headers","rows","srclang","video","poster","muted","GlobalAttrs","accesskey","dropzone","hidden","inert","itemid","itemprop","itemref","itemscope","itemtype","tabindex","eventAttributes","Schema","extraTags","extraAttrs","globalAttrs","allTags","globalAttrNames","findParentElement","allowedChildren","schema","parentInfo","openTags","completeTag","completeCloseTag","htmlCompletionFor","localAttrs","completeAttrName","quoteStart","quoteEnd","completeAttrValue","completeStartTag","htmlCompletionSourceWith","extraGlobalAttributes","jsonParser","defaultNesting","defaultAttrs","htmlPlain","Document","endElt","htmlLanguage","insertTransaction","didType","beautifyText","textIter","configRaw","beautifyConfig","beautified","stateLanguage","getBeautify","readOnlyCompartment","lineNumbersCompartment","autoFormat","readOnlyRanges","targetState","editorFromTextArea","getCodeLanguage","matchClosingTags","selfClosingTags","nestedLanguages","nestedAttributes","setReadonlyState","readonlyState","languageState","getEditor","getContent","autoFormaAll","CodeMirrorEditor","CodeMirror","variables","codeUpdated","txtarea","eventDrag","keySymbols","keySymbol","keySymbolOvrd","keyUpdate","keyUpdateInside","initLib","columnDefs","table_el","DataTable","columns","dataSrc","test2","integrity","crossOrigin","removable","badgable","stylable","unstylable","highlightable","copyable","layerable","selectable","hoverable","locked","dmode","parentAttr","toPropagate","initClasses","initComponents","initTraits","initToolbar","initScriptProps","scriptUpdated","tagUpdated","attrUpdated","_idUpdated","__emitUpdateTlb","__propToParent","avoidUpdateStyle","__isSymbolOrInst","__initSymb","__hasUm","__changesUp","__propSelfToParent","__onStyleChange","styleKeys","pros","setDragMode","$els","closestType","setClass","attrPrev","setAttributes","getAttributes","noClass","removeAttributes","attrArr","compAttr","optsAdd","getIdRule","cc","setIdRule","noStyle","addId","__getSymbol","__getSymbols","classe","getClasses","classStr","__logSymbol","toUp","symbol","symbols","__symbReady","__upSymbProps","__isSymbol","__isSymbolTop","__isSymbolNested","symbTopSelf","__getSymbTop","symbTop","__getAllById","symb","symbs","__isSymbOvrd","ovrd","prp","__getSymbToUp","fromInstance","noPropagate","propsChanged","__upSymbCls","__upSymbComps","optUp","toUpOpts","addSymb","addedInstances","toAppend","addedInst","addedTop","symbolInv","isSymbNested","toUpFn","symbPrnt","newMods","attrCls","toListen","clsArr","normalizeClasses","addChild","avoidChildren","__loadTraits","prevProps","prevPropsEv","newPropsEv","__scriptPropsChange","getLastChild","tb","getTraits","setTraits","getTrait","updateTrait","getTraitIndex","removeTrait","addTrait","clm","_inner","cloned","newId","defName","nameTag","i18nPfx","i18nName","i18nNameTag","i18nDefName","customName","noCustom","sTag","customAttr","getAttrToHTML","withProps","valueRes","altQuoteAttr","attrString","getInnerHTML","__innerHTML","getChangedProps","setId","frm","getCurrentView","modelProps","scrStr","reg","onAll","clb","forEachChild","rmOpts","sameParent","isInstanceOf","byType","resetId","oldId","_getStyleRule","idS","_getStyleSelector","idUpdate","idPrev","getList","getDefaults","nextId","getIncrementId","ilen","uid","dm","__escapeContent","frameborder","svgAttrs","ratioDefault","cmdName","hasButtonBool","getSrcResult","isDefaultSrc","srcDef","parseUri","uri","URL","hostname","protocol","port","qrs","getQueryObject","defs","mapUrl","mapType","parseFromSrc","updateSrc","getMapUrl","qr","z","rowsToAdd","columnsToAdd","yt","vi","ytnc","defProvider","hasParam","videoId","ytUrl","ytncUrl","viUrl","modestbranding","updatePropsFromAttr","updateTraits","getYoutubeTraits","getVimeoTraits","getSourceTraits","prov","getYoutubeSrc","getYoutubeNoCookieSrc","getVimeoSrc","getProviderTrait","getAutoplayTrait","getLoopTrait","getControlsTrait","isYtProv","isYtncProv","isViProv","isExtProv","childrenView","sameFrameView","getTypes","viewObject","logError","modelOpt","updateStyle","renderAttributes","updateHighlight","updateStatus","updateContent","onActive","onDisable","avoidRender","getEvents","_clbObj","__isDraggable","handleDragStart","updateClasses","importClasses","renderChildren","chgArr","selectedCls","selectedParentCls","freezedCls","hoveredCls","noPointerCls","selCls","noExtHl","noCustomSpotTarget","Target","avoidHover","clsStr","isTextable","hl","styleOpts","__cmpStyleOpts","onAttrUpdate","updateAttributes","textable","defaultAttr","hasComps","getChildrenContainer","prevDef","getChildrenSelector","getTemplate","gtop","gleft","assignRect","isInViewport","frameH","frameW","_setData","createDoc","postRender","createComment","__getSrc","dblclick","classEmpty","fetchFile","fu","Assets","FileUploader","uploadFile","asset","complete","getSrc","onError","noDrag","updateContentText","syncContent","rte","RichTextEditor","fromDisable","disableEditing","canActivate","rteEnabled","sameInEdit","getEditing","isInnerText","lastContent","activeRte","toggleEvents","contentOpt","customRte","parseContent","insertComponent","onInput","disablePropagation","mixins","setEditing","elDocs","getIframe","ifrm","frameBorder","scrCnt","scriptCount","svar","svarNext","svarFn","svarNextFn","createElementNS","updateProvider","updateVideo","renderByProvider","videoEl","renderYoutube","renderYoutubeNoCookie","renderVimeo","renderSource","initVideoEl","CanMoveReason","ComponentTableView","ComponentView","ComponentsView","componentHovered","selectAdd","selectRemove","getComponents","setComponents","addType","extendView","extendFn","extendFnView","extendType","extendViewType","typeToExtend","modelToExt","viewToExt","getExtendedObj","srcToExt","parentFn","removeType","getShallowWrapper","shallow","shallowEm","reason","InvalidSource","srcModel","SourceReject","isTargetInside","TargetReject","getById","maxValue","MAX_VALUE","compCls","buildFromModel","codeJson","onlyMatched","matchedRules","mRules","buildFromRule","sortMediaObject","rulesStr","ruleStr","dump","selectorStrNoAdd","skipAdd","selectorsAdd","singleAtRule","__cleanSelector","getQueryLength","mediaQuery","itemsArr","mquery","getKey","CSS","ensureSelectors","atRuleType","typeStr","addSelector","selOpts","stateStr","skipState","getDevice","deviceDefault","getState","stateValue","getStates","sngl","cmpId","ruleProps","wd","selAdd","a1S","a2S","CssRules","slc","singleSel","checkNode","sl","newSels","le","selec","modelExists","styleUpdate","addRules","setRule","atRuleParams","addStyles","getRule","optRuleSel","getCurrentMedia","getClassRule","getComponentRules","rulesView","sSel","appendOnClick","category","activate","getMedia","getCategoryLabel","ctg","BlocksEvents","Categories","endDrag","insertAt","getSorter","validTarget","__currentBlock","setDragHelper","__startDrag","handleDrag","__drag","__endDrag","clsAdd","caretR","caretD","iconClass","activeClass","updateVisibility","getIconEl","getBlocksEl","iconEl","blocksEl","renderedCategories","categories","noCatClass","blockContClass","catsClass","updateConfig","onDrop","ignoreCategories","catModel","catId","getCategoriesEl","catView","catsEl","Category","blocksVisible","bhv","__getBehaviour","_dragBlock","dragResult","oldKey","oldActive","toActive","dragEnd","__getFrameViews","_bhv","fv","blocksView","getAllVisible","getCategories","getDragBlock","toRender","colls","iconAdd","iconSync","iconTagOn","iconTagOff","iconTagRemove","componentFirst","State","inputProp","startEditTag","endEditTag","rename","innerText","changeStatus","removeTag","removeSelected","$chk","mainCls","stateInputId","stateInputC","componentChanged","checkSync","__handleStateChange","addNew","renderClasses","tagRemoved","renderStates","labelInfo","labelHead","syncStyle","getTarget","cssC","getCommonSelectors","ruleComponents","getTargets","ruleComponent","updateStateVis","addToClasses","startNewTag","$addBtn","endNewTag","onInputKeyUp","addNewTag","checkStates","statesEl","targets","trgs","validSelectors","__getCommonSelectors","_commonSelectors","__common","hasStyle","$btnSyncEl","getStatesC","updateSelector","elSel","__getName","selectedName","idRes","stateChanged","addSelected","$states","$statesC","labelStates","tmpOpts","renderRes","$classes","evCustom","evState","selectorEvents","cFirst","__update","__updateSelectedByComponents","__ctn","selTags","selectorTags","cOpts","cname","selModel","getSelector","setStates","__getCommon","duplicateSelected","commonSelectors","styleToApply","suffix","newSelector","getSelectedTargets","setComponentFirst","getComponentFirst","CSS_RULE_TYPES","AT_RULE_NAMES","AT_RULE_KEYS","SINGLE_AT_RULE_TYPES","NESTABLE_AT_RULE_NAMES","SINGLE_AT_RULE_NAMES","parseSelector","propName","propValue","getPropertyPriority","parseCondition","conditionText","selectorText","createNode","selLen","lastClass","stateArr","getNestableAtRule","cssRules","keyText","isSingleAtRule","subRules","subAtRuleType","lens","subRule","selsParsed","selsAdd","selsArr","lastRule","len3","selsAddStr","parsedNode","classSets","autosave","autoload","stepsBeforeSave","recovery","onStore","checkLocal","urlStore","urlLoad","contentTypeJson","fetchOptions","credentials","hasLocal","setItem","getItem","thr","AggregateError","errors","P","rejectionReasons","ex","setTimeoutFunc","_handled","_deferreds","doResolve","deferred","_immediateFn","onFulfilled","onRejected","promise","finale","_unhandledRejectionFn","Handler","prom","promiseFinally","allSettled","race","setImmediate","rej","XMLHttpRequest","withCredentials","statusText","responseText","upload","onProgress","onprogress","send","__props","parsable","typeJson","fetchOpts","reqHead","typeHead","FormData","StorageEvents","STORAGE_LOCAL","STORAGE_REMOTE","storages","setCurrent","isAutosave","setAutosave","getStepsBeforeSave","setStepsBeforeSave","storage","getStorages","getCurrent","currentStorage","getCurrentStorage","getStorageOptions","getCurrentOptions","getRecoveryStorage","recoveryOpts","__exec","recoveryStorage","recoveryData","__askRecovery","getRecovery","confirm","response","toStore","__clearKeys","onAfter","itemKey","startLoad","startStore","evAfter","afterLoad","afterStore","endLoad","endStore","errorLoad","errorStore","canAutoload","TraitsView","upAll","__upSel","__onUp","getTraitsViewer","baseView","hidable","hideTextnode","showWrapper","showHover","scrollCanvas","scrollLayers","highlightHover","onInit","sortContainer","ignoreViewChildren","avoidSelectOnEnd","viewLayer","ItemView","commandsDef","defComOptions","getOnComponentDragStart","getOnComponentDrag","getOnComponentDragEnd","altMode","CommandAbstract","defaultCommands","nativeDrag","hideTlb","fromMove","setDragImage","cmdMove","oldCmd","noStop","cmdObj","inputNameCls","clsTitleC","clsTitle","clsCaret","clsCount","clsMove","clsChildren","clsNoChild","clsEdit","clsNoEdit","initComponent","clsInput","gut","clsBase","checkChildren","updateOpening","updateLayerable","updateName","__render","getInputName","getVisibilityEl","eyeEl","hClass","toggleVisibility","setVisible","handleEdit","handleEditKey","handleEditEnd","inputName","clsOpen","clsChvOpen","getCaret","isOpen","toggleOpening","setOpen","handleSelect","setLayerData","handleHover","handleHoverOut","_rendered","__clearItems","__isLayerable","evRoot","evComponent","propsToListen","__onRootChange","__onComponent","prevDspKey","prevDisplay","updateLayer","setLocked","isLocked","getLayerData","cmpOpts","fromLayers","noAssets","uploadName","multiUpload","customFetch","embedAsBase64","handleAdd","beforeUpload","showUrlInput","openAssetsOnDrop","dropzoneContent","getFilename","getExtension","Asset","unitDim","__getBhv","getPreview","getInfo","AssetImageView","TypeableCollection","baseType","getBaseType","typeFound","recognizeType","typeView","ModelInst","ViewInst","extendViewApi","renderAssets","addToAsset","removedAsset","deselectAll","handleSubmit","getAddInput","assetsEl","getAssetsEl","globalCollection","inputUrl","toggleNoAssets","addAsset","fuRendered","AssetsView","submit","uploadId","disableUpload","FileUploaderView","onUploadStart","__propEv","onUploadEnd","onUploadError","onUploadResponse","fetchOptsResult","initDrop","that","uploadForm","ondragover","ondragleave","ondrop","initDropzone","addedCls","edEl","updatedCls","dropzoneCls","cleanEditorElCls","onDragOver","onDragLeave","promises","mimeTypeMatcher","Image","readAsDataURL","evOpen","evClose","evUpload","evUploadStart","evUploadEnd","evUploadError","evUploadRes","assetCmd","assetEvents","uploadStart","uploadEnd","uploadError","uploadResponse","assetsVis","assts","__viewParams","editorView","traitInputAttr","locale","localeFallback","detectLocale","messages","en","addButton","inputPlh","uploadTitle","labels","image","row","cell","desktop","tablet","mobileLandscape","mobilePortrait","titles","preview","fullscreen","emptyState","hover","fileButton","sectors","general","layout","typography","flex","dimension","_blank","recover","messagesAdd","addMessages","_localLang","setLocale","evObj","valuePrev","getLocale","getMessages","_debug","setMessages","localeFlb","lFlb","_getMsg","_addParams","userLanguage","msgSet","spotTarget","elT","elL","borderOffset","freezeClass","relative","offTop","offLeft","selectOnEnd","getDocuments","elDoc","dropModel","dropContent","updateTextViewCursorPosition","targetDoc","poiner","rangeParent","rangeOffset","setContentEditable","activeTextModel","toggleSortCursor","clonedEl","moveDragHelper","posY","posX","dragHelperStyle","createPlaceholder","prevTarget","sourceEl","getSourceModel","clearSelection","getTargetModel","isTextableActive","tempModel","selectTargetModel","targetModel","dsp","eO","rY","rX","mousePos","eventMove","sourceModel","dimsFromTarget","lastDims","disableTextable","movePlaceholder","prevTargetDim","$plh","isInFlow","styleInFlow","$parent","propFloat","trgModel","dragInfo","dropInfo","targetP","validResult","getDim","cacheDimsP","getChildrenDim","cacheDims","nearBorders","targetParent","getTargetFromEl","targetPrev","nearElBorders","getCurrentPos","elIndex","dirValue","indexEl","leftLimit","xLimit","yLimit","xCenter","yCenter","dimDown","trgDim","marg","margI","elDim","pT","pL","obj1","obj2","ancester","s1","toMoveArr","dst","modelToDrop","created","srcEl","warns","targetCollection","srcIndex","sameCollection","onUpdateContainer","minDim","maxDim","silentFrames","avoidContainerUpdate","tl","cr","bl","bc","setup","hdl","createHandler","toggleFrames","isHandler","getFocusedEl","getParentEl","parentElement","getBoundingRect","updateContainer","forceShow","handleMouseDown","mouseFetch","handlerAttr","clickedHandler","rectDim","parentDim","calc","updateRect","getSelectedHandler","elStyle","parentW","parentH","startW","startH","box","ratioActive","helpers","_handlers","_mods","_scope","_MODIFIERS","control","_MAP","backspace","tab","home","pageup","pagedown","_downKeys","modifierMap","updateModifierKey","clearModifier","assignKey","resetModifiers","getKeys","getMods","shortcut","mi","setScope","deleteScope","srcElement","isPressed","getPressedKeyCodes","multipleKeys","modifiersMatch","cancelBubble","keymaster","keymaps","defKeys","handlerRes","removeAll","backdrop","updateOpen","updateTitle","getCollector","$collector","$content","getTitle","$title","updateAttr","currAttr","_evData","titl","setTitle","onceOpen","getContentEl","swv","expt","osm","otm","ola","obl","opa","ful","prv","togglable","dragDrop","runDefaultCommand","stopDefaultCommand","deactivateAllExceptOne","deactivateAll","fromCollection","disableAllButtons","disableAllButtonsExceptOne","Buttons","btn","listen","activeCls","disableCls","btnsVisCls","updateActive","checkActive","updateBtnsVis","updateClassName","updateDisable","fromListen","$buttons","commandName","clicked","toggleActive","appendContent","toggleVisible","resz","resLen","resBools","forContainer","styleWidth","styleHeight","buttonsView","appendEl","getPanelsEl","PanelsViewObj","removePanel","panelId","removeButton","getButton","disableButtons","optsCodeViewer","htmlOpts","cleanId","beforeEach","isFunctionEmpty","mapModel","scrProps","mapJs","defaultViewer","generators","viewers","defGenerators","defViewers","loadDefaultGenerators","loadDefaultViewers","addGenerator","generator","getGenerator","getGenerators","addViewer","viewer","getViewer","getViewers","cont","updateViewer","getCode","genId","trackSelection","hasSkip","getChanged","hasUndo","chn","beforeCache","hasRedo","getInstance","getStack","getStackGroup","getGroupedStack","createItem","goToGroup","goTo","adjustToolbar","RichTextEditorActionState","RTE_KEY","btnState","isValidTag","parentAnchor","parentFocus","customElAttr","defActions","bold","italic","insertHTML","setEl","updateActiveActions","__onKeydown","__onPaste","acts","actionbar","inactive","isCustom","actionbarCont","actionbarContainer","addAction","styleWithCSS","currentState","INACTIVE","queryCommandSupported","queryCommandState","ACTIVE","__dbdTrgCustom","enabled","__toggleEffects","actionbarEl","syncActions","textHtml","deleteContents","nd","insertNode","toSel","eventsUp","initRte","globalRte","hideToolbar","actionRes","updatePosition","rteInst","currentView","hideNotStylable","highlightChanged","highlightComputed","showComputed","clearProperties","avoidComputed","functionName","toRequire","requires","requiresParent","parentTarget","__upTargets","Property","callInit","__getParentProp","parentProp","isClear","__getFullValue","kProps","__getClearProps","toProps","applyStyle","__up","__trgEv","propertyUpdate","__upTargetsStyle","addStyleTargets","_up","noTarget","noDefault","hasValue","getDefaultValue","parentValue","getParentTarget","hasValueParent","noParent","upValue","__parseValue","canClear","getParent","__canClearProp","isFull","parseValue","setValueFromInput","valueStr","numeric","num","withDefault","getFullValue","fnParameter","skipImportant","__setParentTarget","__parseFn","__checkVisibility","stylableReq","sector","getProperties","callParentInit","skipInit","getIndex","getValues","getLayerLabel","isSelected","getSelectedLayer","selectLayer","removeLayer","moveLayer","getStylePreview","hasPreview","upValues","isNumberType","detached","fromStyle","toStyle","__upProperties","getProperty","getPropertyAt","isDetached","getSeparator","getSplitSeparator","getJoin","__getJoin","getStyleFromProps","__clearIn","__upTargetsStyleProps","__setProperties","__getSplitValue","__styleHasProps","nameProps","__splitValue","sep","__splitStyleName","props4Nums","__getPropsFromStyle","valuesStr","VALUES_REG","PARTS_REG","layerSeparator","layerJoin","layerLabel","selectedLayer","layersColl","__upSelected","__upLayers","getLayers","__getLayers","getLayer","__select","selectLayerAt","currIndex","addLayer","removeLayerAt","getStyleFromLayer","joinLayers","__getJoinLayers","getLayerSeparator","getStyleFromLayers","layerSelect","__layers","__setLayers","newLayers","layersNew","__parseLayer","parseFn","__getLayersFromStyle","separatorLayers","inLayer","clearProp","__destroyFn","onValueChange","iconClose","_getClbOpts","computedCls","labelEl","clearStyleEl","getClearEl","clearStyle","clearEl","inputValueChanged","emit","__setValueInput","clearCached","__unset","__change","__updateStyle","final","createdEl","clsType","propsView","iconMove","propertyView","pModel","updateLabel","getPropertiesWrapper","propsWrapEl","getPreviewEl","previewEl","getLabelEl","prvEl","wrapEl","iconPlus","layersView","prvBoxEl","openAssetManager","inputInst","handleModelChange","elementUpdated","__onInputChange","Input","inp","__handleChange","getOption","idSel","getOptionId","getOptionLabel","optId","propId","__onOptionChange","updateOptions","styleAttr","inputH","firstOpt","firstId","itemCls","elId","titleAttr","inputHld","inputIn","contClass","validObj","limitlessMax","limitlessMin","valCopy","uN","InputNumber","getUnits","getUnit","getMin","getMax","getStep","upUnit","valueProp","unitProp","getSliderEl","inputValueChangedSoft","propertyAdd","propertyRemove","builded","buildProperties","buildProps","extendProperties","checkExtend","propsModel","extendBuilded","withValue","withParentValue","addProperty","moProps","pLen","mProps","isolated","mProp","mPProps","buildP","builtIn","sect","typeNumber","typeColor","typeRadio","typeSelect","typeFile","typeSlider","typeComposite","typeStack","unitsSize","unitsSizeNoPerc","unitsTime","unitsAngle","ss","optsFlex","optsFlexAlign","optsBgSize","optsBgAttach","optsBgRepeat","optsWrap","optsOverflow","optsDir","opstDisplay","optsTransitFn","optsCursor","optsFloat","optsPos","optsTextAlign","optsJustCont","optsAlignCont","optsAlignSelf","optsTransitProp","optsBorderStyle","optsBgPos","optsWeight","optsShadowType","optsFonts","fixedFontSizes","fixedLetSpace","requireFlex","__sub","propsToCreate","spread","propToUp","fromRes","clsPfx","getPropertiesEl","renderProperties","objs","evSector","evSectorAdd","evSectorRemove","evSectorUpdate","evProp","evPropAdd","evPropRemove","evPropUp","evLayerSelect","evTarget","propDef","stylesEvents","sectorAdd","sectorRemove","sectorUpdate","Sector","__clearStateTarget","upProps","__upProps","trgCustom","stateTarget","__getStateTarget","addSector","getSector","_logNoSector","getSectors","removeSector","sectorId","removeProperty","lastTarget","lastTargetParents","getParentRules","getSelectedParents","getBuiltIn","getBuiltInAll","addBuiltIn","smConf","useClasses","deviceW","cssGen","optsSel","cmpRules","otherRules","rulesBySelectors","rSel","createType","SectView","parentStyles","__upProp","sectorVisible","hasVal","isStack","isComposite","canUpdate","parentItem","storableDeps","Window","ar","logs","warning","__skip","defaultRunning","dragMode","toLog","attrsOrig","pageManager","constr","loadModule","loadStorableModule","updateChanges","_checkReady","listenLog","eventFrom","eventTo","editing","clipboard","previousModel","storables","toLoad","loadOnStart","headless","Storage","loadData","_storageTimeout","EditorModel","stm","getDirtyCount","updateItr","onbeforeunload","InitModule","Mod","handleUpdates","timedInterval","mltSel","toggleSelected","selColl","selIndex","forceChange","upHovered","getHovered","selectedAll","typeHover","typeSpacing","getJs","avoidProt","avoidProtected","protCss","storeData","clearDirtyCount","loadOptions","editingCmp","destroyAll","grapesjs","logNs","logInfo","initBaseColorPicker","varName","classNames","contEl","shallowCanvasEl","I18n","addComponents","getSelectedToStyle","selectToggle","setDevice","setCustomRte","setCustomParserCss","onReady","getPlugin","pluginId","wplg","getPluginById","logPluginWarn","plg","agent","isIE","DOMImplementation","createHTMLDocument","implementation","polyfills","usePlugin","pluginResult","initConfig","autorender","pluginsOpts","plgOptions"],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"grapes.min.js","mappings":";CAAA,SAA2CA,EAAMC,GAC1B,iBAAZC,SAA0C,iBAAXC,OACxCA,OAAOD,QAAUD,IACQ,mBAAXG,QAAyBA,OAAOC,IAC9CD,OAAO,GAAIH,GACe,iBAAZC,QACdA,QAAQ,YAAcD,IAEtBD,EAAK,YAAcC,GACpB,CATD,CASyB,oBAAfK,WAA6BA,WAAgC,oBAAXC,OAAyBA,OAASC,MAAO,I,wCCTrG,QAkEI,IAEF,EAAO,CACL,MACA,OACA,aAGD,KAFE,EAAF,SAAWC,EAAaC,EAAcC,GACrC,OA1BJ,SAAsBF,EAAaC,EAAcC,GAE/C,IAAIC,EAAW,SAASC,EAAKC,GAC3B,OAAOL,EAAYA,YAAYI,EAAKC,EACtC,EAYA,OATAF,EAASG,GAAKN,EAAYA,YAC1BG,EAASI,IAAMN,EAAaA,aAC5BE,EAASK,KAAON,EAAcA,cAG9BC,EAASH,YAAcA,EAAYA,YACnCG,EAASF,aAAeA,EAAaA,aACrCE,EAASD,cAAgBA,EAAcA,cAEhCC,CACT,CASWM,CAAaT,EAAaC,EAAcC,EAChD,6B,cC1EH,OAgEC,WAGD,IAAIQ,GACK,WACC,aACA,IAAIC,EAAsB,CAC7B,CACA,CAED,SAAUjB,GA+BhB,SAASkB,EAAWC,GAClBd,KAAKe,SAAWD,EAChBd,KAAKgB,kBAAoB,EAEzBhB,KAAKiB,gBAAkB,EACvBjB,KAAKkB,kBAAoB,EACzBlB,KAAKmB,mBAAqB,EAC1BnB,KAAKoB,6BAA+B,EACpCpB,KAAKqB,2BAA6B,EAClCrB,KAAKsB,6BAA+B,EAEpCtB,KAAKuB,QAAU,EACjB,CAoIA,SAASC,EAAkBC,EAASC,GAClC1B,KAAK2B,QAAU,CAAC,IAChB3B,KAAK4B,cAAgBH,EAAQI,YAC7B7B,KAAK8B,gBAAkBL,EAAQM,YAC1BN,EAAQO,mBACXh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a,MAAMgS,SAASi4O,eAAgB,CAACrvO,GACpE,CACF,CACD,CC1BDsvO,GAEA,IAAM36H,GAAU,IAAI,GACdtnG,GAAoB,GAcbsgO,GAAW,CACtBlhP,EAAC,aAED4gB,QAAO,GAEPsnG,QAAO,GAEP46H,UAnBuB,SAAiCrrI,EAAW52G,GACnE,IAAIkiP,EAAeb,GAAUzqI,EAAQyQ,IAErC,OAAO,SAAC5yG,GACFytO,EACFA,EAAaztO,EAAQzU,GAAQ,CAAC,GAE9ByhP,GAAchtO,EAAQmiG,EAE1B,CACF,EAYE4mE,QAAS,UAkBT7mK,KAAI,SAACprC,QAAA,IAAAA,IAAAA,EAAA,IACK,IAAA8yQ,EAAa9yQ,EAAM,SACrByiE,EAAMziE,EAAO65C,UACnB,IAAK4oB,IAAQqwM,EAAU,MAAM,IAAIjqQ,MAAM,2BACvC,IAAM+tQ,EAAU,OACdC,YAAY,EACZ/6H,QAAS,GACTg7H,YAAa,CAAC,GACX92Q,GAAM,CACT80Q,SAAUp1Q,KACVw+B,GAAI40O,OAAWpsQ,GAAY,IAAA8vC,WAAUisB,GAAOA,EAAOlkC,SAASmQ,cAAc+zB,KAEtEv5B,EAAS,IAAI,GAAO0tO,EAAY,CAAEhjP,EAAC,eACnC8T,EAAKwB,EAAOiE,WAqBlB,OAlBAypO,EAAW96H,QAASz8G,SAAQ,SAAA02O,GAC1B,IAAM1qI,EAASyqI,GAAUC,EAAUj6H,IAC7Bi7H,EAAaH,EAAWE,YAAaf,IAAuB,CAAC,EAE/D1qI,EACFA,EAAOniG,EAAQ6tO,GAEfb,GAAchtO,EAAQ6sO,EAE1B,IAKAruO,EAAGmrO,cACH+D,EAAWC,aAAe/D,GAAY5pO,EAAOvL,SAC7C6W,GAAQlwC,KAAK4kC,GAENA,CACT,GA6CF,W","sources":["webpack://grapesjs/webpack/universalModuleDefinition","webpack://grapesjs/./node_modules/@qwex/codemirror-beautify/node_modules/js-beautify/js/index.js","webpack://grapesjs/./node_modules/@qwex/codemirror-beautify/node_modules/js-beautify/js/lib/beautify-css.js","webpack://grapesjs/./node_modules/@qwex/codemirror-beautify/node_modules/js-beautify/js/lib/beautify-html.js","webpack://grapesjs/./node_modules/@qwex/codemirror-beautify/node_modules/js-beautify/js/lib/beautify.js","webpack://grapesjs/./node_modules/backbone-undo/Backbone.Undo.js","webpack://grapesjs/./node_modules/backbone/backbone.js","webpack://grapesjs/./src/abstract/ModuleModel.ts","webpack://grapesjs/./src/canvas/model/CanvasSpot.ts","webpack://grapesjs/./src/commands/view/CanvasClear.ts","webpack://grapesjs/./src/commands/view/CanvasMove.ts","webpack://grapesjs/./src/commands/view/CommandAbstract.ts","webpack://grapesjs/./src/commands/view/ComponentDelete.ts","webpack://grapesjs/./src/commands/view/ComponentDrag.ts","webpack://grapesjs/./src/commands/view/ComponentEnter.ts","webpack://grapesjs/./src/commands/view/ComponentExit.ts","webpack://grapesjs/./src/commands/view/ComponentNext.ts","webpack://grapesjs/./src/commands/view/ComponentPrev.ts","webpack://grapesjs/./src/commands/view/ComponentStyleClear.ts","webpack://grapesjs/./src/commands/view/CopyComponent.ts","webpack://grapesjs/./src/commands/view/ExportTemplate.ts","webpack://grapesjs/./src/commands/view/Fullscreen.ts","webpack://grapesjs/./src/commands/view/MoveComponent.ts","webpack://grapesjs/./src/commands/view/OpenAssets.ts","webpack://grapesjs/./src/commands/view/OpenBlocks.ts","webpack://grapesjs/./src/commands/view/OpenLayers.ts","webpack://grapesjs/./src/commands/view/OpenPages.ts","webpack://grapesjs/./src/commands/view/OpenStyleManager.ts","webpack://grapesjs/./src/commands/view/OpenTraitManager.ts","webpack://grapesjs/./src/commands/view/PasteComponent.ts","webpack://grapesjs/./src/commands/view/Preview.ts","webpack://grapesjs/./src/commands/view/Resize.ts","webpack://grapesjs/./src/dom_components/model/ToolbarButton.ts","webpack://grapesjs/./src/dom_components/model/Toolbar.ts","webpack://grapesjs/./src/domain_abstract/view/DomainViews.ts","webpack://grapesjs/./src/dom_components/view/ToolbarButtonView.ts","webpack://grapesjs/./src/dom_components/view/ToolbarView.ts","webpack://grapesjs/./src/commands/view/SelectComponent.ts","webpack://grapesjs/./src/commands/view/SelectPosition.ts","webpack://grapesjs/./src/commands/view/ShowOffset.ts","webpack://grapesjs/./src/commands/view/SwitchVisibility.ts","webpack://grapesjs/./src/common/index.ts","webpack://grapesjs/./src/utils/Dragger.ts","webpack://grapesjs/./src/utils/cash-dom.ts","webpack://grapesjs/./src/utils/dom.ts","webpack://grapesjs/./src/utils/mixins.ts","webpack://grapesjs/./src/commands/view/ sync ^\\.\\/.*$","webpack://grapesjs/./node_modules/underscore/modules/_setup.js","webpack://grapesjs/./node_modules/underscore/modules/restArguments.js","webpack://grapesjs/./node_modules/underscore/modules/isObject.js","webpack://grapesjs/./node_modules/underscore/modules/isNull.js","webpack://grapesjs/./node_modules/underscore/modules/isUndefined.js","webpack://grapesjs/./node_modules/underscore/modules/isBoolean.js","webpack://grapesjs/./node_modules/underscore/modules/isElement.js","webpack://grapesjs/./node_modules/underscore/modules/_tagTester.js","webpack://grapesjs/./node_modules/underscore/modules/isString.js","webpack://grapesjs/./node_modules/underscore/modules/isNumber.js","webpack://grapesjs/./node_modules/underscore/modules/isDate.js","webpack://grapesjs/./node_modules/underscore/modules/isRegExp.js","webpack://grapesjs/./node_modules/underscore/modules/isError.js","webpack://grapesjs/./node_modules/underscore/modules/isSymbol.js","webpack://grapesjs/./node_modules/underscore/modules/isArrayBuffer.js","webpack://grapesjs/./node_modules/underscore/modules/isFunction.js","webpack://grapesjs/./node_modules/underscore/modules/_hasObjectTag.js","webpack://grapesjs/./node_modules/underscore/modules/_stringTagBug.js","webpack://grapesjs/./node_modules/underscore/modules/isDataView.js","webpack://grapesjs/./node_modules/underscore/modules/isArray.js","webpack://grapesjs/./node_modules/underscore/modules/_has.js","webpack://grapesjs/./node_modules/underscore/modules/isArguments.js","webpack://grapesjs/./node_modules/underscore/modules/isFinite.js","webpack://grapesjs/./node_modules/underscore/modules/isNaN.js","webpack://grapesjs/./node_modules/underscore/modules/constant.js","webpack://grapesjs/./node_modules/underscore/modules/_createSizePropertyCheck.js","webpack://grapesjs/./node_modules/underscore/modules/_shallowProperty.js","webpack://grapesjs/./node_modules/underscore/modules/_getByteLength.js","webpack://grapesjs/./node_modules/underscore/modules/_isBufferLike.js","webpack://grapesjs/./node_modules/underscore/modules/isTypedArray.js","webpack://grapesjs/./node_modules/underscore/modules/_getLength.js","webpack://grapesjs/./node_modules/underscore/modules/_collectNonEnumProps.js","webpack://grapesjs/./node_modules/underscore/modules/keys.js","webpack://grapesjs/./node_modules/underscore/modules/isEmpty.js","webpack://grapesjs/./node_modules/underscore/modules/isMatch.js","webpack://grapesjs/./node_modules/underscore/modules/underscore.js","webpack://grapesjs/./node_modules/underscore/modules/_toBufferView.js","webpack://grapesjs/./node_modules/underscore/modules/isEqual.js","webpack://grapesjs/./node_modules/underscore/modules/allKeys.js","webpack://grapesjs/./node_modules/underscore/modules/_methodFingerprint.js","webpack://grapesjs/./node_modules/underscore/modules/isMap.js","webpack://grapesjs/./node_modules/underscore/modules/isWeakMap.js","webpack://grapesjs/./node_modules/underscore/modules/isSet.js","webpack://grapesjs/./node_modules/underscore/modules/isWeakSet.js","webpack://grapesjs/./node_modules/underscore/modules/values.js","webpack://grapesjs/./node_modules/underscore/modules/pairs.js","webpack://grapesjs/./node_modules/underscore/modules/invert.js","webpack://grapesjs/./node_modules/underscore/modules/functions.js","webpack://grapesjs/./node_modules/underscore/modules/_createAssigner.js","webpack://grapesjs/./node_modules/underscore/modules/extend.js","webpack://grapesjs/./node_modules/underscore/modules/extendOwn.js","webpack://grapesjs/./node_modules/underscore/modules/defaults.js","webpack://grapesjs/./node_modules/underscore/modules/_baseCreate.js","webpack://grapesjs/./node_modules/underscore/modules/create.js","webpack://grapesjs/./node_modules/underscore/modules/clone.js","webpack://grapesjs/./node_modules/underscore/modules/tap.js","webpack://grapesjs/./node_modules/underscore/modules/toPath.js","webpack://grapesjs/./node_modules/underscore/modules/_toPath.js","webpack://grapesjs/./node_modules/underscore/modules/_deepGet.js","webpack://grapesjs/./node_modules/underscore/modules/get.js","webpack://grapesjs/./node_modules/underscore/modules/has.js","webpack://grapesjs/./node_modules/underscore/modules/identity.js","webpack://grapesjs/./node_modules/underscore/modules/matcher.js","webpack://grapesjs/./node_modules/underscore/modules/property.js","webpack://grapesjs/./node_modules/underscore/modules/_optimizeCb.js","webpack://grapesjs/./node_modules/underscore/modules/_baseIteratee.js","webpack://grapesjs/./node_modules/underscore/modules/iteratee.js","webpack://grapesjs/./node_modules/underscore/modules/_cb.js","webpack://grapesjs/./node_modules/underscore/modules/mapObject.js","webpack://grapesjs/./node_modules/underscore/modules/noop.js","webpack://grapesjs/./node_modules/underscore/modules/propertyOf.js","webpack://grapesjs/./node_modules/underscore/modules/times.js","webpack://grapesjs/./node_modules/underscore/modules/random.js","webpack://grapesjs/./node_modules/underscore/modules/now.js","webpack://grapesjs/./node_modules/underscore/modules/_createEscaper.js","webpack://grapesjs/./node_modules/underscore/modules/_escapeMap.js","webpack://grapesjs/./node_modules/underscore/modules/escape.js","webpack://grapesjs/./node_modules/underscore/modules/unescape.js","webpack://grapesjs/./node_modules/underscore/modules/_unescapeMap.js","webpack://grapesjs/./node_modules/underscore/modules/templateSettings.js","webpack://grapesjs/./node_modules/underscore/modules/template.js","webpack://grapesjs/./node_modules/underscore/modules/result.js","webpack://grapesjs/./node_modules/underscore/modules/uniqueId.js","webpack://grapesjs/./node_modules/underscore/modules/chain.js","webpack://grapesjs/./node_modules/underscore/modules/_executeBound.js","webpack://grapesjs/./node_modules/underscore/modules/partial.js","webpack://grapesjs/./node_modules/underscore/modules/bind.js","webpack://grapesjs/./node_modules/underscore/modules/_isArrayLike.js","webpack://grapesjs/./node_modules/underscore/modules/_flatten.js","webpack://grapesjs/./node_modules/underscore/modules/bindAll.js","webpack://grapesjs/./node_modules/underscore/modules/memoize.js","webpack://grapesjs/./node_modules/underscore/modules/delay.js","webpack://grapesjs/./node_modules/underscore/modules/defer.js","webpack://grapesjs/./node_modules/underscore/modules/throttle.js","webpack://grapesjs/./node_modules/underscore/modules/debounce.js","webpack://grapesjs/./node_modules/underscore/modules/wrap.js","webpack://grapesjs/./node_modules/underscore/modules/negate.js","webpack://grapesjs/./node_modules/underscore/modules/compose.js","webpack://grapesjs/./node_modules/underscore/modules/after.js","webpack://grapesjs/./node_modules/underscore/modules/before.js","webpack://grapesjs/./node_modules/underscore/modules/once.js","webpack://grapesjs/./node_modules/underscore/modules/findKey.js","webpack://grapesjs/./node_modules/underscore/modules/_createPredicateIndexFinder.js","webpack://grapesjs/./node_modules/underscore/modules/findIndex.js","webpack://grapesjs/./node_modules/underscore/modules/findLastIndex.js","webpack://grapesjs/./node_modules/underscore/modules/sortedIndex.js","webpack://grapesjs/./node_modules/underscore/modules/_createIndexFinder.js","webpack://grapesjs/./node_modules/underscore/modules/indexOf.js","webpack://grapesjs/./node_modules/underscore/modules/lastIndexOf.js","webpack://grapesjs/./node_modules/underscore/modules/find.js","webpack://grapesjs/./node_modules/underscore/modules/findWhere.js","webpack://grapesjs/./node_modules/underscore/modules/each.js","webpack://grapesjs/./node_modules/underscore/modules/map.js","webpack://grapesjs/./node_modules/underscore/modules/_createReduce.js","webpack://grapesjs/./node_modules/underscore/modules/reduce.js","webpack://grapesjs/./node_modules/underscore/modules/reduceRight.js","webpack://grapesjs/./node_modules/underscore/modules/filter.js","webpack://grapesjs/./node_modules/underscore/modules/reject.js","webpack://grapesjs/./node_modules/underscore/modules/every.js","webpack://grapesjs/./node_modules/underscore/modules/some.js","webpack://grapesjs/./node_modules/underscore/modules/contains.js","webpack://grapesjs/./node_modules/underscore/modules/invoke.js","webpack://grapesjs/./node_modules/underscore/modules/pluck.js","webpack://grapesjs/./node_modules/underscore/modules/where.js","webpack://grapesjs/./node_modules/underscore/modules/max.js","webpack://grapesjs/./node_modules/underscore/modules/min.js","webpack://grapesjs/./node_modules/underscore/modules/toArray.js","webpack://grapesjs/./node_modules/underscore/modules/sample.js","webpack://grapesjs/./node_modules/underscore/modules/shuffle.js","webpack://grapesjs/./node_modules/underscore/modules/sortBy.js","webpack://grapesjs/./node_modules/underscore/modules/_group.js","webpack://grapesjs/./node_modules/underscore/modules/groupBy.js","webpack://grapesjs/./node_modules/underscore/modules/indexBy.js","webpack://grapesjs/./node_modules/underscore/modules/countBy.js","webpack://grapesjs/./node_modules/underscore/modules/partition.js","webpack://grapesjs/./node_modules/underscore/modules/size.js","webpack://grapesjs/./node_modules/underscore/modules/_keyInObj.js","webpack://grapesjs/./node_modules/underscore/modules/pick.js","webpack://grapesjs/./node_modules/underscore/modules/omit.js","webpack://grapesjs/./node_modules/underscore/modules/initial.js","webpack://grapesjs/./node_modules/underscore/modules/first.js","webpack://grapesjs/./node_modules/underscore/modules/rest.js","webpack://grapesjs/./node_modules/underscore/modules/last.js","webpack://grapesjs/./node_modules/underscore/modules/compact.js","webpack://grapesjs/./node_modules/underscore/modules/flatten.js","webpack://grapesjs/./node_modules/underscore/modules/difference.js","webpack://grapesjs/./node_modules/underscore/modules/without.js","webpack://grapesjs/./node_modules/underscore/modules/uniq.js","webpack://grapesjs/./node_modules/underscore/modules/union.js","webpack://grapesjs/./node_modules/underscore/modules/intersection.js","webpack://grapesjs/./node_modules/underscore/modules/unzip.js","webpack://grapesjs/./node_modules/underscore/modules/zip.js","webpack://grapesjs/./node_modules/underscore/modules/object.js","webpack://grapesjs/./node_modules/underscore/modules/range.js","webpack://grapesjs/./node_modules/underscore/modules/chunk.js","webpack://grapesjs/./node_modules/underscore/modules/_chainResult.js","webpack://grapesjs/./node_modules/underscore/modules/mixin.js","webpack://grapesjs/./node_modules/underscore/modules/underscore-array-methods.js","webpack://grapesjs/./node_modules/underscore/modules/index-default.js","webpack://grapesjs/webpack/bootstrap","webpack://grapesjs/webpack/runtime/compat get default export","webpack://grapesjs/webpack/runtime/define property getters","webpack://grapesjs/webpack/runtime/global","webpack://grapesjs/webpack/runtime/hasOwnProperty shorthand","webpack://grapesjs/webpack/runtime/make namespace object","webpack://grapesjs/./src/utils/html.ts","webpack://grapesjs/./src/editor/config/config.ts","webpack://grapesjs/./src/editor/model/Selected.ts","webpack://grapesjs/./src/abstract/Module.ts","webpack://grapesjs/./src/canvas/config/config.ts","webpack://grapesjs/./src/device_manager/config/config.ts","webpack://grapesjs/./src/device_manager/model/Device.ts","webpack://grapesjs/./src/device_manager/model/Devices.ts","webpack://grapesjs/./src/device_manager/view/DevicesView.ts","webpack://grapesjs/./src/device_manager/index.ts","webpack://grapesjs/./src/abstract/ModuleCollection.ts","webpack://grapesjs/./src/canvas/model/Frame.ts","webpack://grapesjs/./src/canvas/model/Frames.ts","webpack://grapesjs/./src/pages/model/Page.ts","webpack://grapesjs/./src/pages/model/Pages.ts","webpack://grapesjs/./src/common/traits/model/Trait.ts","webpack://grapesjs/./src/common/traits/model/TraitGroupItem.ts","webpack://grapesjs/./src/common/traits/model/TraitGroup.ts","webpack://grapesjs/./src/common/traits/model/TraitList.ts","webpack://grapesjs/./src/common/traits/model/TraitSingle.ts","webpack://grapesjs/./src/common/traits/model/TraitFactory.ts","webpack://grapesjs/./src/common/traits/view/TraitView.ts","webpack://grapesjs/./src/common/traits/view/TraitInputView.ts","webpack://grapesjs/./src/common/traits/view/TraitTextView.ts","webpack://grapesjs/./src/pages/view/PageView.ts","webpack://grapesjs/./src/pages/view/PagesView.ts","webpack://grapesjs/./src/pages/config/config.ts","webpack://grapesjs/./src/common/traits/view/TraitButtonView.ts","webpack://grapesjs/./src/common/traits/view/TraitCheckboxView.ts","webpack://grapesjs/./src/utils/ColorPicker.ts","webpack://grapesjs/./src/common/traits/view/TraitColorView.ts","webpack://grapesjs/./src/common/traits/view/TraitNumberView.ts","webpack://grapesjs/./src/common/traits/view/TraitSelectView.ts","webpack://grapesjs/./src/pages/view/PageEditView.ts","webpack://grapesjs/./src/pages/index.ts","webpack://grapesjs/./src/canvas/model/Canvas.ts","webpack://grapesjs/./src/canvas/model/CanvasSpots.ts","webpack://grapesjs/./src/canvas/types.ts","webpack://grapesjs/./src/abstract/ModuleView.ts","webpack://grapesjs/./src/abstract/ModuleDomainViews.ts","webpack://grapesjs/./src/css_composer/view/CssRuleView.ts","webpack://grapesjs/./src/css_composer/view/CssGroupRuleView.ts","webpack://grapesjs/./src/css_composer/view/CssRulesView.ts","webpack://grapesjs/./src/utils/Droppable.ts","webpack://grapesjs/./src/canvas/view/FrameView.ts","webpack://grapesjs/./src/canvas/view/FrameWrapView.ts","webpack://grapesjs/./src/canvas/view/FramesView.ts","webpack://grapesjs/./src/canvas/view/CanvasView.ts","webpack://grapesjs/./src/canvas/index.ts","webpack://grapesjs/./src/dom_components/config/config.ts","webpack://grapesjs/./src/parser/model/BrowserParserHtml.ts","webpack://grapesjs/./src/parser/model/ParserHtml.ts","webpack://grapesjs/./src/domain_abstract/model/StyleableModel.ts","webpack://grapesjs/./src/dom_components/model/Components.ts","webpack://grapesjs/./src/selector_manager/model/Selector.ts","webpack://grapesjs/./src/selector_manager/model/Selectors.ts","webpack://grapesjs/./src/common/traits/view/TraitListView.ts","webpack://grapesjs/./src/common/traits/view/TraitsView.ts","webpack://grapesjs/./node_modules/@codemirror/state/dist/index.js","webpack://grapesjs/./node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js","webpack://grapesjs/./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js","webpack://grapesjs/./node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js","webpack://grapesjs/./node_modules/@babel/runtime/helpers/esm/iterableToArray.js","webpack://grapesjs/./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js","webpack://grapesjs/./node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js","webpack://grapesjs/./node_modules/@babel/runtime/helpers/esm/typeof.js","webpack://grapesjs/./node_modules/@babel/runtime/helpers/esm/classCallCheck.js","webpack://grapesjs/./node_modules/@babel/runtime/helpers/esm/toPropertyKey.js","webpack://grapesjs/./node_modules/@babel/runtime/helpers/esm/toPrimitive.js","webpack://grapesjs/./node_modules/@babel/runtime/helpers/esm/createClass.js","webpack://grapesjs/./node_modules/w3c-keyname/index.js","webpack://grapesjs/./node_modules/style-mod/src/style-mod.js","webpack://grapesjs/./node_modules/@codemirror/view/dist/index.js","webpack://grapesjs/./node_modules/codemirror-readonly-ranges/dist/index.es.js","webpack://grapesjs/./node_modules/@lezer/common/dist/index.js","webpack://grapesjs/./node_modules/@lezer/highlight/dist/index.js","webpack://grapesjs/./node_modules/@codemirror/language/dist/index.js","webpack://grapesjs/./node_modules/@codemirror/commands/dist/index.js","webpack://grapesjs/./node_modules/crelt/index.js","webpack://grapesjs/./node_modules/@codemirror/search/dist/index.js","webpack://grapesjs/./node_modules/@codemirror/autocomplete/dist/index.js","webpack://grapesjs/./node_modules/@codemirror/lint/dist/index.js","webpack://grapesjs/./node_modules/codemirror/dist/index.js","webpack://grapesjs/./node_modules/@codemirror/theme-one-dark/dist/index.js","webpack://grapesjs/./node_modules/@lezer/lr/dist/index.js","webpack://grapesjs/./node_modules/@lezer/css/dist/index.js","webpack://grapesjs/./node_modules/@codemirror/lang-css/dist/index.js","webpack://grapesjs/./node_modules/@lezer/html/dist/index.js","webpack://grapesjs/./node_modules/@lezer/javascript/dist/index.js","webpack://grapesjs/./node_modules/@codemirror/lang-javascript/dist/index.js","webpack://grapesjs/./node_modules/@codemirror/lang-html/dist/index.js","webpack://grapesjs/./node_modules/@qwex/codemirror-beautify/dist/index.js","webpack://grapesjs/./src/code_manager/model/CodeMirrorEditor.ts","webpack://grapesjs/./src/common/traits/view/TraitFunctionView.ts","webpack://grapesjs/./src/common/traits/index.ts","webpack://grapesjs/./src/dom_components/model/Component.ts","webpack://grapesjs/./src/dom_components/model/ComponentTextNode.ts","webpack://grapesjs/./src/dom_components/model/ComponentComment.ts","webpack://grapesjs/./src/dom_components/model/ComponentFrame.ts","webpack://grapesjs/./src/dom_components/model/ComponentImage.ts","webpack://grapesjs/./src/dom_components/model/ComponentText.ts","webpack://grapesjs/./src/dom_components/model/ComponentLabel.ts","webpack://grapesjs/./src/dom_components/model/ComponentLink.ts","webpack://grapesjs/./src/dom_components/model/ComponentMap.ts","webpack://grapesjs/./src/dom_components/model/ComponentScript.ts","webpack://grapesjs/./src/dom_components/model/ComponentSvg.ts","webpack://grapesjs/./src/dom_components/model/ComponentSvgIn.ts","webpack://grapesjs/./src/dom_components/model/ComponentTable.ts","webpack://grapesjs/./src/dom_components/model/ComponentTableBody.ts","webpack://grapesjs/./src/dom_components/model/ComponentTableCell.ts","webpack://grapesjs/./src/dom_components/model/ComponentTableFoot.ts","webpack://grapesjs/./src/dom_components/model/ComponentTableHead.ts","webpack://grapesjs/./src/dom_components/model/ComponentTableRow.ts","webpack://grapesjs/./src/dom_components/model/ComponentVideo.ts","webpack://grapesjs/./src/dom_components/model/ComponentWrapper.ts","webpack://grapesjs/./src/dom_components/view/ComponentsView.ts","webpack://grapesjs/./src/dom_components/view/ComponentView.ts","webpack://grapesjs/./src/dom_components/view/ComponentTextNodeView.ts","webpack://grapesjs/./src/dom_components/view/ComponentCommentView.ts","webpack://grapesjs/./src/dom_components/view/ComponentFrameView.ts","webpack://grapesjs/./src/dom_components/view/ComponentImageView.ts","webpack://grapesjs/./src/dom_components/view/ComponentTextView.ts","webpack://grapesjs/./src/dom_components/view/ComponentLinkView.ts","webpack://grapesjs/./src/dom_components/view/ComponentLabelView.ts","webpack://grapesjs/./src/dom_components/view/ComponentMapView.ts","webpack://grapesjs/./src/dom_components/view/ComponentScriptView.ts","webpack://grapesjs/./src/dom_components/view/ComponentSvgView.ts","webpack://grapesjs/./src/dom_components/view/ComponentTableBodyView.ts","webpack://grapesjs/./src/dom_components/view/ComponentTableCellView.ts","webpack://grapesjs/./src/dom_components/view/ComponentTableFootView.ts","webpack://grapesjs/./src/dom_components/view/ComponentTableHeadView.ts","webpack://grapesjs/./src/dom_components/view/ComponentTableRowView.ts","webpack://grapesjs/./src/dom_components/view/ComponentTableView.ts","webpack://grapesjs/./src/dom_components/view/ComponentVideoView.ts","webpack://grapesjs/./src/dom_components/view/ComponentWrapperView.ts","webpack://grapesjs/./src/dom_components/index.ts","webpack://grapesjs/./src/css_composer/config/config.ts","webpack://grapesjs/./src/code_manager/model/CssGenerator.ts","webpack://grapesjs/./src/css_composer/model/CssRule.ts","webpack://grapesjs/./src/css_composer/model/CssRules.ts","webpack://grapesjs/./src/css_composer/index.ts","webpack://grapesjs/./src/block_manager/config/config.ts","webpack://grapesjs/./src/block_manager/model/Block.ts","webpack://grapesjs/./src/block_manager/model/Blocks.ts","webpack://grapesjs/./src/block_manager/model/Category.ts","webpack://grapesjs/./src/block_manager/model/Categories.ts","webpack://grapesjs/./src/block_manager/types.ts","webpack://grapesjs/./src/block_manager/view/BlockView.ts","webpack://grapesjs/./src/block_manager/view/CategoryView.ts","webpack://grapesjs/./src/block_manager/view/BlocksView.ts","webpack://grapesjs/./src/block_manager/index.ts","webpack://grapesjs/./src/selector_manager/config/config.ts","webpack://grapesjs/./src/selector_manager/model/State.ts","webpack://grapesjs/./src/selector_manager/view/ClassTagView.ts","webpack://grapesjs/./src/selector_manager/view/ClassTagsView.ts","webpack://grapesjs/./src/selector_manager/index.ts","webpack://grapesjs/./src/parser/config/config.ts","webpack://grapesjs/./src/parser/model/BrowserParserCss.ts","webpack://grapesjs/./src/parser/model/ParserCss.ts","webpack://grapesjs/./src/parser/index.ts","webpack://grapesjs/./src/storage_manager/config/config.ts","webpack://grapesjs/./src/storage_manager/model/LocalStorage.ts","webpack://grapesjs/./node_modules/promise-polyfill/src/finally.js","webpack://grapesjs/./node_modules/promise-polyfill/src/allSettled.js","webpack://grapesjs/./node_modules/promise-polyfill/src/any.js","webpack://grapesjs/./node_modules/promise-polyfill/src/index.js","webpack://grapesjs/./src/utils/fetch.ts","webpack://grapesjs/./src/storage_manager/model/RemoteStorage.ts","webpack://grapesjs/./src/storage_manager/types.ts","webpack://grapesjs/./src/storage_manager/index.ts","webpack://grapesjs/./src/trait_manager/config/config.ts","webpack://grapesjs/./src/trait_manager/index.ts","webpack://grapesjs/./src/navigator/config/config.ts","webpack://grapesjs/./src/navigator/view/ItemsView.ts","webpack://grapesjs/./src/commands/config/config.ts","webpack://grapesjs/./src/commands/index.ts","webpack://grapesjs/./src/navigator/view/ItemView.ts","webpack://grapesjs/./src/navigator/index.ts","webpack://grapesjs/./src/asset_manager/config/config.ts","webpack://grapesjs/./src/asset_manager/model/Asset.ts","webpack://grapesjs/./src/asset_manager/model/AssetImage.ts","webpack://grapesjs/./src/asset_manager/view/AssetView.ts","webpack://grapesjs/./src/asset_manager/view/AssetImageView.ts","webpack://grapesjs/./src/domain_abstract/model/TypeableCollection.ts","webpack://grapesjs/./src/asset_manager/model/Assets.ts","webpack://grapesjs/./src/asset_manager/view/AssetsView.ts","webpack://grapesjs/./src/asset_manager/view/FileUploader.ts","webpack://grapesjs/./src/asset_manager/index.ts","webpack://grapesjs/./src/i18n/locale/en.js","webpack://grapesjs/./src/i18n/config.ts","webpack://grapesjs/./src/i18n/index.ts","webpack://grapesjs/./src/utils/Sorter.ts","webpack://grapesjs/./src/utils/Resizer.ts","webpack://grapesjs/./src/utils/index.ts","webpack://grapesjs/./src/utils/keymaster.ts","webpack://grapesjs/./src/keymaps/config.ts","webpack://grapesjs/./src/keymaps/index.ts","webpack://grapesjs/./src/modal_dialog/config/config.ts","webpack://grapesjs/./src/modal_dialog/model/Modal.ts","webpack://grapesjs/./src/modal_dialog/view/ModalView.ts","webpack://grapesjs/./src/modal_dialog/index.ts","webpack://grapesjs/./src/panels/config/config.ts","webpack://grapesjs/./src/panels/model/Button.ts","webpack://grapesjs/./src/panels/model/Buttons.ts","webpack://grapesjs/./src/panels/model/Panel.ts","webpack://grapesjs/./src/panels/model/Panels.ts","webpack://grapesjs/./src/panels/view/ButtonView.ts","webpack://grapesjs/./src/panels/view/ButtonsView.ts","webpack://grapesjs/./src/panels/view/PanelView.ts","webpack://grapesjs/./src/panels/view/PanelsView.ts","webpack://grapesjs/./src/panels/index.ts","webpack://grapesjs/./src/code_manager/config/config.ts","webpack://grapesjs/./src/code_manager/model/HtmlGenerator.ts","webpack://grapesjs/./src/code_manager/model/JsonGenerator.ts","webpack://grapesjs/./src/code_manager/model/JsGenerator.ts","webpack://grapesjs/./src/code_manager/view/EditorView.ts","webpack://grapesjs/./src/code_manager/index.ts","webpack://grapesjs/./src/undo_manager/config.ts","webpack://grapesjs/./src/undo_manager/index.ts","webpack://grapesjs/./src/rich_text_editor/config/config.ts","webpack://grapesjs/./src/rich_text_editor/model/RichTextEditor.ts","webpack://grapesjs/./src/rich_text_editor/index.ts","webpack://grapesjs/./src/style_manager/config/config.ts","webpack://grapesjs/./src/style_manager/model/Property.ts","webpack://grapesjs/./src/style_manager/model/Layer.ts","webpack://grapesjs/./src/style_manager/model/Layers.ts","webpack://grapesjs/./src/style_manager/model/PropertyComposite.ts","webpack://grapesjs/./src/style_manager/model/PropertyStack.ts","webpack://grapesjs/./src/style_manager/view/PropertyView.ts","webpack://grapesjs/./src/style_manager/view/PropertiesView.ts","webpack://grapesjs/./src/style_manager/view/PropertyCompositeView.ts","webpack://grapesjs/./src/style_manager/view/LayerView.ts","webpack://grapesjs/./src/style_manager/view/LayersView.ts","webpack://grapesjs/./src/style_manager/view/PropertyStackView.ts","webpack://grapesjs/./src/style_manager/view/PropertyFileView.ts","webpack://grapesjs/./src/style_manager/view/PropertyNumberView.ts","webpack://grapesjs/./src/domain_abstract/ui/Input.ts","webpack://grapesjs/./src/domain_abstract/ui/InputColor.ts","webpack://grapesjs/./src/style_manager/view/PropertyColorView.ts","webpack://grapesjs/./src/style_manager/model/PropertySelect.ts","webpack://grapesjs/./src/style_manager/view/PropertySelectView.ts","webpack://grapesjs/./src/style_manager/model/PropertyRadio.ts","webpack://grapesjs/./src/style_manager/view/PropertyRadioView.ts","webpack://grapesjs/./src/domain_abstract/ui/InputNumber.ts","webpack://grapesjs/./src/style_manager/model/PropertyNumber.ts","webpack://grapesjs/./src/style_manager/model/PropertySlider.ts","webpack://grapesjs/./src/style_manager/view/PropertySliderView.ts","webpack://grapesjs/./src/style_manager/model/Properties.ts","webpack://grapesjs/./src/style_manager/model/Sector.ts","webpack://grapesjs/./src/style_manager/model/Sectors.ts","webpack://grapesjs/./src/style_manager/model/PropertyFactory.ts","webpack://grapesjs/./src/style_manager/view/SectorView.ts","webpack://grapesjs/./src/style_manager/view/SectorsView.ts","webpack://grapesjs/./src/style_manager/index.ts","webpack://grapesjs/./src/editor/model/Editor.ts","webpack://grapesjs/./src/utils/extender.ts","webpack://grapesjs/./src/editor/view/EditorView.ts","webpack://grapesjs/./src/editor/index.ts","webpack://grapesjs/./src/plugin_manager/index.ts","webpack://grapesjs/./src/utils/polyfills.ts","webpack://grapesjs/./src/index.ts"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"grapesjs\"] = factory();\n\telse\n\t\troot[\"grapesjs\"] = factory();\n})(typeof globalThis !== 'undefined' ? globalThis : (typeof window !== 'undefined' ? window : this), () => {\nreturn ","/*jshint node:true */\n/* globals define */\n/*\n The MIT License (MIT)\n\n Copyright (c) 2007-2018 Einar Lielmanis, Liam Newman, and contributors.\n\n Permission is hereby granted, free of charge, to any person\n obtaining a copy of this software and associated documentation files\n (the \"Software\"), to deal in the Software without restriction,\n including without limitation the rights to use, copy, modify, merge,\n publish, distribute, sublicense, and/or sell copies of the Software,\n and to permit persons to whom the Software is furnished to do so,\n subject to the following conditions:\n\n The above copyright notice and this permission notice shall be\n included in all copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS\n BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN\n ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n*/\n\n'use strict';\n\n/**\nThe following batches are equivalent:\n\nvar beautify_js = require('js-beautify');\nvar beautify_js = require('js-beautify').js;\nvar beautify_js = require('js-beautify').js_beautify;\n\nvar beautify_css = require('js-beautify').css;\nvar beautify_css = require('js-beautify').css_beautify;\n\nvar beautify_html = require('js-beautify').html;\nvar beautify_html = require('js-beautify').html_beautify;\n\nAll methods returned accept two arguments, the source string and an options object.\n**/\n\nfunction get_beautify(js_beautify, css_beautify, html_beautify) {\n // the default is js\n var beautify = function(src, config) {\n return js_beautify.js_beautify(src, config);\n };\n\n // short aliases\n beautify.js = js_beautify.js_beautify;\n beautify.css = css_beautify.css_beautify;\n beautify.html = html_beautify.html_beautify;\n\n // legacy aliases\n beautify.js_beautify = js_beautify.js_beautify;\n beautify.css_beautify = css_beautify.css_beautify;\n beautify.html_beautify = html_beautify.html_beautify;\n\n return beautify;\n}\n\nif (typeof define === \"function\" && define.amd) {\n // Add support for AMD ( https://github.com/amdjs/amdjs-api/wiki/AMD#defineamd-property- )\n define([\n \"./lib/beautify\",\n \"./lib/beautify-css\",\n \"./lib/beautify-html\"\n ], function(js_beautify, css_beautify, html_beautify) {\n return get_beautify(js_beautify, css_beautify, html_beautify);\n });\n} else {\n (function(mod) {\n var beautifier = require('./src/index');\n beautifier.js_beautify = beautifier.js;\n beautifier.css_beautify = beautifier.css;\n beautifier.html_beautify = beautifier.html;\n\n mod.exports = get_beautify(beautifier, beautifier, beautifier);\n\n })(module);\n}","/* AUTO-GENERATED. DO NOT MODIFY. */\n/*\n\n The MIT License (MIT)\n\n Copyright (c) 2007-2018 Einar Lielmanis, Liam Newman, and contributors.\n\n Permission is hereby granted, free of charge, to any person\n obtaining a copy of this software and associated documentation files\n (the \"Software\"), to deal in the Software without restriction,\n including without limitation the rights to use, copy, modify, merge,\n publish, distribute, sublicense, and/or sell copies of the Software,\n and to permit persons to whom the Software is furnished to do so,\n subject to the following conditions:\n\n The above copyright notice and this permission notice shall be\n included in all copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS\n BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN\n ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n\n CSS Beautifier\n---------------\n\n Written by Harutyun Amirjanyan, (amirjanyan@gmail.com)\n\n Based on code initially developed by: Einar Lielmanis, \n https://beautifier.io/\n\n Usage:\n css_beautify(source_text);\n css_beautify(source_text, options);\n\n The options are (default in brackets):\n indent_size (4) — indentation size,\n indent_char (space) — character to indent with,\n selector_separator_newline (true) - separate selectors with newline or\n not (e.g. \"a,\\nbr\" or \"a, br\")\n end_with_newline (false) - end with a newline\n newline_between_rules (true) - add a new line after every css rule\n space_around_selector_separator (false) - ensure space around selector separators:\n '>', '+', '~' (e.g. \"a>b\" -> \"a > b\")\n e.g\n\n css_beautify(css_source_text, {\n 'indent_size': 1,\n 'indent_char': '\\t',\n 'selector_separator': ' ',\n 'end_with_newline': false,\n 'newline_between_rules': true,\n 'space_around_selector_separator': true\n });\n*/\n\n// http://www.w3.org/TR/CSS21/syndata.html#tokenization\n// http://www.w3.org/TR/css3-syntax/\n\n(function() {\n\n/* GENERATED_BUILD_OUTPUT */\nvar legacy_beautify_css;\n/******/ (function() { // webpackBootstrap\n/******/ \t\"use strict\";\n/******/ \tvar __webpack_modules__ = ([\n/* 0 */,\n/* 1 */,\n/* 2 */\n/***/ (function(module) {\n\n/*jshint node:true */\n/*\n The MIT License (MIT)\n\n Copyright (c) 2007-2018 Einar Lielmanis, Liam Newman, and contributors.\n\n Permission is hereby granted, free of charge, to any person\n obtaining a copy of this software and associated documentation files\n (the \"Software\"), to deal in the Software without restriction,\n including without limitation the rights to use, copy, modify, merge,\n publish, distribute, sublicense, and/or sell copies of the Software,\n and to permit persons to whom the Software is furnished to do so,\n subject to the following conditions:\n\n The above copyright notice and this permission notice shall be\n included in all copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS\n BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN\n ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n*/\n\n\n\nfunction OutputLine(parent) {\n this.__parent = parent;\n this.__character_count = 0;\n // use indent_count as a marker for this.__lines that have preserved indentation\n this.__indent_count = -1;\n this.__alignment_count = 0;\n this.__wrap_point_index = 0;\n this.__wrap_point_character_count = 0;\n this.__wrap_point_indent_count = -1;\n this.__wrap_point_alignment_count = 0;\n\n this.__items = [];\n}\n\nOutputLine.prototype.clone_empty = function() {\n var line = new OutputLine(this.__parent);\n line.set_indent(this.__indent_count, this.__alignment_count);\n return line;\n};\n\nOutputLine.prototype.item = function(index) {\n if (index < 0) {\n return this.__items[this.__items.length + index];\n } else {\n return this.__items[index];\n }\n};\n\nOutputLine.prototype.has_match = function(pattern) {\n for (var lastCheckedOutput = this.__items.length - 1; lastCheckedOutput >= 0; lastCheckedOutput--) {\n if (this.__items[lastCheckedOutput].match(pattern)) {\n return true;\n }\n }\n return false;\n};\n\nOutputLine.prototype.set_indent = function(indent, alignment) {\n if (this.is_empty()) {\n this.__indent_count = indent || 0;\n this.__alignment_count = alignment || 0;\n this.__character_count = this.__parent.get_indent_size(this.__indent_count, this.__alignment_count);\n }\n};\n\nOutputLine.prototype._set_wrap_point = function() {\n if (this.__parent.wrap_line_length) {\n this.__wrap_point_index = this.__items.length;\n this.__wrap_point_character_count = this.__character_count;\n this.__wrap_point_indent_count = this.__parent.next_line.__indent_count;\n this.__wrap_point_alignment_count = this.__parent.next_line.__alignment_count;\n }\n};\n\nOutputLine.prototype._should_wrap = function() {\n return this.__wrap_point_index &&\n this.__character_count > this.__parent.wrap_line_length &&\n this.__wrap_point_character_count > this.__parent.next_line.__character_count;\n};\n\nOutputLine.prototype._allow_wrap = function() {\n if (this._should_wrap()) {\n this.__parent.add_new_line();\n var next = this.__parent.current_line;\n next.set_indent(this.__wrap_point_indent_count, this.__wrap_point_alignment_count);\n next.__items = this.__items.slice(this.__wrap_point_index);\n this.__items = this.__items.slice(0, this.__wrap_point_index);\n\n next.__character_count += this.__character_count - this.__wrap_point_character_count;\n this.__character_count = this.__wrap_point_character_count;\n\n if (next.__items[0] === \" \") {\n next.__items.splice(0, 1);\n next.__character_count -= 1;\n }\n return true;\n }\n return false;\n};\n\nOutputLine.prototype.is_empty = function() {\n return this.__items.length === 0;\n};\n\nOutputLine.prototype.last = function() {\n if (!this.is_empty()) {\n return this.__items[this.__items.length - 1];\n } else {\n return null;\n }\n};\n\nOutputLine.prototype.push = function(item) {\n this.__items.push(item);\n var last_newline_index = item.lastIndexOf('\\n');\n if (last_newline_index !== -1) {\n this.__character_count = item.length - last_newline_index;\n } else {\n this.__character_count += item.length;\n }\n};\n\nOutputLine.prototype.pop = function() {\n var item = null;\n if (!this.is_empty()) {\n item = this.__items.pop();\n this.__character_count -= item.length;\n }\n return item;\n};\n\n\nOutputLine.prototype._remove_indent = function() {\n if (this.__indent_count > 0) {\n this.__indent_count -= 1;\n this.__character_count -= this.__parent.indent_size;\n }\n};\n\nOutputLine.prototype._remove_wrap_indent = function() {\n if (this.__wrap_point_indent_count > 0) {\n this.__wrap_point_indent_count -= 1;\n }\n};\nOutputLine.prototype.trim = function() {\n while (this.last() === ' ') {\n this.__items.pop();\n this.__character_count -= 1;\n }\n};\n\nOutputLine.prototype.toString = function() {\n var result = '';\n if (this.is_empty()) {\n if (this.__parent.indent_empty_lines) {\n result = this.__parent.get_indent_string(this.__indent_count);\n }\n } else {\n result = this.__parent.get_indent_string(this.__indent_count, this.__alignment_count);\n result += this.__items.join('');\n }\n return result;\n};\n\nfunction IndentStringCache(options, baseIndentString) {\n this.__cache = [''];\n this.__indent_size = options.indent_size;\n this.__indent_string = options.indent_char;\n if (!options.indent_with_tabs) {\n this.__indent_string = new Array(options.indent_size + 1).join(options.indent_char);\n }\n\n // Set to null to continue support for auto detection of base indent\n baseIndentString = baseIndentString || '';\n if (options.indent_level > 0) {\n baseIndentString = new Array(options.indent_level + 1).join(this.__indent_string);\n }\n\n this.__base_string = baseIndentString;\n this.__base_string_length = baseIndentString.length;\n}\n\nIndentStringCache.prototype.get_indent_size = function(indent, column) {\n var result = this.__base_string_length;\n column = column || 0;\n if (indent < 0) {\n result = 0;\n }\n result += indent * this.__indent_size;\n result += column;\n return result;\n};\n\nIndentStringCache.prototype.get_indent_string = function(indent_level, column) {\n var result = this.__base_string;\n column = column || 0;\n if (indent_level < 0) {\n indent_level = 0;\n result = '';\n }\n column += indent_level * this.__indent_size;\n this.__ensure_cache(column);\n result += this.__cache[column];\n return result;\n};\n\nIndentStringCache.prototype.__ensure_cache = function(column) {\n while (column >= this.__cache.length) {\n this.__add_column();\n }\n};\n\nIndentStringCache.prototype.__add_column = function() {\n var column = this.__cache.length;\n var indent = 0;\n var result = '';\n if (this.__indent_size && column >= this.__indent_size) {\n indent = Math.floor(column / this.__indent_size);\n column -= indent * this.__indent_size;\n result = new Array(indent + 1).join(this.__indent_string);\n }\n if (column) {\n result += new Array(column + 1).join(' ');\n }\n\n this.__cache.push(result);\n};\n\nfunction Output(options, baseIndentString) {\n this.__indent_cache = new IndentStringCache(options, baseIndentString);\n this.raw = false;\n this._end_with_newline = options.end_with_newline;\n this.indent_size = options.indent_size;\n this.wrap_line_length = options.wrap_line_length;\n this.indent_empty_lines = options.indent_empty_lines;\n this.__lines = [];\n this.previous_line = null;\n this.current_line = null;\n this.next_line = new OutputLine(this);\n this.space_before_token = false;\n this.non_breaking_space = false;\n this.previous_token_wrapped = false;\n // initialize\n this.__add_outputline();\n}\n\nOutput.prototype.__add_outputline = function() {\n this.previous_line = this.current_line;\n this.current_line = this.next_line.clone_empty();\n this.__lines.push(this.current_line);\n};\n\nOutput.prototype.get_line_number = function() {\n return this.__lines.length;\n};\n\nOutput.prototype.get_indent_string = function(indent, column) {\n return this.__indent_cache.get_indent_string(indent, column);\n};\n\nOutput.prototype.get_indent_size = function(indent, column) {\n return this.__indent_cache.get_indent_size(indent, column);\n};\n\nOutput.prototype.is_empty = function() {\n return !this.previous_line && this.current_line.is_empty();\n};\n\nOutput.prototype.add_new_line = function(force_newline) {\n // never newline at the start of file\n // otherwise, newline only if we didn't just add one or we're forced\n if (this.is_empty() ||\n (!force_newline && this.just_added_newline())) {\n return false;\n }\n\n // if raw output is enabled, don't print additional newlines,\n // but still return True as though you had\n if (!this.raw) {\n this.__add_outputline();\n }\n return true;\n};\n\nOutput.prototype.get_code = function(eol) {\n this.trim(true);\n\n // handle some edge cases where the last tokens\n // has text that ends with newline(s)\n var last_item = this.current_line.pop();\n if (last_item) {\n if (last_item[last_item.length - 1] === '\\n') {\n last_item = last_item.replace(/\\n+$/g, '');\n }\n this.current_line.push(last_item);\n }\n\n if (this._end_with_newline) {\n this.__add_outputline();\n }\n\n var sweet_code = this.__lines.join('\\n');\n\n if (eol !== '\\n') {\n sweet_code = sweet_code.replace(/[\\n]/g, eol);\n }\n return sweet_code;\n};\n\nOutput.prototype.set_wrap_point = function() {\n this.current_line._set_wrap_point();\n};\n\nOutput.prototype.set_indent = function(indent, alignment) {\n indent = indent || 0;\n alignment = alignment || 0;\n\n // Next line stores alignment values\n this.next_line.set_indent(indent, alignment);\n\n // Never indent your first output indent at the start of the file\n if (this.__lines.length > 1) {\n this.current_line.set_indent(indent, alignment);\n return true;\n }\n\n this.current_line.set_indent();\n return false;\n};\n\nOutput.prototype.add_raw_token = function(token) {\n for (var x = 0; x < token.newlines; x++) {\n this.__add_outputline();\n }\n this.current_line.set_indent(-1);\n this.current_line.push(token.whitespace_before);\n this.current_line.push(token.text);\n this.space_before_token = false;\n this.non_breaking_space = false;\n this.previous_token_wrapped = false;\n};\n\nOutput.prototype.add_token = function(printable_token) {\n this.__add_space_before_token();\n this.current_line.push(printable_token);\n this.space_before_token = false;\n this.non_breaking_space = false;\n this.previous_token_wrapped = this.current_line._allow_wrap();\n};\n\nOutput.prototype.__add_space_before_token = function() {\n if (this.space_before_token && !this.just_added_newline()) {\n if (!this.non_breaking_space) {\n this.set_wrap_point();\n }\n this.current_line.push(' ');\n }\n};\n\nOutput.prototype.remove_indent = function(index) {\n var output_length = this.__lines.length;\n while (index < output_length) {\n this.__lines[index]._remove_indent();\n index++;\n }\n this.current_line._remove_wrap_indent();\n};\n\nOutput.prototype.trim = function(eat_newlines) {\n eat_newlines = (eat_newlines === undefined) ? false : eat_newlines;\n\n this.current_line.trim();\n\n while (eat_newlines && this.__lines.length > 1 &&\n this.current_line.is_empty()) {\n this.__lines.pop();\n this.current_line = this.__lines[this.__lines.length - 1];\n this.current_line.trim();\n }\n\n this.previous_line = this.__lines.length > 1 ?\n this.__lines[this.__lines.length - 2] : null;\n};\n\nOutput.prototype.just_added_newline = function() {\n return this.current_line.is_empty();\n};\n\nOutput.prototype.just_added_blankline = function() {\n return this.is_empty() ||\n (this.current_line.is_empty() && this.previous_line.is_empty());\n};\n\nOutput.prototype.ensure_empty_line_above = function(starts_with, ends_with) {\n var index = this.__lines.length - 2;\n while (index >= 0) {\n var potentialEmptyLine = this.__lines[index];\n if (potentialEmptyLine.is_empty()) {\n break;\n } else if (potentialEmptyLine.item(0).indexOf(starts_with) !== 0 &&\n potentialEmptyLine.item(-1) !== ends_with) {\n this.__lines.splice(index + 1, 0, new OutputLine(this));\n this.previous_line = this.__lines[this.__lines.length - 2];\n break;\n }\n index--;\n }\n};\n\nmodule.exports.Output = Output;\n\n\n/***/ }),\n/* 3 */,\n/* 4 */,\n/* 5 */,\n/* 6 */\n/***/ (function(module) {\n\n/*jshint node:true */\n/*\n\n The MIT License (MIT)\n\n Copyright (c) 2007-2018 Einar Lielmanis, Liam Newman, and contributors.\n\n Permission is hereby granted, free of charge, to any person\n obtaining a copy of this software and associated documentation files\n (the \"Software\"), to deal in the Software without restriction,\n including without limitation the rights to use, copy, modify, merge,\n publish, distribute, sublicense, and/or sell copies of the Software,\n and to permit persons to whom the Software is furnished to do so,\n subject to the following conditions:\n\n The above copyright notice and this permission notice shall be\n included in all copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS\n BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN\n ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n*/\n\n\n\nfunction Options(options, merge_child_field) {\n this.raw_options = _mergeOpts(options, merge_child_field);\n\n // Support passing the source text back with no change\n this.disabled = this._get_boolean('disabled');\n\n this.eol = this._get_characters('eol', 'auto');\n this.end_with_newline = this._get_boolean('end_with_newline');\n this.indent_size = this._get_number('indent_size', 4);\n this.indent_char = this._get_characters('indent_char', ' ');\n this.indent_level = this._get_number('indent_level');\n\n this.preserve_newlines = this._get_boolean('preserve_newlines', true);\n this.max_preserve_newlines = this._get_number('max_preserve_newlines', 32786);\n if (!this.preserve_newlines) {\n this.max_preserve_newlines = 0;\n }\n\n this.indent_with_tabs = this._get_boolean('indent_with_tabs', this.indent_char === '\\t');\n if (this.indent_with_tabs) {\n this.indent_char = '\\t';\n\n // indent_size behavior changed after 1.8.6\n // It used to be that indent_size would be\n // set to 1 for indent_with_tabs. That is no longer needed and\n // actually doesn't make sense - why not use spaces? Further,\n // that might produce unexpected behavior - tabs being used\n // for single-column alignment. So, when indent_with_tabs is true\n // and indent_size is 1, reset indent_size to 4.\n if (this.indent_size === 1) {\n this.indent_size = 4;\n }\n }\n\n // Backwards compat with 1.3.x\n this.wrap_line_length = this._get_number('wrap_line_length', this._get_number('max_char'));\n\n this.indent_empty_lines = this._get_boolean('indent_empty_lines');\n\n // valid templating languages ['django', 'erb', 'handlebars', 'php', 'smarty']\n // For now, 'auto' = all off for javascript, all on for html (and inline javascript).\n // other values ignored\n this.templating = this._get_selection_list('templating', ['auto', 'none', 'django', 'erb', 'handlebars', 'php', 'smarty'], ['auto']);\n}\n\nOptions.prototype._get_array = function(name, default_value) {\n var option_value = this.raw_options[name];\n var result = default_value || [];\n if (typeof option_value === 'object') {\n if (option_value !== null && typeof option_value.concat === 'function') {\n result = option_value.concat();\n }\n } else if (typeof option_value === 'string') {\n result = option_value.split(/[^a-zA-Z0-9_\\/\\-]+/);\n }\n return result;\n};\n\nOptions.prototype._get_boolean = function(name, default_value) {\n var option_value = this.raw_options[name];\n var result = option_value === undefined ? !!default_value : !!option_value;\n return result;\n};\n\nOptions.prototype._get_characters = function(name, default_value) {\n var option_value = this.raw_options[name];\n var result = default_value || '';\n if (typeof option_value === 'string') {\n result = option_value.replace(/\\\\r/, '\\r').replace(/\\\\n/, '\\n').replace(/\\\\t/, '\\t');\n }\n return result;\n};\n\nOptions.prototype._get_number = function(name, default_value) {\n var option_value = this.raw_options[name];\n default_value = parseInt(default_value, 10);\n if (isNaN(default_value)) {\n default_value = 0;\n }\n var result = parseInt(option_value, 10);\n if (isNaN(result)) {\n result = default_value;\n }\n return result;\n};\n\nOptions.prototype._get_selection = function(name, selection_list, default_value) {\n var result = this._get_selection_list(name, selection_list, default_value);\n if (result.length !== 1) {\n throw new Error(\n \"Invalid Option Value: The option '\" + name + \"' can only be one of the following values:\\n\" +\n selection_list + \"\\nYou passed in: '\" + this.raw_options[name] + \"'\");\n }\n\n return result[0];\n};\n\n\nOptions.prototype._get_selection_list = function(name, selection_list, default_value) {\n if (!selection_list || selection_list.length === 0) {\n throw new Error(\"Selection list cannot be empty.\");\n }\n\n default_value = default_value || [selection_list[0]];\n if (!this._is_valid_selection(default_value, selection_list)) {\n throw new Error(\"Invalid Default Value!\");\n }\n\n var result = this._get_array(name, default_value);\n if (!this._is_valid_selection(result, selection_list)) {\n throw new Error(\n \"Invalid Option Value: The option '\" + name + \"' can contain only the following values:\\n\" +\n selection_list + \"\\nYou passed in: '\" + this.raw_options[name] + \"'\");\n }\n\n return result;\n};\n\nOptions.prototype._is_valid_selection = function(result, selection_list) {\n return result.length && selection_list.length &&\n !result.some(function(item) { return selection_list.indexOf(item) === -1; });\n};\n\n\n// merges child options up with the parent options object\n// Example: obj = {a: 1, b: {a: 2}}\n// mergeOpts(obj, 'b')\n//\n// Returns: {a: 2}\nfunction _mergeOpts(allOptions, childFieldName) {\n var finalOpts = {};\n allOptions = _normalizeOpts(allOptions);\n var name;\n\n for (name in allOptions) {\n if (name !== childFieldName) {\n finalOpts[name] = allOptions[name];\n }\n }\n\n //merge in the per type settings for the childFieldName\n if (childFieldName && allOptions[childFieldName]) {\n for (name in allOptions[childFieldName]) {\n finalOpts[name] = allOptions[childFieldName][name];\n }\n }\n return finalOpts;\n}\n\nfunction _normalizeOpts(options) {\n var convertedOpts = {};\n var key;\n\n for (key in options) {\n var newKey = key.replace(/-/g, \"_\");\n convertedOpts[newKey] = options[key];\n }\n return convertedOpts;\n}\n\nmodule.exports.Options = Options;\nmodule.exports.normalizeOpts = _normalizeOpts;\nmodule.exports.mergeOpts = _mergeOpts;\n\n\n/***/ }),\n/* 7 */,\n/* 8 */\n/***/ (function(module) {\n\n/*jshint node:true */\n/*\n\n The MIT License (MIT)\n\n Copyright (c) 2007-2018 Einar Lielmanis, Liam Newman, and contributors.\n\n Permission is hereby granted, free of charge, to any person\n obtaining a copy of this software and associated documentation files\n (the \"Software\"), to deal in the Software without restriction,\n including without limitation the rights to use, copy, modify, merge,\n publish, distribute, sublicense, and/or sell copies of the Software,\n and to permit persons to whom the Software is furnished to do so,\n subject to the following conditions:\n\n The above copyright notice and this permission notice shall be\n included in all copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS\n BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN\n ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n*/\n\n\n\nvar regexp_has_sticky = RegExp.prototype.hasOwnProperty('sticky');\n\nfunction InputScanner(input_string) {\n this.__input = input_string || '';\n this.__input_length = this.__input.length;\n this.__position = 0;\n}\n\nInputScanner.prototype.restart = function() {\n this.__position = 0;\n};\n\nInputScanner.prototype.back = function() {\n if (this.__position > 0) {\n this.__position -= 1;\n }\n};\n\nInputScanner.prototype.hasNext = function() {\n return this.__position < this.__input_length;\n};\n\nInputScanner.prototype.next = function() {\n var val = null;\n if (this.hasNext()) {\n val = this.__input.charAt(this.__position);\n this.__position += 1;\n }\n return val;\n};\n\nInputScanner.prototype.peek = function(index) {\n var val = null;\n index = index || 0;\n index += this.__position;\n if (index >= 0 && index < this.__input_length) {\n val = this.__input.charAt(index);\n }\n return val;\n};\n\n// This is a JavaScript only helper function (not in python)\n// Javascript doesn't have a match method\n// and not all implementation support \"sticky\" flag.\n// If they do not support sticky then both this.match() and this.test() method\n// must get the match and check the index of the match.\n// If sticky is supported and set, this method will use it.\n// Otherwise it will check that global is set, and fall back to the slower method.\nInputScanner.prototype.__match = function(pattern, index) {\n pattern.lastIndex = index;\n var pattern_match = pattern.exec(this.__input);\n\n if (pattern_match && !(regexp_has_sticky && pattern.sticky)) {\n if (pattern_match.index !== index) {\n pattern_match = null;\n }\n }\n\n return pattern_match;\n};\n\nInputScanner.prototype.test = function(pattern, index) {\n index = index || 0;\n index += this.__position;\n\n if (index >= 0 && index < this.__input_length) {\n return !!this.__match(pattern, index);\n } else {\n return false;\n }\n};\n\nInputScanner.prototype.testChar = function(pattern, index) {\n // test one character regex match\n var val = this.peek(index);\n pattern.lastIndex = 0;\n return val !== null && pattern.test(val);\n};\n\nInputScanner.prototype.match = function(pattern) {\n var pattern_match = this.__match(pattern, this.__position);\n if (pattern_match) {\n this.__position += pattern_match[0].length;\n } else {\n pattern_match = null;\n }\n return pattern_match;\n};\n\nInputScanner.prototype.read = function(starting_pattern, until_pattern, until_after) {\n var val = '';\n var match;\n if (starting_pattern) {\n match = this.match(starting_pattern);\n if (match) {\n val += match[0];\n }\n }\n if (until_pattern && (match || !starting_pattern)) {\n val += this.readUntil(until_pattern, until_after);\n }\n return val;\n};\n\nInputScanner.prototype.readUntil = function(pattern, until_after) {\n var val = '';\n var match_index = this.__position;\n pattern.lastIndex = this.__position;\n var pattern_match = pattern.exec(this.__input);\n if (pattern_match) {\n match_index = pattern_match.index;\n if (until_after) {\n match_index += pattern_match[0].length;\n }\n } else {\n match_index = this.__input_length;\n }\n\n val = this.__input.substring(this.__position, match_index);\n this.__position = match_index;\n return val;\n};\n\nInputScanner.prototype.readUntilAfter = function(pattern) {\n return this.readUntil(pattern, true);\n};\n\nInputScanner.prototype.get_regexp = function(pattern, match_from) {\n var result = null;\n var flags = 'g';\n if (match_from && regexp_has_sticky) {\n flags = 'y';\n }\n // strings are converted to regexp\n if (typeof pattern === \"string\" && pattern !== '') {\n // result = new RegExp(pattern.replace(/[-\\/\\\\^$*+?.()|[\\]{}]/g, '\\\\$&'), flags);\n result = new RegExp(pattern, flags);\n } else if (pattern) {\n result = new RegExp(pattern.source, flags);\n }\n return result;\n};\n\nInputScanner.prototype.get_literal_regexp = function(literal_string) {\n return RegExp(literal_string.replace(/[-\\/\\\\^$*+?.()|[\\]{}]/g, '\\\\$&'));\n};\n\n/* css beautifier legacy helpers */\nInputScanner.prototype.peekUntilAfter = function(pattern) {\n var start = this.__position;\n var val = this.readUntilAfter(pattern);\n this.__position = start;\n return val;\n};\n\nInputScanner.prototype.lookBack = function(testVal) {\n var start = this.__position - 1;\n return start >= testVal.length && this.__input.substring(start - testVal.length, start)\n .toLowerCase() === testVal;\n};\n\nmodule.exports.InputScanner = InputScanner;\n\n\n/***/ }),\n/* 9 */,\n/* 10 */,\n/* 11 */,\n/* 12 */,\n/* 13 */\n/***/ (function(module) {\n\n/*jshint node:true */\n/*\n\n The MIT License (MIT)\n\n Copyright (c) 2007-2018 Einar Lielmanis, Liam Newman, and contributors.\n\n Permission is hereby granted, free of charge, to any person\n obtaining a copy of this software and associated documentation files\n (the \"Software\"), to deal in the Software without restriction,\n including without limitation the rights to use, copy, modify, merge,\n publish, distribute, sublicense, and/or sell copies of the Software,\n and to permit persons to whom the Software is furnished to do so,\n subject to the following conditions:\n\n The above copyright notice and this permission notice shall be\n included in all copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS\n BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN\n ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n*/\n\n\n\nfunction Directives(start_block_pattern, end_block_pattern) {\n start_block_pattern = typeof start_block_pattern === 'string' ? start_block_pattern : start_block_pattern.source;\n end_block_pattern = typeof end_block_pattern === 'string' ? end_block_pattern : end_block_pattern.source;\n this.__directives_block_pattern = new RegExp(start_block_pattern + / beautify( \\w+[:]\\w+)+ /.source + end_block_pattern, 'g');\n this.__directive_pattern = / (\\w+)[:](\\w+)/g;\n\n this.__directives_end_ignore_pattern = new RegExp(start_block_pattern + /\\sbeautify\\signore:end\\s/.source + end_block_pattern, 'g');\n}\n\nDirectives.prototype.get_directives = function(text) {\n if (!text.match(this.__directives_block_pattern)) {\n return null;\n }\n\n var directives = {};\n this.__directive_pattern.lastIndex = 0;\n var directive_match = this.__directive_pattern.exec(text);\n\n while (directive_match) {\n directives[directive_match[1]] = directive_match[2];\n directive_match = this.__directive_pattern.exec(text);\n }\n\n return directives;\n};\n\nDirectives.prototype.readIgnored = function(input) {\n return input.readUntilAfter(this.__directives_end_ignore_pattern);\n};\n\n\nmodule.exports.Directives = Directives;\n\n\n/***/ }),\n/* 14 */,\n/* 15 */\n/***/ (function(module, __unused_webpack_exports, __webpack_require__) {\n\n/*jshint node:true */\n/*\n\n The MIT License (MIT)\n\n Copyright (c) 2007-2018 Einar Lielmanis, Liam Newman, and contributors.\n\n Permission is hereby granted, free of charge, to any person\n obtaining a copy of this software and associated documentation files\n (the \"Software\"), to deal in the Software without restriction,\n including without limitation the rights to use, copy, modify, merge,\n publish, distribute, sublicense, and/or sell copies of the Software,\n and to permit persons to whom the Software is furnished to do so,\n subject to the following conditions:\n\n The above copyright notice and this permission notice shall be\n included in all copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS\n BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN\n ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n*/\n\n\n\nvar Beautifier = (__webpack_require__(16).Beautifier),\n Options = (__webpack_require__(17).Options);\n\nfunction css_beautify(source_text, options) {\n var beautifier = new Beautifier(source_text, options);\n return beautifier.beautify();\n}\n\nmodule.exports = css_beautify;\nmodule.exports.defaultOptions = function() {\n return new Options();\n};\n\n\n/***/ }),\n/* 16 */\n/***/ (function(module, __unused_webpack_exports, __webpack_require__) {\n\n/*jshint node:true */\n/*\n\n The MIT License (MIT)\n\n Copyright (c) 2007-2018 Einar Lielmanis, Liam Newman, and contributors.\n\n Permission is hereby granted, free of charge, to any person\n obtaining a copy of this software and associated documentation files\n (the \"Software\"), to deal in the Software without restriction,\n including without limitation the rights to use, copy, modify, merge,\n publish, distribute, sublicense, and/or sell copies of the Software,\n and to permit persons to whom the Software is furnished to do so,\n subject to the following conditions:\n\n The above copyright notice and this permission notice shall be\n included in all copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS\n BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN\n ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n*/\n\n\n\nvar Options = (__webpack_require__(17).Options);\nvar Output = (__webpack_require__(2).Output);\nvar InputScanner = (__webpack_require__(8).InputScanner);\nvar Directives = (__webpack_require__(13).Directives);\n\nvar directives_core = new Directives(/\\/\\*/, /\\*\\//);\n\nvar lineBreak = /\\r\\n|[\\r\\n]/;\nvar allLineBreaks = /\\r\\n|[\\r\\n]/g;\n\n// tokenizer\nvar whitespaceChar = /\\s/;\nvar whitespacePattern = /(?:\\s|\\n)+/g;\nvar block_comment_pattern = /\\/\\*(?:[\\s\\S]*?)((?:\\*\\/)|$)/g;\nvar comment_pattern = /\\/\\/(?:[^\\n\\r\\u2028\\u2029]*)/g;\n\nfunction Beautifier(source_text, options) {\n this._source_text = source_text || '';\n // Allow the setting of language/file-type specific options\n // with inheritance of overall settings\n this._options = new Options(options);\n this._ch = null;\n this._input = null;\n\n // https://developer.mozilla.org/en-US/docs/Web/CSS/At-rule\n this.NESTED_AT_RULE = {\n \"page\": true,\n \"font-face\": true,\n \"keyframes\": true,\n // also in CONDITIONAL_GROUP_RULE below\n \"media\": true,\n \"supports\": true,\n \"document\": true\n };\n this.CONDITIONAL_GROUP_RULE = {\n \"media\": true,\n \"supports\": true,\n \"document\": true\n };\n this.NON_SEMICOLON_NEWLINE_PROPERTY = [\n \"grid-template-areas\",\n \"grid-template\"\n ];\n\n}\n\nBeautifier.prototype.eatString = function(endChars) {\n var result = '';\n this._ch = this._input.next();\n while (this._ch) {\n result += this._ch;\n if (this._ch === \"\\\\\") {\n result += this._input.next();\n } else if (endChars.indexOf(this._ch) !== -1 || this._ch === \"\\n\") {\n break;\n }\n this._ch = this._input.next();\n }\n return result;\n};\n\n// Skips any white space in the source text from the current position.\n// When allowAtLeastOneNewLine is true, will output new lines for each\n// newline character found; if the user has preserve_newlines off, only\n// the first newline will be output\nBeautifier.prototype.eatWhitespace = function(allowAtLeastOneNewLine) {\n var result = whitespaceChar.test(this._input.peek());\n var newline_count = 0;\n while (whitespaceChar.test(this._input.peek())) {\n this._ch = this._input.next();\n if (allowAtLeastOneNewLine && this._ch === '\\n') {\n if (newline_count === 0 || newline_count < this._options.max_preserve_newlines) {\n newline_count++;\n this._output.add_new_line(true);\n }\n }\n }\n return result;\n};\n\n// Nested pseudo-class if we are insideRule\n// and the next special character found opens\n// a new block\nBeautifier.prototype.foundNestedPseudoClass = function() {\n var openParen = 0;\n var i = 1;\n var ch = this._input.peek(i);\n while (ch) {\n if (ch === \"{\") {\n return true;\n } else if (ch === '(') {\n // pseudoclasses can contain ()\n openParen += 1;\n } else if (ch === ')') {\n if (openParen === 0) {\n return false;\n }\n openParen -= 1;\n } else if (ch === \";\" || ch === \"}\") {\n return false;\n }\n i++;\n ch = this._input.peek(i);\n }\n return false;\n};\n\nBeautifier.prototype.print_string = function(output_string) {\n this._output.set_indent(this._indentLevel);\n this._output.non_breaking_space = true;\n this._output.add_token(output_string);\n};\n\nBeautifier.prototype.preserveSingleSpace = function(isAfterSpace) {\n if (isAfterSpace) {\n this._output.space_before_token = true;\n }\n};\n\nBeautifier.prototype.indent = function() {\n this._indentLevel++;\n};\n\nBeautifier.prototype.outdent = function() {\n if (this._indentLevel > 0) {\n this._indentLevel--;\n }\n};\n\n/*_____________________--------------------_____________________*/\n\nBeautifier.prototype.beautify = function() {\n if (this._options.disabled) {\n return this._source_text;\n }\n\n var source_text = this._source_text;\n var eol = this._options.eol;\n if (eol === 'auto') {\n eol = '\\n';\n if (source_text && lineBreak.test(source_text || '')) {\n eol = source_text.match(lineBreak)[0];\n }\n }\n\n\n // HACK: newline parsing inconsistent. This brute force normalizes the this._input.\n source_text = source_text.replace(allLineBreaks, '\\n');\n\n // reset\n var baseIndentString = source_text.match(/^[\\t ]*/)[0];\n\n this._output = new Output(this._options, baseIndentString);\n this._input = new InputScanner(source_text);\n this._indentLevel = 0;\n this._nestedLevel = 0;\n\n this._ch = null;\n var parenLevel = 0;\n\n var insideRule = false;\n // This is the value side of a property value pair (blue in the following ex)\n // label { content: blue }\n var insidePropertyValue = false;\n var enteringConditionalGroup = false;\n var insideNonNestedAtRule = false;\n var insideScssMap = false;\n var topCharacter = this._ch;\n var insideNonSemiColonValues = false;\n var whitespace;\n var isAfterSpace;\n var previous_ch;\n\n while (true) {\n whitespace = this._input.read(whitespacePattern);\n isAfterSpace = whitespace !== '';\n previous_ch = topCharacter;\n this._ch = this._input.next();\n if (this._ch === '\\\\' && this._input.hasNext()) {\n this._ch += this._input.next();\n }\n topCharacter = this._ch;\n\n if (!this._ch) {\n break;\n } else if (this._ch === '/' && this._input.peek() === '*') {\n // /* css comment */\n // Always start block comments on a new line.\n // This handles scenarios where a block comment immediately\n // follows a property definition on the same line or where\n // minified code is being beautified.\n this._output.add_new_line();\n this._input.back();\n\n var comment = this._input.read(block_comment_pattern);\n\n // Handle ignore directive\n var directives = directives_core.get_directives(comment);\n if (directives && directives.ignore === 'start') {\n comment += directives_core.readIgnored(this._input);\n }\n\n this.print_string(comment);\n\n // Ensures any new lines following the comment are preserved\n this.eatWhitespace(true);\n\n // Block comments are followed by a new line so they don't\n // share a line with other properties\n this._output.add_new_line();\n } else if (this._ch === '/' && this._input.peek() === '/') {\n // // single line comment\n // Preserves the space before a comment\n // on the same line as a rule\n this._output.space_before_token = true;\n this._input.back();\n this.print_string(this._input.read(comment_pattern));\n\n // Ensures any new lines following the comment are preserved\n this.eatWhitespace(true);\n } else if (this._ch === '$') {\n this.preserveSingleSpace(isAfterSpace);\n\n this.print_string(this._ch);\n\n // strip trailing space, if present, for hash property checks\n var variable = this._input.peekUntilAfter(/[: ,;{}()[\\]\\/='\"]/g);\n\n if (variable.match(/[ :]$/)) {\n // we have a variable or pseudo-class, add it and insert one space before continuing\n variable = this.eatString(\": \").replace(/\\s+$/, '');\n this.print_string(variable);\n this._output.space_before_token = true;\n }\n\n // might be sass variable\n if (parenLevel === 0 && variable.indexOf(':') !== -1) {\n insidePropertyValue = true;\n this.indent();\n }\n } else if (this._ch === '@') {\n this.preserveSingleSpace(isAfterSpace);\n\n // deal with less property mixins @{...}\n if (this._input.peek() === '{') {\n this.print_string(this._ch + this.eatString('}'));\n } else {\n this.print_string(this._ch);\n\n // strip trailing space, if present, for hash property checks\n var variableOrRule = this._input.peekUntilAfter(/[: ,;{}()[\\]\\/='\"]/g);\n\n if (variableOrRule.match(/[ :]$/)) {\n // we have a variable or pseudo-class, add it and insert one space before continuing\n variableOrRule = this.eatString(\": \").replace(/\\s+$/, '');\n this.print_string(variableOrRule);\n this._output.space_before_token = true;\n }\n\n // might be less variable\n if (parenLevel === 0 && variableOrRule.indexOf(':') !== -1) {\n insidePropertyValue = true;\n this.indent();\n\n // might be a nesting at-rule\n } else if (variableOrRule in this.NESTED_AT_RULE) {\n this._nestedLevel += 1;\n if (variableOrRule in this.CONDITIONAL_GROUP_RULE) {\n enteringConditionalGroup = true;\n }\n\n // might be a non-nested at-rule\n } else if (parenLevel === 0 && !insidePropertyValue) {\n insideNonNestedAtRule = true;\n }\n }\n } else if (this._ch === '#' && this._input.peek() === '{') {\n this.preserveSingleSpace(isAfterSpace);\n this.print_string(this._ch + this.eatString('}'));\n } else if (this._ch === '{') {\n if (insidePropertyValue) {\n insidePropertyValue = false;\n this.outdent();\n }\n\n // non nested at rule becomes nested\n insideNonNestedAtRule = false;\n\n // when entering conditional groups, only rulesets are allowed\n if (enteringConditionalGroup) {\n enteringConditionalGroup = false;\n insideRule = (this._indentLevel >= this._nestedLevel);\n } else {\n // otherwise, declarations are also allowed\n insideRule = (this._indentLevel >= this._nestedLevel - 1);\n }\n if (this._options.newline_between_rules && insideRule) {\n if (this._output.previous_line && this._output.previous_line.item(-1) !== '{') {\n this._output.ensure_empty_line_above('/', ',');\n }\n }\n\n this._output.space_before_token = true;\n\n // The difference in print_string and indent order is necessary to indent the '{' correctly\n if (this._options.brace_style === 'expand') {\n this._output.add_new_line();\n this.print_string(this._ch);\n this.indent();\n this._output.set_indent(this._indentLevel);\n } else {\n // inside mixin and first param is object\n if (previous_ch === '(') {\n this._output.space_before_token = false;\n } else if (previous_ch !== ',') {\n this.indent();\n }\n this.print_string(this._ch);\n }\n\n this.eatWhitespace(true);\n this._output.add_new_line();\n } else if (this._ch === '}') {\n this.outdent();\n this._output.add_new_line();\n if (previous_ch === '{') {\n this._output.trim(true);\n }\n\n if (insidePropertyValue) {\n this.outdent();\n insidePropertyValue = false;\n }\n this.print_string(this._ch);\n insideRule = false;\n if (this._nestedLevel) {\n this._nestedLevel--;\n }\n\n this.eatWhitespace(true);\n this._output.add_new_line();\n\n if (this._options.newline_between_rules && !this._output.just_added_blankline()) {\n if (this._input.peek() !== '}') {\n this._output.add_new_line(true);\n }\n }\n if (this._input.peek() === ')') {\n this._output.trim(true);\n if (this._options.brace_style === \"expand\") {\n this._output.add_new_line(true);\n }\n }\n } else if (this._ch === \":\") {\n\n for (var i = 0; i < this.NON_SEMICOLON_NEWLINE_PROPERTY.length; i++) {\n if (this._input.lookBack(this.NON_SEMICOLON_NEWLINE_PROPERTY[i])) {\n insideNonSemiColonValues = true;\n break;\n }\n }\n\n if ((insideRule || enteringConditionalGroup) && !(this._input.lookBack(\"&\") || this.foundNestedPseudoClass()) && !this._input.lookBack(\"(\") && !insideNonNestedAtRule && parenLevel === 0) {\n // 'property: value' delimiter\n // which could be in a conditional group query\n\n this.print_string(':');\n if (!insidePropertyValue) {\n insidePropertyValue = true;\n this._output.space_before_token = true;\n this.eatWhitespace(true);\n this.indent();\n }\n } else {\n // sass/less parent reference don't use a space\n // sass nested pseudo-class don't use a space\n\n // preserve space before pseudoclasses/pseudoelements, as it means \"in any child\"\n if (this._input.lookBack(\" \")) {\n this._output.space_before_token = true;\n }\n if (this._input.peek() === \":\") {\n // pseudo-element\n this._ch = this._input.next();\n this.print_string(\"::\");\n } else {\n // pseudo-class\n this.print_string(':');\n }\n }\n } else if (this._ch === '\"' || this._ch === '\\'') {\n var preserveQuoteSpace = previous_ch === '\"' || previous_ch === '\\'';\n this.preserveSingleSpace(preserveQuoteSpace || isAfterSpace);\n this.print_string(this._ch + this.eatString(this._ch));\n this.eatWhitespace(true);\n } else if (this._ch === ';') {\n insideNonSemiColonValues = false;\n if (parenLevel === 0) {\n if (insidePropertyValue) {\n this.outdent();\n insidePropertyValue = false;\n }\n insideNonNestedAtRule = false;\n this.print_string(this._ch);\n this.eatWhitespace(true);\n\n // This maintains single line comments on the same\n // line. Block comments are also affected, but\n // a new line is always output before one inside\n // that section\n if (this._input.peek() !== '/') {\n this._output.add_new_line();\n }\n } else {\n this.print_string(this._ch);\n this.eatWhitespace(true);\n this._output.space_before_token = true;\n }\n } else if (this._ch === '(') { // may be a url\n if (this._input.lookBack(\"url\")) {\n this.print_string(this._ch);\n this.eatWhitespace();\n parenLevel++;\n this.indent();\n this._ch = this._input.next();\n if (this._ch === ')' || this._ch === '\"' || this._ch === '\\'') {\n this._input.back();\n } else if (this._ch) {\n this.print_string(this._ch + this.eatString(')'));\n if (parenLevel) {\n parenLevel--;\n this.outdent();\n }\n }\n } else {\n var space_needed = false;\n if (this._input.lookBack(\"with\")) {\n // look back is not an accurate solution, we need tokens to confirm without whitespaces\n space_needed = true;\n }\n this.preserveSingleSpace(isAfterSpace || space_needed);\n this.print_string(this._ch);\n\n // handle scss/sass map\n if (insidePropertyValue && previous_ch === \"$\" && this._options.selector_separator_newline) {\n this._output.add_new_line();\n insideScssMap = true;\n } else {\n this.eatWhitespace();\n parenLevel++;\n this.indent();\n }\n }\n } else if (this._ch === ')') {\n if (parenLevel) {\n parenLevel--;\n this.outdent();\n }\n if (insideScssMap && this._input.peek() === \";\" && this._options.selector_separator_newline) {\n insideScssMap = false;\n this.outdent();\n this._output.add_new_line();\n }\n this.print_string(this._ch);\n } else if (this._ch === ',') {\n this.print_string(this._ch);\n this.eatWhitespace(true);\n if (this._options.selector_separator_newline && (!insidePropertyValue || insideScssMap) && parenLevel === 0 && !insideNonNestedAtRule) {\n this._output.add_new_line();\n } else {\n this._output.space_before_token = true;\n }\n } else if ((this._ch === '>' || this._ch === '+' || this._ch === '~') && !insidePropertyValue && parenLevel === 0) {\n //handle combinator spacing\n if (this._options.space_around_combinator) {\n this._output.space_before_token = true;\n this.print_string(this._ch);\n this._output.space_before_token = true;\n } else {\n this.print_string(this._ch);\n this.eatWhitespace();\n // squash extra whitespace\n if (this._ch && whitespaceChar.test(this._ch)) {\n this._ch = '';\n }\n }\n } else if (this._ch === ']') {\n this.print_string(this._ch);\n } else if (this._ch === '[') {\n this.preserveSingleSpace(isAfterSpace);\n this.print_string(this._ch);\n } else if (this._ch === '=') { // no whitespace before or after\n this.eatWhitespace();\n this.print_string('=');\n if (whitespaceChar.test(this._ch)) {\n this._ch = '';\n }\n } else if (this._ch === '!' && !this._input.lookBack(\"\\\\\")) { // !important\n this._output.space_before_token = true;\n this.print_string(this._ch);\n } else {\n var preserveAfterSpace = previous_ch === '\"' || previous_ch === '\\'';\n this.preserveSingleSpace(preserveAfterSpace || isAfterSpace);\n this.print_string(this._ch);\n\n if (!this._output.just_added_newline() && this._input.peek() === '\\n' && insideNonSemiColonValues) {\n this._output.add_new_line();\n }\n }\n }\n\n var sweetCode = this._output.get_code(eol);\n\n return sweetCode;\n};\n\nmodule.exports.Beautifier = Beautifier;\n\n\n/***/ }),\n/* 17 */\n/***/ (function(module, __unused_webpack_exports, __webpack_require__) {\n\n/*jshint node:true */\n/*\n\n The MIT License (MIT)\n\n Copyright (c) 2007-2018 Einar Lielmanis, Liam Newman, and contributors.\n\n Permission is hereby granted, free of charge, to any person\n obtaining a copy of this software and associated documentation files\n (the \"Software\"), to deal in the Software without restriction,\n including without limitation the rights to use, copy, modify, merge,\n publish, distribute, sublicense, and/or sell copies of the Software,\n and to permit persons to whom the Software is furnished to do so,\n subject to the following conditions:\n\n The above copyright notice and this permission notice shall be\n included in all copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS\n BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN\n ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n*/\n\n\n\nvar BaseOptions = (__webpack_require__(6).Options);\n\nfunction Options(options) {\n BaseOptions.call(this, options, 'css');\n\n this.selector_separator_newline = this._get_boolean('selector_separator_newline', true);\n this.newline_between_rules = this._get_boolean('newline_between_rules', true);\n var space_around_selector_separator = this._get_boolean('space_around_selector_separator');\n this.space_around_combinator = this._get_boolean('space_around_combinator') || space_around_selector_separator;\n\n var brace_style_split = this._get_selection_list('brace_style', ['collapse', 'expand', 'end-expand', 'none', 'preserve-inline']);\n this.brace_style = 'collapse';\n for (var bs = 0; bs < brace_style_split.length; bs++) {\n if (brace_style_split[bs] !== 'expand') {\n // default to collapse, as only collapse|expand is implemented for now\n this.brace_style = 'collapse';\n } else {\n this.brace_style = brace_style_split[bs];\n }\n }\n}\nOptions.prototype = new BaseOptions();\n\n\n\nmodule.exports.Options = Options;\n\n\n/***/ })\n/******/ \t]);\n/************************************************************************/\n/******/ \t// The module cache\n/******/ \tvar __webpack_module_cache__ = {};\n/******/ \t\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/ \t\t// Check if module is in cache\n/******/ \t\tvar cachedModule = __webpack_module_cache__[moduleId];\n/******/ \t\tif (cachedModule !== undefined) {\n/******/ \t\t\treturn cachedModule.exports;\n/******/ \t\t}\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = __webpack_module_cache__[moduleId] = {\n/******/ \t\t\t// no module.id needed\n/******/ \t\t\t// no module.loaded needed\n/******/ \t\t\texports: {}\n/******/ \t\t};\n/******/ \t\n/******/ \t\t// Execute the module function\n/******/ \t\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n/******/ \t\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/ \t\n/************************************************************************/\n/******/ \t\n/******/ \t// startup\n/******/ \t// Load entry module and return exports\n/******/ \t// This entry module is referenced by other modules so it can't be inlined\n/******/ \tvar __webpack_exports__ = __webpack_require__(15);\n/******/ \tlegacy_beautify_css = __webpack_exports__;\n/******/ \t\n/******/ })()\n;\nvar css_beautify = legacy_beautify_css;\n/* Footer */\nif (typeof define === \"function\" && define.amd) {\n // Add support for AMD ( https://github.com/amdjs/amdjs-api/wiki/AMD#defineamd-property- )\n define([], function() {\n return {\n css_beautify: css_beautify\n };\n });\n} else if (typeof exports !== \"undefined\") {\n // Add support for CommonJS. Just put this file somewhere on your require.paths\n // and you will be able to `var html_beautify = require(\"beautify\").html_beautify`.\n exports.css_beautify = css_beautify;\n} else if (typeof window !== \"undefined\") {\n // If we're running a web page and don't have either of the above, add our one global\n window.css_beautify = css_beautify;\n} else if (typeof global !== \"undefined\") {\n // If we don't even have window, try global.\n global.css_beautify = css_beautify;\n}\n\n}());\n","/* AUTO-GENERATED. DO NOT MODIFY. */\n/*\n\n The MIT License (MIT)\n\n Copyright (c) 2007-2018 Einar Lielmanis, Liam Newman, and contributors.\n\n Permission is hereby granted, free of charge, to any person\n obtaining a copy of this software and associated documentation files\n (the \"Software\"), to deal in the Software without restriction,\n including without limitation the rights to use, copy, modify, merge,\n publish, distribute, sublicense, and/or sell copies of the Software,\n and to permit persons to whom the Software is furnished to do so,\n subject to the following conditions:\n\n The above copyright notice and this permission notice shall be\n included in all copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS\n BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN\n ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n\n\n Style HTML\n---------------\n\n Written by Nochum Sossonko, (nsossonko@hotmail.com)\n\n Based on code initially developed by: Einar Lielmanis, \n https://beautifier.io/\n\n Usage:\n style_html(html_source);\n\n style_html(html_source, options);\n\n The options are:\n indent_inner_html (default false) — indent and sections,\n indent_size (default 4) — indentation size,\n indent_char (default space) — character to indent with,\n wrap_line_length (default 250) - maximum amount of characters per line (0 = disable)\n brace_style (default \"collapse\") - \"collapse\" | \"expand\" | \"end-expand\" | \"none\"\n put braces on the same line as control statements (default), or put braces on own line (Allman / ANSI style), or just put end braces on own line, or attempt to keep them where they are.\n inline (defaults to inline tags) - list of tags to be considered inline tags\n unformatted (defaults to inline tags) - list of tags, that shouldn't be reformatted\n content_unformatted (defaults to [\"pre\", \"textarea\"] tags) - list of tags, whose content shouldn't be reformatted\n indent_scripts (default normal) - \"keep\"|\"separate\"|\"normal\"\n preserve_newlines (default true) - whether existing line breaks before elements should be preserved\n Only works before elements, not inside tags or for text.\n max_preserve_newlines (default unlimited) - maximum number of line breaks to be preserved in one chunk\n indent_handlebars (default false) - format and indent {{#foo}} and {{/foo}}\n end_with_newline (false) - end with a newline\n extra_liners (default [head,body,/html]) -List of tags that should have an extra newline before them.\n\n e.g.\n\n style_html(html_source, {\n 'indent_inner_html': false,\n 'indent_size': 2,\n 'indent_char': ' ',\n 'wrap_line_length': 78,\n 'brace_style': 'expand',\n 'preserve_newlines': true,\n 'max_preserve_newlines': 5,\n 'indent_handlebars': false,\n 'extra_liners': ['/html']\n });\n*/\n\n(function() {\n\n/* GENERATED_BUILD_OUTPUT */\nvar legacy_beautify_html;\n/******/ (function() { // webpackBootstrap\n/******/ \t\"use strict\";\n/******/ \tvar __webpack_modules__ = ([\n/* 0 */,\n/* 1 */,\n/* 2 */\n/***/ (function(module) {\n\n/*jshint node:true */\n/*\n The MIT License (MIT)\n\n Copyright (c) 2007-2018 Einar Lielmanis, Liam Newman, and contributors.\n\n Permission is hereby granted, free of charge, to any person\n obtaining a copy of this software and associated documentation files\n (the \"Software\"), to deal in the Software without restriction,\n including without limitation the rights to use, copy, modify, merge,\n publish, distribute, sublicense, and/or sell copies of the Software,\n and to permit persons to whom the Software is furnished to do so,\n subject to the following conditions:\n\n The above copyright notice and this permission notice shall be\n included in all copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS\n BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN\n ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n*/\n\n\n\nfunction OutputLine(parent) {\n this.__parent = parent;\n this.__character_count = 0;\n // use indent_count as a marker for this.__lines that have preserved indentation\n this.__indent_count = -1;\n this.__alignment_count = 0;\n this.__wrap_point_index = 0;\n this.__wrap_point_character_count = 0;\n this.__wrap_point_indent_count = -1;\n this.__wrap_point_alignment_count = 0;\n\n this.__items = [];\n}\n\nOutputLine.prototype.clone_empty = function() {\n var line = new OutputLine(this.__parent);\n line.set_indent(this.__indent_count, this.__alignment_count);\n return line;\n};\n\nOutputLine.prototype.item = function(index) {\n if (index < 0) {\n return this.__items[this.__items.length + index];\n } else {\n return this.__items[index];\n }\n};\n\nOutputLine.prototype.has_match = function(pattern) {\n for (var lastCheckedOutput = this.__items.length - 1; lastCheckedOutput >= 0; lastCheckedOutput--) {\n if (this.__items[lastCheckedOutput].match(pattern)) {\n return true;\n }\n }\n return false;\n};\n\nOutputLine.prototype.set_indent = function(indent, alignment) {\n if (this.is_empty()) {\n this.__indent_count = indent || 0;\n this.__alignment_count = alignment || 0;\n this.__character_count = this.__parent.get_indent_size(this.__indent_count, this.__alignment_count);\n }\n};\n\nOutputLine.prototype._set_wrap_point = function() {\n if (this.__parent.wrap_line_length) {\n this.__wrap_point_index = this.__items.length;\n this.__wrap_point_character_count = this.__character_count;\n this.__wrap_point_indent_count = this.__parent.next_line.__indent_count;\n this.__wrap_point_alignment_count = this.__parent.next_line.__alignment_count;\n }\n};\n\nOutputLine.prototype._should_wrap = function() {\n return this.__wrap_point_index &&\n this.__character_count > this.__parent.wrap_line_length &&\n this.__wrap_point_character_count > this.__parent.next_line.__character_count;\n};\n\nOutputLine.prototype._allow_wrap = function() {\n if (this._should_wrap()) {\n this.__parent.add_new_line();\n var next = this.__parent.current_line;\n next.set_indent(this.__wrap_point_indent_count, this.__wrap_point_alignment_count);\n next.__items = this.__items.slice(this.__wrap_point_index);\n this.__items = this.__items.slice(0, this.__wrap_point_index);\n\n next.__character_count += this.__character_count - this.__wrap_point_character_count;\n this.__character_count = this.__wrap_point_character_count;\n\n if (next.__items[0] === \" \") {\n next.__items.splice(0, 1);\n next.__character_count -= 1;\n }\n return true;\n }\n return false;\n};\n\nOutputLine.prototype.is_empty = function() {\n return this.__items.length === 0;\n};\n\nOutputLine.prototype.last = function() {\n if (!this.is_empty()) {\n return this.__items[this.__items.length - 1];\n } else {\n return null;\n }\n};\n\nOutputLine.prototype.push = function(item) {\n this.__items.push(item);\n var last_newline_index = item.lastIndexOf('\\n');\n if (last_newline_index !== -1) {\n this.__character_count = item.length - last_newline_index;\n } else {\n this.__character_count += item.length;\n }\n};\n\nOutputLine.prototype.pop = function() {\n var item = null;\n if (!this.is_empty()) {\n item = this.__items.pop();\n this.__character_count -= item.length;\n }\n return item;\n};\n\n\nOutputLine.prototype._remove_indent = function() {\n if (this.__indent_count > 0) {\n this.__indent_count -= 1;\n this.__character_count -= this.__parent.indent_size;\n }\n};\n\nOutputLine.prototype._remove_wrap_indent = function() {\n if (this.__wrap_point_indent_count > 0) {\n this.__wrap_point_indent_count -= 1;\n }\n};\nOutputLine.prototype.trim = function() {\n while (this.last() === ' ') {\n this.__items.pop();\n this.__character_count -= 1;\n }\n};\n\nOutputLine.prototype.toString = function() {\n var result = '';\n if (this.is_empty()) {\n if (this.__parent.indent_empty_lines) {\n result = this.__parent.get_indent_string(this.__indent_count);\n }\n } else {\n result = this.__parent.get_indent_string(this.__indent_count, this.__alignment_count);\n result += this.__items.join('');\n }\n return result;\n};\n\nfunction IndentStringCache(options, baseIndentString) {\n this.__cache = [''];\n this.__indent_size = options.indent_size;\n this.__indent_string = options.indent_char;\n if (!options.indent_with_tabs) {\n this.__indent_string = new Array(options.indent_size + 1).join(options.indent_char);\n }\n\n // Set to null to continue support for auto detection of base indent\n baseIndentString = baseIndentString || '';\n if (options.indent_level > 0) {\n baseIndentString = new Array(options.indent_level + 1).join(this.__indent_string);\n }\n\n this.__base_string = baseIndentString;\n this.__base_string_length = baseIndentString.length;\n}\n\nIndentStringCache.prototype.get_indent_size = function(indent, column) {\n var result = this.__base_string_length;\n column = column || 0;\n if (indent < 0) {\n result = 0;\n }\n result += indent * this.__indent_size;\n result += column;\n return result;\n};\n\nIndentStringCache.prototype.get_indent_string = function(indent_level, column) {\n var result = this.__base_string;\n column = column || 0;\n if (indent_level < 0) {\n indent_level = 0;\n result = '';\n }\n column += indent_level * this.__indent_size;\n this.__ensure_cache(column);\n result += this.__cache[column];\n return result;\n};\n\nIndentStringCache.prototype.__ensure_cache = function(column) {\n while (column >= this.__cache.length) {\n this.__add_column();\n }\n};\n\nIndentStringCache.prototype.__add_column = function() {\n var column = this.__cache.length;\n var indent = 0;\n var result = '';\n if (this.__indent_size && column >= this.__indent_size) {\n indent = Math.floor(column / this.__indent_size);\n column -= indent * this.__indent_size;\n result = new Array(indent + 1).join(this.__indent_string);\n }\n if (column) {\n result += new Array(column + 1).join(' ');\n }\n\n this.__cache.push(result);\n};\n\nfunction Output(options, baseIndentString) {\n this.__indent_cache = new IndentStringCache(options, baseIndentString);\n this.raw = false;\n this._end_with_newline = options.end_with_newline;\n this.indent_size = options.indent_size;\n this.wrap_line_length = options.wrap_line_length;\n this.indent_empty_lines = options.indent_empty_lines;\n this.__lines = [];\n this.previous_line = null;\n this.current_line = null;\n this.next_line = new OutputLine(this);\n this.space_before_token = false;\n this.non_breaking_space = false;\n this.previous_token_wrapped = false;\n // initialize\n this.__add_outputline();\n}\n\nOutput.prototype.__add_outputline = function() {\n this.previous_line = this.current_line;\n this.current_line = this.next_line.clone_empty();\n this.__lines.push(this.current_line);\n};\n\nOutput.prototype.get_line_number = function() {\n return this.__lines.length;\n};\n\nOutput.prototype.get_indent_string = function(indent, column) {\n return this.__indent_cache.get_indent_string(indent, column);\n};\n\nOutput.prototype.get_indent_size = function(indent, column) {\n return this.__indent_cache.get_indent_size(indent, column);\n};\n\nOutput.prototype.is_empty = function() {\n return !this.previous_line && this.current_line.is_empty();\n};\n\nOutput.prototype.add_new_line = function(force_newline) {\n // never newline at the start of file\n // otherwise, newline only if we didn't just add one or we're forced\n if (this.is_empty() ||\n (!force_newline && this.just_added_newline())) {\n return false;\n }\n\n // if raw output is enabled, don't print additional newlines,\n // but still return True as though you had\n if (!this.raw) {\n this.__add_outputline();\n }\n return true;\n};\n\nOutput.prototype.get_code = function(eol) {\n this.trim(true);\n\n // handle some edge cases where the last tokens\n // has text that ends with newline(s)\n var last_item = this.current_line.pop();\n if (last_item) {\n if (last_item[last_item.length - 1] === '\\n') {\n last_item = last_item.replace(/\\n+$/g, '');\n }\n this.current_line.push(last_item);\n }\n\n if (this._end_with_newline) {\n this.__add_outputline();\n }\n\n var sweet_code = this.__lines.join('\\n');\n\n if (eol !== '\\n') {\n sweet_code = sweet_code.replace(/[\\n]/g, eol);\n }\n return sweet_code;\n};\n\nOutput.prototype.set_wrap_point = function() {\n this.current_line._set_wrap_point();\n};\n\nOutput.prototype.set_indent = function(indent, alignment) {\n indent = indent || 0;\n alignment = alignment || 0;\n\n // Next line stores alignment values\n this.next_line.set_indent(indent, alignment);\n\n // Never indent your first output indent at the start of the file\n if (this.__lines.length > 1) {\n this.current_line.set_indent(indent, alignment);\n return true;\n }\n\n this.current_line.set_indent();\n return false;\n};\n\nOutput.prototype.add_raw_token = function(token) {\n for (var x = 0; x < token.newlines; x++) {\n this.__add_outputline();\n }\n this.current_line.set_indent(-1);\n this.current_line.push(token.whitespace_before);\n this.current_line.push(token.text);\n this.space_before_token = false;\n this.non_breaking_space = false;\n this.previous_token_wrapped = false;\n};\n\nOutput.prototype.add_token = function(printable_token) {\n this.__add_space_before_token();\n this.current_line.push(printable_token);\n this.space_before_token = false;\n this.non_breaking_space = false;\n this.previous_token_wrapped = this.current_line._allow_wrap();\n};\n\nOutput.prototype.__add_space_before_token = function() {\n if (this.space_before_token && !this.just_added_newline()) {\n if (!this.non_breaking_space) {\n this.set_wrap_point();\n }\n this.current_line.push(' ');\n }\n};\n\nOutput.prototype.remove_indent = function(index) {\n var output_length = this.__lines.length;\n while (index < output_length) {\n this.__lines[index]._remove_indent();\n index++;\n }\n this.current_line._remove_wrap_indent();\n};\n\nOutput.prototype.trim = function(eat_newlines) {\n eat_newlines = (eat_newlines === undefined) ? false : eat_newlines;\n\n this.current_line.trim();\n\n while (eat_newlines && this.__lines.length > 1 &&\n this.current_line.is_empty()) {\n this.__lines.pop();\n this.current_line = this.__lines[this.__lines.length - 1];\n this.current_line.trim();\n }\n\n this.previous_line = this.__lines.length > 1 ?\n this.__lines[this.__lines.length - 2] : null;\n};\n\nOutput.prototype.just_added_newline = function() {\n return this.current_line.is_empty();\n};\n\nOutput.prototype.just_added_blankline = function() {\n return this.is_empty() ||\n (this.current_line.is_empty() && this.previous_line.is_empty());\n};\n\nOutput.prototype.ensure_empty_line_above = function(starts_with, ends_with) {\n var index = this.__lines.length - 2;\n while (index >= 0) {\n var potentialEmptyLine = this.__lines[index];\n if (potentialEmptyLine.is_empty()) {\n break;\n } else if (potentialEmptyLine.item(0).indexOf(starts_with) !== 0 &&\n potentialEmptyLine.item(-1) !== ends_with) {\n this.__lines.splice(index + 1, 0, new OutputLine(this));\n this.previous_line = this.__lines[this.__lines.length - 2];\n break;\n }\n index--;\n }\n};\n\nmodule.exports.Output = Output;\n\n\n/***/ }),\n/* 3 */\n/***/ (function(module) {\n\n/*jshint node:true */\n/*\n\n The MIT License (MIT)\n\n Copyright (c) 2007-2018 Einar Lielmanis, Liam Newman, and contributors.\n\n Permission is hereby granted, free of charge, to any person\n obtaining a copy of this software and associated documentation files\n (the \"Software\"), to deal in the Software without restriction,\n including without limitation the rights to use, copy, modify, merge,\n publish, distribute, sublicense, and/or sell copies of the Software,\n and to permit persons to whom the Software is furnished to do so,\n subject to the following conditions:\n\n The above copyright notice and this permission notice shall be\n included in all copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS\n BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN\n ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n*/\n\n\n\nfunction Token(type, text, newlines, whitespace_before) {\n this.type = type;\n this.text = text;\n\n // comments_before are\n // comments that have a new line before them\n // and may or may not have a newline after\n // this is a set of comments before\n this.comments_before = null; /* inline comment*/\n\n\n // this.comments_after = new TokenStream(); // no new line before and newline after\n this.newlines = newlines || 0;\n this.whitespace_before = whitespace_before || '';\n this.parent = null;\n this.next = null;\n this.previous = null;\n this.opened = null;\n this.closed = null;\n this.directives = null;\n}\n\n\nmodule.exports.Token = Token;\n\n\n/***/ }),\n/* 4 */,\n/* 5 */,\n/* 6 */\n/***/ (function(module) {\n\n/*jshint node:true */\n/*\n\n The MIT License (MIT)\n\n Copyright (c) 2007-2018 Einar Lielmanis, Liam Newman, and contributors.\n\n Permission is hereby granted, free of charge, to any person\n obtaining a copy of this software and associated documentation files\n (the \"Software\"), to deal in the Software without restriction,\n including without limitation the rights to use, copy, modify, merge,\n publish, distribute, sublicense, and/or sell copies of the Software,\n and to permit persons to whom the Software is furnished to do so,\n subject to the following conditions:\n\n The above copyright notice and this permission notice shall be\n included in all copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS\n BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN\n ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n*/\n\n\n\nfunction Options(options, merge_child_field) {\n this.raw_options = _mergeOpts(options, merge_child_field);\n\n // Support passing the source text back with no change\n this.disabled = this._get_boolean('disabled');\n\n this.eol = this._get_characters('eol', 'auto');\n this.end_with_newline = this._get_boolean('end_with_newline');\n this.indent_size = this._get_number('indent_size', 4);\n this.indent_char = this._get_characters('indent_char', ' ');\n this.indent_level = this._get_number('indent_level');\n\n this.preserve_newlines = this._get_boolean('preserve_newlines', true);\n this.max_preserve_newlines = this._get_number('max_preserve_newlines', 32786);\n if (!this.preserve_newlines) {\n this.max_preserve_newlines = 0;\n }\n\n this.indent_with_tabs = this._get_boolean('indent_with_tabs', this.indent_char === '\\t');\n if (this.indent_with_tabs) {\n this.indent_char = '\\t';\n\n // indent_size behavior changed after 1.8.6\n // It used to be that indent_size would be\n // set to 1 for indent_with_tabs. That is no longer needed and\n // actually doesn't make sense - why not use spaces? Further,\n // that might produce unexpected behavior - tabs being used\n // for single-column alignment. So, when indent_with_tabs is true\n // and indent_size is 1, reset indent_size to 4.\n if (this.indent_size === 1) {\n this.indent_size = 4;\n }\n }\n\n // Backwards compat with 1.3.x\n this.wrap_line_length = this._get_number('wrap_line_length', this._get_number('max_char'));\n\n this.indent_empty_lines = this._get_boolean('indent_empty_lines');\n\n // valid templating languages ['django', 'erb', 'handlebars', 'php', 'smarty']\n // For now, 'auto' = all off for javascript, all on for html (and inline javascript).\n // other values ignored\n this.templating = this._get_selection_list('templating', ['auto', 'none', 'django', 'erb', 'handlebars', 'php', 'smarty'], ['auto']);\n}\n\nOptions.prototype._get_array = function(name, default_value) {\n var option_value = this.raw_options[name];\n var result = default_value || [];\n if (typeof option_value === 'object') {\n if (option_value !== null && typeof option_value.concat === 'function') {\n result = option_value.concat();\n }\n } else if (typeof option_value === 'string') {\n result = option_value.split(/[^a-zA-Z0-9_\\/\\-]+/);\n }\n return result;\n};\n\nOptions.prototype._get_boolean = function(name, default_value) {\n var option_value = this.raw_options[name];\n var result = option_value === undefined ? !!default_value : !!option_value;\n return result;\n};\n\nOptions.prototype._get_characters = function(name, default_value) {\n var option_value = this.raw_options[name];\n var result = default_value || '';\n if (typeof option_value === 'string') {\n result = option_value.replace(/\\\\r/, '\\r').replace(/\\\\n/, '\\n').replace(/\\\\t/, '\\t');\n }\n return result;\n};\n\nOptions.prototype._get_number = function(name, default_value) {\n var option_value = this.raw_options[name];\n default_value = parseInt(default_value, 10);\n if (isNaN(default_value)) {\n default_value = 0;\n }\n var result = parseInt(option_value, 10);\n if (isNaN(result)) {\n result = default_value;\n }\n return result;\n};\n\nOptions.prototype._get_selection = function(name, selection_list, default_value) {\n var result = this._get_selection_list(name, selection_list, default_value);\n if (result.length !== 1) {\n throw new Error(\n \"Invalid Option Value: The option '\" + name + \"' can only be one of the following values:\\n\" +\n selection_list + \"\\nYou passed in: '\" + this.raw_options[name] + \"'\");\n }\n\n return result[0];\n};\n\n\nOptions.prototype._get_selection_list = function(name, selection_list, default_value) {\n if (!selection_list || selection_list.length === 0) {\n throw new Error(\"Selection list cannot be empty.\");\n }\n\n default_value = default_value || [selection_list[0]];\n if (!this._is_valid_selection(default_value, selection_list)) {\n throw new Error(\"Invalid Default Value!\");\n }\n\n var result = this._get_array(name, default_value);\n if (!this._is_valid_selection(result, selection_list)) {\n throw new Error(\n \"Invalid Option Value: The option '\" + name + \"' can contain only the following values:\\n\" +\n selection_list + \"\\nYou passed in: '\" + this.raw_options[name] + \"'\");\n }\n\n return result;\n};\n\nOptions.prototype._is_valid_selection = function(result, selection_list) {\n return result.length && selection_list.length &&\n !result.some(function(item) { return selection_list.indexOf(item) === -1; });\n};\n\n\n// merges child options up with the parent options object\n// Example: obj = {a: 1, b: {a: 2}}\n// mergeOpts(obj, 'b')\n//\n// Returns: {a: 2}\nfunction _mergeOpts(allOptions, childFieldName) {\n var finalOpts = {};\n allOptions = _normalizeOpts(allOptions);\n var name;\n\n for (name in allOptions) {\n if (name !== childFieldName) {\n finalOpts[name] = allOptions[name];\n }\n }\n\n //merge in the per type settings for the childFieldName\n if (childFieldName && allOptions[childFieldName]) {\n for (name in allOptions[childFieldName]) {\n finalOpts[name] = allOptions[childFieldName][name];\n }\n }\n return finalOpts;\n}\n\nfunction _normalizeOpts(options) {\n var convertedOpts = {};\n var key;\n\n for (key in options) {\n var newKey = key.replace(/-/g, \"_\");\n convertedOpts[newKey] = options[key];\n }\n return convertedOpts;\n}\n\nmodule.exports.Options = Options;\nmodule.exports.normalizeOpts = _normalizeOpts;\nmodule.exports.mergeOpts = _mergeOpts;\n\n\n/***/ }),\n/* 7 */,\n/* 8 */\n/***/ (function(module) {\n\n/*jshint node:true */\n/*\n\n The MIT License (MIT)\n\n Copyright (c) 2007-2018 Einar Lielmanis, Liam Newman, and contributors.\n\n Permission is hereby granted, free of charge, to any person\n obtaining a copy of this software and associated documentation files\n (the \"Software\"), to deal in the Software without restriction,\n including without limitation the rights to use, copy, modify, merge,\n publish, distribute, sublicense, and/or sell copies of the Software,\n and to permit persons to whom the Software is furnished to do so,\n subject to the following conditions:\n\n The above copyright notice and this permission notice shall be\n included in all copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS\n BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN\n ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n*/\n\n\n\nvar regexp_has_sticky = RegExp.prototype.hasOwnProperty('sticky');\n\nfunction InputScanner(input_string) {\n this.__input = input_string || '';\n this.__input_length = this.__input.length;\n this.__position = 0;\n}\n\nInputScanner.prototype.restart = function() {\n this.__position = 0;\n};\n\nInputScanner.prototype.back = function() {\n if (this.__position > 0) {\n this.__position -= 1;\n }\n};\n\nInputScanner.prototype.hasNext = function() {\n return this.__position < this.__input_length;\n};\n\nInputScanner.prototype.next = function() {\n var val = null;\n if (this.hasNext()) {\n val = this.__input.charAt(this.__position);\n this.__position += 1;\n }\n return val;\n};\n\nInputScanner.prototype.peek = function(index) {\n var val = null;\n index = index || 0;\n index += this.__position;\n if (index >= 0 && index < this.__input_length) {\n val = this.__input.charAt(index);\n }\n return val;\n};\n\n// This is a JavaScript only helper function (not in python)\n// Javascript doesn't have a match method\n// and not all implementation support \"sticky\" flag.\n// If they do not support sticky then both this.match() and this.test() method\n// must get the match and check the index of the match.\n// If sticky is supported and set, this method will use it.\n// Otherwise it will check that global is set, and fall back to the slower method.\nInputScanner.prototype.__match = function(pattern, index) {\n pattern.lastIndex = index;\n var pattern_match = pattern.exec(this.__input);\n\n if (pattern_match && !(regexp_has_sticky && pattern.sticky)) {\n if (pattern_match.index !== index) {\n pattern_match = null;\n }\n }\n\n return pattern_match;\n};\n\nInputScanner.prototype.test = function(pattern, index) {\n index = index || 0;\n index += this.__position;\n\n if (index >= 0 && index < this.__input_length) {\n return !!this.__match(pattern, index);\n } else {\n return false;\n }\n};\n\nInputScanner.prototype.testChar = function(pattern, index) {\n // test one character regex match\n var val = this.peek(index);\n pattern.lastIndex = 0;\n return val !== null && pattern.test(val);\n};\n\nInputScanner.prototype.match = function(pattern) {\n var pattern_match = this.__match(pattern, this.__position);\n if (pattern_match) {\n this.__position += pattern_match[0].length;\n } else {\n pattern_match = null;\n }\n return pattern_match;\n};\n\nInputScanner.prototype.read = function(starting_pattern, until_pattern, until_after) {\n var val = '';\n var match;\n if (starting_pattern) {\n match = this.match(starting_pattern);\n if (match) {\n val += match[0];\n }\n }\n if (until_pattern && (match || !starting_pattern)) {\n val += this.readUntil(until_pattern, until_after);\n }\n return val;\n};\n\nInputScanner.prototype.readUntil = function(pattern, until_after) {\n var val = '';\n var match_index = this.__position;\n pattern.lastIndex = this.__position;\n var pattern_match = pattern.exec(this.__input);\n if (pattern_match) {\n match_index = pattern_match.index;\n if (until_after) {\n match_index += pattern_match[0].length;\n }\n } else {\n match_index = this.__input_length;\n }\n\n val = this.__input.substring(this.__position, match_index);\n this.__position = match_index;\n return val;\n};\n\nInputScanner.prototype.readUntilAfter = function(pattern) {\n return this.readUntil(pattern, true);\n};\n\nInputScanner.prototype.get_regexp = function(pattern, match_from) {\n var result = null;\n var flags = 'g';\n if (match_from && regexp_has_sticky) {\n flags = 'y';\n }\n // strings are converted to regexp\n if (typeof pattern === \"string\" && pattern !== '') {\n // result = new RegExp(pattern.replace(/[-\\/\\\\^$*+?.()|[\\]{}]/g, '\\\\$&'), flags);\n result = new RegExp(pattern, flags);\n } else if (pattern) {\n result = new RegExp(pattern.source, flags);\n }\n return result;\n};\n\nInputScanner.prototype.get_literal_regexp = function(literal_string) {\n return RegExp(literal_string.replace(/[-\\/\\\\^$*+?.()|[\\]{}]/g, '\\\\$&'));\n};\n\n/* css beautifier legacy helpers */\nInputScanner.prototype.peekUntilAfter = function(pattern) {\n var start = this.__position;\n var val = this.readUntilAfter(pattern);\n this.__position = start;\n return val;\n};\n\nInputScanner.prototype.lookBack = function(testVal) {\n var start = this.__position - 1;\n return start >= testVal.length && this.__input.substring(start - testVal.length, start)\n .toLowerCase() === testVal;\n};\n\nmodule.exports.InputScanner = InputScanner;\n\n\n/***/ }),\n/* 9 */\n/***/ (function(module, __unused_webpack_exports, __webpack_require__) {\n\n/*jshint node:true */\n/*\n\n The MIT License (MIT)\n\n Copyright (c) 2007-2018 Einar Lielmanis, Liam Newman, and contributors.\n\n Permission is hereby granted, free of charge, to any person\n obtaining a copy of this software and associated documentation files\n (the \"Software\"), to deal in the Software without restriction,\n including without limitation the rights to use, copy, modify, merge,\n publish, distribute, sublicense, and/or sell copies of the Software,\n and to permit persons to whom the Software is furnished to do so,\n subject to the following conditions:\n\n The above copyright notice and this permission notice shall be\n included in all copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS\n BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN\n ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n*/\n\n\n\nvar InputScanner = (__webpack_require__(8).InputScanner);\nvar Token = (__webpack_require__(3).Token);\nvar TokenStream = (__webpack_require__(10).TokenStream);\nvar WhitespacePattern = (__webpack_require__(11).WhitespacePattern);\n\nvar TOKEN = {\n START: 'TK_START',\n RAW: 'TK_RAW',\n EOF: 'TK_EOF'\n};\n\nvar Tokenizer = function(input_string, options) {\n this._input = new InputScanner(input_string);\n this._options = options || {};\n this.__tokens = null;\n\n this._patterns = {};\n this._patterns.whitespace = new WhitespacePattern(this._input);\n};\n\nTokenizer.prototype.tokenize = function() {\n this._input.restart();\n this.__tokens = new TokenStream();\n\n this._reset();\n\n var current;\n var previous = new Token(TOKEN.START, '');\n var open_token = null;\n var open_stack = [];\n var comments = new TokenStream();\n\n while (previous.type !== TOKEN.EOF) {\n current = this._get_next_token(previous, open_token);\n while (this._is_comment(current)) {\n comments.add(current);\n current = this._get_next_token(previous, open_token);\n }\n\n if (!comments.isEmpty()) {\n current.comments_before = comments;\n comments = new TokenStream();\n }\n\n current.parent = open_token;\n\n if (this._is_opening(current)) {\n open_stack.push(open_token);\n open_token = current;\n } else if (open_token && this._is_closing(current, open_token)) {\n current.opened = open_token;\n open_token.closed = current;\n open_token = open_stack.pop();\n current.parent = open_token;\n }\n\n current.previous = previous;\n previous.next = current;\n\n this.__tokens.add(current);\n previous = current;\n }\n\n return this.__tokens;\n};\n\n\nTokenizer.prototype._is_first_token = function() {\n return this.__tokens.isEmpty();\n};\n\nTokenizer.prototype._reset = function() {};\n\nTokenizer.prototype._get_next_token = function(previous_token, open_token) { // jshint unused:false\n this._readWhitespace();\n var resulting_string = this._input.read(/.+/g);\n if (resulting_string) {\n return this._create_token(TOKEN.RAW, resulting_string);\n } else {\n return this._create_token(TOKEN.EOF, '');\n }\n};\n\nTokenizer.prototype._is_comment = function(current_token) { // jshint unused:false\n return false;\n};\n\nTokenizer.prototype._is_opening = function(current_token) { // jshint unused:false\n return false;\n};\n\nTokenizer.prototype._is_closing = function(current_token, open_token) { // jshint unused:false\n return false;\n};\n\nTokenizer.prototype._create_token = function(type, text) {\n var token = new Token(type, text,\n this._patterns.whitespace.newline_count,\n this._patterns.whitespace.whitespace_before_token);\n return token;\n};\n\nTokenizer.prototype._readWhitespace = function() {\n return this._patterns.whitespace.read();\n};\n\n\n\nmodule.exports.Tokenizer = Tokenizer;\nmodule.exports.TOKEN = TOKEN;\n\n\n/***/ }),\n/* 10 */\n/***/ (function(module) {\n\n/*jshint node:true */\n/*\n\n The MIT License (MIT)\n\n Copyright (c) 2007-2018 Einar Lielmanis, Liam Newman, and contributors.\n\n Permission is hereby granted, free of charge, to any person\n obtaining a copy of this software and associated documentation files\n (the \"Software\"), to deal in the Software without restriction,\n including without limitation the rights to use, copy, modify, merge,\n publish, distribute, sublicense, and/or sell copies of the Software,\n and to permit persons to whom the Software is furnished to do so,\n subject to the following conditions:\n\n The above copyright notice and this permission notice shall be\n included in all copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS\n BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN\n ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n*/\n\n\n\nfunction TokenStream(parent_token) {\n // private\n this.__tokens = [];\n this.__tokens_length = this.__tokens.length;\n this.__position = 0;\n this.__parent_token = parent_token;\n}\n\nTokenStream.prototype.restart = function() {\n this.__position = 0;\n};\n\nTokenStream.prototype.isEmpty = function() {\n return this.__tokens_length === 0;\n};\n\nTokenStream.prototype.hasNext = function() {\n return this.__position < this.__tokens_length;\n};\n\nTokenStream.prototype.next = function() {\n var val = null;\n if (this.hasNext()) {\n val = this.__tokens[this.__position];\n this.__position += 1;\n }\n return val;\n};\n\nTokenStream.prototype.peek = function(index) {\n var val = null;\n index = index || 0;\n index += this.__position;\n if (index >= 0 && index < this.__tokens_length) {\n val = this.__tokens[index];\n }\n return val;\n};\n\nTokenStream.prototype.add = function(token) {\n if (this.__parent_token) {\n token.parent = this.__parent_token;\n }\n this.__tokens.push(token);\n this.__tokens_length += 1;\n};\n\nmodule.exports.TokenStream = TokenStream;\n\n\n/***/ }),\n/* 11 */\n/***/ (function(module, __unused_webpack_exports, __webpack_require__) {\n\n/*jshint node:true */\n/*\n\n The MIT License (MIT)\n\n Copyright (c) 2007-2018 Einar Lielmanis, Liam Newman, and contributors.\n\n Permission is hereby granted, free of charge, to any person\n obtaining a copy of this software and associated documentation files\n (the \"Software\"), to deal in the Software without restriction,\n including without limitation the rights to use, copy, modify, merge,\n publish, distribute, sublicense, and/or sell copies of the Software,\n and to permit persons to whom the Software is furnished to do so,\n subject to the following conditions:\n\n The above copyright notice and this permission notice shall be\n included in all copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS\n BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN\n ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n*/\n\n\n\nvar Pattern = (__webpack_require__(12).Pattern);\n\nfunction WhitespacePattern(input_scanner, parent) {\n Pattern.call(this, input_scanner, parent);\n if (parent) {\n this._line_regexp = this._input.get_regexp(parent._line_regexp);\n } else {\n this.__set_whitespace_patterns('', '');\n }\n\n this.newline_count = 0;\n this.whitespace_before_token = '';\n}\nWhitespacePattern.prototype = new Pattern();\n\nWhitespacePattern.prototype.__set_whitespace_patterns = function(whitespace_chars, newline_chars) {\n whitespace_chars += '\\\\t ';\n newline_chars += '\\\\n\\\\r';\n\n this._match_pattern = this._input.get_regexp(\n '[' + whitespace_chars + newline_chars + ']+', true);\n this._newline_regexp = this._input.get_regexp(\n '\\\\r\\\\n|[' + newline_chars + ']');\n};\n\nWhitespacePattern.prototype.read = function() {\n this.newline_count = 0;\n this.whitespace_before_token = '';\n\n var resulting_string = this._input.read(this._match_pattern);\n if (resulting_string === ' ') {\n this.whitespace_before_token = ' ';\n } else if (resulting_string) {\n var matches = this.__split(this._newline_regexp, resulting_string);\n this.newline_count = matches.length - 1;\n this.whitespace_before_token = matches[this.newline_count];\n }\n\n return resulting_string;\n};\n\nWhitespacePattern.prototype.matching = function(whitespace_chars, newline_chars) {\n var result = this._create();\n result.__set_whitespace_patterns(whitespace_chars, newline_chars);\n result._update();\n return result;\n};\n\nWhitespacePattern.prototype._create = function() {\n return new WhitespacePattern(this._input, this);\n};\n\nWhitespacePattern.prototype.__split = function(regexp, input_string) {\n regexp.lastIndex = 0;\n var start_index = 0;\n var result = [];\n var next_match = regexp.exec(input_string);\n while (next_match) {\n result.push(input_string.substring(start_index, next_match.index));\n start_index = next_match.index + next_match[0].length;\n next_match = regexp.exec(input_string);\n }\n\n if (start_index < input_string.length) {\n result.push(input_string.substring(start_index, input_string.length));\n } else {\n result.push('');\n }\n\n return result;\n};\n\n\n\nmodule.exports.WhitespacePattern = WhitespacePattern;\n\n\n/***/ }),\n/* 12 */\n/***/ (function(module) {\n\n/*jshint node:true */\n/*\n\n The MIT License (MIT)\n\n Copyright (c) 2007-2018 Einar Lielmanis, Liam Newman, and contributors.\n\n Permission is hereby granted, free of charge, to any person\n obtaining a copy of this software and associated documentation files\n (the \"Software\"), to deal in the Software without restriction,\n including without limitation the rights to use, copy, modify, merge,\n publish, distribute, sublicense, and/or sell copies of the Software,\n and to permit persons to whom the Software is furnished to do so,\n subject to the following conditions:\n\n The above copyright notice and this permission notice shall be\n included in all copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS\n BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN\n ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n*/\n\n\n\nfunction Pattern(input_scanner, parent) {\n this._input = input_scanner;\n this._starting_pattern = null;\n this._match_pattern = null;\n this._until_pattern = null;\n this._until_after = false;\n\n if (parent) {\n this._starting_pattern = this._input.get_regexp(parent._starting_pattern, true);\n this._match_pattern = this._input.get_regexp(parent._match_pattern, true);\n this._until_pattern = this._input.get_regexp(parent._until_pattern);\n this._until_after = parent._until_after;\n }\n}\n\nPattern.prototype.read = function() {\n var result = this._input.read(this._starting_pattern);\n if (!this._starting_pattern || result) {\n result += this._input.read(this._match_pattern, this._until_pattern, this._until_after);\n }\n return result;\n};\n\nPattern.prototype.read_match = function() {\n return this._input.match(this._match_pattern);\n};\n\nPattern.prototype.until_after = function(pattern) {\n var result = this._create();\n result._until_after = true;\n result._until_pattern = this._input.get_regexp(pattern);\n result._update();\n return result;\n};\n\nPattern.prototype.until = function(pattern) {\n var result = this._create();\n result._until_after = false;\n result._until_pattern = this._input.get_regexp(pattern);\n result._update();\n return result;\n};\n\nPattern.prototype.starting_with = function(pattern) {\n var result = this._create();\n result._starting_pattern = this._input.get_regexp(pattern, true);\n result._update();\n return result;\n};\n\nPattern.prototype.matching = function(pattern) {\n var result = this._create();\n result._match_pattern = this._input.get_regexp(pattern, true);\n result._update();\n return result;\n};\n\nPattern.prototype._create = function() {\n return new Pattern(this._input, this);\n};\n\nPattern.prototype._update = function() {};\n\nmodule.exports.Pattern = Pattern;\n\n\n/***/ }),\n/* 13 */\n/***/ (function(module) {\n\n/*jshint node:true */\n/*\n\n The MIT License (MIT)\n\n Copyright (c) 2007-2018 Einar Lielmanis, Liam Newman, and contributors.\n\n Permission is hereby granted, free of charge, to any person\n obtaining a copy of this software and associated documentation files\n (the \"Software\"), to deal in the Software without restriction,\n including without limitation the rights to use, copy, modify, merge,\n publish, distribute, sublicense, and/or sell copies of the Software,\n and to permit persons to whom the Software is furnished to do so,\n subject to the following conditions:\n\n The above copyright notice and this permission notice shall be\n included in all copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS\n BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN\n ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n*/\n\n\n\nfunction Directives(start_block_pattern, end_block_pattern) {\n start_block_pattern = typeof start_block_pattern === 'string' ? start_block_pattern : start_block_pattern.source;\n end_block_pattern = typeof end_block_pattern === 'string' ? end_block_pattern : end_block_pattern.source;\n this.__directives_block_pattern = new RegExp(start_block_pattern + / beautify( \\w+[:]\\w+)+ /.source + end_block_pattern, 'g');\n this.__directive_pattern = / (\\w+)[:](\\w+)/g;\n\n this.__directives_end_ignore_pattern = new RegExp(start_block_pattern + /\\sbeautify\\signore:end\\s/.source + end_block_pattern, 'g');\n}\n\nDirectives.prototype.get_directives = function(text) {\n if (!text.match(this.__directives_block_pattern)) {\n return null;\n }\n\n var directives = {};\n this.__directive_pattern.lastIndex = 0;\n var directive_match = this.__directive_pattern.exec(text);\n\n while (directive_match) {\n directives[directive_match[1]] = directive_match[2];\n directive_match = this.__directive_pattern.exec(text);\n }\n\n return directives;\n};\n\nDirectives.prototype.readIgnored = function(input) {\n return input.readUntilAfter(this.__directives_end_ignore_pattern);\n};\n\n\nmodule.exports.Directives = Directives;\n\n\n/***/ }),\n/* 14 */\n/***/ (function(module, __unused_webpack_exports, __webpack_require__) {\n\n/*jshint node:true */\n/*\n\n The MIT License (MIT)\n\n Copyright (c) 2007-2018 Einar Lielmanis, Liam Newman, and contributors.\n\n Permission is hereby granted, free of charge, to any person\n obtaining a copy of this software and associated documentation files\n (the \"Software\"), to deal in the Software without restriction,\n including without limitation the rights to use, copy, modify, merge,\n publish, distribute, sublicense, and/or sell copies of the Software,\n and to permit persons to whom the Software is furnished to do so,\n subject to the following conditions:\n\n The above copyright notice and this permission notice shall be\n included in all copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS\n BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN\n ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n*/\n\n\n\nvar Pattern = (__webpack_require__(12).Pattern);\n\n\nvar template_names = {\n django: false,\n erb: false,\n handlebars: false,\n php: false,\n smarty: false\n};\n\n// This lets templates appear anywhere we would do a readUntil\n// The cost is higher but it is pay to play.\nfunction TemplatablePattern(input_scanner, parent) {\n Pattern.call(this, input_scanner, parent);\n this.__template_pattern = null;\n this._disabled = Object.assign({}, template_names);\n this._excluded = Object.assign({}, template_names);\n\n if (parent) {\n this.__template_pattern = this._input.get_regexp(parent.__template_pattern);\n this._excluded = Object.assign(this._excluded, parent._excluded);\n this._disabled = Object.assign(this._disabled, parent._disabled);\n }\n var pattern = new Pattern(input_scanner);\n this.__patterns = {\n handlebars_comment: pattern.starting_with(/{{!--/).until_after(/--}}/),\n handlebars_unescaped: pattern.starting_with(/{{{/).until_after(/}}}/),\n handlebars: pattern.starting_with(/{{/).until_after(/}}/),\n php: pattern.starting_with(/<\\?(?:[= ]|php)/).until_after(/\\?>/),\n erb: pattern.starting_with(/<%[^%]/).until_after(/[^%]%>/),\n // django coflicts with handlebars a bit.\n django: pattern.starting_with(/{%/).until_after(/%}/),\n django_value: pattern.starting_with(/{{/).until_after(/}}/),\n django_comment: pattern.starting_with(/{#/).until_after(/#}/),\n smarty: pattern.starting_with(/{(?=[^}{\\s\\n])/).until_after(/[^\\s\\n]}/),\n smarty_comment: pattern.starting_with(/{\\*/).until_after(/\\*}/),\n smarty_literal: pattern.starting_with(/{literal}/).until_after(/{\\/literal}/)\n };\n}\nTemplatablePattern.prototype = new Pattern();\n\nTemplatablePattern.prototype._create = function() {\n return new TemplatablePattern(this._input, this);\n};\n\nTemplatablePattern.prototype._update = function() {\n this.__set_templated_pattern();\n};\n\nTemplatablePattern.prototype.disable = function(language) {\n var result = this._create();\n result._disabled[language] = true;\n result._update();\n return result;\n};\n\nTemplatablePattern.prototype.read_options = function(options) {\n var result = this._create();\n for (var language in template_names) {\n result._disabled[language] = options.templating.indexOf(language) === -1;\n }\n result._update();\n return result;\n};\n\nTemplatablePattern.prototype.exclude = function(language) {\n var result = this._create();\n result._excluded[language] = true;\n result._update();\n return result;\n};\n\nTemplatablePattern.prototype.read = function() {\n var result = '';\n if (this._match_pattern) {\n result = this._input.read(this._starting_pattern);\n } else {\n result = this._input.read(this._starting_pattern, this.__template_pattern);\n }\n var next = this._read_template();\n while (next) {\n if (this._match_pattern) {\n next += this._input.read(this._match_pattern);\n } else {\n next += this._input.readUntil(this.__template_pattern);\n }\n result += next;\n next = this._read_template();\n }\n\n if (this._until_after) {\n result += this._input.readUntilAfter(this._until_pattern);\n }\n return result;\n};\n\nTemplatablePattern.prototype.__set_templated_pattern = function() {\n var items = [];\n\n if (!this._disabled.php) {\n items.push(this.__patterns.php._starting_pattern.source);\n }\n if (!this._disabled.handlebars) {\n items.push(this.__patterns.handlebars._starting_pattern.source);\n }\n if (!this._disabled.erb) {\n items.push(this.__patterns.erb._starting_pattern.source);\n }\n if (!this._disabled.django) {\n items.push(this.__patterns.django._starting_pattern.source);\n // The starting pattern for django is more complex because it has different\n // patterns for value, comment, and other sections\n items.push(this.__patterns.django_value._starting_pattern.source);\n items.push(this.__patterns.django_comment._starting_pattern.source);\n }\n if (!this._disabled.smarty) {\n items.push(this.__patterns.smarty._starting_pattern.source);\n }\n\n if (this._until_pattern) {\n items.push(this._until_pattern.source);\n }\n this.__template_pattern = this._input.get_regexp('(?:' + items.join('|') + ')');\n};\n\nTemplatablePattern.prototype._read_template = function() {\n var resulting_string = '';\n var c = this._input.peek();\n if (c === '<') {\n var peek1 = this._input.peek(1);\n //if we're in a comment, do something special\n // We treat all comments as literals, even more than preformatted tags\n // we just look for the appropriate close tag\n if (!this._disabled.php && !this._excluded.php && peek1 === '?') {\n resulting_string = resulting_string ||\n this.__patterns.php.read();\n }\n if (!this._disabled.erb && !this._excluded.erb && peek1 === '%') {\n resulting_string = resulting_string ||\n this.__patterns.erb.read();\n }\n } else if (c === '{') {\n if (!this._disabled.handlebars && !this._excluded.handlebars) {\n resulting_string = resulting_string ||\n this.__patterns.handlebars_comment.read();\n resulting_string = resulting_string ||\n this.__patterns.handlebars_unescaped.read();\n resulting_string = resulting_string ||\n this.__patterns.handlebars.read();\n }\n if (!this._disabled.django) {\n // django coflicts with handlebars a bit.\n if (!this._excluded.django && !this._excluded.handlebars) {\n resulting_string = resulting_string ||\n this.__patterns.django_value.read();\n }\n if (!this._excluded.django) {\n resulting_string = resulting_string ||\n this.__patterns.django_comment.read();\n resulting_string = resulting_string ||\n this.__patterns.django.read();\n }\n }\n if (!this._disabled.smarty) {\n // smarty cannot be enabled with django or handlebars enabled\n if (this._disabled.django && this._disabled.handlebars) {\n resulting_string = resulting_string ||\n this.__patterns.smarty_comment.read();\n resulting_string = resulting_string ||\n this.__patterns.smarty_literal.read();\n resulting_string = resulting_string ||\n this.__patterns.smarty.read();\n }\n }\n }\n return resulting_string;\n};\n\n\nmodule.exports.TemplatablePattern = TemplatablePattern;\n\n\n/***/ }),\n/* 15 */,\n/* 16 */,\n/* 17 */,\n/* 18 */\n/***/ (function(module, __unused_webpack_exports, __webpack_require__) {\n\n/*jshint node:true */\n/*\n\n The MIT License (MIT)\n\n Copyright (c) 2007-2018 Einar Lielmanis, Liam Newman, and contributors.\n\n Permission is hereby granted, free of charge, to any person\n obtaining a copy of this software and associated documentation files\n (the \"Software\"), to deal in the Software without restriction,\n including without limitation the rights to use, copy, modify, merge,\n publish, distribute, sublicense, and/or sell copies of the Software,\n and to permit persons to whom the Software is furnished to do so,\n subject to the following conditions:\n\n The above copyright notice and this permission notice shall be\n included in all copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS\n BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN\n ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n*/\n\n\n\nvar Beautifier = (__webpack_require__(19).Beautifier),\n Options = (__webpack_require__(20).Options);\n\nfunction style_html(html_source, options, js_beautify, css_beautify) {\n var beautifier = new Beautifier(html_source, options, js_beautify, css_beautify);\n return beautifier.beautify();\n}\n\nmodule.exports = style_html;\nmodule.exports.defaultOptions = function() {\n return new Options();\n};\n\n\n/***/ }),\n/* 19 */\n/***/ (function(module, __unused_webpack_exports, __webpack_require__) {\n\n/*jshint node:true */\n/*\n\n The MIT License (MIT)\n\n Copyright (c) 2007-2018 Einar Lielmanis, Liam Newman, and contributors.\n\n Permission is hereby granted, free of charge, to any person\n obtaining a copy of this software and associated documentation files\n (the \"Software\"), to deal in the Software without restriction,\n including without limitation the rights to use, copy, modify, merge,\n publish, distribute, sublicense, and/or sell copies of the Software,\n and to permit persons to whom the Software is furnished to do so,\n subject to the following conditions:\n\n The above copyright notice and this permission notice shall be\n included in all copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS\n BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN\n ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n*/\n\n\n\nvar Options = (__webpack_require__(20).Options);\nvar Output = (__webpack_require__(2).Output);\nvar Tokenizer = (__webpack_require__(21).Tokenizer);\nvar TOKEN = (__webpack_require__(21).TOKEN);\n\nvar lineBreak = /\\r\\n|[\\r\\n]/;\nvar allLineBreaks = /\\r\\n|[\\r\\n]/g;\n\nvar Printer = function(options, base_indent_string) { //handles input/output and some other printing functions\n\n this.indent_level = 0;\n this.alignment_size = 0;\n this.max_preserve_newlines = options.max_preserve_newlines;\n this.preserve_newlines = options.preserve_newlines;\n\n this._output = new Output(options, base_indent_string);\n\n};\n\nPrinter.prototype.current_line_has_match = function(pattern) {\n return this._output.current_line.has_match(pattern);\n};\n\nPrinter.prototype.set_space_before_token = function(value, non_breaking) {\n this._output.space_before_token = value;\n this._output.non_breaking_space = non_breaking;\n};\n\nPrinter.prototype.set_wrap_point = function() {\n this._output.set_indent(this.indent_level, this.alignment_size);\n this._output.set_wrap_point();\n};\n\n\nPrinter.prototype.add_raw_token = function(token) {\n this._output.add_raw_token(token);\n};\n\nPrinter.prototype.print_preserved_newlines = function(raw_token) {\n var newlines = 0;\n if (raw_token.type !== TOKEN.TEXT && raw_token.previous.type !== TOKEN.TEXT) {\n newlines = raw_token.newlines ? 1 : 0;\n }\n\n if (this.preserve_newlines) {\n newlines = raw_token.newlines < this.max_preserve_newlines + 1 ? raw_token.newlines : this.max_preserve_newlines + 1;\n }\n for (var n = 0; n < newlines; n++) {\n this.print_newline(n > 0);\n }\n\n return newlines !== 0;\n};\n\nPrinter.prototype.traverse_whitespace = function(raw_token) {\n if (raw_token.whitespace_before || raw_token.newlines) {\n if (!this.print_preserved_newlines(raw_token)) {\n this._output.space_before_token = true;\n }\n return true;\n }\n return false;\n};\n\nPrinter.prototype.previous_token_wrapped = function() {\n return this._output.previous_token_wrapped;\n};\n\nPrinter.prototype.print_newline = function(force) {\n this._output.add_new_line(force);\n};\n\nPrinter.prototype.print_token = function(token) {\n if (token.text) {\n this._output.set_indent(this.indent_level, this.alignment_size);\n this._output.add_token(token.text);\n }\n};\n\nPrinter.prototype.indent = function() {\n this.indent_level++;\n};\n\nPrinter.prototype.get_full_indent = function(level) {\n level = this.indent_level + (level || 0);\n if (level < 1) {\n return '';\n }\n\n return this._output.get_indent_string(level);\n};\n\nvar get_type_attribute = function(start_token) {\n var result = null;\n var raw_token = start_token.next;\n\n // Search attributes for a type attribute\n while (raw_token.type !== TOKEN.EOF && start_token.closed !== raw_token) {\n if (raw_token.type === TOKEN.ATTRIBUTE && raw_token.text === 'type') {\n if (raw_token.next && raw_token.next.type === TOKEN.EQUALS &&\n raw_token.next.next && raw_token.next.next.type === TOKEN.VALUE) {\n result = raw_token.next.next.text;\n }\n break;\n }\n raw_token = raw_token.next;\n }\n\n return result;\n};\n\nvar get_custom_beautifier_name = function(tag_check, raw_token) {\n var typeAttribute = null;\n var result = null;\n\n if (!raw_token.closed) {\n return null;\n }\n\n if (tag_check === 'script') {\n typeAttribute = 'text/javascript';\n } else if (tag_check === 'style') {\n typeAttribute = 'text/css';\n }\n\n typeAttribute = get_type_attribute(raw_token) || typeAttribute;\n\n // For script and style tags that have a type attribute, only enable custom beautifiers for matching values\n // For those without a type attribute use default;\n if (typeAttribute.search('text/css') > -1) {\n result = 'css';\n } else if (typeAttribute.search(/module|((text|application|dojo)\\/(x-)?(javascript|ecmascript|jscript|livescript|(ld\\+)?json|method|aspect))/) > -1) {\n result = 'javascript';\n } else if (typeAttribute.search(/(text|application|dojo)\\/(x-)?(html)/) > -1) {\n result = 'html';\n } else if (typeAttribute.search(/test\\/null/) > -1) {\n // Test only mime-type for testing the beautifier when null is passed as beautifing function\n result = 'null';\n }\n\n return result;\n};\n\nfunction in_array(what, arr) {\n return arr.indexOf(what) !== -1;\n}\n\nfunction TagFrame(parent, parser_token, indent_level) {\n this.parent = parent || null;\n this.tag = parser_token ? parser_token.tag_name : '';\n this.indent_level = indent_level || 0;\n this.parser_token = parser_token || null;\n}\n\nfunction TagStack(printer) {\n this._printer = printer;\n this._current_frame = null;\n}\n\nTagStack.prototype.get_parser_token = function() {\n return this._current_frame ? this._current_frame.parser_token : null;\n};\n\nTagStack.prototype.record_tag = function(parser_token) { //function to record a tag and its parent in this.tags Object\n var new_frame = new TagFrame(this._current_frame, parser_token, this._printer.indent_level);\n this._current_frame = new_frame;\n};\n\nTagStack.prototype._try_pop_frame = function(frame) { //function to retrieve the opening tag to the corresponding closer\n var parser_token = null;\n\n if (frame) {\n parser_token = frame.parser_token;\n this._printer.indent_level = frame.indent_level;\n this._current_frame = frame.parent;\n }\n\n return parser_token;\n};\n\nTagStack.prototype._get_frame = function(tag_list, stop_list) { //function to retrieve the opening tag to the corresponding closer\n var frame = this._current_frame;\n\n while (frame) { //till we reach '' (the initial value);\n if (tag_list.indexOf(frame.tag) !== -1) { //if this is it use it\n break;\n } else if (stop_list && stop_list.indexOf(frame.tag) !== -1) {\n frame = null;\n break;\n }\n frame = frame.parent;\n }\n\n return frame;\n};\n\nTagStack.prototype.try_pop = function(tag, stop_list) { //function to retrieve the opening tag to the corresponding closer\n var frame = this._get_frame([tag], stop_list);\n return this._try_pop_frame(frame);\n};\n\nTagStack.prototype.indent_to_tag = function(tag_list) {\n var frame = this._get_frame(tag_list);\n if (frame) {\n this._printer.indent_level = frame.indent_level;\n }\n};\n\nfunction Beautifier(source_text, options, js_beautify, css_beautify) {\n //Wrapper function to invoke all the necessary constructors and deal with the output.\n this._source_text = source_text || '';\n options = options || {};\n this._js_beautify = js_beautify;\n this._css_beautify = css_beautify;\n this._tag_stack = null;\n\n // Allow the setting of language/file-type specific options\n // with inheritance of overall settings\n var optionHtml = new Options(options, 'html');\n\n this._options = optionHtml;\n\n this._is_wrap_attributes_force = this._options.wrap_attributes.substr(0, 'force'.length) === 'force';\n this._is_wrap_attributes_force_expand_multiline = (this._options.wrap_attributes === 'force-expand-multiline');\n this._is_wrap_attributes_force_aligned = (this._options.wrap_attributes === 'force-aligned');\n this._is_wrap_attributes_aligned_multiple = (this._options.wrap_attributes === 'aligned-multiple');\n this._is_wrap_attributes_preserve = this._options.wrap_attributes.substr(0, 'preserve'.length) === 'preserve';\n this._is_wrap_attributes_preserve_aligned = (this._options.wrap_attributes === 'preserve-aligned');\n}\n\nBeautifier.prototype.beautify = function() {\n\n // if disabled, return the input unchanged.\n if (this._options.disabled) {\n return this._source_text;\n }\n\n var source_text = this._source_text;\n var eol = this._options.eol;\n if (this._options.eol === 'auto') {\n eol = '\\n';\n if (source_text && lineBreak.test(source_text)) {\n eol = source_text.match(lineBreak)[0];\n }\n }\n\n // HACK: newline parsing inconsistent. This brute force normalizes the input.\n source_text = source_text.replace(allLineBreaks, '\\n');\n\n var baseIndentString = source_text.match(/^[\\t ]*/)[0];\n\n var last_token = {\n text: '',\n type: ''\n };\n\n var last_tag_token = new TagOpenParserToken();\n\n var printer = new Printer(this._options, baseIndentString);\n var tokens = new Tokenizer(source_text, this._options).tokenize();\n\n this._tag_stack = new TagStack(printer);\n\n var parser_token = null;\n var raw_token = tokens.next();\n while (raw_token.type !== TOKEN.EOF) {\n\n if (raw_token.type === TOKEN.TAG_OPEN || raw_token.type === TOKEN.COMMENT) {\n parser_token = this._handle_tag_open(printer, raw_token, last_tag_token, last_token, tokens);\n last_tag_token = parser_token;\n } else if ((raw_token.type === TOKEN.ATTRIBUTE || raw_token.type === TOKEN.EQUALS || raw_token.type === TOKEN.VALUE) ||\n (raw_token.type === TOKEN.TEXT && !last_tag_token.tag_complete)) {\n parser_token = this._handle_inside_tag(printer, raw_token, last_tag_token, last_token);\n } else if (raw_token.type === TOKEN.TAG_CLOSE) {\n parser_token = this._handle_tag_close(printer, raw_token, last_tag_token);\n } else if (raw_token.type === TOKEN.TEXT) {\n parser_token = this._handle_text(printer, raw_token, last_tag_token);\n } else {\n // This should never happen, but if it does. Print the raw token\n printer.add_raw_token(raw_token);\n }\n\n last_token = parser_token;\n\n raw_token = tokens.next();\n }\n var sweet_code = printer._output.get_code(eol);\n\n return sweet_code;\n};\n\nBeautifier.prototype._handle_tag_close = function(printer, raw_token, last_tag_token) {\n var parser_token = {\n text: raw_token.text,\n type: raw_token.type\n };\n printer.alignment_size = 0;\n last_tag_token.tag_complete = true;\n\n printer.set_space_before_token(raw_token.newlines || raw_token.whitespace_before !== '', true);\n if (last_tag_token.is_unformatted) {\n printer.add_raw_token(raw_token);\n } else {\n if (last_tag_token.tag_start_char === '<') {\n printer.set_space_before_token(raw_token.text[0] === '/', true); // space before />, no space before >\n if (this._is_wrap_attributes_force_expand_multiline && last_tag_token.has_wrapped_attrs) {\n printer.print_newline(false);\n }\n }\n printer.print_token(raw_token);\n\n }\n\n if (last_tag_token.indent_content &&\n !(last_tag_token.is_unformatted || last_tag_token.is_content_unformatted)) {\n printer.indent();\n\n // only indent once per opened tag\n last_tag_token.indent_content = false;\n }\n\n if (!last_tag_token.is_inline_element &&\n !(last_tag_token.is_unformatted || last_tag_token.is_content_unformatted)) {\n printer.set_wrap_point();\n }\n\n return parser_token;\n};\n\nBeautifier.prototype._handle_inside_tag = function(printer, raw_token, last_tag_token, last_token) {\n var wrapped = last_tag_token.has_wrapped_attrs;\n var parser_token = {\n text: raw_token.text,\n type: raw_token.type\n };\n\n printer.set_space_before_token(raw_token.newlines || raw_token.whitespace_before !== '', true);\n if (last_tag_token.is_unformatted) {\n printer.add_raw_token(raw_token);\n } else if (last_tag_token.tag_start_char === '{' && raw_token.type === TOKEN.TEXT) {\n // For the insides of handlebars allow newlines or a single space between open and contents\n if (printer.print_preserved_newlines(raw_token)) {\n raw_token.newlines = 0;\n printer.add_raw_token(raw_token);\n } else {\n printer.print_token(raw_token);\n }\n } else {\n if (raw_token.type === TOKEN.ATTRIBUTE) {\n printer.set_space_before_token(true);\n } else if (raw_token.type === TOKEN.EQUALS) { //no space before =\n printer.set_space_before_token(false);\n } else if (raw_token.type === TOKEN.VALUE && raw_token.previous.type === TOKEN.EQUALS) { //no space before value\n printer.set_space_before_token(false);\n }\n\n if (raw_token.type === TOKEN.ATTRIBUTE && last_tag_token.tag_start_char === '<') {\n if (this._is_wrap_attributes_preserve || this._is_wrap_attributes_preserve_aligned) {\n printer.traverse_whitespace(raw_token);\n wrapped = wrapped || raw_token.newlines !== 0;\n }\n\n // Wrap for 'force' options, and if the number of attributes is at least that specified in 'wrap_attributes_min_attrs':\n // 1. always wrap the second and beyond attributes\n // 2. wrap the first attribute only if 'force-expand-multiline' is specified\n if (this._is_wrap_attributes_force &&\n last_tag_token.attr_count >= this._options.wrap_attributes_min_attrs &&\n (last_token.type !== TOKEN.TAG_OPEN || // ie. second attribute and beyond\n this._is_wrap_attributes_force_expand_multiline)) {\n printer.print_newline(false);\n wrapped = true;\n }\n }\n printer.print_token(raw_token);\n wrapped = wrapped || printer.previous_token_wrapped();\n last_tag_token.has_wrapped_attrs = wrapped;\n }\n return parser_token;\n};\n\nBeautifier.prototype._handle_text = function(printer, raw_token, last_tag_token) {\n var parser_token = {\n text: raw_token.text,\n type: 'TK_CONTENT'\n };\n if (last_tag_token.custom_beautifier_name) { //check if we need to format javascript\n this._print_custom_beatifier_text(printer, raw_token, last_tag_token);\n } else if (last_tag_token.is_unformatted || last_tag_token.is_content_unformatted) {\n printer.add_raw_token(raw_token);\n } else {\n printer.traverse_whitespace(raw_token);\n printer.print_token(raw_token);\n }\n return parser_token;\n};\n\nBeautifier.prototype._print_custom_beatifier_text = function(printer, raw_token, last_tag_token) {\n var local = this;\n if (raw_token.text !== '') {\n\n var text = raw_token.text,\n _beautifier,\n script_indent_level = 1,\n pre = '',\n post = '';\n if (last_tag_token.custom_beautifier_name === 'javascript' && typeof this._js_beautify === 'function') {\n _beautifier = this._js_beautify;\n } else if (last_tag_token.custom_beautifier_name === 'css' && typeof this._css_beautify === 'function') {\n _beautifier = this._css_beautify;\n } else if (last_tag_token.custom_beautifier_name === 'html') {\n _beautifier = function(html_source, options) {\n var beautifier = new Beautifier(html_source, options, local._js_beautify, local._css_beautify);\n return beautifier.beautify();\n };\n }\n\n if (this._options.indent_scripts === \"keep\") {\n script_indent_level = 0;\n } else if (this._options.indent_scripts === \"separate\") {\n script_indent_level = -printer.indent_level;\n }\n\n var indentation = printer.get_full_indent(script_indent_level);\n\n // if there is at least one empty line at the end of this text, strip it\n // we'll be adding one back after the text but before the containing tag.\n text = text.replace(/\\n[ \\t]*$/, '');\n\n // Handle the case where content is wrapped in a comment or cdata.\n if (last_tag_token.custom_beautifier_name !== 'html' &&\n text[0] === '<' && text.match(/^(|]]>)$/.exec(text);\n\n // if we start to wrap but don't finish, print raw\n if (!matched) {\n printer.add_raw_token(raw_token);\n return;\n }\n\n pre = indentation + matched[1] + '\\n';\n text = matched[4];\n if (matched[5]) {\n post = indentation + matched[5];\n }\n\n // if there is at least one empty line at the end of this text, strip it\n // we'll be adding one back after the text but before the containing tag.\n text = text.replace(/\\n[ \\t]*$/, '');\n\n if (matched[2] || matched[3].indexOf('\\n') !== -1) {\n // if the first line of the non-comment text has spaces\n // use that as the basis for indenting in null case.\n matched = matched[3].match(/[ \\t]+$/);\n if (matched) {\n raw_token.whitespace_before = matched[0];\n }\n }\n }\n\n if (text) {\n if (_beautifier) {\n\n // call the Beautifier if avaliable\n var Child_options = function() {\n this.eol = '\\n';\n };\n Child_options.prototype = this._options.raw_options;\n var child_options = new Child_options();\n text = _beautifier(indentation + text, child_options);\n } else {\n // simply indent the string otherwise\n var white = raw_token.whitespace_before;\n if (white) {\n text = text.replace(new RegExp('\\n(' + white + ')?', 'g'), '\\n');\n }\n\n text = indentation + text.replace(/\\n/g, '\\n' + indentation);\n }\n }\n\n if (pre) {\n if (!text) {\n text = pre + post;\n } else {\n text = pre + text + '\\n' + post;\n }\n }\n\n printer.print_newline(false);\n if (text) {\n raw_token.text = text;\n raw_token.whitespace_before = '';\n raw_token.newlines = 0;\n printer.add_raw_token(raw_token);\n printer.print_newline(true);\n }\n }\n};\n\nBeautifier.prototype._handle_tag_open = function(printer, raw_token, last_tag_token, last_token, tokens) {\n var parser_token = this._get_tag_open_token(raw_token);\n\n if ((last_tag_token.is_unformatted || last_tag_token.is_content_unformatted) &&\n !last_tag_token.is_empty_element &&\n raw_token.type === TOKEN.TAG_OPEN && !parser_token.is_start_tag) {\n // End element tags for unformatted or content_unformatted elements\n // are printed raw to keep any newlines inside them exactly the same.\n printer.add_raw_token(raw_token);\n parser_token.start_tag_token = this._tag_stack.try_pop(parser_token.tag_name);\n } else {\n printer.traverse_whitespace(raw_token);\n this._set_tag_position(printer, raw_token, parser_token, last_tag_token, last_token);\n if (!parser_token.is_inline_element) {\n printer.set_wrap_point();\n }\n printer.print_token(raw_token);\n }\n\n // count the number of attributes\n if (parser_token.is_start_tag && this._is_wrap_attributes_force) {\n var peek_index = 0;\n var peek_token;\n do {\n peek_token = tokens.peek(peek_index);\n if (peek_token.type === TOKEN.ATTRIBUTE) {\n parser_token.attr_count += 1;\n }\n peek_index += 1;\n } while (peek_token.type !== TOKEN.EOF && peek_token.type !== TOKEN.TAG_CLOSE);\n }\n\n //indent attributes an auto, forced, aligned or forced-align line-wrap\n if (this._is_wrap_attributes_force_aligned || this._is_wrap_attributes_aligned_multiple || this._is_wrap_attributes_preserve_aligned) {\n parser_token.alignment_size = raw_token.text.length + 1;\n }\n\n if (!parser_token.tag_complete && !parser_token.is_unformatted) {\n printer.alignment_size = parser_token.alignment_size;\n }\n\n return parser_token;\n};\n\nvar TagOpenParserToken = function(parent, raw_token) {\n this.parent = parent || null;\n this.text = '';\n this.type = 'TK_TAG_OPEN';\n this.tag_name = '';\n this.is_inline_element = false;\n this.is_unformatted = false;\n this.is_content_unformatted = false;\n this.is_empty_element = false;\n this.is_start_tag = false;\n this.is_end_tag = false;\n this.indent_content = false;\n this.multiline_content = false;\n this.custom_beautifier_name = null;\n this.start_tag_token = null;\n this.attr_count = 0;\n this.has_wrapped_attrs = false;\n this.alignment_size = 0;\n this.tag_complete = false;\n this.tag_start_char = '';\n this.tag_check = '';\n\n if (!raw_token) {\n this.tag_complete = true;\n } else {\n var tag_check_match;\n\n this.tag_start_char = raw_token.text[0];\n this.text = raw_token.text;\n\n if (this.tag_start_char === '<') {\n tag_check_match = raw_token.text.match(/^<([^\\s>]*)/);\n this.tag_check = tag_check_match ? tag_check_match[1] : '';\n } else {\n tag_check_match = raw_token.text.match(/^{{~?(?:[\\^]|#\\*?)?([^\\s}]+)/);\n this.tag_check = tag_check_match ? tag_check_match[1] : '';\n\n // handle \"{{#> myPartial}}\" or \"{{~#> myPartial}}\"\n if ((raw_token.text.startsWith('{{#>') || raw_token.text.startsWith('{{~#>')) && this.tag_check[0] === '>') {\n if (this.tag_check === '>' && raw_token.next !== null) {\n this.tag_check = raw_token.next.text.split(' ')[0];\n } else {\n this.tag_check = raw_token.text.split('>')[1];\n }\n }\n }\n\n this.tag_check = this.tag_check.toLowerCase();\n\n if (raw_token.type === TOKEN.COMMENT) {\n this.tag_complete = true;\n }\n\n this.is_start_tag = this.tag_check.charAt(0) !== '/';\n this.tag_name = !this.is_start_tag ? this.tag_check.substr(1) : this.tag_check;\n this.is_end_tag = !this.is_start_tag ||\n (raw_token.closed && raw_token.closed.text === '/>');\n\n // if whitespace handler ~ included (i.e. {{~#if true}}), handlebars tags start at pos 3 not pos 2\n var handlebar_starts = 2;\n if (this.tag_start_char === '{' && this.text.length >= 3) {\n if (this.text.charAt(2) === '~') {\n handlebar_starts = 3;\n }\n }\n\n // handlebars tags that don't start with # or ^ are single_tags, and so also start and end.\n this.is_end_tag = this.is_end_tag ||\n (this.tag_start_char === '{' && (this.text.length < 3 || (/[^#\\^]/.test(this.text.charAt(handlebar_starts)))));\n }\n};\n\nBeautifier.prototype._get_tag_open_token = function(raw_token) { //function to get a full tag and parse its type\n var parser_token = new TagOpenParserToken(this._tag_stack.get_parser_token(), raw_token);\n\n parser_token.alignment_size = this._options.wrap_attributes_indent_size;\n\n parser_token.is_end_tag = parser_token.is_end_tag ||\n in_array(parser_token.tag_check, this._options.void_elements);\n\n parser_token.is_empty_element = parser_token.tag_complete ||\n (parser_token.is_start_tag && parser_token.is_end_tag);\n\n parser_token.is_unformatted = !parser_token.tag_complete && in_array(parser_token.tag_check, this._options.unformatted);\n parser_token.is_content_unformatted = !parser_token.is_empty_element && in_array(parser_token.tag_check, this._options.content_unformatted);\n parser_token.is_inline_element = in_array(parser_token.tag_name, this._options.inline) || (this._options.inline_custom_elements && parser_token.tag_name.includes(\"-\")) || parser_token.tag_start_char === '{';\n\n return parser_token;\n};\n\nBeautifier.prototype._set_tag_position = function(printer, raw_token, parser_token, last_tag_token, last_token) {\n\n if (!parser_token.is_empty_element) {\n if (parser_token.is_end_tag) { //this tag is a double tag so check for tag-ending\n parser_token.start_tag_token = this._tag_stack.try_pop(parser_token.tag_name); //remove it and all ancestors\n } else { // it's a start-tag\n // check if this tag is starting an element that has optional end element\n // and do an ending needed\n if (this._do_optional_end_element(parser_token)) {\n if (!parser_token.is_inline_element) {\n printer.print_newline(false);\n }\n }\n\n this._tag_stack.record_tag(parser_token); //push it on the tag stack\n\n if ((parser_token.tag_name === 'script' || parser_token.tag_name === 'style') &&\n !(parser_token.is_unformatted || parser_token.is_content_unformatted)) {\n parser_token.custom_beautifier_name = get_custom_beautifier_name(parser_token.tag_check, raw_token);\n }\n }\n }\n\n if (in_array(parser_token.tag_check, this._options.extra_liners)) { //check if this double needs an extra line\n printer.print_newline(false);\n if (!printer._output.just_added_blankline()) {\n printer.print_newline(true);\n }\n }\n\n if (parser_token.is_empty_element) { //if this tag name is a single tag type (either in the list or has a closing /)\n\n // if you hit an else case, reset the indent level if you are inside an:\n // 'if', 'unless', or 'each' block.\n if (parser_token.tag_start_char === '{' && parser_token.tag_check === 'else') {\n this._tag_stack.indent_to_tag(['if', 'unless', 'each']);\n parser_token.indent_content = true;\n // Don't add a newline if opening {{#if}} tag is on the current line\n var foundIfOnCurrentLine = printer.current_line_has_match(/{{#if/);\n if (!foundIfOnCurrentLine) {\n printer.print_newline(false);\n }\n }\n\n // Don't add a newline before elements that should remain where they are.\n if (parser_token.tag_name === '!--' && last_token.type === TOKEN.TAG_CLOSE &&\n last_tag_token.is_end_tag && parser_token.text.indexOf('\\n') === -1) {\n //Do nothing. Leave comments on same line.\n } else {\n if (!(parser_token.is_inline_element || parser_token.is_unformatted)) {\n printer.print_newline(false);\n }\n this._calcluate_parent_multiline(printer, parser_token);\n }\n } else if (parser_token.is_end_tag) { //this tag is a double tag so check for tag-ending\n var do_end_expand = false;\n\n // deciding whether a block is multiline should not be this hard\n do_end_expand = parser_token.start_tag_token && parser_token.start_tag_token.multiline_content;\n do_end_expand = do_end_expand || (!parser_token.is_inline_element &&\n !(last_tag_token.is_inline_element || last_tag_token.is_unformatted) &&\n !(last_token.type === TOKEN.TAG_CLOSE && parser_token.start_tag_token === last_tag_token) &&\n last_token.type !== 'TK_CONTENT'\n );\n\n if (parser_token.is_content_unformatted || parser_token.is_unformatted) {\n do_end_expand = false;\n }\n\n if (do_end_expand) {\n printer.print_newline(false);\n }\n } else { // it's a start-tag\n parser_token.indent_content = !parser_token.custom_beautifier_name;\n\n if (parser_token.tag_start_char === '<') {\n if (parser_token.tag_name === 'html') {\n parser_token.indent_content = this._options.indent_inner_html;\n } else if (parser_token.tag_name === 'head') {\n parser_token.indent_content = this._options.indent_head_inner_html;\n } else if (parser_token.tag_name === 'body') {\n parser_token.indent_content = this._options.indent_body_inner_html;\n }\n }\n\n if (!(parser_token.is_inline_element || parser_token.is_unformatted) &&\n (last_token.type !== 'TK_CONTENT' || parser_token.is_content_unformatted)) {\n printer.print_newline(false);\n }\n\n this._calcluate_parent_multiline(printer, parser_token);\n }\n};\n\nBeautifier.prototype._calcluate_parent_multiline = function(printer, parser_token) {\n if (parser_token.parent && printer._output.just_added_newline() &&\n !((parser_token.is_inline_element || parser_token.is_unformatted) && parser_token.parent.is_inline_element)) {\n parser_token.parent.multiline_content = true;\n }\n};\n\n//To be used for

tag special case:\nvar p_closers = ['address', 'article', 'aside', 'blockquote', 'details', 'div', 'dl', 'fieldset', 'figcaption', 'figure', 'footer', 'form', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'header', 'hr', 'main', 'menu', 'nav', 'ol', 'p', 'pre', 'section', 'table', 'ul'];\nvar p_parent_excludes = ['a', 'audio', 'del', 'ins', 'map', 'noscript', 'video'];\n\nBeautifier.prototype._do_optional_end_element = function(parser_token) {\n var result = null;\n // NOTE: cases of \"if there is no more content in the parent element\"\n // are handled automatically by the beautifier.\n // It assumes parent or ancestor close tag closes all children.\n // https://www.w3.org/TR/html5/syntax.html#optional-tags\n if (parser_token.is_empty_element || !parser_token.is_start_tag || !parser_token.parent) {\n return;\n\n }\n\n if (parser_token.tag_name === 'body') {\n // A head element’s end tag may be omitted if the head element is not immediately followed by a space character or a comment.\n result = result || this._tag_stack.try_pop('head');\n\n //} else if (parser_token.tag_name === 'body') {\n // DONE: A body element’s end tag may be omitted if the body element is not immediately followed by a comment.\n\n } else if (parser_token.tag_name === 'li') {\n // An li element’s end tag may be omitted if the li element is immediately followed by another li element or if there is no more content in the parent element.\n result = result || this._tag_stack.try_pop('li', ['ol', 'ul', 'menu']);\n\n } else if (parser_token.tag_name === 'dd' || parser_token.tag_name === 'dt') {\n // A dd element’s end tag may be omitted if the dd element is immediately followed by another dd element or a dt element, or if there is no more content in the parent element.\n // A dt element’s end tag may be omitted if the dt element is immediately followed by another dt element or a dd element.\n result = result || this._tag_stack.try_pop('dt', ['dl']);\n result = result || this._tag_stack.try_pop('dd', ['dl']);\n\n\n } else if (parser_token.parent.tag_name === 'p' && p_closers.indexOf(parser_token.tag_name) !== -1) {\n // IMPORTANT: this else-if works because p_closers has no overlap with any other element we look for in this method\n // check for the parent element is an HTML element that is not an ,

`;\n guidesEl = document.createElement('div');\n guidesEl.className = `${pfx}guides`;\n elInfoX.className = `${pfx}guide-info ${pfx}guide-info__x`;\n elInfoY.className = `${pfx}guide-info ${pfx}guide-info__y`;\n elInfoX.innerHTML = guideContent;\n elInfoY.innerHTML = guideContent;\n guidesEl.appendChild(elInfoX);\n guidesEl.appendChild(elInfoY);\n editor.Canvas.getGlobalToolsEl().appendChild(guidesEl);\n this.guidesEl = guidesEl;\n this.elGuideInfoX = elInfoX;\n this.elGuideInfoY = elInfoY;\n this.elGuideInfoContentX = elInfoX.querySelector(`.${pfx}guide-info__content`);\n this.elGuideInfoContentY = elInfoY.querySelector(`.${pfx}guide-info__content`);\n\n em.on(\n 'canvas:update frame:scroll',\n debounce(() => {\n this.updateGuides();\n opts.debug && this.guides?.forEach((item: any) => this.renderGuide(item));\n }, 200)\n );\n }\n\n return guidesEl;\n },\n\n getGuidesStatic() {\n let result: any = [];\n const el = this.target.getEl();\n const { parentNode = {} } = el;\n each(parentNode.children, item => (result = result.concat(el !== item ? this.getElementGuides(item) : [])));\n\n return result.concat(this.getElementGuides(parentNode));\n },\n\n getGuidesTarget() {\n return this.getElementGuides(this.target.getEl());\n },\n\n updateGuides(guides: any) {\n let lastEl: any;\n let lastPos: any;\n (guides || this.guides).forEach((item: any) => {\n const { origin } = item;\n const pos = lastEl === origin ? lastPos : this.getElementPos(origin);\n lastEl = origin;\n lastPos = pos;\n each(this.getGuidePosUpdate(item, pos), (val, key) => (item[key] = val));\n item.originRect = pos;\n });\n },\n\n getGuidePosUpdate(item: any, rect: any) {\n const result: { x?: number; y?: number } = {};\n const { top, height, left, width } = rect;\n\n switch (item.type) {\n case 't':\n result.y = top;\n break;\n case 'b':\n result.y = top + height;\n break;\n case 'l':\n result.x = left;\n break;\n case 'r':\n result.x = left + width;\n break;\n case 'x':\n result.x = left + width / 2;\n break;\n case 'y':\n result.y = top + height / 2;\n break;\n }\n\n return result;\n },\n\n renderGuide(item: any = {}) {\n const el = item.guide || document.createElement('div');\n const un = 'px';\n const guideSize = item.active ? 2 : 1;\n let numEl = el.children[0];\n el.style = `position: absolute; background-color: ${item.active ? 'green' : 'red'};`;\n\n if (!el.children.length) {\n numEl = document.createElement('div');\n numEl.style = 'position: absolute; color: red; padding: 5px; top: 0; left: 0;';\n el.appendChild(numEl);\n }\n\n if (item.y) {\n el.style.width = '100%';\n el.style.height = `${guideSize}${un}`;\n el.style.top = `${item.y}${un}`;\n el.style.left = 0;\n } else {\n el.style.width = `${guideSize}${un}`;\n el.style.height = '100%';\n el.style.left = `${item.x}${un}`;\n el.style.top = `0${un}`;\n }\n\n !item.guide && this.guidesContainer.appendChild(el);\n return el;\n },\n\n getElementPos(el: HTMLElement) {\n return this.editor.Canvas.getElementPos(el, { noScroll: 1 });\n },\n\n getElementGuides(el: HTMLElement) {\n const { opts } = this;\n const originRect = this.getElementPos(el);\n const { top, height, left, width } = originRect;\n // @ts-ignore\n const guides: Guide[] = [\n { type: 't', y: top }, // Top\n { type: 'b', y: top + height }, // Bottom\n { type: 'l', x: left }, // Left\n { type: 'r', x: left + width }, // Right\n { type: 'x', x: left + width / 2 }, // Mid x\n { type: 'y', y: top + height / 2 }, // Mid y\n ].map(item => ({\n ...item,\n origin: el,\n originRect,\n guide: opts.debug && this.renderGuide(item),\n }));\n guides.forEach(item => this.guides?.push(item));\n\n return guides;\n },\n\n getTranslate(transform: string, axis = 'x') {\n let result = 0;\n (transform || '').split(' ').forEach(item => {\n const itemStr = item.trim();\n const fn = `translate${axis.toUpperCase()}(`;\n if (itemStr.indexOf(fn) === 0) result = parseFloat(itemStr.replace(fn, ''));\n });\n return result;\n },\n\n setTranslate(transform: string, axis: string, value: string) {\n const fn = `translate${axis.toUpperCase()}(`;\n const val = `${fn}${value})`;\n let result = (transform || '')\n .split(' ')\n .map(item => {\n const itemStr = item.trim();\n if (itemStr.indexOf(fn) === 0) item = val;\n return item;\n })\n .join(' ');\n if (result.indexOf(fn) < 0) result += ` ${val}`;\n\n return result;\n },\n\n getPosition() {\n const { target, isTran } = this;\n const { left, top, transform } = target.getStyle();\n let x = 0;\n let y = 0;\n\n if (isTran) {\n x = this.getTranslate(transform);\n y = this.getTranslate(transform, 'y');\n } else {\n x = parseFloat(left || 0);\n y = parseFloat(top || 0);\n }\n\n return { x, y };\n },\n\n setPosition({ x, y, end, position, width, height }: any) {\n const { target, isTran, em } = this;\n const unit = 'px';\n const __p = !end; // Indicate if partial change\n const left = `${parseInt(x, 10)}${unit}`;\n const top = `${parseInt(y, 10)}${unit}`;\n let styleUp = {};\n\n if (isTran) {\n let transform = target.getStyle()['transform'] || '';\n transform = this.setTranslate(transform, 'x', left);\n transform = this.setTranslate(transform, 'y', top);\n styleUp = { transform, __p };\n target.addStyle(styleUp, { avoidStore: !end });\n } else {\n const adds: any = { position, width, height };\n const style: any = { left, top, __p };\n keys(adds).forEach(add => {\n const prop = adds[add];\n if (prop) style[add] = prop;\n });\n styleUp = style;\n target.addStyle(styleUp, { avoidStore: !end });\n }\n\n em?.Styles.__emitCmpStyleUpdate(styleUp, { components: em.getSelected() });\n },\n\n _getDragData() {\n const { target } = this;\n return {\n target,\n parent: target.parent(),\n index: target.index(),\n };\n },\n\n onStart(event: Event) {\n const { target, editor, isTran, opts } = this;\n const { center, onStart } = opts;\n const { Canvas } = editor;\n const style = target.getStyle();\n const position = 'absolute';\n const relPos = [position, 'relative'];\n onStart && onStart(this._getDragData());\n if (isTran) return;\n\n if (style.position !== position) {\n let { left, top, width, height } = Canvas.offset(target.getEl());\n let parent = target.parent();\n let parentRel;\n\n // Check for the relative parent\n do {\n const pStyle = parent.getStyle();\n parentRel = relPos.indexOf(pStyle.position) >= 0 ? parent : null;\n parent = parent.parent();\n } while (parent && !parentRel);\n\n // Center the target to the pointer position (used in Droppable for Blocks)\n if (center) {\n const { x, y } = Canvas.getMouseRelativeCanvas(event);\n left = x;\n top = y;\n } else if (parentRel) {\n const offsetP = Canvas.offset(parentRel.getEl());\n left = left - offsetP.left;\n top = top - offsetP.top;\n }\n\n this.setPosition({\n x: left,\n y: top,\n width: `${width}px`,\n height: `${height}px`,\n position,\n });\n }\n },\n\n onDrag(...args: any) {\n const { guidesTarget, opts } = this;\n const { onDrag } = opts;\n this.updateGuides(guidesTarget);\n opts.debug && guidesTarget.forEach((item: any) => this.renderGuide(item));\n opts.guidesInfo && this.renderGuideInfo(guidesTarget.filter((item: any) => item.active));\n onDrag && onDrag(this._getDragData());\n },\n\n onEnd(ev: Event, dragger: any, opt = {}) {\n const { editor, opts, id } = this;\n const { onEnd } = opts;\n onEnd && onEnd(ev, opt, { event: ev, ...opt, ...this._getDragData() });\n editor.stopCommand(id);\n this.hideGuidesInfo();\n this.em.trigger(`${evName}:end`, this.getEventOpts());\n },\n\n hideGuidesInfo() {\n ['X', 'Y'].forEach(item => {\n const guide = this[`elGuideInfo${item}`];\n if (guide) guide.style.display = 'none';\n });\n },\n\n /**\n * Render guides with spacing information\n */\n renderGuideInfo(guides: Guide[] = []) {\n const { guidesStatic } = this;\n this.hideGuidesInfo();\n guides.forEach(item => {\n const { origin, x } = item;\n const rectOrigin = this.getElementPos(origin);\n const axis = isUndefined(x) ? 'y' : 'x';\n const isY = axis === 'y';\n const origEdge1 = rectOrigin[isY ? 'left' : 'top'];\n const origEdge1Raw = rectOrigin.rect[isY ? 'left' : 'top'];\n const origEdge2 = isY ? origEdge1 + rectOrigin.width : origEdge1 + rectOrigin.height;\n const origEdge2Raw = isY ? origEdge1Raw + rectOrigin.rect.width : origEdge1Raw + rectOrigin.rect.height;\n const elGuideInfo = this[`elGuideInfo${axis.toUpperCase()}`];\n const elGuideInfoCnt = this[`elGuideInfoContent${axis.toUpperCase()}`];\n const guideInfoStyle = elGuideInfo.style;\n\n // Find the nearest element\n const res = guidesStatic\n ?.filter(stat => stat.type === item.type)\n .map(stat => {\n const { left, width, top, height } = stat.originRect;\n const statEdge1 = isY ? left : top;\n const statEdge2 = isY ? left + width : top + height;\n return {\n gap: statEdge2 < origEdge1 ? origEdge1 - statEdge2 : statEdge1 - origEdge2,\n guide: stat,\n };\n })\n .filter(item => item.gap > 0)\n .sort((a, b) => a.gap - b.gap)\n .map(item => item.guide)[0];\n\n if (res) {\n const { left, width, top, height, rect } = res.originRect;\n const isEdge1 = isY ? left < rectOrigin.left : top < rectOrigin.top;\n const statEdge1 = isY ? left : top;\n const statEdge1Raw = isY ? rect.left : rect.top;\n const statEdge2 = isY ? left + width : top + height;\n const statEdge2Raw = isY ? rect.left + rect.width : rect.top + rect.height;\n const posFirst = isY ? item.y : item.x;\n const posSecond = isEdge1 ? statEdge2 : origEdge2;\n const pos2 = `${posFirst}px`;\n const size = isEdge1 ? origEdge1 - statEdge2 : statEdge1 - origEdge2;\n const sizeRaw = isEdge1 ? origEdge1Raw - statEdge2Raw : statEdge1Raw - origEdge2Raw;\n guideInfoStyle.display = '';\n guideInfoStyle[isY ? 'top' : 'left'] = pos2;\n guideInfoStyle[isY ? 'left' : 'top'] = `${posSecond}px`;\n guideInfoStyle[isY ? 'width' : 'height'] = `${size}px`;\n elGuideInfoCnt.innerHTML = `${Math.round(sizeRaw)}px`;\n this.em.trigger(`${evName}:active`, {\n ...this.getEventOpts(),\n guide: item,\n guidesStatic,\n matched: res,\n posFirst,\n posSecond,\n size,\n sizeRaw,\n elGuideInfo,\n elGuideInfoCnt,\n });\n }\n });\n },\n\n toggleDrag(enable: boolean) {\n const { ppfx, editor } = this;\n const methodCls = enable ? 'add' : 'remove';\n const classes = [`${ppfx}is__grabbing`];\n const { Canvas } = editor;\n const body = Canvas.getBody();\n classes.forEach(cls => body.classList[methodCls](cls));\n Canvas[enable ? 'startAutoscroll' : 'stopAutoscroll']();\n },\n} as CommandObject<\n any,\n {\n guidesStatic?: Guide[];\n guides?: Guide[];\n [k: string]: any;\n }\n>;\n","import Component from '../../dom_components/model/Component';\nimport { CommandObject } from './CommandAbstract';\n\nexport default {\n run(ed) {\n if (!ed.Canvas.hasFocus()) return;\n const toSelect: Component[] = [];\n\n ed.getSelectedAll().forEach(component => {\n const coll = component.components();\n const next = coll && coll.filter((c: any) => c.get('selectable'))[0];\n next && toSelect.push(next);\n });\n\n toSelect.length && ed.select(toSelect);\n },\n} as CommandObject;\n","import Component from '../../dom_components/model/Component';\nimport { CommandObject } from './CommandAbstract';\n\nexport default {\n run(ed, snd, opts = {}) {\n if (!ed.Canvas.hasFocus() && !opts.force) return;\n const toSelect: Component[] = [];\n\n ed.getSelectedAll().forEach(component => {\n let next = component.parent();\n\n // Recurse through the parent() chain until a selectable parent is found\n while (next && !next.get('selectable')) {\n next = next.parent();\n }\n\n next && toSelect.push(next);\n });\n\n toSelect.length && ed.select(toSelect);\n },\n} as CommandObject;\n","import Component from '../../dom_components/model/Component';\nimport { CommandObject } from './CommandAbstract';\n\nexport default {\n run(ed) {\n if (!ed.Canvas.hasFocus()) return;\n const toSelect: Component[] = [];\n\n ed.getSelectedAll().forEach(cmp => {\n const parent = cmp.parent();\n if (!parent) return;\n\n const len = parent.components().length;\n let incr = 0;\n let at = 0;\n let next: any;\n\n // Get the next selectable component\n do {\n incr++;\n at = cmp.index() + incr;\n next = at <= len ? parent.getChildAt(at) : null;\n } while (next && !next.get('selectable'));\n\n toSelect.push(next || cmp);\n });\n\n toSelect.length && ed.select(toSelect);\n },\n} as CommandObject;\n","import Component from '../../dom_components/model/Component';\nimport { CommandObject } from './CommandAbstract';\n\nexport default {\n run(ed) {\n if (!ed.Canvas.hasFocus()) return;\n const toSelect: Component[] = [];\n\n ed.getSelectedAll().forEach(cmp => {\n const parent = cmp.parent();\n if (!parent) return;\n\n let incr = 0;\n let at = 0;\n let next: any;\n\n // Get the first selectable component\n do {\n incr++;\n at = cmp.index() - incr;\n next = at >= 0 ? parent.getChildAt(at) : null;\n } while (next && !next.get('selectable'));\n\n toSelect.push(next || cmp);\n });\n\n toSelect.length && ed.select(toSelect);\n },\n} as CommandObject;\n","import { flatten } from 'underscore';\nimport CssRule from '../../css_composer/model/CssRule';\nimport { CommandObject } from './CommandAbstract';\n\nexport default {\n run(ed, s, opts = {}) {\n const { target } = opts;\n let toRemove: CssRule[] = [];\n\n if (!target.get('styles')) return toRemove;\n\n // Find all components in the project, of the target component type\n const type = target.get('type');\n const wrappers = ed.Pages.getAllWrappers();\n const len = flatten(wrappers.map(wrp => wrp.findType(type))).length;\n\n // Remove component related styles only if there are no more components\n // of that type in the project\n if (!len) {\n const rules = ed.CssComposer.getAll();\n toRemove = rules.filter(rule => rule.get('group') === `cmp:${type}`);\n rules.remove(toRemove);\n }\n\n return toRemove;\n },\n} as CommandObject;\n","import { CommandObject } from './CommandAbstract';\n\nexport default {\n run(ed) {\n const em = ed.getModel();\n const models = [...ed.getSelectedAll()].map(md => md.delegate?.copy?.(md) || md).filter(Boolean);\n models.length && em.set('clipboard', models);\n },\n} as CommandObject;\n","import { CommandObject } from './CommandAbstract';\nimport { EditorParam } from '../../editor';\nimport { createEl } from '../../utils/dom';\n\ninterface ExportTemplateRunOptions {\n optsHtml?: EditorParam<'getHtml', 0>;\n optsCss?: EditorParam<'getCss', 0>;\n}\n\nexport default {\n run(editor, sender, opts: ExportTemplateRunOptions = {}) {\n sender && sender.set && sender.set('active', 0);\n const config = editor.getConfig();\n const modal = editor.Modal;\n const pfx = config.stylePrefix;\n this.cm = editor.CodeManager || null;\n\n if (!this.editors) {\n const oHtmlEd = this.buildEditor('htmlmixed', 'hopscotch', 'HTML');\n const oCsslEd = this.buildEditor('css', 'hopscotch', 'CSS');\n this.htmlEditor = oHtmlEd.model;\n this.cssEditor = oCsslEd.model;\n const editors = createEl('div', { class: `${pfx}export-dl` });\n editors.appendChild(oHtmlEd.el);\n editors.appendChild(oCsslEd.el);\n this.editors = editors;\n }\n\n modal\n .open({\n title: config.textViewCode,\n content: this.editors,\n })\n .getModel()\n .once('change:open', () => editor.stopCommand(`${this.id}`));\n this.htmlEditor.setContent(editor.getHtml(opts.optsHtml));\n this.cssEditor.setContent(editor.getCss(opts.optsCss));\n },\n\n stop(editor) {\n const modal = editor.Modal;\n modal && modal.close();\n },\n\n buildEditor(codeName: string, theme: string, label: string) {\n const cm = this.em.CodeManager;\n const model = cm.createViewer({\n label,\n codeName,\n theme,\n });\n\n const el = new cm.EditorView({\n model,\n config: cm.getConfig(),\n } as any).render().el;\n\n return { model, el };\n },\n} as CommandObject<{}, { [k: string]: any }>;\n","import { isElement } from 'underscore';\nimport { CommandObject } from './CommandAbstract';\n\nexport default {\n /**\n * Check if fullscreen mode is enabled\n * @return {Boolean}\n */\n isEnabled() {\n const d = document;\n // @ts-ignore\n if (d.fullscreenElement || d.webkitFullscreenElement || d.mozFullScreenElement) {\n return true;\n }\n return false;\n },\n\n /**\n * Enable fullscreen mode and return browser prefix\n * @param {HTMLElement} el\n * @return {string}\n */\n enable(el: any) {\n let pfx = '';\n\n if (el.requestFullscreen) {\n el.requestFullscreen();\n } else if (el.webkitRequestFullscreen) {\n pfx = 'webkit';\n el.webkitRequestFullscreen();\n } else if (el.mozRequestFullScreen) {\n pfx = 'moz';\n el.mozRequestFullScreen();\n } else if (el.msRequestFullscreen) {\n el.msRequestFullscreen();\n }\n\n return pfx;\n },\n\n /**\n * Disable fullscreen mode\n */\n disable() {\n const d: any = document;\n\n if (this.isEnabled()) {\n if (d.exitFullscreen) d.exitFullscreen();\n else if (d.webkitExitFullscreen) d.webkitExitFullscreen();\n else if (d.mozCancelFullScreen) d.mozCancelFullScreen();\n else if (d.msExitFullscreen) d.msExitFullscreen();\n }\n },\n\n /**\n * Triggered when the state of the fullscreen is changed. Inside detects if\n * it's enabled\n * @param {strinf} pfx Browser prefix\n * @param {Event} e\n */\n fsChanged(pfx: string) {\n if (!this.isEnabled()) {\n this.stopCommand({ sender: this.sender });\n document.removeEventListener(`${pfx || ''}fullscreenchange`, this.fsChanged);\n }\n },\n\n run(editor, sender, opts = {}) {\n this.sender = sender;\n const { target } = opts;\n const targetEl = isElement(target) ? target : document.querySelector(target!);\n const pfx = this.enable(targetEl || editor.getContainer());\n this.fsChanged = this.fsChanged.bind(this, pfx);\n document.addEventListener(pfx + 'fullscreenchange', this.fsChanged);\n editor.trigger('change:canvasOffset');\n },\n\n stop(editor, sender) {\n if (sender && sender.set) sender.set('active', false);\n this.disable();\n if (editor) editor.trigger('change:canvasOffset');\n },\n} as CommandObject<{ target?: HTMLElement | string }, { [k: string]: any }>;\n","import { bindAll, extend } from 'underscore';\nimport { $ } from '../../common';\nimport Component from '../../dom_components/model/Component';\nimport { off, on } from '../../utils/dom';\nimport { CommandObject } from './CommandAbstract';\nimport SelectComponent from './SelectComponent';\nimport SelectPosition from './SelectPosition';\n\nexport default extend({}, SelectPosition, SelectComponent, {\n init(o: any) {\n SelectComponent.init.apply(this, arguments);\n bindAll(this, 'initSorter', 'rollback', 'onEndMove');\n this.opt = o;\n this.hoverClass = this.ppfx + 'highlighter-warning';\n this.badgeClass = this.ppfx + 'badge-warning';\n this.noSelClass = this.ppfx + 'no-select';\n },\n\n enable(...args: any) {\n SelectComponent.enable.apply(this, args);\n this.getBadgeEl().addClass(this.badgeClass);\n this.getHighlighterEl().addClass(this.hoverClass);\n var wp = this.$wrapper;\n wp.css('cursor', 'move');\n wp.on('mousedown', this.initSorter);\n\n // Avoid strange moving behavior\n wp.addClass(this.noSelClass);\n },\n\n /**\n * Overwrite for doing nothing\n * @private\n */\n toggleClipboard() {},\n\n /**\n * Delegate sorting\n * @param {Event} e\n * @private\n * */\n initSorter(e: any) {\n var el = $(e.target).data('model');\n var drag = el.get('draggable');\n if (!drag) return;\n\n // Avoid badge showing on move\n this.cacheEl = null;\n this.startSelectPosition(e.target, this.frameEl.contentDocument);\n this.sorter.draggable = drag;\n this.sorter.onEndMove = this.onEndMove.bind(this);\n this.stopSelectComponent();\n this.$wrapper.off('mousedown', this.initSorter);\n on(this.getContentWindow(), 'keydown', this.rollback);\n },\n\n /**\n * Init sorter from model\n * @param {Object} model\n * @private\n */\n initSorterFromModel(model: Component) {\n var drag = model.get('draggable');\n if (!drag) return;\n // Avoid badge showing on move\n this.cacheEl = null;\n // @ts-ignore\n var el = model.view.el;\n this.startSelectPosition(el, this.frameEl.contentDocument);\n this.sorter.draggable = drag;\n this.sorter.onEndMove = this.onEndMoveFromModel.bind(this);\n\n /*\n this.sorter.setDragHelper(el);\n var dragHelper = this.sorter.dragHelper;\n dragHelper.className = this.ppfx + 'drag-helper';\n dragHelper.innerHTML = '';\n dragHelper.backgroundColor = 'white';\n */\n\n this.stopSelectComponent();\n on(this.getContentWindow(), 'keydown', this.rollback);\n },\n\n /**\n * Init sorter from models\n * @param {Object} model\n * @private\n */\n initSorterFromModels(models: Component[]) {\n // TODO: if one only check for `draggable`\n // Avoid badge showing on move\n this.cacheEl = null;\n const lastModel = models[models.length - 1];\n const frameView = this.em.getCurrentFrame();\n const el = lastModel.getEl(frameView?.model)!;\n const doc = el.ownerDocument;\n this.startSelectPosition(el, doc, { onStart: this.onStart });\n this.sorter.draggable = lastModel.get('draggable');\n this.sorter.toMove = models;\n this.sorter.onMoveClb = this.onDrag;\n this.sorter.onEndMove = this.onEndMoveFromModel.bind(this);\n this.stopSelectComponent();\n on(this.getContentWindow(), 'keydown', this.rollback);\n },\n\n onEndMoveFromModel() {\n off(this.getContentWindow(), 'keydown', this.rollback);\n },\n\n /**\n * Callback after sorting\n * @private\n */\n onEndMove() {\n this.enable();\n off(this.getContentWindow(), 'keydown', this.rollback);\n },\n\n /**\n * Say what to do after the component was selected (selectComponent)\n * @param {Event} e\n * @param {Object} Selected element\n * @private\n * */\n onSelect(e: any, el: any) {},\n\n /**\n * Used to bring the previous situation before start moving the component\n * @param {Event} e\n * @param {Boolean} Indicates if rollback in anycase\n * @private\n * */\n rollback(e: any, force: boolean) {\n var key = e.which || e.keyCode;\n if (key == 27 || force) {\n this.sorter.moved = false;\n this.sorter.endMove();\n }\n return;\n },\n\n /**\n * Returns badge element\n * @return {HTMLElement}\n * @private\n */\n getBadgeEl() {\n if (!this.$badge) this.$badge = $(this.getBadge());\n return this.$badge;\n },\n\n /**\n * Returns highlighter element\n * @return {HTMLElement}\n * @private\n */\n getHighlighterEl() {\n if (!this.$hl) this.$hl = $(this.canvas.getHighlighter());\n return this.$hl;\n },\n\n stop(...args) {\n // @ts-ignore\n SelectComponent.stop.apply(this, args);\n this.getBadgeEl().removeClass(this.badgeClass);\n this.getHighlighterEl().removeClass(this.hoverClass);\n var wp = this.$wrapper;\n wp.css('cursor', '').unbind().removeClass(this.noSelClass);\n },\n} as CommandObject<{}, { [k: string]: any }>);\n","import { isFunction } from 'underscore';\nimport Asset from '../../asset_manager/model/Asset';\nimport { createEl } from '../../utils/dom';\nimport { CommandObject } from './CommandAbstract';\n\nexport default {\n open(content: string) {\n const { editor, title, config, am } = this;\n const { custom } = config;\n if (isFunction(custom.open)) {\n return custom.open(am.__customData());\n }\n const { Modal } = editor;\n Modal.open({ title, content }).onceClose(() => editor.stopCommand(this.id));\n },\n\n close() {\n const { custom } = this.config;\n if (isFunction(custom.close)) {\n return custom.close(this.am.__customData());\n }\n const { Modal } = this.editor;\n Modal && Modal.close();\n },\n\n run(editor, sender, opts = {}) {\n const am = editor.AssetManager;\n const config = am.getConfig();\n const { types = [], accept, select } = opts;\n this.title = opts.modalTitle || editor.t('assetManager.modalTitle') || '';\n this.editor = editor;\n this.config = config;\n this.am = am;\n\n am.setTarget(opts.target);\n am.onClick(opts.onClick);\n am.onDblClick(opts.onDblClick);\n am.onSelect(opts.onSelect);\n am.__behaviour({\n select,\n types,\n options: opts,\n });\n\n if (config.custom) {\n this.rendered = this.rendered || createEl('div');\n this.rendered.className = `${config.stylePrefix}custom-wrp`;\n am.__behaviour({ container: this.rendered });\n am.__trgCustom();\n } else {\n if (!this.rendered || types) {\n let assets: Asset[] = am.getAll().filter((i: Asset) => i);\n\n if (types && types.length) {\n assets = assets.filter(a => types.indexOf(a.get('type')) !== -1);\n }\n\n am.render(assets);\n this.rendered = am.getContainer();\n }\n\n if (accept) {\n const uploadEl = this.rendered.querySelector(`input#${config.stylePrefix}uploadFile`);\n uploadEl && uploadEl.setAttribute('accept', accept);\n }\n }\n\n this.open(this.rendered);\n return this;\n },\n\n stop(editor) {\n this.editor = editor;\n this.close(this.rendered);\n },\n} as CommandObject;\n","import { isFunction } from 'underscore';\nimport { createEl } from '../../utils/dom';\nimport { CommandObject } from './CommandAbstract';\n\nexport default {\n open() {\n const { container, editor, bm, config } = this;\n const { custom, appendTo } = config;\n\n if (isFunction(custom.open)) {\n return custom.open(bm.__customData());\n }\n\n if (this.firstRender && !appendTo) {\n const id = 'views-container';\n const pn = editor.Panels;\n const panels = pn.getPanel(id) || pn.addPanel({ id });\n panels.set('appendContent', container).trigger('change:appendContent');\n if (!custom) container.appendChild(bm.render());\n }\n\n if (container) container.style.display = 'block';\n },\n\n close() {\n const { container, config } = this;\n const { custom } = config;\n\n if (isFunction(custom.close)) {\n return custom.close(this.bm.__customData());\n }\n\n if (container) container.style.display = 'none';\n },\n\n run(editor) {\n const bm = editor.Blocks;\n this.config = bm.getConfig();\n this.firstRender = !this.container;\n this.container = this.container || createEl('div');\n this.editor = editor;\n this.bm = bm;\n const { container } = this;\n bm.__behaviour({\n container,\n });\n\n if (this.config.custom) {\n bm.__trgCustom();\n }\n\n this.open();\n },\n\n stop() {\n this.close();\n },\n} as CommandObject<{}, { [k: string]: any }>;\n","import { CommandObject } from './CommandAbstract';\n\nexport default {\n run(editor) {\n const lm = editor.LayerManager;\n const pn = editor.Panels;\n const lmConfig = lm.getConfig();\n\n if (lmConfig.appendTo) return;\n\n if (!this.layers) {\n const id = 'views-container';\n const layers = document.createElement('div');\n // @ts-ignore\n const panels = pn.getPanel(id) || pn.addPanel({ id });\n\n if (lmConfig.custom) {\n lm.__trgCustom({ container: layers });\n } else {\n layers.appendChild(lm.render());\n }\n\n panels.set('appendContent', layers).trigger('change:appendContent');\n this.layers = layers;\n }\n\n this.layers.style.display = 'block';\n },\n\n stop() {\n const { layers } = this;\n layers && (layers.style.display = 'none');\n },\n} as CommandObject<{}, { [k: string]: any }>;\n","import { CommandObject } from './CommandAbstract';\n\nexport default {\n run(editor) {\n const pm = editor.Pages;\n const pn = editor.Panels;\n const lmConfig = pm.getConfig();\n\n if (lmConfig.appendTo) return;\n\n if (!this.layers) {\n const id = 'views-container';\n const layers = document.createElement('div');\n\n const panels = pn.getPanel(id) || pn.addPanel({ id });\n layers.appendChild(pm.render());\n\n panels.set('appendContent', layers).trigger('change:appendContent');\n this.layers = layers;\n }\n\n this.layers.style.display = 'block';\n },\n\n stop() {\n const { layers } = this;\n layers && (layers.style.display = 'none');\n },\n} as CommandObject<{}, { [k: string]: any }>;\n","import { $ } from '../../common';\nimport { CommandObject } from './CommandAbstract';\n\nexport default {\n run(editor, sender) {\n this.sender = sender;\n\n if (!this.$cnt) {\n const config = editor.getConfig();\n const { Panels, DeviceManager, SelectorManager, StyleManager } = editor;\n const trgEvCnt = 'change:appendContent';\n const $cnt = $('
');\n const $cntInner = $('
');\n const $cntSlm = $('
');\n const $cntSm = $('
');\n this.$cnt = $cnt;\n this.$cntInner = $cntInner;\n $cntInner.append($cntSlm);\n $cntInner.append($cntSm);\n $cnt.append($cntInner);\n\n // Device Manager\n if (DeviceManager && config.showDevices) {\n const devicePanel = Panels.addPanel({ id: 'devices-c' });\n const dvEl = DeviceManager.render();\n devicePanel.set('appendContent', dvEl).trigger(trgEvCnt);\n }\n\n // Selector Manager container\n const slmConfig = SelectorManager.getConfig();\n if (slmConfig.custom) {\n SelectorManager.__trgCustom({ container: $cntSlm.get(0) });\n } else if (!slmConfig.appendTo) {\n $cntSlm.append(SelectorManager.render([]));\n }\n\n // Style Manager\n this.sm = StyleManager;\n const smConfig = StyleManager.getConfig();\n const pfx = smConfig.stylePrefix;\n this.$header = $(`
${editor.t('styleManager.empty')}
`);\n $cnt.append(this.$header);\n\n if (smConfig.custom) {\n StyleManager.__trgCustom({ container: $cntSm.get(0) });\n } else if (!smConfig.appendTo) {\n $cntSm.append(StyleManager.render());\n }\n\n // Create panel if not exists\n const pnCnt = 'views-container';\n const pnl = Panels.getPanel(pnCnt) || Panels.addPanel({ id: pnCnt });\n\n // Add all containers to the panel\n pnl.set('appendContent', $cnt).trigger(trgEvCnt);\n\n // Toggle Style Manager on target selection\n const em = editor.getModel();\n this.listenTo(em, StyleManager.events.target, this.toggleSm);\n }\n\n this.toggleSm();\n },\n\n /**\n * Toggle Style Manager visibility\n * @private\n */\n toggleSm() {\n const { sender, sm, $cntInner, $header } = this;\n if ((sender && sender.get && !sender.get('active')) || !sm) return;\n\n if (sm.getSelected()) {\n $cntInner?.show();\n $header?.hide();\n } else {\n $cntInner?.hide();\n $header?.show();\n }\n },\n\n stop() {\n this.$cntInner?.hide();\n this.$header?.hide();\n },\n} as CommandObject<{}, { [k: string]: any }>;\n","import { CommandObject } from './CommandAbstract';\nimport { $ } from '../../common';\n\nexport default {\n run(editor, sender) {\n this.sender = sender;\n const em = editor.getModel();\n\n const config = editor.Config;\n const pfx = config.stylePrefix;\n const tm = editor.TraitManager;\n const confTm = tm.getConfig();\n let panelC;\n\n if (confTm.appendTo) return;\n\n if (!this.$cn) {\n this.$cn = $('
');\n this.$cn2 = $('
');\n this.$cn.append(this.$cn2);\n this.$header = $('
').append(`
${em.t('traitManager.empty')}
`);\n this.$cn.append(this.$header);\n\n if (confTm.custom) {\n tm.__trgCustom({ container: this.$cn2.get(0) });\n } else {\n this.$cn2.append(`
${em.t('traitManager.label')}
`);\n this.$cn2.append(tm.render());\n }\n\n var panels = editor.Panels;\n\n if (!panels.getPanel('views-container')) {\n // @ts-ignore\n panelC = panels.addPanel({ id: 'views-container' });\n } else {\n panelC = panels.getPanel('views-container');\n }\n\n panelC?.set('appendContent', this.$cn.get(0)).trigger('change:appendContent');\n\n this.target = editor.getModel();\n this.listenTo(this.target, 'component:toggled', this.toggleTm);\n }\n\n this.toggleTm();\n },\n\n /**\n * Toggle Trait Manager visibility\n * @private\n */\n toggleTm() {\n const sender = this.sender;\n if (sender && sender.get && !sender.get('active')) return;\n\n if (this.target.getSelectedAll().length === 1) {\n this.$cn2.show();\n this.$header.hide();\n } else {\n this.$cn2.hide();\n this.$header.show();\n }\n },\n\n stop() {\n this.$cn2 && this.$cn2.hide();\n this.$header && this.$header.hide();\n },\n} as CommandObject<{}, { [k: string]: any }>;\n","import { isArray, contains } from 'underscore';\nimport Component from '../../dom_components/model/Component';\nimport { CommandObject } from './CommandAbstract';\nimport Editor from '../../editor';\n\nexport default {\n run(ed, s, opts = {}) {\n const em = ed.getModel();\n const clp: Component[] | null = em.get('clipboard');\n const lastSelected = ed.getSelected();\n\n if (clp?.length && lastSelected) {\n ed.getSelectedAll().forEach(sel => {\n const selected = sel.delegate?.copy?.(sel) || sel;\n const { collection } = selected;\n let added;\n if (collection) {\n const at = selected.index() + 1;\n const addOpts = { at, action: opts.action || 'paste-component' };\n\n if (contains(clp, selected) && selected.get('copyable')) {\n added = collection.add(selected.clone(), addOpts);\n } else {\n added = doAdd(ed, clp, selected.parent()!, addOpts);\n }\n } else {\n // Page body is selected\n // Paste at the end of the body\n const pageBody = em.Pages.getSelected()?.getMainComponent();\n const addOpts = { at: pageBody?.components().length || 0, action: opts.action || 'paste-component' };\n\n added = doAdd(ed, clp, pageBody as Component, addOpts);\n }\n\n added = isArray(added) ? added : [added];\n added.forEach(add => ed.trigger('component:paste', add));\n });\n\n lastSelected.emitUpdate();\n }\n },\n} as CommandObject;\n\nfunction doAdd(ed: Editor, clp: Component[], parent: Component, addOpts: any): Component[] | Component {\n const copyable = clp.filter(cop => cop.get('copyable'));\n const pasteable = copyable.filter(cop => ed.Components.canMove(parent, cop).result);\n return parent.components().add(\n pasteable.map(cop => cop.clone()),\n addOpts\n );\n}\n","import { each } from 'underscore';\nimport Editor from '../../editor';\nimport { CommandObject } from './CommandAbstract';\n\nconst cmdOutline = 'core:component-outline';\n\nexport default {\n getPanels(editor: Editor) {\n if (!this.panels) {\n this.panels = editor.Panels.getPanels();\n }\n\n return this.panels;\n },\n\n preventDrag(opts: any) {\n opts.abort = 1;\n },\n\n tglEffects(on: boolean) {\n const { em } = this;\n const mthEv = on ? 'on' : 'off';\n if (em) {\n const canvas = em.Canvas;\n const body = canvas.getBody();\n const tlb = canvas.getToolbarEl();\n tlb && (tlb.style.display = on ? 'none' : '');\n const elP = body.querySelectorAll(`.${this.ppfx}no-pointer`);\n each(elP, item => ((item as HTMLElement).style.pointerEvents = on ? 'all' : ''));\n em[mthEv]('run:tlb-move:before', this.preventDrag);\n }\n },\n\n run(editor, sender) {\n this.sender = sender;\n this.selected = [...editor.getSelectedAll()];\n editor.select();\n\n if (!this.shouldRunSwVisibility) {\n this.shouldRunSwVisibility = editor.Commands.isActive(cmdOutline);\n }\n\n this.shouldRunSwVisibility && editor.stopCommand(cmdOutline);\n editor.getModel().stopDefault();\n\n const panels = this.getPanels(editor);\n const canvas = editor.Canvas.getElement();\n const editorEl = editor.getEl()!;\n const pfx = editor.Config.stylePrefix;\n\n if (!this.helper) {\n const helper = document.createElement('span');\n helper.className = `${pfx}off-prv fa fa-eye-slash`;\n editorEl.appendChild(helper);\n helper.onclick = () => this.stopCommand();\n this.helper = helper;\n }\n\n this.helper.style.display = 'inline-block';\n\n panels.forEach((panel: any) => panel.set('visible', false));\n\n const canvasS = canvas.style;\n canvasS.width = '100%';\n canvasS.height = '100%';\n canvasS.top = '0';\n canvasS.left = '0';\n canvasS.padding = '0';\n canvasS.margin = '0';\n editor.refresh();\n this.tglEffects(1);\n },\n\n stop(editor) {\n const { sender = {}, selected } = this;\n sender.set && sender.set('active', 0);\n const panels = this.getPanels(editor);\n\n if (this.shouldRunSwVisibility) {\n editor.runCommand(cmdOutline);\n this.shouldRunSwVisibility = false;\n }\n\n editor.getModel().runDefault();\n panels.forEach((panel: any) => panel.set('visible', true));\n\n const canvas = editor.Canvas.getElement();\n canvas.setAttribute('style', '');\n selected && editor.select(selected);\n delete this.selected;\n\n if (this.helper) {\n this.helper.style.display = 'none';\n }\n\n editor.refresh();\n this.tglEffects();\n },\n} as CommandObject<{}, { [k: string]: any }>;\n","import Resizer, { ResizerOptions } from '../../utils/Resizer';\nimport { CommandObject } from './CommandAbstract';\n\nexport default {\n run(editor, sender, opts) {\n const opt = opts || {};\n const canvas = editor.Canvas;\n const canvasView = canvas.getCanvasView();\n const options: ResizerOptions = {\n appendTo: canvas.getResizerEl(),\n prefix: editor.getConfig().stylePrefix,\n posFetcher: canvasView.getElementPos.bind(canvasView),\n mousePosFetcher: canvas.getMouseRelativePos.bind(canvas),\n ...(opt.options || {}),\n };\n let { canvasResizer } = this;\n\n // Create the resizer for the canvas if not yet created\n if (!canvasResizer || opt.forceNew) {\n this.canvasResizer = new editor.Utils.Resizer(options);\n canvasResizer = this.canvasResizer;\n }\n\n canvasResizer.setOptions(options, true);\n canvasResizer.blur();\n canvasResizer.focus(opt.el);\n return canvasResizer;\n },\n\n stop() {\n this.canvasResizer?.blur();\n },\n} as CommandObject<{ options?: {}; forceNew?: boolean; el: HTMLElement }, { canvasResizer?: Resizer }>;\n","import { CommandFunction } from '../../commands/view/CommandAbstract';\nimport { Model, ObjectAny } from '../../common';\n\nexport interface ToolbarButtonProps {\n /**\n * Command name.\n */\n command: CommandFunction | string;\n\n /**\n * Button label.\n */\n label?: string;\n\n id?: string;\n attributes?: ObjectAny;\n events?: ObjectAny;\n}\n\nexport default class ToolbarButton extends Model {\n defaults() {\n return {\n command: '',\n attributes: {},\n };\n }\n}\n","import { Collection } from '../../common';\nimport ToolbarButton from './ToolbarButton';\n\nexport default class Toolbar extends Collection {}\n\nToolbar.prototype.model = ToolbarButton;\n","import { includes } from 'underscore';\nimport { ObjectAny, View } from '../../common';\n\nexport default class DomainViews extends View {\n config?: any;\n items: any[];\n ns?: string;\n itemView?: any;\n\n // Defines the View per type\n itemsView = '';\n\n itemType = 'type';\n\n reuseView = false;\n\n constructor(opts: any = {}, config?: any, autoAdd = false) {\n super(opts);\n this.config = config || opts.config || {};\n autoAdd && this.listenTo(this.collection, 'add', this.addTo);\n this.items = [];\n }\n\n /**\n * Add new model to the collection\n * @param {Model} model\n * @private\n * */\n addTo(model: any) {\n this.add(model);\n }\n\n itemViewNotFound(type: string) {\n const { config, ns } = this;\n const { em } = config;\n const warn = `${ns ? `[${ns}]: ` : ''}'${type}' type not found`;\n em && em.logWarning(warn);\n }\n\n /**\n * Render new model inside the view\n * @param {Model} model\n * @param {Object} fragment Fragment collection\n * @private\n * */\n add(model: any, fragment?: DocumentFragment) {\n const { config, reuseView, items } = this;\n const itemsView = (this.itemsView || {}) as ObjectAny;\n const inputTypes = [\n 'button',\n 'checkbox',\n 'color',\n 'date',\n 'datetime-local',\n 'email',\n 'file',\n 'hidden',\n 'image',\n 'month',\n 'number',\n 'password',\n 'radio',\n 'range',\n 'reset',\n 'search',\n 'submit',\n 'tel',\n 'text',\n 'time',\n 'url',\n 'week',\n ];\n var frag = fragment || null;\n var itemView = this.itemView;\n var typeField = model.get(this.itemType);\n let view;\n\n if (itemsView[typeField]) {\n itemView = itemsView[typeField];\n } else if (typeField && !itemsView[typeField] && !includes(inputTypes, typeField)) {\n this.itemViewNotFound(typeField);\n }\n\n if (model.view && reuseView) {\n view = model.view;\n } else {\n view = new itemView({ model, config }, config);\n }\n\n items && items.push(view);\n const rendered = view.render().el;\n\n if (frag) frag.appendChild(rendered);\n else this.$el.append(rendered);\n }\n\n render() {\n var frag = document.createDocumentFragment();\n this.clearItems();\n this.$el.empty();\n\n if (this.collection.length)\n this.collection.each(function (model) {\n // @ts-ignore\n this.add(model, frag);\n }, this);\n\n this.$el.append(frag);\n this.onRender();\n return this;\n }\n\n onRender() {}\n onRemoveBefore(items?: any, opts?: any) {}\n onRemove(items?: any, opts?: any) {}\n\n remove(opts = {}) {\n const { items } = this;\n this.onRemoveBefore(items, opts);\n this.clearItems();\n super.remove();\n this.onRemove(items, opts);\n return this;\n }\n\n clearItems() {\n const items = this.items || [];\n // TODO Traits do not update the target anymore\n // items.forEach(item => item.remove());\n // this.items = [];\n }\n}\n\n// Default view\nDomainViews.prototype.itemView = '';\n","import { isFunction, isString } from 'underscore';\nimport { View } from '../../common';\nimport EditorModel from '../../editor/model/Editor';\nimport ToolbarButton from '../model/ToolbarButton';\n\nexport type ToolbarViewProps = { em: EditorModel };\n\nexport default class ToolbarButtonView extends View {\n em: EditorModel;\n\n events() {\n return (\n this.model.get('events') || {\n mousedown: 'handleClick',\n }\n );\n }\n\n // @ts-ignore\n attributes() {\n return this.model.get('attributes');\n }\n\n constructor(props: { config: ToolbarViewProps; model: ToolbarButton }) {\n super(props);\n this.em = props.config.em;\n }\n\n handleClick(event: MouseEvent) {\n event.preventDefault();\n event.stopPropagation();\n\n /*\n * Since the toolbar lives outside the canvas frame, the event's\n * generated on it have clientX and clientY relative to the page.\n *\n * This causes issues during events like dragging, where they depend\n * on the clientX and clientY.\n *\n * This makes sure the offsets are calculated.\n *\n * More information on\n * https://github.com/GrapesJS/grapesjs/issues/2372\n * https://github.com/GrapesJS/grapesjs/issues/2207\n */\n\n const { em } = this;\n const { left, top } = em.Canvas.getFrameEl().getBoundingClientRect();\n const ev = {\n ...event,\n clientX: event.clientX - left,\n clientY: event.clientY - top,\n };\n\n em.trigger('toolbar:run:before', { event: ev });\n this.execCommand(ev);\n }\n\n execCommand(event: MouseEvent) {\n const { em, model } = this;\n const opts = { event };\n const command = model.get('command');\n const editor = em.Editor;\n\n if (isFunction(command)) {\n command(editor, null, opts);\n }\n\n if (isString(command)) {\n editor.runCommand(command, opts);\n }\n }\n\n render() {\n const { em, $el, model } = this;\n const id = model.get('id');\n const label = model.get('label');\n const pfx = em.getConfig().stylePrefix;\n $el.addClass(`${pfx}toolbar-item`);\n id && $el.addClass(`${pfx}toolbar-item__${id}`);\n label && $el.append(label);\n return this;\n }\n}\n","import DomainViews from '../../domain_abstract/view/DomainViews';\nimport EditorModel from '../../editor/model/Editor';\nimport ToolbarButtonView, { ToolbarViewProps } from './ToolbarButtonView';\n\nexport default class ToolbarView extends DomainViews {\n em: EditorModel;\n\n constructor(opts: ToolbarViewProps) {\n super(opts);\n const { em } = opts;\n this.em = em;\n this.config = { em };\n this.listenTo(this.collection, 'reset', this.render);\n }\n\n onRender() {\n const pfx = this.em.config.stylePrefix!;\n this.el.className = `${pfx}toolbar-items`;\n }\n}\n\n// @ts-ignore\nToolbarView.prototype.itemView = ToolbarButtonView;\n","import { bindAll, debounce, isElement } from 'underscore';\nimport Component from '../../dom_components/model/Component';\nimport Toolbar from '../../dom_components/model/Toolbar';\nimport ToolbarView from '../../dom_components/view/ToolbarView';\nimport { isDoc, isTaggableNode, isVisible, off, on } from '../../utils/dom';\nimport { getComponentModel, getComponentView, getUnitFromValue, getViewEl, hasWin, isObject } from '../../utils/mixins';\nimport { CommandObject } from './CommandAbstract';\nimport { CanvasSpotBuiltInTypes } from '../../canvas/model/CanvasSpot';\nimport { ResizerOptions } from '../../utils/Resizer';\n\nlet showOffsets: boolean;\n/**\n * This command is responsible for show selecting components and displaying\n * all the necessary tools around (component toolbar, badge, highlight box, etc.)\n *\n * The command manages different boxes to display tools and when something in\n * the canvas is updated, the command triggers the appropriate method to update\n * their position (across multiple frames/components):\n * - Global Tools (updateToolsGlobal/updateGlobalPos)\n * This box contains tools intended to be displayed only on ONE component per time,\n * like Component Toolbar (updated by updateToolbar/updateToolbarPos), this means\n * you won't be able to see more than one Component Toolbar (even with multiple\n * frames or multiple selected components)\n * - Local Tools (updateToolsLocal/updateLocalPos)\n * Each frame in the canvas has its own local box, so we're able to see more than\n * one active container at the same time. When you put a mouse over an element\n * you can see stuff like the highlight box, badge, margins/paddings offsets, etc.\n * so those elements are inside the Local Tools box\n *\n *\n */\nexport default {\n init() {\n this.onSelect = debounce(this.onSelect, 0);\n bindAll(\n this,\n 'onHover',\n 'onOut',\n 'onClick',\n 'onFrameScroll',\n 'onFrameResize',\n 'onFrameUpdated',\n 'onContainerChange'\n );\n },\n\n enable() {\n this.frameOff = this.canvasOff = this.adjScroll = null;\n this.startSelectComponent();\n showOffsets = true;\n },\n\n /**\n * Start select component event\n * @private\n * */\n startSelectComponent() {\n this.toggleSelectComponent(1);\n this.em.getSelected() && this.onSelect();\n },\n\n /**\n * Stop select component event\n * @private\n * */\n stopSelectComponent() {\n this.toggleSelectComponent();\n },\n\n /**\n * Toggle select component event\n * @private\n * */\n toggleSelectComponent(enable: boolean) {\n const { em } = this;\n const listenToEl = em.getConfig().listenToEl!;\n const { parentNode } = em.getContainer()!;\n const method = enable ? 'on' : 'off';\n const methods = { on, off };\n !listenToEl.length && parentNode && listenToEl.push(parentNode as HTMLElement);\n const trigger = (win: Window, body: HTMLBodyElement) => {\n methods[method](body, 'mouseover', this.onHover);\n methods[method](body, 'mouseleave', this.onOut);\n methods[method](body, 'click', this.onClick);\n methods[method](win, 'scroll', this.onFrameScroll, true);\n methods[method](win, 'resize', this.onFrameResize);\n };\n methods[method](window, 'resize', this.onFrameUpdated);\n methods[method](listenToEl, 'scroll', this.onContainerChange);\n em[method]('component:toggled component:update undo redo', this.onSelect, this);\n em[method]('change:componentHovered', this.onHovered, this);\n em[method]('component:resize styleable:change component:input', this.updateGlobalPos, this);\n em[method]('component:update:toolbar', this._upToolbar, this);\n em[method]('change:canvasOffset', this.updateAttached, this);\n em[method]('frame:updated', this.onFrameUpdated, this);\n em[method]('canvas:updateTools', this.onFrameUpdated, this);\n em.Canvas.getFrames().forEach(frame => {\n const { view } = frame;\n const win = view?.getWindow();\n win && trigger(win, view?.getBody()!);\n });\n },\n\n /**\n * Hover command\n * @param {Object} e\n * @private\n */\n onHover(ev: Event) {\n ev.stopPropagation();\n const { em } = this;\n const el = ev.target as HTMLElement;\n const view = getComponentView(el);\n const frameView = view?.frameView;\n let model = view?.model;\n\n // Get first valid model\n if (!model) {\n let parentEl = el.parentNode;\n while (!model && parentEl && !isDoc(parentEl)) {\n model = getComponentModel(parentEl);\n parentEl = parentEl.parentNode;\n }\n }\n\n this.currentDoc = el.ownerDocument;\n em.setHovered(model, { useValid: true });\n frameView && em.setCurrentFrame(frameView);\n },\n\n onFrameUpdated() {\n this.updateLocalPos();\n this.updateGlobalPos();\n },\n\n onHovered(em: any, component: Component) {\n let result = {};\n\n if (component) {\n component.views?.forEach(view => {\n const el = view.el;\n const pos = this.getElementPos(el);\n result = { el, pos, component, view: getViewEl(el) };\n\n if (el.ownerDocument === this.currentDoc) {\n this.elHovered = result;\n }\n\n this.updateToolsLocal(result);\n });\n } else {\n this.currentDoc = null;\n this.elHovered = 0;\n this.updateToolsLocal();\n this.canvas.getFrames().forEach(frame => {\n const { view } = frame;\n const el = view && view.getToolsEl();\n el && this.toggleToolsEl(0, 0, { el });\n });\n }\n },\n\n /**\n * Say what to do after the component was selected\n * @param {Object} e\n * @param {Object} el\n * @private\n * */\n onSelect() {\n const { em } = this;\n const component = em.getSelected();\n const currentFrame = em.getCurrentFrame();\n const view = component && component.getView(currentFrame?.model);\n let el = view && view.el;\n let result = {};\n\n if (el && isVisible(el)) {\n const pos = this.getElementPos(el);\n result = { el, pos, component, view: getViewEl(el) };\n }\n\n this.elSelected = result;\n this.updateToolsGlobal();\n // This will hide some elements from the select component\n this.updateLocalPos(result);\n this.initResize(component);\n },\n\n updateGlobalPos() {\n const sel = this.getElSelected();\n if (!sel.el) return;\n sel.pos = this.getElementPos(sel.el);\n this.updateToolsGlobal();\n },\n\n updateLocalPos(data: any) {\n const sel = this.getElHovered();\n if (!sel.el) return;\n sel.pos = this.getElementPos(sel.el);\n this.updateToolsLocal(data);\n },\n\n getElHovered() {\n return this.elHovered || {};\n },\n\n getElSelected() {\n return this.elSelected || {};\n },\n\n onOut() {\n this.em.setHovered();\n },\n\n toggleToolsEl(on: boolean, view: any, opts: any = {}) {\n const el = opts.el || this.canvas.getToolsEl(view);\n el && (el.style.display = on ? '' : 'none');\n return el || {};\n },\n\n /**\n * Show element offset viewer\n * @param {HTMLElement} el\n * @param {Object} pos\n */\n showElementOffset(el: HTMLElement, pos: any, opts: any = {}) {\n if (!showOffsets) return;\n this.editor.runCommand('show-offset', {\n el,\n elPos: pos,\n view: opts.view,\n force: 1,\n top: 0,\n left: 0,\n });\n },\n\n /**\n * Hide element offset viewer\n * @param {HTMLElement} el\n * @param {Object} pos\n */\n hideElementOffset(view: any) {\n this.editor.stopCommand('show-offset', {\n view,\n });\n },\n\n /**\n * Show fixed element offset viewer\n * @param {HTMLElement} el\n * @param {Object} pos\n */\n showFixedElementOffset(el: HTMLElement, pos: any) {\n this.editor.runCommand('show-offset', {\n el,\n elPos: pos,\n state: 'Fixed',\n });\n },\n\n /**\n * Hide fixed element offset viewer\n * @param {HTMLElement} el\n * @param {Object} pos\n */\n hideFixedElementOffset() {\n if (this.editor) this.editor.stopCommand('show-offset', { state: 'Fixed' });\n },\n\n /**\n * Hide Highlighter element\n */\n hideHighlighter(view: any) {\n this.canvas.getHighlighter(view).style.opacity = 0;\n },\n\n /**\n * On element click\n * @param {Event} e\n * @private\n */\n onClick(ev: Event) {\n ev.stopPropagation();\n ev.preventDefault();\n const { em } = this;\n\n if (em.get('_cmpDrag')) return em.set('_cmpDrag');\n\n const el = ev.target as HTMLElement;\n let model = getComponentModel(el);\n\n if (!model) {\n let parentEl = el.parentNode;\n\n while (!model && parentEl && !isDoc(parentEl)) {\n model = getComponentModel(parentEl);\n parentEl = parentEl.parentNode;\n }\n }\n\n if (model) {\n // Avoid selection of inner text components during editing\n if (em.isEditing() && !model.get('textable') && model.isChildOf('text')) {\n return;\n }\n this.select(model, ev);\n }\n },\n\n /**\n * Select component\n * @param {Component} model\n * @param {Event} event\n */\n select(model: Component, event = {}) {\n if (!model) return;\n this.editor.select(model, { event, useValid: true });\n this.initResize(model);\n },\n\n /**\n * Update badge for the component\n * @param {Object} Component\n * @param {Object} pos Position object\n * @private\n * */\n updateBadge(el: HTMLElement, pos: any, opts: any = {}) {\n const { canvas } = this;\n const model = getComponentModel(el);\n const badge = this.getBadge(opts);\n const bStyle = badge.style;\n\n if (!model || !model.get('badgable')) {\n bStyle.display = 'none';\n return;\n }\n\n if (!opts.posOnly) {\n const config = this.canvas.getConfig();\n const icon = model.getIcon();\n const ppfx = config.pStylePrefix || '';\n const clsBadge = `${ppfx}badge`;\n const customeLabel = config.customBadgeLabel;\n const badgeLabel = `${icon ? `
${icon}
` : ''}\n
${model.getName()}
`;\n badge.innerHTML = customeLabel ? customeLabel(model) : badgeLabel;\n }\n\n const un = 'px';\n bStyle.display = 'block';\n\n const targetToElem = canvas.getTargetToElementFixed(el, badge, {\n pos: pos,\n });\n\n const top = targetToElem.top; //opts.topOff - badgeH < 0 ? -opts.topOff : posTop;\n const left = opts.leftOff < 0 ? -opts.leftOff : 0;\n\n bStyle.top = top + un;\n bStyle.left = left + un;\n },\n\n /**\n * Update highlighter element\n * @param {HTMLElement} el\n * @param {Object} pos Position object\n * @private\n */\n showHighlighter(view: any) {\n this.canvas.getHighlighter(view).style.opacity = '';\n },\n\n /**\n * Init resizer on the element if possible\n * @param {HTMLElement|Component} elem\n * @private\n */\n initResize(elem: HTMLElement) {\n const { em, canvas } = this;\n const editor = em.Editor;\n const model = !isElement(elem) && isTaggableNode(elem) ? elem : em.getSelected();\n const resizable = model?.get('resizable');\n const spotTypeResize = CanvasSpotBuiltInTypes.Resize;\n const hasCustomResize = canvas.hasCustomSpot(spotTypeResize);\n canvas.removeSpots({ type: spotTypeResize });\n\n if (model && resizable) {\n canvas.addSpot({ type: spotTypeResize, component: model });\n const el = isElement(elem) ? elem : model.getEl();\n\n if (hasCustomResize || !el) return;\n\n let modelToStyle: any;\n const { config } = em;\n const pfx = config.stylePrefix || '';\n const resizeClass = `${pfx}resizing`;\n\n const toggleBodyClass = (method: string, e: any, opts: any) => {\n const docs = opts.docs;\n docs &&\n docs.forEach((doc: Document) => {\n const body = doc.body;\n const cls = body.className || '';\n body.className = (method == 'add' ? `${cls} ${resizeClass}` : cls.replace(resizeClass, '')).trim();\n });\n };\n\n const options: ResizerOptions = {\n // Here the resizer is updated with the current element height and width\n onStart(e: Event, opts: any = {}) {\n const { el, config, resizer } = opts;\n const { keyHeight, keyWidth, currentUnit, keepAutoHeight, keepAutoWidth } = config;\n toggleBodyClass('add', e, opts);\n modelToStyle = em.Styles.getModelToStyle(model);\n canvas.toggleFramesEvents(false);\n const computedStyle = getComputedStyle(el);\n const modelStyle = modelToStyle.getStyle();\n\n let currentWidth = modelStyle[keyWidth];\n config.autoWidth = keepAutoWidth && currentWidth === 'auto';\n if (isNaN(parseFloat(currentWidth))) {\n currentWidth = computedStyle[keyWidth];\n }\n\n let currentHeight = modelStyle[keyHeight];\n config.autoHeight = keepAutoHeight && currentHeight === 'auto';\n if (isNaN(parseFloat(currentHeight))) {\n currentHeight = computedStyle[keyHeight];\n }\n\n resizer.startDim.w = parseFloat(currentWidth);\n resizer.startDim.h = parseFloat(currentHeight);\n showOffsets = false;\n\n if (currentUnit) {\n config.unitHeight = getUnitFromValue(currentHeight);\n config.unitWidth = getUnitFromValue(currentWidth);\n }\n },\n\n // Update all positioned elements (eg. component toolbar)\n onMove() {\n editor.trigger('component:resize');\n },\n\n onEnd(e: Event, opts: any) {\n toggleBodyClass('remove', e, opts);\n editor.trigger('component:resize');\n canvas.toggleFramesEvents(true);\n showOffsets = true;\n },\n\n updateTarget(el: any, rect: any, options: any = {}) {\n if (!modelToStyle) {\n return;\n }\n\n const { store, selectedHandler, config } = options;\n const { keyHeight, keyWidth, autoHeight, autoWidth, unitWidth, unitHeight } = config;\n const onlyHeight = ['tc', 'bc'].indexOf(selectedHandler) >= 0;\n const onlyWidth = ['cl', 'cr'].indexOf(selectedHandler) >= 0;\n const style: any = {};\n\n if (!onlyHeight) {\n const bodyw = canvas.getBody().offsetWidth;\n const width = rect.w < bodyw ? rect.w : bodyw;\n style[keyWidth] = autoWidth ? 'auto' : `${width}${unitWidth}`;\n }\n\n if (!onlyWidth) {\n style[keyHeight] = autoHeight ? 'auto' : `${rect.h}${unitHeight}`;\n }\n\n if (em.getDragMode(model)) {\n style.top = `${rect.t}${unitHeight}`;\n style.left = `${rect.l}${unitWidth}`;\n }\n\n const finalStyle = {\n ...style,\n // value for the partial update\n __p: !store,\n };\n modelToStyle.addStyle(finalStyle, { avoidStore: !store });\n em.Styles.__emitCmpStyleUpdate(finalStyle, { components: em.getSelected() });\n },\n ...(isObject(resizable) ? resizable : {}),\n };\n\n this.resizer = editor.runCommand('resize', { el, options, force: 1 });\n } else {\n if (hasCustomResize) return;\n\n editor.stopCommand('resize');\n this.resizer = null;\n }\n },\n\n /**\n * Update toolbar if the component has one\n * @param {Object} mod\n */\n updateToolbar(mod: Component) {\n const { canvas } = this;\n const { em } = this.config;\n const model = mod === em ? em.getSelected() : mod;\n const toolbarEl = canvas.getToolbarEl()!;\n const toolbarStyle = toolbarEl.style;\n const toolbar = model.get('toolbar');\n const showToolbar = em.config.showToolbar;\n const noCustomSpotSelect = !canvas.hasCustomSpot(CanvasSpotBuiltInTypes.Select);\n\n if (model && showToolbar && toolbar && toolbar.length && noCustomSpotSelect) {\n toolbarStyle.display = '';\n if (!this.toolbar) {\n toolbarEl.innerHTML = '';\n this.toolbar = new Toolbar(toolbar);\n // @ts-ignore\n const toolbarView = new ToolbarView({ collection: this.toolbar, em });\n toolbarEl.appendChild(toolbarView.render().el);\n }\n\n this.toolbar.reset(toolbar);\n toolbarStyle.top = '-100px';\n toolbarStyle.left = '0';\n } else {\n toolbarStyle.display = 'none';\n }\n },\n\n /**\n * Update toolbar positions\n * @param {HTMLElement} el\n * @param {Object} pos\n */\n updateToolbarPos(pos: any) {\n const unit = 'px';\n const { style } = this.canvas.getToolbarEl()!;\n style.top = `${pos.top}${unit}`;\n style.left = `${pos.left}${unit}`;\n style.opacity = '';\n },\n\n /**\n * Return canvas dimensions and positions\n * @return {Object}\n */\n getCanvasPosition() {\n return this.canvas.getCanvasView().getPosition();\n },\n\n /**\n * Returns badge element\n * @return {HTMLElement}\n * @private\n */\n getBadge(opts: any = {}) {\n return this.canvas.getBadgeEl(opts.view);\n },\n\n /**\n * On frame scroll callback\n * @private\n */\n onFrameScroll() {\n this.updateTools();\n this.canvas.refreshSpots();\n },\n\n onFrameResize() {\n this.canvas.refreshSpots();\n },\n\n updateTools() {\n this.updateLocalPos();\n this.updateGlobalPos();\n },\n\n isCompSelected(comp: Component) {\n return comp && comp.get('status') === 'selected';\n },\n\n /**\n * Update tools visible on hover\n * @param {HTMLElement} el\n * @param {Object} pos\n */\n updateToolsLocal(data: any) {\n const config = this.em.getConfig();\n const { el, pos, view, component } = data || this.getElHovered();\n\n if (!el) {\n this.lastHovered = 0;\n return;\n }\n\n const isHoverEn = component.get('hoverable');\n const isNewEl = this.lastHovered !== el;\n const badgeOpts = isNewEl ? {} : { posOnly: 1 };\n const customHoverSpot = this.canvas.hasCustomSpot(CanvasSpotBuiltInTypes.Hover);\n\n if (isNewEl && isHoverEn) {\n this.lastHovered = el;\n customHoverSpot ? this.hideHighlighter(view) : this.showHighlighter(view);\n this.showElementOffset(el, pos, { view });\n }\n\n if (this.isCompSelected(component)) {\n this.hideHighlighter(view);\n !config.showOffsetsSelected && this.hideElementOffset(view);\n }\n\n const unit = 'px';\n const toolsEl = this.toggleToolsEl(1, view);\n const { style } = toolsEl;\n const frameOff = this.canvas.canvasRectOffset(el, pos);\n const topOff = frameOff.top;\n const leftOff = frameOff.left;\n\n !customHoverSpot &&\n this.updateBadge(el, pos, {\n ...badgeOpts,\n view,\n topOff,\n leftOff,\n });\n\n style.top = topOff + unit;\n style.left = leftOff + unit;\n style.width = pos.width + unit;\n style.height = pos.height + unit;\n\n this._trgToolUp('local', {\n component,\n el: toolsEl,\n top: topOff,\n left: leftOff,\n width: pos.width,\n height: pos.height,\n });\n },\n\n _upToolbar: debounce(function () {\n // @ts-ignore\n this.updateToolsGlobal({ force: 1 });\n }, 0),\n\n _trgToolUp(type: string, opts = {}) {\n this.em.trigger('canvas:tools:update', {\n type,\n ...opts,\n });\n },\n\n updateToolsGlobal(opts: any = {}) {\n const { el, pos, component } = this.getElSelected();\n\n if (!el) {\n this.toggleToolsEl(); // Hides toolbar\n this.lastSelected = 0;\n return;\n }\n\n const { canvas } = this;\n const isNewEl = this.lastSelected !== el;\n\n if (isNewEl || opts.force) {\n this.lastSelected = el;\n this.updateToolbar(component);\n }\n\n const unit = 'px';\n const toolsEl = this.toggleToolsEl(1);\n const { style } = toolsEl;\n const targetToElem = canvas.getTargetToElementFixed(el, canvas.getToolbarEl()!, { pos });\n const topOff = targetToElem.canvasOffsetTop;\n const leftOff = targetToElem.canvasOffsetLeft;\n style.top = topOff + unit;\n style.left = leftOff + unit;\n style.width = pos.width + unit;\n style.height = pos.height + unit;\n\n this.updateToolbarPos({ top: targetToElem.top, left: targetToElem.left });\n this._trgToolUp('global', {\n component,\n el: toolsEl,\n top: topOff,\n left: leftOff,\n width: pos.width,\n height: pos.height,\n });\n },\n\n /**\n * Update attached elements, eg. component toolbar\n */\n updateAttached: debounce(function () {\n // @ts-ignore\n this.updateGlobalPos();\n }, 0),\n\n onContainerChange: debounce(function () {\n // @ts-ignore\n this.em.refreshCanvas();\n }, 150),\n\n /**\n * Returns element's data info\n * @param {HTMLElement} el\n * @return {Object}\n * @private\n */\n getElementPos(el: HTMLElement) {\n return this.canvas.getCanvasView().getElementPos(el, { noScroll: true });\n },\n\n /**\n * Hide badge\n * @private\n * */\n hideBadge() {\n this.getBadge().style.display = 'none';\n },\n\n /**\n * Clean previous model from different states\n * @param {Component} model\n * @private\n */\n cleanPrevious(model: Component) {\n model &&\n model.set({\n status: '',\n state: '',\n });\n },\n\n /**\n * Returns content window\n * @private\n */\n getContentWindow() {\n return this.canvas.getWindow();\n },\n\n run(editor) {\n if (!hasWin()) return;\n // @ts-ignore\n this.editor = editor && editor.get('Editor');\n this.enable();\n },\n\n stop(ed, sender, opts = {}) {\n if (!hasWin()) return;\n const { em, editor } = this;\n this.onHovered(); // force to hide toolbar\n this.stopSelectComponent();\n !opts.preserveSelected && em.setSelected();\n this.toggleToolsEl();\n editor && editor.stopCommand('resize');\n },\n} as CommandObject;\n","import { $ } from '../../common';\nimport { CommandObject } from './CommandAbstract';\n\nexport default {\n /**\n * Start select position event\n * @param {HTMLElement} trg\n * @private\n * */\n startSelectPosition(trg: HTMLElement, doc: Document, opts: any = {}) {\n this.isPointed = false;\n const utils = this.em.Utils;\n const container = trg.ownerDocument.body;\n\n if (utils && !this.sorter)\n this.sorter = new utils.Sorter({\n // @ts-ignore\n container,\n placer: this.canvas.getPlacerEl(),\n containerSel: '*',\n itemSel: '*',\n pfx: this.ppfx,\n direction: 'a',\n document: doc,\n wmargin: 1,\n nested: 1,\n em: this.em,\n canvasRelative: 1,\n scale: () => this.em.getZoomDecimal(),\n });\n\n if (opts.onStart) this.sorter.onStart = opts.onStart;\n trg && this.sorter.startSort(trg, { container });\n },\n\n /**\n * Get frame position\n * @return {Object}\n * @private\n */\n getOffsetDim() {\n var frameOff = this.offset(this.canvas.getFrameEl());\n var canvasOff = this.offset(this.canvas.getElement());\n var top = frameOff.top - canvasOff.top;\n var left = frameOff.left - canvasOff.left;\n return { top, left };\n },\n\n /**\n * Stop select position event\n * @private\n * */\n stopSelectPosition() {\n this.posTargetCollection = null;\n this.posIndex = this.posMethod == 'after' && this.cDim.length !== 0 ? this.posIndex + 1 : this.posIndex; //Normalize\n if (this.sorter) {\n this.sorter.moved = 0;\n this.sorter.endMove();\n }\n if (this.cDim) {\n this.posIsLastEl = this.cDim.length !== 0 && this.posMethod == 'after' && this.posIndex == this.cDim.length;\n this.posTargetEl =\n this.cDim.length === 0\n ? $(this.outsideElem)\n : !this.posIsLastEl && this.cDim[this.posIndex]\n ? $(this.cDim[this.posIndex][5]).parent()\n : $(this.outsideElem);\n this.posTargetModel = this.posTargetEl.data('model');\n this.posTargetCollection = this.posTargetEl.data('model-comp');\n }\n },\n\n /**\n * Enabel select position\n * @private\n */\n enable() {\n this.startSelectPosition();\n },\n\n /**\n * Check if the pointer is near to the float component\n * @param {number} index\n * @param {string} method\n * @param {Array} dims\n * @return {Boolean}\n * @private\n * */\n nearFloat(index: number, method: string, dims: any[]) {\n var i = index || 0;\n var m = method || 'before';\n var len = dims.length;\n var isLast = len !== 0 && m == 'after' && i == len;\n if (len !== 0 && ((!isLast && !dims[i][4]) || (dims[i - 1] && !dims[i - 1][4]) || (isLast && !dims[i - 1][4])))\n return 1;\n return 0;\n },\n\n run() {\n this.enable();\n },\n\n stop() {\n this.stopSelectPosition();\n this.$wrapper.css('cursor', '');\n this.$wrapper.unbind();\n },\n} as CommandObject<{}, { [k: string]: any }>;\n","import { isUndefined } from 'underscore';\nimport { CanvasSpotBuiltInTypes } from '../../canvas/model/CanvasSpot';\nimport { $ } from '../../common';\nimport { isTextNode } from '../../utils/dom';\nimport { CommandObject } from './CommandAbstract';\n\nexport default {\n getOffsetMethod(state: string) {\n var method = state || '';\n return 'get' + method + 'OffsetViewerEl';\n },\n\n run(editor, sender, opts) {\n const { canvas } = this;\n const opt = opts || {};\n const state = opt.state || '';\n const config = editor.getConfig();\n const zoom = this.em.getZoomDecimal();\n const el = opt.el as HTMLElement | undefined;\n\n if (!config.showOffsets || !el || isTextNode(el) || (!config.showOffsetsSelected && state == 'Fixed')) {\n editor.stopCommand(`${this.id}`, opts);\n return;\n }\n\n if (canvas.hasCustomSpot(CanvasSpotBuiltInTypes.Spacing)) {\n return;\n }\n\n var pos = { ...(opt.elPos || canvas.getElementPos(el)) };\n\n if (!isUndefined(opt.top)) {\n pos.top = opt.top;\n }\n if (!isUndefined(opt.left)) {\n pos.left = opt.left;\n }\n\n var style = window.getComputedStyle(el);\n var ppfx = this.ppfx;\n var stateVar = state + 'State';\n var method = this.getOffsetMethod(state);\n // @ts-ignore\n var offsetViewer = canvas[method](opts.view);\n offsetViewer.style.opacity = '';\n\n let marginT = this['marginT' + state];\n let marginB = this['marginB' + state];\n let marginL = this['marginL' + state];\n let marginR = this['marginR' + state];\n let padT = this['padT' + state];\n let padB = this['padB' + state];\n let padL = this['padL' + state];\n let padR = this['padR' + state];\n\n if (offsetViewer.childNodes.length) {\n this[stateVar] = '1';\n marginT = offsetViewer.querySelector('[data-offset-m-t]');\n marginB = offsetViewer.querySelector('[data-offset-m-b]');\n marginL = offsetViewer.querySelector('[data-offset-m-l]');\n marginR = offsetViewer.querySelector('[data-offset-m-r]');\n padT = offsetViewer.querySelector('[data-offset-p-t]');\n padB = offsetViewer.querySelector('[data-offset-p-b]');\n padL = offsetViewer.querySelector('[data-offset-p-l]');\n padR = offsetViewer.querySelector('[data-offset-p-r]');\n }\n\n if (!this[stateVar]) {\n var stateLow = state.toLowerCase();\n var marginName = stateLow + 'margin-v';\n var paddingName = stateLow + 'padding-v';\n var marginV = $(`
`).get(0) as HTMLElement;\n var paddingV = $(`
`).get(0) as HTMLElement;\n var marginEls = ppfx + marginName + '-el';\n var paddingEls = ppfx + paddingName + '-el';\n const fullMargName = `${marginEls} ${ppfx + marginName}`;\n const fullPadName = `${paddingEls} ${ppfx + paddingName}`;\n marginT = $(`
`).get(0);\n marginB = $(`
`).get(0);\n marginL = $(`
`).get(0);\n marginR = $(`
`).get(0);\n padT = $(`
`).get(0);\n padB = $(`
`).get(0);\n padL = $(`
`).get(0);\n padR = $(`
`).get(0);\n this['marginT' + state] = marginT;\n this['marginB' + state] = marginB;\n this['marginL' + state] = marginL;\n this['marginR' + state] = marginR;\n this['padT' + state] = padT;\n this['padB' + state] = padB;\n this['padL' + state] = padL;\n this['padR' + state] = padR;\n marginV.appendChild(marginT);\n marginV.appendChild(marginB);\n marginV.appendChild(marginL);\n marginV.appendChild(marginR);\n paddingV.appendChild(padT);\n paddingV.appendChild(padB);\n paddingV.appendChild(padL);\n paddingV.appendChild(padR);\n offsetViewer.appendChild(marginV);\n offsetViewer.appendChild(paddingV);\n this[stateVar] = '1';\n }\n\n var unit = 'px';\n var marginLeftSt = parseFloat(style.marginLeft.replace(unit, '')) * zoom;\n var marginRightSt = parseFloat(style.marginRight.replace(unit, '')) * zoom;\n var marginTopSt = parseFloat(style.marginTop.replace(unit, '')) * zoom;\n var marginBottomSt = parseFloat(style.marginBottom.replace(unit, '')) * zoom;\n var mtStyle = marginT.style;\n var mbStyle = marginB.style;\n var mlStyle = marginL.style;\n var mrStyle = marginR.style;\n var ptStyle = padT.style;\n var pbStyle = padB.style;\n var plStyle = padL.style;\n var prStyle = padR.style;\n var posLeft = parseFloat(pos.left);\n var widthEl = parseFloat(style.width) * zoom + unit;\n\n // Margin style\n mtStyle.height = marginTopSt + unit;\n mtStyle.width = widthEl;\n mtStyle.top = pos.top - marginTopSt + unit;\n mtStyle.left = posLeft + unit;\n\n mbStyle.height = marginBottomSt + unit;\n mbStyle.width = widthEl;\n mbStyle.top = pos.top + pos.height + unit;\n mbStyle.left = posLeft + unit;\n\n var marginSideH = pos.height + marginTopSt + marginBottomSt + unit;\n var marginSideT = pos.top - marginTopSt + unit;\n mlStyle.height = marginSideH;\n mlStyle.width = marginLeftSt + unit;\n mlStyle.top = marginSideT;\n mlStyle.left = posLeft - marginLeftSt + unit;\n\n mrStyle.height = marginSideH;\n mrStyle.width = marginRightSt + unit;\n mrStyle.top = marginSideT;\n mrStyle.left = posLeft + pos.width + unit;\n\n // Padding style\n var padTop = parseFloat(style.paddingTop) * zoom;\n ptStyle.height = padTop + unit;\n // ptStyle.width = widthEl;\n // ptStyle.top = pos.top + unit;\n // ptStyle.left = posLeft + unit;\n\n var padBot = parseFloat(style.paddingBottom) * zoom;\n pbStyle.height = padBot + unit;\n // pbStyle.width = widthEl;\n // pbStyle.top = pos.top + pos.height - padBot + unit;\n // pbStyle.left = posLeft + unit;\n\n var padSideH = pos.height - padBot - padTop + unit;\n var padSideT = pos.top + padTop + unit;\n plStyle.height = padSideH;\n plStyle.width = parseFloat(style.paddingLeft) * zoom + unit;\n plStyle.top = padSideT;\n // plStyle.left = pos.left + unit;\n // plStyle.right = 0;\n\n var padRight = parseFloat(style.paddingRight) * zoom;\n prStyle.height = padSideH;\n prStyle.width = padRight + unit;\n prStyle.top = padSideT;\n // prStyle.left = pos.left + pos.width - padRight + unit;\n // prStyle.left = 0;\n },\n\n stop(editor, sender, opts = {}) {\n var opt = opts || {};\n var state = opt.state || '';\n var method = this.getOffsetMethod(state);\n const { view } = opts;\n const canvas = this.canvas;\n // @ts-ignore\n var offsetViewer = canvas[method](view);\n offsetViewer.style.opacity = 0;\n },\n} as CommandObject;\n","import { bindAll } from 'underscore';\nimport Frame from '../../canvas/model/Frame';\nimport Editor from '../../editor';\nimport { CommandObject } from './CommandAbstract';\nimport { isDef } from '../../utils/mixins';\n\nexport default {\n init() {\n bindAll(this, '_onFramesChange');\n },\n\n run(ed) {\n this.toggleVis(ed, true);\n },\n\n stop(ed) {\n this.toggleVis(ed, false);\n },\n\n toggleVis(ed: Editor, active = true) {\n if (!ed.Commands.isActive('preview')) {\n const cv = ed.Canvas;\n const mth = active ? 'on' : 'off';\n const canvasModel = cv.getModel();\n canvasModel[mth]('change:frames', this._onFramesChange);\n this.handleFrames(cv.getFrames(), active);\n }\n },\n\n handleFrames(frames: Frame[], active?: boolean) {\n frames.forEach((frame: Frame & { __ol?: boolean }) => {\n frame.view?.loaded && this._upFrame(frame, active);\n\n if (!frame.__ol) {\n frame.on('loaded', () => this._upFrame(frame));\n frame.__ol = true;\n }\n });\n },\n\n _onFramesChange(_: any, frames: Frame[]) {\n this.handleFrames(frames);\n },\n\n _upFrame(frame: Frame, active?: boolean) {\n const { ppfx, em, id } = this;\n const isActive = isDef(active) ? active : em.Commands.isActive(id as string);\n const method = isActive ? 'add' : 'remove';\n const cls = `${ppfx}dashed`;\n frame.view?.getBody().classList[method](cls);\n },\n} as CommandObject<\n {},\n {\n [key: string]: any;\n }\n>;\n","import Backbone from 'backbone';\nexport { default as $ } from '../utils/cash-dom';\n\ninterface NOOP {}\n\nexport type Debounced = Function & { cancel(): void };\n\nexport type SetOptions = Backbone.ModelSetOptions & { avoidStore?: boolean };\n\nexport type AddOptions = Backbone.AddOptions & { temporary?: boolean };\n\nexport type DisableOptions = { fromMove?: boolean };\n\nexport type RemoveOptions = Backbone.Silenceable;\n\nexport type EventHandler = Backbone.EventHandler;\n\nexport type ObjectHash = Backbone.ObjectHash;\n\nexport type ObjectAny = Record;\n\nexport type ObjectStrings = Record;\n\nexport type Nullable = undefined | null | false;\n\n// https://github.com/microsoft/TypeScript/issues/29729#issuecomment-1483854699\nexport type LiteralUnion = T | (U & NOOP);\n\nexport type Position = {\n x: number;\n y: number;\n};\n\nexport interface Coordinates {\n x: number;\n y: number;\n}\n\nexport interface Dimensions {\n height: number;\n width: number;\n}\n\nexport interface BoxRect extends Coordinates, Dimensions {}\n\nexport type ElementRect = {\n top: number;\n left: number;\n width: number;\n height: number;\n};\n\nexport type CombinedModelConstructorOptions<\n E,\n M extends Model = Model\n> = Backbone.ModelConstructorOptions & E;\n\nexport interface ViewOptions\n extends Backbone.ViewOptions {}\n\nexport class Model extends Backbone.Model {}\n\nexport class Collection extends Backbone.Collection {}\n\nexport class View extends Backbone.View {}\n\ninterface CollectionViewOptions {\n collection: T;\n el?: TElement | JQuery | string | undefined;\n id?: string | undefined;\n attributes?: Record | undefined;\n className?: string | undefined;\n tagName?: string | undefined;\n events?: Backbone._Result | undefined;\n}\n\nexport class CollectionView extends Backbone.View {\n collection: T;\n constructor(opts: CollectionViewOptions) {\n super(opts);\n this.collection = opts.collection;\n }\n}\n\nexport type PickMatching = { [K in keyof T as T[K] extends V ? K : never]: T[K] };\n\nexport type ExtractMethods = PickMatching;\n\nexport enum CoordinatesTypes {\n Screen = 'screen',\n World = 'world',\n}\n\nexport const DEFAULT_COORDS: Coordinates = {\n x: 0,\n y: 0,\n};\n\nexport const DEFAULT_BOXRECT: BoxRect = {\n ...DEFAULT_COORDS,\n width: 0,\n height: 0,\n};\n\nexport type PrevToNewIdMap = Record;\n","import { bindAll, isFunction, isUndefined, result } from 'underscore';\nimport { Position } from '../common';\nimport { getPointerEvent, isEscKey, off, on } from './dom';\n\ntype DraggerPosition = Position & { end?: boolean };\n\ntype PositionXY = keyof Omit;\n\ntype Guide = {\n x: number;\n y: number;\n lock?: number;\n active?: boolean;\n};\n\ninterface DraggerOptions {\n /**\n * Element on which the drag will be executed. By default, the document will be used\n */\n container?: HTMLElement;\n\n /**\n * Callback on drag start.\n * @example\n * onStart(ev, dragger) {\n * console.log('pointer start', dragger.startPointer, 'position start', dragger.startPosition);\n * }\n */\n onStart?: (ev: Event, dragger: Dragger) => void;\n\n /**\n * Callback on drag.\n * @example\n * onDrag(ev, dragger) {\n * console.log('pointer', dragger.currentPointer, 'position', dragger.position, 'delta', dragger.delta);\n * }\n */\n onDrag?: (ev: Event, dragger: Dragger) => void;\n\n /**\n * Callback on drag end.\n * @example\n * onEnd(ev, dragger) {\n * console.log('pointer', dragger.currentPointer, 'position', dragger.position, 'delta', dragger.delta);\n * }\n */\n onEnd?: (ev: Event, dragger: Dragger, opts: { cancelled: boolean }) => void;\n\n /**\n * Indicate a callback where to pass an object with new coordinates\n */\n setPosition?: (position: DraggerPosition) => void;\n\n /**\n * Indicate a callback where to get initial coordinates.\n * @example\n * getPosition: () => {\n * // ...\n * return { x: 10, y: 100 }\n * }\n */\n getPosition?: () => DraggerPosition;\n\n /**\n * Indicate a callback where to get pointer coordinates.\n */\n getPointerPosition?: (ev: Event) => DraggerPosition;\n\n /**\n * Static guides to be snapped.\n */\n guidesStatic?: () => Guide[];\n\n /**\n * Target guides that will snap to static one.\n */\n guidesTarget?: () => Guide[];\n\n /**\n * Offset before snap to guides.\n * @default 5\n */\n snapOffset?: number;\n\n /**\n * Document on which listen to pointer events.\n */\n doc?: Document;\n\n /**\n * Scale result points, can also be a function.\n * @default 1\n */\n scale?: number | (() => number);\n}\n\nconst resetPos = () => ({ x: 0, y: 0 });\n\nconst xyArr: PositionXY[] = ['x', 'y'];\n\nexport default class Dragger {\n opts: DraggerOptions;\n startPointer: DraggerPosition;\n delta: DraggerPosition;\n lastScroll: DraggerPosition;\n lastScrollDiff: DraggerPosition;\n startPosition: DraggerPosition;\n globScrollDiff: DraggerPosition;\n currentPointer: DraggerPosition;\n position: DraggerPosition;\n el?: HTMLElement;\n guidesStatic: Guide[];\n guidesTarget: Guide[];\n lockedAxis?: any;\n docs: Document[];\n trgX?: Guide;\n trgY?: Guide;\n\n /**\n * Init the dragger\n * @param {Object} opts\n */\n constructor(opts: DraggerOptions = {}) {\n this.opts = {\n snapOffset: 5,\n scale: 1,\n };\n bindAll(this, 'drag', 'stop', 'keyHandle', 'handleScroll');\n this.setOptions(opts);\n this.delta = resetPos();\n this.lastScroll = resetPos();\n this.lastScrollDiff = resetPos();\n this.startPointer = resetPos();\n this.startPosition = resetPos();\n this.globScrollDiff = resetPos();\n this.currentPointer = resetPos();\n this.position = resetPos();\n this.guidesStatic = [];\n this.guidesTarget = [];\n this.docs = [];\n return this;\n }\n\n /**\n * Update options\n * @param {Object} options\n */\n setOptions(opts: Partial = {}) {\n this.opts = {\n ...this.opts,\n ...opts,\n };\n }\n\n toggleDrag(enable?: boolean) {\n const docs = this.getDocumentEl();\n const container = this.getContainerEl();\n const win = this.getWindowEl();\n const method = enable ? 'on' : 'off';\n const methods = { on, off };\n methods[method](container, 'mousemove dragover', this.drag);\n methods[method](docs, 'mouseup dragend touchend', this.stop);\n methods[method](docs, 'keydown', this.keyHandle);\n methods[method](win, 'scroll', this.handleScroll);\n }\n\n handleScroll() {\n const { lastScroll, delta } = this;\n const actualScroll = this.getScrollInfo();\n const scrollDiff = {\n x: actualScroll.x - lastScroll!.x,\n y: actualScroll.y - lastScroll!.y,\n };\n this.move(delta.x + scrollDiff.x, delta.y + scrollDiff.y);\n this.lastScrollDiff = scrollDiff;\n }\n\n /**\n * Start dragging\n * @param {Event} e\n */\n start(ev: Event) {\n const { opts } = this;\n const { onStart } = opts;\n this.toggleDrag(true);\n this.startPointer = this.getPointerPos(ev);\n this.guidesStatic = result(opts, 'guidesStatic') || [];\n this.guidesTarget = result(opts, 'guidesTarget') || [];\n isFunction(onStart) && onStart(ev, this);\n this.startPosition = this.getStartPosition();\n this.lastScrollDiff = resetPos();\n this.globScrollDiff = resetPos();\n this.drag(ev);\n }\n\n /**\n * Drag event\n * @param {Event} event\n */\n drag(ev: Event) {\n const { opts, lastScrollDiff, globScrollDiff } = this;\n const { onDrag } = opts;\n const { startPointer } = this;\n const currentPos = this.getPointerPos(ev);\n const glDiff = {\n x: globScrollDiff.x + lastScrollDiff.x,\n y: globScrollDiff.y + lastScrollDiff.y,\n };\n this.globScrollDiff = glDiff;\n const delta = {\n x: currentPos.x - startPointer.x + glDiff.x,\n y: currentPos.y - startPointer.y + glDiff.y,\n };\n this.lastScrollDiff = resetPos();\n let { lockedAxis } = this;\n\n // @ts-ignore Lock one axis\n if (ev.shiftKey) {\n lockedAxis = !lockedAxis && this.detectAxisLock(delta.x, delta.y);\n } else {\n lockedAxis = null;\n }\n\n if (lockedAxis === 'x') {\n delta.x = startPointer.x;\n } else if (lockedAxis === 'y') {\n delta.y = startPointer.y;\n }\n\n const moveDelta = (delta: DraggerPosition) => {\n xyArr.forEach(co => (delta[co] = delta[co] * result(opts, 'scale')));\n this.delta = delta;\n this.move(delta.x, delta.y);\n isFunction(onDrag) && onDrag(ev, this);\n };\n const deltaPre = { ...delta };\n this.currentPointer = currentPos;\n this.lockedAxis = lockedAxis;\n this.lastScroll = this.getScrollInfo();\n moveDelta(delta);\n\n if (this.guidesTarget.length) {\n const { newDelta, trgX, trgY } = this.snapGuides(deltaPre);\n (trgX || trgY) && moveDelta(newDelta);\n }\n\n // @ts-ignore In case the mouse button was released outside of the window\n ev.which === 0 && this.stop(ev);\n }\n\n /**\n * Check if the delta hits some guide\n */\n snapGuides(delta: DraggerPosition) {\n const newDelta = delta;\n let { trgX, trgY } = this;\n\n this.guidesTarget.forEach(trg => {\n // Skip the guide if its locked axis already exists\n if ((trg.x && this.trgX) || (trg.y && this.trgY)) return;\n trg.active = false;\n\n this.guidesStatic.forEach(stat => {\n if ((trg.y && stat.x) || (trg.x && stat.y)) return;\n const isY = trg.y && stat.y;\n const axs = isY ? 'y' : 'x';\n const trgPoint = trg[axs];\n const statPoint = stat[axs];\n const deltaPoint = delta[axs];\n const trgGuide = isY ? trgY : trgX;\n\n if (this.isPointIn(trgPoint, statPoint)) {\n if (isUndefined(trgGuide)) {\n const trgValue = deltaPoint - (trgPoint - statPoint);\n this.setGuideLock(trg, trgValue);\n }\n }\n });\n });\n\n trgX = this.trgX;\n trgY = this.trgY;\n\n xyArr.forEach(co => {\n const axis = co.toUpperCase();\n // @ts-ignore\n let trg = this[`trg${axis}`];\n\n if (trg && !this.isPointIn(delta[co], trg.lock)) {\n this.setGuideLock(trg, null);\n trg = null;\n }\n\n if (trg && !isUndefined(trg.lock)) {\n newDelta[co] = trg.lock;\n }\n });\n\n return {\n newDelta,\n trgX: this.trgX,\n trgY: this.trgY,\n };\n }\n\n isPointIn(src: number, trg: number, { offset }: { offset?: number } = {}) {\n const ofst = offset || this.opts.snapOffset || 0;\n return (src >= trg && src <= trg + ofst) || (src <= trg && src >= trg - ofst);\n }\n\n setGuideLock(guide: Guide, value: any) {\n const axis = !isUndefined(guide.x) ? 'X' : 'Y';\n const trgName = `trg${axis}`;\n\n if (value !== null) {\n guide.active = true;\n guide.lock = value;\n // @ts-ignore\n this[trgName] = guide;\n } else {\n delete guide.active;\n delete guide.lock;\n // @ts-ignore\n delete this[trgName];\n }\n\n return guide;\n }\n\n /**\n * Stop dragging\n */\n stop(ev: Event, opts: { cancel?: boolean } = {}) {\n const { delta } = this;\n const cancelled = !!opts.cancel;\n const x = cancelled ? 0 : delta.x;\n const y = cancelled ? 0 : delta.y;\n this.toggleDrag();\n this.lockedAxis = null;\n this.move(x, y, true);\n const { onEnd } = this.opts;\n isFunction(onEnd) && onEnd(ev, this, { cancelled });\n }\n\n keyHandle(ev: Event) {\n if (isEscKey(ev as KeyboardEvent)) {\n this.stop(ev, { cancel: true });\n }\n }\n\n /**\n * Move the element\n * @param {integer} x\n * @param {integer} y\n */\n move(x: number, y: number, end?: boolean) {\n const { el, opts } = this;\n const pos = this.startPosition;\n if (!pos) return;\n const { setPosition } = opts;\n const xPos = pos.x + x;\n const yPos = pos.y + y;\n this.position = {\n x: xPos,\n y: yPos,\n end,\n };\n\n isFunction(setPosition) && setPosition(this.position);\n\n if (el) {\n el.style.left = `${xPos}px`;\n el.style.top = `${yPos}px`;\n }\n }\n\n getContainerEl() {\n const { container } = this.opts;\n return container ? [container] : this.getDocumentEl();\n }\n\n getWindowEl() {\n const cont = this.getContainerEl();\n return cont.map(item => {\n const doc = item.ownerDocument || item;\n // @ts-ignore\n return doc.defaultView || doc.parentWindow;\n });\n }\n\n /**\n * Returns documents\n */\n getDocumentEl(el?: HTMLElement): Document[] {\n const { doc } = this.opts;\n el = el || this.el;\n\n if (!this.docs.length) {\n const docs = [document];\n el && docs.push(el.ownerDocument);\n doc && docs.push(doc);\n this.docs = docs;\n }\n\n return this.docs;\n }\n\n /**\n * Get mouse coordinates\n * @param {Event} event\n * @return {Object}\n */\n getPointerPos(ev: Event) {\n const getPos = this.opts.getPointerPosition;\n const pEv = getPointerEvent(ev);\n\n return getPos\n ? getPos(ev)\n : {\n x: pEv.clientX,\n y: pEv.clientY,\n };\n }\n\n getStartPosition() {\n const { el, opts } = this;\n const getPos = opts.getPosition;\n let result = resetPos();\n\n if (isFunction(getPos)) {\n result = getPos();\n } else if (el) {\n result = {\n x: parseFloat(el.style.left),\n y: parseFloat(el.style.top),\n };\n }\n\n return result;\n }\n\n getScrollInfo() {\n const { doc } = this.opts;\n const body = doc && doc.body;\n\n return {\n y: body ? body.scrollTop : 0,\n x: body ? body.scrollLeft : 0,\n };\n }\n\n detectAxisLock(x: number, y: number) {\n const relX = x;\n const relY = y;\n const absX = Math.abs(relX);\n const absY = Math.abs(relY);\n\n // Vertical or Horizontal lock\n if (relY >= absX || relY <= -absX) {\n return 'x';\n } else if (relX > absY || relX < -absY) {\n return 'y';\n }\n }\n}\n","// @ts-nocheck\n/* Adapted for headless */\n/* MIT https://github.com/kenwheeler/cash */\n'use strict';\n\nvar doc = typeof document !== 'undefined' ? document : null,\n win = typeof window !== 'undefined' ? window : null,\n _Array$prototype = Array.prototype,\n filter = _Array$prototype.filter,\n indexOf = _Array$prototype.indexOf,\n map = _Array$prototype.map,\n push = _Array$prototype.push,\n reverse = _Array$prototype.reverse,\n slice = _Array$prototype.slice,\n splice = _Array$prototype.splice;\nvar idRe = /^#[\\w-]*$/,\n classRe = /^\\.[\\w-]*$/,\n htmlRe = /<.+>/,\n tagRe = /^\\w+$/; // @require ./variables.js\n\nfunction find(selector, context) {\n if (context === void 0) {\n context = doc;\n }\n\n return classRe.test(selector)\n ? context.getElementsByClassName(selector.slice(1))\n : tagRe.test(selector)\n ? context.getElementsByTagName(selector)\n : context.querySelectorAll(selector);\n} // @require ./find.js\n// @require ./variables.js\n\nfunction Cash(selector, context) {\n if (context === void 0) {\n context = doc;\n }\n\n if (!selector) return;\n if (selector.__cash) return selector;\n var eles = selector;\n\n if (isString(selector)) {\n if (context.__cash) context = context[0];\n eles = idRe.test(selector)\n ? context.getElementById(selector.slice(1))\n : htmlRe.test(selector)\n ? parseHTML(selector)\n : find(selector, context);\n if (!eles) return;\n } else if (isFunction(selector)) {\n return this.ready(selector); //FIXME: `fn.ready` is not included in `core`, but it's actually a core functionality\n }\n\n if (eles.nodeType || eles === win) eles = [eles];\n this.length = eles.length;\n\n for (var i = 0, l = this.length; i < l; i++) {\n this[i] = eles[i];\n }\n}\n\nfunction cash(selector, context) {\n return new Cash(selector, context);\n}\n/* PROTOTYPE */\n\nvar fn =\n (cash.fn =\n cash.prototype =\n Cash.prototype =\n {\n constructor: cash,\n __cash: true,\n length: 0,\n splice: splice, // Ensures a cash collection gets printed as array-like in Chrome\n }); // @require core/cash.js\n// @require core/variables.js\n\nfn.get = function (index) {\n if (index === undefined) return slice.call(this);\n return this[index < 0 ? index + this.length : index];\n}; // @require core/cash.js\n// @require ./get.js\n\nfn.eq = function (index) {\n return cash(this.get(index));\n}; // @require core/cash.js\n// @require ./eq.js\n\nfn.first = function () {\n return this.eq(0);\n}; // @require core/cash.js\n// @require ./eq.js\n\nfn.last = function () {\n return this.eq(-1);\n}; // @require core/cash.js\n// @require core/variables.js\n\nfn.map = function (callback) {\n return cash(\n map.call(this, function (ele, i) {\n return callback.call(ele, i, ele);\n })\n );\n}; // @require core/cash.js\n// @require core/variables.js\n\nfn.slice = function () {\n return cash(slice.apply(this, arguments));\n}; // @require ./cash.js\n\nvar camelCaseRe = /(?:^\\w|[A-Z]|\\b\\w)/g,\n camelCaseWhitespaceRe = /[\\s-_]+/g;\n\nfunction camelCase(str) {\n return str\n .replace(camelCaseRe, function (letter, index) {\n return letter[!index ? 'toLowerCase' : 'toUpperCase']();\n })\n .replace(camelCaseWhitespaceRe, '');\n}\n\ncash.camelCase = camelCase; // @require ./cash.js\n\nfunction each(arr, callback) {\n for (var i = 0, l = arr.length; i < l; i++) {\n if (callback.call(arr[i], arr[i], i, arr) === false) break;\n }\n}\n\ncash.each = each; // @require core/cash.js\n// @require core/each.js\n\nfn.each = function (callback) {\n each(this, function (ele, i) {\n return callback.call(ele, i, ele);\n });\n return this;\n}; // @require core/cash.js\n// @require collection/each.js\n\nfn.removeProp = function (prop) {\n return this.each(function (i, ele) {\n delete ele[prop];\n });\n}; // @require ./cash.js\n\nfunction extend(target) {\n if (target === void 0) {\n target = this;\n }\n\n var args = arguments,\n length = args.length;\n\n for (var i = length < 2 ? 0 : 1; i < length; i++) {\n for (var key in args[i]) {\n target[key] = args[i][key];\n }\n }\n\n return target;\n}\n\ncash.extend = fn.extend = extend; // @require ./cash.js\n\nvar guid = 1;\ncash.guid = guid; // @require ./cash.js\n\nfunction matches(ele, selector) {\n var matches =\n ele &&\n (ele.matches ||\n ele.webkitMatchesSelector ||\n ele.mozMatchesSelector ||\n ele.msMatchesSelector ||\n ele.oMatchesSelector);\n return !!matches && matches.call(ele, selector);\n}\n\ncash.matches = matches; // @require ./cash.js\n\nfunction isFunction(x) {\n return typeof x === 'function';\n}\n\ncash.isFunction = isFunction;\n\nfunction isString(x) {\n return typeof x === 'string';\n}\n\ncash.isString = isString;\n\nfunction isNumeric(x) {\n return !isNaN(parseFloat(x)) && isFinite(x);\n}\n\ncash.isNumeric = isNumeric;\nvar isArray = Array.isArray;\ncash.isArray = isArray; // @require core/cash.js\n// @require core/type_checking.js\n// @require collection/each.js\n\nfn.prop = function (prop, value) {\n if (!prop) return;\n\n if (isString(prop)) {\n if (arguments.length < 2) return this[0] && this[0][prop];\n return this.each(function (i, ele) {\n ele[prop] = value;\n });\n }\n\n for (var key in prop) {\n this.prop(key, prop[key]);\n }\n\n return this;\n}; // @require ./matches.js\n// @require ./type_checking.js\n\nfunction getCompareFunction(selector) {\n return isString(selector)\n ? function (i, ele) {\n return matches(ele, selector);\n }\n : selector.__cash\n ? function (i, ele) {\n return selector.is(ele);\n }\n : function (i, ele, selector) {\n return ele === selector;\n };\n} // @require core/cash.js\n// @require core/get_compare_function.js\n// @require core/type_checking.js\n// @require core/variables.js\n// @require collection/get.js\n\nfn.filter = function (selector) {\n if (!selector) return cash();\n var comparator = isFunction(selector) ? selector : getCompareFunction(selector);\n return cash(\n filter.call(this, function (ele, i) {\n return comparator.call(ele, i, ele, selector);\n })\n );\n}; // @require ./type_checking.js\n\nvar splitValuesRe = /\\S+/g;\n\nfunction getSplitValues(str) {\n return isString(str) ? str.match(splitValuesRe) || [] : [];\n} // @require core/cash.js\n// @require core/get_split_values.js\n// @require collection/each.js\n\nfn.hasClass = function (cls) {\n var classes = getSplitValues(cls);\n var check = false;\n\n if (classes.length) {\n this.each(function (i, ele) {\n check = ele.classList.contains(classes[0]);\n return !check;\n });\n }\n\n return check;\n}; // @require core/cash.js\n// @require core/get_split_values.js\n// @require collection/each.js\n\nfn.removeAttr = function (attr) {\n var attrs = getSplitValues(attr);\n if (!attrs.length) return this;\n return this.each(function (i, ele) {\n each(attrs, function (a) {\n ele.removeAttribute(a);\n });\n });\n}; // @require core/cash.js\n// @require core/type_checking.js\n// @require collection/each.js\n// @require ./remove_attr.js\n\nfn.attr = function (attr, value) {\n if (!attr) return;\n\n if (isString(attr)) {\n if (arguments.length < 2) {\n if (!this[0]) return;\n\n var _value = this[0].getAttribute(attr);\n\n return _value === null ? undefined : _value;\n }\n\n if (value === null) return this.removeAttr(attr);\n return this.each(function (i, ele) {\n ele.setAttribute(attr, value);\n });\n }\n\n for (var key in attr) {\n this.attr(key, attr[key]);\n }\n\n return this;\n}; // @require core/cash.js\n// @require core/each.js\n// @require core/get_split_values.js\n// @require collection/each.js\n\nfn.toggleClass = function (cls, force) {\n var classes = getSplitValues(cls),\n isForce = force !== undefined;\n if (!classes.length) return this;\n return this.each(function (i, ele) {\n each(classes, function (c) {\n if (isForce) {\n force ? ele.classList.add(c) : ele.classList.remove(c);\n } else {\n ele.classList.toggle(c);\n }\n });\n });\n}; // @require core/cash.js\n// @require ./toggle_class.js\n\nfn.addClass = function (cls) {\n return this.toggleClass(cls, true);\n}; // @require core/cash.js\n// @require ./attr.js\n// @require ./toggle_class.js\n\nfn.removeClass = function (cls) {\n return !arguments.length ? this.attr('class', '') : this.toggleClass(cls, false);\n}; // @optional ./add_class.js\n// @optional ./attr.js\n// @optional ./has_class.js\n// @optional ./prop.js\n// @optional ./remove_attr.js\n// @optional ./remove_class.js\n// @optional ./remove_prop.js\n// @optional ./toggle_class.js\n// @require ./cash.js\n\nfunction unique(arr) {\n return arr.filter(function (item, index, self) {\n return self.indexOf(item) === index;\n });\n}\n\ncash.unique = unique; // @require core/cash.js\n// @require core/unique.js\n// @require ./get.js\n\nfn.add = function (selector, context) {\n return cash(unique(this.get().concat(cash(selector, context).get())));\n}; // @require core/variables.js\n\nfunction computeStyle(ele, prop, isVariable) {\n if (ele.nodeType !== 1) return;\n var style = win.getComputedStyle(ele, null);\n return prop ? (isVariable ? style.getPropertyValue(prop) : style[prop]) : style;\n} // @require ./compute_style.js\n\nfunction computeStyleInt(ele, prop) {\n return parseInt(computeStyle(ele, prop), 10) || 0;\n}\n\nvar cssVariableRe = /^--/; // @require ./variables.js\n\nfunction isCSSVariable(prop) {\n return cssVariableRe.test(prop);\n} // @require core/camel_case.js\n// @require core/cash.js\n// @require core/each.js\n// @require core/variables.js\n// @require ./is_css_variable.js\n\nvar prefixedProps = {},\n docEl = doc && doc.createElement('div'),\n style = docEl ? docEl.style : {},\n vendorsPrefixes = ['webkit', 'moz', 'ms', 'o'];\n\nfunction getPrefixedProp(prop, isVariable) {\n if (isVariable === void 0) {\n isVariable = isCSSVariable(prop);\n }\n\n if (isVariable) return prop;\n\n if (!prefixedProps[prop]) {\n var propCC = camelCase(prop),\n propUC = '' + propCC.charAt(0).toUpperCase() + propCC.slice(1),\n props = (propCC + ' ' + vendorsPrefixes.join(propUC + ' ') + propUC).split(' ');\n each(props, function (p) {\n if (p in style) {\n prefixedProps[prop] = p;\n return false;\n }\n });\n }\n\n return prefixedProps[prop];\n}\n\ncash.prefixedProp = getPrefixedProp; // @require core/type_checking.js\n// @require ./is_css_variable.js\n\nvar numericProps = {\n animationIterationCount: true,\n columnCount: true,\n flexGrow: true,\n flexShrink: true,\n fontWeight: true,\n lineHeight: true,\n opacity: true,\n order: true,\n orphans: true,\n widows: true,\n zIndex: true,\n};\n\nfunction getSuffixedValue(prop, value, isVariable) {\n if (isVariable === void 0) {\n isVariable = isCSSVariable(prop);\n }\n\n return !isVariable && !numericProps[prop] && isNumeric(value) ? value + 'px' : value;\n} // @require core/cash.js\n// @require core/type_checking.js\n// @require collection/each.js\n// @require ./helpers/compute_style.js\n// @require ./helpers/get_prefixed_prop.js\n// @require ./helpers/get_suffixed_value.js\n// @require ./helpers/is_css_variable.js\n\nfn.css = function (prop, value) {\n if (isString(prop)) {\n var isVariable = isCSSVariable(prop);\n prop = getPrefixedProp(prop, isVariable);\n if (arguments.length < 2) return this[0] && computeStyle(this[0], prop, isVariable);\n if (!prop) return this;\n value = getSuffixedValue(prop, value, isVariable);\n return this.each(function (i, ele) {\n if (ele.nodeType !== 1) return;\n\n if (isVariable) {\n ele.style.setProperty(prop, value);\n } else {\n ele.style[prop] = value;\n }\n });\n }\n\n for (var key in prop) {\n this.css(key, prop[key]);\n }\n\n return this;\n}; // @optional ./css.js\n\nvar dataNamespace = '__cashData',\n dataAttributeRe = /^data-(.*)/; // @require core/cash.js\n// @require ./helpers/variables.js\n\ncash.hasData = function (ele) {\n return dataNamespace in ele;\n}; // @require ./variables.js\n\nfunction getDataCache(ele) {\n return (ele[dataNamespace] = ele[dataNamespace] || {});\n} // @require attributes/attr.js\n// @require ./get_data_cache.js\n\nfunction getData(ele, key) {\n var cache = getDataCache(ele);\n\n if (key) {\n if (!(key in cache)) {\n var value = ele.dataset ? ele.dataset[key] || ele.dataset[camelCase(key)] : cash(ele).attr('data-' + key);\n\n if (value !== undefined) {\n try {\n value = JSON.parse(value);\n } catch (e) {}\n\n cache[key] = value;\n }\n }\n\n return cache[key];\n }\n\n return cache;\n} // @require ./variables.js\n// @require ./get_data_cache.js\n\nfunction removeData(ele, key) {\n if (key === undefined) {\n delete ele[dataNamespace];\n } else {\n delete getDataCache(ele)[key];\n }\n} // @require ./get_data_cache.js\n\nfunction setData(ele, key, value) {\n getDataCache(ele)[key] = value;\n} // @require core/cash.js\n// @require core/type_checking.js\n// @require collection/each.js\n// @require ./helpers/get_data.js\n// @require ./helpers/set_data.js\n// @require ./helpers/variables.js\n\nfn.data = function (name, value) {\n var _this = this;\n\n if (!name) {\n if (!this[0]) return;\n each(this[0].attributes, function (attr) {\n var match = attr.name.match(dataAttributeRe);\n if (!match) return;\n\n _this.data(match[1]);\n });\n return getData(this[0]);\n }\n\n if (isString(name)) {\n if (value === undefined) return this[0] && getData(this[0], name);\n return this.each(function (i, ele) {\n return setData(ele, name, value);\n });\n }\n\n for (var key in name) {\n this.data(key, name[key]);\n }\n\n return this;\n}; // @require core/cash.js\n// @require collection/each.js\n// @require ./helpers/remove_data.js\n\nfn.removeData = function (key) {\n return this.each(function (i, ele) {\n return removeData(ele, key);\n });\n}; // @optional ./data.js\n// @optional ./remove_data.js\n// @require css/helpers/compute_style_int.js\n\nfunction getExtraSpace(ele, xAxis) {\n return (\n computeStyleInt(ele, 'border' + (xAxis ? 'Left' : 'Top') + 'Width') +\n computeStyleInt(ele, 'padding' + (xAxis ? 'Left' : 'Top')) +\n computeStyleInt(ele, 'padding' + (xAxis ? 'Right' : 'Bottom')) +\n computeStyleInt(ele, 'border' + (xAxis ? 'Right' : 'Bottom') + 'Width')\n );\n} // @require core/cash.js\n// @require core/each.js\n// @require core/variables.js\n\neach(['Width', 'Height'], function (prop) {\n fn['inner' + prop] = function () {\n if (!this[0]) return;\n if (this[0] === win) return win['inner' + prop];\n return this[0]['client' + prop];\n };\n}); // @require core/camel_case.js\n// @require core/cash.js\n// @require core/each.js\n// @require core/variables.js\n// @require css/helpers/compute_style.js\n// @require css/helpers/get_suffixed_value.js\n// @require ./helpers/get_extra_space.js\n\neach(['width', 'height'], function (prop, index) {\n fn[prop] = function (value) {\n if (!this[0]) return value === undefined ? undefined : this;\n\n if (!arguments.length) {\n if (this[0] === win) return this[0][camelCase('outer-' + prop)];\n return this[0].getBoundingClientRect()[prop] - getExtraSpace(this[0], !index);\n }\n\n value = parseInt(value, 10);\n return this.each(function (i, ele) {\n if (ele.nodeType !== 1) return;\n var boxSizing = computeStyle(ele, 'boxSizing');\n ele.style[prop] = getSuffixedValue(prop, value + (boxSizing === 'border-box' ? getExtraSpace(ele, !index) : 0));\n });\n };\n}); // @require core/cash.js\n// @require core/each.js\n// @require core/variables.js\n// @require css/helpers/compute_style_int.js\n\neach(['Width', 'Height'], function (prop, index) {\n fn['outer' + prop] = function (includeMargins) {\n if (!this[0]) return;\n if (this[0] === win) return win['outer' + prop];\n return (\n this[0]['offset' + prop] +\n (includeMargins\n ? computeStyleInt(this[0], 'margin' + (!index ? 'Left' : 'Top')) +\n computeStyleInt(this[0], 'margin' + (!index ? 'Right' : 'Bottom'))\n : 0)\n );\n };\n}); // @optional ./inner.js\n// @optional ./normal.js\n// @optional ./outer.js\n\nfunction hasNamespaces(ns1, ns2) {\n for (var i = 0, l = ns2.length; i < l; i++) {\n if (ns1.indexOf(ns2[i]) < 0) return false;\n }\n\n return true;\n} // @require core/each.js\n\nfunction removeEventListeners(cache, ele, name) {\n each(cache[name], function (_ref) {\n var namespaces = _ref[0],\n callback = _ref[1];\n ele.removeEventListener(name, callback);\n });\n delete cache[name];\n}\n\nvar eventsNamespace = '__cashEvents',\n eventsNamespacesSeparator = '.'; // @require ./variables.js\n\nfunction getEventsCache(ele) {\n return (ele[eventsNamespace] = ele[eventsNamespace] || {});\n} // @require core/guid.js\n// @require events/helpers/get_events_cache.js\n\nfunction addEvent(ele, name, namespaces, callback) {\n callback.guid = callback.guid || guid++;\n var eventCache = getEventsCache(ele);\n eventCache[name] = eventCache[name] || [];\n eventCache[name].push([namespaces, callback]);\n ele.addEventListener(name, callback);\n} // @require ./variables.js\n\nfunction parseEventName(eventName) {\n var parts = eventName.split(eventsNamespacesSeparator);\n return [parts[0], parts.slice(1).sort()]; // [name, namespaces]\n} // @require core/guid.js\n// @require ./get_events_cache.js\n// @require ./has_namespaces.js\n// @require ./parse_event_name.js\n// @require ./remove_event_listeners.js\n\nfunction removeEvent(ele, name, namespaces, callback) {\n var cache = getEventsCache(ele);\n\n if (!name) {\n if (!namespaces || !namespaces.length) {\n for (name in cache) {\n removeEventListeners(cache, ele, name);\n }\n } else {\n for (name in cache) {\n removeEvent(ele, name, namespaces, callback);\n }\n }\n } else {\n var eventCache = cache[name];\n if (!eventCache) return;\n if (callback) callback.guid = callback.guid || guid++;\n cache[name] = eventCache.filter(function (_ref2) {\n var ns = _ref2[0],\n cb = _ref2[1];\n if ((callback && cb.guid !== callback.guid) || !hasNamespaces(ns, namespaces)) return true;\n ele.removeEventListener(name, cb);\n });\n }\n} // @require core/cash.js\n// @require core/each.js\n// @require collection/each.js\n// @require ./helpers/parse_event_name.js\n// @require ./helpers/remove_event.js\n\nfn.off = function (eventFullName, callback) {\n var _this2 = this;\n\n if (eventFullName === undefined) {\n this.each(function (i, ele) {\n return removeEvent(ele);\n });\n } else {\n each(getSplitValues(eventFullName), function (eventFullName) {\n var _parseEventName = parseEventName(eventFullName),\n name = _parseEventName[0],\n namespaces = _parseEventName[1];\n\n _this2.each(function (i, ele) {\n return removeEvent(ele, name, namespaces, callback);\n });\n });\n }\n\n return this;\n}; // @require core/cash.js\n// @require core/get_split_values.js\n// @require core/guid.js\n// @require core/matches.js\n// @require core/type_checking.js\n// @require collection/each.js\n// @require ./helpers/variables.js\n// @require ./helpers/add_event.js\n// @require ./helpers/has_namespaces.js\n// @require ./helpers/parse_event_name.js\n// @require ./helpers/remove_event.js\n\nfn.on = function (eventFullName, selector, callback, _one) {\n var _this3 = this;\n\n if (!isString(eventFullName)) {\n for (var key in eventFullName) {\n this.on(key, selector, eventFullName[key]);\n }\n\n return this;\n }\n\n if (isFunction(selector)) {\n callback = selector;\n selector = false;\n }\n\n each(getSplitValues(eventFullName), function (eventFullName) {\n var _parseEventName2 = parseEventName(eventFullName),\n name = _parseEventName2[0],\n namespaces = _parseEventName2[1];\n\n _this3.each(function (i, ele) {\n var finalCallback = function finalCallback(event) {\n if (event.namespace && !hasNamespaces(namespaces, event.namespace.split(eventsNamespacesSeparator))) return;\n var thisArg = ele;\n\n if (selector) {\n var target = event.target;\n\n while (!matches(target, selector)) {\n if (target === ele) return;\n target = target.parentNode;\n if (!target) return;\n }\n\n thisArg = target;\n }\n\n event.namespace = event.namespace || '';\n var returnValue = callback.call(thisArg, event, event.data);\n\n if (_one) {\n removeEvent(ele, name, namespaces, finalCallback);\n }\n\n if (returnValue === false) {\n event.preventDefault();\n event.stopPropagation();\n }\n };\n\n finalCallback.guid = callback.guid = callback.guid || guid++;\n addEvent(ele, name, namespaces, finalCallback);\n });\n });\n return this;\n}; // @require core/cash.js\n// @require ./on.js\n\nfn.one = function (eventFullName, delegate, callback) {\n return this.on(eventFullName, delegate, callback, true);\n}; // @require core/cash.js\n// @require core/variables.js\n\nfn.ready = function (callback) {\n var finalCallback = function finalCallback() {\n return callback(cash);\n };\n\n if (doc.readyState !== 'loading') {\n setTimeout(finalCallback);\n } else {\n doc.addEventListener('DOMContentLoaded', finalCallback);\n }\n\n return this;\n}; // @require core/cash.js\n// @require core/type_checking.js\n// @require core/variables.js\n// @require collection/each.js\n// @require ./helpers/parse_event_name.js\n// @require ./helpers/variables.js\n\nfn.trigger = function (eventFullName, data) {\n var evt = eventFullName;\n\n if (isString(eventFullName)) {\n var _parseEventName3 = parseEventName(eventFullName),\n name = _parseEventName3[0],\n namespaces = _parseEventName3[1];\n\n evt = doc.createEvent('HTMLEvents');\n evt.initEvent(name, true, true);\n evt.namespace = namespaces.join(eventsNamespacesSeparator);\n }\n\n evt.data = data;\n return this.each(function (i, ele) {\n ele.dispatchEvent(evt);\n });\n}; // @optional ./off.js\n// @optional ./on.js\n// @optional ./one.js\n// @optional ./ready.js\n// @optional ./trigger.js\n// @require core/each.js\n\nfunction getValueSelectMultiple(ele) {\n var values = [];\n each(ele.options, function (option) {\n if (option.selected && !option.disabled && !option.parentNode.disabled) {\n values.push(option.value);\n }\n });\n return values;\n}\n\nfunction getValueSelectSingle(ele) {\n return ele.selectedIndex < 0 ? null : ele.options[ele.selectedIndex].value;\n} // @require ./get_value_select_single.js\n// @require ./get_value_select_multiple.js\n\nvar selectOneRe = /select-one/i,\n selectMultipleRe = /select-multiple/i;\n\nfunction getValue(ele) {\n var type = ele.type;\n if (selectOneRe.test(type)) return getValueSelectSingle(ele);\n if (selectMultipleRe.test(type)) return getValueSelectMultiple(ele);\n return ele.value;\n}\n\nvar queryEncodeSpaceRe = /%20/g;\n\nfunction queryEncode(prop, value) {\n return '&' + encodeURIComponent(prop) + '=' + encodeURIComponent(value).replace(queryEncodeSpaceRe, '+');\n} // @require core/cash.js\n// @require core/each.js\n// @require core/type_checking.js\n// @require ./helpers/get_value.js\n// @require ./helpers/query_encode.js\n\nvar skippableRe = /file|reset|submit|button|image/i,\n checkableRe = /radio|checkbox/i;\n\nfn.serialize = function () {\n var query = '';\n this.each(function (i, ele) {\n each(ele.elements || [ele], function (ele) {\n if (ele.disabled || !ele.name || ele.tagName === 'FIELDSET') return;\n if (skippableRe.test(ele.type)) return;\n if (checkableRe.test(ele.type) && !ele.checked) return;\n var value = getValue(ele);\n if (value === undefined) return;\n var values = isArray(value) ? value : [value];\n each(values, function (value) {\n query += queryEncode(ele.name, value);\n });\n });\n });\n return query.substr(1);\n}; // @require core/cash.js\n// @require core/each.js\n// @require core/type_checking.js\n// @require collection/each.js\n// @require ./helpers/get_value.js\n\nfn.val = function (value) {\n if (value === undefined) return this[0] && getValue(this[0]);\n return this.each(function (i, ele) {\n var isMultiple = selectMultipleRe.test(ele.type),\n eleValue = value === null ? (isMultiple ? [] : '') : value;\n\n if (isMultiple && isArray(eleValue)) {\n each(ele.options, function (option) {\n option.selected = eleValue.indexOf(option.value) >= 0;\n });\n } else {\n ele.value = eleValue;\n }\n });\n}; // @optional ./serialize.js\n// @optional ./val.js\n// @require core/cash.js\n// @require collection/map.js\n\nfn.clone = function () {\n return this.map(function (i, ele) {\n return ele.cloneNode(true);\n });\n}; // @require core/cash.js\n// @require collection/each.js\n\nfn.detach = function () {\n return this.each(function (i, ele) {\n if (ele.parentNode) {\n ele.parentNode.removeChild(ele);\n }\n });\n}; // @require ./cash.js\n// @require ./variables.js\n// @require ./type_checking.js\n// @require collection/get.js\n// @require manipulation/detach.js\n\nvar fragmentRe = /^\\s*<(\\w+)[^>]*>/,\n singleTagRe = /^\\s*<(\\w+)\\s*\\/?>(?:<\\/\\1>)?\\s*$/;\nvar containers;\n\nfunction initContainers() {\n if (containers) return;\n var table = doc.createElement('table'),\n tr = doc.createElement('tr');\n containers = {\n '*': doc.createElement('div'),\n tr: doc.createElement('tbody'),\n td: tr,\n th: tr,\n thead: table,\n tbody: table,\n tfoot: table,\n };\n}\n\nfunction parseHTML(html) {\n initContainers();\n if (!isString(html)) return [];\n if (singleTagRe.test(html)) return [doc.createElement(RegExp.$1)];\n var fragment = fragmentRe.test(html) && RegExp.$1,\n container = containers[fragment] || containers['*'];\n container.innerHTML = html;\n return cash(container.childNodes).detach().get();\n}\n\ncash.parseHTML = parseHTML; // @optional ./camel_case.js\n// @optional ./each.js\n// @optional ./export.js\n// @optional ./extend.js\n// @optional ./find.js\n// @optional ./get_compare_function.js\n// @optional ./get_split_values.js\n// @optional ./guid.js\n// @optional ./matches.js\n// @optional ./parse_html.js\n// @optional ./unique.js\n// @optional ./variables.js\n// @require ./cash.js\n// @require ./type_checking.js\n// @require core/cash.js\n\nfn.empty = function () {\n var ele = this[0];\n\n if (ele) {\n while (ele.firstChild) {\n ele.removeChild(ele.firstChild);\n }\n }\n\n return this;\n};\n\nfunction insertElement(ele, child, prepend) {\n if (prepend) {\n ele.insertBefore(child, ele.childNodes[0]);\n } else {\n ele.appendChild(child);\n }\n} // @require core/each.js\n// @require core/type_checking.js\n// @require ./insert_element.js\n\nfunction insertContent(parent, child, prepend) {\n if (child === undefined) return;\n var isStr = isString(child);\n\n if (!isStr && child.length) {\n each(child, function (ele) {\n return insertContent(parent, ele, prepend);\n });\n } else {\n each(\n parent,\n isStr\n ? function (ele) {\n ele.insertAdjacentHTML(prepend ? 'afterbegin' : 'beforeend', child);\n }\n : function (ele, index) {\n return insertElement(ele, !index ? child : child.cloneNode(true), prepend);\n }\n );\n }\n} // @require core/cash.js\n// @require core/each.js\n// @require ./helpers/insert_content.js\n\nfn.append = function () {\n var _this4 = this;\n\n each(arguments, function (content) {\n insertContent(_this4, content);\n });\n return this;\n}; // @require core/cash.js\n// @require ./helpers/insert_content.js\n\nfn.appendTo = function (parent) {\n insertContent(cash(parent), this);\n return this;\n}; // @require core/cash.js\n// @require collection/each.js\n\nfn.html = function (content) {\n if (content === undefined) return this[0] && this[0].innerHTML;\n var source = content.nodeType ? content[0].outerHTML : content;\n return this.each(function (i, ele) {\n ele.innerHTML = source;\n });\n}; // @require core/cash.js\n// @require collection/each.js\n\nfn.insertAfter = function (content) {\n var _this5 = this;\n\n cash(content).each(function (index, ele) {\n var parent = ele.parentNode;\n\n _this5.each(function (i, e) {\n parent.insertBefore(!index ? e : e.cloneNode(true), ele.nextSibling);\n });\n });\n return this;\n}; // @require core/cash.js\n// @require core/each.js\n// @require core/variables.js\n// @require collection/slice.js\n// @require ./insert_after.js\n\nfn.after = function () {\n var _this6 = this;\n\n each(reverse.apply(arguments), function (content) {\n reverse.apply(cash(content).slice()).insertAfter(_this6);\n });\n return this;\n}; // @require core/cash.js\n// @require collection/each.js\n\nfn.insertBefore = function (selector) {\n var _this7 = this;\n\n cash(selector).each(function (index, ele) {\n var parent = ele.parentNode;\n\n _this7.each(function (i, e) {\n parent.insertBefore(!index ? e : e.cloneNode(true), ele);\n });\n });\n return this;\n}; // @require core/cash.js\n// @require core/each.js\n// @require ./insert_before.js\n\nfn.before = function () {\n var _this8 = this;\n\n each(arguments, function (content) {\n cash(content).insertBefore(_this8);\n });\n return this;\n}; // @require core/cash.js\n// @require core/each.js\n// @require ./helpers/insert_content.js\n\nfn.prepend = function () {\n var _this9 = this;\n\n each(arguments, function (content) {\n insertContent(_this9, content, true);\n });\n return this;\n}; // @require core/cash.js\n// @require core/variables.js\n// @require collection/slice.js\n// @require ./helpers/insert_content.js\n\nfn.prependTo = function (parent) {\n insertContent(cash(parent), reverse.apply(this.slice()), true);\n return this;\n}; // @require core/cash.js\n// @require events/off.js\n// @require ./detach.js\n\nfn.remove = function () {\n return this.detach().off();\n}; // @require core/cash.js\n// @require collection/each.js\n// @require collection/slice.js\n// @require ./after.js\n// @require ./remove.js\n\nfn.replaceWith = function (content) {\n var _this10 = this;\n\n return this.each(function (i, ele) {\n var parent = ele.parentNode;\n if (!parent) return;\n var $eles = i ? cash(content).clone() : cash(content);\n\n if (!$eles[0]) {\n _this10.remove();\n\n return false;\n }\n\n parent.replaceChild($eles[0], ele);\n cash($eles[0]).after($eles.slice(1));\n });\n}; // @require core/cash.js\n// @require ./replace_with.js\n\nfn.replaceAll = function (content) {\n cash(content).replaceWith(this);\n return this;\n}; // @require core/cash.js\n// @require collection/each.js\n\nfn.text = function (content) {\n if (content === undefined) return this[0] ? this[0].textContent : '';\n return this.each(function (i, ele) {\n ele.textContent = content;\n });\n}; // @optional ./after.js\n// @optional ./append.js\n// @optional ./append_to.js\n// @optional ./before.js\n// @optional ./clone.js\n// @optional ./detach.js\n// @optional ./empty.js\n// @optional ./html.js\n// @optional ./insert_after.js\n// @optional ./insert_before.js\n// @optional ./prepend.js\n// @optional ./prepend_to.js\n// @optional ./remove.js\n// @optional ./replace_all.js\n// @optional ./replace_with.js\n// @optional ./text.js\n// @require core/cash.js\n// @require core/variables.js\n\nvar docEle = doc && doc.documentElement;\n\nfn.offset = function () {\n var ele = this[0];\n if (!ele) return;\n var rect = ele.getBoundingClientRect();\n return {\n top: rect.top + win.pageYOffset - docEle.clientTop,\n left: rect.left + win.pageXOffset - docEle.clientLeft,\n };\n}; // @require core/cash.js\n\nfn.offsetParent = function () {\n return cash(this[0] && this[0].offsetParent);\n}; // @require core/cash.js\n\nfn.position = function () {\n var ele = this[0];\n if (!ele) return;\n return {\n left: ele.offsetLeft,\n top: ele.offsetTop,\n };\n}; // @optional ./offset.js\n// @optional ./offset_parent.js\n// @optional ./position.js\n// @require core/cash.js\n// @require core/matches.js\n// @require core/unique.js\n// @require collection/each.js\n// @require collection/filter.js\n\nfn.children = function (selector) {\n var result = [];\n this.each(function (i, ele) {\n push.apply(result, ele.children);\n });\n result = cash(unique(result));\n if (!selector) return result;\n return result.filter(function (i, ele) {\n return matches(ele, selector);\n });\n}; // @require core/cash.js\n// @require core/unique.js\n// @require collection/each.js\n\nfn.contents = function () {\n var result = [];\n this.each(function (i, ele) {\n push.apply(result, ele.tagName === 'IFRAME' ? [ele.contentDocument] : ele.childNodes);\n });\n return cash(result.length && unique(result));\n}; // @require core/cash.js\n// @require core/unique.js\n// @require core/find.js\n// @require core/variables.js\n\nfn.find = function (selector) {\n var result = [];\n\n for (var i = 0, l = this.length; i < l; i++) {\n var found = find(selector, this[i]);\n\n if (found.length) {\n push.apply(result, found);\n }\n }\n\n return cash(result.length && unique(result));\n}; // @require core/cash.js\n// @require core/find.js\n// @require core/type_checking.js\n// @require collection/filter.js\n\nfn.has = function (selector) {\n var comparator = isString(selector)\n ? function (i, ele) {\n return !!find(selector, ele).length;\n }\n : function (i, ele) {\n return ele.contains(selector);\n };\n return this.filter(comparator);\n}; // @require core/cash.js\n// @require core/get_compare_function.js\n// @require collection/each.js\n\nfn.is = function (selector) {\n if (!selector || !this[0]) return false;\n var comparator = getCompareFunction(selector);\n var check = false;\n this.each(function (i, ele) {\n check = comparator(i, ele, selector);\n return !check;\n });\n return check;\n}; // @require core/cash.js\n\nfn.next = function () {\n return cash(this[0] && this[0].nextElementSibling);\n}; // @require core/cash.js\n// @require core/get_compare_function.js\n// @require collection/filter.js\n\nfn.not = function (selector) {\n if (!selector || !this[0]) return this;\n var comparator = getCompareFunction(selector);\n return this.filter(function (i, ele) {\n return !comparator(i, ele, selector);\n });\n}; // @require core/cash.js\n// @require core/unique.js\n// @require collection/each.js\n\nfn.parent = function () {\n var result = [];\n this.each(function (i, ele) {\n if (ele && ele.parentNode) {\n result.push(ele.parentNode);\n }\n });\n return cash(unique(result));\n}; // @require core/cash.js\n// @require core/variables.js\n// @require traversal/children.js\n// @require traversal/parent.js\n// @require ./get.js\n//FIXME Ugly file name, is there a better option?\n\nfn.index = function (ele) {\n var child = ele ? cash(ele)[0] : this[0],\n collection = ele ? this : cash(child).parent().children();\n return indexOf.call(collection, child);\n}; // @optional ./add.js\n// @optional ./each.js\n// @optional ./eq.js\n// @optional ./filter.js\n// @optional ./first.js\n// @optional ./get.js\n// @optional ./indexFn.js\n// @optional ./last.js\n// @optional ./map.js\n// @optional ./slice.js\n// @require core/cash.js\n// @require collection/filter.js\n// @require ./is.js\n// @require ./parent.js\n\nfn.closest = function (selector) {\n if (!selector || !this[0]) return cash();\n if (this.is(selector)) return this.filter(selector);\n return this.parent().closest(selector);\n}; // @require core/cash.js\n// @require core/matches.js\n// @require core/unique.js\n// @require core/variables.js\n// @require collection/each.js\n\nfn.parents = function (selector) {\n var result = [];\n var last;\n this.each(function (i, ele) {\n last = ele;\n\n while (last && last.parentNode && last !== doc.body.parentNode) {\n last = last.parentNode;\n\n if (!selector || (selector && matches(last, selector))) {\n result.push(last);\n }\n }\n });\n return cash(unique(result));\n}; // @require core/cash.js\n\nfn.prev = function () {\n return cash(this[0] && this[0].previousElementSibling);\n}; // @require core/cash.js\n// @require collection/filter.js\n// @require ./children.js\n// @require ./parent.js\n\nfn.siblings = function () {\n var ele = this[0];\n return this.parent()\n .children()\n .filter(function (i, child) {\n return child !== ele;\n });\n}; // @optional ./children.js\n// @optional ./closest.js\n// @optional ./contents.js\n// @optional ./find.js\n// @optional ./has.js\n// @optional ./is.js\n// @optional ./next.js\n// @optional ./not.js\n// @optional ./parent.js\n// @optional ./parents.js\n// @optional ./prev.js\n// @optional ./siblings.js\n// @optional attributes/index.js\n// @optional collection/index.js\n// @optional css/index.js\n// @optional data/index.js\n// @optional dimensions/index.js\n// @optional events/index.js\n// @optional forms/index.js\n// @optional manipulation/index.js\n// @optional offset/index.js\n// @optional traversal/index.js\n// @require core/index.js\nexport default cash as any;\n","import { each, isArray, isString, isUndefined } from 'underscore';\nimport { ObjectAny } from '../common';\n\ntype vNode = {\n tag?: string;\n attributes?: ObjectAny;\n children?: vNode[];\n};\n\ntype ChildHTML = HTMLElement | string;\n\ntype ClassNameInputType = string | number | boolean | null | undefined;\n\ntype ClassNameInput = ClassNameInputType | Array;\n\nconst KEY_TAG = 'tag';\nconst KEY_ATTR = 'attributes';\nconst KEY_CHILD = 'children';\n\nexport const motionsEv = 'transitionend oTransitionEnd transitionend webkitTransitionEnd';\n\nexport const isDoc = (el?: Node): el is Document => el?.nodeType === Node.DOCUMENT_NODE;\n\nexport const removeEl = (el?: HTMLElement) => {\n const parent = el && el.parentNode;\n parent && parent.removeChild(el);\n};\n\nexport function cx(...inputs: ClassNameInput[]): string {\n const inp = Array.isArray(inputs[0]) ? inputs[0] : [...inputs];\n return inp.filter(Boolean).join(' ');\n}\n\nexport const find = (el: HTMLElement, query: string) => el.querySelectorAll(query);\n\nexport const attrUp = (el?: HTMLElement, attrs: ObjectAny = {}) =>\n el && el.setAttribute && each(attrs, (value, key) => el.setAttribute(key, value));\n\nexport const isVisible = (el?: HTMLElement) => {\n return el && !!(el.offsetWidth || el.offsetHeight || el.getClientRects().length);\n};\n\nexport const empty = (node: HTMLElement) => {\n while (node.firstChild) node.removeChild(node.firstChild);\n};\n\nexport const replaceWith = (oldEl: HTMLElement, newEl: HTMLElement) => {\n oldEl.parentNode?.replaceChild(newEl, oldEl);\n};\n\nexport const appendAtIndex = (parent: HTMLElement | DocumentFragment, child: ChildHTML, index?: number) => {\n const { childNodes } = parent;\n const total = childNodes.length;\n const at = isUndefined(index) ? total : index;\n\n if (isString(child)) {\n // @ts-ignore\n parent.insertAdjacentHTML('beforeEnd', child);\n child = parent.lastChild as HTMLElement;\n parent.removeChild(child);\n }\n\n if (at >= total) {\n parent.appendChild(child);\n } else {\n parent.insertBefore(child, childNodes[at]);\n }\n};\n\nexport const append = (parent: HTMLElement, child: ChildHTML) => appendAtIndex(parent, child);\n\nexport const createEl = (tag: string, attrs: ObjectAny = {}, child?: ChildHTML) => {\n const el = document.createElement(tag);\n attrs && each(attrs, (value, key) => el.setAttribute(key, value));\n\n if (child) {\n if (isString(child)) el.innerHTML = child;\n else el.appendChild(child);\n }\n\n return el;\n};\n\nexport const createText = (str: string) => document.createTextNode(str);\n\n// Unfortunately just creating `KeyboardEvent(e.type, e)` is not enough,\n// the keyCode/which will be always `0`. Even if it's an old/deprecated\n// property keymaster (and many others) still use it... using `defineProperty`\n// hack seems the only way\nexport const createCustomEvent = (e: any, cls: any) => {\n let oEvent: any;\n const { type } = e;\n try {\n // @ts-ignore\n oEvent = new window[cls](type, e);\n } catch (err) {\n oEvent = document.createEvent(cls);\n oEvent.initEvent(type, true, true);\n }\n oEvent._parentEvent = e;\n if (type.indexOf('key') === 0) {\n oEvent.keyCodeVal = e.keyCode;\n ['keyCode', 'which'].forEach(prop => {\n Object.defineProperty(oEvent, prop, {\n get() {\n return this.keyCodeVal;\n },\n });\n });\n }\n return oEvent;\n};\n\n/**\n * Append an array of vNodes to an element\n * @param {HTMLElement} node HTML element\n * @param {Array} vNodes Array of node objects\n */\nexport const appendVNodes = (node: HTMLElement, vNodes: vNode | vNode[] = []) => {\n const vNodesArr = Array.isArray(vNodes) ? vNodes : [vNodes];\n vNodesArr.forEach(vnode => {\n const tag = vnode[KEY_TAG] || 'div';\n const attr = vnode[KEY_ATTR] || {};\n const el = document.createElement(tag);\n\n each(attr, (value, key) => {\n el.setAttribute(key, value);\n });\n\n node.appendChild(el);\n });\n};\n\n/**\n * Check if element is a text node\n * @param {Node} el\n * @return {Boolean}\n */\nexport const isTextNode = (el?: Node): el is Text => el?.nodeType === Node.TEXT_NODE;\n\n/**\n * Check if element is a comment node\n * @param {Node} el\n * @return {Boolean}\n */\nexport const isCommentNode = (el?: Node): el is Comment => el?.nodeType === Node.COMMENT_NODE;\n\n/**\n * Check if taggable node\n * @param {Node} el\n * @return {Boolean}\n */\nexport const isTaggableNode = (el?: Node) => el && !isTextNode(el) && !isCommentNode(el);\n\n/**\n * Get DOMRect of the element.\n * @param el\n * @returns {DOMRect}\n */\nexport const getElRect = (el?: Element) => {\n const def = {\n top: 0,\n left: 0,\n width: 0,\n height: 0,\n };\n if (!el) return def;\n let rectText;\n\n if (isTextNode(el)) {\n const range = document.createRange();\n range.selectNode(el);\n rectText = range.getBoundingClientRect();\n range.detach();\n }\n\n return rectText || (el.getBoundingClientRect ? el.getBoundingClientRect() : def);\n};\n\n/**\n * Get document scroll coordinates\n */\nexport const getDocumentScroll = (el?: HTMLElement) => {\n const doc = el?.ownerDocument || document;\n const docEl = doc.documentElement;\n const win = doc.defaultView || window;\n\n return {\n x: (win.pageXOffset || docEl.scrollLeft || 0) - (docEl.clientLeft || 0),\n y: (win.pageYOffset || docEl.scrollTop || 0) - (docEl.clientTop || 0),\n };\n};\n\nexport const getKeyCode = (ev: KeyboardEvent) => ev.which || ev.keyCode;\n\nexport const getKeyChar = (ev: KeyboardEvent) => String.fromCharCode(getKeyCode(ev));\n\nexport const getPointerEvent = (ev: any): PointerEvent => (ev.touches && ev.touches[0] ? ev.touches[0] : ev);\n\nexport const isEscKey = (ev: KeyboardEvent) => getKeyCode(ev) === 27;\n\nexport const isEnterKey = (ev: KeyboardEvent) => getKeyCode(ev) === 13;\n\nexport const hasCtrlKey = (ev: WheelEvent) => ev.ctrlKey;\n\nexport const hasModifierKey = (ev: WheelEvent) => hasCtrlKey(ev) || ev.metaKey;\n\nexport const on = (\n el: EventTarget | EventTarget[],\n ev: string,\n fn: (ev: E) => void,\n opts?: boolean | AddEventListenerOptions\n) => {\n const evs = ev.split(/\\s+/);\n const els = isArray(el) ? el : [el];\n\n evs.forEach(ev => {\n els.forEach(el => el?.addEventListener(ev, fn as EventListener, opts));\n });\n};\n\nexport const off = (\n el: EventTarget | EventTarget[],\n ev: string,\n fn: (ev: E) => void,\n opts?: boolean | AddEventListenerOptions\n) => {\n const evs = ev.split(/\\s+/);\n const els = isArray(el) ? el : [el];\n\n evs.forEach(ev => {\n els.forEach(el => el?.removeEventListener(ev, fn as EventListener, opts));\n });\n};\n","import { isArray, isElement, isFunction, isUndefined, keys } from 'underscore';\nimport ComponentView from '../dom_components/view/ComponentView';\nimport EditorModel from '../editor/model/Editor';\nimport { isTextNode } from './dom';\nimport Component from '../dom_components/model/Component';\nimport { ObjectAny } from '../common';\n\nconst obj: ObjectAny = {};\n\nexport const isBultInMethod = (key: string) => isFunction(obj[key]);\n\nexport const normalizeKey = (key: string) => (isBultInMethod(key) ? `_${key}` : key);\n\nexport const wait = (mls: number = 0) => new Promise(res => setTimeout(res, mls));\n\nexport const isDef = (value: any) => typeof value !== 'undefined';\n\nexport const hasWin = () => typeof window !== 'undefined';\n\nexport const getGlobal = () =>\n typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : global;\n\nexport const toLowerCase = (str: string) => (str || '').toLowerCase();\n\nconst elProt = hasWin() ? window.Element.prototype : {};\n// @ts-ignore\nconst matches = elProt.matches || elProt.webkitMatchesSelector || elProt.mozMatchesSelector || elProt.msMatchesSelector;\n\nexport const getUiClass = (em: EditorModel, defCls: string) => {\n const { stylePrefix, customUI } = em.getConfig();\n return [customUI && `${stylePrefix}cui`, defCls].filter(i => i).join(' ');\n};\n\n/**\n * Import styles asynchronously\n * @param {String|Array} styles\n */\nconst appendStyles = (styles: {}, opts: { unique?: boolean; prepand?: boolean } = {}) => {\n const stls = isArray(styles) ? [...styles] : [styles];\n\n if (stls.length) {\n const href = stls.shift();\n\n if (href && (!opts.unique || !document.querySelector(`link[href=\"${href}\"]`))) {\n const { head } = document;\n const link = document.createElement('link');\n link.href = href;\n link.rel = 'stylesheet';\n\n if (opts.prepand) {\n head.insertBefore(link, head.firstChild);\n } else {\n head.appendChild(link);\n }\n }\n\n appendStyles(stls);\n }\n};\n\n/**\n * Returns shallow diff between 2 objects\n * @param {Object} objOrig\n * @param {Objec} objNew\n * @return {Object}\n * @example\n * var a = {foo: 'bar', baz: 1, faz: 'sop'};\n * var b = {foo: 'bar', baz: 2, bar: ''};\n * shallowDiff(a, b);\n * // -> {baz: 2, faz: null, bar: ''};\n */\nconst shallowDiff = (objOrig: ObjectAny, objNew: ObjectAny) => {\n const result: ObjectAny = {};\n const keysNew = keys(objNew);\n\n for (let prop in objOrig) {\n if (objOrig.hasOwnProperty(prop)) {\n const origValue = objOrig[prop];\n const newValue = objNew[prop];\n\n if (keysNew.indexOf(prop) >= 0) {\n if (origValue !== newValue) {\n result[prop] = newValue;\n }\n } else {\n result[prop] = null;\n }\n }\n }\n\n for (let prop in objNew) {\n if (objNew.hasOwnProperty(prop)) {\n if (isUndefined(objOrig[prop])) {\n result[prop] = objNew[prop];\n }\n }\n }\n\n return result;\n};\n\nconst getUnitFromValue = (value: any) => {\n return value.replace(parseFloat(value), '');\n};\n\nconst upFirst = (value: string) => value[0].toUpperCase() + value.toLowerCase().slice(1);\n\nconst camelCase = (value: string) => {\n return value.replace(/-./g, x => x[1].toUpperCase());\n};\n\nconst normalizeFloat = (value: any, step = 1, valueDef = 0) => {\n let stepDecimals = 0;\n if (isNaN(value)) return valueDef;\n value = parseFloat(value);\n\n if (Math.floor(value) !== value) {\n const side = step.toString().split('.')[1];\n stepDecimals = side ? side.length : 0;\n }\n\n return stepDecimals ? parseFloat(value.toFixed(stepDecimals)) : value;\n};\n\nconst hasDnd = (em: EditorModel) => {\n return 'draggable' in document.createElement('i') && (em ? em.config.nativeDnD! : true);\n};\n\n/**\n * Ensure to fetch the element from the input argument\n * @param {HTMLElement|Component} el Component or HTML element\n * @return {HTMLElement}\n */\nconst getElement = (el: HTMLElement) => {\n if (isElement(el) || isTextNode(el)) {\n return el;\n // @ts-ignore\n } else if (el && el.getEl) {\n // @ts-ignore\n return el.getEl();\n }\n};\n\nexport const find = (arr: any[], test: (item: any, i: number, arr: any[]) => boolean) => {\n let result = null;\n arr.some((el, i) => (test(el, i, arr) ? ((result = el), 1) : 0));\n return result;\n};\n\nexport const escape = (str = '') => {\n return `${str}`\n .replace(/&/g, '&')\n .replace(//g, '>')\n .replace(/\"/g, '"')\n .replace(/'/g, ''')\n .replace(/`/g, '`');\n};\n\nexport const escapeNodeContent = (str = '') => {\n return `${str}`.replace(/&/g, '&').replace(//g, '>');\n};\n\nexport const deepMerge = (...args: ObjectAny[]) => {\n const target = { ...args[0] };\n\n for (let i = 1; i < args.length; i++) {\n const source = { ...args[i] };\n\n for (let key in source) {\n const targValue = target[key];\n const srcValue = source[key];\n\n if (isObject(targValue) && isObject(srcValue)) {\n target[key] = deepMerge(targValue, srcValue);\n } else {\n target[key] = srcValue;\n }\n }\n }\n\n return target;\n};\n\n/**\n * Ensure to fetch the model from the input argument\n * @param {HTMLElement|Component} el Component or HTML element\n * @return {Component}\n */\nconst getModel = (el: any, $?: any): Component | undefined => {\n let model;\n if (!$ && el && el.__cashData) {\n model = el.__cashData.model;\n } else if ($ && isElement(el)) {\n model = $(el).data('model');\n }\n return model;\n};\n\nconst isObject = (val: any): val is ObjectAny => val && !Array.isArray(val) && typeof val === 'object';\nconst isEmptyObj = (val: ObjectAny) => Object.keys(val).length <= 0;\n\nconst capitalize = (str: string = '') => str && str.charAt(0).toUpperCase() + str.substring(1);\nconst isRule = (obj: any) => obj && obj.toCSS;\n\nconst getViewEl = (el?: Node): T | undefined => (el as any)?.__gjsv;\n\nexport const isComponent = (obj: any): obj is Component => !!obj?.toHTML;\n\nexport const getComponentView = (el?: Node) => getViewEl(el);\n\nexport const getComponentModel = (el?: Node) => getComponentView(el)?.model;\n\nconst setViewEl = (el: any, view: any) => {\n el.__gjsv = view;\n};\n\nconst createId = (length = 16) => {\n let result = '';\n const chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';\n const len = chars.length;\n for (let i = 0; i < length; i++) {\n result += chars.charAt(Math.floor(Math.random() * len));\n }\n return result;\n};\n\nexport const buildBase64UrlFromSvg = (svg: string) => {\n if (svg && svg.substr(0, 4) === '= 0 && sizeProperty <= MAX_ARRAY_INDEX;\n }\n}\n","// Internal helper to generate a function to obtain property `key` from `obj`.\nexport default function shallowProperty(key) {\n return function(obj) {\n return obj == null ? void 0 : obj[key];\n };\n}\n","import shallowProperty from './_shallowProperty.js';\n\n// Internal helper to obtain the `byteLength` property of an object.\nexport default shallowProperty('byteLength');\n","import createSizePropertyCheck from './_createSizePropertyCheck.js';\nimport getByteLength from './_getByteLength.js';\n\n// Internal helper to determine whether we should spend extensive checks against\n// `ArrayBuffer` et al.\nexport default createSizePropertyCheck(getByteLength);\n","import { supportsArrayBuffer, nativeIsView, toString } from './_setup.js';\nimport isDataView from './isDataView.js';\nimport constant from './constant.js';\nimport isBufferLike from './_isBufferLike.js';\n\n// Is a given value a typed array?\nvar typedArrayPattern = /\\[object ((I|Ui)nt(8|16|32)|Float(32|64)|Uint8Clamped|Big(I|Ui)nt64)Array\\]/;\nfunction isTypedArray(obj) {\n // `ArrayBuffer.isView` is the most future-proof, so use it when available.\n // Otherwise, fall back on the above regular expression.\n return nativeIsView ? (nativeIsView(obj) && !isDataView(obj)) :\n isBufferLike(obj) && typedArrayPattern.test(toString.call(obj));\n}\n\nexport default supportsArrayBuffer ? isTypedArray : constant(false);\n","import shallowProperty from './_shallowProperty.js';\n\n// Internal helper to obtain the `length` property of an object.\nexport default shallowProperty('length');\n","import { nonEnumerableProps, ObjProto } from './_setup.js';\nimport isFunction from './isFunction.js';\nimport has from './_has.js';\n\n// Internal helper to create a simple lookup structure.\n// `collectNonEnumProps` used to depend on `_.contains`, but this led to\n// circular imports. `emulatedSet` is a one-off solution that only works for\n// arrays of strings.\nfunction emulatedSet(keys) {\n var hash = {};\n for (var l = keys.length, i = 0; i < l; ++i) hash[keys[i]] = true;\n return {\n contains: function(key) { return hash[key] === true; },\n push: function(key) {\n hash[key] = true;\n return keys.push(key);\n }\n };\n}\n\n// Internal helper. Checks `keys` for the presence of keys in IE < 9 that won't\n// be iterated by `for key in ...` and thus missed. Extends `keys` in place if\n// needed.\nexport default function collectNonEnumProps(obj, keys) {\n keys = emulatedSet(keys);\n var nonEnumIdx = nonEnumerableProps.length;\n var constructor = obj.constructor;\n var proto = (isFunction(constructor) && constructor.prototype) || ObjProto;\n\n // Constructor is a special case.\n var prop = 'constructor';\n if (has(obj, prop) && !keys.contains(prop)) keys.push(prop);\n\n while (nonEnumIdx--) {\n prop = nonEnumerableProps[nonEnumIdx];\n if (prop in obj && obj[prop] !== proto[prop] && !keys.contains(prop)) {\n keys.push(prop);\n }\n }\n}\n","import isObject from './isObject.js';\nimport { nativeKeys, hasEnumBug } from './_setup.js';\nimport has from './_has.js';\nimport collectNonEnumProps from './_collectNonEnumProps.js';\n\n// Retrieve the names of an object's own properties.\n// Delegates to **ECMAScript 5**'s native `Object.keys`.\nexport default function keys(obj) {\n if (!isObject(obj)) return [];\n if (nativeKeys) return nativeKeys(obj);\n var keys = [];\n for (var key in obj) if (has(obj, key)) keys.push(key);\n // Ahem, IE < 9.\n if (hasEnumBug) collectNonEnumProps(obj, keys);\n return keys;\n}\n","import getLength from './_getLength.js';\nimport isArray from './isArray.js';\nimport isString from './isString.js';\nimport isArguments from './isArguments.js';\nimport keys from './keys.js';\n\n// Is a given array, string, or object empty?\n// An \"empty\" object has no enumerable own-properties.\nexport default function isEmpty(obj) {\n if (obj == null) return true;\n // Skip the more expensive `toString`-based type checks if `obj` has no\n // `.length`.\n var length = getLength(obj);\n if (typeof length == 'number' && (\n isArray(obj) || isString(obj) || isArguments(obj)\n )) return length === 0;\n return getLength(keys(obj)) === 0;\n}\n","import keys from './keys.js';\n\n// Returns whether an object has a given set of `key:value` pairs.\nexport default function isMatch(object, attrs) {\n var _keys = keys(attrs), length = _keys.length;\n if (object == null) return !length;\n var obj = Object(object);\n for (var i = 0; i < length; i++) {\n var key = _keys[i];\n if (attrs[key] !== obj[key] || !(key in obj)) return false;\n }\n return true;\n}\n","import { VERSION } from './_setup.js';\n\n// If Underscore is called as a function, it returns a wrapped object that can\n// be used OO-style. This wrapper holds altered versions of all functions added\n// through `_.mixin`. Wrapped objects may be chained.\nexport default function _(obj) {\n if (obj instanceof _) return obj;\n if (!(this instanceof _)) return new _(obj);\n this._wrapped = obj;\n}\n\n_.VERSION = VERSION;\n\n// Extracts the result from a wrapped and chained object.\n_.prototype.value = function() {\n return this._wrapped;\n};\n\n// Provide unwrapping proxies for some methods used in engine operations\n// such as arithmetic and JSON stringification.\n_.prototype.valueOf = _.prototype.toJSON = _.prototype.value;\n\n_.prototype.toString = function() {\n return String(this._wrapped);\n};\n","import getByteLength from './_getByteLength.js';\n\n// Internal function to wrap or shallow-copy an ArrayBuffer,\n// typed array or DataView to a new view, reusing the buffer.\nexport default function toBufferView(bufferSource) {\n return new Uint8Array(\n bufferSource.buffer || bufferSource,\n bufferSource.byteOffset || 0,\n getByteLength(bufferSource)\n );\n}\n","import _ from './underscore.js';\nimport { toString, SymbolProto } from './_setup.js';\nimport getByteLength from './_getByteLength.js';\nimport isTypedArray from './isTypedArray.js';\nimport isFunction from './isFunction.js';\nimport { hasStringTagBug } from './_stringTagBug.js';\nimport isDataView from './isDataView.js';\nimport keys from './keys.js';\nimport has from './_has.js';\nimport toBufferView from './_toBufferView.js';\n\n// We use this string twice, so give it a name for minification.\nvar tagDataView = '[object DataView]';\n\n// Internal recursive comparison function for `_.isEqual`.\nfunction eq(a, b, aStack, bStack) {\n // Identical objects are equal. `0 === -0`, but they aren't identical.\n // See the [Harmony `egal` proposal](https://wiki.ecmascript.org/doku.php?id=harmony:egal).\n if (a === b) return a !== 0 || 1 / a === 1 / b;\n // `null` or `undefined` only equal to itself (strict comparison).\n if (a == null || b == null) return false;\n // `NaN`s are equivalent, but non-reflexive.\n if (a !== a) return b !== b;\n // Exhaust primitive checks\n var type = typeof a;\n if (type !== 'function' && type !== 'object' && typeof b != 'object') return false;\n return deepEq(a, b, aStack, bStack);\n}\n\n// Internal recursive comparison function for `_.isEqual`.\nfunction deepEq(a, b, aStack, bStack) {\n // Unwrap any wrapped objects.\n if (a instanceof _) a = a._wrapped;\n if (b instanceof _) b = b._wrapped;\n // Compare `[[Class]]` names.\n var className = toString.call(a);\n if (className !== toString.call(b)) return false;\n // Work around a bug in IE 10 - Edge 13.\n if (hasStringTagBug && className == '[object Object]' && isDataView(a)) {\n if (!isDataView(b)) return false;\n className = tagDataView;\n }\n switch (className) {\n // These types are compared by value.\n case '[object RegExp]':\n // RegExps are coerced to strings for comparison (Note: '' + /a/i === '/a/i')\n case '[object String]':\n // Primitives and their corresponding object wrappers are equivalent; thus, `\"5\"` is\n // equivalent to `new String(\"5\")`.\n return '' + a === '' + b;\n case '[object Number]':\n // `NaN`s are equivalent, but non-reflexive.\n // Object(NaN) is equivalent to NaN.\n if (+a !== +a) return +b !== +b;\n // An `egal` comparison is performed for other numeric values.\n return +a === 0 ? 1 / +a === 1 / b : +a === +b;\n case '[object Date]':\n case '[object Boolean]':\n // Coerce dates and booleans to numeric primitive values. Dates are compared by their\n // millisecond representations. Note that invalid dates with millisecond representations\n // of `NaN` are not equivalent.\n return +a === +b;\n case '[object Symbol]':\n return SymbolProto.valueOf.call(a) === SymbolProto.valueOf.call(b);\n case '[object ArrayBuffer]':\n case tagDataView:\n // Coerce to typed array so we can fall through.\n return deepEq(toBufferView(a), toBufferView(b), aStack, bStack);\n }\n\n var areArrays = className === '[object Array]';\n if (!areArrays && isTypedArray(a)) {\n var byteLength = getByteLength(a);\n if (byteLength !== getByteLength(b)) return false;\n if (a.buffer === b.buffer && a.byteOffset === b.byteOffset) return true;\n areArrays = true;\n }\n if (!areArrays) {\n if (typeof a != 'object' || typeof b != 'object') return false;\n\n // Objects with different constructors are not equivalent, but `Object`s or `Array`s\n // from different frames are.\n var aCtor = a.constructor, bCtor = b.constructor;\n if (aCtor !== bCtor && !(isFunction(aCtor) && aCtor instanceof aCtor &&\n isFunction(bCtor) && bCtor instanceof bCtor)\n && ('constructor' in a && 'constructor' in b)) {\n return false;\n }\n }\n // Assume equality for cyclic structures. The algorithm for detecting cyclic\n // structures is adapted from ES 5.1 section 15.12.3, abstract operation `JO`.\n\n // Initializing stack of traversed objects.\n // It's done here since we only need them for objects and arrays comparison.\n aStack = aStack || [];\n bStack = bStack || [];\n var length = aStack.length;\n while (length--) {\n // Linear search. Performance is inversely proportional to the number of\n // unique nested structures.\n if (aStack[length] === a) return bStack[length] === b;\n }\n\n // Add the first object to the stack of traversed objects.\n aStack.push(a);\n bStack.push(b);\n\n // Recursively compare objects and arrays.\n if (areArrays) {\n // Compare array lengths to determine if a deep comparison is necessary.\n length = a.length;\n if (length !== b.length) return false;\n // Deep compare the contents, ignoring non-numeric properties.\n while (length--) {\n if (!eq(a[length], b[length], aStack, bStack)) return false;\n }\n } else {\n // Deep compare objects.\n var _keys = keys(a), key;\n length = _keys.length;\n // Ensure that both objects contain the same number of properties before comparing deep equality.\n if (keys(b).length !== length) return false;\n while (length--) {\n // Deep compare each member\n key = _keys[length];\n if (!(has(b, key) && eq(a[key], b[key], aStack, bStack))) return false;\n }\n }\n // Remove the first object from the stack of traversed objects.\n aStack.pop();\n bStack.pop();\n return true;\n}\n\n// Perform a deep comparison to check if two objects are equal.\nexport default function isEqual(a, b) {\n return eq(a, b);\n}\n","import isObject from './isObject.js';\nimport { hasEnumBug } from './_setup.js';\nimport collectNonEnumProps from './_collectNonEnumProps.js';\n\n// Retrieve all the enumerable property names of an object.\nexport default function allKeys(obj) {\n if (!isObject(obj)) return [];\n var keys = [];\n for (var key in obj) keys.push(key);\n // Ahem, IE < 9.\n if (hasEnumBug) collectNonEnumProps(obj, keys);\n return keys;\n}\n","import getLength from './_getLength.js';\nimport isFunction from './isFunction.js';\nimport allKeys from './allKeys.js';\n\n// Since the regular `Object.prototype.toString` type tests don't work for\n// some types in IE 11, we use a fingerprinting heuristic instead, based\n// on the methods. It's not great, but it's the best we got.\n// The fingerprint method lists are defined below.\nexport function ie11fingerprint(methods) {\n var length = getLength(methods);\n return function(obj) {\n if (obj == null) return false;\n // `Map`, `WeakMap` and `Set` have no enumerable keys.\n var keys = allKeys(obj);\n if (getLength(keys)) return false;\n for (var i = 0; i < length; i++) {\n if (!isFunction(obj[methods[i]])) return false;\n }\n // If we are testing against `WeakMap`, we need to ensure that\n // `obj` doesn't have a `forEach` method in order to distinguish\n // it from a regular `Map`.\n return methods !== weakMapMethods || !isFunction(obj[forEachName]);\n };\n}\n\n// In the interest of compact minification, we write\n// each string in the fingerprints only once.\nvar forEachName = 'forEach',\n hasName = 'has',\n commonInit = ['clear', 'delete'],\n mapTail = ['get', hasName, 'set'];\n\n// `Map`, `WeakMap` and `Set` each have slightly different\n// combinations of the above sublists.\nexport var mapMethods = commonInit.concat(forEachName, mapTail),\n weakMapMethods = commonInit.concat(mapTail),\n setMethods = ['add'].concat(commonInit, forEachName, hasName);\n","import tagTester from './_tagTester.js';\nimport { isIE11 } from './_stringTagBug.js';\nimport { ie11fingerprint, mapMethods } from './_methodFingerprint.js';\n\nexport default isIE11 ? ie11fingerprint(mapMethods) : tagTester('Map');\n","import tagTester from './_tagTester.js';\nimport { isIE11 } from './_stringTagBug.js';\nimport { ie11fingerprint, weakMapMethods } from './_methodFingerprint.js';\n\nexport default isIE11 ? ie11fingerprint(weakMapMethods) : tagTester('WeakMap');\n","import tagTester from './_tagTester.js';\nimport { isIE11 } from './_stringTagBug.js';\nimport { ie11fingerprint, setMethods } from './_methodFingerprint.js';\n\nexport default isIE11 ? ie11fingerprint(setMethods) : tagTester('Set');\n","import tagTester from './_tagTester.js';\n\nexport default tagTester('WeakSet');\n","import keys from './keys.js';\n\n// Retrieve the values of an object's properties.\nexport default function values(obj) {\n var _keys = keys(obj);\n var length = _keys.length;\n var values = Array(length);\n for (var i = 0; i < length; i++) {\n values[i] = obj[_keys[i]];\n }\n return values;\n}\n","import keys from './keys.js';\n\n// Convert an object into a list of `[key, value]` pairs.\n// The opposite of `_.object` with one argument.\nexport default function pairs(obj) {\n var _keys = keys(obj);\n var length = _keys.length;\n var pairs = Array(length);\n for (var i = 0; i < length; i++) {\n pairs[i] = [_keys[i], obj[_keys[i]]];\n }\n return pairs;\n}\n","import keys from './keys.js';\n\n// Invert the keys and values of an object. The values must be serializable.\nexport default function invert(obj) {\n var result = {};\n var _keys = keys(obj);\n for (var i = 0, length = _keys.length; i < length; i++) {\n result[obj[_keys[i]]] = _keys[i];\n }\n return result;\n}\n","import isFunction from './isFunction.js';\n\n// Return a sorted list of the function names available on the object.\nexport default function functions(obj) {\n var names = [];\n for (var key in obj) {\n if (isFunction(obj[key])) names.push(key);\n }\n return names.sort();\n}\n","// An internal function for creating assigner functions.\nexport default function createAssigner(keysFunc, defaults) {\n return function(obj) {\n var length = arguments.length;\n if (defaults) obj = Object(obj);\n if (length < 2 || obj == null) return obj;\n for (var index = 1; index < length; index++) {\n var source = arguments[index],\n keys = keysFunc(source),\n l = keys.length;\n for (var i = 0; i < l; i++) {\n var key = keys[i];\n if (!defaults || obj[key] === void 0) obj[key] = source[key];\n }\n }\n return obj;\n };\n}\n","import createAssigner from './_createAssigner.js';\nimport allKeys from './allKeys.js';\n\n// Extend a given object with all the properties in passed-in object(s).\nexport default createAssigner(allKeys);\n","import createAssigner from './_createAssigner.js';\nimport keys from './keys.js';\n\n// Assigns a given object with all the own properties in the passed-in\n// object(s).\n// (https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object/assign)\nexport default createAssigner(keys);\n","import createAssigner from './_createAssigner.js';\nimport allKeys from './allKeys.js';\n\n// Fill in a given object with default properties.\nexport default createAssigner(allKeys, true);\n","import isObject from './isObject.js';\nimport { nativeCreate } from './_setup.js';\n\n// Create a naked function reference for surrogate-prototype-swapping.\nfunction ctor() {\n return function(){};\n}\n\n// An internal function for creating a new object that inherits from another.\nexport default function baseCreate(prototype) {\n if (!isObject(prototype)) return {};\n if (nativeCreate) return nativeCreate(prototype);\n var Ctor = ctor();\n Ctor.prototype = prototype;\n var result = new Ctor;\n Ctor.prototype = null;\n return result;\n}\n","import baseCreate from './_baseCreate.js';\nimport extendOwn from './extendOwn.js';\n\n// Creates an object that inherits from the given prototype object.\n// If additional properties are provided then they will be added to the\n// created object.\nexport default function create(prototype, props) {\n var result = baseCreate(prototype);\n if (props) extendOwn(result, props);\n return result;\n}\n","import isObject from './isObject.js';\nimport isArray from './isArray.js';\nimport extend from './extend.js';\n\n// Create a (shallow-cloned) duplicate of an object.\nexport default function clone(obj) {\n if (!isObject(obj)) return obj;\n return isArray(obj) ? obj.slice() : extend({}, obj);\n}\n","// Invokes `interceptor` with the `obj` and then returns `obj`.\n// The primary purpose of this method is to \"tap into\" a method chain, in\n// order to perform operations on intermediate results within the chain.\nexport default function tap(obj, interceptor) {\n interceptor(obj);\n return obj;\n}\n","import _ from './underscore.js';\nimport isArray from './isArray.js';\n\n// Normalize a (deep) property `path` to array.\n// Like `_.iteratee`, this function can be customized.\nexport default function toPath(path) {\n return isArray(path) ? path : [path];\n}\n_.toPath = toPath;\n","import _ from './underscore.js';\nimport './toPath.js';\n\n// Internal wrapper for `_.toPath` to enable minification.\n// Similar to `cb` for `_.iteratee`.\nexport default function toPath(path) {\n return _.toPath(path);\n}\n","// Internal function to obtain a nested property in `obj` along `path`.\nexport default function deepGet(obj, path) {\n var length = path.length;\n for (var i = 0; i < length; i++) {\n if (obj == null) return void 0;\n obj = obj[path[i]];\n }\n return length ? obj : void 0;\n}\n","import toPath from './_toPath.js';\nimport deepGet from './_deepGet.js';\nimport isUndefined from './isUndefined.js';\n\n// Get the value of the (deep) property on `path` from `object`.\n// If any property in `path` does not exist or if the value is\n// `undefined`, return `defaultValue` instead.\n// The `path` is normalized through `_.toPath`.\nexport default function get(object, path, defaultValue) {\n var value = deepGet(object, toPath(path));\n return isUndefined(value) ? defaultValue : value;\n}\n","import _has from './_has.js';\nimport toPath from './_toPath.js';\n\n// Shortcut function for checking if an object has a given property directly on\n// itself (in other words, not on a prototype). Unlike the internal `has`\n// function, this public version can also traverse nested properties.\nexport default function has(obj, path) {\n path = toPath(path);\n var length = path.length;\n for (var i = 0; i < length; i++) {\n var key = path[i];\n if (!_has(obj, key)) return false;\n obj = obj[key];\n }\n return !!length;\n}\n","// Keep the identity function around for default iteratees.\nexport default function identity(value) {\n return value;\n}\n","import extendOwn from './extendOwn.js';\nimport isMatch from './isMatch.js';\n\n// Returns a predicate for checking whether an object has a given set of\n// `key:value` pairs.\nexport default function matcher(attrs) {\n attrs = extendOwn({}, attrs);\n return function(obj) {\n return isMatch(obj, attrs);\n };\n}\n","import deepGet from './_deepGet.js';\nimport toPath from './_toPath.js';\n\n// Creates a function that, when passed an object, will traverse that object’s\n// properties down the given `path`, specified as an array of keys or indices.\nexport default function property(path) {\n path = toPath(path);\n return function(obj) {\n return deepGet(obj, path);\n };\n}\n","// Internal function that returns an efficient (for current engines) version\n// of the passed-in callback, to be repeatedly applied in other Underscore\n// functions.\nexport default function optimizeCb(func, context, argCount) {\n if (context === void 0) return func;\n switch (argCount == null ? 3 : argCount) {\n case 1: return function(value) {\n return func.call(context, value);\n };\n // The 2-argument case is omitted because we’re not using it.\n case 3: return function(value, index, collection) {\n return func.call(context, value, index, collection);\n };\n case 4: return function(accumulator, value, index, collection) {\n return func.call(context, accumulator, value, index, collection);\n };\n }\n return function() {\n return func.apply(context, arguments);\n };\n}\n","import identity from './identity.js';\nimport isFunction from './isFunction.js';\nimport isObject from './isObject.js';\nimport isArray from './isArray.js';\nimport matcher from './matcher.js';\nimport property from './property.js';\nimport optimizeCb from './_optimizeCb.js';\n\n// An internal function to generate callbacks that can be applied to each\n// element in a collection, returning the desired result — either `_.identity`,\n// an arbitrary callback, a property matcher, or a property accessor.\nexport default function baseIteratee(value, context, argCount) {\n if (value == null) return identity;\n if (isFunction(value)) return optimizeCb(value, context, argCount);\n if (isObject(value) && !isArray(value)) return matcher(value);\n return property(value);\n}\n","import _ from './underscore.js';\nimport baseIteratee from './_baseIteratee.js';\n\n// External wrapper for our callback generator. Users may customize\n// `_.iteratee` if they want additional predicate/iteratee shorthand styles.\n// This abstraction hides the internal-only `argCount` argument.\nexport default function iteratee(value, context) {\n return baseIteratee(value, context, Infinity);\n}\n_.iteratee = iteratee;\n","import _ from './underscore.js';\nimport baseIteratee from './_baseIteratee.js';\nimport iteratee from './iteratee.js';\n\n// The function we call internally to generate a callback. It invokes\n// `_.iteratee` if overridden, otherwise `baseIteratee`.\nexport default function cb(value, context, argCount) {\n if (_.iteratee !== iteratee) return _.iteratee(value, context);\n return baseIteratee(value, context, argCount);\n}\n","import cb from './_cb.js';\nimport keys from './keys.js';\n\n// Returns the results of applying the `iteratee` to each element of `obj`.\n// In contrast to `_.map` it returns an object.\nexport default function mapObject(obj, iteratee, context) {\n iteratee = cb(iteratee, context);\n var _keys = keys(obj),\n length = _keys.length,\n results = {};\n for (var index = 0; index < length; index++) {\n var currentKey = _keys[index];\n results[currentKey] = iteratee(obj[currentKey], currentKey, obj);\n }\n return results;\n}\n","// Predicate-generating function. Often useful outside of Underscore.\nexport default function noop(){}\n","import noop from './noop.js';\nimport get from './get.js';\n\n// Generates a function for a given object that returns a given property.\nexport default function propertyOf(obj) {\n if (obj == null) return noop;\n return function(path) {\n return get(obj, path);\n };\n}\n","import optimizeCb from './_optimizeCb.js';\n\n// Run a function **n** times.\nexport default function times(n, iteratee, context) {\n var accum = Array(Math.max(0, n));\n iteratee = optimizeCb(iteratee, context, 1);\n for (var i = 0; i < n; i++) accum[i] = iteratee(i);\n return accum;\n}\n","// Return a random integer between `min` and `max` (inclusive).\nexport default function random(min, max) {\n if (max == null) {\n max = min;\n min = 0;\n }\n return min + Math.floor(Math.random() * (max - min + 1));\n}\n","// A (possibly faster) way to get the current timestamp as an integer.\nexport default Date.now || function() {\n return new Date().getTime();\n};\n","import keys from './keys.js';\n\n// Internal helper to generate functions for escaping and unescaping strings\n// to/from HTML interpolation.\nexport default function createEscaper(map) {\n var escaper = function(match) {\n return map[match];\n };\n // Regexes for identifying a key that needs to be escaped.\n var source = '(?:' + keys(map).join('|') + ')';\n var testRegexp = RegExp(source);\n var replaceRegexp = RegExp(source, 'g');\n return function(string) {\n string = string == null ? '' : '' + string;\n return testRegexp.test(string) ? string.replace(replaceRegexp, escaper) : string;\n };\n}\n","// Internal list of HTML entities for escaping.\nexport default {\n '&': '&',\n '<': '<',\n '>': '>',\n '\"': '"',\n \"'\": ''',\n '`': '`'\n};\n","import createEscaper from './_createEscaper.js';\nimport escapeMap from './_escapeMap.js';\n\n// Function for escaping strings to HTML interpolation.\nexport default createEscaper(escapeMap);\n","import createEscaper from './_createEscaper.js';\nimport unescapeMap from './_unescapeMap.js';\n\n// Function for unescaping strings from HTML interpolation.\nexport default createEscaper(unescapeMap);\n","import invert from './invert.js';\nimport escapeMap from './_escapeMap.js';\n\n// Internal list of HTML entities for unescaping.\nexport default invert(escapeMap);\n","import _ from './underscore.js';\n\n// By default, Underscore uses ERB-style template delimiters. Change the\n// following template settings to use alternative delimiters.\nexport default _.templateSettings = {\n evaluate: /<%([\\s\\S]+?)%>/g,\n interpolate: /<%=([\\s\\S]+?)%>/g,\n escape: /<%-([\\s\\S]+?)%>/g\n};\n","import defaults from './defaults.js';\nimport _ from './underscore.js';\nimport './templateSettings.js';\n\n// When customizing `_.templateSettings`, if you don't want to define an\n// interpolation, evaluation or escaping regex, we need one that is\n// guaranteed not to match.\nvar noMatch = /(.)^/;\n\n// Certain characters need to be escaped so that they can be put into a\n// string literal.\nvar escapes = {\n \"'\": \"'\",\n '\\\\': '\\\\',\n '\\r': 'r',\n '\\n': 'n',\n '\\u2028': 'u2028',\n '\\u2029': 'u2029'\n};\n\nvar escapeRegExp = /\\\\|'|\\r|\\n|\\u2028|\\u2029/g;\n\nfunction escapeChar(match) {\n return '\\\\' + escapes[match];\n}\n\n// In order to prevent third-party code injection through\n// `_.templateSettings.variable`, we test it against the following regular\n// expression. It is intentionally a bit more liberal than just matching valid\n// identifiers, but still prevents possible loopholes through defaults or\n// destructuring assignment.\nvar bareIdentifier = /^\\s*(\\w|\\$)+\\s*$/;\n\n// JavaScript micro-templating, similar to John Resig's implementation.\n// Underscore templating handles arbitrary delimiters, preserves whitespace,\n// and correctly escapes quotes within interpolated code.\n// NB: `oldSettings` only exists for backwards compatibility.\nexport default function template(text, settings, oldSettings) {\n if (!settings && oldSettings) settings = oldSettings;\n settings = defaults({}, settings, _.templateSettings);\n\n // Combine delimiters into one regular expression via alternation.\n var matcher = RegExp([\n (settings.escape || noMatch).source,\n (settings.interpolate || noMatch).source,\n (settings.evaluate || noMatch).source\n ].join('|') + '|$', 'g');\n\n // Compile the template source, escaping string literals appropriately.\n var index = 0;\n var source = \"__p+='\";\n text.replace(matcher, function(match, escape, interpolate, evaluate, offset) {\n source += text.slice(index, offset).replace(escapeRegExp, escapeChar);\n index = offset + match.length;\n\n if (escape) {\n source += \"'+\\n((__t=(\" + escape + \"))==null?'':_.escape(__t))+\\n'\";\n } else if (interpolate) {\n source += \"'+\\n((__t=(\" + interpolate + \"))==null?'':__t)+\\n'\";\n } else if (evaluate) {\n source += \"';\\n\" + evaluate + \"\\n__p+='\";\n }\n\n // Adobe VMs need the match returned to produce the correct offset.\n return match;\n });\n source += \"';\\n\";\n\n var argument = settings.variable;\n if (argument) {\n // Insure against third-party code injection. (CVE-2021-23358)\n if (!bareIdentifier.test(argument)) throw new Error(\n 'variable is not a bare identifier: ' + argument\n );\n } else {\n // If a variable is not specified, place data values in local scope.\n source = 'with(obj||{}){\\n' + source + '}\\n';\n argument = 'obj';\n }\n\n source = \"var __t,__p='',__j=Array.prototype.join,\" +\n \"print=function(){__p+=__j.call(arguments,'');};\\n\" +\n source + 'return __p;\\n';\n\n var render;\n try {\n render = new Function(argument, '_', source);\n } catch (e) {\n e.source = source;\n throw e;\n }\n\n var template = function(data) {\n return render.call(this, data, _);\n };\n\n // Provide the compiled source as a convenience for precompilation.\n template.source = 'function(' + argument + '){\\n' + source + '}';\n\n return template;\n}\n","import isFunction from './isFunction.js';\nimport toPath from './_toPath.js';\n\n// Traverses the children of `obj` along `path`. If a child is a function, it\n// is invoked with its parent as context. Returns the value of the final\n// child, or `fallback` if any child is undefined.\nexport default function result(obj, path, fallback) {\n path = toPath(path);\n var length = path.length;\n if (!length) {\n return isFunction(fallback) ? fallback.call(obj) : fallback;\n }\n for (var i = 0; i < length; i++) {\n var prop = obj == null ? void 0 : obj[path[i]];\n if (prop === void 0) {\n prop = fallback;\n i = length; // Ensure we don't continue iterating.\n }\n obj = isFunction(prop) ? prop.call(obj) : prop;\n }\n return obj;\n}\n","// Generate a unique integer id (unique within the entire client session).\n// Useful for temporary DOM ids.\nvar idCounter = 0;\nexport default function uniqueId(prefix) {\n var id = ++idCounter + '';\n return prefix ? prefix + id : id;\n}\n","import _ from './underscore.js';\n\n// Start chaining a wrapped Underscore object.\nexport default function chain(obj) {\n var instance = _(obj);\n instance._chain = true;\n return instance;\n}\n","import baseCreate from './_baseCreate.js';\nimport isObject from './isObject.js';\n\n// Internal function to execute `sourceFunc` bound to `context` with optional\n// `args`. Determines whether to execute a function as a constructor or as a\n// normal function.\nexport default function executeBound(sourceFunc, boundFunc, context, callingContext, args) {\n if (!(callingContext instanceof boundFunc)) return sourceFunc.apply(context, args);\n var self = baseCreate(sourceFunc.prototype);\n var result = sourceFunc.apply(self, args);\n if (isObject(result)) return result;\n return self;\n}\n","import restArguments from './restArguments.js';\nimport executeBound from './_executeBound.js';\nimport _ from './underscore.js';\n\n// Partially apply a function by creating a version that has had some of its\n// arguments pre-filled, without changing its dynamic `this` context. `_` acts\n// as a placeholder by default, allowing any combination of arguments to be\n// pre-filled. Set `_.partial.placeholder` for a custom placeholder argument.\nvar partial = restArguments(function(func, boundArgs) {\n var placeholder = partial.placeholder;\n var bound = function() {\n var position = 0, length = boundArgs.length;\n var args = Array(length);\n for (var i = 0; i < length; i++) {\n args[i] = boundArgs[i] === placeholder ? arguments[position++] : boundArgs[i];\n }\n while (position < arguments.length) args.push(arguments[position++]);\n return executeBound(func, bound, this, this, args);\n };\n return bound;\n});\n\npartial.placeholder = _;\nexport default partial;\n","import restArguments from './restArguments.js';\nimport isFunction from './isFunction.js';\nimport executeBound from './_executeBound.js';\n\n// Create a function bound to a given object (assigning `this`, and arguments,\n// optionally).\nexport default restArguments(function(func, context, args) {\n if (!isFunction(func)) throw new TypeError('Bind must be called on a function');\n var bound = restArguments(function(callArgs) {\n return executeBound(func, bound, context, this, args.concat(callArgs));\n });\n return bound;\n});\n","import createSizePropertyCheck from './_createSizePropertyCheck.js';\nimport getLength from './_getLength.js';\n\n// Internal helper for collection methods to determine whether a collection\n// should be iterated as an array or as an object.\n// Related: https://people.mozilla.org/~jorendorff/es6-draft.html#sec-tolength\n// Avoids a very nasty iOS 8 JIT bug on ARM-64. #2094\nexport default createSizePropertyCheck(getLength);\n","import getLength from './_getLength.js';\nimport isArrayLike from './_isArrayLike.js';\nimport isArray from './isArray.js';\nimport isArguments from './isArguments.js';\n\n// Internal implementation of a recursive `flatten` function.\nexport default function flatten(input, depth, strict, output) {\n output = output || [];\n if (!depth && depth !== 0) {\n depth = Infinity;\n } else if (depth <= 0) {\n return output.concat(input);\n }\n var idx = output.length;\n for (var i = 0, length = getLength(input); i < length; i++) {\n var value = input[i];\n if (isArrayLike(value) && (isArray(value) || isArguments(value))) {\n // Flatten current level of array or arguments object.\n if (depth > 1) {\n flatten(value, depth - 1, strict, output);\n idx = output.length;\n } else {\n var j = 0, len = value.length;\n while (j < len) output[idx++] = value[j++];\n }\n } else if (!strict) {\n output[idx++] = value;\n }\n }\n return output;\n}\n","import restArguments from './restArguments.js';\nimport flatten from './_flatten.js';\nimport bind from './bind.js';\n\n// Bind a number of an object's methods to that object. Remaining arguments\n// are the method names to be bound. Useful for ensuring that all callbacks\n// defined on an object belong to it.\nexport default restArguments(function(obj, keys) {\n keys = flatten(keys, false, false);\n var index = keys.length;\n if (index < 1) throw new Error('bindAll must be passed function names');\n while (index--) {\n var key = keys[index];\n obj[key] = bind(obj[key], obj);\n }\n return obj;\n});\n","import has from './_has.js';\n\n// Memoize an expensive function by storing its results.\nexport default function memoize(func, hasher) {\n var memoize = function(key) {\n var cache = memoize.cache;\n var address = '' + (hasher ? hasher.apply(this, arguments) : key);\n if (!has(cache, address)) cache[address] = func.apply(this, arguments);\n return cache[address];\n };\n memoize.cache = {};\n return memoize;\n}\n","import restArguments from './restArguments.js';\n\n// Delays a function for the given number of milliseconds, and then calls\n// it with the arguments supplied.\nexport default restArguments(function(func, wait, args) {\n return setTimeout(function() {\n return func.apply(null, args);\n }, wait);\n});\n","import partial from './partial.js';\nimport delay from './delay.js';\nimport _ from './underscore.js';\n\n// Defers a function, scheduling it to run after the current call stack has\n// cleared.\nexport default partial(delay, _, 1);\n","import now from './now.js';\n\n// Returns a function, that, when invoked, will only be triggered at most once\n// during a given window of time. Normally, the throttled function will run\n// as much as it can, without ever going more than once per `wait` duration;\n// but if you'd like to disable the execution on the leading edge, pass\n// `{leading: false}`. To disable execution on the trailing edge, ditto.\nexport default function throttle(func, wait, options) {\n var timeout, context, args, result;\n var previous = 0;\n if (!options) options = {};\n\n var later = function() {\n previous = options.leading === false ? 0 : now();\n timeout = null;\n result = func.apply(context, args);\n if (!timeout) context = args = null;\n };\n\n var throttled = function() {\n var _now = now();\n if (!previous && options.leading === false) previous = _now;\n var remaining = wait - (_now - previous);\n context = this;\n args = arguments;\n if (remaining <= 0 || remaining > wait) {\n if (timeout) {\n clearTimeout(timeout);\n timeout = null;\n }\n previous = _now;\n result = func.apply(context, args);\n if (!timeout) context = args = null;\n } else if (!timeout && options.trailing !== false) {\n timeout = setTimeout(later, remaining);\n }\n return result;\n };\n\n throttled.cancel = function() {\n clearTimeout(timeout);\n previous = 0;\n timeout = context = args = null;\n };\n\n return throttled;\n}\n","import restArguments from './restArguments.js';\nimport now from './now.js';\n\n// When a sequence of calls of the returned function ends, the argument\n// function is triggered. The end of a sequence is defined by the `wait`\n// parameter. If `immediate` is passed, the argument function will be\n// triggered at the beginning of the sequence instead of at the end.\nexport default function debounce(func, wait, immediate) {\n var timeout, previous, args, result, context;\n\n var later = function() {\n var passed = now() - previous;\n if (wait > passed) {\n timeout = setTimeout(later, wait - passed);\n } else {\n timeout = null;\n if (!immediate) result = func.apply(context, args);\n // This check is needed because `func` can recursively invoke `debounced`.\n if (!timeout) args = context = null;\n }\n };\n\n var debounced = restArguments(function(_args) {\n context = this;\n args = _args;\n previous = now();\n if (!timeout) {\n timeout = setTimeout(later, wait);\n if (immediate) result = func.apply(context, args);\n }\n return result;\n });\n\n debounced.cancel = function() {\n clearTimeout(timeout);\n timeout = args = context = null;\n };\n\n return debounced;\n}\n","import partial from './partial.js';\n\n// Returns the first function passed as an argument to the second,\n// allowing you to adjust arguments, run code before and after, and\n// conditionally execute the original function.\nexport default function wrap(func, wrapper) {\n return partial(wrapper, func);\n}\n","// Returns a negated version of the passed-in predicate.\nexport default function negate(predicate) {\n return function() {\n return !predicate.apply(this, arguments);\n };\n}\n","// Returns a function that is the composition of a list of functions, each\n// consuming the return value of the function that follows.\nexport default function compose() {\n var args = arguments;\n var start = args.length - 1;\n return function() {\n var i = start;\n var result = args[start].apply(this, arguments);\n while (i--) result = args[i].call(this, result);\n return result;\n };\n}\n","// Returns a function that will only be executed on and after the Nth call.\nexport default function after(times, func) {\n return function() {\n if (--times < 1) {\n return func.apply(this, arguments);\n }\n };\n}\n","// Returns a function that will only be executed up to (but not including) the\n// Nth call.\nexport default function before(times, func) {\n var memo;\n return function() {\n if (--times > 0) {\n memo = func.apply(this, arguments);\n }\n if (times <= 1) func = null;\n return memo;\n };\n}\n","import partial from './partial.js';\nimport before from './before.js';\n\n// Returns a function that will be executed at most one time, no matter how\n// often you call it. Useful for lazy initialization.\nexport default partial(before, 2);\n","import cb from './_cb.js';\nimport keys from './keys.js';\n\n// Returns the first key on an object that passes a truth test.\nexport default function findKey(obj, predicate, context) {\n predicate = cb(predicate, context);\n var _keys = keys(obj), key;\n for (var i = 0, length = _keys.length; i < length; i++) {\n key = _keys[i];\n if (predicate(obj[key], key, obj)) return key;\n }\n}\n","import cb from './_cb.js';\nimport getLength from './_getLength.js';\n\n// Internal function to generate `_.findIndex` and `_.findLastIndex`.\nexport default function createPredicateIndexFinder(dir) {\n return function(array, predicate, context) {\n predicate = cb(predicate, context);\n var length = getLength(array);\n var index = dir > 0 ? 0 : length - 1;\n for (; index >= 0 && index < length; index += dir) {\n if (predicate(array[index], index, array)) return index;\n }\n return -1;\n };\n}\n","import createPredicateIndexFinder from './_createPredicateIndexFinder.js';\n\n// Returns the first index on an array-like that passes a truth test.\nexport default createPredicateIndexFinder(1);\n","import createPredicateIndexFinder from './_createPredicateIndexFinder.js';\n\n// Returns the last index on an array-like that passes a truth test.\nexport default createPredicateIndexFinder(-1);\n","import cb from './_cb.js';\nimport getLength from './_getLength.js';\n\n// Use a comparator function to figure out the smallest index at which\n// an object should be inserted so as to maintain order. Uses binary search.\nexport default function sortedIndex(array, obj, iteratee, context) {\n iteratee = cb(iteratee, context, 1);\n var value = iteratee(obj);\n var low = 0, high = getLength(array);\n while (low < high) {\n var mid = Math.floor((low + high) / 2);\n if (iteratee(array[mid]) < value) low = mid + 1; else high = mid;\n }\n return low;\n}\n","import getLength from './_getLength.js';\nimport { slice } from './_setup.js';\nimport isNaN from './isNaN.js';\n\n// Internal function to generate the `_.indexOf` and `_.lastIndexOf` functions.\nexport default function createIndexFinder(dir, predicateFind, sortedIndex) {\n return function(array, item, idx) {\n var i = 0, length = getLength(array);\n if (typeof idx == 'number') {\n if (dir > 0) {\n i = idx >= 0 ? idx : Math.max(idx + length, i);\n } else {\n length = idx >= 0 ? Math.min(idx + 1, length) : idx + length + 1;\n }\n } else if (sortedIndex && idx && length) {\n idx = sortedIndex(array, item);\n return array[idx] === item ? idx : -1;\n }\n if (item !== item) {\n idx = predicateFind(slice.call(array, i, length), isNaN);\n return idx >= 0 ? idx + i : -1;\n }\n for (idx = dir > 0 ? i : length - 1; idx >= 0 && idx < length; idx += dir) {\n if (array[idx] === item) return idx;\n }\n return -1;\n };\n}\n","import sortedIndex from './sortedIndex.js';\nimport findIndex from './findIndex.js';\nimport createIndexFinder from './_createIndexFinder.js';\n\n// Return the position of the first occurrence of an item in an array,\n// or -1 if the item is not included in the array.\n// If the array is large and already in sort order, pass `true`\n// for **isSorted** to use binary search.\nexport default createIndexFinder(1, findIndex, sortedIndex);\n","import findLastIndex from './findLastIndex.js';\nimport createIndexFinder from './_createIndexFinder.js';\n\n// Return the position of the last occurrence of an item in an array,\n// or -1 if the item is not included in the array.\nexport default createIndexFinder(-1, findLastIndex);\n","import isArrayLike from './_isArrayLike.js';\nimport findIndex from './findIndex.js';\nimport findKey from './findKey.js';\n\n// Return the first value which passes a truth test.\nexport default function find(obj, predicate, context) {\n var keyFinder = isArrayLike(obj) ? findIndex : findKey;\n var key = keyFinder(obj, predicate, context);\n if (key !== void 0 && key !== -1) return obj[key];\n}\n","import find from './find.js';\nimport matcher from './matcher.js';\n\n// Convenience version of a common use case of `_.find`: getting the first\n// object containing specific `key:value` pairs.\nexport default function findWhere(obj, attrs) {\n return find(obj, matcher(attrs));\n}\n","import optimizeCb from './_optimizeCb.js';\nimport isArrayLike from './_isArrayLike.js';\nimport keys from './keys.js';\n\n// The cornerstone for collection functions, an `each`\n// implementation, aka `forEach`.\n// Handles raw objects in addition to array-likes. Treats all\n// sparse array-likes as if they were dense.\nexport default function each(obj, iteratee, context) {\n iteratee = optimizeCb(iteratee, context);\n var i, length;\n if (isArrayLike(obj)) {\n for (i = 0, length = obj.length; i < length; i++) {\n iteratee(obj[i], i, obj);\n }\n } else {\n var _keys = keys(obj);\n for (i = 0, length = _keys.length; i < length; i++) {\n iteratee(obj[_keys[i]], _keys[i], obj);\n }\n }\n return obj;\n}\n","import cb from './_cb.js';\nimport isArrayLike from './_isArrayLike.js';\nimport keys from './keys.js';\n\n// Return the results of applying the iteratee to each element.\nexport default function map(obj, iteratee, context) {\n iteratee = cb(iteratee, context);\n var _keys = !isArrayLike(obj) && keys(obj),\n length = (_keys || obj).length,\n results = Array(length);\n for (var index = 0; index < length; index++) {\n var currentKey = _keys ? _keys[index] : index;\n results[index] = iteratee(obj[currentKey], currentKey, obj);\n }\n return results;\n}\n","import isArrayLike from './_isArrayLike.js';\nimport keys from './keys.js';\nimport optimizeCb from './_optimizeCb.js';\n\n// Internal helper to create a reducing function, iterating left or right.\nexport default function createReduce(dir) {\n // Wrap code that reassigns argument variables in a separate function than\n // the one that accesses `arguments.length` to avoid a perf hit. (#1991)\n var reducer = function(obj, iteratee, memo, initial) {\n var _keys = !isArrayLike(obj) && keys(obj),\n length = (_keys || obj).length,\n index = dir > 0 ? 0 : length - 1;\n if (!initial) {\n memo = obj[_keys ? _keys[index] : index];\n index += dir;\n }\n for (; index >= 0 && index < length; index += dir) {\n var currentKey = _keys ? _keys[index] : index;\n memo = iteratee(memo, obj[currentKey], currentKey, obj);\n }\n return memo;\n };\n\n return function(obj, iteratee, memo, context) {\n var initial = arguments.length >= 3;\n return reducer(obj, optimizeCb(iteratee, context, 4), memo, initial);\n };\n}\n","import createReduce from './_createReduce.js';\n\n// **Reduce** builds up a single result from a list of values, aka `inject`,\n// or `foldl`.\nexport default createReduce(1);\n","import createReduce from './_createReduce.js';\n\n// The right-associative version of reduce, also known as `foldr`.\nexport default createReduce(-1);\n","import cb from './_cb.js';\nimport each from './each.js';\n\n// Return all the elements that pass a truth test.\nexport default function filter(obj, predicate, context) {\n var results = [];\n predicate = cb(predicate, context);\n each(obj, function(value, index, list) {\n if (predicate(value, index, list)) results.push(value);\n });\n return results;\n}\n","import filter from './filter.js';\nimport negate from './negate.js';\nimport cb from './_cb.js';\n\n// Return all the elements for which a truth test fails.\nexport default function reject(obj, predicate, context) {\n return filter(obj, negate(cb(predicate)), context);\n}\n","import cb from './_cb.js';\nimport isArrayLike from './_isArrayLike.js';\nimport keys from './keys.js';\n\n// Determine whether all of the elements pass a truth test.\nexport default function every(obj, predicate, context) {\n predicate = cb(predicate, context);\n var _keys = !isArrayLike(obj) && keys(obj),\n length = (_keys || obj).length;\n for (var index = 0; index < length; index++) {\n var currentKey = _keys ? _keys[index] : index;\n if (!predicate(obj[currentKey], currentKey, obj)) return false;\n }\n return true;\n}\n","import cb from './_cb.js';\nimport isArrayLike from './_isArrayLike.js';\nimport keys from './keys.js';\n\n// Determine if at least one element in the object passes a truth test.\nexport default function some(obj, predicate, context) {\n predicate = cb(predicate, context);\n var _keys = !isArrayLike(obj) && keys(obj),\n length = (_keys || obj).length;\n for (var index = 0; index < length; index++) {\n var currentKey = _keys ? _keys[index] : index;\n if (predicate(obj[currentKey], currentKey, obj)) return true;\n }\n return false;\n}\n","import isArrayLike from './_isArrayLike.js';\nimport values from './values.js';\nimport indexOf from './indexOf.js';\n\n// Determine if the array or object contains a given item (using `===`).\nexport default function contains(obj, item, fromIndex, guard) {\n if (!isArrayLike(obj)) obj = values(obj);\n if (typeof fromIndex != 'number' || guard) fromIndex = 0;\n return indexOf(obj, item, fromIndex) >= 0;\n}\n","import restArguments from './restArguments.js';\nimport isFunction from './isFunction.js';\nimport map from './map.js';\nimport deepGet from './_deepGet.js';\nimport toPath from './_toPath.js';\n\n// Invoke a method (with arguments) on every item in a collection.\nexport default restArguments(function(obj, path, args) {\n var contextPath, func;\n if (isFunction(path)) {\n func = path;\n } else {\n path = toPath(path);\n contextPath = path.slice(0, -1);\n path = path[path.length - 1];\n }\n return map(obj, function(context) {\n var method = func;\n if (!method) {\n if (contextPath && contextPath.length) {\n context = deepGet(context, contextPath);\n }\n if (context == null) return void 0;\n method = context[path];\n }\n return method == null ? method : method.apply(context, args);\n });\n});\n","import map from './map.js';\nimport property from './property.js';\n\n// Convenience version of a common use case of `_.map`: fetching a property.\nexport default function pluck(obj, key) {\n return map(obj, property(key));\n}\n","import filter from './filter.js';\nimport matcher from './matcher.js';\n\n// Convenience version of a common use case of `_.filter`: selecting only\n// objects containing specific `key:value` pairs.\nexport default function where(obj, attrs) {\n return filter(obj, matcher(attrs));\n}\n","import isArrayLike from './_isArrayLike.js';\nimport values from './values.js';\nimport cb from './_cb.js';\nimport each from './each.js';\n\n// Return the maximum element (or element-based computation).\nexport default function max(obj, iteratee, context) {\n var result = -Infinity, lastComputed = -Infinity,\n value, computed;\n if (iteratee == null || (typeof iteratee == 'number' && typeof obj[0] != 'object' && obj != null)) {\n obj = isArrayLike(obj) ? obj : values(obj);\n for (var i = 0, length = obj.length; i < length; i++) {\n value = obj[i];\n if (value != null && value > result) {\n result = value;\n }\n }\n } else {\n iteratee = cb(iteratee, context);\n each(obj, function(v, index, list) {\n computed = iteratee(v, index, list);\n if (computed > lastComputed || (computed === -Infinity && result === -Infinity)) {\n result = v;\n lastComputed = computed;\n }\n });\n }\n return result;\n}\n","import isArrayLike from './_isArrayLike.js';\nimport values from './values.js';\nimport cb from './_cb.js';\nimport each from './each.js';\n\n// Return the minimum element (or element-based computation).\nexport default function min(obj, iteratee, context) {\n var result = Infinity, lastComputed = Infinity,\n value, computed;\n if (iteratee == null || (typeof iteratee == 'number' && typeof obj[0] != 'object' && obj != null)) {\n obj = isArrayLike(obj) ? obj : values(obj);\n for (var i = 0, length = obj.length; i < length; i++) {\n value = obj[i];\n if (value != null && value < result) {\n result = value;\n }\n }\n } else {\n iteratee = cb(iteratee, context);\n each(obj, function(v, index, list) {\n computed = iteratee(v, index, list);\n if (computed < lastComputed || (computed === Infinity && result === Infinity)) {\n result = v;\n lastComputed = computed;\n }\n });\n }\n return result;\n}\n","import isArray from './isArray.js';\nimport { slice } from './_setup.js';\nimport isString from './isString.js';\nimport isArrayLike from './_isArrayLike.js';\nimport map from './map.js';\nimport identity from './identity.js';\nimport values from './values.js';\n\n// Safely create a real, live array from anything iterable.\nvar reStrSymbol = /[^\\ud800-\\udfff]|[\\ud800-\\udbff][\\udc00-\\udfff]|[\\ud800-\\udfff]/g;\nexport default function toArray(obj) {\n if (!obj) return [];\n if (isArray(obj)) return slice.call(obj);\n if (isString(obj)) {\n // Keep surrogate pair characters together.\n return obj.match(reStrSymbol);\n }\n if (isArrayLike(obj)) return map(obj, identity);\n return values(obj);\n}\n","import isArrayLike from './_isArrayLike.js';\nimport values from './values.js';\nimport getLength from './_getLength.js';\nimport random from './random.js';\nimport toArray from './toArray.js';\n\n// Sample **n** random values from a collection using the modern version of the\n// [Fisher-Yates shuffle](https://en.wikipedia.org/wiki/Fisher–Yates_shuffle).\n// If **n** is not specified, returns a single random element.\n// The internal `guard` argument allows it to work with `_.map`.\nexport default function sample(obj, n, guard) {\n if (n == null || guard) {\n if (!isArrayLike(obj)) obj = values(obj);\n return obj[random(obj.length - 1)];\n }\n var sample = toArray(obj);\n var length = getLength(sample);\n n = Math.max(Math.min(n, length), 0);\n var last = length - 1;\n for (var index = 0; index < n; index++) {\n var rand = random(index, last);\n var temp = sample[index];\n sample[index] = sample[rand];\n sample[rand] = temp;\n }\n return sample.slice(0, n);\n}\n","import sample from './sample.js';\n\n// Shuffle a collection.\nexport default function shuffle(obj) {\n return sample(obj, Infinity);\n}\n","import cb from './_cb.js';\nimport pluck from './pluck.js';\nimport map from './map.js';\n\n// Sort the object's values by a criterion produced by an iteratee.\nexport default function sortBy(obj, iteratee, context) {\n var index = 0;\n iteratee = cb(iteratee, context);\n return pluck(map(obj, function(value, key, list) {\n return {\n value: value,\n index: index++,\n criteria: iteratee(value, key, list)\n };\n }).sort(function(left, right) {\n var a = left.criteria;\n var b = right.criteria;\n if (a !== b) {\n if (a > b || a === void 0) return 1;\n if (a < b || b === void 0) return -1;\n }\n return left.index - right.index;\n }), 'value');\n}\n","import cb from './_cb.js';\nimport each from './each.js';\n\n// An internal function used for aggregate \"group by\" operations.\nexport default function group(behavior, partition) {\n return function(obj, iteratee, context) {\n var result = partition ? [[], []] : {};\n iteratee = cb(iteratee, context);\n each(obj, function(value, index) {\n var key = iteratee(value, index, obj);\n behavior(result, value, key);\n });\n return result;\n };\n}\n","import group from './_group.js';\nimport has from './_has.js';\n\n// Groups the object's values by a criterion. Pass either a string attribute\n// to group by, or a function that returns the criterion.\nexport default group(function(result, value, key) {\n if (has(result, key)) result[key].push(value); else result[key] = [value];\n});\n","import group from './_group.js';\n\n// Indexes the object's values by a criterion, similar to `_.groupBy`, but for\n// when you know that your index values will be unique.\nexport default group(function(result, value, key) {\n result[key] = value;\n});\n","import group from './_group.js';\nimport has from './_has.js';\n\n// Counts instances of an object that group by a certain criterion. Pass\n// either a string attribute to count by, or a function that returns the\n// criterion.\nexport default group(function(result, value, key) {\n if (has(result, key)) result[key]++; else result[key] = 1;\n});\n","import group from './_group.js';\n\n// Split a collection into two arrays: one whose elements all pass the given\n// truth test, and one whose elements all do not pass the truth test.\nexport default group(function(result, value, pass) {\n result[pass ? 0 : 1].push(value);\n}, true);\n","import isArrayLike from './_isArrayLike.js';\nimport keys from './keys.js';\n\n// Return the number of elements in a collection.\nexport default function size(obj) {\n if (obj == null) return 0;\n return isArrayLike(obj) ? obj.length : keys(obj).length;\n}\n","// Internal `_.pick` helper function to determine whether `key` is an enumerable\n// property name of `obj`.\nexport default function keyInObj(value, key, obj) {\n return key in obj;\n}\n","import restArguments from './restArguments.js';\nimport isFunction from './isFunction.js';\nimport optimizeCb from './_optimizeCb.js';\nimport allKeys from './allKeys.js';\nimport keyInObj from './_keyInObj.js';\nimport flatten from './_flatten.js';\n\n// Return a copy of the object only containing the allowed properties.\nexport default restArguments(function(obj, keys) {\n var result = {}, iteratee = keys[0];\n if (obj == null) return result;\n if (isFunction(iteratee)) {\n if (keys.length > 1) iteratee = optimizeCb(iteratee, keys[1]);\n keys = allKeys(obj);\n } else {\n iteratee = keyInObj;\n keys = flatten(keys, false, false);\n obj = Object(obj);\n }\n for (var i = 0, length = keys.length; i < length; i++) {\n var key = keys[i];\n var value = obj[key];\n if (iteratee(value, key, obj)) result[key] = value;\n }\n return result;\n});\n","import restArguments from './restArguments.js';\nimport isFunction from './isFunction.js';\nimport negate from './negate.js';\nimport map from './map.js';\nimport flatten from './_flatten.js';\nimport contains from './contains.js';\nimport pick from './pick.js';\n\n// Return a copy of the object without the disallowed properties.\nexport default restArguments(function(obj, keys) {\n var iteratee = keys[0], context;\n if (isFunction(iteratee)) {\n iteratee = negate(iteratee);\n if (keys.length > 1) context = keys[1];\n } else {\n keys = map(flatten(keys, false, false), String);\n iteratee = function(value, key) {\n return !contains(keys, key);\n };\n }\n return pick(obj, iteratee, context);\n});\n","import { slice } from './_setup.js';\n\n// Returns everything but the last entry of the array. Especially useful on\n// the arguments object. Passing **n** will return all the values in\n// the array, excluding the last N.\nexport default function initial(array, n, guard) {\n return slice.call(array, 0, Math.max(0, array.length - (n == null || guard ? 1 : n)));\n}\n","import initial from './initial.js';\n\n// Get the first element of an array. Passing **n** will return the first N\n// values in the array. The **guard** check allows it to work with `_.map`.\nexport default function first(array, n, guard) {\n if (array == null || array.length < 1) return n == null || guard ? void 0 : [];\n if (n == null || guard) return array[0];\n return initial(array, array.length - n);\n}\n","import { slice } from './_setup.js';\n\n// Returns everything but the first entry of the `array`. Especially useful on\n// the `arguments` object. Passing an **n** will return the rest N values in the\n// `array`.\nexport default function rest(array, n, guard) {\n return slice.call(array, n == null || guard ? 1 : n);\n}\n","import rest from './rest.js';\n\n// Get the last element of an array. Passing **n** will return the last N\n// values in the array.\nexport default function last(array, n, guard) {\n if (array == null || array.length < 1) return n == null || guard ? void 0 : [];\n if (n == null || guard) return array[array.length - 1];\n return rest(array, Math.max(0, array.length - n));\n}\n","import filter from './filter.js';\n\n// Trim out all falsy values from an array.\nexport default function compact(array) {\n return filter(array, Boolean);\n}\n","import _flatten from './_flatten.js';\n\n// Flatten out an array, either recursively (by default), or up to `depth`.\n// Passing `true` or `false` as `depth` means `1` or `Infinity`, respectively.\nexport default function flatten(array, depth) {\n return _flatten(array, depth, false);\n}\n","import restArguments from './restArguments.js';\nimport flatten from './_flatten.js';\nimport filter from './filter.js';\nimport contains from './contains.js';\n\n// Take the difference between one array and a number of other arrays.\n// Only the elements present in just the first array will remain.\nexport default restArguments(function(array, rest) {\n rest = flatten(rest, true, true);\n return filter(array, function(value){\n return !contains(rest, value);\n });\n});\n","import restArguments from './restArguments.js';\nimport difference from './difference.js';\n\n// Return a version of the array that does not contain the specified value(s).\nexport default restArguments(function(array, otherArrays) {\n return difference(array, otherArrays);\n});\n","import isBoolean from './isBoolean.js';\nimport cb from './_cb.js';\nimport getLength from './_getLength.js';\nimport contains from './contains.js';\n\n// Produce a duplicate-free version of the array. If the array has already\n// been sorted, you have the option of using a faster algorithm.\n// The faster algorithm will not work with an iteratee if the iteratee\n// is not a one-to-one function, so providing an iteratee will disable\n// the faster algorithm.\nexport default function uniq(array, isSorted, iteratee, context) {\n if (!isBoolean(isSorted)) {\n context = iteratee;\n iteratee = isSorted;\n isSorted = false;\n }\n if (iteratee != null) iteratee = cb(iteratee, context);\n var result = [];\n var seen = [];\n for (var i = 0, length = getLength(array); i < length; i++) {\n var value = array[i],\n computed = iteratee ? iteratee(value, i, array) : value;\n if (isSorted && !iteratee) {\n if (!i || seen !== computed) result.push(value);\n seen = computed;\n } else if (iteratee) {\n if (!contains(seen, computed)) {\n seen.push(computed);\n result.push(value);\n }\n } else if (!contains(result, value)) {\n result.push(value);\n }\n }\n return result;\n}\n","import restArguments from './restArguments.js';\nimport uniq from './uniq.js';\nimport flatten from './_flatten.js';\n\n// Produce an array that contains the union: each distinct element from all of\n// the passed-in arrays.\nexport default restArguments(function(arrays) {\n return uniq(flatten(arrays, true, true));\n});\n","import getLength from './_getLength.js';\nimport contains from './contains.js';\n\n// Produce an array that contains every item shared between all the\n// passed-in arrays.\nexport default function intersection(array) {\n var result = [];\n var argsLength = arguments.length;\n for (var i = 0, length = getLength(array); i < length; i++) {\n var item = array[i];\n if (contains(result, item)) continue;\n var j;\n for (j = 1; j < argsLength; j++) {\n if (!contains(arguments[j], item)) break;\n }\n if (j === argsLength) result.push(item);\n }\n return result;\n}\n","import max from './max.js';\nimport getLength from './_getLength.js';\nimport pluck from './pluck.js';\n\n// Complement of zip. Unzip accepts an array of arrays and groups\n// each array's elements on shared indices.\nexport default function unzip(array) {\n var length = (array && max(array, getLength).length) || 0;\n var result = Array(length);\n\n for (var index = 0; index < length; index++) {\n result[index] = pluck(array, index);\n }\n return result;\n}\n","import restArguments from './restArguments.js';\nimport unzip from './unzip.js';\n\n// Zip together multiple lists into a single array -- elements that share\n// an index go together.\nexport default restArguments(unzip);\n","import getLength from './_getLength.js';\n\n// Converts lists into objects. Pass either a single array of `[key, value]`\n// pairs, or two parallel arrays of the same length -- one of keys, and one of\n// the corresponding values. Passing by pairs is the reverse of `_.pairs`.\nexport default function object(list, values) {\n var result = {};\n for (var i = 0, length = getLength(list); i < length; i++) {\n if (values) {\n result[list[i]] = values[i];\n } else {\n result[list[i][0]] = list[i][1];\n }\n }\n return result;\n}\n","// Generate an integer Array containing an arithmetic progression. A port of\n// the native Python `range()` function. See\n// [the Python documentation](https://docs.python.org/library/functions.html#range).\nexport default function range(start, stop, step) {\n if (stop == null) {\n stop = start || 0;\n start = 0;\n }\n if (!step) {\n step = stop < start ? -1 : 1;\n }\n\n var length = Math.max(Math.ceil((stop - start) / step), 0);\n var range = Array(length);\n\n for (var idx = 0; idx < length; idx++, start += step) {\n range[idx] = start;\n }\n\n return range;\n}\n","import { slice } from './_setup.js';\n\n// Chunk a single array into multiple arrays, each containing `count` or fewer\n// items.\nexport default function chunk(array, count) {\n if (count == null || count < 1) return [];\n var result = [];\n var i = 0, length = array.length;\n while (i < length) {\n result.push(slice.call(array, i, i += count));\n }\n return result;\n}\n","import _ from './underscore.js';\n\n// Helper function to continue chaining intermediate results.\nexport default function chainResult(instance, obj) {\n return instance._chain ? _(obj).chain() : obj;\n}\n","import _ from './underscore.js';\nimport each from './each.js';\nimport functions from './functions.js';\nimport { push } from './_setup.js';\nimport chainResult from './_chainResult.js';\n\n// Add your own custom functions to the Underscore object.\nexport default function mixin(obj) {\n each(functions(obj), function(name) {\n var func = _[name] = obj[name];\n _.prototype[name] = function() {\n var args = [this._wrapped];\n push.apply(args, arguments);\n return chainResult(this, func.apply(_, args));\n };\n });\n return _;\n}\n","import _ from './underscore.js';\nimport each from './each.js';\nimport { ArrayProto } from './_setup.js';\nimport chainResult from './_chainResult.js';\n\n// Add all mutator `Array` functions to the wrapper.\neach(['pop', 'push', 'reverse', 'shift', 'sort', 'splice', 'unshift'], function(name) {\n var method = ArrayProto[name];\n _.prototype[name] = function() {\n var obj = this._wrapped;\n if (obj != null) {\n method.apply(obj, arguments);\n if ((name === 'shift' || name === 'splice') && obj.length === 0) {\n delete obj[0];\n }\n }\n return chainResult(this, obj);\n };\n});\n\n// Add all accessor `Array` functions to the wrapper.\neach(['concat', 'join', 'slice'], function(name) {\n var method = ArrayProto[name];\n _.prototype[name] = function() {\n var obj = this._wrapped;\n if (obj != null) obj = method.apply(obj, arguments);\n return chainResult(this, obj);\n };\n});\n\nexport default _;\n","// Default Export\n// ==============\n// In this module, we mix our bundled exports into the `_` object and export\n// the result. This is analogous to setting `module.exports = _` in CommonJS.\n// Hence, this module is also the entry point of our UMD bundle and the package\n// entry point for CommonJS and AMD users. In other words, this is (the source\n// of) the module you are interfacing with when you do any of the following:\n//\n// ```js\n// // CommonJS\n// var _ = require('underscore');\n//\n// // AMD\n// define(['underscore'], function(_) {...});\n//\n// // UMD in the browser\n// // _ is available as a global variable\n// ```\nimport * as allExports from './index.js';\nimport { mixin } from './index.js';\n\n// Add all of the Underscore functions to the wrapper object.\nvar _ = mixin(allExports);\n// Legacy Node.js API.\n_._ = _;\n// Export the Underscore API.\nexport default _;\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","import { escape } from './mixins';\n\n/**\n * Safe ES6 tagged template strings\n * @param {Array} literals\n * @param {Array} substs\n * @returns {String}\n * @example\n * const str = 'Hello';\n * const strHtml = html`Escaped ${str}, unescaped $${str}`;\n */\nexport default function html(literals: TemplateStringsArray, ...substs: string[]) {\n const { raw } = literals;\n\n return raw.reduce((acc, lit, i) => {\n let subst = substs[i - 1];\n const last = raw[i - 1];\n\n if (Array.isArray(subst)) {\n subst = subst.join('');\n } else if (last && last.slice(-1) === '$') {\n // If the interpolation is preceded by a dollar sign, it won't be escaped\n acc = acc.slice(0, -1);\n } else {\n subst = escape(subst);\n }\n\n return acc + subst + lit;\n });\n}\n","import { AssetManagerConfig } from '../../asset_manager/config/config';\nimport { BlockManagerConfig } from '../../block_manager/config/config';\nimport { CanvasConfig } from '../../canvas/config/config';\nimport { CodeManagerConfig } from '../../code_manager/config/config';\nimport { CssComposerConfig } from '../../css_composer/config/config';\nimport { DeviceManagerConfig } from '../../device_manager/config/config';\nimport { I18nConfig } from '../../i18n/config';\nimport { ModalConfig } from '../../modal_dialog/config/config';\nimport { LayerManagerConfig } from '../../navigator/config/config';\nimport { PageManagerConfig } from '../../pages/config/config';\nimport { PanelsConfig } from '../../panels/config/config';\nimport { ParserConfig } from '../../parser/config/config';\nimport { RichTextEditorConfig } from '../../rich_text_editor/config/config';\nimport { SelectorManagerConfig } from '../../selector_manager/config/config';\nimport { StorageManagerConfig } from '../../storage_manager/config/config';\nimport { UndoManagerConfig } from '../../undo_manager/config';\nimport { Plugin } from '../../plugin_manager';\nimport { TraitManagerConfig } from '../../trait_manager/config/config';\nimport { CommandsConfig } from '../../commands/config/config';\nimport { StyleManagerConfig } from '../../style_manager/config/config';\nimport { DomComponentsConfig } from '../../dom_components/config/config';\nimport { HTMLGeneratorBuildOptions } from '../../code_manager/model/HtmlGenerator';\nimport { CssGeneratorBuildOptions } from '../../code_manager/model/CssGenerator';\nimport { ObjectAny } from '../../common';\n\nexport interface EditorConfig {\n /**\n * Style class name prefix.\n * @default 'gjs-'\n */\n stylePrefix?: string;\n\n /**\n * Selector which indicates where render the editor.\n */\n container?: string | HTMLElement;\n\n /**\n * If true, auto-render the content\n * @default true\n */\n autorender?: boolean;\n\n /**\n * Array of plugins to execute on start.\n * @default []\n */\n plugins?: (string | Plugin)[];\n\n /**\n * Custom options for plugins\n * @default {}\n */\n pluginsOpts?: Record;\n\n /**\n * Init headless editor.\n * @default false\n */\n headless?: boolean;\n\n /**\n * Initial project data (JSON containing your components/styles/etc) to load.\n */\n projectData?: ObjectAny;\n\n /**\n * HTML string or object of components\n * @deprecated Rely on `projectData` option\n * @default ''\n */\n components?: string;\n\n /**\n * CSS string or object of rules\n * @deprecated Rely on `projectData` option\n * @default ''\n */\n style?: string;\n\n /**\n * If true, will fetch HTML and CSS from the selected container.\n * @deprecated\n * @default false\n */\n fromElement?: boolean;\n\n /**\n * Show an alert before unload the page with unsaved changes\n * @default true\n */\n noticeOnUnload?: boolean;\n\n /**\n * Show paddings and margins.\n * @default false\n */\n showOffsets?: boolean;\n\n /**\n * Show paddings and margins on selected component\n * @default false\n */\n showOffsetsSelected?: boolean;\n\n /**\n * On creation of a new Component (via object), if the 'style' attribute is not\n * empty, all those roles will be moved in its new class.\n * @default true\n */\n forceClass?: boolean;\n\n /**\n * Height for the editor container\n * @default '900px'\n */\n height?: string;\n\n /**\n * Width for the editor container\n * @default '100%'\n */\n width?: string;\n\n /**\n * Type of logs to print with the logger (by default is used the devtool console).\n * Available by default: debug, info, warning, error.\n * You can use `false` to disable all of them or `true` to print all of them.\n * @default ['warning', 'error']\n */\n log?: ('debug' | 'info' | 'warning' | 'error')[] | boolean;\n\n /**\n * By default Grapes injects base CSS into the canvas. For example, it sets body margin to 0\n * and sets a default background color of white. This CSS is desired in most cases.\n * use this property if you wish to overwrite the base CSS to your own CSS. This is most\n * useful if for example your template is not based off a document with 0 as body margin.\n * @deprecated in favor of `config.canvas.frameStyle`\n * @default ''\n */\n baseCss?: string;\n\n /**\n * CSS that could only be seen (for instance, inside the code viewer)\n * @default '* { box-sizing: border-box; } body {margin: 0;}'\n */\n protectedCss?: string;\n\n /**\n * CSS for the iframe which containing the canvas, useful if you need to customize\n * something inside (eg. the style of the selected component).\n * @default ''\n */\n canvasCss?: string;\n\n /**\n * Default command\n * @default 'select-comp'\n */\n defaultCommand?: string;\n\n /**\n * Show a toolbar when the component is selected\n * @default true\n */\n showToolbar?: boolean;\n\n // Allow script tag importing\n // @deprecated in favor of `config.parser.optionsHtml.allowScripts`\n // allowScripts: 0,\n\n /**\n * If true render a select of available devices\n * @default true\n */\n showDevices?: boolean;\n\n /**\n * When enabled, on device change media rules won't be created\n * @default false\n */\n devicePreviewMode?: boolean;\n\n /**\n * The condition to use for media queries, eg. 'max-width'.\n * Comes handy for mobile-first cases.\n * @default 'max-width'\n */\n mediaCondition?: string;\n\n /**\n * Starting tag for variable inside scripts in Components\n * @deprecated Rely on 'script-props' https://grapesjs.com/docs/modules/Components-js.html#passing-properties-to-scripts\n * @default '{[ '\n */\n tagVarStart?: string;\n\n /**\n * Ending tag for variable inside scripts in Components\n * @deprecated Rely on 'script-props' https://grapesjs.com/docs/modules/Components-js.html#passing-properties-to-scripts\n * @default ' ]}'\n */\n tagVarEnd?: string;\n\n /**\n * When false, removes empty text nodes when parsed, unless they contain a space.\n * @default false\n */\n keepEmptyTextNodes?: boolean;\n\n /**\n * Return JS of components inside HTML from 'editor.getHtml()'.\n * @default true\n */\n jsInHtml?: boolean;\n\n /**\n * Enable native HTML5 drag and drop.\n * @default true\n */\n nativeDnD?: boolean;\n\n /**\n * Enable multiple component selection.\n * @default true\n */\n multipleSelection?: boolean;\n\n /**\n * Pass default available options wherever `editor.getHtml()` is called.\n * @default {}\n */\n optsHtml?: HTMLGeneratorBuildOptions;\n\n /**\n * Pass default available options wherever `editor.getCss()` is called\n * @default {}\n */\n optsCss?: CssGeneratorBuildOptions;\n\n /**\n * Usually when you update the `style` of the component this changes the\n * element's `style` attribute. Unfortunately, inline styling doesn't allow\n * use of media queries (@media) or even pseudo selectors (eg. :hover).\n * When `avoidInlineStyle` is true all styles are inserted inside the css rule\n * @deprecated Don't use this option, we don't support inline styling anymore.\n */\n avoidInlineStyle?: boolean;\n\n /**\n * Avoid default properties from storable JSON data, like `components` and `styles`.\n * With this option enabled your data will be smaller (usefull if need to\n * save some storage space).\n * @default true\n */\n avoidDefaults?: boolean;\n\n /**\n * (experimental)\n * The structure of components is always on the screen but it's not the same\n * for style rules. When you delete a component you might leave a lot of styles\n * which will never be used again, therefore they might be removed.\n * With this option set to true, styles not used from the CSS generator (so in\n * any case where `CssGenerator.build` is used) will be removed automatically.\n * But be careful, not always leaving the style not used mean you wouldn't\n * use it later, but this option comes really handy when deal with big templates.\n * @default false\n */\n clearStyles?: boolean;\n\n /**\n * Specify the global drag mode of components. By default, components are moved\n * following the HTML flow. Two other options are available:\n * 'absolute' - Move components absolutely (design tools way)\n * 'translate' - Use translate CSS from transform property\n * To get more about this feature read: https://github.com/GrapesJS/grapesjs/issues/1936.\n */\n dragMode?: 'translate' | 'absolute';\n\n /**\n * When the editor is placed in a scrollable container (eg. modals) this might\n * cause elements inside the canvas (eg. floating toolbars) to be misaligned.\n * To avoid that, you can specify an array of DOM elements on which their scroll will\n * trigger the canvas update.\n * Be default, if the array is empty, the first parent element will be appended.\n * listenToEl: [document.querySelector('#scrollable-el')],\n * @default []\n * */\n listenToEl?: HTMLElement[];\n\n /**\n * Import asynchronously CSS to use as icons.\n * @default 'https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css'\n * */\n cssIcons?: string;\n\n /**\n * Experimental: don't use.\n * Editor icons\n */\n icons?: ObjectAny;\n\n /**\n * Configurations for I18n.\n */\n i18n?: I18nConfig;\n\n /**\n * Configurations for Undo Manager\n */\n undoManager?: UndoManagerConfig | boolean;\n\n /**\n * Configurations for Asset Manager.\n */\n assetManager?: AssetManagerConfig;\n\n /**\n * Configurations for Canvas.\n */\n canvas?: CanvasConfig;\n\n /**\n * Configurations for Storage Manager.\n */\n storageManager?: StorageManagerConfig | boolean;\n\n /**\n * Configurations for Rich Text Editor.\n */\n richTextEditor?: RichTextEditorConfig;\n\n /**\n * Configurations for DomComponents\n */\n domComponents?: DomComponentsConfig;\n\n /**\n * Configurations for Modal Dialog.\n */\n modal?: ModalConfig;\n\n /**\n * Configurations for Code Manager.\n */\n codeManager?: CodeManagerConfig;\n\n /**\n * Configurations for Panels.\n */\n panels?: PanelsConfig;\n\n /**\n * Configurations for Commands.\n */\n commands?: CommandsConfig;\n\n /**\n * Configurations for Css Composer.\n */\n cssComposer?: CssComposerConfig;\n\n /**\n * Configurations for Selector Manager.\n */\n selectorManager?: SelectorManagerConfig;\n\n /**\n * Configurations for Device Manager.\n */\n deviceManager?: DeviceManagerConfig;\n\n /**\n * Configurations for Style Manager.\n */\n styleManager?: StyleManagerConfig;\n\n /**\n * Configurations for Block Manager.\n */\n blockManager?: BlockManagerConfig;\n\n /**\n * Configurations for Trait Manager.\n */\n traitManager?: TraitManagerConfig;\n\n /**\n * Configurations for Page Manager.\n */\n pageManager?: PageManagerConfig;\n\n /**\n * Configurations for Layer Manager.\n */\n layerManager?: LayerManagerConfig;\n\n /**\n * Configurations for Parser module.\n */\n parser?: ParserConfig;\n\n /** Texts **/\n textViewCode?: string;\n\n /**\n * Keep unused styles within the editor.\n * @default false\n */\n keepUnusedStyles?: boolean;\n\n /**\n * Experimental: don't use.\n * Avoid default UI styles.\n */\n customUI?: boolean;\n el?: HTMLElement;\n /**\n * Color picker options.\n */\n colorPicker?: ObjectAny;\n pStylePrefix?: string;\n}\n\nexport type EditorConfigKeys = keyof EditorConfig;\n\nconst config: EditorConfig = {\n stylePrefix: 'gjs-',\n components: '',\n style: '',\n fromElement: false,\n projectData: undefined,\n noticeOnUnload: true,\n showOffsets: false,\n showOffsetsSelected: false,\n forceClass: true,\n height: '900px',\n width: '100%',\n log: ['warning', 'error'],\n baseCss: '',\n protectedCss: '* { box-sizing: border-box; } body {margin: 0;}',\n canvasCss: '',\n defaultCommand: 'select-comp',\n showToolbar: true,\n showDevices: true,\n devicePreviewMode: false,\n mediaCondition: 'max-width',\n tagVarStart: '{[ ',\n tagVarEnd: ' ]}',\n keepEmptyTextNodes: false,\n jsInHtml: true,\n nativeDnD: true,\n multipleSelection: true,\n optsHtml: {},\n optsCss: {},\n avoidInlineStyle: true,\n avoidDefaults: true,\n clearStyles: false,\n listenToEl: [],\n cssIcons: 'https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css',\n icons: {\n close:\n '',\n move: '',\n plus: '',\n caret: '',\n delete:\n '',\n copy: '',\n arrowUp:\n '',\n chevron:\n '',\n eye: '',\n eyeOff:\n '',\n },\n i18n: {},\n undoManager: {},\n assetManager: {},\n canvas: {},\n layerManager: {},\n storageManager: {},\n richTextEditor: {},\n domComponents: {},\n modal: {},\n codeManager: {},\n panels: {},\n commands: {},\n cssComposer: {},\n selectorManager: {},\n deviceManager: {},\n styleManager: {},\n blockManager: {},\n traitManager: {},\n textViewCode: 'Code',\n keepUnusedStyles: false,\n customUI: false,\n};\n\nexport default config;\n","import { isArray } from 'underscore';\nimport { Collection, Model } from '../../common';\nimport Component from '../../dom_components/model/Component';\n\nexport class Selectable extends Model {}\n\nexport default class Selected extends Collection {\n getByComponent(component: Component) {\n return this.filter(s => this.getComponent(s) === component)[0];\n }\n\n addComponent(component: Component, opts: any) {\n const toAdd = (isArray(component) ? component : [component])\n .filter(c => !this.hasComponent(c))\n .map(component => new Selectable({ component }))[0];\n return this.push(toAdd, opts);\n }\n\n getComponent(model: Selectable): Component {\n return model.get('component');\n }\n\n hasComponent(component: Component) {\n const model = this.getByComponent(component);\n return model && this.contains(model);\n }\n\n lastComponent() {\n const last = this.last();\n return last ? this.getComponent(last) : undefined;\n }\n\n allComponents() {\n return this.map(s => this.getComponent(s)).filter(i => i);\n }\n\n removeComponent(component: Component | Component[], opts: any) {\n const toRemove = (isArray(component) ? component : [component]).map(c => this.getByComponent(c));\n return this.remove(toRemove, opts);\n }\n}\n","import { isElement, isUndefined, isString } from 'underscore';\nimport { Collection, View } from '../common';\nimport { EditorConfigKeys } from '../editor/config/config';\nimport EditorModel from '../editor/model/Editor';\nimport { ProjectData } from '../storage_manager/model/IStorage';\nimport { createId, isDef, deepMerge } from '../utils/mixins';\n\nexport interface IModule extends IBaseModule {\n destroy(): void;\n postLoad(key: any): any;\n onLoad?(): void;\n name: string;\n postRender?(view: any): void;\n}\n\nexport interface IBaseModule {\n em: EditorModel;\n config: TConfig;\n}\n\nexport interface ModuleConfig {\n name?: string;\n stylePrefix?: string;\n appendTo?: string | HTMLElement;\n}\n\nexport interface IStorableModule {\n storageKey: string[] | string;\n store(result: any): any;\n load(keys: ProjectData): void;\n clear(): void;\n}\n\nexport interface ILoadableModule {\n onLoad(): void;\n}\n\nexport default abstract class Module implements IModule {\n private _em: EditorModel;\n private _config: T & { pStylePrefix?: string };\n private _name: string;\n cls: any[] = [];\n events: any;\n model?: any;\n view?: any;\n\n constructor(em: EditorModel, moduleName: string, defaults?: T) {\n this._em = em;\n this._name = moduleName;\n const name = (this.name.charAt(0).toLowerCase() + this.name.slice(1)) as EditorConfigKeys;\n const cfgParent = !isUndefined(em.config[name]) ? em.config[name] : em.config[this.name as EditorConfigKeys];\n const cfg = (cfgParent === true ? {} : cfgParent || {}) as Record;\n cfg.pStylePrefix = em.config.pStylePrefix || '';\n\n if (!isUndefined(cfgParent) && !cfgParent) {\n cfg._disable = 1;\n }\n\n cfg.em = em;\n this._config = deepMerge(defaults || {}, cfg) as T;\n }\n\n public get em() {\n return this._em;\n }\n public get config() {\n return this._config;\n }\n\n abstract destroy(): void;\n render(opts?: any): HTMLElement | JQuery | void {}\n postLoad(key: any): void {}\n\n get name(): string {\n return this._name;\n }\n\n getConfig

(\n name?: P\n ): R & { pStylePrefix?: string } {\n // @ts-ignore\n return name ? this.config[name] : this.config;\n }\n\n __logWarn(str: string, opts = {}) {\n this.em.logWarning(`[${this.name}]: ${str}`, opts);\n }\n\n postRender?(view: any): void;\n\n /**\n * Move the main DOM element of the module.\n * To execute only post editor render (in postRender)\n */\n __appendTo() {\n const elTo = this.getConfig().appendTo;\n\n if (elTo) {\n const el = isElement(elTo) ? elTo : document.querySelector(elTo);\n if (!el) return this.__logWarn('\"appendTo\" element not found');\n el.appendChild(this.render() as any);\n }\n }\n}\n\nexport abstract class ItemManagerModule<\n TConf extends ModuleConfig = ModuleConfig,\n TCollection extends Collection = Collection\n> extends Module {\n cls: any[] = [];\n protected all: TCollection;\n view?: View;\n\n constructor(\n em: EditorModel,\n moduleName: string,\n all: any,\n events?: any,\n defaults?: TConf,\n opts: { skipListen?: boolean } = {}\n ) {\n super(em, moduleName, defaults);\n this.all = all;\n this.events = events;\n !opts.skipListen && this.__initListen();\n }\n\n private: boolean = false;\n\n abstract storageKey: string;\n abstract destroy(): void;\n postLoad(key: any): void {}\n render(opts?: any) {}\n\n getProjectData(data?: any) {\n const obj: any = {};\n const key = this.storageKey;\n if (key) {\n obj[key] = data || this.getAll();\n }\n return obj;\n }\n\n loadProjectData(data: any = {}, param: { all?: TCollection; onResult?: Function; reset?: boolean } = {}) {\n const { all, onResult, reset } = param;\n const key = this.storageKey;\n const opts: any = { action: 'load' };\n const coll = all || this.all;\n let result = data[key];\n\n if (typeof result == 'string') {\n try {\n result = JSON.parse(result);\n } catch (err) {\n this.__logWarn('Data parsing failed', { input: result });\n }\n }\n\n reset && result && coll.reset(undefined, opts);\n\n if (onResult) {\n result && onResult(result, opts);\n } else if (result && isDef(result.length)) {\n coll.reset(result, opts);\n }\n\n return result;\n }\n\n clear(opts = {}) {\n const { all } = this;\n all && all.reset(undefined, opts);\n return this;\n }\n\n // getAll(): TCollection extends Collection ? C[] : TCollection {\n getAll() {\n return [...this.all.models] as TCollection | any;\n }\n\n getAllMap(): {\n [key: string]: TCollection extends Collection ? C : unknown;\n } {\n return this.getAll().reduce((acc: any, i: any) => {\n acc[i.get(i.idAttribute)] = i;\n return acc;\n }, {} as any);\n }\n\n __initListen(opts: any = {}) {\n const { all, em, events } = this;\n all &&\n em &&\n all\n .on('add', (m: any, c: any, o: any) => em.trigger(events.add, m, o))\n .on('remove', (m: any, c: any, o: any) => em.trigger(events.remove, m, o))\n .on('change', (p: any, c: any) => em.trigger(events.update, p, p.changedAttributes(), c))\n .on('all', this.__catchAllEvent, this);\n // Register collections\n this.cls = [all].concat(opts.collections || []);\n // Propagate events\n ((opts.propagate as any[]) || []).forEach(({ entity, event }) => {\n entity.on('all', (ev: any, model: any, coll: any, opts: any) => {\n const options = opts || coll;\n const opt = { event: ev, ...options };\n [em, all].map(md => md.trigger(event, model, opt));\n });\n });\n }\n\n __remove(model: any, opts: any = {}) {\n const { em } = this;\n //@ts-ignore\n const md = isString(model) ? this.get(model) : model;\n const rm = () => {\n md && this.all.remove(md, opts);\n return md;\n };\n !opts.silent && em?.trigger(this.events.removeBefore, md, rm, opts);\n return !opts.abort && rm();\n }\n\n __catchAllEvent(event: any, model: any, coll: any, opts?: any) {\n const { em, events } = this;\n const options = opts || coll;\n em && events.all && em.trigger(events.all, { event, model, options });\n this.__onAllEvent();\n }\n\n __appendTo(renderProps?: any) {\n //@ts-ignore\n const elTo = this.config.appendTo;\n\n if (elTo) {\n const el = isElement(elTo) ? elTo : document.querySelector(elTo);\n if (!el) return this.__logWarn('\"appendTo\" element not found');\n // @ts-ignore\n el.appendChild(this.render(renderProps));\n }\n }\n\n __onAllEvent() {}\n\n _createId(len = 16) {\n const all = this.getAll();\n const ln = all.length + len;\n const allMap = this.getAllMap();\n let id;\n\n do {\n id = createId(ln);\n } while (allMap[id]);\n\n return id;\n }\n\n __listenAdd(model: TCollection, event: string) {\n model.on('add', (m, c, o) => this.em.trigger(event, m, o));\n }\n\n __listenRemove(model: TCollection, event: string) {\n model.on('remove', (m, c, o) => this.em.trigger(event, m, o));\n }\n\n __listenUpdate(model: TCollection, event: string) {\n model.on('change', (p, c) => this.em.trigger(event, p, p.changedAttributes(), c));\n }\n\n __destroy() {\n this.cls.forEach(coll => {\n coll.stopListening();\n coll.reset();\n });\n this.view?.remove();\n this.view = undefined;\n }\n}\n","import Component from '../../dom_components/model/Component';\nimport { CanvasSpotBuiltInTypes } from '../model/CanvasSpot';\n\nexport interface CanvasConfig {\n stylePrefix?: string;\n\n /**\n * Append external scripts to the `` of the iframe.\n * Be aware that these scripts will not be printed in the export code.\n * @default []\n * @example\n * scripts: [ 'https://...1.js', 'https://...2.js' ]\n * // or passing objects as attributes\n * scripts: [ { src: '/file.js', someattr: 'value' }, ... ]\n */\n scripts?: (string | Record)[];\n\n /**\n * Append external styles to the `` of the iframe.\n * Be aware that these scripts will not be printed in the export code.\n * @default []\n * @example\n * styles: [ 'https://...1.css', 'https://...2.css' ]\n * // or passing objects as attributes\n * styles: [ { href: '/style.css', someattr: 'value' }, ... ]\n */\n styles?: (string | Record)[];\n\n /**\n * Add custom badge naming strategy.\n * @example\n * customBadgeLabel: component => component.getName(),\n */\n customBadgeLabel?: (component: Component) => string;\n\n /**\n * Indicate when to start the autoscroll of the canvas on component/block dragging (value in px).\n * @default 50\n */\n autoscrollLimit?: number;\n\n /**\n * Experimental: external highlighter box\n */\n extHl?: boolean;\n\n /**\n * Initial content to load in all frames.\n * The default value enables the standard mode for the iframe.\n * @default ''\n */\n frameContent?: string;\n\n /**\n * Initial style to load in all frames.\n */\n frameStyle?: string;\n\n /**\n * When some textable component is selected and focused (eg. input or text component), the editor\n * stops some commands (eg. disables the copy/paste of components with CTRL+C/V to allow the copy/paste of the text).\n * This option allows to customize, by a selector, which element should not be considered textable.\n */\n notTextable?: string[];\n\n /**\n * By default, the editor allows to drop external elements by relying on the native HTML5\n * drag & drop API (eg. like a D&D of an image file from your desktop).\n * If you want to customize how external elements are interpreted by the editor, you can rely\n * on `canvas:dragdata` event, eg. https://github.com/GrapesJS/grapesjs/discussions/3849\n * @default true\n */\n allowExternalDrop?: boolean;\n\n /**\n * Disable the rendering of built-in canvas spots.\n *\n * Read here for more information about [Canvas Spots](https://grapesjs.com/docs/modules/Canvas.html#canvas-spots).\n * @example\n * // Disable only the hover type spot\n * customSpots: { hover: true },\n *\n * // Disable all built-in spots\n * customSpots: true,\n */\n customSpots?: boolean | Partial>;\n\n /**\n * Experimental: enable infinite canvas.\n */\n infiniteCanvas?: boolean;\n}\n\nconst config: CanvasConfig = {\n stylePrefix: 'cv-',\n scripts: [],\n styles: [],\n customBadgeLabel: undefined,\n autoscrollLimit: 50,\n extHl: false,\n frameContent: '',\n frameStyle: `\n body { background-color: #fff }\n * ::-webkit-scrollbar-track { background: rgba(0, 0, 0, 0.1) }\n * ::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.2) }\n * ::-webkit-scrollbar { width: 10px }\n `,\n notTextable: ['button', 'a', 'input[type=checkbox]', 'input[type=radio]'],\n allowExternalDrop: true,\n};\n\nexport default config;\n","import { DeviceProperties } from '../model/Device';\n\nexport interface DeviceManagerConfig {\n /**\n * The device `id` to select on start, if not indicated, the first available from `devices` will be used.\n * @default ''\n */\n default?: string;\n /**\n * Default devices.\n * @example\n * devices: [{\n * id: 'desktop',\n * name: 'Desktop',\n * width: '',\n * }, {\n * id: 'tablet',\n * name: 'Tablet',\n * width: '770px',\n * widthMedia: '992px',\n * },\n * ...\n * ]\n */\n devices?: DeviceProperties[];\n}\n\nconst config: DeviceManagerConfig = {\n default: '',\n devices: [\n {\n id: 'desktop',\n name: 'Desktop',\n width: '',\n },\n {\n id: 'tablet',\n name: 'Tablet',\n width: '770px',\n widthMedia: '992px',\n },\n {\n id: 'mobileLandscape',\n name: 'Mobile landscape',\n width: '568px',\n widthMedia: '768px',\n },\n {\n id: 'mobilePortrait',\n name: 'Mobile portrait',\n width: '320px',\n widthMedia: '480px',\n },\n ],\n};\n\nexport default config;\n","import { Model } from '../../common';\n\n/** @private */\nexport interface DeviceProperties {\n id?: string;\n /**\n * Device name.\n * @example 'Mobile'\n */\n name: string;\n /**\n * Width to set for the editor iframe.\n * @example '900px'\n */\n width: string | null;\n /**\n * Height to set for the editor iframe.\n * @example '600px'\n */\n height?: string;\n /**\n * The width which will be used in media queries, if empty the `width` will be used.\n * @example '900px'\n */\n widthMedia?: string | null;\n /**\n * Setup the order of media queries\n * @example 1\n */\n priority?: number | null;\n}\n\n/**\n * @typedef Device\n * @property {String} [name=''] Device type, eg. `Mobile`\n * @property {String} [width] Width to set for the editor iframe, eg. '900px'\n * @property {String} [height=''] Height to set for the editor iframe, eg. '600px'\n * @property {String} [widthMedia=''] The width which will be used in media queries, If empty the width will be used\n * @property {Number} [priority=null] Setup the order of media queries\n */\nexport default class Device extends Model {\n defaults() {\n return {\n name: '',\n width: null,\n height: '',\n widthMedia: null,\n priority: null,\n };\n }\n\n initialize() {\n this.get('widthMedia') === null && this.set('widthMedia', this.get('width'));\n this.get('width') === null && this.set('width', this.get('widthMedia'));\n !this.get('priority') && this.set('priority', parseFloat(this.get('widthMedia')!) || 0);\n const toCheck: (keyof DeviceProperties)[] = ['width', 'height', 'widthMedia'];\n toCheck.forEach(prop => this.checkUnit(prop));\n }\n\n checkUnit(prop: keyof DeviceProperties) {\n const pr = (this.get(prop) || '') as string;\n const noUnit = (parseFloat(pr) || 0).toString() === pr.toString();\n noUnit && this.set(prop, `${pr}px`);\n }\n\n getName() {\n return this.get('name') || this.get('id');\n }\n\n getWidthMedia() {\n return this.get('widthMedia') || '';\n }\n}\n","import { Collection } from '../../common';\nimport Device from './Device';\n\nexport default class Devices extends Collection {}\n\nDevices.prototype.model = Device;\n","import { View } from '../../common';\nimport EditorModel from '../../editor/model/Editor';\nimport html from '../../utils/html';\nimport Devices from '../model/Devices';\n\nexport interface DevicesViewConfig {\n em: EditorModel;\n pStylePrefix?: string;\n}\n\nexport default class DevicesView extends View {\n em: EditorModel;\n config: DevicesViewConfig;\n ppfx: string;\n devicesEl?: JQuery;\n\n template({ ppfx, label }: { ppfx: string; label: string }) {\n return html`\n

${label}
\n
\n \n \n \n
\n
\n
\n
\n \n `;\n }\n\n events() {\n return {\n change: 'updateDevice',\n 'click [data-add-trasp]': 'startAdd',\n };\n }\n\n constructor(o: { config: DevicesViewConfig; collection: Devices }) {\n super(o);\n this.config = o.config || {};\n this.em = this.config.em;\n this.ppfx = this.config.pStylePrefix || '';\n this.listenTo(this.em, 'change:device', this.updateSelect);\n }\n\n /**\n * Start adding new device\n * @return {[type]} [description]\n * @private\n */\n startAdd() {}\n\n /**\n * Update device of the editor\n * @private\n */\n updateDevice() {\n const { em } = this;\n\n if (em) {\n const devEl = this.devicesEl;\n em.set('device', devEl ? devEl.val() : '');\n }\n }\n\n /**\n * Update select value on device update\n * @private\n */\n updateSelect() {\n const { em, devicesEl } = this;\n\n if (em && em.getDeviceModel && devicesEl) {\n const device = em.getDeviceModel();\n devicesEl.val(device ? device.get('id')! : '');\n }\n }\n\n /**\n * Return devices options\n * @return {string} String of options\n * @private\n */\n getOptions() {\n const { collection, em } = this;\n let result = '';\n\n collection.forEach(device => {\n const { name, id } = device.attributes;\n const label = (em && em.t && em.t(`deviceManager.devices.${id}`)) || name;\n result += ``;\n });\n\n return result;\n }\n\n render() {\n const { em, ppfx, $el, el } = this;\n const label = em && em.t && em.t('deviceManager.device');\n $el.html(this.template({ ppfx, label }));\n this.devicesEl = $el.find(`.${ppfx}devices`);\n this.devicesEl.append(this.getOptions());\n this.devicesEl.val(em.get('device'));\n el.className = `${ppfx}devices-c`;\n return this;\n }\n}\n","/**\n * You can customize the initial state of the module from the editor initialization, by passing the following [Configuration Object](https://github.com/GrapesJS/grapesjs/blob/master/src/device_manager/config/config.ts)\n * ```js\n * const editor = grapesjs.init({\n * deviceManager: {\n * // options\n * }\n * })\n * ```\n *\n * Once the editor is instantiated you can use its API. Before using these methods you should get the module from the instance\n *\n * ```js\n * const deviceManager = editor.Devices;\n * ```\n * ## Available Events\n * * `device:add` - Added new device. The [Device] is passed as an argument to the callback\n * * `device:remove` - Device removed. The [Device] is passed as an argument to the callback\n * * `device:select` - New device selected. The newly selected [Device] and the previous one, are passed as arguments to the callback\n * * `device:update` - Device updated. The updated [Device] and the object containing changes are passed as arguments to the callback\n * * `device` - Catch-all event for all the events mentioned above. An object containing all the available data about the triggered event is passed as an argument to the callback\n *\n * ## Methods\n * * [add](#add)\n * * [get](#get)\n * * [getDevices](#getdevices)\n * * [remove](#remove)\n * * [select](#select)\n * * [getSelected](#getselected)\n *\n * [Device]: device.html\n *\n * @module Devices\n */\nimport { isString } from 'underscore';\nimport { ItemManagerModule } from '../abstract/Module';\nimport EditorModel from '../editor/model/Editor';\nimport defaults, { DeviceManagerConfig } from './config/config';\nimport Device, { DeviceProperties } from './model/Device';\nimport Devices from './model/Devices';\nimport DevicesView from './view/DevicesView';\n\nexport const evAll = 'device';\nexport const evPfx = `${evAll}:`;\nexport const evSelect = `${evPfx}select`;\nexport const evSelectBefore = `${evSelect}:before`;\nexport const evUpdate = `${evPfx}update`;\nexport const evAdd = `${evPfx}add`;\nexport const evAddBefore = `${evAdd}:before`;\nexport const evRemove = `${evPfx}remove`;\nexport const evRemoveBefore = `${evRemove}:before`;\nconst chnSel = 'change:device';\nconst deviceEvents = {\n all: evAll,\n select: evSelect,\n update: evUpdate,\n add: evAdd,\n remove: evRemove,\n removeBefore: evRemoveBefore,\n};\n\nexport default class DeviceManager extends ItemManagerModule<\n DeviceManagerConfig & { appendTo?: HTMLElement | string },\n Devices\n> {\n devices: Devices;\n events!: typeof deviceEvents;\n view?: DevicesView;\n\n Device = Device;\n\n Devices = Devices;\n\n storageKey = '';\n\n constructor(em: EditorModel) {\n super(em, 'DeviceManager', new Devices(), deviceEvents, defaults);\n this.devices = this.all;\n this.config.devices?.forEach(device => this.add(device, { silent: true }));\n this.select(this.config.default || this.devices.at(0));\n em.on(chnSel, this._onSelect, this);\n return this;\n }\n\n _onSelect(m: EditorModel, deviceId: string, opts: Record) {\n const { em, events } = this;\n const prevId = m.previous('device');\n const newDevice = this.get(deviceId);\n const ev = events.select;\n em.trigger(ev, newDevice, this.get(prevId));\n this.__catchAllEvent(ev, newDevice, opts);\n }\n\n /**\n * Add new device\n * @param {Object} props Device properties\n * @returns {[Device]} Added device\n * @example\n * const device1 = deviceManager.add({\n * // Without an explicit ID, the `name` will be taken. In case of missing `name`, a random ID will be created.\n * id: 'tablet',\n * name: 'Tablet',\n * width: '900px', // This width will be applied on the canvas frame and for the CSS media\n * });\n * const device2 = deviceManager.add({\n * id: 'tablet2',\n * name: 'Tablet 2',\n * width: '800px', // This width will be applied on the canvas frame\n * widthMedia: '810px', // This width that will be used for the CSS media\n * height: '600px', // Height will be applied on the canvas frame\n * });\n */\n add(props: DeviceProperties, options: Record = {}) {\n let result;\n let opts = options;\n\n // Support old API\n if (isString(props)) {\n const width = options;\n opts = arguments[2] || {};\n result = {\n ...opts,\n id: props,\n name: opts.name || props,\n width,\n };\n } else {\n result = props;\n }\n\n if (!result.id) {\n result.id = result.name || this._createId();\n }\n\n return this.devices.add(result, opts);\n }\n\n /**\n * Return device by ID\n * @param {String} id ID of the device\n * @returns {[Device]|null}\n * @example\n * const device = deviceManager.get('Tablet');\n * console.log(JSON.stringify(device));\n * // {name: 'Tablet', width: '900px'}\n */\n get(id: string): Device | undefined {\n // Support old API\n const byName = this.getAll().filter(d => d.get('name') === id)[0];\n return byName || this.devices.get(id) || null;\n }\n\n /**\n * Remove device\n * @param {String|[Device]} device Device or device id\n * @returns {[Device]} Removed device\n * @example\n * const removed = deviceManager.remove('device-id');\n * // or by passing the Device\n * const device = deviceManager.get('device-id');\n * deviceManager.remove(device);\n */\n remove(device: string | Device, opts = {}) {\n return this.__remove(device, opts);\n }\n\n /**\n * Return all devices\n * @returns {Array<[Device]>}\n * @example\n * const devices = deviceManager.getDevices();\n * console.log(JSON.stringify(devices));\n * // [{name: 'Desktop', width: ''}, ...]\n */\n getDevices() {\n return this.devices.models;\n }\n\n /**\n * Change the selected device. This will update the frame in the canvas\n * @param {String|[Device]} device Device or device id\n * @example\n * deviceManager.select('some-id');\n * // or by passing the page\n * const device = deviceManager.get('some-id');\n * deviceManager.select(device);\n */\n select(device: string | Device, opts = {}) {\n const md = isString(device) ? this.get(device) : device;\n md && this.em.set('device', md.get('id'), opts);\n return this;\n }\n\n /**\n * Get the selected device\n * @returns {[Device]}\n * @example\n * const selected = deviceManager.getSelected();\n */\n getSelected() {\n return this.get(this.em.get('device'));\n }\n\n getAll() {\n return this.devices;\n }\n\n render() {\n const { em } = this;\n this.view?.remove();\n this.view = new DevicesView({\n collection: this.devices,\n config: { em, ...this.config },\n });\n return this.view.render().el;\n }\n\n destroy() {\n this.__destroy();\n }\n}\n","import { isArray, isUndefined } from 'underscore';\nimport { AddOptions, Collection } from '../common';\nimport ModuleModel from './ModuleModel';\n\ntype ModuleExt = TModel extends ModuleModel ? M : unknown;\ntype ModelConstructor = { new (mod: ModuleExt, attr: any): TModel };\n\nexport default class ModuleCollection extends Collection {\n module!: ModuleExt;\n private newModel!: ModelConstructor;\n\n add(model: Array> | TModel, options?: AddOptions): TModel;\n add(models: Array> | TModel>, options?: AddOptions): TModel[];\n add(model?: unknown, options?: AddOptions): any {\n //Note: the undefined case needed because backbonejs not handle the reset() correctly\n var models = isArray(model) ? model : !isUndefined(model) ? [model] : undefined;\n\n models = models?.map(m => (m instanceof this.newModel ? m : new this.newModel(this.module, m))) ?? [undefined];\n\n return super.add(isArray(model) ? models : models[0], options);\n }\n\n constructor(\n module: ModuleExt,\n models: TModel[] | Array>,\n modelConstructor: ModelConstructor\n ) {\n super(models, { module, modelConstructor });\n }\n\n preinitialize(models?: TModel[] | Array>, options?: any) {\n this.newModel = options.modelConstructor;\n this.module = options.module;\n }\n}\n","import { forEach, isEmpty, isNumber, isString, keys, result } from 'underscore';\nimport CanvasModule from '..';\nimport { ModuleModel } from '../../abstract';\nimport { BoxRect, PrevToNewIdMap } from '../../common';\nimport ComponentWrapper from '../../dom_components/model/ComponentWrapper';\nimport Page from '../../pages/model/Page';\nimport { createId, isComponent, isObject } from '../../utils/mixins';\nimport FrameView from '../view/FrameView';\nimport Frames from './Frames';\nimport { CssRuleJSON } from '../../css_composer/model/CssRule';\n\nconst keyAutoW = '__aw';\nconst keyAutoH = '__ah';\n\nconst getDimension = (frame: Frame, type: 'width' | 'height') => {\n const dim = frame.get(type);\n const viewDim = frame.view?.el[type === 'width' ? 'offsetWidth' : 'offsetHeight'];\n\n if (isNumber(dim)) {\n return dim;\n } else if (isString(dim) && dim.endsWith('px')) {\n return parseFloat(dim);\n } else if (viewDim) {\n return viewDim;\n } else {\n return 0;\n }\n};\n\n/**\n * @property {Object|String} component Wrapper component definition. You can also pass an HTML string as components of the default wrapper component.\n * @property {String} [width=''] Width of the frame. By default, the canvas width will be taken.\n * @property {String} [height=''] Height of the frame. By default, the canvas height will be taken.\n * @property {Number} [x=0] Horizontal position of the frame in the canvas.\n * @property {Number} [y=0] Vertical position of the frame in the canvas.\n *\n */\nexport default class Frame extends ModuleModel {\n defaults() {\n return {\n x: 0,\n y: 0,\n changesCount: 0,\n attributes: {},\n width: null,\n height: null,\n head: [],\n component: '',\n styles: '',\n refFrame: null,\n _undo: true,\n _undoexc: ['changesCount'],\n };\n }\n view?: FrameView;\n\n /**\n * @hideconstructor\n */\n constructor(module: CanvasModule, attr: any) {\n super(module, attr);\n const { em } = this;\n const { styles, component } = this.attributes;\n const domc = em.Components;\n const conf = domc.getConfig();\n const allRules = em.Css.getAll();\n const idMap: PrevToNewIdMap = {};\n const modOpts = { em, config: conf, frame: this, idMap };\n\n if (!isComponent(component)) {\n const wrp = isObject(component) ? component : { components: component };\n !wrp.type && (wrp.type = 'wrapper');\n const Wrapper = domc.getType('wrapper')!.model;\n this.set('component', new Wrapper(wrp, modOpts));\n }\n\n if (!styles) {\n this.set('styles', allRules);\n } else if (!isObject(styles)) {\n let newStyles = styles as string | CssRuleJSON[];\n\n // Avoid losing styles on remapped components\n if (keys(idMap).length) {\n newStyles = isString(newStyles) ? em.Parser.parseCss(newStyles) : newStyles;\n em.Css.checkId(newStyles, { idMap });\n }\n\n allRules.add(newStyles);\n this.set('styles', allRules);\n }\n\n !attr.width && this.set(keyAutoW, 1);\n !attr.height && this.set(keyAutoH, 1);\n\n !this.id && this.set('id', createId());\n }\n\n get width() {\n return getDimension(this, 'width');\n }\n\n get height() {\n return getDimension(this, 'height');\n }\n\n get head(): { tag: string; attributes: any }[] {\n return this.get('head');\n }\n\n get refFrame(): Frame | undefined {\n return this.get('refFrame');\n }\n\n get root() {\n const { refFrame } = this;\n return refFrame?.getComponent() || this.getComponent();\n }\n\n initRefs() {\n const { refFrame } = this;\n if (isString(refFrame)) {\n const frame = this.module.framesById[refFrame];\n frame && this.set({ refFrame: frame }, { silent: true });\n }\n }\n\n getBoxRect(): BoxRect {\n const { x, y } = this.attributes;\n const { width, height } = this;\n\n return {\n x,\n y,\n width,\n height,\n };\n }\n\n onRemove() {\n !this.refFrame && this.getComponent().remove({ root: 1 });\n }\n\n changesUp(opt: any = {}) {\n if (opt.temporary || opt.noCount || opt.avoidStore) {\n return;\n }\n this.set('changesCount', this.get('changesCount') + 1);\n }\n\n getComponent(): ComponentWrapper {\n return this.get('component');\n }\n\n getStyles() {\n return this.get('styles');\n }\n\n disable() {\n this.trigger('disable');\n }\n\n remove() {\n this.view?.remove();\n this.view = undefined;\n const coll = this.collection;\n return coll && coll.remove(this);\n }\n\n getHead() {\n return [...this.head];\n }\n\n setHead(value: { tag: string; attributes: any }[]) {\n return this.set('head', [...value]);\n }\n\n addHeadItem(item: { tag: string; attributes: any }) {\n this.head.push(item);\n }\n\n getHeadByAttr(attr: string, value: any, tag: string) {\n return this.head.filter(item => item.attributes && item.attributes[attr] == value && (!tag || tag === item.tag))[0];\n }\n\n removeHeadByAttr(attr: string, value: any, tag: string) {\n const item = this.getHeadByAttr(attr, value, tag);\n const index = this.head.indexOf(item);\n\n if (index >= 0) {\n this.head.splice(index, 1);\n }\n }\n\n addLink(href: string) {\n const tag = 'link';\n !this.getHeadByAttr('href', href, tag) &&\n this.addHeadItem({\n tag,\n attributes: {\n href,\n rel: 'stylesheet',\n },\n });\n }\n\n removeLink(href: string) {\n this.removeHeadByAttr('href', href, 'link');\n }\n\n addScript(src: string) {\n const tag = 'script';\n !this.getHeadByAttr('src', src, tag) &&\n this.addHeadItem({\n tag,\n attributes: { src },\n });\n }\n\n removeScript(src: string) {\n this.removeHeadByAttr('src', src, 'script');\n }\n\n getPage(): Page | undefined {\n return (this.collection as unknown as Frames)?.page;\n }\n\n _emitUpdated(data = {}) {\n this.em.trigger('frame:updated', { frame: this, ...data });\n }\n\n hasAutoHeight() {\n const { height } = this.attributes;\n\n if (height === 'auto' || this.config.infiniteCanvas) {\n return true;\n }\n\n return false;\n }\n\n toJSON(opts: any = {}) {\n const obj = ModuleModel.prototype.toJSON.call(this, opts);\n const defaults = result(this, 'defaults');\n\n if (opts.fromUndo) delete obj.component;\n delete obj.styles;\n delete obj.changesCount;\n obj[keyAutoW] && delete obj.width;\n obj[keyAutoH] && delete obj.height;\n\n if (obj.refFrame) {\n obj.refFrame = obj.refFrame.id;\n delete obj.component;\n }\n\n // Remove private keys\n forEach(obj, (value, key) => {\n key.indexOf('_') === 0 && delete obj[key];\n });\n\n forEach(defaults, (value, key) => {\n if (obj[key] === value) delete obj[key];\n });\n\n forEach(['attributes', 'head'], prop => {\n if (isEmpty(obj[prop])) delete obj[prop];\n });\n\n return obj;\n }\n}\n","import { bindAll } from 'underscore';\nimport CanvasModule from '..';\nimport { ModuleCollection } from '../../abstract';\nimport Page from '../../pages/model/Page';\nimport Frame from './Frame';\n\nexport default class Frames extends ModuleCollection {\n loadedItems = 0;\n itemsToLoad = 0;\n page?: Page;\n\n constructor(module: CanvasModule, models: Frame[] | Array> = []) {\n super(module, models, Frame);\n bindAll(this, 'itemLoaded');\n this.on('add', this.onAdd);\n this.on('reset', this.onReset);\n this.on('remove', this.onRemove);\n this.forEach(frame => this.onAdd(frame));\n }\n\n onAdd(frame: Frame) {\n this.module.framesById[frame.id] = frame;\n }\n\n onReset(m: Frame, opts?: { previousModels?: Frame[] }) {\n const prev = opts?.previousModels || [];\n prev.map(p => this.onRemove(p));\n }\n\n onRemove(frame: Frame) {\n frame.onRemove();\n delete this.module.framesById[frame.id];\n }\n\n initRefs() {\n this.forEach(frame => frame.initRefs());\n }\n\n itemLoaded() {\n this.loadedItems++;\n\n if (this.loadedItems >= this.itemsToLoad) {\n this.trigger('loaded:all');\n this.listenToLoadItems(false);\n }\n }\n\n listenToLoad() {\n this.loadedItems = 0;\n this.itemsToLoad = this.length;\n this.listenToLoadItems(true);\n }\n\n listenToLoadItems(on: boolean) {\n this.forEach(item => item[on ? 'on' : 'off']('loaded', this.itemLoaded));\n }\n}\n","import { forEach, result } from 'underscore';\nimport { PageManagerConfig } from '../config/config';\nimport Frames from '../../canvas/model/Frames';\nimport { Model } from '../../common';\nimport ComponentWrapper from '../../dom_components/model/ComponentWrapper';\nimport EditorModel from '../../editor/model/Editor';\nimport { CssRuleJSON } from '../../css_composer/model/CssRule';\nimport { ComponentDefinition } from '../../dom_components/model/types';\nimport RelativeRoute from './RelativeRoute';\n\n/** @private */\nexport interface PageProperties {\n /**\n * Panel id.\n */\n id?: string;\n\n /**\n * Page name.\n */\n name?: string;\n\n /**\n * HTML to load as page content.\n */\n component?: string | ComponentDefinition | ComponentDefinition[];\n\n /**\n * CSS to load with the page.\n */\n styles?: string | CssRuleJSON[];\n\n route?: RelativeRoute;\n\n [key: string]: unknown;\n}\n\nexport interface PagePropertiesDefined extends Pick {\n frames: Frames;\n [key: string]: unknown;\n}\n\nexport default class Page extends Model {\n defaults() {\n return {\n name: '',\n frames: [] as unknown as Frames,\n _undo: true,\n };\n }\n em: EditorModel;\n\n constructor(props: any, opts: { em?: EditorModel; config?: PageManagerConfig } = {}) {\n super(props, opts);\n const { em } = opts;\n const defFrame: any = {};\n this.em = em!;\n if (!props.frames) {\n defFrame.component = props.component;\n defFrame.styles = props.styles;\n ['component', 'styles'].map(i => this.unset(i));\n }\n const frms: any[] = props.frames || [defFrame];\n const frames = new Frames(em!.Canvas, frms);\n frames.page = this;\n this.set('frames', frames);\n !this.getId() && this.set('id', em?.Pages._createId());\n em?.UndoManager.add(frames);\n }\n\n onRemove() {\n this.getFrames().reset();\n }\n\n getFrames() {\n return this.get('frames')!;\n }\n\n /**\n * Get page id\n * @returns {String}\n */\n getId() {\n return this.id as string;\n }\n\n /**\n * Get page name\n * @returns {String}\n */\n getName() {\n return this.get('name')!;\n }\n\n /**\n * Update page name\n * @param {String} name New page name\n * @example\n * page.setName('New name');\n */\n setName(name: string) {\n return this.set({ name });\n }\n\n /**\n * Get all frames\n * @returns {Array}\n * @example\n * const arrayOfFrames = page.getAllFrames();\n */\n getAllFrames() {\n return this.getFrames().models || [];\n }\n\n /**\n * Get the first frame of the page (identified always as the main one)\n * @returns {Frame}\n * @example\n * const mainFrame = page.getMainFrame();\n */\n getMainFrame() {\n return this.getFrames().at(0);\n }\n\n /**\n * Get the root component (usually is the `wrapper` component) from the main frame\n * @returns {Component}\n * @example\n * const rootComponent = page.getMainComponent();\n * console.log(rootComponent.toHTML());\n */\n getMainComponent(): ComponentWrapper {\n const frame = this.getMainFrame();\n return frame?.getComponent();\n }\n\n toJSON(opts = {}) {\n const obj = Model.prototype.toJSON.call(this, opts);\n const defaults = result(this, 'defaults');\n\n // Remove private keys\n forEach(obj, (value, key) => {\n key.indexOf('_') === 0 && delete obj[key];\n });\n\n forEach(defaults, (value, key) => {\n if (obj[key] === value) delete obj[key];\n });\n\n return obj;\n }\n}\n","import { Collection } from '../../common';\nimport EditorModel from '../../editor/model/Editor';\nimport Page from './Page';\n\nexport default class Pages extends Collection {\n constructor(models: any, em: EditorModel) {\n super(models);\n this.on('reset', this.onReset);\n this.on('remove', this.onRemove);\n\n // @ts-ignore We need to inject `em` for pages created on reset from the Storage load\n this.model = (props: {}, opts = {}) => {\n return new Page(props, {...opts, em });\n }\n }\n\n onReset(m: Page, opts?: { previousModels?: Pages }) {\n opts?.previousModels?.map((p) => this.onRemove(p));\n }\n\n onRemove(removed?: Page) {\n removed?.onRemove();\n }\n}\n","import { Model } from '../..';\n\nexport interface OnUpdateView {\n onUpdateEvent(value: TraitValueType): void;\n}\n\nexport interface TraitProperties {\n name: string;\n default?: any;\n value?: any;\n changeProp?: boolean;\n}\n\nexport default abstract class Trait {\n opts: any;\n protected view?: OnUpdateView;\n\n public get name() {\n return this.opts.name;\n }\n\n constructor(opts: TraitProperties) {\n this.opts = { ...opts, default: opts?.value ?? opts?.default ?? '' };\n }\n\n public registerForUpdateEvent(view: OnUpdateView) {\n this.view = view;\n }\n\n protected abstract getValue(): TraitValueType;\n\n protected abstract setValue(value: TraitValueType): void;\n\n public get changeProp(): boolean {\n return this.opts.changeProp ?? false;\n }\n\n public get value(): TraitValueType {\n return this.getValue() ?? this.opts.default;\n }\n\n protected updatingValue = false;\n public set value(value: TraitValueType) {\n this.updatingValue = true;\n this.setValue(value);\n this.updatingValue = false;\n }\n\n protected setValueFromModel() {\n if (!this.updatingValue) {\n this.view?.onUpdateEvent(this.value);\n }\n }\n\n updateOpts(opts: any) {\n this.opts = { ...this.opts, ...opts };\n }\n}\n","import { Model } from '../..';\nimport Trait, { TraitProperties } from './Trait';\n\n// export interface TraitItemProperties extends TraitProperties {\n// getValues: (model: TModel) => {[key: string]: TraitValueType};\n// setValues: (model: TModel, updatedValues: {[key: string]: TraitValueType}) => void;\n// }\nexport interface ParentTrait {\n getParentValue(name: string): TraitValueType;\n setParentValue(name: string, value: TraitValueType): void;\n}\n\nexport default class TraitGroupItem extends Trait {\n // opts: TraitItemProperties\n parent: ParentTrait;\n constructor(name: string, parent: ParentTrait, opts: TraitProperties) {\n super({ ...opts, name });\n // this.opts = opts;\n\n this.parent = parent;\n }\n\n protected getValue(): TraitValueType {\n const { name } = this;\n console.log('getValues');\n const value = this.parent.getParentValue(name);\n return value ?? this.opts.default;\n }\n protected setValue(value: TraitValueType) {\n const { parent, name } = this;\n console.log('TraitGroupItem:setValues');\n parent.setParentValue(name, value);\n }\n}\n","import { isObject } from 'underscore';\nimport { InputProperties, InputViewProperties } from '..';\nimport { Model } from '../..';\nimport Trait, { TraitProperties } from './Trait';\nimport TraitGroupItem, { ParentTrait } from './TraitGroupItem';\n\nexport interface TraitListProperties extends TraitProperties {\n traits: any[];\n}\n\nexport default class TraitGroup extends Trait<{ [name: string]: any }> implements ParentTrait {\n readonly parent: ParentTrait;\n templates: (InputProperties & InputViewProperties)[];\n\n get traits(): TraitGroupItem[] {\n const { value } = this;\n return this.templates.map(tr => new TraitGroupItem(tr.name, this, { ...tr, value: value[tr.name] }));\n }\n\n constructor(name: string, parent: ParentTrait, opts: TraitListProperties) {\n super({ ...opts, name, changeProp: true } as any);\n this.parent = parent;\n this.templates = opts.traits ?? [{ type: 'text' }];\n if (!isObject(parent.getParentValue(name))) {\n parent.setParentValue(name, {});\n }\n console.log(this.value);\n }\n getParentValue(name: string) {\n return this.value[name];\n }\n setParentValue(name: string, value: any): void {\n this.value = { ...this.value, [name]: value };\n console.log('group setvalue');\n }\n\n protected getValue(): { [name: string]: any } {\n const { parent, name } = this;\n console.log(name);\n return parent.getParentValue(name);\n }\n\n protected setValue(values: { [name: string]: any }) {\n const { name, parent } = this;\n parent.setParentValue(name, values);\n }\n}\n","import { any, isArray } from 'underscore';\nimport { InputProperties, InputViewProperties } from '..';\nimport { Model } from '../..';\nimport Trait, { TraitProperties } from './Trait';\nimport TraitGroup from './TraitGroup';\nimport TraitGroupItem, { ParentTrait } from './TraitGroupItem';\n\nexport interface TraitListProperties extends TraitProperties {\n traits: any[] | any;\n default?: any[];\n}\n\nexport default class TraitList\n extends Trait<{ id: string; value: any }[]>\n implements ParentTrait\n{\n readonly model: TModel;\n templates: any[] | any;\n // traits: (TraitGroupItem|TraitGroup)[];\n constructor(name: string, model: TModel, opts: TraitListProperties) {\n super({ ...opts, type: 'list', name, changeProp: true } as any);\n model.on('change:' + name, this.setValueFromModel, this);\n this.model = model;\n // this.model.on(\"all\", (e) => console.log(e))\n // this.traits = opts?.traits ?? [{type: \"list\"}]\n model.get(name) ?? model.set(name, [], { silent: true });\n // this.value= model.get(\"values\")\n this.templates = opts.traits;\n\n // this.traits = []\n\n // this.value.forEach(v => this.traits.push(this.initTrait(v)))\n }\n get traits() {\n return this.value.map(v => this.initTrait(v.id, v.value));\n }\n\n getParentValue(name: string) {\n return this.value.find(item => item.id == name)?.value;\n }\n\n setParentValue(name: string, value: any): void {\n let values = this.value;\n const index = values.findIndex(item => item.id == name);\n values[index] = { id: name, value };\n this.value = values;\n }\n\n private initTrait(index: string, value?: any) {\n const { templates } = this;\n const traits = this.templates;\n // console.log(this.traits)\n // const index = this.traits.length as any\n if (isArray(templates) && templates.length > 1) {\n return new TraitGroup(index, this, { name: index, traits, value });\n } else {\n return new TraitGroupItem(index, this, { ...traits, value });\n }\n }\n\n protected getValue(): { id: string; value: any }[] {\n const { model, name } = this;\n return model.get(name).map((value: any, id: number) => ({ id: id + '', value }));\n }\n\n protected setValue(values: { id: string; value: any }[]) {\n const { name, model } = this;\n\n model.set(\n name,\n values.map(item => item.value)\n );\n }\n\n public add() {\n this.setValue([...this.value, { id: this.value.length + '', value: '' }]);\n this.model.trigger(`change:${this.name}`);\n }\n\n public remove(id: string) {\n const { value } = this;\n const index = value?.findIndex(tr => tr.id == id) ?? -1;\n if (index > -1) {\n value.splice(index, 1);\n }\n this.setValue(value);\n }\n}\n","import { Model } from '../..';\nimport Trait, { TraitProperties } from './Trait';\n\nexport default class TraitSingle extends Trait {\n readonly model: TModel;\n\n constructor(name: string, model: TModel, opts: any) {\n super({ ...opts, name });\n model.on('change:' + name, this.setValueFromModel, this);\n this.model = model;\n }\n\n protected getValue(): TraitValueType {\n const { changeProp, model, name } = this;\n const value = changeProp\n ? model.get(name)\n : // TODO update post component update\n model.get('attributes')[name];\n\n return value;\n }\n protected setValue(value: TraitValueType): void {\n const { name, model, changeProp } = this;\n\n if (changeProp) {\n model.set(name, value);\n } else {\n model.set('attributes', { ...model.get('attributes'), [name]: value });\n }\n }\n}\n","import { isString } from 'underscore';\nimport { Model } from '../..';\nimport { TraitButtonViewOpts } from '../view/TraitButtonView';\nimport { TraitNumberUnitViewOpts, TraitNumberViewOpts } from '../view/TraitNumberView';\nimport { TraitSelectViewOpts } from '../view/TraitSelectView';\nimport { TraitInputViewOpts } from '../view/TraitInputView';\nimport Trait, { TraitProperties } from './Trait';\nimport TraitList, { TraitListProperties } from './TraitList';\nimport TraitSingle from './TraitSingle';\nimport { TraitListViewOpts } from '../view/TraitListView';\n\nexport type InputViewProperties =\n | TraitInputViewOpts<'text'>\n | (TraitNumberViewOpts | TraitNumberUnitViewOpts)\n | TraitSelectViewOpts\n | TraitInputViewOpts<'checkbox'>\n | TraitInputViewOpts<'color'>\n | TraitButtonViewOpts\n | TraitListViewOpts;\n\n// | ({ type: 'text' } & TraitInputViewOpts<\"text\">)\n// | ({ type: 'number' } & (TraitNumberViewOpts | TraitNumberUnitViewOpts))\n// | ({ type: 'select' } & TraitSelectViewOpts)\n// | ({ type: 'checkbox' } & TraitInputViewOpts<\"checkbox\">)\n// | ({ type: 'color' } & TraitInputViewOpts<\"color\">)\n// | ({ type: 'button' } & TraitButtonViewOpts)\n// | ({ type: 'list' } & TraitListViewOpts);\n\nexport type InputProperties = TraitProperties;\nexport default abstract class TraiFactory {\n static build(model: Model, trait: string | (InputProperties & InputViewProperties) | Trait): Trait {\n if (!(trait instanceof Trait)) {\n if (isString(trait)) {\n return new TraitSingle(trait, model, { type: 'text', label: trait });\n } else {\n switch (trait.type) {\n case 'list':\n return new TraitList(trait.name, model, trait);\n default:\n return new TraitSingle(trait.name, model, trait);\n }\n }\n } else {\n return trait;\n }\n }\n}\n","import { EventsHash } from 'backbone';\nimport { isString, isUndefined } from 'underscore';\nimport TraitFactory from '../model/TraitFactory';\nimport { Model } from '../..';\nimport { $, View } from '../..';\nimport EditorModel from '../../../editor/model/Editor';\nimport { capitalize } from '../../../utils/mixins';\nimport Trait, { OnUpdateView, TraitProperties } from '../model/Trait';\n\nexport interface TraitViewOpts {\n type?: Type;\n label?: string | false;\n noLabel?: boolean;\n el?: HTMLElement;\n}\n\ntype ValueFromTrait = TTarget extends Trait ? M : unknown;\n// type TypeFromTraitView> = TView extends TraitView ? M : unknown;\n\nexport default abstract class TraitView\n extends View\n implements OnUpdateView>\n{\n pfx: string;\n ppfx: string;\n get name() {\n return this.target?.opts.name;\n }\n protected abstract type: string;\n\n get clsField() {\n const { ppfx, type } = this;\n return `${ppfx}field ${ppfx}field-${type}`;\n }\n private _label?: string;\n get label(): string {\n return this._label ?? this.name;\n }\n noLabel: boolean;\n em: EditorModel;\n target!: Target;\n\n protected constructor(em: EditorModel, opts?: TraitViewOpts) {\n super({ el: opts?.el });\n this.em = em;\n const config = this.em.Traits.config;\n this.ppfx = config.pStylePrefix || '';\n this.pfx = this.ppfx + config.stylePrefix || '';\n this._label = opts?.label as any;\n this.noLabel = (opts?.noLabel && opts?.label !== false) ?? false;\n }\n\n setTarget(popertyName: string, model: Model, opts?: Omit): this;\n setTarget(target: Target): this;\n setTarget(target: unknown, model?: Model, opts?: Omit) {\n if (isString(target) && model !== undefined) {\n target = TraitFactory.build(model, { ...opts, type: this.type as any, name: target });\n }\n this.target = target as Target;\n this.target.registerForUpdateEvent(this);\n return this;\n }\n\n abstract onUpdateEvent(value: ValueFromTrait): void;\n\n /**\n * Returns label for the input\n */\n protected getLabelText(): string | undefined {\n const { em, label } = this;\n return label && (em.t(`traitManager.traits.labels.${label}`) || capitalize(label).replace(/-/g, ' '));\n }\n\n hasLabel() {\n return !this.noLabel;\n }\n\n abstract render(): typeof this;\n}\n","import { EventsHash } from 'backbone';\nimport { isString, isUndefined } from 'underscore';\nimport TraitFactory from '../model/TraitFactory';\nimport { Model } from '../..';\nimport { $, View } from '../..';\nimport EditorModel from '../../../editor/model/Editor';\nimport { capitalize } from '../../../utils/mixins';\nimport Trait, { OnUpdateView, TraitProperties } from '../model/Trait';\nimport TraitView, { TraitViewOpts } from './TraitView';\n\nexport interface TraitInputViewOpts extends TraitViewOpts {\n default?: any;\n paceholder?: string;\n}\n\n// type ModelFromTrait = TTarget extends Trait ? M : unknown;\ntype ValueFromTrait = TTarget extends Trait ? M : unknown;\n\nexport default abstract class TraitInputView\n extends TraitView\n implements OnUpdateView>\n{\n paceholder?: string;\n protected abstract type: string;\n\n get clsField() {\n const { ppfx, type } = this;\n return `${ppfx}field ${ppfx}field-${type}`;\n }\n\n get clsLabel() {\n const { ppfx } = this;\n return `${ppfx}label-wrp`;\n }\n\n elInput?: HTMLInputElement;\n input?: HTMLInputElement;\n $input?: JQuery;\n target!: Target;\n\n events(): EventsHash {\n return {\n change: this.onChange,\n };\n }\n\n appendInput = true;\n\n templateLabel() {\n const { ppfx, name } = this;\n const label = this.getLabel();\n return `
${label}
`;\n }\n\n templateInput(defaultValue: ValueFromTrait) {\n const { clsField } = this;\n return `
`;\n }\n\n protected constructor(em: EditorModel, opts?: TraitInputViewOpts) {\n super(em, opts);\n }\n\n abstract get inputValue(): ValueFromTrait;\n\n abstract set inputValue(value: ValueFromTrait);\n\n /**\n * Fires when the input is changed\n * @private\n */\n onChange() {\n console.log('traitchange');\n this.target.value = this.inputValue;\n }\n\n onUpdateEvent(value: ValueFromTrait) {\n this.inputValue = value;\n }\n\n /**\n * Render label\n */\n private renderLabel() {\n const { $el } = this;\n let tpl: string | HTMLElement = this.templateLabel();\n $el.find('[data-label]').append(tpl);\n }\n\n /**\n * Returns label for the input\n */\n protected getLabel(): string {\n const { em, name } = this;\n const label = name ?? this.label;\n return em.t(`traitManager.traits.labels.${label}`) || capitalize(label).replace(/-/g, ' ');\n }\n\n /**\n * Returns input element\n * @return {HTMLElement}\n */\n protected getInputEl() {\n if (!this.$input) {\n const { em, name, type } = this;\n const value = this.target.value;\n const input: JQuery = $(``);\n const i18nAttr = em.t(`traitManager.traits.attributes.${name}`) || {};\n input.attr({\n placeholder: this.paceholder || value,\n ...i18nAttr,\n });\n\n if (!isUndefined(value)) {\n input.prop('value', value as any);\n }\n\n this.$input = input;\n }\n return this.$input.get(0);\n }\n\n getElInput() {\n return this.elInput;\n }\n\n /**\n * Renders input\n * @private\n * */\n renderField() {\n const { $el, appendInput, elInput } = this;\n const inputs = $el.find('[data-input]');\n const el = inputs[inputs.length - 1];\n\n if (!elInput) {\n this.elInput = this.getInputEl();\n appendInput ? el.appendChild(this.elInput!) : el.insertBefore(this.elInput!, el.firstChild);\n }\n }\n\n rerender() {\n delete this.elInput;\n this.render();\n }\n\n render() {\n const { $el, pfx, ppfx, name, type, clsLabel } = this;\n const hasLabel = this.hasLabel();\n const cls = `${pfx}trait`;\n delete this.$input;\n let tmpl = `
\n ${hasLabel ? `
` : ''}\n
\n ${this.templateInput(this.target.value)}\n
\n
`;\n $el.empty().append(tmpl);\n hasLabel && this.renderLabel();\n this.renderField();\n this.el.className = `${cls}__wrp ${cls}__wrp-${name}`;\n this.setElement(this.el);\n return this;\n }\n}\n","import EditorModel from '../../../editor/model/Editor';\nimport Trait from '../model/Trait';\nimport TraitInputView, { TraitInputViewOpts } from './TraitInputView';\n\nexport default class TraitTextView extends TraitInputView> {\n protected type: string = 'text';\n\n constructor(em: EditorModel, opts?: TraitInputViewOpts<'text'>) {\n super(em, opts);\n }\n\n getInputElem() {\n const { input, $input } = this;\n return input || ($input && $input.get && $input.get(0)) || this.getElInput();\n }\n\n get inputValue(): string {\n const el = this.getInputElem();\n return el?.value ?? this.target.value;\n }\n\n set inputValue(value: string) {\n const el = this.getInputElem();\n el && (el.value = value as any);\n }\n}\n","import { isFunction } from 'underscore';\nimport { View } from '../../common';\nimport EditorModel from '../../editor/model/Editor';\nimport { hasDnd } from '../../utils/mixins';\nimport Page from '../../pages/model/Page';\nimport TraitTextView from '../../common/traits/view/TraitTextView';\nimport { EventsHash } from 'backbone';\n\nexport interface PageViewConfig {\n em?: EditorModel;\n pStylePrefix?: string;\n}\n\nexport default class PageView extends View {\n className: string;\n\n highlightedClass = 'gjs-three-bg';\n\n render() {\n const { em, pfx, ppfx, model } = this;\n this.$el.attr('class', this.className);\n let input = new TraitTextView(em).setTarget('name', this.model, { changeProp: true });\n this.$el.append(input.render().el);\n return this;\n }\n events(): EventsHash {\n return {\n click: () => this.trigger('onClick', this),\n };\n }\n\n constructor(opt: any, config: PageViewConfig) {\n super(opt);\n this.config = config;\n const { model, pfx, ppfx } = this;\n const type = model.get('type') || 'default';\n this.className = `${ppfx}layer ${ppfx}layer__t-${type} no-select ${pfx}two-color`;\n }\n\n public get em(): EditorModel {\n return this.config.em;\n }\n\n public get ppfx(): string {\n return this.em.getConfig().stylePrefix!;\n }\n\n public get pfx(): string {\n return this.config.stylePrefix;\n }\n\n setHighlighted(status: boolean) {\n status ? this.$el.addClass(this.highlightedClass) : this.$el.removeClass(this.highlightedClass);\n }\n\n config: any;\n\n get page() {\n return this.model;\n }\n}\n","import PagesManager from '../../pages';\nimport { $, View } from '../../common';\nimport EditorModel from '../../editor/model/Editor';\nimport Page from '../model/Page';\nimport Pages from '../model/Pages';\nimport PageView from './PageView';\n\nexport interface PagesViewConfig {\n em: EditorModel;\n pStylePrefix?: string;\n}\n\nexport default class PagesView extends View {\n em: EditorModel;\n config: PagesViewConfig;\n ppfx: string;\n\n selectedView?: PageView;\n\n events() {\n const { buttonAddId, buttonRemoveId } = this;\n const buttonAddEvent = 'click #' + buttonAddId;\n const buttonRemoveEvent = 'click #' + buttonRemoveId;\n return {\n [buttonAddEvent]: this.__addPage,\n [buttonRemoveEvent]: this.__removePage,\n };\n }\n\n constructor(opts: any, config: PagesViewConfig) {\n super(opts);\n\n this.config = config || {};\n const ppfx = this.config.pStylePrefix || '';\n this.ppfx = ppfx;\n const coll = this.collection;\n this.listenTo(coll, 'reset', this.render);\n this.listenTo(coll, 'remove', this.render);\n this.em = this.config.em;\n }\n\n __getModule(): PagesManager {\n return this.em.Pages;\n }\n\n get buttonAddId() {\n const { ppfx } = this;\n return ppfx + 'button-add';\n }\n\n get buttonRemoveId() {\n const { ppfx } = this;\n return ppfx + 'button-remove';\n }\n\n private __addPage() {\n const { em } = this;\n this.collection.add(new Page({}, { em }));\n this.render();\n }\n\n __removePage() {\n if (this.selectedView) {\n this.collection.remove(this.selectedView.model);\n }\n }\n\n /**\n * Add new model to the collection\n * @param {Model} model\n * @private\n * */\n addTo(model: Page) {\n this.collection.add(model);\n }\n\n /**\n * Render new model inside the view\n * @param {Model} model\n * @param {Object} fragment Fragment collection\n * @private\n * */\n add(model: Page, fragment: DocumentFragment) {\n const { config } = this;\n const view = new PageView(\n {\n model,\n },\n config\n );\n const rendered = view.render().el;\n if (this.em.Pages.getSelected()?.id == model.id) {\n view.setHighlighted(true);\n this.selectedView = view;\n }\n\n view.on('onClick', this.selectedHandler, this);\n\n fragment.appendChild(rendered);\n }\n\n selectedHandler(view: PageView) {\n this.em.Pages.select(view.model);\n this.selectedView?.setHighlighted(false);\n this.trigger('selected', view.model);\n this.selectedView = view;\n this.selectedView.setHighlighted(true);\n }\n\n getCommandsNav() {\n const { buttonAddId, buttonRemoveId } = this;\n return $(`
\n
\n
\n
`);\n }\n\n render() {\n this.$el.empty();\n let container = $('
');\n container.className = 'gps-block';\n container.append(this.getCommandsNav());\n\n var frag = document.createDocumentFragment();\n this.collection.each(model => {\n this.add(model, frag);\n }, this);\n container.append(frag);\n\n this.$el.append(container);\n this.setElement(this.$el);\n return this;\n }\n}\n","export interface PageManagerConfig {\n /**\n * Style prefix.\n * @default 'pgs-'\n */\n stylePrefix?: string;\n\n /**\n * Specify the element to use as a container, string (query) or HTMLElement.\n * With the empty value, nothing will be rendered.\n * @default ''\n */\n appendTo?: string | HTMLElement;\n\n /**\n * Avoid rendering the default Trait Manager UI.\n * @default false\n */\n custom?: boolean;\n\n optionsTarget?: Record[];\n\n pages?: any[];\n}\n\nconst config: PageManagerConfig = {\n stylePrefix: 'pg-',\n appendTo: '',\n optionsTarget: [{ value: false }, { value: '_blank' }],\n custom: false,\n};\n\nexport default config;\n","import { isString } from 'underscore';\nimport { Model, $ } from '../..';\nimport Editor from '../../../editor';\nimport EditorModel from '../../../editor/model/Editor';\nimport Trait from '../model/Trait';\nimport TraitInputView, { TraitInputViewOpts } from './TraitInputView';\n\nexport interface TraitButtonViewOpts extends TraitInputViewOpts<'button'> {\n command: string | ((e: Editor, m: Model) => void);\n text?: string;\n full?: boolean;\n}\n\nexport default class TraitButtonView extends TraitInputView> {\n type = 'button';\n command: string | ((e: Editor, m: Model) => void);\n text?: string;\n full?: boolean;\n events() {\n return {\n 'click button': this.handleClick,\n };\n }\n\n constructor(em: EditorModel, opts: TraitButtonViewOpts) {\n super(em, opts);\n this.command = opts.command;\n this.text = opts.text;\n this.full = opts.full;\n }\n\n templateInput() {\n return '';\n }\n\n get inputValue(): any {\n return undefined;\n }\n\n set inputValue(value: any) {\n this.handleClick();\n }\n\n handleClick() {\n const { model, command, em } = this;\n if (command) {\n if (isString(command)) {\n em.Commands.run(command);\n } else {\n command(em.Editor, model as any);\n }\n }\n }\n\n getInputEl() {\n const { ppfx, text, full } = this;\n const className = `${ppfx}btn`;\n const input: any = $(\n ``\n );\n return input.get(0);\n }\n}\n","import EditorModel from '../../../editor/model/Editor';\nimport Trait from '../model/Trait';\nimport TraitInputView, { TraitInputViewOpts } from './TraitInputView';\n\nexport default class TraitCheckboxView extends TraitInputView> {\n type = 'checkbox';\n appendInput = false;\n\n constructor(em: EditorModel, opts?: TraitInputViewOpts<'checkbox'>) {\n super(em, opts);\n }\n\n templateInput() {\n const { ppfx, clsField } = this;\n return ``;\n }\n\n getInputElem() {\n const { input, $input } = this;\n return input || ($input && $input.get && $input.get(0)) || this.getElInput();\n }\n\n get inputValue(): boolean {\n const el = this.getInputElem();\n return el?.checked ?? this.target.value;\n }\n\n set inputValue(value: boolean) {\n console.log('Text input value ' + value);\n const el = this.getInputElem();\n el && (el.checked = !!value);\n }\n}\n","// @ts-nocheck\n// Without jquery I have to update few stuff\n//\n// Spectrum Colorpicker v1.8.0\n// https://github.com/bgrins/spectrum\n// Author: Brian Grinstead\n// License: MIT\nimport { hasWin } from './mixins';\n\nexport default function ($, undefined?: any) {\n 'use strict';\n if (!hasWin()) return;\n\n var defaultOpts = {\n // Callbacks\n beforeShow: noop,\n move: noop,\n change: noop,\n show: noop,\n hide: noop,\n\n // Options\n color: false,\n flat: false,\n showInput: false,\n allowEmpty: false,\n showButtons: true,\n clickoutFiresChange: true,\n showInitial: false,\n showPalette: false,\n showPaletteOnly: false,\n hideAfterPaletteSelect: false,\n togglePaletteOnly: false,\n showSelectionPalette: true,\n localStorageKey: false,\n appendTo: 'body',\n maxSelectionSize: 7,\n cancelText: 'cancel',\n chooseText: 'choose',\n togglePaletteMoreText: 'more',\n togglePaletteLessText: 'less',\n clearText: 'Clear Color Selection',\n noColorSelectedText: 'No Color Selected',\n preferredFormat: false,\n className: '', // Deprecated - use containerClassName and replacerClassName instead.\n containerClassName: '',\n replacerClassName: '',\n showAlpha: false,\n theme: 'sp-light',\n palette: [['#ffffff', '#000000', '#ff0000', '#ff8000', '#ffff00', '#008000', '#0000ff', '#4b0082', '#9400d3']],\n selectionPalette: [],\n disabled: false,\n offset: null,\n },\n spectrums = [],\n IE = !!/msie/i.exec(window.navigator.userAgent),\n rgbaSupport = (function () {\n function contains(str, substr) {\n return !!~('' + str).indexOf(substr);\n }\n\n var elem = document.createElement('div');\n var style = elem.style;\n style.cssText = 'background-color:rgba(0,0,0,.5)';\n return contains(style.backgroundColor, 'rgba') || contains(style.backgroundColor, 'hsla');\n })(),\n replaceInput = [\n \"
\",\n \"
\",\n \"
\",\n '
',\n ].join(''),\n markup = (function () {\n // IE does not support gradients with multiple stops, so we need to simulate\n // that for the rainbow slider with 8 divs that each have a single gradient\n var gradientFix = '';\n if (IE) {\n for (var i = 1; i <= 6; i++) {\n gradientFix += \"
\";\n }\n }\n\n return [\n \"
',\n ].join('');\n })();\n\n function paletteTemplate(p, color, className, opts) {\n var html = [];\n for (var i = 0; i < p.length; i++) {\n var current = p[i];\n if (current) {\n var tiny = tinycolor(current);\n var c = tiny.toHsl().l < 0.5 ? 'sp-thumb-el sp-thumb-dark' : 'sp-thumb-el sp-thumb-light';\n c += tinycolor.equals(color, current) ? ' sp-thumb-active' : '';\n var formattedString = tiny.toString(opts.preferredFormat || 'rgb');\n var swatchStyle = rgbaSupport ? 'background-color:' + tiny.toRgbString() : 'filter:' + tiny.toFilter();\n html.push(\n ''\n );\n } else {\n var cls = 'sp-clear-display';\n html.push(\n $('
')\n .append(\n $('').attr(\n 'title',\n opts.noColorSelectedText\n )\n )\n .html()\n );\n }\n }\n return \"
\" + html.join('') + '
';\n }\n\n function hideAll() {\n for (var i = 0; i < spectrums.length; i++) {\n if (spectrums[i]) {\n spectrums[i].hide();\n }\n }\n }\n\n function instanceOptions(o, callbackContext) {\n var opts = $.extend({}, defaultOpts, o);\n opts.callbacks = {\n move: bind(opts.move, callbackContext),\n change: bind(opts.change, callbackContext),\n show: bind(opts.show, callbackContext),\n hide: bind(opts.hide, callbackContext),\n beforeShow: bind(opts.beforeShow, callbackContext),\n };\n return opts;\n }\n\n function spectrum(element, o) {\n var opts = instanceOptions(o, element),\n flat = opts.flat,\n showSelectionPalette = opts.showSelectionPalette,\n localStorageKey = opts.localStorageKey,\n theme = opts.theme,\n callbacks = opts.callbacks,\n resize = throttle(reflow, 10),\n visible = false,\n isDragging = false,\n isDefault = true,\n dragWidth = 0,\n dragHeight = 0,\n dragHelperHeight = 0,\n slideHeight = 0,\n slideWidth = 0,\n alphaWidth = 0,\n alphaSlideHelperWidth = 0,\n slideHelperHeight = 0,\n currentHue = 0,\n currentSaturation = 0,\n currentValue = 0,\n currentAlpha = 1,\n palette = [],\n paletteArray = [],\n paletteLookup = {},\n selectionPalette = opts.selectionPalette.slice(0),\n maxSelectionSize = opts.maxSelectionSize,\n draggingClass = 'sp-dragging',\n shiftMovementDirection = null;\n\n var doc = element.ownerDocument,\n body = doc.body,\n boundElement = $(element),\n disabled = false,\n container = $(markup, doc).addClass(theme),\n pickerContainer = container.find('.sp-picker-container'),\n dragger = container.find('.sp-color'),\n dragHelper = container.find('.sp-dragger'),\n slider = container.find('.sp-hue'),\n slideHelper = container.find('.sp-slider'),\n alphaSliderInner = container.find('.sp-alpha-inner'),\n alphaSlider = container.find('.sp-alpha'),\n alphaSlideHelper = container.find('.sp-alpha-handle'),\n textInput = container.find('.sp-input'),\n paletteContainer = container.find('.sp-palette'),\n initialColorContainer = container.find('.sp-initial'),\n cancelButton = container.find('.sp-cancel'),\n clearButton = container.find('.sp-clear'),\n chooseButton = container.find('.sp-choose'),\n toggleButton = container.find('.sp-palette-toggle'),\n isInput = boundElement.is('input'),\n isInputTypeColor = isInput && boundElement.attr('type') === 'color' && inputTypeColorSupport(),\n shouldReplace = isInput && !flat,\n replacer = shouldReplace\n ? $(replaceInput).addClass(theme).addClass(opts.className).addClass(opts.replacerClassName)\n : $([]),\n offsetElement = shouldReplace ? replacer : boundElement,\n previewElement = replacer.find('.sp-preview-inner'),\n initialColor = opts.color || (isInput && boundElement.val()),\n colorOnShow = false,\n currentPreferredFormat = opts.preferredFormat,\n clickoutFiresChange = !opts.showButtons || opts.clickoutFiresChange,\n isEmpty = !initialColor,\n allowEmpty = opts.allowEmpty && !isInputTypeColor;\n\n function applyOptions() {\n if (opts.showPaletteOnly) {\n opts.showPalette = true;\n }\n\n toggleButton.text(opts.showPaletteOnly ? opts.togglePaletteMoreText : opts.togglePaletteLessText);\n\n if (opts.palette) {\n palette = opts.palette.slice(0);\n paletteArray = $.isArray(palette[0]) ? palette : [palette];\n paletteLookup = {};\n for (var i = 0; i < paletteArray.length; i++) {\n for (var j = 0; j < paletteArray[i].length; j++) {\n var rgb = tinycolor(paletteArray[i][j]).toRgbString();\n paletteLookup[rgb] = true;\n }\n }\n }\n\n container.toggleClass('sp-flat', flat);\n container.toggleClass('sp-input-disabled', !opts.showInput);\n container.toggleClass('sp-alpha-enabled', opts.showAlpha);\n container.toggleClass('sp-clear-enabled', allowEmpty);\n container.toggleClass('sp-buttons-disabled', !opts.showButtons);\n container.toggleClass('sp-palette-buttons-disabled', !opts.togglePaletteOnly);\n container.toggleClass('sp-palette-disabled', !opts.showPalette);\n container.toggleClass('sp-palette-only', opts.showPaletteOnly);\n container.toggleClass('sp-initial-disabled', !opts.showInitial);\n container.addClass(opts.className).addClass(opts.containerClassName);\n\n reflow();\n }\n\n function initialize() {\n if (IE) {\n container.find('*:not(input)').attr('unselectable', 'on');\n }\n\n applyOptions();\n\n if (shouldReplace) {\n boundElement.after(replacer).hide();\n }\n\n if (!allowEmpty) {\n clearButton.hide();\n }\n\n if (flat) {\n boundElement.after(container).hide();\n } else {\n var appendTo = opts.appendTo === 'parent' ? boundElement.parent() : $(opts.appendTo);\n if (appendTo.length !== 1) {\n appendTo = $('body');\n }\n\n appendTo.append(container);\n }\n\n updateSelectionPaletteFromStorage();\n\n offsetElement.bind('click.spectrum touchstart.spectrum', function (e) {\n if (!disabled) {\n toggle();\n }\n\n e.stopPropagation();\n\n if (!$(e.target).is('input')) {\n e.preventDefault();\n }\n });\n\n if (boundElement.is(':disabled') || opts.disabled === true) {\n disable();\n }\n\n // Prevent clicks from bubbling up to document. This would cause it to be hidden.\n container.click(stopPropagation);\n\n // Handle user typed input\n textInput.change(setFromTextInput);\n textInput.bind('paste', function () {\n setTimeout(setFromTextInput, 1);\n });\n textInput.keydown(function (e) {\n if (e.keyCode == 13) {\n setFromTextInput();\n }\n });\n\n cancelButton.text(opts.cancelText);\n cancelButton.bind('click.spectrum', function (e) {\n e.stopPropagation();\n e.preventDefault();\n revert();\n hide();\n });\n\n clearButton.attr('title', opts.clearText);\n clearButton.bind('click.spectrum', function (e) {\n e.stopPropagation();\n e.preventDefault();\n isEmpty = true;\n move();\n\n if (flat) {\n //for the flat style, this is a change event\n updateOriginalInput(true);\n }\n });\n\n chooseButton.text(opts.chooseText);\n chooseButton.bind('click.spectrum', function (e) {\n e.stopPropagation();\n e.preventDefault();\n\n if (IE && textInput.is(':focus')) {\n textInput.trigger('change');\n }\n\n if (isValid()) {\n updateOriginalInput(true);\n hide();\n }\n });\n\n toggleButton.text(opts.showPaletteOnly ? opts.togglePaletteMoreText : opts.togglePaletteLessText);\n toggleButton.bind('click.spectrum', function (e) {\n e.stopPropagation();\n e.preventDefault();\n\n opts.showPaletteOnly = !opts.showPaletteOnly;\n\n // To make sure the Picker area is drawn on the right, next to the\n // Palette area (and not below the palette), first move the Palette\n // to the left to make space for the picker, plus 5px extra.\n // The 'applyOptions' function puts the whole container back into place\n // and takes care of the button-text and the sp-palette-only CSS class.\n if (!opts.showPaletteOnly && !flat) {\n container.css('left', '-=' + (pickerContainer.outerWidth(true) + 5));\n }\n applyOptions();\n });\n\n draggable(\n alphaSlider,\n function (dragX, dragY, e) {\n currentAlpha = dragX / alphaWidth;\n isEmpty = false;\n if (e.shiftKey) {\n currentAlpha = Math.round(currentAlpha * 10) / 10;\n }\n\n move();\n },\n dragStart,\n dragStop\n );\n\n draggable(\n slider,\n function (dragX, dragY) {\n currentHue = parseFloat(dragY / slideHeight);\n isEmpty = false;\n if (!opts.showAlpha) {\n currentAlpha = 1;\n }\n move();\n },\n dragStart,\n dragStop\n );\n\n draggable(\n dragger,\n function (dragX, dragY, e) {\n // shift+drag should snap the movement to either the x or y axis.\n if (!e.shiftKey) {\n shiftMovementDirection = null;\n } else if (!shiftMovementDirection) {\n var oldDragX = currentSaturation * dragWidth;\n var oldDragY = dragHeight - currentValue * dragHeight;\n var furtherFromX = Math.abs(dragX - oldDragX) > Math.abs(dragY - oldDragY);\n\n shiftMovementDirection = furtherFromX ? 'x' : 'y';\n }\n\n var setSaturation = !shiftMovementDirection || shiftMovementDirection === 'x';\n var setValue = !shiftMovementDirection || shiftMovementDirection === 'y';\n\n if (setSaturation) {\n currentSaturation = parseFloat(dragX / dragWidth);\n }\n if (setValue) {\n currentValue = parseFloat((dragHeight - dragY) / dragHeight);\n }\n\n isEmpty = false;\n if (!opts.showAlpha) {\n currentAlpha = 1;\n }\n\n move();\n },\n dragStart,\n dragStop\n );\n\n if (!!initialColor) {\n set(initialColor);\n\n // In case color was black - update the preview UI and set the format\n // since the set function will not run (default color is black).\n updateUI();\n currentPreferredFormat = opts.preferredFormat || tinycolor(initialColor).getFormat();\n\n addColorToSelectionPalette(initialColor);\n } else {\n updateUI();\n }\n\n if (flat) {\n show();\n }\n\n function paletteElementClick(e) {\n if (e.data && e.data.ignore) {\n set($(e.target).closest('.sp-thumb-el').data('color'));\n move();\n } else {\n set($(e.target).closest('.sp-thumb-el').data('color'));\n move();\n if (opts.hideAfterPaletteSelect) {\n updateOriginalInput(true);\n hide();\n }\n }\n\n return false;\n }\n\n var paletteEvent = IE ? 'mousedown.spectrum' : 'click.spectrum touchstart.spectrum';\n paletteContainer.delegate('.sp-thumb-el', paletteEvent, paletteElementClick);\n initialColorContainer.delegate('.sp-thumb-el:nth-child(1)', paletteEvent, { ignore: true }, paletteElementClick);\n }\n\n function updateSelectionPaletteFromStorage() {\n if (localStorageKey && window.localStorage) {\n // Migrate old palettes over to new format. May want to remove this eventually.\n try {\n var oldPalette = window.localStorage[localStorageKey].split(',#');\n if (oldPalette.length > 1) {\n delete window.localStorage[localStorageKey];\n $.each(oldPalette, function (i, c) {\n addColorToSelectionPalette(c);\n });\n }\n } catch (e) {}\n\n try {\n selectionPalette = window.localStorage[localStorageKey].split(';');\n } catch (e) {}\n }\n }\n\n function addColorToSelectionPalette(color) {\n if (showSelectionPalette) {\n var rgb = tinycolor(color).toRgbString();\n if (!paletteLookup[rgb] && $.inArray(rgb, selectionPalette) === -1) {\n selectionPalette.push(rgb);\n while (selectionPalette.length > maxSelectionSize) {\n selectionPalette.shift();\n }\n }\n\n if (localStorageKey && window.localStorage) {\n try {\n window.localStorage[localStorageKey] = selectionPalette.join(';');\n } catch (e) {}\n }\n }\n }\n\n function getUniqueSelectionPalette() {\n var unique = [];\n if (opts.showPalette) {\n for (var i = 0; i < selectionPalette.length; i++) {\n var rgb = tinycolor(selectionPalette[i]).toRgbString();\n\n if (!paletteLookup[rgb]) {\n unique.push(selectionPalette[i]);\n }\n }\n }\n\n return unique.reverse().slice(0, opts.maxSelectionSize);\n }\n\n function drawPalette() {\n var currentColor = get();\n\n var html = $.map(paletteArray, function (palette, i) {\n return paletteTemplate(palette, currentColor, 'sp-palette-row sp-palette-row-' + i, opts);\n });\n\n updateSelectionPaletteFromStorage();\n\n if (selectionPalette) {\n html.push(\n paletteTemplate(getUniqueSelectionPalette(), currentColor, 'sp-palette-row sp-palette-row-selection', opts)\n );\n }\n\n paletteContainer.html(html.join(''));\n }\n\n function drawInitial() {\n if (opts.showInitial) {\n var initial = colorOnShow;\n var current = get();\n initialColorContainer.html(paletteTemplate([initial, current], current, 'sp-palette-row-initial', opts));\n }\n }\n\n function dragStart() {\n if (dragHeight <= 0 || dragWidth <= 0 || slideHeight <= 0) {\n reflow();\n }\n isDragging = true;\n container.addClass(draggingClass);\n shiftMovementDirection = null;\n boundElement.trigger('dragstart.spectrum', [get()]);\n }\n\n function dragStop() {\n isDragging = false;\n container.removeClass(draggingClass);\n boundElement.trigger('dragstop.spectrum', [get()]);\n }\n\n function setFromTextInput() {\n var value = textInput.val();\n\n if ((value === null || value === '') && allowEmpty) {\n set(null);\n updateOriginalInput(true);\n } else {\n var tiny = tinycolor(value);\n if (tiny.isValid()) {\n set(tiny);\n updateOriginalInput(true);\n } else {\n textInput.addClass('sp-validation-error');\n }\n }\n }\n\n function toggle() {\n if (visible) {\n hide();\n } else {\n show();\n }\n }\n\n function show() {\n var event = $.Event('beforeShow.spectrum');\n\n if (visible) {\n reflow();\n return;\n }\n\n boundElement.trigger('beforeShow.spectrum', [get()]);\n\n if (callbacks.beforeShow(get()) === false || event.isDefaultPrevented()) {\n return;\n }\n\n hideAll();\n visible = true;\n\n var $doc = $(doc);\n $doc.bind('keydown.spectrum', onkeydown);\n $doc.bind('click.spectrum', clickout);\n $(window).bind('resize.spectrum', resize);\n replacer.addClass('sp-active');\n container.removeClass('sp-hidden');\n\n reflow();\n updateUI();\n\n colorOnShow = get();\n\n drawInitial();\n callbacks.show(colorOnShow);\n boundElement.trigger('show.spectrum', [colorOnShow]);\n }\n\n function onkeydown(e) {\n // Close on ESC\n if (e.keyCode === 27) {\n hide();\n }\n }\n\n function clickout(e) {\n // Return on right click.\n if (e.button == 2) {\n return;\n }\n\n // If a drag event was happening during the mouseup, don't hide\n // on click.\n if (isDragging) {\n return;\n }\n\n if (clickoutFiresChange) {\n updateOriginalInput(true);\n } else {\n revert();\n }\n hide();\n }\n\n function hide() {\n // Return if hiding is unnecessary\n if (!visible || flat) {\n return;\n }\n visible = false;\n\n $(doc).unbind('keydown.spectrum', onkeydown);\n $(doc).unbind('click.spectrum', clickout);\n $(window).unbind('resize.spectrum', resize);\n\n replacer.removeClass('sp-active');\n container.addClass('sp-hidden');\n\n callbacks.hide(get());\n boundElement.trigger('hide.spectrum', [get()]);\n }\n\n function revert() {\n set(colorOnShow, true);\n }\n\n function set(color, ignoreFormatChange) {\n if (tinycolor.equals(color, get())) {\n // Update UI just in case a validation error needs\n // to be cleared.\n updateUI();\n return;\n }\n\n var newColor, newHsv;\n if (!color && allowEmpty) {\n isEmpty = true;\n } else {\n isEmpty = false;\n isDefault = !color; // if no color is available an empty string will be passed. tinycolor will then set it to #000\n newColor = tinycolor(color);\n newHsv = newColor.toHsv();\n\n currentHue = (newHsv.h % 360) / 360;\n currentSaturation = newHsv.s;\n currentValue = newHsv.v;\n currentAlpha = newHsv.a;\n }\n updateUI();\n\n if (newColor && newColor.isValid() && !ignoreFormatChange) {\n currentPreferredFormat = opts.preferredFormat || newColor.getFormat();\n }\n }\n\n function get(opts) {\n opts = opts || {};\n\n if (allowEmpty && isEmpty) {\n return null;\n }\n\n return tinycolor.fromRatio(\n {\n h: currentHue,\n s: currentSaturation,\n v: currentValue,\n a: Math.round(currentAlpha * 100) / 100,\n },\n { format: opts.format || currentPreferredFormat }\n );\n }\n\n function isValid() {\n return !textInput.hasClass('sp-validation-error');\n }\n\n function move() {\n updateUI();\n\n callbacks.move(get());\n boundElement.trigger('move.spectrum', [get()]);\n }\n\n function updateUI() {\n textInput.removeClass('sp-validation-error');\n\n updateHelperLocations();\n\n // Update dragger background color (gradients take care of saturation and value).\n var flatColor = tinycolor.fromRatio({ h: currentHue, s: 1, v: 1 });\n dragger.css('background-color', flatColor.toHexString());\n\n // Get a format that alpha will be included in (hex and names ignore alpha)\n var format = currentPreferredFormat;\n if (currentAlpha < 1 && !(currentAlpha === 0 && format === 'name')) {\n if (format === 'hex' || format === 'hex3' || format === 'hex6' || format === 'name') {\n format = 'rgb';\n }\n }\n\n var realColor = get({ format: format }),\n displayColor = '';\n\n //reset background info for preview element\n previewElement.removeClass('sp-clear-display');\n previewElement.css('background-color', 'transparent');\n\n if (!realColor && allowEmpty) {\n // Update the replaced elements background with icon indicating no color selection\n previewElement.addClass('sp-clear-display');\n } else {\n var realHex = realColor.toHexString(),\n realRgb = realColor.toRgbString();\n\n // Update the replaced elements background color (with actual selected color)\n if (rgbaSupport || realColor.alpha === 1) {\n previewElement.css('background-color', realRgb);\n } else {\n previewElement.css('background-color', 'transparent');\n previewElement.css('filter', realColor.toFilter());\n }\n\n if (opts.showAlpha) {\n var rgb = realColor.toRgb();\n rgb.a = 0;\n var realAlpha = tinycolor(rgb).toRgbString();\n var gradient = 'linear-gradient(left, ' + realAlpha + ', ' + realHex + ')';\n\n if (IE) {\n alphaSliderInner.css('filter', tinycolor(realAlpha).toFilter({ gradientType: 1 }, realHex));\n } else {\n alphaSliderInner.css('background', '-webkit-' + gradient);\n alphaSliderInner.css('background', '-moz-' + gradient);\n alphaSliderInner.css('background', '-ms-' + gradient);\n // Use current syntax gradient on unprefixed property.\n alphaSliderInner.css('background', 'linear-gradient(to right, ' + realAlpha + ', ' + realHex + ')');\n }\n }\n\n displayColor = realColor.toString(format);\n }\n\n // Update the text entry input as it changes happen\n if (opts.showInput) {\n textInput.val(displayColor);\n }\n\n if (opts.showPalette) {\n drawPalette();\n }\n\n drawInitial();\n }\n\n function updateHelperLocations() {\n var s = currentSaturation;\n var v = currentValue;\n\n if (allowEmpty && isEmpty) {\n //if selected color is empty, hide the helpers\n alphaSlideHelper.hide();\n slideHelper.hide();\n dragHelper.hide();\n } else {\n //make sure helpers are visible\n alphaSlideHelper.show();\n slideHelper.show();\n dragHelper.show();\n\n // Where to show the little circle in that displays your current selected color\n var dragX = s * dragWidth;\n var dragY = dragHeight - v * dragHeight;\n dragX = Math.max(-dragHelperHeight, Math.min(dragWidth - dragHelperHeight, dragX - dragHelperHeight));\n dragY = Math.max(-dragHelperHeight, Math.min(dragHeight - dragHelperHeight, dragY - dragHelperHeight));\n dragHelper.css({\n top: dragY + 'px',\n left: dragX + 'px',\n });\n\n var alphaX = currentAlpha * alphaWidth;\n alphaSlideHelper.css({\n left: alphaX - alphaSlideHelperWidth / 2 + 'px',\n });\n\n // Where to show the bar that displays your current selected hue\n var slideY = currentHue * slideHeight;\n slideHelper.css({\n top: slideY - slideHelperHeight + 'px',\n });\n }\n }\n\n function updateOriginalInput(fireCallback) {\n var color = get(),\n displayColor = '',\n hasChanged = isDefault ? true : !tinycolor.equals(color, colorOnShow);\n\n if (color) {\n displayColor = color.toString(currentPreferredFormat);\n // Update the selection palette with the current color\n !visible && addColorToSelectionPalette(color);\n }\n\n if (isInput) {\n boundElement.val(displayColor);\n }\n\n if (fireCallback && hasChanged) {\n callbacks.change(color);\n boundElement.trigger('change', [color]);\n }\n }\n\n function reflow() {\n if (!visible) {\n return; // Calculations would be useless and wouldn't be reliable anyways\n }\n dragWidth = dragger.width();\n dragHeight = dragger.height();\n dragHelperHeight = dragHelper.height();\n slideWidth = slider.width();\n slideHeight = slider.height();\n slideHelperHeight = slideHelper.height();\n alphaWidth = alphaSlider.width();\n alphaSlideHelperWidth = alphaSlideHelper.width();\n\n if (!flat) {\n container.css('position', 'absolute');\n if (opts.offset) {\n container.offset(opts.offset);\n } else {\n container.offset(getOffset(container, offsetElement));\n }\n }\n\n updateHelperLocations();\n\n if (opts.showPalette) {\n drawPalette();\n }\n\n boundElement.trigger('reflow.spectrum');\n }\n\n function destroy() {\n boundElement.show();\n offsetElement.unbind('click.spectrum touchstart.spectrum');\n container.remove();\n replacer.remove();\n spectrums[spect.id] = null;\n }\n\n function option(optionName, optionValue) {\n if (optionName === undefined) {\n return $.extend({}, opts);\n }\n if (optionValue === undefined) {\n return opts[optionName];\n }\n\n opts[optionName] = optionValue;\n\n if (optionName === 'preferredFormat') {\n currentPreferredFormat = opts.preferredFormat;\n }\n applyOptions();\n }\n\n function enable() {\n disabled = false;\n boundElement.attr('disabled', false);\n offsetElement.removeClass('sp-disabled');\n }\n\n function disable() {\n hide();\n disabled = true;\n boundElement.attr('disabled', true);\n offsetElement.addClass('sp-disabled');\n }\n\n function setOffset(coord) {\n opts.offset = coord;\n reflow();\n }\n\n initialize();\n\n var spect = {\n show: show,\n hide: hide,\n toggle: toggle,\n reflow: reflow,\n option: option,\n enable: enable,\n disable: disable,\n offset: setOffset,\n set: function (c) {\n set(c);\n updateOriginalInput();\n },\n get: get,\n destroy: destroy,\n container: container,\n };\n\n spect.id = spectrums.push(spect) - 1;\n\n return spect;\n }\n\n /**\n * checkOffset - get the offset below/above and left/right element depending on screen position\n * Thanks https://github.com/jquery/jquery-ui/blob/master/ui/jquery.ui.datepicker.js\n */\n function getOffset(picker, input) {\n var extraY = 0;\n var dpWidth = picker.outerWidth();\n var dpHeight = picker.outerHeight();\n var inputHeight = input.outerHeight();\n var doc = picker[0].ownerDocument;\n var docElem = doc.documentElement;\n var cW = docElem.clientWidth;\n var cH = docElem.clientHeight;\n var scL = $(doc).scrollLeft();\n var scT = $(doc).scrollTop();\n var viewWidth = cW + scL;\n var viewHeight = cH + scT;\n var offset = input.offset();\n\n offset.top += inputHeight;\n\n offset.left -= Math.min(\n offset.left,\n offset.left + dpWidth > viewWidth && viewWidth > dpWidth ? Math.abs(offset.left + dpWidth - viewWidth) : 0\n );\n\n offset.top -= Math.min(\n offset.top,\n offset.top + dpHeight > viewHeight && viewHeight > dpHeight ? Math.abs(dpHeight + inputHeight - extraY) : extraY\n );\n\n return offset;\n }\n\n /**\n * noop - do nothing\n */\n function noop() {}\n\n /**\n * stopPropagation - makes the code only doing this a little easier to read in line\n */\n function stopPropagation(e) {\n e.stopPropagation();\n }\n\n /**\n * Create a function bound to a given object\n * Thanks to underscore.js\n */\n function bind(func, obj) {\n var slice = Array.prototype.slice;\n var args = slice.call(arguments, 2);\n return function () {\n return func.apply(obj, args.concat(slice.call(arguments)));\n };\n }\n\n /**\n * Lightweight drag helper. Handles containment within the element, so that\n * when dragging, the x is within [0,element.width] and y is within [0,element.height]\n */\n function draggable(element, onmove, onstart, onstop) {\n onmove = onmove || function () {};\n onstart = onstart || function () {};\n onstop = onstop || function () {};\n var doc = document;\n var dragging = false;\n var offset = {};\n var maxHeight = 0;\n var maxWidth = 0;\n var hasTouch = 'ontouchstart' in window;\n\n var duringDragEvents = {};\n duringDragEvents['selectstart'] = prevent;\n duringDragEvents['dragstart'] = prevent;\n duringDragEvents['touchmove mousemove'] = move;\n duringDragEvents['touchend mouseup'] = stop;\n\n function prevent(e) {\n if (e.stopPropagation) {\n e.stopPropagation();\n }\n if (e.preventDefault) {\n e.preventDefault();\n }\n e.returnValue = false;\n }\n\n function move(e) {\n if (dragging) {\n // Mouseup happened outside of window\n if (IE && doc.documentMode < 9 && !e.button) {\n return stop();\n }\n\n var t0 = e && e.touches && e.touches[0];\n var pageX = (t0 && t0.pageX) || e.pageX;\n var pageY = (t0 && t0.pageY) || e.pageY;\n\n var dragX = Math.max(0, Math.min(pageX - offset.left, maxWidth));\n var dragY = Math.max(0, Math.min(pageY - offset.top, maxHeight));\n\n if (hasTouch) {\n // Stop scrolling in iOS\n prevent(e);\n }\n\n onmove.apply(element, [dragX, dragY, e]);\n }\n }\n\n function start(e) {\n var rightclick = e.which ? e.which == 3 : e.button == 2;\n\n if (!rightclick && !dragging) {\n if (onstart.apply(element, arguments) !== false) {\n dragging = true;\n maxHeight = $(element).height();\n maxWidth = $(element).width();\n offset = $(element).offset();\n\n $(doc).bind(duringDragEvents);\n $(doc.body).addClass('sp-dragging');\n\n move(e);\n\n prevent(e);\n }\n }\n }\n\n function stop() {\n if (dragging) {\n $(doc).unbind(duringDragEvents);\n $(doc.body).removeClass('sp-dragging');\n\n // Wait a tick before notifying observers to allow the click event\n // to fire in Chrome.\n setTimeout(function () {\n onstop.apply(element, arguments);\n }, 0);\n }\n dragging = false;\n }\n\n $(element).bind('touchstart mousedown', start);\n }\n\n function throttle(func, wait, debounce) {\n var timeout;\n return function () {\n var context = this,\n args = arguments;\n var throttler = function () {\n timeout = null;\n func.apply(context, args);\n };\n if (debounce) clearTimeout(timeout);\n if (debounce || !timeout) timeout = setTimeout(throttler, wait);\n };\n }\n\n function inputTypeColorSupport() {\n return $.fn.spectrum.inputTypeColorSupport();\n }\n\n /**\n * Define a jQuery plugin\n */\n var dataID = 'spectrum.id';\n $.fn.spectrum = function (opts, extra) {\n if (typeof opts == 'string') {\n var returnValue = this;\n var args = Array.prototype.slice.call(arguments, 1);\n\n this.each(function () {\n var spect = spectrums[$(this).data(dataID)];\n if (spect) {\n var method = spect[opts];\n if (!method) {\n throw new Error(\"Spectrum: no such method: '\" + opts + \"'\");\n }\n\n if (opts == 'get') {\n returnValue = spect.get();\n } else if (opts == 'container') {\n returnValue = spect.container;\n } else if (opts == 'option') {\n returnValue = spect.option.apply(spect, args);\n } else if (opts == 'destroy') {\n spect.destroy();\n $(this).removeData(dataID);\n } else {\n method.apply(spect, args);\n }\n }\n });\n\n return returnValue;\n }\n\n // Initializing a new instance of spectrum\n return this.spectrum('destroy').each(function () {\n var options = $.extend({}, opts, $(this).data());\n var spect = spectrum(this, options);\n $(this).data(dataID, spect.id);\n });\n };\n\n $.fn.spectrum.load = true;\n $.fn.spectrum.loadOpts = {};\n $.fn.spectrum.draggable = draggable;\n $.fn.spectrum.defaults = defaultOpts;\n $.fn.spectrum.inputTypeColorSupport = function inputTypeColorSupport() {\n if (typeof inputTypeColorSupport._cachedResult === 'undefined') {\n var colorInput = $(\"\")[0]; // if color element is supported, value will default to not null\n inputTypeColorSupport._cachedResult = colorInput.type === 'color' && colorInput.value !== '';\n }\n return inputTypeColorSupport._cachedResult;\n };\n\n $.spectrum = {};\n $.spectrum.localization = {};\n $.spectrum.palettes = {};\n\n $.fn.spectrum.processNativeColorInputs = function () {\n var colorInputs = $('input[type=color]');\n if (colorInputs.length && !inputTypeColorSupport()) {\n colorInputs.spectrum({\n preferredFormat: 'hex6',\n });\n }\n };\n\n // TinyColor v1.1.2\n // https://github.com/bgrins/TinyColor\n // Brian Grinstead, MIT License\n\n //(function() {\n\n var trimLeft = /^[\\s,#]+/,\n trimRight = /\\s+$/,\n tinyCounter = 0,\n math = Math,\n mathRound = math.round,\n mathMin = math.min,\n mathMax = math.max,\n mathRandom = math.random;\n\n var tinycolor = function (color, opts) {\n color = color ? color : '';\n opts = opts || {};\n\n // If input is already a tinycolor, return itself\n if (color instanceof tinycolor) {\n return color;\n }\n // If we are called as a function, call using new instead\n if (!(this instanceof tinycolor)) {\n return new tinycolor(color, opts);\n }\n\n var rgb = inputToRGB(color);\n (this._originalInput = color),\n (this._r = rgb.r),\n (this._g = rgb.g),\n (this._b = rgb.b),\n (this._a = rgb.a),\n (this._roundA = mathRound(100 * this._a) / 100),\n (this._format = opts.format || rgb.format);\n this._gradientType = opts.gradientType;\n\n // Don't let the range of [0,255] come back in [0,1].\n // Potentially lose a little bit of precision here, but will fix issues where\n // .5 gets interpreted as half of the total, instead of half of 1\n // If it was supposed to be 128, this was already taken care of by `inputToRgb`\n if (this._r < 1) {\n this._r = mathRound(this._r);\n }\n if (this._g < 1) {\n this._g = mathRound(this._g);\n }\n if (this._b < 1) {\n this._b = mathRound(this._b);\n }\n\n this._ok = rgb.ok;\n this._tc_id = tinyCounter++;\n };\n\n tinycolor.prototype = {\n isDark: function () {\n return this.getBrightness() < 128;\n },\n isLight: function () {\n return !this.isDark();\n },\n isValid: function () {\n return this._ok;\n },\n getOriginalInput: function () {\n return this._originalInput;\n },\n getFormat: function () {\n return this._format;\n },\n getAlpha: function () {\n return this._a;\n },\n getBrightness: function () {\n var rgb = this.toRgb();\n return (rgb.r * 299 + rgb.g * 587 + rgb.b * 114) / 1000;\n },\n setAlpha: function (value) {\n this._a = boundAlpha(value);\n this._roundA = mathRound(100 * this._a) / 100;\n return this;\n },\n toHsv: function () {\n var hsv = rgbToHsv(this._r, this._g, this._b);\n return { h: hsv.h * 360, s: hsv.s, v: hsv.v, a: this._a };\n },\n toHsvString: function () {\n var hsv = rgbToHsv(this._r, this._g, this._b);\n var h = mathRound(hsv.h * 360),\n s = mathRound(hsv.s * 100),\n v = mathRound(hsv.v * 100);\n return this._a == 1\n ? 'hsv(' + h + ', ' + s + '%, ' + v + '%)'\n : 'hsva(' + h + ', ' + s + '%, ' + v + '%, ' + this._roundA + ')';\n },\n toHsl: function () {\n var hsl = rgbToHsl(this._r, this._g, this._b);\n return { h: hsl.h * 360, s: hsl.s, l: hsl.l, a: this._a };\n },\n toHslString: function () {\n var hsl = rgbToHsl(this._r, this._g, this._b);\n var h = mathRound(hsl.h * 360),\n s = mathRound(hsl.s * 100),\n l = mathRound(hsl.l * 100);\n return this._a == 1\n ? 'hsl(' + h + ', ' + s + '%, ' + l + '%)'\n : 'hsla(' + h + ', ' + s + '%, ' + l + '%, ' + this._roundA + ')';\n },\n toHex: function (allow3Char) {\n return rgbToHex(this._r, this._g, this._b, allow3Char);\n },\n toHexString: function (allow3Char) {\n return '#' + this.toHex(allow3Char);\n },\n toHex8: function () {\n return rgbaToHex(this._r, this._g, this._b, this._a);\n },\n toHex8String: function () {\n return '#' + this.toHex8();\n },\n toRgb: function () {\n return {\n r: mathRound(this._r),\n g: mathRound(this._g),\n b: mathRound(this._b),\n a: this._a,\n };\n },\n toRgbString: function () {\n return this._a == 1\n ? 'rgb(' + mathRound(this._r) + ', ' + mathRound(this._g) + ', ' + mathRound(this._b) + ')'\n : 'rgba(' +\n mathRound(this._r) +\n ', ' +\n mathRound(this._g) +\n ', ' +\n mathRound(this._b) +\n ', ' +\n this._roundA +\n ')';\n },\n toPercentageRgb: function () {\n return {\n r: mathRound(bound01(this._r, 255) * 100) + '%',\n g: mathRound(bound01(this._g, 255) * 100) + '%',\n b: mathRound(bound01(this._b, 255) * 100) + '%',\n a: this._a,\n };\n },\n toPercentageRgbString: function () {\n return this._a == 1\n ? 'rgb(' +\n mathRound(bound01(this._r, 255) * 100) +\n '%, ' +\n mathRound(bound01(this._g, 255) * 100) +\n '%, ' +\n mathRound(bound01(this._b, 255) * 100) +\n '%)'\n : 'rgba(' +\n mathRound(bound01(this._r, 255) * 100) +\n '%, ' +\n mathRound(bound01(this._g, 255) * 100) +\n '%, ' +\n mathRound(bound01(this._b, 255) * 100) +\n '%, ' +\n this._roundA +\n ')';\n },\n toName: function () {\n if (this._a === 0) {\n return 'transparent';\n }\n\n if (this._a < 1) {\n return false;\n }\n\n return hexNames[rgbToHex(this._r, this._g, this._b, true)] || false;\n },\n toFilter: function (secondColor) {\n var hex8String = '#' + rgbaToHex(this._r, this._g, this._b, this._a);\n var secondHex8String = hex8String;\n var gradientType = this._gradientType ? 'GradientType = 1, ' : '';\n\n if (secondColor) {\n var s = tinycolor(secondColor);\n secondHex8String = s.toHex8String();\n }\n\n return (\n 'progid:DXImageTransform.Microsoft.gradient(' +\n gradientType +\n 'startColorstr=' +\n hex8String +\n ',endColorstr=' +\n secondHex8String +\n ')'\n );\n },\n toString: function (format) {\n var formatSet = !!format;\n format = format || this._format;\n\n var formattedString = false;\n var hasAlpha = this._a < 1 && this._a >= 0;\n var needsAlphaFormat =\n !formatSet && hasAlpha && (format === 'hex' || format === 'hex6' || format === 'hex3' || format === 'name');\n\n if (needsAlphaFormat) {\n // Special case for \"transparent\", all other non-alpha formats\n // will return rgba when there is transparency.\n if (format === 'name' && this._a === 0) {\n return this.toName();\n }\n return this.toRgbString();\n }\n if (format === 'rgb') {\n formattedString = this.toRgbString();\n }\n if (format === 'prgb') {\n formattedString = this.toPercentageRgbString();\n }\n if (format === 'hex' || format === 'hex6') {\n formattedString = this.toHexString();\n }\n if (format === 'hex3') {\n formattedString = this.toHexString(true);\n }\n if (format === 'hex8') {\n formattedString = this.toHex8String();\n }\n if (format === 'name') {\n formattedString = this.toName();\n }\n if (format === 'hsl') {\n formattedString = this.toHslString();\n }\n if (format === 'hsv') {\n formattedString = this.toHsvString();\n }\n\n return formattedString || this.toHexString();\n },\n\n _applyModification: function (fn, args) {\n var color = fn.apply(null, [this].concat([].slice.call(args)));\n this._r = color._r;\n this._g = color._g;\n this._b = color._b;\n this.setAlpha(color._a);\n return this;\n },\n lighten: function () {\n return this._applyModification(lighten, arguments);\n },\n brighten: function () {\n return this._applyModification(brighten, arguments);\n },\n darken: function () {\n return this._applyModification(darken, arguments);\n },\n desaturate: function () {\n return this._applyModification(desaturate, arguments);\n },\n saturate: function () {\n return this._applyModification(saturate, arguments);\n },\n greyscale: function () {\n return this._applyModification(greyscale, arguments);\n },\n spin: function () {\n return this._applyModification(spin, arguments);\n },\n\n _applyCombination: function (fn, args) {\n return fn.apply(null, [this].concat([].slice.call(args)));\n },\n analogous: function () {\n return this._applyCombination(analogous, arguments);\n },\n complement: function () {\n return this._applyCombination(complement, arguments);\n },\n monochromatic: function () {\n return this._applyCombination(monochromatic, arguments);\n },\n splitcomplement: function () {\n return this._applyCombination(splitcomplement, arguments);\n },\n triad: function () {\n return this._applyCombination(triad, arguments);\n },\n tetrad: function () {\n return this._applyCombination(tetrad, arguments);\n },\n };\n\n // If input is an object, force 1 into \"1.0\" to handle ratios properly\n // String input requires \"1.0\" as input, so 1 will be treated as 1\n tinycolor.fromRatio = function (color, opts) {\n if (typeof color == 'object') {\n var newColor = {};\n for (var i in color) {\n if (color.hasOwnProperty(i)) {\n if (i === 'a') {\n newColor[i] = color[i];\n } else {\n newColor[i] = convertToPercentage(color[i]);\n }\n }\n }\n color = newColor;\n }\n\n return tinycolor(color, opts);\n };\n\n // Given a string or object, convert that input to RGB\n // Possible string inputs:\n //\n // \"red\"\n // \"#f00\" or \"f00\"\n // \"#ff0000\" or \"ff0000\"\n // \"#ff000000\" or \"ff000000\"\n // \"rgb 255 0 0\" or \"rgb (255, 0, 0)\"\n // \"rgb 1.0 0 0\" or \"rgb (1, 0, 0)\"\n // \"rgba (255, 0, 0, 1)\" or \"rgba 255, 0, 0, 1\"\n // \"rgba (1.0, 0, 0, 1)\" or \"rgba 1.0, 0, 0, 1\"\n // \"hsl(0, 100%, 50%)\" or \"hsl 0 100% 50%\"\n // \"hsla(0, 100%, 50%, 1)\" or \"hsla 0 100% 50%, 1\"\n // \"hsv(0, 100%, 100%)\" or \"hsv 0 100% 100%\"\n //\n function inputToRGB(color) {\n var rgb = { r: 0, g: 0, b: 0 };\n var a = 1;\n var ok = false;\n var format = false;\n\n if (typeof color == 'string') {\n color = stringInputToObject(color);\n }\n\n if (typeof color == 'object') {\n if (color.hasOwnProperty('r') && color.hasOwnProperty('g') && color.hasOwnProperty('b')) {\n rgb = rgbToRgb(color.r, color.g, color.b);\n ok = true;\n format = String(color.r).substr(-1) === '%' ? 'prgb' : 'rgb';\n } else if (color.hasOwnProperty('h') && color.hasOwnProperty('s') && color.hasOwnProperty('v')) {\n color.s = convertToPercentage(color.s);\n color.v = convertToPercentage(color.v);\n rgb = hsvToRgb(color.h, color.s, color.v);\n ok = true;\n format = 'hsv';\n } else if (color.hasOwnProperty('h') && color.hasOwnProperty('s') && color.hasOwnProperty('l')) {\n color.s = convertToPercentage(color.s);\n color.l = convertToPercentage(color.l);\n rgb = hslToRgb(color.h, color.s, color.l);\n ok = true;\n format = 'hsl';\n }\n\n if (color.hasOwnProperty('a')) {\n a = color.a;\n }\n }\n\n a = boundAlpha(a);\n\n return {\n ok: ok,\n format: color.format || format,\n r: mathMin(255, mathMax(rgb.r, 0)),\n g: mathMin(255, mathMax(rgb.g, 0)),\n b: mathMin(255, mathMax(rgb.b, 0)),\n a: a,\n };\n }\n\n // Conversion Functions\n // --------------------\n\n // `rgbToHsl`, `rgbToHsv`, `hslToRgb`, `hsvToRgb` modified from:\n // \n\n // `rgbToRgb`\n // Handle bounds / percentage checking to conform to CSS color spec\n // \n // *Assumes:* r, g, b in [0, 255] or [0, 1]\n // *Returns:* { r, g, b } in [0, 255]\n function rgbToRgb(r, g, b) {\n return {\n r: bound01(r, 255) * 255,\n g: bound01(g, 255) * 255,\n b: bound01(b, 255) * 255,\n };\n }\n\n // `rgbToHsl`\n // Converts an RGB color value to HSL.\n // *Assumes:* r, g, and b are contained in [0, 255] or [0, 1]\n // *Returns:* { h, s, l } in [0,1]\n function rgbToHsl(r, g, b) {\n r = bound01(r, 255);\n g = bound01(g, 255);\n b = bound01(b, 255);\n\n var max = mathMax(r, g, b),\n min = mathMin(r, g, b);\n var h,\n s,\n l = (max + min) / 2;\n\n if (max == min) {\n h = s = 0; // achromatic\n } else {\n var d = max - min;\n s = l > 0.5 ? d / (2 - max - min) : d / (max + min);\n switch (max) {\n case r:\n h = (g - b) / d + (g < b ? 6 : 0);\n break;\n case g:\n h = (b - r) / d + 2;\n break;\n case b:\n h = (r - g) / d + 4;\n break;\n }\n\n h /= 6;\n }\n\n return { h: h, s: s, l: l };\n }\n\n // `hslToRgb`\n // Converts an HSL color value to RGB.\n // *Assumes:* h is contained in [0, 1] or [0, 360] and s and l are contained [0, 1] or [0, 100]\n // *Returns:* { r, g, b } in the set [0, 255]\n function hslToRgb(h, s, l) {\n var r, g, b;\n\n h = bound01(h, 360);\n s = bound01(s, 100);\n l = bound01(l, 100);\n\n function hue2rgb(p, q, t) {\n if (t < 0) t += 1;\n if (t > 1) t -= 1;\n if (t < 1 / 6) return p + (q - p) * 6 * t;\n if (t < 1 / 2) return q;\n if (t < 2 / 3) return p + (q - p) * (2 / 3 - t) * 6;\n return p;\n }\n\n if (s === 0) {\n r = g = b = l; // achromatic\n } else {\n var q = l < 0.5 ? l * (1 + s) : l + s - l * s;\n var p = 2 * l - q;\n r = hue2rgb(p, q, h + 1 / 3);\n g = hue2rgb(p, q, h);\n b = hue2rgb(p, q, h - 1 / 3);\n }\n\n return { r: r * 255, g: g * 255, b: b * 255 };\n }\n\n // `rgbToHsv`\n // Converts an RGB color value to HSV\n // *Assumes:* r, g, and b are contained in the set [0, 255] or [0, 1]\n // *Returns:* { h, s, v } in [0,1]\n function rgbToHsv(r, g, b) {\n r = bound01(r, 255);\n g = bound01(g, 255);\n b = bound01(b, 255);\n\n var max = mathMax(r, g, b),\n min = mathMin(r, g, b);\n var h,\n s,\n v = max;\n\n var d = max - min;\n s = max === 0 ? 0 : d / max;\n\n if (max == min) {\n h = 0; // achromatic\n } else {\n switch (max) {\n case r:\n h = (g - b) / d + (g < b ? 6 : 0);\n break;\n case g:\n h = (b - r) / d + 2;\n break;\n case b:\n h = (r - g) / d + 4;\n break;\n }\n h /= 6;\n }\n return { h: h, s: s, v: v };\n }\n\n // `hsvToRgb`\n // Converts an HSV color value to RGB.\n // *Assumes:* h is contained in [0, 1] or [0, 360] and s and v are contained in [0, 1] or [0, 100]\n // *Returns:* { r, g, b } in the set [0, 255]\n function hsvToRgb(h, s, v) {\n h = bound01(h, 360) * 6;\n s = bound01(s, 100);\n v = bound01(v, 100);\n\n var i = math.floor(h),\n f = h - i,\n p = v * (1 - s),\n q = v * (1 - f * s),\n t = v * (1 - (1 - f) * s),\n mod = i % 6,\n r = [v, q, p, p, t, v][mod],\n g = [t, v, v, q, p, p][mod],\n b = [p, p, t, v, v, q][mod];\n\n return { r: r * 255, g: g * 255, b: b * 255 };\n }\n\n // `rgbToHex`\n // Converts an RGB color to hex\n // Assumes r, g, and b are contained in the set [0, 255]\n // Returns a 3 or 6 character hex\n function rgbToHex(r, g, b, allow3Char) {\n var hex = [pad2(mathRound(r).toString(16)), pad2(mathRound(g).toString(16)), pad2(mathRound(b).toString(16))];\n\n // Return a 3 character hex if possible\n if (\n allow3Char &&\n hex[0].charAt(0) == hex[0].charAt(1) &&\n hex[1].charAt(0) == hex[1].charAt(1) &&\n hex[2].charAt(0) == hex[2].charAt(1)\n ) {\n return hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0);\n }\n\n return hex.join('');\n }\n // `rgbaToHex`\n // Converts an RGBA color plus alpha transparency to hex\n // Assumes r, g, b and a are contained in the set [0, 255]\n // Returns an 8 character hex\n function rgbaToHex(r, g, b, a) {\n var hex = [\n pad2(convertDecimalToHex(a)),\n pad2(mathRound(r).toString(16)),\n pad2(mathRound(g).toString(16)),\n pad2(mathRound(b).toString(16)),\n ];\n\n return hex.join('');\n }\n\n // `equals`\n // Can be called with any tinycolor input\n tinycolor.equals = function (color1, color2) {\n if (!color1 || !color2) {\n return false;\n }\n return tinycolor(color1).toRgbString() == tinycolor(color2).toRgbString();\n };\n tinycolor.random = function () {\n return tinycolor.fromRatio({\n r: mathRandom(),\n g: mathRandom(),\n b: mathRandom(),\n });\n };\n\n // Modification Functions\n // ----------------------\n // Thanks to less.js for some of the basics here\n // \n\n function desaturate(color, amount) {\n amount = amount === 0 ? 0 : amount || 10;\n var hsl = tinycolor(color).toHsl();\n hsl.s -= amount / 100;\n hsl.s = clamp01(hsl.s);\n return tinycolor(hsl);\n }\n\n function saturate(color, amount) {\n amount = amount === 0 ? 0 : amount || 10;\n var hsl = tinycolor(color).toHsl();\n hsl.s += amount / 100;\n hsl.s = clamp01(hsl.s);\n return tinycolor(hsl);\n }\n\n function greyscale(color) {\n return tinycolor(color).desaturate(100);\n }\n\n function lighten(color, amount) {\n amount = amount === 0 ? 0 : amount || 10;\n var hsl = tinycolor(color).toHsl();\n hsl.l += amount / 100;\n hsl.l = clamp01(hsl.l);\n return tinycolor(hsl);\n }\n\n function brighten(color, amount) {\n amount = amount === 0 ? 0 : amount || 10;\n var rgb = tinycolor(color).toRgb();\n rgb.r = mathMax(0, mathMin(255, rgb.r - mathRound(255 * -(amount / 100))));\n rgb.g = mathMax(0, mathMin(255, rgb.g - mathRound(255 * -(amount / 100))));\n rgb.b = mathMax(0, mathMin(255, rgb.b - mathRound(255 * -(amount / 100))));\n return tinycolor(rgb);\n }\n\n function darken(color, amount) {\n amount = amount === 0 ? 0 : amount || 10;\n var hsl = tinycolor(color).toHsl();\n hsl.l -= amount / 100;\n hsl.l = clamp01(hsl.l);\n return tinycolor(hsl);\n }\n\n // Spin takes a positive or negative amount within [-360, 360] indicating the change of hue.\n // Values outside of this range will be wrapped into this range.\n function spin(color, amount) {\n var hsl = tinycolor(color).toHsl();\n var hue = (mathRound(hsl.h) + amount) % 360;\n hsl.h = hue < 0 ? 360 + hue : hue;\n return tinycolor(hsl);\n }\n\n // Combination Functions\n // ---------------------\n // Thanks to jQuery xColor for some of the ideas behind these\n // \n\n function complement(color) {\n var hsl = tinycolor(color).toHsl();\n hsl.h = (hsl.h + 180) % 360;\n return tinycolor(hsl);\n }\n\n function triad(color) {\n var hsl = tinycolor(color).toHsl();\n var h = hsl.h;\n return [\n tinycolor(color),\n tinycolor({ h: (h + 120) % 360, s: hsl.s, l: hsl.l }),\n tinycolor({ h: (h + 240) % 360, s: hsl.s, l: hsl.l }),\n ];\n }\n\n function tetrad(color) {\n var hsl = tinycolor(color).toHsl();\n var h = hsl.h;\n return [\n tinycolor(color),\n tinycolor({ h: (h + 90) % 360, s: hsl.s, l: hsl.l }),\n tinycolor({ h: (h + 180) % 360, s: hsl.s, l: hsl.l }),\n tinycolor({ h: (h + 270) % 360, s: hsl.s, l: hsl.l }),\n ];\n }\n\n function splitcomplement(color) {\n var hsl = tinycolor(color).toHsl();\n var h = hsl.h;\n return [\n tinycolor(color),\n tinycolor({ h: (h + 72) % 360, s: hsl.s, l: hsl.l }),\n tinycolor({ h: (h + 216) % 360, s: hsl.s, l: hsl.l }),\n ];\n }\n\n function analogous(color, results, slices) {\n results = results || 6;\n slices = slices || 30;\n\n var hsl = tinycolor(color).toHsl();\n var part = 360 / slices;\n var ret = [tinycolor(color)];\n\n for (hsl.h = (hsl.h - ((part * results) >> 1) + 720) % 360; --results; ) {\n hsl.h = (hsl.h + part) % 360;\n ret.push(tinycolor(hsl));\n }\n return ret;\n }\n\n function monochromatic(color, results) {\n results = results || 6;\n var hsv = tinycolor(color).toHsv();\n var h = hsv.h,\n s = hsv.s,\n v = hsv.v;\n var ret = [];\n var modification = 1 / results;\n\n while (results--) {\n ret.push(tinycolor({ h: h, s: s, v: v }));\n v = (v + modification) % 1;\n }\n\n return ret;\n }\n\n // Utility Functions\n // ---------------------\n\n tinycolor.mix = function (color1, color2, amount) {\n amount = amount === 0 ? 0 : amount || 50;\n\n var rgb1 = tinycolor(color1).toRgb();\n var rgb2 = tinycolor(color2).toRgb();\n\n var p = amount / 100;\n var w = p * 2 - 1;\n var a = rgb2.a - rgb1.a;\n\n var w1;\n\n if (w * a == -1) {\n w1 = w;\n } else {\n w1 = (w + a) / (1 + w * a);\n }\n\n w1 = (w1 + 1) / 2;\n\n var w2 = 1 - w1;\n\n var rgba = {\n r: rgb2.r * w1 + rgb1.r * w2,\n g: rgb2.g * w1 + rgb1.g * w2,\n b: rgb2.b * w1 + rgb1.b * w2,\n a: rgb2.a * p + rgb1.a * (1 - p),\n };\n\n return tinycolor(rgba);\n };\n\n // Readability Functions\n // ---------------------\n // \n\n // `readability`\n // Analyze the 2 colors and returns an object with the following properties:\n // `brightness`: difference in brightness between the two colors\n // `color`: difference in color/hue between the two colors\n tinycolor.readability = function (color1, color2) {\n var c1 = tinycolor(color1);\n var c2 = tinycolor(color2);\n var rgb1 = c1.toRgb();\n var rgb2 = c2.toRgb();\n var brightnessA = c1.getBrightness();\n var brightnessB = c2.getBrightness();\n var colorDiff =\n Math.max(rgb1.r, rgb2.r) -\n Math.min(rgb1.r, rgb2.r) +\n Math.max(rgb1.g, rgb2.g) -\n Math.min(rgb1.g, rgb2.g) +\n Math.max(rgb1.b, rgb2.b) -\n Math.min(rgb1.b, rgb2.b);\n\n return {\n brightness: Math.abs(brightnessA - brightnessB),\n color: colorDiff,\n };\n };\n\n // `readable`\n // http://www.w3.org/TR/AERT#color-contrast\n // Ensure that foreground and background color combinations provide sufficient contrast.\n // *Example*\n // tinycolor.isReadable(\"#000\", \"#111\") => false\n tinycolor.isReadable = function (color1, color2) {\n var readability = tinycolor.readability(color1, color2);\n return readability.brightness > 125 && readability.color > 500;\n };\n\n // `mostReadable`\n // Given a base color and a list of possible foreground or background\n // colors for that base, returns the most readable color.\n // *Example*\n // tinycolor.mostReadable(\"#123\", [\"#fff\", \"#000\"]) => \"#000\"\n tinycolor.mostReadable = function (baseColor, colorList) {\n var bestColor = null;\n var bestScore = 0;\n var bestIsReadable = false;\n for (var i = 0; i < colorList.length; i++) {\n // We normalize both around the \"acceptable\" breaking point,\n // but rank brightness constrast higher than hue.\n\n var readability = tinycolor.readability(baseColor, colorList[i]);\n var readable = readability.brightness > 125 && readability.color > 500;\n var score = 3 * (readability.brightness / 125) + readability.color / 500;\n\n if (\n (readable && !bestIsReadable) ||\n (readable && bestIsReadable && score > bestScore) ||\n (!readable && !bestIsReadable && score > bestScore)\n ) {\n bestIsReadable = readable;\n bestScore = score;\n bestColor = tinycolor(colorList[i]);\n }\n }\n return bestColor;\n };\n\n // Big List of Colors\n // ------------------\n // \n var names = (tinycolor.names = {\n aliceblue: 'f0f8ff',\n antiquewhite: 'faebd7',\n aqua: '0ff',\n aquamarine: '7fffd4',\n azure: 'f0ffff',\n beige: 'f5f5dc',\n bisque: 'ffe4c4',\n black: '000',\n blanchedalmond: 'ffebcd',\n blue: '00f',\n blueviolet: '8a2be2',\n brown: 'a52a2a',\n burlywood: 'deb887',\n burntsienna: 'ea7e5d',\n cadetblue: '5f9ea0',\n chartreuse: '7fff00',\n chocolate: 'd2691e',\n coral: 'ff7f50',\n cornflowerblue: '6495ed',\n cornsilk: 'fff8dc',\n crimson: 'dc143c',\n cyan: '0ff',\n darkblue: '00008b',\n darkcyan: '008b8b',\n darkgoldenrod: 'b8860b',\n darkgray: 'a9a9a9',\n darkgreen: '006400',\n darkgrey: 'a9a9a9',\n darkkhaki: 'bdb76b',\n darkmagenta: '8b008b',\n darkolivegreen: '556b2f',\n darkorange: 'ff8c00',\n darkorchid: '9932cc',\n darkred: '8b0000',\n darksalmon: 'e9967a',\n darkseagreen: '8fbc8f',\n darkslateblue: '483d8b',\n darkslategray: '2f4f4f',\n darkslategrey: '2f4f4f',\n darkturquoise: '00ced1',\n darkviolet: '9400d3',\n deeppink: 'ff1493',\n deepskyblue: '00bfff',\n dimgray: '696969',\n dimgrey: '696969',\n dodgerblue: '1e90ff',\n firebrick: 'b22222',\n floralwhite: 'fffaf0',\n forestgreen: '228b22',\n fuchsia: 'f0f',\n gainsboro: 'dcdcdc',\n ghostwhite: 'f8f8ff',\n gold: 'ffd700',\n goldenrod: 'daa520',\n gray: '808080',\n green: '008000',\n greenyellow: 'adff2f',\n grey: '808080',\n honeydew: 'f0fff0',\n hotpink: 'ff69b4',\n indianred: 'cd5c5c',\n indigo: '4b0082',\n ivory: 'fffff0',\n khaki: 'f0e68c',\n lavender: 'e6e6fa',\n lavenderblush: 'fff0f5',\n lawngreen: '7cfc00',\n lemonchiffon: 'fffacd',\n lightblue: 'add8e6',\n lightcoral: 'f08080',\n lightcyan: 'e0ffff',\n lightgoldenrodyellow: 'fafad2',\n lightgray: 'd3d3d3',\n lightgreen: '90ee90',\n lightgrey: 'd3d3d3',\n lightpink: 'ffb6c1',\n lightsalmon: 'ffa07a',\n lightseagreen: '20b2aa',\n lightskyblue: '87cefa',\n lightslategray: '789',\n lightslategrey: '789',\n lightsteelblue: 'b0c4de',\n lightyellow: 'ffffe0',\n lime: '0f0',\n limegreen: '32cd32',\n linen: 'faf0e6',\n magenta: 'f0f',\n maroon: '800000',\n mediumaquamarine: '66cdaa',\n mediumblue: '0000cd',\n mediumorchid: 'ba55d3',\n mediumpurple: '9370db',\n mediumseagreen: '3cb371',\n mediumslateblue: '7b68ee',\n mediumspringgreen: '00fa9a',\n mediumturquoise: '48d1cc',\n mediumvioletred: 'c71585',\n midnightblue: '191970',\n mintcream: 'f5fffa',\n mistyrose: 'ffe4e1',\n moccasin: 'ffe4b5',\n navajowhite: 'ffdead',\n navy: '000080',\n oldlace: 'fdf5e6',\n olive: '808000',\n olivedrab: '6b8e23',\n orange: 'ffa500',\n orangered: 'ff4500',\n orchid: 'da70d6',\n palegoldenrod: 'eee8aa',\n palegreen: '98fb98',\n paleturquoise: 'afeeee',\n palevioletred: 'db7093',\n papayawhip: 'ffefd5',\n peachpuff: 'ffdab9',\n peru: 'cd853f',\n pink: 'ffc0cb',\n plum: 'dda0dd',\n powderblue: 'b0e0e6',\n purple: '800080',\n rebeccapurple: '663399',\n red: 'f00',\n rosybrown: 'bc8f8f',\n royalblue: '4169e1',\n saddlebrown: '8b4513',\n salmon: 'fa8072',\n sandybrown: 'f4a460',\n seagreen: '2e8b57',\n seashell: 'fff5ee',\n sienna: 'a0522d',\n silver: 'c0c0c0',\n skyblue: '87ceeb',\n slateblue: '6a5acd',\n slategray: '708090',\n slategrey: '708090',\n snow: 'fffafa',\n springgreen: '00ff7f',\n steelblue: '4682b4',\n tan: 'd2b48c',\n teal: '008080',\n thistle: 'd8bfd8',\n tomato: 'ff6347',\n turquoise: '40e0d0',\n violet: 'ee82ee',\n wheat: 'f5deb3',\n white: 'fff',\n whitesmoke: 'f5f5f5',\n yellow: 'ff0',\n yellowgreen: '9acd32',\n });\n\n // Make it easy to access colors via `hexNames[hex]`\n var hexNames = (tinycolor.hexNames = flip(names));\n\n // Utilities\n // ---------\n\n // `{ 'name1': 'val1' }` becomes `{ 'val1': 'name1' }`\n function flip(o) {\n var flipped = {};\n for (var i in o) {\n if (o.hasOwnProperty(i)) {\n flipped[o[i]] = i;\n }\n }\n return flipped;\n }\n\n // Return a valid alpha value [0,1] with all invalid values being set to 1\n function boundAlpha(a) {\n a = parseFloat(a);\n\n if (isNaN(a) || a < 0 || a > 1) {\n a = 1;\n }\n\n return a;\n }\n\n // Take input from [0, n] and return it as [0, 1]\n function bound01(n, max) {\n if (isOnePointZero(n)) {\n n = '100%';\n }\n\n var processPercent = isPercentage(n);\n n = mathMin(max, mathMax(0, parseFloat(n)));\n\n // Automatically convert percentage into number\n if (processPercent) {\n n = parseInt(n * max, 10) / 100;\n }\n\n // Handle floating point rounding errors\n if (math.abs(n - max) < 0.000001) {\n return 1;\n }\n\n // Convert into [0, 1] range if it isn't already\n return (n % max) / parseFloat(max);\n }\n\n // Force a number between 0 and 1\n function clamp01(val) {\n return mathMin(1, mathMax(0, val));\n }\n\n // Parse a base-16 hex value into a base-10 integer\n function parseIntFromHex(val) {\n return parseInt(val, 16);\n }\n\n // Need to handle 1.0 as 100%, since once it is a number, there is no difference between it and 1\n // \n function isOnePointZero(n) {\n return typeof n == 'string' && n.indexOf('.') != -1 && parseFloat(n) === 1;\n }\n\n // Check to see if string passed in is a percentage\n function isPercentage(n) {\n return typeof n === 'string' && n.indexOf('%') != -1;\n }\n\n // Force a hex value to have 2 characters\n function pad2(c) {\n return c.length == 1 ? '0' + c : '' + c;\n }\n\n // Replace a decimal with it's percentage value\n function convertToPercentage(n) {\n if (n <= 1) {\n n = n * 100 + '%';\n }\n\n return n;\n }\n\n // Converts a decimal to a hex value\n function convertDecimalToHex(d) {\n return Math.round(parseFloat(d) * 255).toString(16);\n }\n // Converts a hex value to a decimal\n function convertHexToDecimal(h) {\n return parseIntFromHex(h) / 255;\n }\n\n var matchers = (function () {\n // \n var CSS_INTEGER = '[-\\\\+]?\\\\d+%?';\n\n // \n var CSS_NUMBER = '[-\\\\+]?\\\\d*\\\\.\\\\d+%?';\n\n // Allow positive/negative integer/number. Don't capture the either/or, just the entire outcome.\n var CSS_UNIT = '(?:' + CSS_NUMBER + ')|(?:' + CSS_INTEGER + ')';\n\n // Actual matching.\n // Parentheses and commas are optional, but not required.\n // Whitespace can take the place of commas or opening paren\n var PERMISSIVE_MATCH3 = '[\\\\s|\\\\(]+(' + CSS_UNIT + ')[,|\\\\s]+(' + CSS_UNIT + ')[,|\\\\s]+(' + CSS_UNIT + ')\\\\s*\\\\)?';\n var PERMISSIVE_MATCH4 =\n '[\\\\s|\\\\(]+(' +\n CSS_UNIT +\n ')[,|\\\\s]+(' +\n CSS_UNIT +\n ')[,|\\\\s]+(' +\n CSS_UNIT +\n ')[,|\\\\s]+(' +\n CSS_UNIT +\n ')\\\\s*\\\\)?';\n\n return {\n rgb: new RegExp('rgb' + PERMISSIVE_MATCH3),\n rgba: new RegExp('rgba' + PERMISSIVE_MATCH4),\n hsl: new RegExp('hsl' + PERMISSIVE_MATCH3),\n hsla: new RegExp('hsla' + PERMISSIVE_MATCH4),\n hsv: new RegExp('hsv' + PERMISSIVE_MATCH3),\n hsva: new RegExp('hsva' + PERMISSIVE_MATCH4),\n hex3: /^([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,\n hex6: /^([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,\n hex8: /^([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,\n };\n })();\n\n // `stringInputToObject`\n // Permissive string parsing. Take in a number of formats, and output an object\n // based on detected format. Returns `{ r, g, b }` or `{ h, s, l }` or `{ h, s, v}`\n function stringInputToObject(color) {\n color = color.replace(trimLeft, '').replace(trimRight, '').toLowerCase();\n var named = false;\n if (names[color]) {\n color = names[color];\n named = true;\n } else if (color == 'transparent') {\n return { r: 0, g: 0, b: 0, a: 0, format: 'name' };\n }\n\n // Try to match string input using regular expressions.\n // Keep most of the number bounding out of this function - don't worry about [0,1] or [0,100] or [0,360]\n // Just return an object and let the conversion functions handle that.\n // This way the result will be the same whether the tinycolor is initialized with string or object.\n var match;\n if ((match = matchers.rgb.exec(color))) {\n return { r: match[1], g: match[2], b: match[3] };\n }\n if ((match = matchers.rgba.exec(color))) {\n return { r: match[1], g: match[2], b: match[3], a: match[4] };\n }\n if ((match = matchers.hsl.exec(color))) {\n return { h: match[1], s: match[2], l: match[3] };\n }\n if ((match = matchers.hsla.exec(color))) {\n return { h: match[1], s: match[2], l: match[3], a: match[4] };\n }\n if ((match = matchers.hsv.exec(color))) {\n return { h: match[1], s: match[2], v: match[3] };\n }\n if ((match = matchers.hsva.exec(color))) {\n return { h: match[1], s: match[2], v: match[3], a: match[4] };\n }\n if ((match = matchers.hex8.exec(color))) {\n return {\n a: convertHexToDecimal(match[1]),\n r: parseIntFromHex(match[2]),\n g: parseIntFromHex(match[3]),\n b: parseIntFromHex(match[4]),\n format: named ? 'name' : 'hex8',\n };\n }\n if ((match = matchers.hex6.exec(color))) {\n return {\n r: parseIntFromHex(match[1]),\n g: parseIntFromHex(match[2]),\n b: parseIntFromHex(match[3]),\n format: named ? 'name' : 'hex',\n };\n }\n if ((match = matchers.hex3.exec(color))) {\n return {\n r: parseIntFromHex(match[1] + '' + match[1]),\n g: parseIntFromHex(match[2] + '' + match[2]),\n b: parseIntFromHex(match[3] + '' + match[3]),\n format: named ? 'name' : 'hex',\n };\n }\n\n return false;\n }\n\n window.tinycolor = tinycolor;\n //})();\n\n $(function () {\n if ($.fn.spectrum.load) {\n $.fn.spectrum.processNativeColorInputs();\n }\n });\n}\n","import TraitInputView, { TraitInputViewOpts } from './TraitInputView';\nimport { Model, $ } from '../..';\nimport { isUndefined } from 'underscore';\nimport ColorPicker from '../../../utils/ColorPicker';\nimport Trait from '../model/Trait';\nimport EditorModel from '../../../editor/model/Editor';\n\n$ && ColorPicker($);\n\nconst getColor = (color: any) => {\n const name = color.getFormat() === 'name' && color.toName();\n const cl = color.getAlpha() == 1 ? color.toHexString() : color.toRgbString();\n return name || cl.replace(/ /g, '');\n};\n\nexport default class TraitColorView extends TraitInputView> {\n type = 'text';\n colorPicker?: any;\n templateInput() {\n return '';\n }\n\n constructor(em: EditorModel, opts?: TraitInputViewOpts<'color'>) {\n super(em, opts);\n }\n\n get inputValue(): any {\n const el = this.$input?.get(0);\n return el?.value ? (el.value as any) : this.target.value;\n }\n\n set inputValue(value: any) {\n const colorEl = this.getColorEl();\n\n // Check the color by using the ColorPicker's parser\n if (colorEl) {\n const valueClr = value != 'none' ? value : '';\n colorEl.spectrum('set', valueClr);\n const tc = colorEl.spectrum('get');\n const color = valueClr && getColor(tc);\n\n colorEl.get(0).style.backgroundColor = valueClr;\n this.noneColor = value == 'none';\n this.movedColor = valueClr;\n\n const el = this.$input?.get(0);\n el && (el.value = color as any);\n }\n }\n /**\n * Returns input element\n * @return {HTMLElement}\n * @private\n */\n getInputEl() {\n if (!this.input) {\n const value = this.target.value;\n const { ppfx, target, type, paceholder } = this;\n\n console.log(this.$el.get(0));\n\n const el = $(document.createElement('div'));\n el.addClass(this.inputClass());\n el.html(this.template());\n const plh = paceholder || target.value;\n const inputEl = $(``);\n el.find(`.${this.holderClass()}`).append(inputEl);\n\n // This will make the color input available on render\n const colorEl = this.getColorEl();\n el.find('[data-colorp-c]').append(colorEl);\n inputEl.val(value);\n this.$input = inputEl;\n return el.get(0) as HTMLInputElement;\n }\n\n return this.input;\n }\n\n colorEl?: any;\n movedColor?: string;\n noneColor?: boolean;\n model!: any;\n\n template() {\n const ppfx = this.ppfx;\n return `\n
\n
\n
\n
\n
\n
\n `;\n }\n\n inputClass() {\n const ppfx = this.ppfx;\n return `${ppfx}field ${ppfx}field-color`;\n }\n\n holderClass() {\n return `${this.ppfx}input-holder`;\n }\n\n remove() {\n super.remove();\n this.colorEl.spectrum('destroy');\n return this;\n }\n\n /**\n * Set value to the model\n * @param {string} val\n * @param {Object} opts\n */\n setValue(val: string, opts: any = {}) {\n const { model } = this;\n const def = !isUndefined(opts.def) ? opts.def : model.get('defaults');\n const value = !isUndefined(val) ? val : !isUndefined(def) ? def : '';\n const inputEl = this.getInputEl();\n const colorEl = this.getColorEl();\n const valueClr = value != 'none' ? value : '';\n inputEl.value = value;\n colorEl.get(0).style.backgroundColor = valueClr;\n\n // This prevents from adding multiple thumbs in spectrum\n if (opts.fromTarget || (opts.fromInput && !opts.avoidStore)) {\n colorEl.spectrum('set', valueClr);\n this.noneColor = value == 'none';\n this.movedColor = valueClr;\n }\n }\n\n /**\n * Get the color input element\n * @return {HTMLElement}\n */\n getColorEl() {\n if (!this.colorEl) {\n const { em, colorPicker } = this;\n const ppfx = this.ppfx;\n\n var colorEl = $(`
`);\n var cpStyle = colorEl.get(0)!.style;\n var elToAppend = em && em.config ? em.config.el : '';\n var colorPickerConfig = (em && em.getConfig && em.getConfig().colorPicker) || {};\n\n this.movedColor = '';\n let changed = false;\n let previousColor: string;\n\n const handleChange = (value: string) => {\n this.inputValue = value;\n };\n\n colorEl.spectrum({\n color: this.target.value || false,\n containerClassName: `${ppfx}one-bg ${ppfx}two-color`,\n appendTo: elToAppend || 'body',\n maxSelectionSize: 8,\n showPalette: true,\n showAlpha: true,\n chooseText: 'Ok',\n cancelText: '⨯',\n palette: [],\n\n // config expanded here so that the functions below are not overridden\n ...colorPickerConfig,\n ...(colorPicker || {}),\n\n move: (color: any) => {\n const cl = getColor(color);\n this.movedColor = cl;\n cpStyle.backgroundColor = cl;\n handleChange(cl);\n },\n change: (color: any) => {\n changed = true;\n const cl = getColor(color);\n cpStyle.backgroundColor = cl;\n handleChange(cl);\n this.noneColor = false;\n },\n show: (color: any) => {\n changed = false;\n this.movedColor = '';\n previousColor = getColor(color);\n },\n hide: () => {\n if (!changed && previousColor) {\n if (this.noneColor) {\n previousColor = '';\n }\n cpStyle.backgroundColor = previousColor;\n colorEl.spectrum('set', previousColor);\n handleChange(previousColor);\n }\n },\n });\n\n this.colorEl = colorEl;\n }\n return this.colorEl;\n }\n}\n","import { bindAll, indexOf, isUndefined } from 'underscore';\nimport { $ } from '../..';\nimport EditorModel from '../../../editor/model/Editor';\nimport { off, on } from '../../../utils/dom';\nimport Trait from '../model/Trait';\nimport TraitInputView, { TraitInputViewOpts } from './TraitInputView';\n\nexport interface TraitNumberViewOpts extends TraitInputViewOpts<'number'> {\n step?: number;\n min?: number;\n max?: number;\n fixedValues?: string[];\n}\n\nabstract class TraitNumberViewAbstract extends TraitInputView> {\n protected type = 'number';\n moved?: boolean;\n prValue?: number;\n private current?: { y: number; val: string };\n step: number;\n fixedValues: string[];\n min?: number;\n max?: number;\n\n events() {\n return {\n 'change input': 'handleChange',\n 'change select': 'handleUnitChange',\n 'click [data-arrow-up]': 'upArrowClick',\n 'click [data-arrow-down]': 'downArrowClick',\n 'mousedown [data-arrows]': 'downIncrement',\n keydown: 'handleKeyDown',\n };\n }\n\n constructor(em: EditorModel, opts?: TraitNumberViewOpts) {\n super(em, opts);\n bindAll(this, 'moveIncrement', 'upIncrement');\n this.step = opts?.step ?? 1;\n this.min = opts?.min;\n this.max = opts?.max;\n this.fixedValues = opts?.fixedValues ?? [];\n }\n\n get inputNumberValue(): number {\n const el = this.$input?.get(0);\n return el?.value ? (parseFloat(el.value) as any) : this.target.value;\n }\n\n set inputNumberValue(value: number) {\n const el = this.$input?.get(0);\n el && (el.value = value as any);\n }\n\n /**\n * Returns input element\n * @return {HTMLElement}\n * @private\n */\n getInputEl() {\n const { ppfx, target, type, paceholder } = this;\n const value = this.target.value;\n console.log(this.$el.get(0));\n\n const el = $(document.createElement('div'));\n el.addClass(this.inputClass());\n el.html(this.template());\n const plh = paceholder || target.value;\n const inputEl = $(``);\n el.find(`.${`${this.ppfx}input-holder`}`).append(inputEl);\n\n console.log(el.get(0));\n // model.set('value', value, { fromTarget: true });\n inputEl.val(value);\n // this.$el.find('[data-input]').append(el)\n console.log(this.$el.get(0));\n this.$input = inputEl;\n return el.get(0) as HTMLInputElement;\n }\n\n template() {\n const ppfx = this.ppfx;\n return `\n \n \n
\n
\n
\n
\n `;\n }\n\n inputClass() {\n const ppfx = this.ppfx;\n return `${ppfx}field-int` || `${ppfx}field ${ppfx}field-integer`;\n }\n\n /**\n * Set value to the model\n * @param {string} value\n * @param {Object} opts\n */\n setValue(value: string) {\n const valid = this.validateInputValue(value, { deepCheck: 1 });\n\n this.inputNumberValue = valid;\n console.log('SetValue' + this.inputValue);\n this.target.value = this.inputValue;\n }\n\n /**\n * Handled when the view is changed\n */\n handleChange(e: Event) {\n e.stopPropagation();\n this.setValue(this.inputNumberValue as any);\n }\n\n /**\n * Handled when user uses keyboard\n */\n handleKeyDown(e: KeyboardEvent) {\n if (e.key === 'ArrowUp') {\n e.preventDefault();\n this.upArrowClick();\n }\n\n if (e.key === 'ArrowDown') {\n e.preventDefault();\n this.downArrowClick();\n }\n }\n\n /**\n * Invoked when the up arrow is clicked\n * */\n upArrowClick() {\n const { step, inputNumberValue } = this;\n this.setValue(this.normalizeValue(inputNumberValue + step));\n }\n\n /**\n * Invoked when the down arrow is clicked\n * */\n downArrowClick() {\n const { step, inputNumberValue } = this;\n this.setValue(this.normalizeValue(inputNumberValue - step));\n }\n\n /**\n * Change easily integer input value with click&drag method\n * @param Event\n *\n * @return void\n * */\n downIncrement(e: MouseEvent) {\n e.preventDefault();\n console.log('downIncrement');\n this.moved = false;\n this.inputNumberValue = this.inputNumberValue || 0;\n var value = this.normalizeValue(this.inputNumberValue);\n this.setValue(value as any);\n this.current = { y: e.pageY, val: value };\n on(document, 'mousemove', this.moveIncrement);\n on(document, 'mouseup', this.upIncrement);\n }\n\n /** While the increment is clicked, moving the mouse will update input value\n * @param Object\n *\n * @return bool\n * */\n moveIncrement(ev: MouseEvent) {\n this.moved = true;\n console.log('moveIncrement');\n const { step } = this;\n const data = this.current!;\n var pos = this.normalizeValue(data.val + (data.y - ev.pageY) * step);\n const value = this.validateInputValue(pos);\n this.prValue = value;\n this.inputNumberValue = value;\n return false;\n }\n\n /**\n * Stop moveIncrement method\n * */\n upIncrement() {\n console.log('upIncrement');\n off(document, 'mouseup', this.upIncrement);\n off(document, 'mousemove', this.moveIncrement);\n\n if (this.prValue && this.moved) {\n var value = this.prValue;\n this.setValue(value as any);\n }\n }\n\n normalizeValue(value: any, defValue = 0) {\n const { step } = this;\n let stepDecimals = 0;\n\n if (isNaN(value)) {\n return defValue;\n }\n\n value = parseFloat(value);\n\n if (Math.floor(value) !== value) {\n const side = step.toString().split('.')[1];\n stepDecimals = side ? side.length : 0;\n }\n\n return stepDecimals ? parseFloat(value.toFixed(stepDecimals)) : value;\n }\n\n /**\n * Validate input value\n * @param {String} value Raw value\n * @param {Object} opts Options\n * @return {Object} Validated string\n */\n validateInputValue(value?: any, opts: any = {}) {\n const { min, max, fixedValues } = this;\n var opt = opts || {};\n const defValue = ''; //model.get('defaults');\n var val = !isUndefined(value) ? value : defValue;\n\n if (opt.deepCheck) {\n if (val) {\n // If the value is one of the fixed values I leave it as it is\n var regFixed = new RegExp('^' + fixedValues.join('|'), 'g');\n if (fixedValues.length && regFixed.test(val)) {\n val = val.match(regFixed)[0];\n } else {\n val += ''; // Make it suitable for replace\n val = parseFloat(val.replace(',', '.'));\n val = !isNaN(val) ? val : defValue;\n }\n }\n }\n\n if (!isUndefined(max)) val = val > max ? max : val;\n if (!isUndefined(min)) val = val < min ? min : val;\n\n return val;\n }\n}\n\nexport class TraitNumberView extends TraitNumberViewAbstract {\n unitEl?: any;\n\n constructor(em: EditorModel, opts?: TraitNumberViewOpts) {\n super(em, opts);\n }\n\n get inputValue(): number {\n return this.inputNumberValue;\n }\n\n set inputValue(value: number) {\n this.inputNumberValue = value;\n }\n}\n\nexport interface TraitNumberUnitViewOpts extends TraitNumberViewOpts {\n units: string[];\n}\n\nexport class TraitNumberUnitView extends TraitNumberViewAbstract {\n unitEl?: HTMLSelectElement;\n units: string[];\n\n constructor(em: EditorModel, opts: TraitNumberUnitViewOpts) {\n super(em, opts);\n this.units = opts.units;\n }\n\n get inputValue(): string {\n let unit = this.inputUnitValue;\n if ((this.inputNumberValue as any) === '') unit = '';\n return this.inputNumberValue + unit;\n }\n\n set inputValue(value: string) {\n const valueString = value + '';\n const numberRegexp = valueString.match(/^\\d*\\.?\\d*/);\n const number = numberRegexp ? numberRegexp[0] : '';\n this.inputNumberValue = parseFloat(number);\n const unit = valueString.slice(number.length);\n this.inputUnitValue = unit;\n }\n\n get inputUnitValue(): string {\n const { units } = this;\n const el = this.unitEl;\n return el?.value ?? ((units.length && units[0]) || '');\n }\n\n set inputUnitValue(value: string) {\n const { unitEl, units } = this;\n // Check if exists as unit\n let unit = '';\n if (indexOf(units, value) >= 0) unit = value;\n unitEl && (unitEl.value = unit);\n }\n /**\n * Returns input element\n * @return {HTMLElement}\n * @private\n */\n getInputEl() {\n const el = super.getInputEl();\n this.unitEl = undefined;\n const unit = this.getUnitEl();\n unit && $(el).find(`.${this.ppfx}field-units`).get(0)!.appendChild(unit);\n return el;\n }\n\n /**\n * Handled when the view is changed\n */\n handleUnitChange(e: Event) {\n e.stopPropagation();\n console.log('Unit changed');\n this.target.value = this.inputValue;\n }\n\n /**\n * Get the unit element\n * @return {HTMLElement}\n */\n getUnitEl() {\n if (!this.unitEl) {\n const { units } = this;\n if (units.length) {\n const options = [''];\n\n units.forEach((unit: string) => {\n const selected = unit == this.inputUnitValue ? 'selected' : '';\n options.push(``);\n });\n\n const temp = document.createElement('div');\n temp.innerHTML = ``;\n this.unitEl = temp.firstChild as any;\n }\n }\n\n return this.unitEl;\n }\n}\n","import { isString, isUndefined } from 'underscore';\nimport EditorModel from '../../../editor/model/Editor';\nimport { $ } from '../..';\nimport Trait from '../model/Trait';\nimport TraitInputView, { TraitInputViewOpts } from './TraitInputView';\n\ntype SelectOption =\n | string\n | {\n name: string;\n value: string;\n style?: string;\n };\n\nexport interface TraitSelectViewOpts extends TraitInputViewOpts<'select'> {\n options: SelectOption[];\n}\n\nexport default class TraitSelectView extends TraitInputView> {\n protected type = 'select';\n options: SelectOption[];\n\n constructor(em: EditorModel, opts: TraitSelectViewOpts) {\n super(em, opts);\n this.options = opts.options;\n }\n\n getInputElem() {\n const { input, $input } = this;\n return input || ($input && $input.get && $input.get(0)) || this.getElInput();\n }\n\n get inputValue(): string {\n const el = this.getInputElem();\n return el?.value ?? this.target.value;\n }\n\n set inputValue(value: string) {\n console.log('Text input value ' + value);\n const el = this.getInputElem();\n el && (el.value = value as any);\n }\n\n templateInput() {\n const { ppfx, clsField } = this;\n return `
\n
\n
\n
\n
\n
`;\n }\n\n /**\n * Returns input element\n * @return {HTMLElement}\n * @private\n */\n getInputEl() {\n if (!this.$input) {\n const { name, options, em } = this;\n const values: string[] = [];\n let input = '';\n this.$input = $(input);\n const val = this.target.value;\n const valResult = values.indexOf(val) >= 0 ? val : '';\n !isUndefined(valResult) && this.$input!.val(valResult);\n }\n\n return this.$input!.get(0);\n }\n}\n","import { EventsHash } from 'backbone';\nimport { View } from '../../common';\nimport TraitButtonView from '../../common/traits/view/TraitButtonView';\nimport TraitCheckboxView from '../../common/traits/view/TraitCheckboxView';\nimport TraitColorView from '../../common/traits/view/TraitColorView';\nimport { TraitNumberView, TraitNumberUnitView } from '../../common/traits/view/TraitNumberView';\nimport TraitSelectView from '../../common/traits/view/TraitSelectView';\nimport TraitTextView from '../../common/traits/view/TraitTextView';\nimport EditorModel from '../../editor/model/Editor';\nimport Page from '../../pages/model/Page';\n\nexport interface PageViewConfig {\n em?: EditorModel;\n pStylePrefix?: string;\n}\n\nexport default class PageEditView extends View {\n className: string;\n\n highlightedClass = 'gjs-three-bg';\n\n render() {\n const { em } = this;\n this.$el.empty();\n this.$el.attr('class', this.className);\n if (this.model) {\n let input = new TraitNumberView(em, { min: 0 });\n input.setTarget('name', this.model, { changeProp: true });\n this.$el.append(input.render().el);\n\n let input3 = new TraitNumberUnitView(em, { min: 0, units: ['px', '%'] });\n input3.setTarget('name', this.model, { changeProp: true });\n this.$el.append(input3.render().el);\n\n this.$el.append(\n new TraitSelectView(em, { options: ['px', '%'] }).setTarget('name', this.model, { changeProp: true }).render()\n .el\n );\n\n this.$el.append(new TraitCheckboxView(em).setTarget('name', this.model, { changeProp: true }).render().el);\n\n this.$el.append(\n new TraitButtonView(em, {\n text: 'Ok',\n command: () => {\n console.log('click');\n },\n full: true,\n })\n .setTarget('name', this.model, { changeProp: true })\n .render().el\n );\n this.$el.append(new TraitColorView(em, {}).setTarget('name', this.model, { changeProp: true }).render().el);\n\n let input2 = new TraitTextView(em, {}).setTarget('route', this.model, { changeProp: true });\n this.$el.append(input2.render().el);\n }\n return this;\n }\n\n events(): EventsHash {\n return {\n click: () => this.trigger('onClick', this),\n };\n }\n\n constructor(model: Page, config: PageViewConfig) {\n super({ model });\n this.config = config;\n\n const { pfx, ppfx } = this;\n this.className = `${ppfx}layer no-select ${pfx}two-color`;\n }\n\n changePage(page: Page) {\n this.model = page;\n this.render();\n }\n\n public get em(): EditorModel {\n return this.config.em;\n }\n\n public get ppfx(): string {\n return this.em.getConfig().stylePrefix!;\n }\n\n public get pfx(): string {\n return this.config.stylePrefix;\n }\n\n setHighlighted(status: boolean) {\n status ? this.$el.addClass(this.highlightedClass) : this.$el.removeClass(this.highlightedClass);\n }\n\n config: any;\n\n get page(): Page | undefined {\n return this.model;\n }\n}\n","/**\n * You can customize the initial state of the module from the editor initialization\n * ```js\n * const editor = grapesjs.init({\n * ....\n * pageManager: {\n * pages: [\n * {\n * id: 'page-id',\n * styles: `.my-class { color: red }`, // or a JSON of styles\n * component: '
My element
', // or a JSON of components\n * }\n * ]\n * },\n * })\n * ```\n *\n * Once the editor is instantiated you can use its API. Before using these methods you should get the module from the instance\n *\n * ```js\n * const pageManager = editor.Pages;\n * ```\n *\n * ## Available Events\n * * `page:add` - Added new page. The page is passed as an argument to the callback\n * * `page:remove` - Page removed. The page is passed as an argument to the callback\n * * `page:select` - New page selected. The newly selected page and the previous one, are passed as arguments to the callback\n * * `page:update` - Page updated. The updated page and the object containing changes are passed as arguments to the callback\n * * `page` - Catch-all event for all the events mentioned above. An object containing all the available data about the triggered event is passed as an argument to the callback\n *\n * ## Methods\n * * [add](#add)\n * * [get](#get)\n * * [getAll](#getall)\n * * [getAllWrappers](#getallwrappers)\n * * [getMain](#getmain)\n * * [remove](#remove)\n * * [select](#select)\n * * [getSelected](#getselected)\n *\n * [Page]: page.html\n * [Component]: component.html\n *\n * @module Pages\n */\n\nimport { isString, bindAll, unique, flatten } from 'underscore';\nimport { createId } from '../utils/mixins';\nimport { ModuleModel } from '../abstract';\nimport { ItemManagerModule, ModuleConfig } from '../abstract/Module';\nimport Pages from './model/Pages';\nimport Page, { PageProperties } from './model/Page';\nimport EditorModel from '../editor/model/Editor';\nimport ComponentWrapper from '../dom_components/model/ComponentWrapper';\nimport { AddOptions, Model, RemoveOptions, SetOptions, View } from '../common';\nimport PagesView from './view/PagesView';\nimport config, { PageManagerConfig } from './config/config';\nimport PageEditView from './view/PageEditView';\n\ninterface SelectableOption {\n /**\n * Select the page.\n */\n select?: boolean;\n}\n\ninterface AbortOption {\n abort?: boolean;\n}\n\nexport const evAll = 'page';\nexport const evPfx = `${evAll}:`;\nexport const evPageSelect = `${evPfx}select`;\nexport const evPageSelectBefore = `${evPageSelect}:before`;\nexport const evPageUpdate = `${evPfx}update`;\nexport const evPageAdd = `${evPfx}add`;\nexport const evPageAddBefore = `${evPageAdd}:before`;\nexport const evPageRemove = `${evPfx}remove`;\nexport const evPageRemoveBefore = `${evPageRemove}:before`;\nconst chnSel = 'change:selected';\nconst typeMain = 'main';\nconst pageEvents = {\n all: evAll,\n select: evPageSelect,\n selectBefore: evPageSelectBefore,\n update: evPageUpdate,\n add: evPageAdd,\n addBefore: evPageAddBefore,\n remove: evPageRemove,\n removeBefore: evPageRemoveBefore,\n};\n\nexport default class PageManager extends ItemManagerModule {\n events!: typeof pageEvents;\n storageKey = 'pages';\n view?: PagesView;\n\n get pages() {\n return this.all;\n }\n\n model: ModuleModel;\n\n getAll() {\n // this avoids issues during the TS build (some getAll are inconsistent)\n return [...this.all.models];\n }\n\n /**\n * Get all pages\n * @name getAll\n * @function\n * @returns {Array<[Page]>}\n * @example\n * const arrayOfPages = pageManager.getAll();\n */\n\n /**\n * Initialize module\n * @hideconstructor\n * @param {Object} config Configurations\n */\n constructor(em: EditorModel) {\n super(em, 'PageManager', new Pages([], em), pageEvents, config);\n bindAll(this, '_onPageChange');\n const model = new ModuleModel({ _undo: true } as any);\n this.model = model;\n this.pages.on('reset', coll => coll.at(0) && this.select(coll.at(0)));\n this.pages.on('all', this.__onChange, this);\n model.on(chnSel, this._onPageChange);\n }\n\n __onChange(event: string, page: Page, coll: Pages, opts?: any) {\n const options = opts || coll;\n this.em.trigger(evAll, { event, page, options });\n }\n\n onLoad() {\n const { pages, config, em } = this;\n const opt = { silent: true };\n const configPages = config.pages?.map(page => new Page(page, { em, config })) || [];\n pages.add(configPages, opt);\n const mainPage = !pages.length ? this.add({ type: typeMain }, opt) : this.getMain();\n mainPage && this.select(mainPage, opt);\n }\n\n _onPageChange(m: any, page: Page, opts: any) {\n const { em } = this;\n const lm = em.Layers;\n const mainComp = page.getMainComponent();\n lm && mainComp && lm.setRoot(mainComp as any);\n em.trigger(evPageSelect, page, m.previous('selected'));\n this.__onChange(chnSel, page, opts);\n }\n\n postLoad() {\n const { em, model, pages } = this;\n const um = em.UndoManager;\n um.add(model);\n um.add(pages);\n pages.on('add remove reset change', (m, c, o) => em.changesUp(o || c));\n }\n\n /**\n * Add new page\n * @param {Object} props Page properties\n * @param {Object} [opts] Options\n * @returns {[Page]}\n * @example\n * const newPage = pageManager.add({\n * id: 'new-page-id', // without an explicit ID, a random one will be created\n * styles: `.my-class { color: red }`, // or a JSON of styles\n * component: '
My element
', // or a JSON of components\n * });\n */\n add(props: PageProperties, opts: AddOptions & SelectableOption & AbortOption = {}) {\n const { em } = this;\n props.id = props.id || this._createId();\n const add = () => {\n const page = this.pages.add(new Page(props, { em: this.em, config: this.config }), opts);\n opts.select && this.select(page);\n return page;\n };\n !opts.silent && em.trigger(evPageAddBefore, props, add, opts);\n return !opts.abort ? add() : undefined;\n }\n\n /**\n * Remove page\n * @param {String|[Page]} page Page or page id\n * @returns {[Page]} Removed Page\n * @example\n * const removedPage = pageManager.remove('page-id');\n * // or by passing the page\n * const somePage = pageManager.get('page-id');\n * pageManager.remove(somePage);\n */\n remove(page: string | Page, opts: RemoveOptions & AbortOption = {}) {\n const { em } = this;\n const pg = isString(page) ? this.get(page) : page;\n const rm = () => {\n pg && this.pages.remove(pg, opts);\n return pg;\n };\n !opts.silent && em.trigger(evPageRemoveBefore, pg, rm, opts);\n return !opts.abort && rm();\n }\n\n /**\n * Get page by id\n * @param {String} id Page id\n * @returns {[Page]}\n * @example\n * const somePage = pageManager.get('page-id');\n */\n get(id: string): Page | undefined {\n return this.pages.filter(p => p.get(p.idAttribute) === id)[0];\n }\n\n /**\n * Get main page (the first one available)\n * @returns {[Page]}\n * @example\n * const mainPage = pageManager.getMain();\n */\n getMain() {\n const { pages } = this;\n return pages.filter(p => p.get('type') === typeMain)[0] || pages.at(0);\n }\n\n /**\n * Get wrapper components (aka body) from all pages and frames.\n * @returns {Array<[Component]>}\n * @example\n * const wrappers = pageManager.getAllWrappers();\n * // Get all `image` components from the project\n * const allImages = wrappers.map(wrp => wrp.findType('image')).flat();\n */\n getAllWrappers(): ComponentWrapper[] {\n const pages = this.getAll();\n return unique(flatten(pages.map(page => page.getAllFrames().map(frame => frame.getComponent()))));\n }\n\n /**\n * Change the selected page. This will switch the page rendered in canvas\n * @param {String|[Page]} page Page or page id\n * @returns {this}\n * @example\n * pageManager.select('page-id');\n * // or by passing the page\n * const somePage = pageManager.get('page-id');\n * pageManager.select(somePage);\n */\n select(page: string | Page, opts: SetOptions = {}) {\n const pg = isString(page) ? this.get(page) : page;\n if (pg) {\n this.em.trigger(evPageSelectBefore, pg, opts);\n this.model.set('selected', pg, opts);\n }\n return this;\n }\n\n /**\n * Get the selected page\n * @returns {[Page]}\n * @example\n * const selectedPage = pageManager.getSelected();\n */\n getSelected(): Page | undefined {\n return this.model.get('selected');\n }\n\n destroy() {\n this.pages.off().reset();\n this.model.stopListening();\n this.model.clear({ silent: true });\n //@ts-ignore\n ['selected', 'model'].map(i => (this[i] = 0));\n }\n\n store() {\n return this.getProjectData();\n }\n\n load(data: any) {\n const result = this.loadProjectData(data, { all: this.pages, reset: true });\n this.pages.forEach(page => page.getFrames().initRefs());\n return result;\n }\n\n _createId() {\n const pages = this.getAll();\n const len = pages.length + 16;\n const pagesMap = this.getAllMap();\n let id;\n\n do {\n id = createId(len);\n } while (pagesMap[id]);\n\n return id;\n }\n\n render(opts?: any): HTMLElement {\n const config = this.getConfig();\n const { em } = this;\n const pages = this.all;\n\n let view = new PagesView(\n {\n collection: pages,\n module: this,\n },\n { ...config, em }\n );\n\n let selectedView = new PageEditView(this.getSelected()!, { ...config, em });\n view.on('selected', selectedView.changePage, selectedView);\n let el = document.createElement('div');\n\n el.append(selectedView.render().el);\n el.append(view.render().el);\n\n return el;\n }\n}\n","import CanvasModule from '..';\nimport { ModuleModel } from '../../abstract';\nimport { Coordinates, CoordinatesTypes, DEFAULT_COORDS } from '../../common';\nimport { evUpdate as evDeviceUpdate } from '../../device_manager';\nimport { evPageSelect } from '../../pages';\nimport Page from '../../pages/model/Page';\nimport Frames from './Frames';\n\nexport default class Canvas extends ModuleModel {\n defaults() {\n return {\n frame: '',\n frames: [],\n rulers: false,\n zoom: 100,\n x: 0,\n y: 0,\n // Scripts to apply on all frames\n scripts: [],\n // Styles to apply on all frames\n styles: [],\n pointer: DEFAULT_COORDS,\n pointerScreen: DEFAULT_COORDS,\n };\n }\n\n constructor(module: CanvasModule) {\n const { em, config } = module;\n const { scripts, styles } = config;\n super(module, { scripts, styles });\n this.set('frames', new Frames(module));\n this.on('change:zoom', this.onZoomChange);\n this.on('change:x change:y', this.onCoordsChange);\n this.on('change:pointer change:pointerScreen', this.onPointerChange);\n this.listenTo(em, `change:device ${evDeviceUpdate}`, this.updateDevice);\n this.listenTo(em, evPageSelect, this._pageUpdated);\n }\n\n get frames(): Frames {\n return this.get('frames');\n }\n\n init() {\n const { em } = this;\n const mainPage = em.Pages.getMain();\n this.set('frames', mainPage.getFrames());\n this.updateDevice({ frame: mainPage.getMainFrame() });\n }\n\n _pageUpdated(page: Page, prev?: Page) {\n const { em } = this;\n em.setSelected();\n em.get('readyCanvas') && em.stopDefault(); // We have to stop before changing current frames\n prev?.getFrames().map(frame => frame.disable());\n this.set('frames', page.getFrames());\n this.updateDevice({ frame: page.getMainFrame() });\n }\n\n updateDevice(opts: any = {}) {\n const { em } = this;\n const device = em.getDeviceModel();\n const model = opts.frame || em.getCurrentFrameModel();\n\n if (model && device) {\n const { width, height } = device.attributes;\n model.set({ width, height }, { noUndo: 1 });\n }\n }\n\n onZoomChange() {\n const { em, module } = this;\n const zoom = this.get('zoom');\n zoom < 1 && this.set('zoom', 1);\n em.trigger(module.events.zoom);\n }\n\n onCoordsChange() {\n const { em, module } = this;\n em.trigger(module.events.coords);\n }\n\n onPointerChange() {\n const { em, module } = this;\n em.trigger(module.events.pointer);\n }\n\n getPointerCoords(type: CoordinatesTypes = CoordinatesTypes.World): Coordinates {\n const { pointer, pointerScreen } = this.attributes;\n return type === CoordinatesTypes.World ? pointer : pointerScreen;\n }\n}\n","import { debounce } from 'underscore';\nimport CanvasModule from '..';\nimport { ModuleCollection } from '../../abstract';\nimport { Debounced, ObjectAny } from '../../common';\nimport EditorModel from '../../editor/model/Editor';\nimport CanvasSpot, { CanvasSpotProps } from './CanvasSpot';\n\nexport default class CanvasSpots extends ModuleCollection {\n refreshDbn: Debounced;\n\n constructor(module: CanvasModule, models: CanvasSpot[] | CanvasSpotProps[] = []) {\n super(module, models, CanvasSpot);\n this.on('add', this.onAdd);\n this.on('change', this.onChange);\n this.on('remove', this.onRemove);\n const { em } = this;\n this.refreshDbn = debounce(() => this.refresh(), 0);\n const evToRefreshDbn = 'component:resize styleable:change component:input component:update frame:updated undo redo';\n this.listenTo(em, evToRefreshDbn, () => this.refreshDbn());\n }\n\n get em(): EditorModel {\n return this.module.em;\n }\n\n get events() {\n return this.module.events;\n }\n\n refresh() {\n const { em, events } = this;\n em.trigger(events.spot);\n }\n\n onAdd(spot: CanvasSpot) {\n this.__trgEvent(this.events.spotAdd, { spot });\n }\n\n onChange(spot: CanvasSpot) {\n this.__trgEvent(this.events.spotUpdate, { spot });\n }\n\n onRemove(spot: CanvasSpot) {\n this.__trgEvent(this.events.spotRemove, { spot });\n }\n\n __trgEvent(event: string, props: ObjectAny) {\n const { module } = this;\n const { em } = module;\n em.trigger(event, props);\n this.refreshDbn();\n }\n}\n","export interface ToScreenOption {\n toScreen?: boolean;\n}\n\nexport interface ToWorldOption {\n toWorld?: boolean;\n}\n\nexport interface GetBoxRectOptions extends ToScreenOption {\n local?: boolean;\n}\n\n/**{START_EVENTS}*/\nexport enum CanvasEvents {\n /**\n * @event `canvas:dragenter` Something is dragged inside the canvas, `DataTransfer` instance passed as an argument.\n */\n dragEnter = 'canvas:dragenter',\n\n /**\n * @event `canvas:dragover` Something is dragging on the canvas, `DataTransfer` instance passed as an argument.\n */\n dragOver = 'canvas:dragover',\n\n /**\n * @event `canvas:dragend` When a drag operation is ended, `DataTransfer` instance passed as an argument.\n */\n dragEnd = 'canvas:dragend',\n\n /**\n * @event `canvas:dragdata` On any dataTransfer parse, `DataTransfer` instance and the `result` are passed as arguments.\n * By changing `result.content` you're able to customize what is dropped.\n */\n dragData = 'canvas:dragdata',\n\n /**\n * @event `canvas:drop` Something is dropped in canvas, `DataTransfer` instance and the dropped model are passed as arguments.\n */\n drop = 'canvas:drop',\n\n /**\n * @event `canvas:spot` Spots updated.\n * @example\n * editor.on('canvas:spot', () => {\n * console.log('Spots', editor.Canvas.getSpots());\n * });\n */\n spot = 'canvas:spot',\n\n /**\n * @event `canvas:spot:add` New canvas spot added.\n * @example\n * editor.on('canvas:spot:add', ({ spot }) => {\n * console.log('Spot added', spot);\n * });\n */\n spotAdd = 'canvas:spot:add',\n\n /**\n * @event `canvas:spot:update` Canvas spot updated.\n * @example\n * editor.on('canvas:spot:update', ({ spot }) => {\n * console.log('Spot updated', spot);\n * });\n */\n spotUpdate = 'canvas:spot:update',\n\n /**\n * @event `canvas:spot:remove` Canvas spot removed.\n * @example\n * editor.on('canvas:spot:remove', ({ spot }) => {\n * console.log('Spot removed', spot);\n * });\n */\n spotRemove = 'canvas:spot:remove',\n\n /**\n * @event `canvas:coords` Canvas coordinates updated.\n * @example\n * editor.on('canvas:coords', () => {\n * console.log('Canvas coordinates updated:', editor.Canvas.getCoords());\n * });\n */\n coords = 'canvas:coords',\n\n /**\n * @event `canvas:zoom` Canvas zoom updated.\n * @example\n * editor.on('canvas:zoom', () => {\n * console.log('Canvas zoom updated:', editor.Canvas.getZoom());\n * });\n */\n zoom = 'canvas:zoom',\n\n /**\n * @event `canvas:pointer` Canvas pointer updated.\n * @example\n * editor.on('canvas:pointer', () => {\n * console.log('Canvas pointer updated:', editor.Canvas.getPointer());\n * });\n */\n pointer = 'canvas:pointer',\n\n /**\n * @event `canvas:frame:load` Frame loaded in canvas.\n * The event is triggered right after iframe's `onload`.\n * @example\n * editor.on('canvas:frame:load', ({ window }) => {\n * console.log('Frame loaded', window);\n * });\n */\n frameLoad = 'canvas:frame:load',\n\n /**\n * @event `canvas:frame:load:head` Frame head loaded in canvas.\n * The event is triggered right after iframe's finished to load the head elemenets (eg. scripts)\n * @example\n * editor.on('canvas:frame:load:head', ({ window }) => {\n * console.log('Frame head loaded', window);\n * });\n */\n frameLoadHead = 'canvas:frame:load:head',\n\n /**\n * @event `canvas:frame:load:body` Frame body loaded in canvas.\n * The event is triggered when the body is rendered with components.\n * @example\n * editor.on('canvas:frame:load:body', ({ window }) => {\n * console.log('Frame completed the body render', window);\n * });\n */\n frameLoadBody = 'canvas:frame:load:body',\n}\n/**{END_EVENTS}*/\n\n// need this to avoid the TS documentation generator to break\nexport default CanvasEvents;\n","import ModuleCollection from './ModuleCollection';\nimport ModuleModel from './ModuleModel';\nimport { IBaseModule } from './Module';\nimport { View } from '../common';\nimport EditorModel from '../editor/model/Editor';\n\ntype ModuleFromModel = TModel extends ModuleModel ? M : unknown;\ntype ModuleModelExt = TItem extends ModuleCollection\n ? ModuleFromModel\n : TItem extends ModuleModel\n ? M\n : unknown;\n\n// type TCollection = TItem extends ModuleCollection ? TItem : unknown;\n\nexport default class ModuleView<\n TModel extends ModuleModel | ModuleCollection = ModuleModel,\n TElement extends Element = HTMLElement\n> extends View {\n protected get pfx() {\n return this.ppfx + (this.config as any).stylePrefix || '';\n }\n\n protected get ppfx() {\n return this.em.config.stylePrefix || '';\n }\n\n collection!: TModel extends ModuleModel ? ModuleCollection : TModel;\n\n protected get module(): ModuleModelExt {\n return (this.model as any)?.module ?? this.collection.module;\n }\n\n protected get em(): EditorModel {\n return this.module.em;\n }\n\n protected get config(): ModuleModelExt extends IBaseModule ? C : unknown {\n return this.module.config as any;\n }\n\n public className!: string;\n\n preinitialize(options?: any) {\n this.className = '';\n }\n}\n","import ModuleView from './ModuleView';\nimport ModuleCollection from './ModuleCollection';\nimport ModuleModel from './ModuleModel';\nimport { View } from '../common';\n\nexport default abstract class ModuleDomainViews<\n TCollection extends ModuleCollection,\n TItemView extends ModuleView\n> extends ModuleView {\n // Defines the View per type\n itemsView = '';\n\n protected itemType = 'type';\n\n reuseView = false;\n\n viewCollection: TItemView[] = [];\n constructor(opts: any = {}, autoAdd = false) {\n super(opts);\n autoAdd && this.listenTo(this.collection, 'add', this.addTo);\n }\n\n /**\n * Add new model to the collection\n * @param {ModuleModel} model\n * @private\n * */\n private addTo(model: ModuleModel) {\n this.add(model);\n }\n\n private itemViewNotFound(type: string) {\n /*const { em, ns } = this;\n const warn = `${ns ? `[${ns}]: ` : ''}'${type}' type not found`;\n em?.logWarning(warn);*/\n }\n protected abstract renderView(model: ModuleModel, itemType: string): TItemView;\n\n /**\n * Render new model inside the view\n * @param {ModuleModel} model\n * @param {Object} fragment Fragment collection\n * @private\n * */\n private add(model: ModuleModel, fragment?: DocumentFragment) {\n const { reuseView, viewCollection } = this;\n var frag = fragment || null;\n var typeField = model.get(this.itemType);\n let view;\n\n //@ts-ignore\n if (model.view && reuseView) {\n //@ts-ignore\n view = model.view;\n } else {\n view = this.renderView(model, typeField);\n }\n\n viewCollection.push(view);\n const rendered = view.render().el;\n\n if (frag) frag.appendChild(rendered);\n else this.$el.append(rendered);\n }\n\n render() {\n const frag = document.createDocumentFragment();\n this.clearItems();\n this.$el.empty();\n\n if (this.collection.length) this.collection.each(model => this.add(model, frag));\n\n this.$el.append(frag);\n this.onRender();\n return this;\n }\n\n onRender() {}\n\n onRemoveBefore(items: TItemView[], opts: any) {}\n onRemove(items: TItemView[], opts: any) {}\n\n remove(opts: any = {}) {\n const { viewCollection } = this;\n this.onRemoveBefore(viewCollection, opts);\n this.clearItems();\n View.prototype.remove.apply(this, opts);\n this.onRemove(viewCollection, opts);\n return this;\n }\n\n clearItems() {\n const items = this.viewCollection || [];\n // TODO Traits do not update the target anymore\n // items.forEach(item => item.remove());\n // this.items = [];\n }\n}\n","import { View } from '../../common';\nimport CssRule from '../model/CssRule';\n\nexport default class CssRuleView extends View {\n config: any;\n\n constructor(o: any = {}) {\n super(o);\n this.config = o.config || {};\n const { model } = this;\n this.listenTo(model, 'change', this.render);\n this.listenTo(model, 'destroy remove', this.remove);\n this.listenTo(model.get('selectors'), 'change', this.render);\n }\n\n // @ts-ignore\n tagName() {\n return 'style';\n }\n\n render() {\n const { model, el } = this;\n const important = model.get('important');\n el.innerHTML = model.toCSS({ important });\n return this;\n }\n}\n","import CssRuleView from './CssRuleView';\n\nexport default class CssGroupRuleView extends CssRuleView {\n _createElement() {\n return document.createTextNode('');\n }\n\n render() {\n const model = this.model;\n const important = model.get('important');\n this.el.textContent = model.getDeclaration({ important });\n return this;\n }\n}\n","import { bindAll } from 'underscore';\n\nimport { View } from '../../common';\nimport { createEl } from '../../utils/dom';\nimport CssRuleView from './CssRuleView';\nimport CssGroupRuleView from './CssGroupRuleView';\nimport EditorModel from '../../editor/model/Editor';\nimport CssRule from '../model/CssRule';\n\nconst getBlockId = (pfx: string, order?: string | number) => `${pfx}${order ? `-${parseFloat(order as string)}` : ''}`;\n\nexport default class CssRulesView extends View {\n atRules: Record;\n config: Record;\n em: EditorModel;\n pfx: string;\n renderStarted?: boolean;\n\n constructor(o: any) {\n super(o);\n bindAll(this, 'sortRules');\n\n const config = o.config || {};\n this.atRules = {};\n this.config = config;\n this.em = config.em;\n this.pfx = config.stylePrefix || '';\n this.className = this.pfx + 'rules';\n const coll = this.collection;\n this.listenTo(coll, 'add', this.addTo);\n this.listenTo(coll, 'reset', this.render);\n }\n\n /**\n * Add to collection\n * @param {Object} model\n * @private\n * */\n addTo(model: CssRule) {\n this.addToCollection(model);\n }\n\n /**\n * Add new object to collection\n * @param {Object} model\n * @param {Object} fragmentEl\n * @return {Object}\n * @private\n * */\n addToCollection(model: CssRule, fragmentEl?: DocumentFragment) {\n // If the render is not yet started\n if (!this.renderStarted) {\n return;\n }\n\n const fragment = fragmentEl || null;\n const { config } = this;\n const opts = { model, config };\n let rendered, view;\n\n // I have to render keyframes of the same name together\n // Unfortunately at the moment I didn't find the way of appending them\n // if not staticly, via appendData\n if (model.get('atRuleType') === 'keyframes') {\n const atRule = model.getAtRule();\n let atRuleEl = this.atRules[atRule];\n\n if (!atRuleEl) {\n const styleEl = document.createElement('style');\n atRuleEl = document.createTextNode('');\n styleEl.appendChild(document.createTextNode(`${atRule}{`));\n styleEl.appendChild(atRuleEl);\n styleEl.appendChild(document.createTextNode('}'));\n this.atRules[atRule] = atRuleEl;\n rendered = styleEl;\n }\n\n view = new CssGroupRuleView(opts);\n atRuleEl.appendData(view.render().el.textContent);\n } else {\n view = new CssRuleView(opts);\n rendered = view.render().el;\n }\n\n const clsName = this.className!;\n const mediaText = model.get('mediaText');\n const defaultBlockId = getBlockId(clsName);\n let blockId = defaultBlockId;\n\n // If the rule contains a media query it might have a different container\n // for it (eg. rules created with Device Manager)\n if (mediaText) {\n blockId = getBlockId(clsName, this.getMediaWidth(mediaText));\n }\n\n if (rendered) {\n const container = fragment || this.el;\n let contRules;\n\n // Try to find a specific container for the rule (if it\n // containes a media query), otherwise get the default one\n try {\n contRules = container.querySelector(`#${blockId}`);\n } catch (e) {}\n\n if (!contRules) {\n contRules = container.querySelector(`#${defaultBlockId}`);\n }\n\n contRules?.appendChild(rendered);\n }\n\n return rendered;\n }\n\n getMediaWidth(mediaText: string) {\n return mediaText && mediaText.replace(`(${this.em.getConfig().mediaCondition}: `, '').replace(')', '');\n }\n\n sortRules(a: number, b: number) {\n const { em } = this;\n const isMobFirst = (em.getConfig().mediaCondition || '').indexOf('min-width') !== -1;\n\n if (!isMobFirst) return 0;\n\n const left = isMobFirst ? a : b;\n const right = isMobFirst ? b : a;\n\n return left - right;\n }\n\n render() {\n this.renderStarted = true;\n this.atRules = {};\n const { em, $el, collection } = this;\n const cls = this.className!;\n const frag = document.createDocumentFragment();\n $el.empty();\n\n // Create devices related DOM structure, ensure also to have a default container\n const prs = em.Devices.getAll().pluck('priority').sort(this.sortRules) as number[];\n prs.every(pr => pr) && prs.unshift(0);\n prs.forEach(pr => frag.appendChild(createEl('div', { id: getBlockId(cls, pr) })));\n\n collection.each(model => this.addToCollection(model, frag));\n $el.append(frag);\n $el.attr('class', cls);\n return this;\n }\n}\n","import { bindAll, indexOf } from 'underscore';\nimport CanvasModule from '../canvas';\nimport { ObjectStrings } from '../common';\nimport EditorModel from '../editor/model/Editor';\nimport { getDocumentScroll, off, on } from './dom';\n\n// TODO move in sorter\ntype SorterOptions = {\n sorter: any;\n event: any;\n};\n\ntype DragStop = (cancel?: boolean) => void;\n\ntype DragContent = (content: any) => void;\n\n/**\n * This class makes the canvas droppable\n */\nexport default class Droppable {\n em: EditorModel;\n canvas: CanvasModule;\n el: HTMLElement;\n counter: number;\n sortOpts?: Record | null;\n over?: boolean;\n dragStop?: DragStop;\n dragContent?: DragContent;\n sorter?: any;\n\n constructor(em: EditorModel, rootEl?: HTMLElement) {\n this.em = em;\n this.canvas = em.Canvas;\n const el = rootEl || this.canvas.getFrames().map(frame => frame.getComponent().getEl()!);\n const els = Array.isArray(el) ? el : [el];\n this.el = els[0];\n this.counter = 0;\n bindAll(this, 'handleDragEnter', 'handleDragOver', 'handleDrop', 'handleDragLeave');\n els.forEach(el => this.toggleEffects(el, true));\n }\n\n toggleEffects(el: HTMLElement, enable: boolean) {\n const methods = { on, off };\n const method = enable ? 'on' : 'off';\n methods[method](el, 'dragenter', this.handleDragEnter);\n methods[method](el, 'dragover', this.handleDragOver);\n methods[method](el, 'drop', this.handleDrop);\n methods[method](el, 'dragleave', this.handleDragLeave);\n }\n\n __customTglEff(enable: boolean) {\n const method = enable ? on : off;\n const doc = this.el.ownerDocument;\n const frameEl = doc.defaultView?.frameElement as HTMLIFrameElement;\n this.sortOpts = enable\n ? {\n onStart({ sorter }: SorterOptions) {\n on(frameEl, 'pointermove', sorter.onMove);\n },\n onEnd({ sorter }: SorterOptions) {\n off(frameEl, 'pointermove', sorter.onMove);\n },\n customTarget({ event }: SorterOptions) {\n return doc.elementFromPoint(event.clientX, event.clientY);\n },\n }\n : null;\n method(frameEl, 'pointerenter', this.handleDragEnter);\n method(frameEl, 'pointermove', this.handleDragOver);\n method(document, 'pointerup', this.handleDrop);\n method(frameEl, 'pointerout', this.handleDragLeave);\n\n // Test with touch devices (seems like frameEl is not capturing pointer events).\n // on/off(document, 'pointermove', sorter.onMove); // for the sorter\n // enable && this.handleDragEnter({}); // no way to use pointerenter/pointerout\n }\n\n startCustom() {\n this.__customTglEff(true);\n }\n\n endCustom(cancel?: boolean) {\n this.over ? this.endDrop(cancel) : this.__customTglEff(false);\n }\n\n /**\n * This function is expected to be always executed at the end of d&d.\n */\n endDrop(cancel?: boolean, ev?: Event) {\n const { em, dragStop } = this;\n this.counter = 0;\n dragStop && dragStop(cancel || !this.over);\n this.__customTglEff(false);\n em.trigger('canvas:dragend', ev);\n }\n\n handleDragLeave(ev: Event) {\n this.updateCounter(-1, ev);\n }\n\n updateCounter(value: number, ev: Event) {\n this.counter += value;\n this.counter === 0 && this.endDrop(true, ev);\n }\n\n handleDragEnter(ev: DragEvent | Event) {\n const { em, canvas } = this;\n const dt = (ev as DragEvent).dataTransfer;\n const dragContentOrigin = em.get('dragContent');\n\n if (!dragContentOrigin && !canvas.getConfig().allowExternalDrop) {\n return;\n }\n\n this.updateCounter(1, ev);\n if (this.over) return;\n this.over = true;\n const utils = em.Utils;\n // For security reason I can't read the drag data on dragenter, but\n // as I need it for the Sorter context I will use `dragContent` or just\n // any not empty element\n let content = dragContentOrigin || '
';\n let dragStop: DragStop;\n let dragContent;\n em.stopDefault();\n\n // Select the right drag provider\n if (em.inAbsoluteMode()) {\n const wrapper = em.Components.getWrapper()!;\n const target = wrapper.append({})[0];\n const dragger = em.Commands.run('core:component-drag', {\n event: ev,\n guidesInfo: 1,\n center: 1,\n target,\n onEnd: (ev: any, dragger: any, { cancelled }: any) => {\n let comp;\n if (!cancelled) {\n comp = wrapper.append(content)[0];\n const canvasOffset = canvas.getOffset();\n const { top, left, position } = target.getStyle() as ObjectStrings;\n const scroll = getDocumentScroll(ev.target);\n const postLeft = parseInt(`${parseFloat(left) + scroll.x - canvasOffset.left}`, 10);\n const posTop = parseInt(`${parseFloat(top) + scroll.y - canvasOffset.top}`, 10);\n\n comp.addStyle({\n left: postLeft + 'px',\n top: posTop + 'px',\n position,\n });\n }\n this.handleDragEnd(comp, dt);\n target.remove();\n },\n });\n dragStop = (cancel?: boolean) => dragger.stop(ev, { cancel });\n dragContent = (cnt: any) => (content = cnt);\n } else {\n const sorter = new utils.Sorter({\n // @ts-ignore\n em,\n wmargin: 1,\n nested: 1,\n canvasRelative: 1,\n direction: 'a',\n container: this.el,\n placer: canvas.getPlacerEl(),\n containerSel: '*',\n itemSel: '*',\n pfx: 'gjs-',\n onEndMove: (model: any) => this.handleDragEnd(model, dt),\n document: this.el.ownerDocument,\n ...(this.sortOpts || {}),\n });\n sorter.setDropContent(content);\n sorter.startSort();\n this.sorter = sorter;\n dragStop = (cancel?: boolean) => {\n cancel && (sorter.moved = false);\n sorter.endMove();\n };\n dragContent = (content: any) => sorter.setDropContent(content);\n }\n\n this.dragStop = dragStop;\n this.dragContent = dragContent;\n em.trigger('canvas:dragenter', dt, content);\n }\n\n handleDragEnd(model: any, dt: any) {\n const { em } = this;\n this.over = false;\n if (model) {\n em.set('dragResult', model);\n em.trigger('canvas:drop', dt, model);\n }\n em.runDefault({ preserveSelected: 1 });\n }\n\n /**\n * Always need to have this handler active for enabling the drop\n * @param {Event} ev\n */\n handleDragOver(ev: Event) {\n ev.preventDefault();\n this.em.trigger('canvas:dragover', ev);\n }\n\n /**\n * WARNING: This function might fail to run on drop, for example, when the\n * drop, accidentally, happens on some external element (DOM not inside the iframe)\n */\n handleDrop(ev: Event | DragEvent) {\n ev.preventDefault();\n const { dragContent } = this;\n const dt = (ev as DragEvent).dataTransfer;\n const content = this.getContentByData(dt).content;\n (ev.target as HTMLElement).style.border = '';\n content && dragContent && dragContent(content);\n this.endDrop(!content, ev);\n }\n\n getContentByData(dt: any) {\n const em = this.em;\n const types = dt && dt.types;\n const files = (dt && dt.files) || [];\n const dragContent = em.get('dragContent');\n let content = dt && dt.getData('text');\n\n if (files.length) {\n content = [];\n for (let i = 0; i < files.length; i++) {\n const file = files[i];\n const type = file.type.split('/')[0];\n\n if (type == 'image') {\n content.push({\n type,\n file,\n attributes: { alt: file.name },\n });\n }\n }\n } else if (dragContent) {\n content = dragContent;\n } else if (indexOf(types, 'text/html') >= 0) {\n content = dt && dt.getData('text/html').replace(/<\\/?meta[^>]*>/g, '');\n } else if (indexOf(types, 'text/uri-list') >= 0) {\n content = {\n type: 'link',\n attributes: { href: content },\n content: content,\n };\n } else if (indexOf(types, 'text/json') >= 0) {\n const json = dt && dt.getData('text/json');\n json && (content = JSON.parse(json));\n } else if (types.length === 1 && types[0] === 'text/plain') {\n // Avoid dropping non-selectable and non-editable text nodes inside the editor\n content = `
${content}
`;\n }\n\n const result = { content };\n em.trigger('canvas:dragdata', dt, result);\n\n return result;\n }\n}\n","import { bindAll, debounce, isString, isUndefined } from 'underscore';\nimport { ModuleView } from '../../abstract';\nimport { BoxRect, ObjectAny } from '../../common';\nimport CssRulesView from '../../css_composer/view/CssRulesView';\nimport ComponentWrapperView from '../../dom_components/view/ComponentWrapperView';\nimport Droppable from '../../utils/Droppable';\nimport {\n append,\n appendVNodes,\n createCustomEvent,\n createEl,\n getPointerEvent,\n motionsEv,\n off,\n on,\n} from '../../utils/dom';\nimport { hasDnd, setViewEl } from '../../utils/mixins';\nimport Canvas from '../model/Canvas';\nimport Frame from '../model/Frame';\nimport FrameWrapView from './FrameWrapView';\nimport CanvasEvents from '../types';\n\nexport default class FrameView extends ModuleView {\n /** @ts-ignore */\n get tagName() {\n return 'iframe';\n }\n /** @ts-ignore */\n get attributes() {\n return { allowfullscreen: 'allowfullscreen' };\n }\n\n dragging = false;\n loaded = false;\n droppable?: Droppable;\n rect?: DOMRect;\n\n lastClientY?: number;\n lastMaxHeight = 0;\n private jsContainer?: HTMLElement;\n private tools: { [key: string]: HTMLElement } = {};\n private wrapper?: ComponentWrapperView;\n private frameWrapView?: FrameWrapView;\n\n constructor(model: Frame, view?: FrameWrapView) {\n super({ model });\n bindAll(this, 'updateClientY', 'stopAutoscroll', 'autoscroll', '_emitUpdate');\n const { el } = this;\n //@ts-ignore\n this.module._config = {\n ...(this.config || {}),\n //@ts-ignore\n frameView: this,\n //canvasView: view?.cv\n };\n this.frameWrapView = view;\n this.showGlobalTools = debounce(this.showGlobalTools.bind(this), 50);\n const cvModel = this.getCanvasModel();\n this.listenTo(model, 'change:head', this.updateHead);\n this.listenTo(cvModel, 'change:styles', this.renderStyles);\n model.view = this;\n setViewEl(el, this);\n }\n\n getBoxRect(): BoxRect {\n const { el, module } = this;\n const canvasView = module.getCanvasView();\n const coords = module.getCoords();\n const frameRect = el.getBoundingClientRect();\n const canvasRect = canvasView.getCanvasOffset();\n const vwDelta = canvasView.getViewportDelta();\n const zoomM = module.getZoomMultiplier();\n const x = (frameRect.x - canvasRect.left - vwDelta.x - coords.x) * zoomM;\n const y = (frameRect.y - canvasRect.top - vwDelta.y - coords.y) * zoomM;\n const width = frameRect.width * zoomM;\n const height = frameRect.height * zoomM;\n\n return {\n x,\n y,\n width,\n height,\n };\n }\n\n /**\n * Update `` content of the frame\n */\n updateHead() {\n const { model } = this;\n const headEl = this.getHead();\n const toRemove: any[] = [];\n const toAdd: any[] = [];\n const current = model.head;\n const prev = model.previous('head');\n const attrStr = (attr: any = {}) =>\n Object.keys(attr)\n .sort()\n .map(i => `[${i}=\"${attr[i]}\"]`)\n .join('');\n const find = (items: any[], stack: any[], res: any[]) => {\n items.forEach(item => {\n const { tag, attributes } = item;\n const has = stack.some(s => s.tag === tag && attrStr(s.attributes) === attrStr(attributes));\n !has && res.push(item);\n });\n };\n find(current, prev, toAdd);\n find(prev, current, toRemove);\n toRemove.forEach(stl => {\n const el = headEl.querySelector(`${stl.tag}${attrStr(stl.attributes)}`);\n el?.parentNode?.removeChild(el);\n });\n appendVNodes(headEl, toAdd);\n }\n\n getEl() {\n return this.el;\n }\n\n getCanvasModel(): Canvas {\n return this.em.Canvas.getModel();\n }\n\n getWindow() {\n return this.getEl().contentWindow as Window;\n }\n\n getDoc() {\n return this.getEl().contentDocument as Document;\n }\n\n getHead() {\n return this.getDoc().querySelector('head') as HTMLHeadElement;\n }\n\n getBody() {\n return this.getDoc().querySelector('body') as HTMLBodyElement;\n }\n\n getWrapper() {\n return this.getBody().querySelector('[data-gjs-type=wrapper]') as HTMLElement;\n }\n\n getJsContainer() {\n if (!this.jsContainer) {\n this.jsContainer = createEl('div', { class: `${this.ppfx}js-cont` });\n }\n\n return this.jsContainer;\n }\n\n getToolsEl() {\n return this.frameWrapView?.elTools as HTMLElement;\n }\n\n getGlobalToolsEl() {\n return this.em.Canvas.getGlobalToolsEl()!;\n }\n\n getHighlighter() {\n return this._getTool('[data-hl]');\n }\n\n getBadgeEl() {\n return this._getTool('[data-badge]');\n }\n\n getOffsetViewerEl() {\n return this._getTool('[data-offset]');\n }\n\n getRect() {\n if (!this.rect) {\n this.rect = this.el.getBoundingClientRect();\n }\n\n return this.rect;\n }\n\n /**\n * Get rect data, not affected by the canvas zoom\n */\n getOffsetRect() {\n const { el } = this;\n const { scrollTop, scrollLeft } = this.getBody();\n const height = el.offsetHeight;\n const width = el.offsetWidth;\n\n return {\n top: el.offsetTop,\n left: el.offsetLeft,\n height,\n width,\n scrollTop,\n scrollLeft,\n scrollBottom: scrollTop + height,\n scrollRight: scrollLeft + width,\n };\n }\n\n _getTool(name: string) {\n const { tools } = this;\n const toolsEl = this.getToolsEl();\n\n if (!tools[name]) {\n tools[name] = toolsEl.querySelector(name) as HTMLElement;\n }\n\n return tools[name];\n }\n\n remove(...args: any) {\n this._toggleEffects(false);\n this.tools = {};\n this.wrapper?.remove();\n ModuleView.prototype.remove.apply(this, args);\n return this;\n }\n\n startAutoscroll() {\n this.lastMaxHeight = this.getWrapper().offsetHeight - this.el.offsetHeight;\n\n // By detaching those from the stack avoid browsers lags\n // Noticeable with \"fast\" drag of blocks\n setTimeout(() => {\n this._toggleAutoscrollFx(true);\n requestAnimationFrame(this.autoscroll);\n }, 0);\n }\n\n autoscroll() {\n if (this.dragging) {\n const { lastClientY } = this;\n const canvas = this.em.Canvas;\n const win = this.getWindow();\n const actualTop = win.pageYOffset;\n const clientY = lastClientY || 0;\n const limitTop = canvas.getConfig().autoscrollLimit!;\n const limitBottom = this.getRect().height - limitTop;\n let nextTop = actualTop;\n\n if (clientY < limitTop) {\n nextTop -= limitTop - clientY;\n }\n\n if (clientY > limitBottom) {\n nextTop += clientY - limitBottom;\n }\n\n if (\n !isUndefined(lastClientY) && // Fixes #3134\n nextTop !== actualTop &&\n nextTop > 0 &&\n nextTop < this.lastMaxHeight\n ) {\n const toolsEl = this.getGlobalToolsEl();\n toolsEl.style.opacity = '0';\n this.showGlobalTools();\n win.scrollTo(0, nextTop);\n canvas.spots.refreshDbn();\n }\n\n requestAnimationFrame(this.autoscroll);\n }\n }\n\n updateClientY(ev: Event) {\n ev.preventDefault();\n this.lastClientY = getPointerEvent(ev).clientY * this.em.getZoomDecimal();\n }\n\n showGlobalTools() {\n this.getGlobalToolsEl().style.opacity = '';\n }\n\n stopAutoscroll() {\n this.dragging && this._toggleAutoscrollFx(false);\n }\n\n _toggleAutoscrollFx(enable: boolean) {\n this.dragging = enable;\n const win = this.getWindow();\n const method = enable ? 'on' : 'off';\n const mt = { on, off };\n mt[method](win, 'mousemove dragover', this.updateClientY);\n mt[method](win, 'mouseup', this.stopAutoscroll);\n }\n\n render() {\n const { $el, ppfx, em } = this;\n $el.attr({ class: `${ppfx}frame` });\n this.renderScripts();\n em.trigger('frame:render', this); // deprecated\n return this;\n }\n\n renderScripts() {\n const { el, model, em } = this;\n const evLoad = 'frame:load';\n const evOpts: ObjectAny = { el, model, view: this };\n const canvas = this.getCanvasModel();\n const appendScript = (scripts: any[]) => {\n if (scripts.length > 0) {\n const src = scripts.shift();\n const scriptEl = createEl('script', {\n type: 'text/javascript',\n ...(isString(src) ? { src } : src),\n });\n el.contentDocument?.head.appendChild(scriptEl);\n\n if (scriptEl.hasAttribute('nomodule') && 'noModule' in HTMLScriptElement.prototype) {\n appendScript(scripts);\n } else {\n scriptEl.onerror = scriptEl.onload = appendScript.bind(null, scripts);\n }\n } else {\n em?.trigger(CanvasEvents.frameLoadHead, evOpts);\n this.renderBody();\n em?.trigger(CanvasEvents.frameLoadBody, evOpts);\n em?.trigger(evLoad, evOpts); // deprecated\n }\n };\n\n el.onload = () => {\n const { frameContent } = this.config;\n if (frameContent) {\n const doc = this.getDoc();\n doc.open();\n doc.write(frameContent);\n doc.close();\n }\n evOpts.window = this.getWindow();\n em?.trigger(`${evLoad}:before`, evOpts); // deprecated\n em?.trigger(CanvasEvents.frameLoad, evOpts);\n appendScript([...canvas.get('scripts')]);\n };\n }\n\n renderStyles(opts: any = {}) {\n const head = this.getHead();\n const canvas = this.getCanvasModel();\n const normalize = (stls: any[]) =>\n stls.map(href => ({\n tag: 'link',\n attributes: {\n rel: 'stylesheet',\n ...(isString(href) ? { href } : href),\n },\n }));\n const prevStyles = normalize(opts.prev || canvas.previous('styles'));\n const styles = normalize(canvas.get('styles'));\n const toRemove: any[] = [];\n const toAdd: any[] = [];\n const find = (items: any[], stack: any[], res: any[]) => {\n items.forEach(item => {\n const { href } = item.attributes;\n const has = stack.some(s => s.attributes.href === href);\n !has && res.push(item);\n });\n };\n find(styles, prevStyles, toAdd);\n find(prevStyles, styles, toRemove);\n toRemove.forEach(stl => {\n const el = head.querySelector(`link[href=\"${stl.attributes.href}\"]`);\n el?.parentNode?.removeChild(el);\n });\n appendVNodes(head, toAdd);\n }\n\n renderBody() {\n const { config, em, model, ppfx } = this;\n const doc = this.getDoc();\n const body = this.getBody();\n const win = this.getWindow();\n const hasAutoHeight = model.hasAutoHeight();\n const conf = em.config;\n //@ts-ignore This could be used inside component-related scripts to check if the\n // script is executed inside the editor.\n win._isEditor = true;\n this.renderStyles({ prev: [] });\n\n const colorWarn = '#ffca6f';\n\n append(\n body,\n ``\n );\n const { root } = model;\n const { view } = em.Components.getType('wrapper')!;\n this.wrapper = new view({\n model: root,\n config: {\n ...root.config,\n em,\n frameView: this,\n },\n }).render();\n append(body, this.wrapper?.el!);\n append(\n body,\n new CssRulesView({\n collection: model.getStyles(),\n //@ts-ignore\n config: {\n ...em.Css.getConfig(),\n frameView: this,\n },\n }).render().el\n );\n append(body, this.getJsContainer());\n // em.trigger('loaded'); // I need to manage only the first one maybe\n //this.updateOffset(); // TOFIX (check if I need it)\n\n // Avoid some default behaviours\n //@ts-ignore\n on(body, 'click', ev => ev && ev.target?.tagName == 'A' && ev.preventDefault());\n on(body, 'submit', ev => ev && ev.preventDefault());\n\n // When the iframe is focused the event dispatcher is not the same so\n // I need to delegate all events to the parent document\n [\n { event: 'keydown keyup keypress', class: 'KeyboardEvent' },\n { event: 'mousedown mousemove mouseup', class: 'MouseEvent' },\n { event: 'pointerdown pointermove pointerup', class: 'PointerEvent' },\n { event: 'wheel', class: 'WheelEvent', opts: { passive: !config.infiniteCanvas } },\n ].forEach(obj =>\n obj.event.split(' ').forEach(event => {\n doc.addEventListener(event, ev => this.el.dispatchEvent(createCustomEvent(ev, obj.class)), obj.opts);\n })\n );\n\n this._toggleEffects(true);\n\n if (hasDnd(em)) {\n this.droppable = new Droppable(em, this.wrapper?.el);\n }\n\n this.loaded = true;\n model.trigger('loaded');\n }\n\n _toggleEffects(enable: boolean) {\n const method = enable ? on : off;\n const win = this.getWindow();\n win && method(win, `${motionsEv} resize`, this._emitUpdate);\n }\n\n _emitUpdate() {\n this.model._emitUpdated();\n }\n}\n","import { bindAll, isNumber, isNull, debounce } from 'underscore';\nimport { ModuleView } from '../../abstract';\nimport FrameView from './FrameView';\nimport { createEl, removeEl } from '../../utils/dom';\nimport Dragger from '../../utils/Dragger';\nimport CanvasView from './CanvasView';\nimport Frame from '../model/Frame';\n\nexport default class FrameWrapView extends ModuleView {\n events() {\n return {\n 'click [data-action-remove]': 'remove',\n 'mousedown [data-action-move]': 'startDrag',\n };\n }\n elTools?: HTMLElement;\n frame: FrameView;\n dragger?: Dragger;\n cv: CanvasView;\n classAnim: string;\n sizeObserver?: ResizeObserver;\n\n constructor(model: Frame, canvasView: CanvasView) {\n super({ model });\n bindAll(this, 'onScroll', 'frameLoaded', 'updateOffset', 'remove', 'startDrag');\n const config = {\n ...model.config,\n frameWrapView: this,\n };\n this.cv = canvasView;\n this.frame = new FrameView(model, this);\n this.classAnim = `${this.ppfx}frame-wrapper--anim`;\n this.updateOffset = debounce(this.updateOffset.bind(this), 0);\n this.updateSize = debounce(this.updateSize.bind(this), 0);\n this.listenTo(model, 'loaded', this.frameLoaded);\n this.listenTo(model, 'change:x change:y', this.updatePos);\n this.listenTo(model, 'change:width change:height', this.updateSize);\n this.listenTo(model, 'destroy remove', this.remove);\n this.updatePos();\n this.setupDragger();\n }\n\n setupDragger() {\n const { module, model } = this;\n let dragX: number, dragY: number, zoom: number;\n const toggleEffects = (on: boolean) => {\n module.toggleFramesEvents(on);\n };\n\n this.dragger = new Dragger({\n onStart: () => {\n const { x, y } = model.attributes;\n zoom = this.em.getZoomMultiplier();\n dragX = x;\n dragY = y;\n toggleEffects(false);\n },\n onEnd: () => toggleEffects(true),\n setPosition: (posOpts: any) => {\n model.set({\n x: dragX + posOpts.x * zoom,\n y: dragY + posOpts.y * zoom,\n });\n },\n });\n }\n\n startDrag(ev?: Event) {\n ev && this.dragger?.start(ev);\n }\n\n __clear(opts?: any) {\n const { frame } = this;\n frame && frame.remove(opts);\n removeEl(this.elTools);\n }\n\n remove(opts?: any) {\n this.__clear(opts);\n ModuleView.prototype.remove.apply(this, opts);\n //@ts-ignore\n ['frame', 'dragger', 'cv', 'elTools'].forEach(i => (this[i] = 0));\n return this;\n }\n\n updateOffset() {\n const { em, $el, frame } = this;\n if (!em || em.destroyed) return;\n em.runDefault({ preserveSelected: 1 });\n $el.removeClass(this.classAnim);\n frame?.model?._emitUpdated();\n }\n\n updatePos(md?: boolean) {\n const { model, el } = this;\n const { x, y } = model.attributes;\n const { style } = el;\n this.frame.rect = undefined;\n style.left = isNaN(x) ? x : `${x}px`;\n style.top = isNaN(y) ? y : `${y}px`;\n md && this.updateOffset();\n }\n\n updateSize() {\n this.updateDim();\n }\n\n /**\n * Update dimensions of the frame\n * @private\n */\n updateDim() {\n const { em, el, $el, model, classAnim, frame } = this;\n if (!frame) return;\n frame.rect = undefined;\n $el.addClass(classAnim);\n const { noChanges, width, height } = this.__handleSize();\n\n // Set width and height from DOM (should be done only once)\n if (isNull(width) || isNull(height)) {\n model.set(\n {\n ...(!width ? { width: el.offsetWidth } : {}),\n ...(!height ? { height: el.offsetHeight } : {}),\n },\n { silent: 1 }\n );\n }\n\n // Prevent fixed highlighting box which appears when on\n // component hover during the animation\n em.stopDefault({ preserveSelected: 1 });\n noChanges ? this.updateOffset() : setTimeout(this.updateOffset, 350);\n }\n\n onScroll() {\n const { frame, em } = this;\n em.trigger('frame:scroll', {\n frame,\n body: frame.getBody(),\n target: frame.getWindow(),\n });\n }\n\n frameLoaded() {\n const { frame, config } = this;\n frame.getWindow().onscroll = this.onScroll;\n this.updateDim();\n }\n\n __handleSize() {\n const un = 'px';\n const { model, el } = this;\n const { style } = el;\n const { width, height } = model.attributes;\n const currW = style.width || '';\n const currH = style.height || '';\n const newW = width || '';\n const newH = height || '';\n const noChanges = currW == newW && currH == newH;\n const newWidth = isNumber(newW) ? `${newW}${un}` : newW;\n const newHeight = isNumber(newH) ? `${newH}${un}` : newH;\n style.width = newWidth;\n\n if (model.hasAutoHeight()) {\n const iframe = this.frame.el;\n\n if (\n iframe.contentDocument\n // this doesn't work always\n // && !this.sizeObserver\n ) {\n const { contentDocument } = iframe;\n const observer = new ResizeObserver(() => {\n style.height = `${contentDocument.body.scrollHeight}px`;\n });\n observer.observe(contentDocument.body);\n this.sizeObserver?.disconnect();\n this.sizeObserver = observer;\n }\n } else {\n style.height = newHeight;\n this.sizeObserver?.disconnect();\n delete this.sizeObserver;\n }\n\n return { noChanges, width, height, newW, newH };\n }\n\n render() {\n const { frame, $el, ppfx, cv, model, el } = this;\n const { onRender } = model.attributes;\n this.__clear();\n this.__handleSize();\n frame.render();\n $el\n .empty()\n .attr({ class: `${ppfx}frame-wrapper` })\n .append(\n `\n
\n
\n ${model.get('name') || ''}\n
\n
\n
\n \n
\n
\n
\n
\n
\n
\n `\n )\n .append(frame.el);\n const elTools = createEl(\n 'div',\n {\n class: `${ppfx}tools`,\n style: 'pointer-events:none; display: none',\n },\n `\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n `\n );\n this.elTools = elTools;\n const twrp = cv?.toolsWrapper;\n twrp && twrp.appendChild(elTools); // TODO remove on frame remove\n onRender &&\n onRender({\n el,\n elTop: el.querySelector('[data-frame-top]'),\n elRight: el.querySelector('[data-frame-right]'),\n elBottom: el.querySelector('[data-frame-bottom]'),\n elLeft: el.querySelector('[data-frame-left]'),\n frame: model,\n frameWrapperView: this,\n remove: this.remove,\n startDrag: this.startDrag,\n });\n return this;\n }\n}\n","import CanvasModule from '..';\nimport ModuleDomainViews from '../../abstract/ModuleDomainViews';\nimport Frames from '../model/Frames';\nimport CanvasView from './CanvasView';\nimport FrameWrapView from './FrameWrapView';\n\nexport default class FramesView extends ModuleDomainViews {\n canvasView: CanvasView;\n private _module: CanvasModule;\n\n constructor(opts = {}, config: any) {\n super(opts, true);\n this.listenTo(this.collection, 'reset', this.render);\n this.canvasView = config.canvasView;\n this._module = config.module;\n }\n\n onRemoveBefore(items: FrameWrapView[], opts = {}) {\n items.forEach(item => item.remove(opts));\n }\n\n onRender() {\n const { $el, ppfx } = this;\n $el.attr({ class: `${ppfx}frames` });\n }\n\n clearItems() {\n const items = this.viewCollection || [];\n items.forEach(item => item.remove());\n this.viewCollection = [];\n }\n\n protected renderView(item: any, type: string) {\n return new FrameWrapView(item, this.canvasView);\n }\n}\n","import { bindAll, isNumber } from 'underscore';\nimport { ModuleView } from '../../abstract';\nimport { BoxRect, Coordinates, CoordinatesTypes, ElementRect } from '../../common';\nimport Component from '../../dom_components/model/Component';\nimport ComponentView from '../../dom_components/view/ComponentView';\nimport {\n createEl,\n getDocumentScroll,\n getElRect,\n getKeyChar,\n hasModifierKey,\n isTextNode,\n off,\n on,\n} from '../../utils/dom';\nimport { getComponentView, getElement, getUiClass } from '../../utils/mixins';\nimport Canvas from '../model/Canvas';\nimport Frame from '../model/Frame';\nimport { GetBoxRectOptions, ToWorldOption } from '../types';\nimport FrameView from './FrameView';\nimport FramesView from './FramesView';\n\nexport interface MarginPaddingOffsets {\n marginTop?: number;\n marginRight?: number;\n marginBottom?: number;\n marginLeft?: number;\n paddingTop?: number;\n paddingRight?: number;\n paddingBottom?: number;\n paddingLeft?: number;\n}\n\nexport type ElementPosOpts = {\n avoidFrameOffset?: boolean;\n avoidFrameZoom?: boolean;\n noScroll?: boolean;\n};\n\nexport interface FitViewportOptions {\n frame?: Frame;\n gap?: number | { x: number; y: number };\n ignoreHeight?: boolean;\n el?: HTMLElement;\n}\n\nexport default class CanvasView extends ModuleView {\n template() {\n const { pfx } = this;\n return `\n
\n
\n
\n
\n \n `;\n }\n /*get className(){\n return this.pfx + 'canvas':\n }*/\n hlEl?: HTMLElement;\n badgeEl?: HTMLElement;\n placerEl?: HTMLElement;\n ghostEl?: HTMLElement;\n toolbarEl?: HTMLElement;\n resizerEl?: HTMLElement;\n offsetEl?: HTMLElement;\n fixedOffsetEl?: HTMLElement;\n toolsGlobEl?: HTMLElement;\n toolsEl?: HTMLElement;\n framesArea?: HTMLElement;\n toolsWrapper?: HTMLElement;\n spotsEl?: HTMLElement;\n cvStyle?: HTMLElement;\n clsUnscale: string;\n ready = false;\n\n frames!: FramesView;\n frame?: FrameView;\n\n private timerZoom?: number;\n\n private frmOff?: { top: number; left: number; width: number; height: number };\n private cvsOff?: { top: number; left: number; width: number; height: number };\n\n constructor(model: Canvas) {\n super({ model });\n bindAll(this, 'clearOff', 'onKeyPress', 'onWheel', 'onPointer');\n const { em, pfx, ppfx } = this;\n const { events } = this.module;\n this.className = `${pfx}canvas ${ppfx}no-touch-actions${!em.config.customUI ? ` ${pfx}canvas-bg` : ''}`;\n this.clsUnscale = `${pfx}unscale`;\n this._initFrames();\n this.listenTo(em, 'change:canvasOffset', this.clearOff);\n this.listenTo(em, 'component:selected', this.checkSelected);\n this.listenTo(em, `${events.coords} ${events.zoom}`, this.updateFrames);\n this.listenTo(model, 'change:frames', this._onFramesUpdate);\n this.toggleListeners(true);\n }\n\n _onFramesUpdate() {\n this._initFrames();\n this._renderFrames();\n }\n\n _initFrames() {\n const { frames, model, config, em } = this;\n const collection = model.frames;\n em.set('readyCanvas', 0);\n collection.once('loaded:all', () => em.set('readyCanvas', 1));\n frames?.remove();\n this.frames = new FramesView(\n { collection },\n {\n ...config,\n canvasView: this,\n }\n );\n }\n\n checkSelected(component: Component, opts: { scroll?: ScrollIntoViewOptions } = {}) {\n const { scroll } = opts;\n const currFrame = this.em.getCurrentFrame();\n\n scroll &&\n component.views?.forEach(view => {\n view.frameView === currFrame && view.scrollIntoView(scroll);\n });\n }\n\n remove(...args: any) {\n this.frames?.remove();\n //@ts-ignore\n this.frames = undefined;\n ModuleView.prototype.remove.apply(this, args);\n this.toggleListeners(false);\n return this;\n }\n\n preventDefault(ev: Event) {\n if (ev) {\n ev.preventDefault();\n (ev as any)._parentEvent?.preventDefault();\n }\n }\n\n toggleListeners(enable: boolean) {\n const { el, config } = this;\n const fn = enable ? on : off;\n fn(document, 'keypress', this.onKeyPress);\n fn(window, 'scroll resize', this.clearOff);\n fn(el, 'wheel', this.onWheel, { passive: !config.infiniteCanvas });\n fn(el, 'pointermove', this.onPointer);\n }\n\n screenToWorld(x: number, y: number): Coordinates {\n const { module } = this;\n const coords = module.getCoords();\n const zoom = module.getZoomMultiplier();\n const vwDelta = this.getViewportDelta();\n\n return {\n x: (x - coords.x - vwDelta.x) * zoom,\n y: (y - coords.y - vwDelta.y) * zoom,\n };\n }\n\n onPointer(ev: WheelEvent) {\n if (!this.config.infiniteCanvas) return;\n\n const canvasRect = this.getCanvasOffset();\n const docScroll = getDocumentScroll();\n const screenCoords: Coordinates = {\n x: ev.clientX - canvasRect.left + docScroll.x,\n y: ev.clientY - canvasRect.top + docScroll.y,\n };\n\n if ((ev as any)._parentEvent) {\n // with _parentEvent means was triggered from the iframe\n const frameRect = (ev.target as HTMLElement).getBoundingClientRect();\n const zoom = this.module.getZoomDecimal();\n screenCoords.x = frameRect.left - canvasRect.left + docScroll.x + ev.clientX * zoom;\n screenCoords.y = frameRect.top - canvasRect.top + docScroll.y + ev.clientY * zoom;\n }\n\n this.model.set({\n pointerScreen: screenCoords,\n pointer: this.screenToWorld(screenCoords.x, screenCoords.y),\n });\n }\n\n onKeyPress(ev: KeyboardEvent) {\n const { em } = this;\n const key = getKeyChar(ev);\n\n if (key === ' ' && em.getZoomDecimal() !== 1 && !em.Canvas.isInputFocused()) {\n this.preventDefault(ev);\n em.Editor.runCommand('core:canvas-move');\n }\n }\n\n onWheel(ev: WheelEvent) {\n const { module, config } = this;\n if (config.infiniteCanvas) {\n this.preventDefault(ev);\n const { deltaX, deltaY } = ev;\n const zoom = module.getZoomDecimal();\n const isZooming = hasModifierKey(ev);\n const coords = module.getCoords();\n\n if (isZooming) {\n const newZoom = zoom - deltaY * zoom * 0.01;\n module.setZoom(newZoom * 100);\n\n // Update coordinates based on pointer\n const pointer = this.model.getPointerCoords(CoordinatesTypes.Screen);\n const canvasRect = this.getCanvasOffset();\n const pointerX = pointer.x - canvasRect.width / 2;\n const pointerY = pointer.y - canvasRect.height / 2;\n const zoomDelta = newZoom / zoom;\n const x = pointerX - (pointerX - coords.x) * zoomDelta;\n const y = pointerY - (pointerY - coords.y) * zoomDelta;\n module.setCoords(x, y);\n } else {\n this.onPointer(ev);\n module.setCoords(coords.x - deltaX, coords.y - deltaY);\n }\n }\n }\n\n updateFrames(ev: Event) {\n const { em } = this;\n const toolsWrpEl = this.toolsWrapper!;\n const defOpts = { preserveSelected: 1 };\n this.updateFramesArea();\n this.clearOff();\n toolsWrpEl.style.display = 'none';\n em.trigger('canvas:update', ev);\n this.timerZoom && clearTimeout(this.timerZoom);\n this.timerZoom = setTimeout(() => {\n em.stopDefault(defOpts);\n em.runDefault(defOpts);\n toolsWrpEl.style.display = '';\n }, 300) as any;\n }\n\n updateFramesArea() {\n const { framesArea, model, module, cvStyle, clsUnscale } = this;\n const mpl = module.getZoomMultiplier();\n\n if (framesArea) {\n const { x, y } = model.attributes;\n const zoomDc = module.getZoomDecimal();\n\n framesArea.style.transform = `scale(${zoomDc}) translate(${x * mpl}px, ${y * mpl}px)`;\n }\n\n if (cvStyle) {\n cvStyle.innerHTML = `\n .${clsUnscale} { scale: ${mpl} }\n `;\n }\n }\n\n fitViewport(opts: FitViewportOptions = {}) {\n const { em, module, model } = this;\n const canvasRect = this.getCanvasOffset();\n const { el } = opts;\n const elFrame = el && getComponentView(el)?.frameView;\n const frame = elFrame ? elFrame.model : opts.frame || em.getCurrentFrameModel() || model.frames.at(0);\n const { x, y } = frame.attributes;\n const boxRect: BoxRect = {\n x: x ?? 0,\n y: y ?? 0,\n width: frame.width,\n height: frame.height,\n };\n\n if (el) {\n const elRect = this.getElBoxRect(el);\n boxRect.x = boxRect.x + elRect.x;\n boxRect.y = boxRect.y + elRect.y;\n boxRect.width = elRect.width;\n boxRect.height = elRect.height;\n }\n\n const noHeight = opts.ignoreHeight;\n const gap = opts.gap ?? 0;\n const gapIsNum = isNumber(gap);\n const gapX = gapIsNum ? gap : gap.x;\n const gapY = gapIsNum ? gap : gap.y;\n const boxWidth = boxRect.width + gapX * 2;\n const boxHeight = boxRect.height + gapY * 2;\n const canvasWidth = canvasRect.width;\n const canvasHeight = canvasRect.height;\n const widthRatio = canvasWidth / boxWidth;\n const heightRatio = canvasHeight / boxHeight;\n\n const zoomRatio = noHeight ? widthRatio : Math.min(widthRatio, heightRatio);\n const zoom = zoomRatio * 100;\n module.setZoom(zoom);\n\n // check for the frame witdh is necessary as we're centering the frame via CSS\n const coordX = -boxRect.x + (frame.width >= canvasWidth ? canvasWidth / 2 - boxWidth / 2 : -gapX);\n const coordY = -boxRect.y + canvasHeight / 2 - boxHeight / 2;\n\n const coords = {\n x: (coordX + gapX) * zoomRatio,\n y: (coordY + gapY) * zoomRatio,\n };\n\n if (noHeight) {\n const zoomMltp = module.getZoomMultiplier();\n const canvasWorldHeight = canvasHeight * zoomMltp;\n const canvasHeightDiff = canvasWorldHeight - canvasHeight;\n const yDelta = canvasHeightDiff / 2;\n coords.y = (-boxRect.y + gapY) * zoomRatio - yDelta / zoomMltp;\n }\n\n module.setCoords(coords.x, coords.y);\n }\n\n /**\n * Checks if the element is visible in the canvas's viewport\n * @param {HTMLElement} el\n * @return {Boolean}\n */\n isElInViewport(el: HTMLElement) {\n const elem = getElement(el);\n const rect = getElRect(elem);\n const frameRect = this.getFrameOffset(elem);\n const rTop = rect.top;\n const rLeft = rect.left;\n return rTop >= 0 && rLeft >= 0 && rTop <= frameRect.height && rLeft <= frameRect.width;\n }\n\n /**\n * Get the offset of the element\n * @param {HTMLElement} el\n * @return { {top: number, left: number, width: number, height: number} }\n */\n offset(el?: HTMLElement, opts: ElementPosOpts = {}) {\n const { noScroll } = opts;\n const rect = getElRect(el);\n const scroll = noScroll ? { x: 0, y: 0 } : getDocumentScroll(el);\n\n return {\n top: rect.top + scroll.y,\n left: rect.left + scroll.x,\n width: rect.width,\n height: rect.height,\n };\n }\n\n getRectToScreen(boxRect: Partial): BoxRect {\n const zoom = this.module.getZoomDecimal();\n const coords = this.module.getCoords();\n const vwDelta = this.getViewportDelta();\n const x = (boxRect.x ?? 0) * zoom + coords.x + vwDelta.x || 0;\n const y = (boxRect.y ?? 0) * zoom + coords.y + vwDelta.y || 0;\n\n return {\n x,\n y,\n width: (boxRect.width ?? 0) * zoom,\n height: (boxRect.height ?? 0) * zoom,\n };\n }\n\n getElBoxRect(el: HTMLElement, opts: GetBoxRectOptions = {}): BoxRect {\n const { module } = this;\n const { width, height, left, top } = getElRect(el);\n const frameView = getComponentView(el)?.frameView;\n const frameRect = frameView?.getBoxRect();\n const zoomMlt = module.getZoomMultiplier();\n const frameX = frameRect?.x ?? 0;\n const frameY = frameRect?.y ?? 0;\n const canvasEl = this.el;\n const docScroll = getDocumentScroll();\n const xWithFrame = left + frameX + (canvasEl.scrollLeft + docScroll.x) * zoomMlt;\n const yWithFrame = top + frameY + (canvasEl.scrollTop + docScroll.y) * zoomMlt;\n const boxRect = {\n x: xWithFrame,\n y: yWithFrame,\n width,\n height,\n };\n\n if (opts.local) {\n boxRect.x = left;\n boxRect.y = top;\n }\n\n return opts.toScreen ? this.getRectToScreen(boxRect) : boxRect;\n }\n\n getViewportRect(opts: ToWorldOption = {}): BoxRect {\n const { top, left, width, height } = this.getCanvasOffset();\n const { module } = this;\n\n if (opts.toWorld) {\n const zoom = module.getZoomMultiplier();\n const coords = module.getCoords();\n const vwDelta = this.getViewportDelta();\n const x = -coords.x - vwDelta.x || 0;\n const y = -coords.y - vwDelta.y || 0;\n\n return {\n x: x * zoom,\n y: y * zoom,\n width: width * zoom,\n height: height * zoom,\n };\n } else {\n return {\n x: left,\n y: top,\n width,\n height,\n };\n }\n }\n\n getViewportDelta(opts: { withZoom?: number } = {}): Coordinates {\n const zoom = this.module.getZoomMultiplier();\n const { width, height } = this.getCanvasOffset();\n const worldWidth = width * zoom;\n const worldHeight = height * zoom;\n const widthDelta = worldWidth - width;\n const heightDelta = worldHeight - height;\n\n return {\n x: widthDelta / 2 / zoom,\n y: heightDelta / 2 / zoom,\n };\n }\n\n /**\n * Cleare cached offsets\n * @private\n */\n clearOff() {\n this.frmOff = undefined;\n this.cvsOff = undefined;\n }\n\n /**\n * Return frame offset\n * @return { {top: number, left: number, width: number, height: number} }\n * @public\n */\n getFrameOffset(el?: HTMLElement) {\n if (!this.frmOff || el) {\n const frame = this.frame?.el;\n const winEl = el?.ownerDocument.defaultView;\n const frEl = winEl ? (winEl.frameElement as HTMLElement) : frame;\n this.frmOff = this.offset(frEl || frame);\n }\n return this.frmOff;\n }\n\n /**\n * Return canvas offset\n * @return { {top: number, left: number, width: number, height: number} }\n * @public\n */\n getCanvasOffset() {\n if (!this.cvsOff) this.cvsOff = this.offset(this.el);\n return this.cvsOff;\n }\n\n /**\n * Returns element's rect info\n * @param {HTMLElement} el\n * @param {object} opts\n * @return { {top: number, left: number, width: number, height: number, zoom: number, rect: any} }\n * @public\n */\n getElementPos(el: HTMLElement, opts: ElementPosOpts = {}) {\n const zoom = this.module.getZoomDecimal();\n const frameOffset = this.getFrameOffset(el);\n const canvasEl = this.el;\n const canvasOffset = this.getCanvasOffset();\n const elRect = this.offset(el, opts);\n const frameTop = opts.avoidFrameOffset ? 0 : frameOffset.top;\n const frameLeft = opts.avoidFrameOffset ? 0 : frameOffset.left;\n\n const elTop = opts.avoidFrameZoom ? elRect.top : elRect.top * zoom;\n const elLeft = opts.avoidFrameZoom ? elRect.left : elRect.left * zoom;\n\n const top = opts.avoidFrameOffset ? elTop : elTop + frameTop - canvasOffset.top + canvasEl.scrollTop;\n const left = opts.avoidFrameOffset ? elLeft : elLeft + frameLeft - canvasOffset.left + canvasEl.scrollLeft;\n const height = opts.avoidFrameZoom ? elRect.height : elRect.height * zoom;\n const width = opts.avoidFrameZoom ? elRect.width : elRect.width * zoom;\n\n return { top, left, height, width, zoom, rect: elRect };\n }\n\n /**\n * Returns element's offsets like margins and paddings\n * @param {HTMLElement} el\n * @return { MarginPaddingOffsets }\n * @public\n */\n getElementOffsets(el: HTMLElement) {\n if (!el || isTextNode(el)) return {};\n const result: MarginPaddingOffsets = {};\n const styles = window.getComputedStyle(el);\n const zoom = this.module.getZoomDecimal();\n const marginPaddingOffsets: (keyof MarginPaddingOffsets)[] = [\n 'marginTop',\n 'marginRight',\n 'marginBottom',\n 'marginLeft',\n 'paddingTop',\n 'paddingRight',\n 'paddingBottom',\n 'paddingLeft',\n ];\n marginPaddingOffsets.forEach(offset => {\n result[offset] = parseFloat(styles[offset]) * zoom;\n });\n\n return result;\n }\n\n /**\n * Returns position data of the canvas element\n * @return { {top: number, left: number, width: number, height: number} } obj Position object\n * @public\n */\n getPosition(opts: any = {}): ElementRect {\n const doc = this.frame?.el.contentDocument;\n if (!doc) {\n return {\n top: 0,\n left: 0,\n width: 0,\n height: 0,\n };\n }\n const bEl = doc.body;\n const zoom = this.module.getZoomDecimal();\n const fo = this.getFrameOffset();\n const co = this.getCanvasOffset();\n const { noScroll } = opts;\n\n return {\n top: fo.top + (noScroll ? 0 : bEl.scrollTop) * zoom - co.top,\n left: fo.left + (noScroll ? 0 : bEl.scrollLeft) * zoom - co.left,\n width: co.width,\n height: co.height,\n };\n }\n\n /**\n * Update javascript of a specific component passed by its View\n * @param {ModuleView} view Component's View\n * @private\n */\n //TODO change type after the ComponentView was updated to ts\n updateScript(view: any) {\n const model = view.model;\n const id = model.getId();\n\n if (!view.scriptContainer) {\n view.scriptContainer = createEl('div', { 'data-id': id });\n const jsEl = this.getJsContainer();\n jsEl?.appendChild(view.scriptContainer);\n }\n\n view.el.id = id;\n view.scriptContainer.innerHTML = '';\n // In editor, I make use of setTimeout as during the append process of elements\n // those will not be available immediately, therefore 'item' variable\n const script = document.createElement('script');\n const scriptFn = model.getScriptString();\n const scriptFnStr = model.get('script-props') ? scriptFn : `function(){\\n${scriptFn}\\n;}`;\n const scriptProps = JSON.stringify(model.__getScriptProps());\n console.log(script);\n script.innerHTML = `\n setTimeout(function() {\n var item = document.getElementById('${id}');\n if (!item) return;\n (${scriptFnStr}.bind(item))(${scriptProps})\n }, 1);`;\n // #873\n // Adding setTimeout will make js components work on init of the editor\n setTimeout(() => {\n const scr = view.scriptContainer;\n scr?.appendChild(script);\n }, 0);\n }\n\n /**\n * Get javascript container\n * @private\n */\n getJsContainer(view?: ComponentView) {\n const frameView = this.getFrameView(view);\n return frameView?.getJsContainer();\n }\n\n getFrameView(view?: ComponentView) {\n return view?.frameView || this.em.getCurrentFrame();\n }\n\n _renderFrames() {\n if (!this.ready) return;\n const { model, frames, em, framesArea } = this;\n const frms = model.frames;\n frms.listenToLoad();\n frames.render();\n const mainFrame = frms.at(0);\n const currFrame = mainFrame?.view;\n em.setCurrentFrame(currFrame);\n framesArea?.appendChild(frames.el);\n this.frame = currFrame;\n this.updateFramesArea();\n }\n\n renderFrames() {\n this._renderFrames();\n }\n\n render() {\n const { el, $el, ppfx, config, em } = this;\n $el.html(this.template());\n const $frames = $el.find('[data-frames]');\n this.framesArea = $frames.get(0);\n\n const toolsWrp = $el.find('[data-tools]');\n this.toolsWrapper = toolsWrp.get(0);\n toolsWrp.append(`\n
\n
\n
\n
\n
\n
\n ${config.extHl ? `
` : ''}\n
\n
\n
\n
\n
\n
\n
\n `);\n this.toolsEl = el.querySelector(`#${ppfx}tools`)!;\n this.hlEl = el.querySelector(`.${ppfx}highlighter`)!;\n this.badgeEl = el.querySelector(`.${ppfx}badge`)!;\n this.placerEl = el.querySelector(`.${ppfx}placeholder`)!;\n this.ghostEl = el.querySelector(`.${ppfx}ghost`)!;\n this.toolbarEl = el.querySelector(`.${ppfx}toolbar`)!;\n this.resizerEl = el.querySelector(`.${ppfx}resizer`)!;\n this.offsetEl = el.querySelector(`.${ppfx}offset-v`)!;\n this.fixedOffsetEl = el.querySelector(`.${ppfx}offset-fixed-v`)!;\n this.toolsGlobEl = el.querySelector(`.${ppfx}tools-gl`)!;\n this.spotsEl = el.querySelector('[data-spots]')!;\n this.cvStyle = el.querySelector('[data-canvas-style]')!;\n this.el.className = getUiClass(em, this.className);\n this.ready = true;\n this._renderFrames();\n\n return this;\n }\n}\n","/**\n * You can customize the initial state of the module from the editor initialization, by passing the following [Configuration Object](https://github.com/GrapesJS/grapesjs/blob/master/src/canvas/config/config.ts)\n * ```js\n * const editor = grapesjs.init({\n * canvas: {\n * // options\n * }\n * })\n * ```\n *\n * Once the editor is instantiated you can use its API and listen to its events. Before using these methods, you should get the module from the instance.\n *\n * ```js\n * // Listen to events\n * editor.on('canvas:drop', () => { ... });\n *\n * // Use the API\n * const canvas = editor.Canvas;\n * canvas.setCoords(...);\n * ```\n *\n * {REPLACE_EVENTS}\n *\n * [Component]: component.html\n * [Frame]: frame.html\n * [CanvasSpot]: canvas_spot.html\n *\n * @module Canvas\n */\n\nimport { isArray, isUndefined } from 'underscore';\nimport { Module } from '../abstract';\nimport { AddOptions, Coordinates } from '../common';\nimport Component from '../dom_components/model/Component';\nimport ComponentView from '../dom_components/view/ComponentView';\nimport EditorModel from '../editor/model/Editor';\nimport { getElement, getViewEl } from '../utils/mixins';\nimport defaults, { CanvasConfig } from './config/config';\nimport Canvas from './model/Canvas';\nimport CanvasSpot, { CanvasSpotBuiltInTypes, CanvasSpotProps } from './model/CanvasSpot';\nimport CanvasSpots from './model/CanvasSpots';\nimport Frame from './model/Frame';\nimport { CanvasEvents, ToWorldOption } from './types';\nimport CanvasView, { FitViewportOptions } from './view/CanvasView';\nimport FrameView from './view/FrameView';\n\nexport type CanvasEvent = `${CanvasEvents}`;\n\nexport default class CanvasModule extends Module {\n /**\n * Get configuration object\n * @name getConfig\n * @function\n * @return {Object}\n */\n\n /**\n * Used inside RTE\n * @private\n */\n getCanvasView(): CanvasView {\n return this.canvasView as any;\n }\n\n canvas: Canvas;\n model: Canvas;\n spots: CanvasSpots;\n events = CanvasEvents;\n framesById: Record = {};\n private canvasView?: CanvasView;\n\n /**\n * Initialize module. Automatically called with a new instance of the editor\n * @param {Object} config Configurations\n * @private\n */\n constructor(em: EditorModel) {\n super(em, 'Canvas', defaults);\n\n this.canvas = new Canvas(this);\n this.spots = new CanvasSpots(this);\n this.model = this.canvas;\n this.startAutoscroll = this.startAutoscroll.bind(this);\n this.stopAutoscroll = this.stopAutoscroll.bind(this);\n return this;\n }\n\n postLoad() {\n this.model.init();\n }\n\n getModel() {\n return this.canvas;\n }\n\n /**\n * Get the canvas element\n * @returns {HTMLElement}\n */\n getElement() {\n return this.getCanvasView().el;\n }\n\n getFrame(index?: number) {\n return this.getFrames()[index || 0];\n }\n\n /**\n * Get the main frame element of the canvas\n * @returns {HTMLIFrameElement}\n */\n getFrameEl() {\n const { frame } = this.canvasView || {};\n return frame?.el as HTMLIFrameElement;\n }\n\n getFramesEl() {\n return this.canvasView?.framesArea as HTMLElement;\n }\n\n /**\n * Get the main frame window instance\n * @returns {Window}\n */\n getWindow() {\n const { frame } = this.canvasView || {};\n return frame?.getWindow() as Window;\n }\n\n /**\n * Get the main frame document element\n * @returns {HTMLDocument}\n */\n getDocument() {\n const frame = this.getFrameEl();\n return frame?.contentDocument as Document;\n }\n\n /**\n * Get the main frame body element\n * @return {HTMLBodyElement}\n */\n getBody() {\n const doc = this.getDocument();\n return doc?.body as HTMLBodyElement;\n }\n\n _getLocalEl(globalEl: any, compView: ComponentView, method: keyof FrameView) {\n let result = globalEl;\n const frameView = compView?.frameView;\n result = frameView ? (frameView as any)[method]() : result;\n\n return result;\n }\n\n /**\n * Returns element containing all global canvas tools\n * @returns {HTMLElement}\n * @private\n */\n getGlobalToolsEl() {\n return this.canvasView?.toolsGlobEl;\n }\n\n /**\n * Returns element containing all canvas tools\n * @returns {HTMLElement}\n * @private\n */\n getToolsEl(compView?: any) {\n return this._getLocalEl(this.getCanvasView().toolsEl, compView, 'getToolsEl');\n }\n\n /**\n * Returns highlighter element\n * @returns {HTMLElement}\n * @private\n */\n getHighlighter(compView?: any) {\n return this._getLocalEl(this.getCanvasView().hlEl, compView, 'getHighlighter');\n }\n\n /**\n * Returns badge element\n * @returns {HTMLElement}\n * @private\n */\n getBadgeEl(compView: any) {\n return this._getLocalEl(this.getCanvasView().badgeEl, compView, 'getBadgeEl');\n }\n\n /**\n * Returns placer element\n * @returns {HTMLElement}\n * @private\n */\n getPlacerEl() {\n return this.getCanvasView().placerEl;\n }\n\n /**\n * Returns ghost element\n * @returns {HTMLElement}\n * @private\n */\n getGhostEl() {\n return this.getCanvasView().ghostEl;\n }\n\n /**\n * Returns toolbar element\n * @returns {HTMLElement}\n * @private\n */\n getToolbarEl() {\n return this.getCanvasView().toolbarEl;\n }\n\n /**\n * Returns resizer element\n * @returns {HTMLElement}\n * @private\n */\n getResizerEl() {\n return this.getCanvasView().resizerEl;\n }\n\n /**\n * Returns offset viewer element\n * @returns {HTMLElement}\n * @private\n */\n getOffsetViewerEl(compView: any) {\n return this._getLocalEl(this.getCanvasView().offsetEl, compView, 'getOffsetViewerEl');\n }\n\n /**\n * Returns fixed offset viewer element\n * @returns {HTMLElement}\n * @private\n */\n getFixedOffsetViewerEl() {\n return this.getCanvasView().fixedOffsetEl;\n }\n\n getSpotsEl() {\n return this.canvasView?.spotsEl;\n }\n\n render(): HTMLElement {\n this.canvasView?.remove();\n this.canvasView = new CanvasView(this.canvas);\n return this.canvasView.render().el;\n }\n\n /**\n * Get frame position\n * @returns {Object}\n * @private\n */\n getOffset() {\n var frameOff = this.offset(this.getFrameEl());\n var canvasOff = this.offset(this.getElement());\n return {\n top: frameOff.top - canvasOff.top,\n left: frameOff.left - canvasOff.left,\n };\n }\n\n /**\n * Get the offset of the passed component element\n * @param {HTMLElement} el\n * @returns {Object}\n * @private\n */\n offset(el: HTMLElement) {\n return this.getCanvasView().offset(el);\n }\n\n /**\n * Set custom badge naming strategy\n * @param {Function} f\n * @example\n * canvas.setCustomBadgeLabel(function(component){\n * return component.getName();\n * });\n */\n setCustomBadgeLabel(f: Function) {\n //@ts-ignore\n this.config.customBadgeLabel = f;\n }\n\n /**\n * Get element position relative to the canvas\n * @param {HTMLElement} el\n * @returns {Object}\n * @private\n */\n getElementPos(el: HTMLElement, opts?: any) {\n return this.getCanvasView().getElementPos(el, opts);\n }\n\n /**\n * Returns element's offsets like margins and paddings\n * @param {HTMLElement} el\n * @returns {Object}\n * @private\n */\n getElementOffsets(el: HTMLElement) {\n return this.getCanvasView().getElementOffsets(el);\n }\n\n /**\n * Get canvas rectangular data\n * @returns {Object}\n */\n getRect() {\n const { top = 0, left = 0 } = this.getCanvasView().getPosition() ?? {};\n return {\n ...this.getCanvasView().getCanvasOffset(),\n topScroll: top,\n leftScroll: left,\n };\n }\n\n /**\n * This method comes handy when you need to attach something like toolbars\n * to elements inside the canvas, dealing with all relative position,\n * offsets, etc. and returning as result the object with positions which are\n * viewable by the user (when the canvas is scrolled the top edge of the element\n * is not viewable by the user anymore so the new top edge is the one of the canvas)\n *\n * The target should be visible before being passed here as invisible elements\n * return empty string as width\n * @param {HTMLElement} target The target in this case could be the toolbar\n * @param {HTMLElement} element The element on which I'd attach the toolbar\n * @param {Object} options Custom options\n * @param {Boolean} options.toRight Set to true if you want the toolbar attached to the right\n * @return {Object}\n * @private\n */\n getTargetToElementDim(target: HTMLElement, element: HTMLElement, options: any = {}) {\n var opts = options || {};\n var canvasPos = this.getCanvasView().getPosition();\n if (!canvasPos) return;\n var pos = opts.elPos || this.getCanvasView().getElementPos(element);\n var toRight = options.toRight || 0;\n var targetHeight = opts.targetHeight || target.offsetHeight;\n var targetWidth = opts.targetWidth || target.offsetWidth;\n var eventToTrigger = opts.event || null;\n\n var elTop = pos.top - targetHeight;\n var elLeft = pos.left;\n elLeft += toRight ? pos.width : 0;\n elLeft = toRight ? elLeft - targetWidth : elLeft;\n\n var leftPos = elLeft < canvasPos.left ? canvasPos.left : elLeft;\n var topPos = elTop < canvasPos.top ? canvasPos.top : elTop;\n topPos = topPos > pos.top + pos.height ? pos.top + pos.height : topPos;\n\n var result = {\n top: topPos,\n left: leftPos,\n elementTop: pos.top,\n elementLeft: pos.left,\n elementWidth: pos.width,\n elementHeight: pos.height,\n targetWidth: target.offsetWidth,\n targetHeight: target.offsetHeight,\n canvasTop: canvasPos.top,\n canvasLeft: canvasPos.left,\n canvasWidth: canvasPos.width,\n canvasHeight: canvasPos.height,\n };\n\n // In this way I can catch data and also change the position strategy\n if (eventToTrigger && this.em) {\n this.em.trigger(eventToTrigger, result);\n }\n\n return result;\n }\n\n canvasRectOffset(el: HTMLElement, pos: { top: number; left: number }, opts: any = {}) {\n const getFrameElFromDoc = (doc: Document) => {\n const { defaultView } = doc;\n return defaultView?.frameElement as HTMLElement;\n };\n\n const rectOff = (el: HTMLElement, top = 1, pos: { top: number; left: number }) => {\n const zoom = this.em.getZoomDecimal();\n const side = top ? 'top' : 'left';\n const doc = el.ownerDocument;\n const { offsetTop = 0, offsetLeft = 0 } = opts.offset ? getFrameElFromDoc(doc) : {};\n const { scrollTop = 0, scrollLeft = 0 } = doc.body || {};\n const scroll = top ? scrollTop : scrollLeft;\n const offset = top ? offsetTop : offsetLeft;\n\n return pos[side] - (scroll - offset) * zoom;\n };\n\n return {\n top: rectOff(el, 1, pos),\n left: rectOff(el, 0, pos),\n };\n }\n\n /**\n *\n * @param {HTMLElement} el The component element in the canvas\n * @param {HTMLElement} targetEl The target element to position (eg. toolbar)\n * @param {Object} opts\n * @private\n */\n getTargetToElementFixed(el: HTMLElement, targetEl: HTMLElement, opts: any = {}) {\n const elRect = opts.pos || this.getElementPos(el, { noScroll: true });\n const canvasOffset = opts.canvasOff || this.canvasRectOffset(el, elRect);\n const targetHeight = targetEl.offsetHeight || 0;\n const targetWidth = targetEl.offsetWidth || 0;\n const elRight = elRect.left + elRect.width;\n const canvasView = this.getCanvasView();\n const canvasRect = canvasView.getPosition();\n const frameOffset = canvasView.getFrameOffset(el);\n const { event } = opts;\n\n let top = -targetHeight;\n let left = !isUndefined(opts.left) ? opts.left : elRect.width - targetWidth;\n left = elRect.left < -left ? -elRect.left : left;\n left = elRight > canvasRect.width ? left - (elRight - canvasRect.width) : left;\n\n // Check when the target top edge reaches the top of the viewable canvas\n if (canvasOffset.top < targetHeight) {\n const fullHeight = elRect.height + targetHeight;\n const elIsShort = fullHeight < frameOffset.height;\n\n // Scroll with the window if the top edge is reached and the\n // element is bigger than the canvas\n if (elIsShort) {\n top = top + fullHeight;\n } else {\n top = -canvasOffset.top < elRect.height ? -canvasOffset.top : elRect.height;\n }\n }\n\n const result = {\n top,\n left,\n canvasOffsetTop: canvasOffset.top,\n canvasOffsetLeft: canvasOffset.left,\n elRect,\n canvasOffset,\n canvasRect,\n targetWidth,\n targetHeight,\n };\n\n // In this way I can catch data and also change the position strategy\n event && this.em.trigger(event, result);\n\n return result;\n }\n\n /**\n * Instead of simply returning e.clientX and e.clientY this function\n * calculates also the offset based on the canvas. This is helpful when you\n * need to get X and Y position while moving between the editor area and\n * canvas area, which is in the iframe\n * @param {Event} e\n * @return {Object}\n * @private\n */\n getMouseRelativePos(e: any, opts: any = {}) {\n const subWinOffset = opts.subWinOffset;\n const doc = e.target.ownerDocument;\n const win = doc.defaultView || doc.parentWindow;\n const frame = win.frameElement;\n const yOffset = subWinOffset ? win.pageYOffset : 0;\n const xOffset = subWinOffset ? win.pageXOffset : 0;\n const zoomMlt = this.getZoomMultiplier();\n let addTop = 0;\n let addLeft = 0;\n\n if (frame) {\n var frameRect = frame.getBoundingClientRect();\n addTop = frameRect.top || 0;\n addLeft = frameRect.left || 0;\n }\n\n return {\n y: (e.clientY + addTop - yOffset) * zoomMlt,\n x: (e.clientX + addLeft - xOffset) * zoomMlt,\n };\n }\n\n /**\n * X and Y mouse position relative to the canvas\n * @param {Event} ev\n * @return {Object}\n * @private\n */\n getMouseRelativeCanvas(ev: MouseEvent, opts: any) {\n const zoom = this.getZoomDecimal();\n const { top = 0, left = 0 } = this.getCanvasView().getPosition(opts) ?? {};\n\n return {\n y: ev.clientY * zoom + top,\n x: ev.clientX * zoom + left,\n };\n }\n\n /**\n * Check if the canvas is focused\n * @returns {Boolean}\n */\n hasFocus() {\n return this.getDocument().hasFocus();\n }\n\n /**\n * Detects if some input is focused (input elements, text components, etc.)\n * @return {Boolean}\n * @private\n */\n isInputFocused() {\n const doc = this.getDocument();\n const frame = this.getFrameEl();\n const toIgnore = ['body', ...this.config.notTextable!];\n const docActive = frame && document.activeElement === frame;\n const focused = docActive ? doc && doc.activeElement : document.activeElement;\n\n return focused && !toIgnore.some(item => focused.matches(item));\n }\n\n /**\n * Scroll canvas to the element if it's not visible. The scrolling is\n * executed via `scrollIntoView` API and options of this method are\n * passed to it. For instance, you can scroll smoothly by using\n * `{ behavior: 'smooth' }`.\n * @param {HTMLElement|[Component]} el\n * @param {Object} [opts={}] Options, same as options for `scrollIntoView`\n * @param {Boolean} [opts.force=false] Force the scroll, even if the element is already visible\n * @example\n * const selected = editor.getSelected();\n * // Scroll smoothly (this behavior can be polyfilled)\n * canvas.scrollTo(selected, { behavior: 'smooth' });\n * // Force the scroll, even if the element is alredy visible\n * canvas.scrollTo(selected, { force: true });\n */\n scrollTo(el: any, opts = {}) {\n const elem = getElement(el);\n const view = elem && getViewEl(elem);\n view && view.scrollIntoView(opts);\n }\n\n /**\n * Start autoscroll\n * @private\n */\n startAutoscroll(frame?: Frame) {\n const fr = (frame && frame.view) || this.em.getCurrentFrame();\n fr && fr.startAutoscroll();\n }\n\n /**\n * Stop autoscroll\n * @private\n */\n stopAutoscroll(frame?: Frame) {\n const fr = (frame && frame.view) || this.em.getCurrentFrame();\n fr && fr.stopAutoscroll();\n }\n\n /**\n * Set canvas zoom value\n * @param {Number} value The zoom value, from 0 to 100\n * @returns {this}\n * @example\n * canvas.setZoom(50); // set zoom to 50%\n */\n setZoom(value: number | string) {\n this.canvas.set('zoom', typeof value === 'string' ? parseFloat(value) : value);\n return this;\n }\n\n /**\n * Get canvas zoom value\n * @returns {Number}\n * @example\n * canvas.setZoom(50); // set zoom to 50%\n * const zoom = canvas.getZoom(); // 50\n */\n getZoom() {\n return parseFloat(this.canvas.get('zoom'));\n }\n\n /**\n * Set canvas position coordinates\n * @param {Number} x Horizontal position\n * @param {Number} y Vertical position\n * @returns {this}\n * @example\n * canvas.setCoords(100, 100);\n */\n setCoords(x?: string | number, y?: string | number, opts: ToWorldOption = {}) {\n const hasX = x || x === 0;\n const hasY = y || y === 0;\n const coords = {\n x: this.canvas.get('x'),\n y: this.canvas.get('y'),\n };\n\n if (hasX) coords.x = parseFloat(`${x}`);\n if (hasY) coords.y = parseFloat(`${y}`);\n\n if (opts.toWorld) {\n const delta = this.canvasView?.getViewportDelta();\n if (delta) {\n if (hasX) coords.x = coords.x - delta.x;\n if (hasY) coords.y = coords.y - delta.y;\n }\n }\n\n this.canvas.set(coords);\n\n return this;\n }\n\n /**\n * Get canvas position coordinates\n * @returns {Object} Object containing coordinates\n * @example\n * canvas.setCoords(100, 100);\n * const coords = canvas.getCoords();\n * // { x: 100, y: 100 }\n */\n getCoords(): Coordinates {\n const { x, y } = this.canvas.attributes;\n return { x, y };\n }\n\n /**\n * Get canvas pointer position coordinates.\n * @returns {Object} Object containing pointer coordinates\n * @private\n * @example\n * const worldPointer = canvas.getPointer();\n * const screenPointer = canvas.getPointer(true);\n */\n getPointer(screen?: boolean): Coordinates {\n const { pointer, pointerScreen } = this.canvas.attributes;\n return screen ? pointerScreen : pointer;\n }\n\n getZoomDecimal() {\n return this.getZoom() / 100;\n }\n\n getZoomMultiplier() {\n const zoom = this.getZoomDecimal();\n return zoom ? 1 / zoom : 1;\n }\n\n fitViewport(opts?: FitViewportOptions) {\n this.canvasView?.fitViewport(opts);\n }\n\n toggleFramesEvents(on: boolean) {\n const { style } = this.getFramesEl();\n style.pointerEvents = on ? '' : 'none';\n }\n\n getFrames() {\n return this.canvas.frames.map(item => item);\n }\n\n /**\n * Add new frame to the canvas\n * @param {Object} props Frame properties\n * @returns {[Frame]}\n * @private\n * @example\n * canvas.addFrame({\n * name: 'Mobile home page',\n * x: 100, // Position in canvas\n * y: 100,\n * width: 500, // Frame dimensions\n * height: 600,\n * // device: 'DEVICE-ID',\n * components: [\n * '

Title frame

',\n * '

Paragraph frame

',\n * ],\n * styles: `\n * .testh { color: red; }\n * .testp { color: blue; }\n * `,\n * });\n */\n addFrame(props = {}, opts = {}) {\n return this.canvas.frames.add(new Frame(this, { ...props }), opts);\n }\n\n /**\n * Get the last created Component from a drag & drop to the canvas.\n * @returns {[Component]|undefined}\n */\n getLastDragResult(): Component | undefined {\n return this.em.get('dragResult');\n }\n\n /**\n * Add or update canvas spot.\n * @param {Object} props Canvas spot properties.\n * @param opts\n * @returns {[CanvasSpot]}\n * @example\n * // Add new canvas spot\n * const spot = canvas.addSpot({\n * type: 'select', // 'select' is one of the built-in spots\n * component: editor.getSelected(),\n * });\n *\n * // Add custom canvas spot\n * const spot = canvas.addSpot({\n * type: 'my-custom-spot',\n * component: editor.getSelected(),\n * });\n * // Update the same spot by reusing its ID\n * canvas.addSpot({\n * id: spot.id,\n * component: anotherComponent,\n * });\n */\n addSpot(props: Omit & { id?: string }, opts: AddOptions = {}) {\n const spotProps = props as T;\n const spots = this.getSpots(spotProps);\n\n if (spots.length) {\n const spot = spots[0];\n spot.set(spotProps);\n return spot;\n }\n\n const cmpView = spotProps.componentView || spotProps.component?.view;\n const spot = new CanvasSpot(this, {\n ...spotProps,\n id: spotProps.id || `cs_${spotProps.type}_${cmpView?.cid}`,\n type: spotProps.type || '',\n } as T);\n\n this.spots.add(spot, opts);\n\n return spot;\n }\n\n /**\n * Get canvas spots.\n * @param {Object} [spotProps] Canvas spot properties for filtering the result. With no properties, all available spots will be returned.\n * @returns {[CanvasSpot][]}\n * @example\n * canvas.addSpot({ type: 'select', component: cmp1 });\n * canvas.addSpot({ type: 'select', component: cmp2 });\n * canvas.addSpot({ type: 'target', component: cmp3 });\n *\n * // Get all spots\n * const allSpots = canvas.getSpots();\n * allSpots.length; // 3\n *\n * // Get all 'select' spots\n * const allSelectSpots = canvas.getSpots({ type: 'select' });\n * allSelectSpots.length; // 2\n */\n getSpots(spotProps: Partial = {}) {\n return this.spots.where(spotProps.id ? { id: spotProps.id } : spotProps) as CanvasSpot[];\n }\n\n /**\n * Remove canvas spots.\n * @param {Object|[CanvasSpot][]} [spotProps] Canvas spot properties for filtering spots to remove or an array of spots to remove. With no properties, all available spots will be removed.\n * @returns {[CanvasSpot][]}\n * @example\n * canvas.addSpot({ type: 'select', component: cmp1 });\n * canvas.addSpot({ type: 'select', component: cmp2 });\n * canvas.addSpot({ type: 'target', component: cmp3 });\n *\n * // Remove all 'select' spots\n * canvas.removeSpots({ type: 'select' });\n *\n * // Remove spots by an array of canvas spots\n * const filteredSpots = canvas.getSpots().filter(spot => myCustomCondition);\n * canvas.removeSpots(filteredSpots);\n *\n * // Remove all spots\n * canvas.removeSpots();\n */\n removeSpots(spotProps: Partial | CanvasSpot[] = {}) {\n const spots = isArray(spotProps) ? spotProps : this.getSpots(spotProps);\n const removed = this.spots.remove(spots);\n return removed as unknown as CanvasSpot[];\n }\n\n /**\n * Check if the built-in canvas spot has a declared custom rendering.\n * @param {String} type Built-in canvas spot type\n * @returns {Boolean}\n * @example\n * grapesjs.init({\n * // ...\n * canvas: {\n * // avoid rendering the built-in 'target' canvas spot\n * customSpots: { target: true }\n * }\n * });\n * // ...\n * canvas.hasCustomSpot('select'); // false\n * canvas.hasCustomSpot('target'); // true\n */\n hasCustomSpot(type?: CanvasSpotBuiltInTypes) {\n const { customSpots } = this.config;\n\n if (customSpots === true || (customSpots && type && customSpots[type])) {\n return true;\n }\n\n return false;\n }\n\n /**\n * Transform a box rect from the world coordinate system to the screen one.\n * @param {Object} boxRect\n * @returns {Object}\n */\n getWorldRectToScreen(boxRect: Parameters[0]) {\n return this.canvasView?.getRectToScreen(boxRect);\n }\n\n refreshSpots() {\n this.spots.refresh();\n }\n\n destroy() {\n this.canvas.stopListening();\n this.canvasView?.remove();\n //[this.canvas, this.canvasView].forEach(i => (i = {}));\n //@ts-ignore\n ['model', 'droppable'].forEach(i => (this[i] = {}));\n }\n}\n","import Component from '../model/Component';\n\nexport interface DomComponentsConfig {\n stylePrefix?: string;\n\n /**\n * Could be used for default components.\n */\n components?: Record[];\n\n /**\n * If the component is draggable you can drag the component itself (not only from the toolbar).\n * @default true\n */\n draggableComponents?: boolean;\n\n /**\n * Experimental: Disable text inner components.\n * With this option, you're able to decide which inner component inside text should be\n * disabled (eg. no select, no hover, no layer visibility) once edited.\n * @default false\n * @example\n * // disable all inner childs\n * disableTextInnerChilds: true,\n * // disable all except link components\n * disableTextInnerChilds: (child) => !child.is('link'),\n */\n disableTextInnerChilds?: boolean | ((cmp: Component) => boolean | void);\n\n /**\n * You can setup a custom component definition processor before adding it into the editor.\n * It might be useful to transform custom objects (es. some framework specific JSX) to GrapesJS component one.\n * This custom function will be executed on ANY new added component to the editor so make smart checks/conditions\n * to avoid doing useless executions\n * By default, GrapesJS supports already elements generated from React JSX preset\n * @example\n * processor: (obj) => {\n * if (obj.$$typeof) { // eg. this is a React Element\n * const gjsComponent = {\n * type: obj.type,\n * components: obj.props.children,\n * ...\n * };\n * ...\n * return gjsComponent;\n * }\n * }\n */\n processor?: (obj: any) => Record | undefined;\n\n /**\n * List of HTML void elements.\n * https://www.w3.org/TR/2011/WD-html-markup-20110113/syntax.html#void-elements\n */\n voidElements?: string[];\n\n /**\n * Experimental: Use the frame document for DOM element creation.\n * This option might be useful when elements require the local document context to\n * work properly (eg. Web Components).\n */\n useFrameDoc?: boolean;\n}\n\nexport default {\n stylePrefix: 'comp-',\n components: [],\n draggableComponents: true,\n disableTextInnerChilds: false,\n processor: undefined,\n useFrameDoc: false,\n voidElements: [\n 'area',\n 'base',\n 'br',\n 'col',\n 'embed',\n 'hr',\n 'img',\n 'input',\n 'keygen',\n 'link',\n 'menuitem',\n 'meta',\n 'param',\n 'source',\n 'track',\n 'wbr',\n ],\n} as DomComponentsConfig;\n","import { each } from 'underscore';\nimport { HTMLParserOptions } from '../config/config';\n\nconst htmlType = 'text/html';\nconst defaultType = htmlType; // 'application/xml';\n\nexport default (str: string, config: HTMLParserOptions = {}) => {\n const parser = new DOMParser();\n const mimeType = config.htmlType || defaultType;\n const toHTML = mimeType === htmlType;\n const strF = toHTML ? str : `
${str}
`;\n const doc = parser.parseFromString(strF, mimeType);\n let res: HTMLElement;\n\n if (toHTML) {\n // Replicate the old parser in order to avoid breaking changes\n const { head, body } = doc;\n // Move all scripts at the bottom of the page\n const scripts = head.querySelectorAll('script');\n each(scripts, node => body.appendChild(node));\n // Move inside body all head children\n const hEls: Element[] = [];\n each(head.children, n => hEls.push(n));\n each(hEls, (node, i) => body.insertBefore(node, body.children[i]));\n res = body;\n } else {\n res = doc.firstChild as HTMLElement;\n }\n\n return res;\n};\n\n/**\n * POC, custom html parser specs\n * Parse an HTML string to an array of nodes\n * example\n * parse(`
Hello
World example`)\n * // result\n * [\n * {\n * tagName: 'div',\n * attributes: { class: 'mycls', 'data-test': '' },\n * childNodes: ['Hello'],\n * },{\n * tagName: 'span',\n * childNodes: [\n * 'World ',\n * {\n * tagName: 'b',\n * childNodes: ['example'],\n * }\n * ],\n * }\n * ]\n *\n\nexport const parseNodes = nodes => {\n const result = [];\n\n for (let i = 0; i < nodes.length; i++) {\n result.push(parseNode(nodes[i]));\n }\n\n return result;\n};\n\nexport const parseAttributes = attrs => {\n const result = {};\n\n for (let j = 0; j < attrs.length; j++) {\n const attr = attrs[j];\n const nodeName = attr.nodeName;\n const nodeValue = attr.nodeValue;\n result[nodeName] = nodeValue;\n }\n\n return result;\n};\n\nexport const parseNode = el => {\n // Return the string of the textnode element\n if (el.nodeType === 3) {\n return el.nodeValue;\n }\n\n const tagName = node.tagName ? node.tagName.toLowerCase() : '';\n const attrs = el.attributes || [];\n const nodes = el.childNodes || [];\n\n return {\n ...(tagName && { tagName }),\n ...(attrs.length && {\n attributes: parseAttributes(attrs)\n }),\n ...(nodes.length && {\n childNodes: parseNodes(nodes)\n })\n };\n};\n\nexport default (str, config = {}) => {\n const result = [];\n const el = document.createElement('div');\n el.innerHTML = str;\n const nodes = el.childNodes;\n const len = nodes.length;\n\n for (let i = 0; i < len; i++) {\n result.push(parseNode(nodes[i]));\n }\n\n return result;\n};\n */\n","import { each, isArray, isFunction, isUndefined } from 'underscore';\nimport { ObjectAny } from '../../common';\nimport { CssRuleJSON } from '../../css_composer/model/CssRule';\nimport { ComponentDefinitionDefined } from '../../dom_components/model/types';\nimport EditorModel from '../../editor/model/Editor';\nimport { HTMLParserOptions, ParserConfig } from '../config/config';\nimport BrowserParserHtml from './BrowserParserHtml';\n\ntype StringObject = Record;\n\ntype HTMLParseResult = {\n html: ComponentDefinitionDefined | ComponentDefinitionDefined[]; // TODO replace with components\n css?: CssRuleJSON[];\n};\n\nconst modelAttrStart = 'data-gjs-';\nconst event = 'parse:html';\n\nconst ParserHtml = (em?: EditorModel, config: ParserConfig & { returnArray?: boolean } = {}) => {\n return {\n compTypes: '',\n\n modelAttrStart,\n\n getPropAttribute(attrName: string, attrValue?: string) {\n const name = attrName.replace(this.modelAttrStart, '');\n const valueLen = attrValue?.length || 0;\n const firstChar = attrValue?.substring(0, 1);\n const lastChar = attrValue?.substring(valueLen - 1);\n let value: any = attrValue === 'true' ? true : attrValue === 'false' ? false : attrValue;\n\n // Try to parse JSON where it's possible\n // I can get false positive here (eg. a selector '[data-attr]')\n // so put it under try/catch and let fail silently\n try {\n value =\n (firstChar == '{' && lastChar == '}') || (firstChar == '[' && lastChar == ']') ? JSON.parse(value) : value;\n } catch (e) {}\n\n return {\n name,\n value,\n };\n },\n\n /**\n * Extract component props from an attribute object\n * @param {Object} attr\n * @returns {Object} An object containing props and attributes without them\n */\n splitPropsFromAttr(attr: ObjectAny = {}) {\n const props: ObjectAny = {};\n const attrs: StringObject = {};\n\n each(attr, (value, key) => {\n if (key.indexOf(this.modelAttrStart) === 0) {\n const propsResult = this.getPropAttribute(key, value);\n props[propsResult.name] = propsResult.value;\n } else {\n attrs[key] = value;\n }\n });\n\n return {\n props,\n attrs,\n };\n },\n\n /**\n * Parse style string to object\n * @param {string} str\n * @return {Object}\n * @example\n * var stl = ParserHtml.parseStyle('color:black; width:100px; test:value;');\n * console.log(stl);\n * // {color: 'black', width: '100px', test: 'value'}\n */\n parseStyle(str: string) {\n const result: Record = {};\n\n while (str.indexOf('/*') >= 0) {\n const start = str.indexOf('/*');\n const end = str.indexOf('*/') + 2;\n str = str.replace(str.slice(start, end), '');\n }\n\n const decls = str.split(';');\n\n for (let i = 0, len = decls.length; i < len; i++) {\n const decl = decls[i].trim();\n if (!decl) continue;\n const prop = decl.split(':');\n const key = prop[0].trim();\n const value = prop.slice(1).join(':').trim();\n\n // Support multiple values for the same key\n if (result[key]) {\n if (!isArray(result[key])) {\n result[key] = [result[key] as string];\n }\n\n (result[key] as string[]).push(value);\n } else {\n result[key] = value;\n }\n }\n\n return result;\n },\n\n /**\n * Parse class string to array\n * @param {string} str\n * @return {Array}\n * @example\n * var res = ParserHtml.parseClass('test1 test2 test3');\n * console.log(res);\n * // ['test1', 'test2', 'test3']\n */\n parseClass(str: string) {\n const result = [];\n const cls = str.split(' ');\n\n for (let i = 0, len = cls.length; i < len; i++) {\n const cl = cls[i].trim();\n if (!cl) continue;\n result.push(cl);\n }\n\n return result;\n },\n\n /**\n * Get data from the node element\n * @param {HTMLElement} el DOM element to traverse\n * @return {Array}\n */\n parseNode(el: HTMLElement, opts: ObjectAny = {}) {\n const result: ComponentDefinitionDefined[] = [];\n const nodes = el.childNodes;\n\n for (var i = 0, len = nodes.length; i < len; i++) {\n const node = nodes[i] as HTMLElement;\n const attrs = node.attributes || [];\n const attrsLen = attrs.length;\n const nodePrev = result[result.length - 1];\n const nodeChild = node.childNodes.length;\n const ct = this.compTypes;\n let model: ComponentDefinitionDefined = {}; // TODO use component properties\n\n // Start with understanding what kind of component it is\n if (ct) {\n let obj: any = '';\n let type = node.getAttribute && node.getAttribute(`${this.modelAttrStart}type`);\n\n // If the type is already defined, use it\n if (type) {\n model = { type };\n } else {\n // Iterate over all available Component Types and\n // the first with a valid result will be that component\n for (let it = 0; it < ct.length; it++) {\n const compType = ct[it];\n // @ts-ignore\n obj = compType.model.isComponent(node, opts);\n\n if (obj) {\n if (typeof obj !== 'object') {\n // @ts-ignore\n obj = { type: compType.id };\n }\n break;\n }\n }\n\n model = obj;\n }\n }\n\n // Set tag name if not yet done\n if (!model.tagName) {\n const tag = node.tagName || '';\n const ns = node.namespaceURI || '';\n model.tagName = tag && ns === 'http://www.w3.org/1999/xhtml' ? tag.toLowerCase() : tag;\n }\n\n if (attrsLen) {\n model.attributes = {};\n }\n\n // Parse attributes\n for (let j = 0; j < attrsLen; j++) {\n const nodeName = attrs[j].nodeName;\n let nodeValue: string | boolean = attrs[j].nodeValue!;\n\n // Isolate attributes\n if (nodeName == 'style') {\n model.style = this.parseStyle(nodeValue);\n } else if (nodeName == 'class') {\n model.classes = this.parseClass(nodeValue);\n } else if (nodeName == 'contenteditable') {\n continue;\n } else if (nodeName.indexOf(this.modelAttrStart) === 0) {\n const propsResult = this.getPropAttribute(nodeName, nodeValue);\n model[propsResult.name] = propsResult.value;\n } else {\n // @ts-ignore Check for attributes from props (eg. required, disabled)\n if (nodeValue === '' && node[nodeName] === true) {\n nodeValue = true;\n }\n\n model.attributes[nodeName] = nodeValue;\n }\n }\n\n // Check for nested elements but avoid it if already provided\n if (nodeChild && !model.components) {\n // Avoid infinite nested text nodes\n const firstChild = node.childNodes[0];\n\n // If there is only one child and it's a TEXTNODE\n // just make it content of the current node\n if (nodeChild === 1 && firstChild.nodeType === 3) {\n !model.type && (model.type = 'text');\n model.components = {\n type: 'textnode',\n content: firstChild.nodeValue,\n };\n } else {\n model.components = this.parseNode(node, {\n ...opts,\n inSvg: opts.inSvg || model.type === 'svg',\n });\n }\n }\n\n // Check if it's a text node and if could be moved to the prevous model\n if (model.type == 'textnode') {\n if (nodePrev && nodePrev.type == 'textnode') {\n nodePrev.content += model.content;\n continue;\n }\n\n // Throw away empty nodes (keep spaces)\n if (!opts.keepEmptyTextNodes) {\n const content = node.nodeValue;\n if (content != ' ' && !content!.trim()) {\n continue;\n }\n }\n }\n\n // Check for custom void elements (valid in XML)\n if (!nodeChild && `${node.outerHTML}`.slice(-2) === '/>') {\n model.void = true;\n }\n\n // If all children are texts and there is some textnode the parent should\n // be text too otherwise I'm unable to edit texnodes\n const comps = model.components;\n if (!model.type && comps) {\n let allTxt = 1;\n let foundTextNode = 0;\n\n for (let ci = 0; ci < comps.length; ci++) {\n const comp = comps[ci];\n const cType = comp.type;\n\n if (['text', 'textnode'].indexOf(cType) < 0 && config.textTags!.indexOf(comp.tagName) < 0) {\n allTxt = 0;\n break;\n }\n\n if (cType == 'textnode') {\n foundTextNode = 1;\n }\n }\n\n if (allTxt && foundTextNode) {\n model.type = 'text';\n }\n }\n\n // If tagName is still empty and is not a textnode, do not push it\n if (!model.tagName && model.type != 'textnode') {\n continue;\n }\n\n result.push(model);\n }\n\n return result;\n },\n\n /**\n * Parse HTML string to a desired model object\n * @param {string} str HTML string\n * @param {ParserCss} parserCss In case there is style tags inside HTML\n * @return {Object}\n */\n parse(str: string, parserCss?: any, opts: HTMLParserOptions = {}) {\n const conf = em?.get('Config') || {};\n const res: HTMLParseResult = { html: [] };\n const cf: ObjectAny = { ...config, ...opts };\n const options = {\n ...config.optionsHtml,\n // @ts-ignore Support previous `configParser.htmlType` option\n htmlType: config.optionsHtml?.htmlType || config.htmlType,\n ...opts,\n };\n const el = isFunction(cf.parserHtml) ? cf.parserHtml(str, options) : BrowserParserHtml(str, options);\n const scripts = el.querySelectorAll('script');\n let i = scripts.length;\n\n // Support previous `configMain.allowScripts` option\n const allowScripts = !isUndefined(conf.allowScripts) ? conf.allowScripts : options.allowScripts;\n\n // Remove script tags\n if (!allowScripts) {\n while (i--) scripts[i].parentNode.removeChild(scripts[i]);\n }\n\n // Remove unsafe attributes\n if (!options.allowUnsafeAttr) {\n this.__clearUnsafeAttr(el);\n }\n\n // Detach style tags and parse them\n if (parserCss) {\n const styles = el.querySelectorAll('style');\n let j = styles.length;\n let styleStr = '';\n\n while (j--) {\n styleStr = styles[j].innerHTML + styleStr;\n styles[j].parentNode.removeChild(styles[j]);\n }\n\n if (styleStr) res.css = parserCss.parse(styleStr);\n }\n\n em && em.trigger(`${event}:root`, { input: str, root: el });\n const result = this.parseNode(el, cf);\n // I have to keep it otherwise it breaks the DomComponents.addComponent (returns always array)\n const resHtml = result.length === 1 && !cf.returnArray ? result[0] : result;\n res.html = resHtml;\n em && em.trigger(event, { input: str, output: res });\n\n return res;\n },\n\n __clearUnsafeAttr(node: HTMLElement) {\n const attrs = node.attributes || [];\n const nodes = node.childNodes || [];\n const toRemove: string[] = [];\n each(attrs, attr => {\n const name = attr.nodeName || '';\n name.indexOf('on') === 0 && toRemove.push(name);\n });\n toRemove.map(name => node.removeAttribute(name));\n each(nodes, node => this.__clearUnsafeAttr(node as HTMLElement));\n },\n };\n};\n\nexport default ParserHtml;\n","import { isArray, isString, keys } from 'underscore';\nimport { Model, ObjectAny, ObjectHash } from '../../common';\nimport ParserHtml from '../../parser/model/ParserHtml';\nimport Selectors from '../../selector_manager/model/Selectors';\nimport { shallowDiff } from '../../utils/mixins';\n\nexport type StyleProps = Record;\n\nexport type UpdateStyleOptions = ObjectAny & {\n partial?: boolean;\n addStyle?: StyleProps;\n};\n\nconst parserHtml = ParserHtml();\n\nexport const getLastStyleValue = (value: string | string[]) => {\n return isArray(value) ? value[value.length - 1] : value;\n};\n\nexport default class StyleableModel extends Model {\n /**\n * Forward style string to `parseStyle` to be parse to an object\n * @param {string} str\n * @returns\n */\n parseStyle(str: string) {\n return parserHtml.parseStyle(str);\n }\n\n /**\n * To trigger the style change event on models I have to\n * pass a new object instance\n * @param {Object} prop\n * @return {Object}\n */\n extendStyle(prop: ObjectAny): ObjectAny {\n return { ...this.getStyle(), ...prop };\n }\n\n /**\n * Get style object\n * @return {Object}\n */\n getStyle(prop?: string | ObjectAny): StyleProps {\n const style = this.get('style') || {};\n const result: ObjectAny = { ...style };\n return prop && isString(prop) ? result[prop] : result;\n }\n\n /**\n * Set new style object\n * @param {Object|string} prop\n * @param {Object} opts\n * @return {Object} Applied properties\n */\n setStyle(prop: string | ObjectAny = {}, opts: UpdateStyleOptions = {}) {\n if (isString(prop)) {\n prop = this.parseStyle(prop);\n }\n\n const propOrig = this.getStyle(opts);\n\n if (opts.partial || opts.avoidStore) {\n opts.avoidStore = true;\n prop.__p = true;\n } else {\n delete prop.__p;\n }\n\n const propNew = { ...prop };\n const newStyle = { ...propNew };\n // Remove empty style properties\n keys(newStyle).forEach(prop => {\n if (newStyle[prop] === '') {\n delete newStyle[prop];\n }\n });\n this.set('style', newStyle, opts as any);\n const diff = shallowDiff(propOrig, propNew);\n // Delete the property used for partial updates\n delete diff.__p;\n keys(diff).forEach(pr => {\n // @ts-ignore\n const { em } = this;\n if (opts.noEvent) return;\n this.trigger(`change:style:${pr}`);\n if (em) {\n em.trigger('styleable:change', this, pr, opts);\n em.trigger(`styleable:change:${pr}`, this, pr, opts);\n }\n });\n\n return propNew;\n }\n\n /**\n * Add style property\n * @param {Object|string} prop\n * @param {string} value\n * @example\n * this.addStyle({color: 'red'});\n * this.addStyle('color', 'blue');\n */\n addStyle(prop: string | ObjectAny, value: any = '', opts: UpdateStyleOptions = {}) {\n if (typeof prop == 'string') {\n prop = {\n [prop]: value,\n };\n } else {\n opts = value || {};\n }\n\n opts.addStyle = prop;\n prop = this.extendStyle(prop);\n this.setStyle(prop, opts);\n }\n\n /**\n * Remove style property\n * @param {string} prop\n */\n removeStyle(prop: string) {\n let style = this.getStyle();\n delete style[prop];\n this.setStyle(style);\n }\n\n /**\n * Returns string of style properties\n * @param {Object} [opts={}] Options\n * @return {String}\n */\n styleToString(opts: ObjectAny = {}) {\n const result: string[] = [];\n const style = this.getStyle(opts);\n const imp = opts.important;\n\n for (let prop in style) {\n const important = isArray(imp) ? imp.indexOf(prop) >= 0 : imp;\n const firstChars = prop.substring(0, 2);\n const isPrivate = firstChars === '__';\n\n if (isPrivate) continue;\n\n const value = style[prop];\n const values = isArray(value) ? (value as string[]) : [value];\n\n values.forEach((val: string) => {\n const value = `${val}${important ? ' !important' : ''}`;\n value && result.push(`${prop}:${value};`);\n });\n }\n\n return result.join('');\n }\n\n getSelectors() {\n return (this.get('selectors') || this.get('classes')) as Selectors;\n }\n\n getSelectorsString(opts?: ObjectAny) {\n // @ts-ignore\n return this.selectorsToString ? this.selectorsToString(opts) : this.getSelectors().getFullString();\n }\n\n // @ts-ignore\n // _validate(attr, opts) {\n // return true;\n // }\n}\n","import { isEmpty, isArray, isString, isFunction, each, includes, extend, flatten, keys } from 'underscore';\nimport Component from './Component';\nimport { AddOptions, Collection, ObjectAny } from '../../common';\nimport { DomComponentsConfig } from '../config/config';\nimport EditorModel from '../../editor/model/Editor';\nimport ComponentManager from '..';\nimport CssRule from '../../css_composer/model/CssRule';\nimport { ComponentAdd, ComponentProperties } from './types';\nimport ComponentText from './ComponentText';\n\nexport const getComponentIds = (cmp?: Component | Component[] | Components, res: string[] = []) => {\n if (!cmp) return [];\n const cmps = (isArray(cmp) || isFunction((cmp as Components).map) ? cmp : [cmp]) as Component[];\n cmps.map(cmp => {\n res.push(cmp.getId());\n getComponentIds(cmp.components().models, res);\n });\n return res;\n};\n\nconst getComponentsFromDefs = (\n items: ReturnType,\n all: ReturnType = {},\n opts: any = {}\n) => {\n opts.visitedCmps = opts.visitedCmps || {};\n const { visitedCmps } = opts;\n const itms = isArray(items) ? items : [items];\n\n return itms.map(item => {\n const { attributes = {}, components, tagName, style } = item;\n let { id, draggable, ...restAttr } = attributes;\n let result = item;\n\n if (id) {\n // Detect components with the same ID\n if (!visitedCmps[id]) {\n visitedCmps[id] = [];\n\n // Update the component if exists already\n if (all[id]) {\n result = all[id] as any;\n const cmp = result as unknown as Component;\n tagName && cmp.set({ tagName }, { ...opts, silent: true });\n keys(restAttr).length && cmp.addAttributes(restAttr, { ...opts });\n keys(style).length && cmp.addStyle(style, opts);\n }\n } else {\n // Found another component with the same ID, treat it as a new component\n visitedCmps[id].push(result);\n id = Component.getNewId(all);\n result.attributes.id = id;\n }\n }\n\n if (components) {\n const newComponents = getComponentsFromDefs(components, all);\n\n if (isFunction(result.components)) {\n const cmps = result.components();\n cmps.length > 0 && cmps.reset(newComponents, opts);\n } else {\n result.components = newComponents;\n }\n }\n\n return result;\n });\n};\n\nexport interface ComponentsOptions {\n em?: EditorModel;\n config?: DomComponentsConfig;\n domc?: ComponentManager;\n}\n\nexport default class Components extends Collection {\n opt!: ComponentsOptions;\n config?: DomComponentsConfig;\n em!: EditorModel;\n domc?: ComponentManager;\n parent?: Component;\n __firstAdd?: any;\n\n initialize(models: any, opt: ComponentsOptions = {}) {\n this.opt = opt;\n this.listenTo(this, 'add', this.onAdd);\n this.listenTo(this, 'remove', this.removeChildren);\n this.listenTo(this, 'reset', this.resetChildren);\n const { em, config } = opt;\n this.config = config;\n this.em = em!;\n this.domc = opt.domc || em?.Components;\n }\n\n resetChildren(models: Components, opts: { previousModels?: Component[]; keepIds?: string[] } = {}) {\n const coll = this;\n const prev = opts.previousModels || [];\n const toRemove = prev.filter(prev => !models.get(prev.cid));\n const newIds = getComponentIds(models);\n const idsToKeep = getComponentIds(prev).filter(pr => newIds.indexOf(pr) >= 0);\n opts.keepIds = (opts.keepIds || []).concat(idsToKeep);\n toRemove.forEach(md => this.removeChildren(md, coll, opts));\n models.each(model => this.onAdd(model));\n }\n\n resetFromString(input = '', opts: { visitedCmps?: Record; keepIds?: string[] } = {}) {\n opts.keepIds = getComponentIds(this);\n const { domc, em, parent } = this;\n const cssc = em?.Css;\n const allByID = domc?.allById() || {};\n const parsed = this.parseString(input, opts);\n const newCmps = getComponentsFromDefs(parsed, allByID, opts);\n const { visitedCmps = {} } = opts;\n\n // Clone styles for duplicated components\n Object.keys(visitedCmps).forEach(id => {\n const cmps = visitedCmps[id];\n if (cmps.length) {\n // Get all available rules of the component\n const rulesToClone = cssc?.getRules(`#${id}`) || [];\n\n if (rulesToClone.length) {\n cmps.forEach(cmp => {\n rulesToClone.forEach(rule => {\n const newRule = rule.clone();\n // @ts-ignore\n newRule.set('selectors', [`#${cmp.attributes.id}`]);\n cssc!.getAll().add(newRule);\n });\n });\n }\n }\n });\n\n this.reset(newCmps, opts as any);\n em?.trigger('component:content', parent, opts, input);\n (parent as ComponentText).__checkInnerChilds?.();\n }\n\n removeChildren(removed: Component, coll?: Components, opts: any = {}) {\n // Removing a parent component can cause this function\n // to be called with an already removed child element\n if (!removed) {\n return;\n }\n\n const { domc, em } = this;\n const isTemp = opts.temporary || opts.fromUndo;\n removed.prevColl = this; // This one is required for symbols\n\n if (!isTemp) {\n // Remove the component from the global list\n const id = removed.getId();\n const sels = em.Selectors.getAll();\n const rules = em.Css.getAll();\n const canRemoveStyle = (opts.keepIds || []).indexOf(id) < 0;\n const allByID = domc ? domc.allById() : {};\n delete allByID[id];\n\n // Remove all component related styles\n const rulesRemoved = (\n canRemoveStyle\n ? rules.remove(\n rules.filter(r => r.getSelectors().getFullString() === `#${id}`),\n opts\n )\n : []\n ) as CssRule[];\n\n // Clean selectors\n sels.remove(rulesRemoved.map(rule => rule.getSelectors().at(0)));\n\n if (!removed.opt.temporary) {\n em.Commands.run('core:component-style-clear', {\n target: removed,\n });\n removed.removed();\n removed.trigger('removed');\n em.trigger('component:remove', removed);\n }\n\n const inner = removed.components();\n inner.forEach(it => this.removeChildren(it, coll, opts));\n }\n\n // Remove stuff registered in DomComponents.handleChanges\n const inner = removed.components();\n em.stopListening(inner);\n em.stopListening(removed);\n em.stopListening(removed.get('classes'));\n removed.__postRemove();\n }\n\n /** @ts-ignore */\n model(attrs: Partial, options: any) {\n const { opt } = options.collection;\n const em = opt.em as EditorModel;\n let model;\n const df = em.Components.componentTypes;\n options.em = em;\n options.config = opt.config;\n options.componentTypes = df;\n options.domc = opt.domc;\n\n for (let it = 0; it < df.length; it++) {\n const dfId = df[it].id;\n if (dfId == attrs.type) {\n model = df[it].model;\n break;\n }\n }\n\n // If no model found, get the default one\n if (!model) {\n model = df[df.length - 1].model;\n em &&\n attrs.type &&\n em.logWarning(`Component type '${attrs.type}' not found`, {\n attrs,\n options,\n });\n }\n\n return new model(attrs, options) as Component;\n }\n\n parseString(value: string, opt: AddOptions & { temporary?: boolean; keepIds?: string[] } = {}) {\n const { em, domc } = this;\n const cssc = em.Css;\n const parsed = em.Parser.parseHtml(value);\n // We need this to avoid duplicate IDs\n Component.checkId(parsed.html!, parsed.css, domc!.componentsById, opt);\n\n if (parsed.css && cssc && !opt.temporary) {\n const { at, ...optsToPass } = opt;\n cssc.addCollection(parsed.css, {\n ...optsToPass,\n extend: 1,\n });\n }\n\n return parsed.html;\n }\n\n /** @ts-ignore */\n add(models: ComponentAdd, opt: AddOptions & { previousModels?: Component[]; keepIds?: string[] } = {}) {\n opt.keepIds = [...(opt.keepIds || []), ...getComponentIds(opt.previousModels)];\n\n if (isString(models)) {\n models = this.parseString(models, opt)!;\n } else if (isArray(models)) {\n models = [...models];\n models.forEach((item: string, index: number) => {\n if (isString(item)) {\n const nodes = this.parseString(item, opt);\n (models as any)[index] = isArray(nodes) && !nodes.length ? null : nodes;\n }\n });\n }\n\n const isMult = isArray(models);\n // @ts-ignore\n models = (isMult ? models : [models]).filter(Boolean).map((model: any) => this.processDef(model));\n // @ts-ignore\n models = isMult ? flatten(models as any, 1) : models[0];\n\n const result = Collection.prototype.add.apply(this, [models as any, opt]);\n this.__firstAdd = result;\n return result;\n }\n\n /**\n * Process component definition.\n */\n processDef(mdl: any) {\n // Avoid processing Models\n if (mdl.cid && mdl.ccid) return mdl;\n const { em, config = {} } = this;\n const { processor } = config;\n let model = mdl;\n\n if (processor) {\n model = { ...model }; // Avoid 'Cannot delete property ...'\n const modelPr = processor(model);\n if (modelPr) {\n each(model, (val, key) => delete model[key]);\n extend(model, modelPr);\n }\n }\n\n // React JSX preset\n if (model.$$typeof && typeof model.props == 'object') {\n model = { ...model };\n model.props = { ...model.props };\n const domc = em.Components;\n const parser = em.Parser;\n const { parserHtml } = parser;\n\n each(model, (value, key) => {\n if (!includes(['props', 'type'], key)) delete model[key];\n });\n const { props } = model;\n const comps = props.children;\n delete props.children;\n delete model.props;\n const res = parserHtml.splitPropsFromAttr(props);\n model.attributes = res.attrs;\n\n if (comps) {\n model.components = comps;\n }\n if (!model.type) {\n model.type = 'textnode';\n } else if (!domc.getType(model.type)) {\n model.tagName = model.type;\n delete model.type;\n }\n\n extend(model, res.props);\n }\n\n return model;\n }\n\n onAdd(model: Component, c?: any, opts: { temporary?: boolean } = {}) {\n const { domc, em } = this;\n const style = model.getStyle();\n const avoidInline = em && em.getConfig().avoidInlineStyle;\n domc && domc.Component.ensureInList(model);\n\n // @ts-ignore\n if (!isEmpty(style) && !avoidInline && em && em.get && em.getConfig().forceClass && !opts.temporary) {\n const name = model.cid;\n em.Css.setClassRule(name, style);\n model.setStyle({});\n model.addClass(name);\n }\n\n model.__postAdd({ recursive: true });\n // this.__onAddEnd();\n }\n\n // __onAddEnd = debounce(function () {\n // // TODO to check symbols on load, probably this might be removed as symbols\n // // are always recovered from the model\n // // const { domc } = this;\n // // const allComp = (domc && domc.allById()) || {};\n // // const firstAdd = this.__firstAdd;\n // // const toCheck = isArray(firstAdd) ? firstAdd : [firstAdd];\n // // const silent = { silent: true };\n // // const onAll = comps => {\n // // comps.forEach(comp => {\n // // const symbol = comp.get(keySymbols);\n // // const symbolOf = comp.get(keySymbol);\n // // if (symbol && isArray(symbol) && isString(symbol[0])) {\n // // comp.set(\n // // keySymbols,\n // // symbol.map(smb => allComp[smb]).filter(i => i),\n // // silent\n // // );\n // // }\n // // if (isString(symbolOf)) {\n // // comp.set(keySymbol, allComp[symbolOf], silent);\n // // }\n // // onAll(comp.components());\n // // });\n // // };\n // // onAll(toCheck);\n // });\n}\n","import { result, forEach, keys } from 'underscore';\nimport { Model } from '../../common';\nimport EditorModel from '../../editor/model/Editor';\n\nconst TYPE_CLASS = 1;\nconst TYPE_ID = 2;\n\nexport interface SelectorProps {\n name: string;\n label?: string;\n type?: number;\n active?: boolean;\n private?: boolean;\n protected?: boolean;\n}\n\n/**\n * @typedef Selector\n * @property {String} name Selector name, eg. `my-class`\n * @property {String} label Selector label, eg. `My Class`\n * @property {Number} [type=1] Type of the selector. 1 (class) | 2 (id)\n * @property {Boolean} [active=true] If not active, it's not selectable by the Style Manager.\n * @property {Boolean} [private=false] If true, it can't be seen by the Style Manager, but it will be rendered in the canvas and in export code.\n * @property {Boolean} [protected=false] If true, it can't be removed from the attached component.\n */\nexport default class Selector extends Model {\n defaults() {\n return {\n name: '',\n label: '',\n type: TYPE_CLASS,\n active: true,\n private: false,\n protected: false,\n _undo: true,\n };\n }\n\n // Type selectors: https://developer.mozilla.org/it/docs/Web/CSS/CSS_Selectors\n static readonly TYPE_CLASS = TYPE_CLASS;\n static readonly TYPE_ID = TYPE_ID;\n\n em: EditorModel;\n\n /**\n * @hideconstructor\n */\n constructor(props: any, opts: any = {}) {\n super(props, opts);\n const { config = {} } = opts;\n const name = this.get('name');\n const label = this.get('label');\n\n if (!name) {\n this.set('name', label);\n } else if (!label) {\n this.set('label', name);\n }\n\n const namePreEsc = this.get('name')!;\n const { escapeName } = config;\n const nameEsc = escapeName ? escapeName(namePreEsc) : Selector.escapeName(namePreEsc);\n this.set('name', nameEsc);\n this.em = opts.em;\n }\n\n isId() {\n return this.get('type') === TYPE_ID;\n }\n\n isClass() {\n return this.get('type') === TYPE_CLASS;\n }\n\n getFullName(opts: any = {}) {\n const { escape } = opts;\n const name = this.get('name');\n let pfx = '';\n\n switch (this.get('type')) {\n case TYPE_CLASS:\n pfx = '.';\n break;\n case TYPE_ID:\n pfx = '#';\n break;\n }\n\n return pfx + (escape ? escape(name) : name);\n }\n\n /**\n * Get selector as a string.\n * @returns {String}\n * @example\n * // Given such selector: { name: 'my-selector', type: 2 }\n * console.log(selector.toString());\n * // -> `#my-selector`\n */\n toString() {\n return this.getFullName();\n }\n\n /**\n * Get selector name.\n * @returns {String}\n * @example\n * // Given such selector: { name: 'my-selector', label: 'My selector' }\n * console.log(selector.getName());\n * // -> `my-selector`\n */\n getName() {\n return this.get('name') || '';\n }\n\n /**\n * Get selector label.\n * @returns {String}\n * @example\n * // Given such selector: { name: 'my-selector', label: 'My selector' }\n * console.log(selector.getLabel());\n * // -> `My selector`\n */\n getLabel() {\n return this.get('label') || '';\n }\n\n /**\n * Update selector label.\n * @param {String} label New label\n * @example\n * // Given such selector: { name: 'my-selector', label: 'My selector' }\n * selector.setLabel('New Label')\n * console.log(selector.getLabel());\n * // -> `New Label`\n */\n setLabel(label: string) {\n return this.set('label', label);\n }\n\n /**\n * Get selector active state.\n * @returns {Boolean}\n */\n getActive() {\n return !!this.get('active');\n }\n\n /**\n * Update selector active state.\n * @param {Boolean} value New active state\n */\n setActive(value: boolean) {\n return this.set('active', value);\n }\n\n toJSON(opts = {}) {\n const { em } = this;\n let obj = Model.prototype.toJSON.call(this, [opts]);\n const defaults = result(this, 'defaults');\n\n if (em && em.getConfig().avoidDefaults) {\n forEach(defaults, (value, key) => {\n if (obj[key] === value) {\n delete obj[key];\n }\n });\n\n if (obj.label === obj.name) {\n delete obj.label;\n }\n\n const objLen = keys(obj).length;\n\n if (objLen === 1 && obj.name) {\n obj = obj.name;\n }\n\n if (objLen === 2 && obj.name && obj.type) {\n obj = this.getFullName();\n }\n }\n\n return obj;\n }\n\n /**\n * Escape string\n * @param {string} name\n * @return {string}\n * @private\n */\n static escapeName(name: string) {\n return `${name}`.trim().replace(/([^a-z0-9\\w-\\\\:@\\\\/]+)/gi, '-');\n }\n}\n\nSelector.prototype.idAttribute = 'name';\n","import { filter } from 'underscore';\nimport { Collection } from '../../common';\nimport Selector from './Selector';\n\nconst combine = (tail: string[], curr: string): string[] => {\n return tail.reduce(\n (acc, item, n) => {\n return acc.concat(combine(tail.slice(n + 1), `${curr}${item}`));\n },\n [curr]\n );\n};\n\nexport interface FullNameOptions {\n combination?: boolean;\n array?: boolean;\n}\n\nexport default class Selectors extends Collection {\n modelId(attr: any) {\n return `${attr.name}_${attr.type || Selector.TYPE_CLASS}`;\n }\n\n getStyleable() {\n return filter(this.models, item => item.getActive() && !item.get('private'));\n }\n\n getValid({ noDisabled }: any = {}) {\n return filter(this.models, item => !item.get('private')).filter(item => (noDisabled ? item.get('active') : 1));\n }\n\n getFullString(collection?: Selector[] | null, opts: { sort?: boolean } = {}) {\n const result: string[] = [];\n const coll = collection || this;\n coll.forEach(selector => result.push(selector.getFullName(opts)));\n opts.sort && result.sort();\n return result.join('').trim();\n }\n\n getFullName(opts: T = {} as T) {\n const { combination, array } = opts;\n let result: string[] = [];\n const sels = this.map(s => s.getFullName(opts)).sort();\n\n if (combination) {\n sels.forEach((sel, n) => {\n result = result.concat(combine(sels.slice(n + 1), sel));\n });\n } else {\n result = sels;\n }\n\n return (array ? result : combination ? result.join(',') : result.join('')) as T['array'] extends true\n ? string[]\n : string;\n }\n}\n\nSelectors.prototype.model = Selector;\n","import { Model, $ } from '../..';\nimport EditorModel from '../../../editor/model/Editor';\nimport InputFactory from '..';\nimport TraitTextView from './TraitTextView';\nimport TraitList from '../model/TraitList';\nimport TraitView, { TraitViewOpts } from './TraitView';\nimport TraitGroup from '../model/TraitGroup';\nimport TraitGroupItem from '../model/TraitGroupItem';\nimport { isUndefined } from 'underscore';\n\nexport interface TraitListViewOpts extends TraitViewOpts<'list'> {\n traits: any[] | any;\n}\n\nexport default class TraitListView extends TraitView> {\n protected type = 'list';\n templates: any[];\n private toolbarEl?: HTMLDivElement;\n private itemsEl?: JQuery[];\n private selectedEl?: JQuery;\n\n events() {\n return {\n 'click [addButton]': this.addItem,\n 'click [removeButton]': this.removeItem,\n 'click [data-item-title]': this.select,\n };\n }\n\n private select(e?: any) {\n const { model, ppfx, selectedEl } = this;\n // model.setOpen(!model.get('open'));\n this.itemsEl?.forEach(el => {\n el.find('.data-item').get(0)!.style.display = 'none';\n });\n if (!isUndefined(e)) {\n var selected = $(e.target).closest(`.${ppfx}title`).find('.data-item');\n this.selectedEl = selected;\n selected.get(0)!.style.display = '';\n } else if (!isUndefined(selectedEl)) {\n selectedEl.get(0)!.style.display = '';\n }\n // $el[isOpen ? 'addClass' : 'removeClass'](`${pfx}open`);\n // this.getPropertiesEl().style.display = isOpen ? '' : 'none';\n }\n\n constructor(em: EditorModel, opts: TraitListViewOpts) {\n super(em, { ...opts });\n this.templates = opts.traits;\n }\n\n onUpdateEvent(value: any[]): void {\n console.log('Render');\n this.render();\n }\n\n private addItem(e: any) {\n e.preventDefault();\n this.target.add();\n }\n\n private removeItem(e: any) {\n e.preventDefault();\n\n this.target.remove(this.selectedEl?.attr('item-id') as any);\n }\n\n renderToolbar() {\n if (!this.toolbarEl) {\n let el = document.createElement('div');\n el.append(document.createElement('button'));\n let tmpl = `
\n \n \n
`;\n this.toolbarEl = $(tmpl).get(0);\n }\n return this.toolbarEl!;\n }\n\n renderItem(trait: TraitGroup | TraitGroupItem) {\n const { em, ppfx, label } = this;\n const icons = em?.getConfig().icons;\n const iconCaret = icons?.caret || '';\n const view = InputFactory.buildView(trait, em, { ...trait.opts, noLabel: true }).render();\n var itemEl = document.createElement('div');\n itemEl.setAttribute('data-item-title', '');\n itemEl.className = `${ppfx}title`;\n itemEl.innerHTML = `\n
${iconCaret}
\n \n `;\n //
${label}
\n console.log(itemEl);\n var itemDataEl = document.createElement('div');\n itemDataEl.className = 'data-item';\n itemDataEl.setAttribute('item-id', trait.name);\n itemDataEl.append(view.el);\n console.log(itemEl);\n return $(itemEl).append(itemDataEl);\n }\n\n renderItems() {\n this.itemsEl = this.target.traits.map(trait => this.renderItem(trait));\n }\n\n render() {\n const { $el, pfx, ppfx, name, type, className } = this;\n console.log('render');\n const hasLabel = this.hasLabel();\n const cls = `${pfx}trait`;\n var frag = document.createDocumentFragment();\n this.$el.empty();\n this.renderItems();\n this.itemsEl?.forEach(el => frag.appendChild(el.get(0)!));\n let itemsEl = document.createElement('div');\n itemsEl.className = `${ppfx}field-${type}-items`;\n itemsEl.append(frag);\n // el.className += model.isFull() ? ` ${className}--full` : '';\n let tmpl = `
\n ${hasLabel ? `
` : ''}\n
\n\n
\n
`;\n this.$el.append(tmpl);\n this.$el.find('[data-input]').append(this.renderToolbar()).append(itemsEl);\n // ${this.renderToolbar()}\n // ${itemsEl}\n // console.log(frag);\n console.log('render');\n this.select();\n\n this.setElement(this.el);\n return this;\n }\n}\n","import InputFactory from '..';\nimport EditorModel from '../../../editor/model/Editor';\nimport Trait from '../model/Trait';\nimport TraitView, { TraitViewOpts } from './TraitView';\n\nexport interface TraitsViewOpts extends TraitViewOpts<'object'> {\n traits: Trait[];\n}\n\nexport default class TraitsView extends TraitView {\n type = 'list';\n traits: Trait[];\n constructor(em: EditorModel, opts: TraitsViewOpts) {\n super(em, { ...opts });\n console.log(opts);\n this.traits = opts.traits ?? [];\n }\n\n onUpdateEvent(value: any): void {\n this.render();\n }\n\n render() {\n var frag = document.createDocumentFragment();\n this.$el.empty();\n\n if (this.traits.length) {\n this.traits.forEach(tr => {\n console.log('Building view');\n console.log(tr.opts);\n const view = InputFactory.buildView(tr, this.em, tr.opts);\n const rendered = view.render().el;\n frag.appendChild(rendered);\n });\n }\n\n this.$el.append(frag);\n this.setElement(this.el);\n return this;\n }\n}\n","/**\nThe data structure for documents. @nonabstract\n*/\nclass Text {\n /**\n Get the line description around the given position.\n */\n lineAt(pos) {\n if (pos < 0 || pos > this.length)\n throw new RangeError(`Invalid position ${pos} in document of length ${this.length}`);\n return this.lineInner(pos, false, 1, 0);\n }\n /**\n Get the description for the given (1-based) line number.\n */\n line(n) {\n if (n < 1 || n > this.lines)\n throw new RangeError(`Invalid line number ${n} in ${this.lines}-line document`);\n return this.lineInner(n, true, 1, 0);\n }\n /**\n Replace a range of the text with the given content.\n */\n replace(from, to, text) {\n [from, to] = clip(this, from, to);\n let parts = [];\n this.decompose(0, from, parts, 2 /* Open.To */);\n if (text.length)\n text.decompose(0, text.length, parts, 1 /* Open.From */ | 2 /* Open.To */);\n this.decompose(to, this.length, parts, 1 /* Open.From */);\n return TextNode.from(parts, this.length - (to - from) + text.length);\n }\n /**\n Append another document to this one.\n */\n append(other) {\n return this.replace(this.length, this.length, other);\n }\n /**\n Retrieve the text between the given points.\n */\n slice(from, to = this.length) {\n [from, to] = clip(this, from, to);\n let parts = [];\n this.decompose(from, to, parts, 0);\n return TextNode.from(parts, to - from);\n }\n /**\n Test whether this text is equal to another instance.\n */\n eq(other) {\n if (other == this)\n return true;\n if (other.length != this.length || other.lines != this.lines)\n return false;\n let start = this.scanIdentical(other, 1), end = this.length - this.scanIdentical(other, -1);\n let a = new RawTextCursor(this), b = new RawTextCursor(other);\n for (let skip = start, pos = start;;) {\n a.next(skip);\n b.next(skip);\n skip = 0;\n if (a.lineBreak != b.lineBreak || a.done != b.done || a.value != b.value)\n return false;\n pos += a.value.length;\n if (a.done || pos >= end)\n return true;\n }\n }\n /**\n Iterate over the text. When `dir` is `-1`, iteration happens\n from end to start. This will return lines and the breaks between\n them as separate strings.\n */\n iter(dir = 1) { return new RawTextCursor(this, dir); }\n /**\n Iterate over a range of the text. When `from` > `to`, the\n iterator will run in reverse.\n */\n iterRange(from, to = this.length) { return new PartialTextCursor(this, from, to); }\n /**\n Return a cursor that iterates over the given range of lines,\n _without_ returning the line breaks between, and yielding empty\n strings for empty lines.\n \n When `from` and `to` are given, they should be 1-based line numbers.\n */\n iterLines(from, to) {\n let inner;\n if (from == null) {\n inner = this.iter();\n }\n else {\n if (to == null)\n to = this.lines + 1;\n let start = this.line(from).from;\n inner = this.iterRange(start, Math.max(start, to == this.lines + 1 ? this.length : to <= 1 ? 0 : this.line(to - 1).to));\n }\n return new LineCursor(inner);\n }\n /**\n Return the document as a string, using newline characters to\n separate lines.\n */\n toString() { return this.sliceString(0); }\n /**\n Convert the document to an array of lines (which can be\n deserialized again via [`Text.of`](https://codemirror.net/6/docs/ref/#state.Text^of)).\n */\n toJSON() {\n let lines = [];\n this.flatten(lines);\n return lines;\n }\n /**\n @internal\n */\n constructor() { }\n /**\n Create a `Text` instance for the given array of lines.\n */\n static of(text) {\n if (text.length == 0)\n throw new RangeError(\"A document must have at least one line\");\n if (text.length == 1 && !text[0])\n return Text.empty;\n return text.length <= 32 /* Tree.Branch */ ? new TextLeaf(text) : TextNode.from(TextLeaf.split(text, []));\n }\n}\n// Leaves store an array of line strings. There are always line breaks\n// between these strings. Leaves are limited in size and have to be\n// contained in TextNode instances for bigger documents.\nclass TextLeaf extends Text {\n constructor(text, length = textLength(text)) {\n super();\n this.text = text;\n this.length = length;\n }\n get lines() { return this.text.length; }\n get children() { return null; }\n lineInner(target, isLine, line, offset) {\n for (let i = 0;; i++) {\n let string = this.text[i], end = offset + string.length;\n if ((isLine ? line : end) >= target)\n return new Line(offset, end, line, string);\n offset = end + 1;\n line++;\n }\n }\n decompose(from, to, target, open) {\n let text = from <= 0 && to >= this.length ? this\n : new TextLeaf(sliceText(this.text, from, to), Math.min(to, this.length) - Math.max(0, from));\n if (open & 1 /* Open.From */) {\n let prev = target.pop();\n let joined = appendText(text.text, prev.text.slice(), 0, text.length);\n if (joined.length <= 32 /* Tree.Branch */) {\n target.push(new TextLeaf(joined, prev.length + text.length));\n }\n else {\n let mid = joined.length >> 1;\n target.push(new TextLeaf(joined.slice(0, mid)), new TextLeaf(joined.slice(mid)));\n }\n }\n else {\n target.push(text);\n }\n }\n replace(from, to, text) {\n if (!(text instanceof TextLeaf))\n return super.replace(from, to, text);\n [from, to] = clip(this, from, to);\n let lines = appendText(this.text, appendText(text.text, sliceText(this.text, 0, from)), to);\n let newLen = this.length + text.length - (to - from);\n if (lines.length <= 32 /* Tree.Branch */)\n return new TextLeaf(lines, newLen);\n return TextNode.from(TextLeaf.split(lines, []), newLen);\n }\n sliceString(from, to = this.length, lineSep = \"\\n\") {\n [from, to] = clip(this, from, to);\n let result = \"\";\n for (let pos = 0, i = 0; pos <= to && i < this.text.length; i++) {\n let line = this.text[i], end = pos + line.length;\n if (pos > from && i)\n result += lineSep;\n if (from < end && to > pos)\n result += line.slice(Math.max(0, from - pos), to - pos);\n pos = end + 1;\n }\n return result;\n }\n flatten(target) {\n for (let line of this.text)\n target.push(line);\n }\n scanIdentical() { return 0; }\n static split(text, target) {\n let part = [], len = -1;\n for (let line of text) {\n part.push(line);\n len += line.length + 1;\n if (part.length == 32 /* Tree.Branch */) {\n target.push(new TextLeaf(part, len));\n part = [];\n len = -1;\n }\n }\n if (len > -1)\n target.push(new TextLeaf(part, len));\n return target;\n }\n}\n// Nodes provide the tree structure of the `Text` type. They store a\n// number of other nodes or leaves, taking care to balance themselves\n// on changes. There are implied line breaks _between_ the children of\n// a node (but not before the first or after the last child).\nclass TextNode extends Text {\n constructor(children, length) {\n super();\n this.children = children;\n this.length = length;\n this.lines = 0;\n for (let child of children)\n this.lines += child.lines;\n }\n lineInner(target, isLine, line, offset) {\n for (let i = 0;; i++) {\n let child = this.children[i], end = offset + child.length, endLine = line + child.lines - 1;\n if ((isLine ? endLine : end) >= target)\n return child.lineInner(target, isLine, line, offset);\n offset = end + 1;\n line = endLine + 1;\n }\n }\n decompose(from, to, target, open) {\n for (let i = 0, pos = 0; pos <= to && i < this.children.length; i++) {\n let child = this.children[i], end = pos + child.length;\n if (from <= end && to >= pos) {\n let childOpen = open & ((pos <= from ? 1 /* Open.From */ : 0) | (end >= to ? 2 /* Open.To */ : 0));\n if (pos >= from && end <= to && !childOpen)\n target.push(child);\n else\n child.decompose(from - pos, to - pos, target, childOpen);\n }\n pos = end + 1;\n }\n }\n replace(from, to, text) {\n [from, to] = clip(this, from, to);\n if (text.lines < this.lines)\n for (let i = 0, pos = 0; i < this.children.length; i++) {\n let child = this.children[i], end = pos + child.length;\n // Fast path: if the change only affects one child and the\n // child's size remains in the acceptable range, only update\n // that child\n if (from >= pos && to <= end) {\n let updated = child.replace(from - pos, to - pos, text);\n let totalLines = this.lines - child.lines + updated.lines;\n if (updated.lines < (totalLines >> (5 /* Tree.BranchShift */ - 1)) &&\n updated.lines > (totalLines >> (5 /* Tree.BranchShift */ + 1))) {\n let copy = this.children.slice();\n copy[i] = updated;\n return new TextNode(copy, this.length - (to - from) + text.length);\n }\n return super.replace(pos, end, updated);\n }\n pos = end + 1;\n }\n return super.replace(from, to, text);\n }\n sliceString(from, to = this.length, lineSep = \"\\n\") {\n [from, to] = clip(this, from, to);\n let result = \"\";\n for (let i = 0, pos = 0; i < this.children.length && pos <= to; i++) {\n let child = this.children[i], end = pos + child.length;\n if (pos > from && i)\n result += lineSep;\n if (from < end && to > pos)\n result += child.sliceString(from - pos, to - pos, lineSep);\n pos = end + 1;\n }\n return result;\n }\n flatten(target) {\n for (let child of this.children)\n child.flatten(target);\n }\n scanIdentical(other, dir) {\n if (!(other instanceof TextNode))\n return 0;\n let length = 0;\n let [iA, iB, eA, eB] = dir > 0 ? [0, 0, this.children.length, other.children.length]\n : [this.children.length - 1, other.children.length - 1, -1, -1];\n for (;; iA += dir, iB += dir) {\n if (iA == eA || iB == eB)\n return length;\n let chA = this.children[iA], chB = other.children[iB];\n if (chA != chB)\n return length + chA.scanIdentical(chB, dir);\n length += chA.length + 1;\n }\n }\n static from(children, length = children.reduce((l, ch) => l + ch.length + 1, -1)) {\n let lines = 0;\n for (let ch of children)\n lines += ch.lines;\n if (lines < 32 /* Tree.Branch */) {\n let flat = [];\n for (let ch of children)\n ch.flatten(flat);\n return new TextLeaf(flat, length);\n }\n let chunk = Math.max(32 /* Tree.Branch */, lines >> 5 /* Tree.BranchShift */), maxChunk = chunk << 1, minChunk = chunk >> 1;\n let chunked = [], currentLines = 0, currentLen = -1, currentChunk = [];\n function add(child) {\n let last;\n if (child.lines > maxChunk && child instanceof TextNode) {\n for (let node of child.children)\n add(node);\n }\n else if (child.lines > minChunk && (currentLines > minChunk || !currentLines)) {\n flush();\n chunked.push(child);\n }\n else if (child instanceof TextLeaf && currentLines &&\n (last = currentChunk[currentChunk.length - 1]) instanceof TextLeaf &&\n child.lines + last.lines <= 32 /* Tree.Branch */) {\n currentLines += child.lines;\n currentLen += child.length + 1;\n currentChunk[currentChunk.length - 1] = new TextLeaf(last.text.concat(child.text), last.length + 1 + child.length);\n }\n else {\n if (currentLines + child.lines > chunk)\n flush();\n currentLines += child.lines;\n currentLen += child.length + 1;\n currentChunk.push(child);\n }\n }\n function flush() {\n if (currentLines == 0)\n return;\n chunked.push(currentChunk.length == 1 ? currentChunk[0] : TextNode.from(currentChunk, currentLen));\n currentLen = -1;\n currentLines = currentChunk.length = 0;\n }\n for (let child of children)\n add(child);\n flush();\n return chunked.length == 1 ? chunked[0] : new TextNode(chunked, length);\n }\n}\nText.empty = /*@__PURE__*/new TextLeaf([\"\"], 0);\nfunction textLength(text) {\n let length = -1;\n for (let line of text)\n length += line.length + 1;\n return length;\n}\nfunction appendText(text, target, from = 0, to = 1e9) {\n for (let pos = 0, i = 0, first = true; i < text.length && pos <= to; i++) {\n let line = text[i], end = pos + line.length;\n if (end >= from) {\n if (end > to)\n line = line.slice(0, to - pos);\n if (pos < from)\n line = line.slice(from - pos);\n if (first) {\n target[target.length - 1] += line;\n first = false;\n }\n else\n target.push(line);\n }\n pos = end + 1;\n }\n return target;\n}\nfunction sliceText(text, from, to) {\n return appendText(text, [\"\"], from, to);\n}\nclass RawTextCursor {\n constructor(text, dir = 1) {\n this.dir = dir;\n this.done = false;\n this.lineBreak = false;\n this.value = \"\";\n this.nodes = [text];\n this.offsets = [dir > 0 ? 1 : (text instanceof TextLeaf ? text.text.length : text.children.length) << 1];\n }\n nextInner(skip, dir) {\n this.done = this.lineBreak = false;\n for (;;) {\n let last = this.nodes.length - 1;\n let top = this.nodes[last], offsetValue = this.offsets[last], offset = offsetValue >> 1;\n let size = top instanceof TextLeaf ? top.text.length : top.children.length;\n if (offset == (dir > 0 ? size : 0)) {\n if (last == 0) {\n this.done = true;\n this.value = \"\";\n return this;\n }\n if (dir > 0)\n this.offsets[last - 1]++;\n this.nodes.pop();\n this.offsets.pop();\n }\n else if ((offsetValue & 1) == (dir > 0 ? 0 : 1)) {\n this.offsets[last] += dir;\n if (skip == 0) {\n this.lineBreak = true;\n this.value = \"\\n\";\n return this;\n }\n skip--;\n }\n else if (top instanceof TextLeaf) {\n // Move to the next string\n let next = top.text[offset + (dir < 0 ? -1 : 0)];\n this.offsets[last] += dir;\n if (next.length > Math.max(0, skip)) {\n this.value = skip == 0 ? next : dir > 0 ? next.slice(skip) : next.slice(0, next.length - skip);\n return this;\n }\n skip -= next.length;\n }\n else {\n let next = top.children[offset + (dir < 0 ? -1 : 0)];\n if (skip > next.length) {\n skip -= next.length;\n this.offsets[last] += dir;\n }\n else {\n if (dir < 0)\n this.offsets[last]--;\n this.nodes.push(next);\n this.offsets.push(dir > 0 ? 1 : (next instanceof TextLeaf ? next.text.length : next.children.length) << 1);\n }\n }\n }\n }\n next(skip = 0) {\n if (skip < 0) {\n this.nextInner(-skip, (-this.dir));\n skip = this.value.length;\n }\n return this.nextInner(skip, this.dir);\n }\n}\nclass PartialTextCursor {\n constructor(text, start, end) {\n this.value = \"\";\n this.done = false;\n this.cursor = new RawTextCursor(text, start > end ? -1 : 1);\n this.pos = start > end ? text.length : 0;\n this.from = Math.min(start, end);\n this.to = Math.max(start, end);\n }\n nextInner(skip, dir) {\n if (dir < 0 ? this.pos <= this.from : this.pos >= this.to) {\n this.value = \"\";\n this.done = true;\n return this;\n }\n skip += Math.max(0, dir < 0 ? this.pos - this.to : this.from - this.pos);\n let limit = dir < 0 ? this.pos - this.from : this.to - this.pos;\n if (skip > limit)\n skip = limit;\n limit -= skip;\n let { value } = this.cursor.next(skip);\n this.pos += (value.length + skip) * dir;\n this.value = value.length <= limit ? value : dir < 0 ? value.slice(value.length - limit) : value.slice(0, limit);\n this.done = !this.value;\n return this;\n }\n next(skip = 0) {\n if (skip < 0)\n skip = Math.max(skip, this.from - this.pos);\n else if (skip > 0)\n skip = Math.min(skip, this.to - this.pos);\n return this.nextInner(skip, this.cursor.dir);\n }\n get lineBreak() { return this.cursor.lineBreak && this.value != \"\"; }\n}\nclass LineCursor {\n constructor(inner) {\n this.inner = inner;\n this.afterBreak = true;\n this.value = \"\";\n this.done = false;\n }\n next(skip = 0) {\n let { done, lineBreak, value } = this.inner.next(skip);\n if (done && this.afterBreak) {\n this.value = \"\";\n this.afterBreak = false;\n }\n else if (done) {\n this.done = true;\n this.value = \"\";\n }\n else if (lineBreak) {\n if (this.afterBreak) {\n this.value = \"\";\n }\n else {\n this.afterBreak = true;\n this.next();\n }\n }\n else {\n this.value = value;\n this.afterBreak = false;\n }\n return this;\n }\n get lineBreak() { return false; }\n}\nif (typeof Symbol != \"undefined\") {\n Text.prototype[Symbol.iterator] = function () { return this.iter(); };\n RawTextCursor.prototype[Symbol.iterator] = PartialTextCursor.prototype[Symbol.iterator] =\n LineCursor.prototype[Symbol.iterator] = function () { return this; };\n}\n/**\nThis type describes a line in the document. It is created\non-demand when lines are [queried](https://codemirror.net/6/docs/ref/#state.Text.lineAt).\n*/\nclass Line {\n /**\n @internal\n */\n constructor(\n /**\n The position of the start of the line.\n */\n from, \n /**\n The position at the end of the line (_before_ the line break,\n or at the end of document for the last line).\n */\n to, \n /**\n This line's line number (1-based).\n */\n number, \n /**\n The line's content.\n */\n text) {\n this.from = from;\n this.to = to;\n this.number = number;\n this.text = text;\n }\n /**\n The length of the line (not including any line break after it).\n */\n get length() { return this.to - this.from; }\n}\nfunction clip(text, from, to) {\n from = Math.max(0, Math.min(text.length, from));\n return [from, Math.max(from, Math.min(text.length, to))];\n}\n\n// Compressed representation of the Grapheme_Cluster_Break=Extend\n// information from\n// http://www.unicode.org/Public/13.0.0/ucd/auxiliary/GraphemeBreakProperty.txt.\n// Each pair of elements represents a range, as an offet from the\n// previous range and a length. Numbers are in base-36, with the empty\n// string being a shorthand for 1.\nlet extend = /*@__PURE__*/\"lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,3b,f,,w,1j,,,,4,8,4,,3,7,a,2,t,,1m,,,,2,4,8,,9,,a,2,q,,2,2,1l,,4,2,4,2,2,3,3,,u,2,3,,b,2,1l,,4,5,,2,4,,k,2,m,6,,,1m,,,2,,4,8,,7,3,a,2,u,,1n,,,,c,,9,,14,,3,,1l,3,5,3,,4,7,2,b,2,t,,1m,,2,,2,,3,,5,2,7,2,b,2,s,2,1l,2,,,2,4,8,,9,,a,2,t,,20,,4,,2,3,,,8,,29,,2,7,c,8,2q,,2,9,b,6,22,2,r,,,,,,1j,e,,5,,2,5,b,,10,9,,2u,4,,6,,2,2,2,p,2,4,3,g,4,d,,2,2,6,,f,,jj,3,qa,3,t,3,t,2,u,2,1s,2,,7,8,,2,b,9,,19,3,3b,2,y,,3a,3,4,2,9,,6,3,63,2,2,,1m,,,7,,,,,2,8,6,a,2,,1c,h,1r,4,1c,7,,,5,,14,9,c,2,w,4,2,2,,3,1k,,,2,3,,,3,1m,8,2,2,48,3,,d,,7,4,,6,,3,2,5i,1m,,5,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,p,2,5,,47,2,q,i,d,,12,8,p,b,1a,3,1c,,2,4,2,2,13,,1v,6,2,2,2,2,c,,8,,1b,,1f,,,3,2,2,5,2,,,16,2,8,,6m,,2,,4,,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,ar,2,49,b,4w,,1i,f,1k,3,1d,4,2,2,1x,3,10,5,,8,1q,,c,2,1g,9,a,4,2,,2n,3,2,,,2,6,,4g,,3,8,l,2,1l,2,,,,,m,,e,7,3,5,5f,8,2,3,,,n,,29,,2,6,,,2,,,2,,2,6j,,2,4,6,2,,2,r,2,2d,8,2,,,2,2y,,,,2,6,,,2t,3,2,4,,5,77,9,,2,6t,,a,2,,,4,,40,4,2,2,4,,w,a,14,6,2,4,8,,9,6,2,3,1a,d,,2,ba,7,,6,,,2a,m,2,7,,2,,2,3e,6,3,,,2,,7,,,20,2,3,,,,9n,2,f0b,5,1n,7,t4,,1r,4,29,,f5k,2,43q,,,3,4,5,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o\".split(\",\").map(s => s ? parseInt(s, 36) : 1);\n// Convert offsets into absolute values\nfor (let i = 1; i < extend.length; i++)\n extend[i] += extend[i - 1];\nfunction isExtendingChar(code) {\n for (let i = 1; i < extend.length; i += 2)\n if (extend[i] > code)\n return extend[i - 1] <= code;\n return false;\n}\nfunction isRegionalIndicator(code) {\n return code >= 0x1F1E6 && code <= 0x1F1FF;\n}\nconst ZWJ = 0x200d;\n/**\nReturns a next grapheme cluster break _after_ (not equal to)\n`pos`, if `forward` is true, or before otherwise. Returns `pos`\nitself if no further cluster break is available in the string.\nMoves across surrogate pairs, extending characters (when\n`includeExtending` is true), characters joined with zero-width\njoiners, and flag emoji.\n*/\nfunction findClusterBreak(str, pos, forward = true, includeExtending = true) {\n return (forward ? nextClusterBreak : prevClusterBreak)(str, pos, includeExtending);\n}\nfunction nextClusterBreak(str, pos, includeExtending) {\n if (pos == str.length)\n return pos;\n // If pos is in the middle of a surrogate pair, move to its start\n if (pos && surrogateLow(str.charCodeAt(pos)) && surrogateHigh(str.charCodeAt(pos - 1)))\n pos--;\n let prev = codePointAt(str, pos);\n pos += codePointSize(prev);\n while (pos < str.length) {\n let next = codePointAt(str, pos);\n if (prev == ZWJ || next == ZWJ || includeExtending && isExtendingChar(next)) {\n pos += codePointSize(next);\n prev = next;\n }\n else if (isRegionalIndicator(next)) {\n let countBefore = 0, i = pos - 2;\n while (i >= 0 && isRegionalIndicator(codePointAt(str, i))) {\n countBefore++;\n i -= 2;\n }\n if (countBefore % 2 == 0)\n break;\n else\n pos += 2;\n }\n else {\n break;\n }\n }\n return pos;\n}\nfunction prevClusterBreak(str, pos, includeExtending) {\n while (pos > 0) {\n let found = nextClusterBreak(str, pos - 2, includeExtending);\n if (found < pos)\n return found;\n pos--;\n }\n return 0;\n}\nfunction surrogateLow(ch) { return ch >= 0xDC00 && ch < 0xE000; }\nfunction surrogateHigh(ch) { return ch >= 0xD800 && ch < 0xDC00; }\n/**\nFind the code point at the given position in a string (like the\n[`codePointAt`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/codePointAt)\nstring method).\n*/\nfunction codePointAt(str, pos) {\n let code0 = str.charCodeAt(pos);\n if (!surrogateHigh(code0) || pos + 1 == str.length)\n return code0;\n let code1 = str.charCodeAt(pos + 1);\n if (!surrogateLow(code1))\n return code0;\n return ((code0 - 0xd800) << 10) + (code1 - 0xdc00) + 0x10000;\n}\n/**\nGiven a Unicode codepoint, return the JavaScript string that\nrespresents it (like\n[`String.fromCodePoint`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/fromCodePoint)).\n*/\nfunction fromCodePoint(code) {\n if (code <= 0xffff)\n return String.fromCharCode(code);\n code -= 0x10000;\n return String.fromCharCode((code >> 10) + 0xd800, (code & 1023) + 0xdc00);\n}\n/**\nThe amount of positions a character takes up a JavaScript string.\n*/\nfunction codePointSize(code) { return code < 0x10000 ? 1 : 2; }\n\nconst DefaultSplit = /\\r\\n?|\\n/;\n/**\nDistinguishes different ways in which positions can be mapped.\n*/\nvar MapMode = /*@__PURE__*/(function (MapMode) {\n /**\n Map a position to a valid new position, even when its context\n was deleted.\n */\n MapMode[MapMode[\"Simple\"] = 0] = \"Simple\";\n /**\n Return null if deletion happens across the position.\n */\n MapMode[MapMode[\"TrackDel\"] = 1] = \"TrackDel\";\n /**\n Return null if the character _before_ the position is deleted.\n */\n MapMode[MapMode[\"TrackBefore\"] = 2] = \"TrackBefore\";\n /**\n Return null if the character _after_ the position is deleted.\n */\n MapMode[MapMode[\"TrackAfter\"] = 3] = \"TrackAfter\";\nreturn MapMode})(MapMode || (MapMode = {}));\n/**\nA change description is a variant of [change set](https://codemirror.net/6/docs/ref/#state.ChangeSet)\nthat doesn't store the inserted text. As such, it can't be\napplied, but is cheaper to store and manipulate.\n*/\nclass ChangeDesc {\n // Sections are encoded as pairs of integers. The first is the\n // length in the current document, and the second is -1 for\n // unaffected sections, and the length of the replacement content\n // otherwise. So an insertion would be (0, n>0), a deletion (n>0,\n // 0), and a replacement two positive numbers.\n /**\n @internal\n */\n constructor(\n /**\n @internal\n */\n sections) {\n this.sections = sections;\n }\n /**\n The length of the document before the change.\n */\n get length() {\n let result = 0;\n for (let i = 0; i < this.sections.length; i += 2)\n result += this.sections[i];\n return result;\n }\n /**\n The length of the document after the change.\n */\n get newLength() {\n let result = 0;\n for (let i = 0; i < this.sections.length; i += 2) {\n let ins = this.sections[i + 1];\n result += ins < 0 ? this.sections[i] : ins;\n }\n return result;\n }\n /**\n False when there are actual changes in this set.\n */\n get empty() { return this.sections.length == 0 || this.sections.length == 2 && this.sections[1] < 0; }\n /**\n Iterate over the unchanged parts left by these changes. `posA`\n provides the position of the range in the old document, `posB`\n the new position in the changed document.\n */\n iterGaps(f) {\n for (let i = 0, posA = 0, posB = 0; i < this.sections.length;) {\n let len = this.sections[i++], ins = this.sections[i++];\n if (ins < 0) {\n f(posA, posB, len);\n posB += len;\n }\n else {\n posB += ins;\n }\n posA += len;\n }\n }\n /**\n Iterate over the ranges changed by these changes. (See\n [`ChangeSet.iterChanges`](https://codemirror.net/6/docs/ref/#state.ChangeSet.iterChanges) for a\n variant that also provides you with the inserted text.)\n `fromA`/`toA` provides the extent of the change in the starting\n document, `fromB`/`toB` the extent of the replacement in the\n changed document.\n \n When `individual` is true, adjacent changes (which are kept\n separate for [position mapping](https://codemirror.net/6/docs/ref/#state.ChangeDesc.mapPos)) are\n reported separately.\n */\n iterChangedRanges(f, individual = false) {\n iterChanges(this, f, individual);\n }\n /**\n Get a description of the inverted form of these changes.\n */\n get invertedDesc() {\n let sections = [];\n for (let i = 0; i < this.sections.length;) {\n let len = this.sections[i++], ins = this.sections[i++];\n if (ins < 0)\n sections.push(len, ins);\n else\n sections.push(ins, len);\n }\n return new ChangeDesc(sections);\n }\n /**\n Compute the combined effect of applying another set of changes\n after this one. The length of the document after this set should\n match the length before `other`.\n */\n composeDesc(other) { return this.empty ? other : other.empty ? this : composeSets(this, other); }\n /**\n Map this description, which should start with the same document\n as `other`, over another set of changes, so that it can be\n applied after it. When `before` is true, map as if the changes\n in `other` happened before the ones in `this`.\n */\n mapDesc(other, before = false) { return other.empty ? this : mapSet(this, other, before); }\n mapPos(pos, assoc = -1, mode = MapMode.Simple) {\n let posA = 0, posB = 0;\n for (let i = 0; i < this.sections.length;) {\n let len = this.sections[i++], ins = this.sections[i++], endA = posA + len;\n if (ins < 0) {\n if (endA > pos)\n return posB + (pos - posA);\n posB += len;\n }\n else {\n if (mode != MapMode.Simple && endA >= pos &&\n (mode == MapMode.TrackDel && posA < pos && endA > pos ||\n mode == MapMode.TrackBefore && posA < pos ||\n mode == MapMode.TrackAfter && endA > pos))\n return null;\n if (endA > pos || endA == pos && assoc < 0 && !len)\n return pos == posA || assoc < 0 ? posB : posB + ins;\n posB += ins;\n }\n posA = endA;\n }\n if (pos > posA)\n throw new RangeError(`Position ${pos} is out of range for changeset of length ${posA}`);\n return posB;\n }\n /**\n Check whether these changes touch a given range. When one of the\n changes entirely covers the range, the string `\"cover\"` is\n returned.\n */\n touchesRange(from, to = from) {\n for (let i = 0, pos = 0; i < this.sections.length && pos <= to;) {\n let len = this.sections[i++], ins = this.sections[i++], end = pos + len;\n if (ins >= 0 && pos <= to && end >= from)\n return pos < from && end > to ? \"cover\" : true;\n pos = end;\n }\n return false;\n }\n /**\n @internal\n */\n toString() {\n let result = \"\";\n for (let i = 0; i < this.sections.length;) {\n let len = this.sections[i++], ins = this.sections[i++];\n result += (result ? \" \" : \"\") + len + (ins >= 0 ? \":\" + ins : \"\");\n }\n return result;\n }\n /**\n Serialize this change desc to a JSON-representable value.\n */\n toJSON() { return this.sections; }\n /**\n Create a change desc from its JSON representation (as produced\n by [`toJSON`](https://codemirror.net/6/docs/ref/#state.ChangeDesc.toJSON).\n */\n static fromJSON(json) {\n if (!Array.isArray(json) || json.length % 2 || json.some(a => typeof a != \"number\"))\n throw new RangeError(\"Invalid JSON representation of ChangeDesc\");\n return new ChangeDesc(json);\n }\n /**\n @internal\n */\n static create(sections) { return new ChangeDesc(sections); }\n}\n/**\nA change set represents a group of modifications to a document. It\nstores the document length, and can only be applied to documents\nwith exactly that length.\n*/\nclass ChangeSet extends ChangeDesc {\n constructor(sections, \n /**\n @internal\n */\n inserted) {\n super(sections);\n this.inserted = inserted;\n }\n /**\n Apply the changes to a document, returning the modified\n document.\n */\n apply(doc) {\n if (this.length != doc.length)\n throw new RangeError(\"Applying change set to a document with the wrong length\");\n iterChanges(this, (fromA, toA, fromB, _toB, text) => doc = doc.replace(fromB, fromB + (toA - fromA), text), false);\n return doc;\n }\n mapDesc(other, before = false) { return mapSet(this, other, before, true); }\n /**\n Given the document as it existed _before_ the changes, return a\n change set that represents the inverse of this set, which could\n be used to go from the document created by the changes back to\n the document as it existed before the changes.\n */\n invert(doc) {\n let sections = this.sections.slice(), inserted = [];\n for (let i = 0, pos = 0; i < sections.length; i += 2) {\n let len = sections[i], ins = sections[i + 1];\n if (ins >= 0) {\n sections[i] = ins;\n sections[i + 1] = len;\n let index = i >> 1;\n while (inserted.length < index)\n inserted.push(Text.empty);\n inserted.push(len ? doc.slice(pos, pos + len) : Text.empty);\n }\n pos += len;\n }\n return new ChangeSet(sections, inserted);\n }\n /**\n Combine two subsequent change sets into a single set. `other`\n must start in the document produced by `this`. If `this` goes\n `docA` → `docB` and `other` represents `docB` → `docC`, the\n returned value will represent the change `docA` → `docC`.\n */\n compose(other) { return this.empty ? other : other.empty ? this : composeSets(this, other, true); }\n /**\n Given another change set starting in the same document, maps this\n change set over the other, producing a new change set that can be\n applied to the document produced by applying `other`. When\n `before` is `true`, order changes as if `this` comes before\n `other`, otherwise (the default) treat `other` as coming first.\n \n Given two changes `A` and `B`, `A.compose(B.map(A))` and\n `B.compose(A.map(B, true))` will produce the same document. This\n provides a basic form of [operational\n transformation](https://en.wikipedia.org/wiki/Operational_transformation),\n and can be used for collaborative editing.\n */\n map(other, before = false) { return other.empty ? this : mapSet(this, other, before, true); }\n /**\n Iterate over the changed ranges in the document, calling `f` for\n each, with the range in the original document (`fromA`-`toA`)\n and the range that replaces it in the new document\n (`fromB`-`toB`).\n \n When `individual` is true, adjacent changes are reported\n separately.\n */\n iterChanges(f, individual = false) {\n iterChanges(this, f, individual);\n }\n /**\n Get a [change description](https://codemirror.net/6/docs/ref/#state.ChangeDesc) for this change\n set.\n */\n get desc() { return ChangeDesc.create(this.sections); }\n /**\n @internal\n */\n filter(ranges) {\n let resultSections = [], resultInserted = [], filteredSections = [];\n let iter = new SectionIter(this);\n done: for (let i = 0, pos = 0;;) {\n let next = i == ranges.length ? 1e9 : ranges[i++];\n while (pos < next || pos == next && iter.len == 0) {\n if (iter.done)\n break done;\n let len = Math.min(iter.len, next - pos);\n addSection(filteredSections, len, -1);\n let ins = iter.ins == -1 ? -1 : iter.off == 0 ? iter.ins : 0;\n addSection(resultSections, len, ins);\n if (ins > 0)\n addInsert(resultInserted, resultSections, iter.text);\n iter.forward(len);\n pos += len;\n }\n let end = ranges[i++];\n while (pos < end) {\n if (iter.done)\n break done;\n let len = Math.min(iter.len, end - pos);\n addSection(resultSections, len, -1);\n addSection(filteredSections, len, iter.ins == -1 ? -1 : iter.off == 0 ? iter.ins : 0);\n iter.forward(len);\n pos += len;\n }\n }\n return { changes: new ChangeSet(resultSections, resultInserted),\n filtered: ChangeDesc.create(filteredSections) };\n }\n /**\n Serialize this change set to a JSON-representable value.\n */\n toJSON() {\n let parts = [];\n for (let i = 0; i < this.sections.length; i += 2) {\n let len = this.sections[i], ins = this.sections[i + 1];\n if (ins < 0)\n parts.push(len);\n else if (ins == 0)\n parts.push([len]);\n else\n parts.push([len].concat(this.inserted[i >> 1].toJSON()));\n }\n return parts;\n }\n /**\n Create a change set for the given changes, for a document of the\n given length, using `lineSep` as line separator.\n */\n static of(changes, length, lineSep) {\n let sections = [], inserted = [], pos = 0;\n let total = null;\n function flush(force = false) {\n if (!force && !sections.length)\n return;\n if (pos < length)\n addSection(sections, length - pos, -1);\n let set = new ChangeSet(sections, inserted);\n total = total ? total.compose(set.map(total)) : set;\n sections = [];\n inserted = [];\n pos = 0;\n }\n function process(spec) {\n if (Array.isArray(spec)) {\n for (let sub of spec)\n process(sub);\n }\n else if (spec instanceof ChangeSet) {\n if (spec.length != length)\n throw new RangeError(`Mismatched change set length (got ${spec.length}, expected ${length})`);\n flush();\n total = total ? total.compose(spec.map(total)) : spec;\n }\n else {\n let { from, to = from, insert } = spec;\n if (from > to || from < 0 || to > length)\n throw new RangeError(`Invalid change range ${from} to ${to} (in doc of length ${length})`);\n let insText = !insert ? Text.empty : typeof insert == \"string\" ? Text.of(insert.split(lineSep || DefaultSplit)) : insert;\n let insLen = insText.length;\n if (from == to && insLen == 0)\n return;\n if (from < pos)\n flush();\n if (from > pos)\n addSection(sections, from - pos, -1);\n addSection(sections, to - from, insLen);\n addInsert(inserted, sections, insText);\n pos = to;\n }\n }\n process(changes);\n flush(!total);\n return total;\n }\n /**\n Create an empty changeset of the given length.\n */\n static empty(length) {\n return new ChangeSet(length ? [length, -1] : [], []);\n }\n /**\n Create a changeset from its JSON representation (as produced by\n [`toJSON`](https://codemirror.net/6/docs/ref/#state.ChangeSet.toJSON).\n */\n static fromJSON(json) {\n if (!Array.isArray(json))\n throw new RangeError(\"Invalid JSON representation of ChangeSet\");\n let sections = [], inserted = [];\n for (let i = 0; i < json.length; i++) {\n let part = json[i];\n if (typeof part == \"number\") {\n sections.push(part, -1);\n }\n else if (!Array.isArray(part) || typeof part[0] != \"number\" || part.some((e, i) => i && typeof e != \"string\")) {\n throw new RangeError(\"Invalid JSON representation of ChangeSet\");\n }\n else if (part.length == 1) {\n sections.push(part[0], 0);\n }\n else {\n while (inserted.length < i)\n inserted.push(Text.empty);\n inserted[i] = Text.of(part.slice(1));\n sections.push(part[0], inserted[i].length);\n }\n }\n return new ChangeSet(sections, inserted);\n }\n /**\n @internal\n */\n static createSet(sections, inserted) {\n return new ChangeSet(sections, inserted);\n }\n}\nfunction addSection(sections, len, ins, forceJoin = false) {\n if (len == 0 && ins <= 0)\n return;\n let last = sections.length - 2;\n if (last >= 0 && ins <= 0 && ins == sections[last + 1])\n sections[last] += len;\n else if (len == 0 && sections[last] == 0)\n sections[last + 1] += ins;\n else if (forceJoin) {\n sections[last] += len;\n sections[last + 1] += ins;\n }\n else\n sections.push(len, ins);\n}\nfunction addInsert(values, sections, value) {\n if (value.length == 0)\n return;\n let index = (sections.length - 2) >> 1;\n if (index < values.length) {\n values[values.length - 1] = values[values.length - 1].append(value);\n }\n else {\n while (values.length < index)\n values.push(Text.empty);\n values.push(value);\n }\n}\nfunction iterChanges(desc, f, individual) {\n let inserted = desc.inserted;\n for (let posA = 0, posB = 0, i = 0; i < desc.sections.length;) {\n let len = desc.sections[i++], ins = desc.sections[i++];\n if (ins < 0) {\n posA += len;\n posB += len;\n }\n else {\n let endA = posA, endB = posB, text = Text.empty;\n for (;;) {\n endA += len;\n endB += ins;\n if (ins && inserted)\n text = text.append(inserted[(i - 2) >> 1]);\n if (individual || i == desc.sections.length || desc.sections[i + 1] < 0)\n break;\n len = desc.sections[i++];\n ins = desc.sections[i++];\n }\n f(posA, endA, posB, endB, text);\n posA = endA;\n posB = endB;\n }\n }\n}\nfunction mapSet(setA, setB, before, mkSet = false) {\n // Produce a copy of setA that applies to the document after setB\n // has been applied (assuming both start at the same document).\n let sections = [], insert = mkSet ? [] : null;\n let a = new SectionIter(setA), b = new SectionIter(setB);\n // Iterate over both sets in parallel. inserted tracks, for changes\n // in A that have to be processed piece-by-piece, whether their\n // content has been inserted already, and refers to the section\n // index.\n for (let inserted = -1;;) {\n if (a.ins == -1 && b.ins == -1) {\n // Move across ranges skipped by both sets.\n let len = Math.min(a.len, b.len);\n addSection(sections, len, -1);\n a.forward(len);\n b.forward(len);\n }\n else if (b.ins >= 0 && (a.ins < 0 || inserted == a.i || a.off == 0 && (b.len < a.len || b.len == a.len && !before))) {\n // If there's a change in B that comes before the next change in\n // A (ordered by start pos, then len, then before flag), skip\n // that (and process any changes in A it covers).\n let len = b.len;\n addSection(sections, b.ins, -1);\n while (len) {\n let piece = Math.min(a.len, len);\n if (a.ins >= 0 && inserted < a.i && a.len <= piece) {\n addSection(sections, 0, a.ins);\n if (insert)\n addInsert(insert, sections, a.text);\n inserted = a.i;\n }\n a.forward(piece);\n len -= piece;\n }\n b.next();\n }\n else if (a.ins >= 0) {\n // Process the part of a change in A up to the start of the next\n // non-deletion change in B (if overlapping).\n let len = 0, left = a.len;\n while (left) {\n if (b.ins == -1) {\n let piece = Math.min(left, b.len);\n len += piece;\n left -= piece;\n b.forward(piece);\n }\n else if (b.ins == 0 && b.len < left) {\n left -= b.len;\n b.next();\n }\n else {\n break;\n }\n }\n addSection(sections, len, inserted < a.i ? a.ins : 0);\n if (insert && inserted < a.i)\n addInsert(insert, sections, a.text);\n inserted = a.i;\n a.forward(a.len - left);\n }\n else if (a.done && b.done) {\n return insert ? ChangeSet.createSet(sections, insert) : ChangeDesc.create(sections);\n }\n else {\n throw new Error(\"Mismatched change set lengths\");\n }\n }\n}\nfunction composeSets(setA, setB, mkSet = false) {\n let sections = [];\n let insert = mkSet ? [] : null;\n let a = new SectionIter(setA), b = new SectionIter(setB);\n for (let open = false;;) {\n if (a.done && b.done) {\n return insert ? ChangeSet.createSet(sections, insert) : ChangeDesc.create(sections);\n }\n else if (a.ins == 0) { // Deletion in A\n addSection(sections, a.len, 0, open);\n a.next();\n }\n else if (b.len == 0 && !b.done) { // Insertion in B\n addSection(sections, 0, b.ins, open);\n if (insert)\n addInsert(insert, sections, b.text);\n b.next();\n }\n else if (a.done || b.done) {\n throw new Error(\"Mismatched change set lengths\");\n }\n else {\n let len = Math.min(a.len2, b.len), sectionLen = sections.length;\n if (a.ins == -1) {\n let insB = b.ins == -1 ? -1 : b.off ? 0 : b.ins;\n addSection(sections, len, insB, open);\n if (insert && insB)\n addInsert(insert, sections, b.text);\n }\n else if (b.ins == -1) {\n addSection(sections, a.off ? 0 : a.len, len, open);\n if (insert)\n addInsert(insert, sections, a.textBit(len));\n }\n else {\n addSection(sections, a.off ? 0 : a.len, b.off ? 0 : b.ins, open);\n if (insert && !b.off)\n addInsert(insert, sections, b.text);\n }\n open = (a.ins > len || b.ins >= 0 && b.len > len) && (open || sections.length > sectionLen);\n a.forward2(len);\n b.forward(len);\n }\n }\n}\nclass SectionIter {\n constructor(set) {\n this.set = set;\n this.i = 0;\n this.next();\n }\n next() {\n let { sections } = this.set;\n if (this.i < sections.length) {\n this.len = sections[this.i++];\n this.ins = sections[this.i++];\n }\n else {\n this.len = 0;\n this.ins = -2;\n }\n this.off = 0;\n }\n get done() { return this.ins == -2; }\n get len2() { return this.ins < 0 ? this.len : this.ins; }\n get text() {\n let { inserted } = this.set, index = (this.i - 2) >> 1;\n return index >= inserted.length ? Text.empty : inserted[index];\n }\n textBit(len) {\n let { inserted } = this.set, index = (this.i - 2) >> 1;\n return index >= inserted.length && !len ? Text.empty\n : inserted[index].slice(this.off, len == null ? undefined : this.off + len);\n }\n forward(len) {\n if (len == this.len)\n this.next();\n else {\n this.len -= len;\n this.off += len;\n }\n }\n forward2(len) {\n if (this.ins == -1)\n this.forward(len);\n else if (len == this.ins)\n this.next();\n else {\n this.ins -= len;\n this.off += len;\n }\n }\n}\n\n/**\nA single selection range. When\n[`allowMultipleSelections`](https://codemirror.net/6/docs/ref/#state.EditorState^allowMultipleSelections)\nis enabled, a [selection](https://codemirror.net/6/docs/ref/#state.EditorSelection) may hold\nmultiple ranges. By default, selections hold exactly one range.\n*/\nclass SelectionRange {\n constructor(\n /**\n The lower boundary of the range.\n */\n from, \n /**\n The upper boundary of the range.\n */\n to, flags) {\n this.from = from;\n this.to = to;\n this.flags = flags;\n }\n /**\n The anchor of the range—the side that doesn't move when you\n extend it.\n */\n get anchor() { return this.flags & 32 /* RangeFlag.Inverted */ ? this.to : this.from; }\n /**\n The head of the range, which is moved when the range is\n [extended](https://codemirror.net/6/docs/ref/#state.SelectionRange.extend).\n */\n get head() { return this.flags & 32 /* RangeFlag.Inverted */ ? this.from : this.to; }\n /**\n True when `anchor` and `head` are at the same position.\n */\n get empty() { return this.from == this.to; }\n /**\n If this is a cursor that is explicitly associated with the\n character on one of its sides, this returns the side. -1 means\n the character before its position, 1 the character after, and 0\n means no association.\n */\n get assoc() { return this.flags & 8 /* RangeFlag.AssocBefore */ ? -1 : this.flags & 16 /* RangeFlag.AssocAfter */ ? 1 : 0; }\n /**\n The bidirectional text level associated with this cursor, if\n any.\n */\n get bidiLevel() {\n let level = this.flags & 7 /* RangeFlag.BidiLevelMask */;\n return level == 7 ? null : level;\n }\n /**\n The goal column (stored vertical offset) associated with a\n cursor. This is used to preserve the vertical position when\n [moving](https://codemirror.net/6/docs/ref/#view.EditorView.moveVertically) across\n lines of different length.\n */\n get goalColumn() {\n let value = this.flags >> 6 /* RangeFlag.GoalColumnOffset */;\n return value == 16777215 /* RangeFlag.NoGoalColumn */ ? undefined : value;\n }\n /**\n Map this range through a change, producing a valid range in the\n updated document.\n */\n map(change, assoc = -1) {\n let from, to;\n if (this.empty) {\n from = to = change.mapPos(this.from, assoc);\n }\n else {\n from = change.mapPos(this.from, 1);\n to = change.mapPos(this.to, -1);\n }\n return from == this.from && to == this.to ? this : new SelectionRange(from, to, this.flags);\n }\n /**\n Extend this range to cover at least `from` to `to`.\n */\n extend(from, to = from) {\n if (from <= this.anchor && to >= this.anchor)\n return EditorSelection.range(from, to);\n let head = Math.abs(from - this.anchor) > Math.abs(to - this.anchor) ? from : to;\n return EditorSelection.range(this.anchor, head);\n }\n /**\n Compare this range to another range.\n */\n eq(other) {\n return this.anchor == other.anchor && this.head == other.head;\n }\n /**\n Return a JSON-serializable object representing the range.\n */\n toJSON() { return { anchor: this.anchor, head: this.head }; }\n /**\n Convert a JSON representation of a range to a `SelectionRange`\n instance.\n */\n static fromJSON(json) {\n if (!json || typeof json.anchor != \"number\" || typeof json.head != \"number\")\n throw new RangeError(\"Invalid JSON representation for SelectionRange\");\n return EditorSelection.range(json.anchor, json.head);\n }\n /**\n @internal\n */\n static create(from, to, flags) {\n return new SelectionRange(from, to, flags);\n }\n}\n/**\nAn editor selection holds one or more selection ranges.\n*/\nclass EditorSelection {\n constructor(\n /**\n The ranges in the selection, sorted by position. Ranges cannot\n overlap (but they may touch, if they aren't empty).\n */\n ranges, \n /**\n The index of the _main_ range in the selection (which is\n usually the range that was added last).\n */\n mainIndex) {\n this.ranges = ranges;\n this.mainIndex = mainIndex;\n }\n /**\n Map a selection through a change. Used to adjust the selection\n position for changes.\n */\n map(change, assoc = -1) {\n if (change.empty)\n return this;\n return EditorSelection.create(this.ranges.map(r => r.map(change, assoc)), this.mainIndex);\n }\n /**\n Compare this selection to another selection.\n */\n eq(other) {\n if (this.ranges.length != other.ranges.length ||\n this.mainIndex != other.mainIndex)\n return false;\n for (let i = 0; i < this.ranges.length; i++)\n if (!this.ranges[i].eq(other.ranges[i]))\n return false;\n return true;\n }\n /**\n Get the primary selection range. Usually, you should make sure\n your code applies to _all_ ranges, by using methods like\n [`changeByRange`](https://codemirror.net/6/docs/ref/#state.EditorState.changeByRange).\n */\n get main() { return this.ranges[this.mainIndex]; }\n /**\n Make sure the selection only has one range. Returns a selection\n holding only the main range from this selection.\n */\n asSingle() {\n return this.ranges.length == 1 ? this : new EditorSelection([this.main], 0);\n }\n /**\n Extend this selection with an extra range.\n */\n addRange(range, main = true) {\n return EditorSelection.create([range].concat(this.ranges), main ? 0 : this.mainIndex + 1);\n }\n /**\n Replace a given range with another range, and then normalize the\n selection to merge and sort ranges if necessary.\n */\n replaceRange(range, which = this.mainIndex) {\n let ranges = this.ranges.slice();\n ranges[which] = range;\n return EditorSelection.create(ranges, this.mainIndex);\n }\n /**\n Convert this selection to an object that can be serialized to\n JSON.\n */\n toJSON() {\n return { ranges: this.ranges.map(r => r.toJSON()), main: this.mainIndex };\n }\n /**\n Create a selection from a JSON representation.\n */\n static fromJSON(json) {\n if (!json || !Array.isArray(json.ranges) || typeof json.main != \"number\" || json.main >= json.ranges.length)\n throw new RangeError(\"Invalid JSON representation for EditorSelection\");\n return new EditorSelection(json.ranges.map((r) => SelectionRange.fromJSON(r)), json.main);\n }\n /**\n Create a selection holding a single range.\n */\n static single(anchor, head = anchor) {\n return new EditorSelection([EditorSelection.range(anchor, head)], 0);\n }\n /**\n Sort and merge the given set of ranges, creating a valid\n selection.\n */\n static create(ranges, mainIndex = 0) {\n if (ranges.length == 0)\n throw new RangeError(\"A selection needs at least one range\");\n for (let pos = 0, i = 0; i < ranges.length; i++) {\n let range = ranges[i];\n if (range.empty ? range.from <= pos : range.from < pos)\n return EditorSelection.normalized(ranges.slice(), mainIndex);\n pos = range.to;\n }\n return new EditorSelection(ranges, mainIndex);\n }\n /**\n Create a cursor selection range at the given position. You can\n safely ignore the optional arguments in most situations.\n */\n static cursor(pos, assoc = 0, bidiLevel, goalColumn) {\n return SelectionRange.create(pos, pos, (assoc == 0 ? 0 : assoc < 0 ? 8 /* RangeFlag.AssocBefore */ : 16 /* RangeFlag.AssocAfter */) |\n (bidiLevel == null ? 7 : Math.min(6, bidiLevel)) |\n ((goalColumn !== null && goalColumn !== void 0 ? goalColumn : 16777215 /* RangeFlag.NoGoalColumn */) << 6 /* RangeFlag.GoalColumnOffset */));\n }\n /**\n Create a selection range.\n */\n static range(anchor, head, goalColumn, bidiLevel) {\n let flags = ((goalColumn !== null && goalColumn !== void 0 ? goalColumn : 16777215 /* RangeFlag.NoGoalColumn */) << 6 /* RangeFlag.GoalColumnOffset */) |\n (bidiLevel == null ? 7 : Math.min(6, bidiLevel));\n return head < anchor ? SelectionRange.create(head, anchor, 32 /* RangeFlag.Inverted */ | 16 /* RangeFlag.AssocAfter */ | flags)\n : SelectionRange.create(anchor, head, (head > anchor ? 8 /* RangeFlag.AssocBefore */ : 0) | flags);\n }\n /**\n @internal\n */\n static normalized(ranges, mainIndex = 0) {\n let main = ranges[mainIndex];\n ranges.sort((a, b) => a.from - b.from);\n mainIndex = ranges.indexOf(main);\n for (let i = 1; i < ranges.length; i++) {\n let range = ranges[i], prev = ranges[i - 1];\n if (range.empty ? range.from <= prev.to : range.from < prev.to) {\n let from = prev.from, to = Math.max(range.to, prev.to);\n if (i <= mainIndex)\n mainIndex--;\n ranges.splice(--i, 2, range.anchor > range.head ? EditorSelection.range(to, from) : EditorSelection.range(from, to));\n }\n }\n return new EditorSelection(ranges, mainIndex);\n }\n}\nfunction checkSelection(selection, docLength) {\n for (let range of selection.ranges)\n if (range.to > docLength)\n throw new RangeError(\"Selection points outside of document\");\n}\n\nlet nextID = 0;\n/**\nA facet is a labeled value that is associated with an editor\nstate. It takes inputs from any number of extensions, and combines\nthose into a single output value.\n\nExamples of uses of facets are the [tab\nsize](https://codemirror.net/6/docs/ref/#state.EditorState^tabSize), [editor\nattributes](https://codemirror.net/6/docs/ref/#view.EditorView^editorAttributes), and [update\nlisteners](https://codemirror.net/6/docs/ref/#view.EditorView^updateListener).\n\nNote that `Facet` instances can be used anywhere where\n[`FacetReader`](https://codemirror.net/6/docs/ref/#state.FacetReader) is expected.\n*/\nclass Facet {\n constructor(\n /**\n @internal\n */\n combine, \n /**\n @internal\n */\n compareInput, \n /**\n @internal\n */\n compare, isStatic, enables) {\n this.combine = combine;\n this.compareInput = compareInput;\n this.compare = compare;\n this.isStatic = isStatic;\n /**\n @internal\n */\n this.id = nextID++;\n this.default = combine([]);\n this.extensions = typeof enables == \"function\" ? enables(this) : enables;\n }\n /**\n Returns a facet reader for this facet, which can be used to\n [read](https://codemirror.net/6/docs/ref/#state.EditorState.facet) it but not to define values for it.\n */\n get reader() { return this; }\n /**\n Define a new facet.\n */\n static define(config = {}) {\n return new Facet(config.combine || ((a) => a), config.compareInput || ((a, b) => a === b), config.compare || (!config.combine ? sameArray : (a, b) => a === b), !!config.static, config.enables);\n }\n /**\n Returns an extension that adds the given value to this facet.\n */\n of(value) {\n return new FacetProvider([], this, 0 /* Provider.Static */, value);\n }\n /**\n Create an extension that computes a value for the facet from a\n state. You must take care to declare the parts of the state that\n this value depends on, since your function is only called again\n for a new state when one of those parts changed.\n \n In cases where your value depends only on a single field, you'll\n want to use the [`from`](https://codemirror.net/6/docs/ref/#state.Facet.from) method instead.\n */\n compute(deps, get) {\n if (this.isStatic)\n throw new Error(\"Can't compute a static facet\");\n return new FacetProvider(deps, this, 1 /* Provider.Single */, get);\n }\n /**\n Create an extension that computes zero or more values for this\n facet from a state.\n */\n computeN(deps, get) {\n if (this.isStatic)\n throw new Error(\"Can't compute a static facet\");\n return new FacetProvider(deps, this, 2 /* Provider.Multi */, get);\n }\n from(field, get) {\n if (!get)\n get = x => x;\n return this.compute([field], state => get(state.field(field)));\n }\n}\nfunction sameArray(a, b) {\n return a == b || a.length == b.length && a.every((e, i) => e === b[i]);\n}\nclass FacetProvider {\n constructor(dependencies, facet, type, value) {\n this.dependencies = dependencies;\n this.facet = facet;\n this.type = type;\n this.value = value;\n this.id = nextID++;\n }\n dynamicSlot(addresses) {\n var _a;\n let getter = this.value;\n let compare = this.facet.compareInput;\n let id = this.id, idx = addresses[id] >> 1, multi = this.type == 2 /* Provider.Multi */;\n let depDoc = false, depSel = false, depAddrs = [];\n for (let dep of this.dependencies) {\n if (dep == \"doc\")\n depDoc = true;\n else if (dep == \"selection\")\n depSel = true;\n else if ((((_a = addresses[dep.id]) !== null && _a !== void 0 ? _a : 1) & 1) == 0)\n depAddrs.push(addresses[dep.id]);\n }\n return {\n create(state) {\n state.values[idx] = getter(state);\n return 1 /* SlotStatus.Changed */;\n },\n update(state, tr) {\n if ((depDoc && tr.docChanged) || (depSel && (tr.docChanged || tr.selection)) || ensureAll(state, depAddrs)) {\n let newVal = getter(state);\n if (multi ? !compareArray(newVal, state.values[idx], compare) : !compare(newVal, state.values[idx])) {\n state.values[idx] = newVal;\n return 1 /* SlotStatus.Changed */;\n }\n }\n return 0;\n },\n reconfigure: (state, oldState) => {\n let newVal, oldAddr = oldState.config.address[id];\n if (oldAddr != null) {\n let oldVal = getAddr(oldState, oldAddr);\n if (this.dependencies.every(dep => {\n return dep instanceof Facet ? oldState.facet(dep) === state.facet(dep) :\n dep instanceof StateField ? oldState.field(dep, false) == state.field(dep, false) : true;\n }) || (multi ? compareArray(newVal = getter(state), oldVal, compare) : compare(newVal = getter(state), oldVal))) {\n state.values[idx] = oldVal;\n return 0;\n }\n }\n else {\n newVal = getter(state);\n }\n state.values[idx] = newVal;\n return 1 /* SlotStatus.Changed */;\n }\n };\n }\n}\nfunction compareArray(a, b, compare) {\n if (a.length != b.length)\n return false;\n for (let i = 0; i < a.length; i++)\n if (!compare(a[i], b[i]))\n return false;\n return true;\n}\nfunction ensureAll(state, addrs) {\n let changed = false;\n for (let addr of addrs)\n if (ensureAddr(state, addr) & 1 /* SlotStatus.Changed */)\n changed = true;\n return changed;\n}\nfunction dynamicFacetSlot(addresses, facet, providers) {\n let providerAddrs = providers.map(p => addresses[p.id]);\n let providerTypes = providers.map(p => p.type);\n let dynamic = providerAddrs.filter(p => !(p & 1));\n let idx = addresses[facet.id] >> 1;\n function get(state) {\n let values = [];\n for (let i = 0; i < providerAddrs.length; i++) {\n let value = getAddr(state, providerAddrs[i]);\n if (providerTypes[i] == 2 /* Provider.Multi */)\n for (let val of value)\n values.push(val);\n else\n values.push(value);\n }\n return facet.combine(values);\n }\n return {\n create(state) {\n for (let addr of providerAddrs)\n ensureAddr(state, addr);\n state.values[idx] = get(state);\n return 1 /* SlotStatus.Changed */;\n },\n update(state, tr) {\n if (!ensureAll(state, dynamic))\n return 0;\n let value = get(state);\n if (facet.compare(value, state.values[idx]))\n return 0;\n state.values[idx] = value;\n return 1 /* SlotStatus.Changed */;\n },\n reconfigure(state, oldState) {\n let depChanged = ensureAll(state, providerAddrs);\n let oldProviders = oldState.config.facets[facet.id], oldValue = oldState.facet(facet);\n if (oldProviders && !depChanged && sameArray(providers, oldProviders)) {\n state.values[idx] = oldValue;\n return 0;\n }\n let value = get(state);\n if (facet.compare(value, oldValue)) {\n state.values[idx] = oldValue;\n return 0;\n }\n state.values[idx] = value;\n return 1 /* SlotStatus.Changed */;\n }\n };\n}\nconst initField = /*@__PURE__*/Facet.define({ static: true });\n/**\nFields can store additional information in an editor state, and\nkeep it in sync with the rest of the state.\n*/\nclass StateField {\n constructor(\n /**\n @internal\n */\n id, createF, updateF, compareF, \n /**\n @internal\n */\n spec) {\n this.id = id;\n this.createF = createF;\n this.updateF = updateF;\n this.compareF = compareF;\n this.spec = spec;\n /**\n @internal\n */\n this.provides = undefined;\n }\n /**\n Define a state field.\n */\n static define(config) {\n let field = new StateField(nextID++, config.create, config.update, config.compare || ((a, b) => a === b), config);\n if (config.provide)\n field.provides = config.provide(field);\n return field;\n }\n create(state) {\n let init = state.facet(initField).find(i => i.field == this);\n return ((init === null || init === void 0 ? void 0 : init.create) || this.createF)(state);\n }\n /**\n @internal\n */\n slot(addresses) {\n let idx = addresses[this.id] >> 1;\n return {\n create: (state) => {\n state.values[idx] = this.create(state);\n return 1 /* SlotStatus.Changed */;\n },\n update: (state, tr) => {\n let oldVal = state.values[idx];\n let value = this.updateF(oldVal, tr);\n if (this.compareF(oldVal, value))\n return 0;\n state.values[idx] = value;\n return 1 /* SlotStatus.Changed */;\n },\n reconfigure: (state, oldState) => {\n if (oldState.config.address[this.id] != null) {\n state.values[idx] = oldState.field(this);\n return 0;\n }\n state.values[idx] = this.create(state);\n return 1 /* SlotStatus.Changed */;\n }\n };\n }\n /**\n Returns an extension that enables this field and overrides the\n way it is initialized. Can be useful when you need to provide a\n non-default starting value for the field.\n */\n init(create) {\n return [this, initField.of({ field: this, create })];\n }\n /**\n State field instances can be used as\n [`Extension`](https://codemirror.net/6/docs/ref/#state.Extension) values to enable the field in a\n given state.\n */\n get extension() { return this; }\n}\nconst Prec_ = { lowest: 4, low: 3, default: 2, high: 1, highest: 0 };\nfunction prec(value) {\n return (ext) => new PrecExtension(ext, value);\n}\n/**\nBy default extensions are registered in the order they are found\nin the flattened form of nested array that was provided.\nIndividual extension values can be assigned a precedence to\noverride this. Extensions that do not have a precedence set get\nthe precedence of the nearest parent with a precedence, or\n[`default`](https://codemirror.net/6/docs/ref/#state.Prec.default) if there is no such parent. The\nfinal ordering of extensions is determined by first sorting by\nprecedence and then by order within each precedence.\n*/\nconst Prec = {\n /**\n The highest precedence level, for extensions that should end up\n near the start of the precedence ordering.\n */\n highest: /*@__PURE__*/prec(Prec_.highest),\n /**\n A higher-than-default precedence, for extensions that should\n come before those with default precedence.\n */\n high: /*@__PURE__*/prec(Prec_.high),\n /**\n The default precedence, which is also used for extensions\n without an explicit precedence.\n */\n default: /*@__PURE__*/prec(Prec_.default),\n /**\n A lower-than-default precedence.\n */\n low: /*@__PURE__*/prec(Prec_.low),\n /**\n The lowest precedence level. Meant for things that should end up\n near the end of the extension order.\n */\n lowest: /*@__PURE__*/prec(Prec_.lowest)\n};\nclass PrecExtension {\n constructor(inner, prec) {\n this.inner = inner;\n this.prec = prec;\n }\n}\n/**\nExtension compartments can be used to make a configuration\ndynamic. By [wrapping](https://codemirror.net/6/docs/ref/#state.Compartment.of) part of your\nconfiguration in a compartment, you can later\n[replace](https://codemirror.net/6/docs/ref/#state.Compartment.reconfigure) that part through a\ntransaction.\n*/\nclass Compartment {\n /**\n Create an instance of this compartment to add to your [state\n configuration](https://codemirror.net/6/docs/ref/#state.EditorStateConfig.extensions).\n */\n of(ext) { return new CompartmentInstance(this, ext); }\n /**\n Create an [effect](https://codemirror.net/6/docs/ref/#state.TransactionSpec.effects) that\n reconfigures this compartment.\n */\n reconfigure(content) {\n return Compartment.reconfigure.of({ compartment: this, extension: content });\n }\n /**\n Get the current content of the compartment in the state, or\n `undefined` if it isn't present.\n */\n get(state) {\n return state.config.compartments.get(this);\n }\n}\nclass CompartmentInstance {\n constructor(compartment, inner) {\n this.compartment = compartment;\n this.inner = inner;\n }\n}\nclass Configuration {\n constructor(base, compartments, dynamicSlots, address, staticValues, facets) {\n this.base = base;\n this.compartments = compartments;\n this.dynamicSlots = dynamicSlots;\n this.address = address;\n this.staticValues = staticValues;\n this.facets = facets;\n this.statusTemplate = [];\n while (this.statusTemplate.length < dynamicSlots.length)\n this.statusTemplate.push(0 /* SlotStatus.Unresolved */);\n }\n staticFacet(facet) {\n let addr = this.address[facet.id];\n return addr == null ? facet.default : this.staticValues[addr >> 1];\n }\n static resolve(base, compartments, oldState) {\n let fields = [];\n let facets = Object.create(null);\n let newCompartments = new Map();\n for (let ext of flatten(base, compartments, newCompartments)) {\n if (ext instanceof StateField)\n fields.push(ext);\n else\n (facets[ext.facet.id] || (facets[ext.facet.id] = [])).push(ext);\n }\n let address = Object.create(null);\n let staticValues = [];\n let dynamicSlots = [];\n for (let field of fields) {\n address[field.id] = dynamicSlots.length << 1;\n dynamicSlots.push(a => field.slot(a));\n }\n let oldFacets = oldState === null || oldState === void 0 ? void 0 : oldState.config.facets;\n for (let id in facets) {\n let providers = facets[id], facet = providers[0].facet;\n let oldProviders = oldFacets && oldFacets[id] || [];\n if (providers.every(p => p.type == 0 /* Provider.Static */)) {\n address[facet.id] = (staticValues.length << 1) | 1;\n if (sameArray(oldProviders, providers)) {\n staticValues.push(oldState.facet(facet));\n }\n else {\n let value = facet.combine(providers.map(p => p.value));\n staticValues.push(oldState && facet.compare(value, oldState.facet(facet)) ? oldState.facet(facet) : value);\n }\n }\n else {\n for (let p of providers) {\n if (p.type == 0 /* Provider.Static */) {\n address[p.id] = (staticValues.length << 1) | 1;\n staticValues.push(p.value);\n }\n else {\n address[p.id] = dynamicSlots.length << 1;\n dynamicSlots.push(a => p.dynamicSlot(a));\n }\n }\n address[facet.id] = dynamicSlots.length << 1;\n dynamicSlots.push(a => dynamicFacetSlot(a, facet, providers));\n }\n }\n let dynamic = dynamicSlots.map(f => f(address));\n return new Configuration(base, newCompartments, dynamic, address, staticValues, facets);\n }\n}\nfunction flatten(extension, compartments, newCompartments) {\n let result = [[], [], [], [], []];\n let seen = new Map();\n function inner(ext, prec) {\n let known = seen.get(ext);\n if (known != null) {\n if (known <= prec)\n return;\n let found = result[known].indexOf(ext);\n if (found > -1)\n result[known].splice(found, 1);\n if (ext instanceof CompartmentInstance)\n newCompartments.delete(ext.compartment);\n }\n seen.set(ext, prec);\n if (Array.isArray(ext)) {\n for (let e of ext)\n inner(e, prec);\n }\n else if (ext instanceof CompartmentInstance) {\n if (newCompartments.has(ext.compartment))\n throw new RangeError(`Duplicate use of compartment in extensions`);\n let content = compartments.get(ext.compartment) || ext.inner;\n newCompartments.set(ext.compartment, content);\n inner(content, prec);\n }\n else if (ext instanceof PrecExtension) {\n inner(ext.inner, ext.prec);\n }\n else if (ext instanceof StateField) {\n result[prec].push(ext);\n if (ext.provides)\n inner(ext.provides, prec);\n }\n else if (ext instanceof FacetProvider) {\n result[prec].push(ext);\n if (ext.facet.extensions)\n inner(ext.facet.extensions, Prec_.default);\n }\n else {\n let content = ext.extension;\n if (!content)\n throw new Error(`Unrecognized extension value in extension set (${ext}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);\n inner(content, prec);\n }\n }\n inner(extension, Prec_.default);\n return result.reduce((a, b) => a.concat(b));\n}\nfunction ensureAddr(state, addr) {\n if (addr & 1)\n return 2 /* SlotStatus.Computed */;\n let idx = addr >> 1;\n let status = state.status[idx];\n if (status == 4 /* SlotStatus.Computing */)\n throw new Error(\"Cyclic dependency between fields and/or facets\");\n if (status & 2 /* SlotStatus.Computed */)\n return status;\n state.status[idx] = 4 /* SlotStatus.Computing */;\n let changed = state.computeSlot(state, state.config.dynamicSlots[idx]);\n return state.status[idx] = 2 /* SlotStatus.Computed */ | changed;\n}\nfunction getAddr(state, addr) {\n return addr & 1 ? state.config.staticValues[addr >> 1] : state.values[addr >> 1];\n}\n\nconst languageData = /*@__PURE__*/Facet.define();\nconst allowMultipleSelections = /*@__PURE__*/Facet.define({\n combine: values => values.some(v => v),\n static: true\n});\nconst lineSeparator = /*@__PURE__*/Facet.define({\n combine: values => values.length ? values[0] : undefined,\n static: true\n});\nconst changeFilter = /*@__PURE__*/Facet.define();\nconst transactionFilter = /*@__PURE__*/Facet.define();\nconst transactionExtender = /*@__PURE__*/Facet.define();\nconst readOnly = /*@__PURE__*/Facet.define({\n combine: values => values.length ? values[0] : false\n});\n\n/**\nAnnotations are tagged values that are used to add metadata to\ntransactions in an extensible way. They should be used to model\nthings that effect the entire transaction (such as its [time\nstamp](https://codemirror.net/6/docs/ref/#state.Transaction^time) or information about its\n[origin](https://codemirror.net/6/docs/ref/#state.Transaction^userEvent)). For effects that happen\n_alongside_ the other changes made by the transaction, [state\neffects](https://codemirror.net/6/docs/ref/#state.StateEffect) are more appropriate.\n*/\nclass Annotation {\n /**\n @internal\n */\n constructor(\n /**\n The annotation type.\n */\n type, \n /**\n The value of this annotation.\n */\n value) {\n this.type = type;\n this.value = value;\n }\n /**\n Define a new type of annotation.\n */\n static define() { return new AnnotationType(); }\n}\n/**\nMarker that identifies a type of [annotation](https://codemirror.net/6/docs/ref/#state.Annotation).\n*/\nclass AnnotationType {\n /**\n Create an instance of this annotation.\n */\n of(value) { return new Annotation(this, value); }\n}\n/**\nRepresentation of a type of state effect. Defined with\n[`StateEffect.define`](https://codemirror.net/6/docs/ref/#state.StateEffect^define).\n*/\nclass StateEffectType {\n /**\n @internal\n */\n constructor(\n // The `any` types in these function types are there to work\n // around TypeScript issue #37631, where the type guard on\n // `StateEffect.is` mysteriously stops working when these properly\n // have type `Value`.\n /**\n @internal\n */\n map) {\n this.map = map;\n }\n /**\n Create a [state effect](https://codemirror.net/6/docs/ref/#state.StateEffect) instance of this\n type.\n */\n of(value) { return new StateEffect(this, value); }\n}\n/**\nState effects can be used to represent additional effects\nassociated with a [transaction](https://codemirror.net/6/docs/ref/#state.Transaction.effects). They\nare often useful to model changes to custom [state\nfields](https://codemirror.net/6/docs/ref/#state.StateField), when those changes aren't implicit in\ndocument or selection changes.\n*/\nclass StateEffect {\n /**\n @internal\n */\n constructor(\n /**\n @internal\n */\n type, \n /**\n The value of this effect.\n */\n value) {\n this.type = type;\n this.value = value;\n }\n /**\n Map this effect through a position mapping. Will return\n `undefined` when that ends up deleting the effect.\n */\n map(mapping) {\n let mapped = this.type.map(this.value, mapping);\n return mapped === undefined ? undefined : mapped == this.value ? this : new StateEffect(this.type, mapped);\n }\n /**\n Tells you whether this effect object is of a given\n [type](https://codemirror.net/6/docs/ref/#state.StateEffectType).\n */\n is(type) { return this.type == type; }\n /**\n Define a new effect type. The type parameter indicates the type\n of values that his effect holds. It should be a type that\n doesn't include `undefined`, since that is used in\n [mapping](https://codemirror.net/6/docs/ref/#state.StateEffect.map) to indicate that an effect is\n removed.\n */\n static define(spec = {}) {\n return new StateEffectType(spec.map || (v => v));\n }\n /**\n Map an array of effects through a change set.\n */\n static mapEffects(effects, mapping) {\n if (!effects.length)\n return effects;\n let result = [];\n for (let effect of effects) {\n let mapped = effect.map(mapping);\n if (mapped)\n result.push(mapped);\n }\n return result;\n }\n}\n/**\nThis effect can be used to reconfigure the root extensions of\nthe editor. Doing this will discard any extensions\n[appended](https://codemirror.net/6/docs/ref/#state.StateEffect^appendConfig), but does not reset\nthe content of [reconfigured](https://codemirror.net/6/docs/ref/#state.Compartment.reconfigure)\ncompartments.\n*/\nStateEffect.reconfigure = /*@__PURE__*/StateEffect.define();\n/**\nAppend extensions to the top-level configuration of the editor.\n*/\nStateEffect.appendConfig = /*@__PURE__*/StateEffect.define();\n/**\nChanges to the editor state are grouped into transactions.\nTypically, a user action creates a single transaction, which may\ncontain any number of document changes, may change the selection,\nor have other effects. Create a transaction by calling\n[`EditorState.update`](https://codemirror.net/6/docs/ref/#state.EditorState.update), or immediately\ndispatch one by calling\n[`EditorView.dispatch`](https://codemirror.net/6/docs/ref/#view.EditorView.dispatch).\n*/\nclass Transaction {\n constructor(\n /**\n The state from which the transaction starts.\n */\n startState, \n /**\n The document changes made by this transaction.\n */\n changes, \n /**\n The selection set by this transaction, or undefined if it\n doesn't explicitly set a selection.\n */\n selection, \n /**\n The effects added to the transaction.\n */\n effects, \n /**\n @internal\n */\n annotations, \n /**\n Whether the selection should be scrolled into view after this\n transaction is dispatched.\n */\n scrollIntoView) {\n this.startState = startState;\n this.changes = changes;\n this.selection = selection;\n this.effects = effects;\n this.annotations = annotations;\n this.scrollIntoView = scrollIntoView;\n /**\n @internal\n */\n this._doc = null;\n /**\n @internal\n */\n this._state = null;\n if (selection)\n checkSelection(selection, changes.newLength);\n if (!annotations.some((a) => a.type == Transaction.time))\n this.annotations = annotations.concat(Transaction.time.of(Date.now()));\n }\n /**\n @internal\n */\n static create(startState, changes, selection, effects, annotations, scrollIntoView) {\n return new Transaction(startState, changes, selection, effects, annotations, scrollIntoView);\n }\n /**\n The new document produced by the transaction. Contrary to\n [`.state`](https://codemirror.net/6/docs/ref/#state.Transaction.state)`.doc`, accessing this won't\n force the entire new state to be computed right away, so it is\n recommended that [transaction\n filters](https://codemirror.net/6/docs/ref/#state.EditorState^transactionFilter) use this getter\n when they need to look at the new document.\n */\n get newDoc() {\n return this._doc || (this._doc = this.changes.apply(this.startState.doc));\n }\n /**\n The new selection produced by the transaction. If\n [`this.selection`](https://codemirror.net/6/docs/ref/#state.Transaction.selection) is undefined,\n this will [map](https://codemirror.net/6/docs/ref/#state.EditorSelection.map) the start state's\n current selection through the changes made by the transaction.\n */\n get newSelection() {\n return this.selection || this.startState.selection.map(this.changes);\n }\n /**\n The new state created by the transaction. Computed on demand\n (but retained for subsequent access), so it is recommended not to\n access it in [transaction\n filters](https://codemirror.net/6/docs/ref/#state.EditorState^transactionFilter) when possible.\n */\n get state() {\n if (!this._state)\n this.startState.applyTransaction(this);\n return this._state;\n }\n /**\n Get the value of the given annotation type, if any.\n */\n annotation(type) {\n for (let ann of this.annotations)\n if (ann.type == type)\n return ann.value;\n return undefined;\n }\n /**\n Indicates whether the transaction changed the document.\n */\n get docChanged() { return !this.changes.empty; }\n /**\n Indicates whether this transaction reconfigures the state\n (through a [configuration compartment](https://codemirror.net/6/docs/ref/#state.Compartment) or\n with a top-level configuration\n [effect](https://codemirror.net/6/docs/ref/#state.StateEffect^reconfigure).\n */\n get reconfigured() { return this.startState.config != this.state.config; }\n /**\n Returns true if the transaction has a [user\n event](https://codemirror.net/6/docs/ref/#state.Transaction^userEvent) annotation that is equal to\n or more specific than `event`. For example, if the transaction\n has `\"select.pointer\"` as user event, `\"select\"` and\n `\"select.pointer\"` will match it.\n */\n isUserEvent(event) {\n let e = this.annotation(Transaction.userEvent);\n return !!(e && (e == event || e.length > event.length && e.slice(0, event.length) == event && e[event.length] == \".\"));\n }\n}\n/**\nAnnotation used to store transaction timestamps. Automatically\nadded to every transaction, holding `Date.now()`.\n*/\nTransaction.time = /*@__PURE__*/Annotation.define();\n/**\nAnnotation used to associate a transaction with a user interface\nevent. Holds a string identifying the event, using a\ndot-separated format to support attaching more specific\ninformation. The events used by the core libraries are:\n\n - `\"input\"` when content is entered\n - `\"input.type\"` for typed input\n - `\"input.type.compose\"` for composition\n - `\"input.paste\"` for pasted input\n - `\"input.drop\"` when adding content with drag-and-drop\n - `\"input.complete\"` when autocompleting\n - `\"delete\"` when the user deletes content\n - `\"delete.selection\"` when deleting the selection\n - `\"delete.forward\"` when deleting forward from the selection\n - `\"delete.backward\"` when deleting backward from the selection\n - `\"delete.cut\"` when cutting to the clipboard\n - `\"move\"` when content is moved\n - `\"move.drop\"` when content is moved within the editor through drag-and-drop\n - `\"select\"` when explicitly changing the selection\n - `\"select.pointer\"` when selecting with a mouse or other pointing device\n - `\"undo\"` and `\"redo\"` for history actions\n\nUse [`isUserEvent`](https://codemirror.net/6/docs/ref/#state.Transaction.isUserEvent) to check\nwhether the annotation matches a given event.\n*/\nTransaction.userEvent = /*@__PURE__*/Annotation.define();\n/**\nAnnotation indicating whether a transaction should be added to\nthe undo history or not.\n*/\nTransaction.addToHistory = /*@__PURE__*/Annotation.define();\n/**\nAnnotation indicating (when present and true) that a transaction\nrepresents a change made by some other actor, not the user. This\nis used, for example, to tag other people's changes in\ncollaborative editing.\n*/\nTransaction.remote = /*@__PURE__*/Annotation.define();\nfunction joinRanges(a, b) {\n let result = [];\n for (let iA = 0, iB = 0;;) {\n let from, to;\n if (iA < a.length && (iB == b.length || b[iB] >= a[iA])) {\n from = a[iA++];\n to = a[iA++];\n }\n else if (iB < b.length) {\n from = b[iB++];\n to = b[iB++];\n }\n else\n return result;\n if (!result.length || result[result.length - 1] < from)\n result.push(from, to);\n else if (result[result.length - 1] < to)\n result[result.length - 1] = to;\n }\n}\nfunction mergeTransaction(a, b, sequential) {\n var _a;\n let mapForA, mapForB, changes;\n if (sequential) {\n mapForA = b.changes;\n mapForB = ChangeSet.empty(b.changes.length);\n changes = a.changes.compose(b.changes);\n }\n else {\n mapForA = b.changes.map(a.changes);\n mapForB = a.changes.mapDesc(b.changes, true);\n changes = a.changes.compose(mapForA);\n }\n return {\n changes,\n selection: b.selection ? b.selection.map(mapForB) : (_a = a.selection) === null || _a === void 0 ? void 0 : _a.map(mapForA),\n effects: StateEffect.mapEffects(a.effects, mapForA).concat(StateEffect.mapEffects(b.effects, mapForB)),\n annotations: a.annotations.length ? a.annotations.concat(b.annotations) : b.annotations,\n scrollIntoView: a.scrollIntoView || b.scrollIntoView\n };\n}\nfunction resolveTransactionInner(state, spec, docSize) {\n let sel = spec.selection, annotations = asArray(spec.annotations);\n if (spec.userEvent)\n annotations = annotations.concat(Transaction.userEvent.of(spec.userEvent));\n return {\n changes: spec.changes instanceof ChangeSet ? spec.changes\n : ChangeSet.of(spec.changes || [], docSize, state.facet(lineSeparator)),\n selection: sel && (sel instanceof EditorSelection ? sel : EditorSelection.single(sel.anchor, sel.head)),\n effects: asArray(spec.effects),\n annotations,\n scrollIntoView: !!spec.scrollIntoView\n };\n}\nfunction resolveTransaction(state, specs, filter) {\n let s = resolveTransactionInner(state, specs.length ? specs[0] : {}, state.doc.length);\n if (specs.length && specs[0].filter === false)\n filter = false;\n for (let i = 1; i < specs.length; i++) {\n if (specs[i].filter === false)\n filter = false;\n let seq = !!specs[i].sequential;\n s = mergeTransaction(s, resolveTransactionInner(state, specs[i], seq ? s.changes.newLength : state.doc.length), seq);\n }\n let tr = Transaction.create(state, s.changes, s.selection, s.effects, s.annotations, s.scrollIntoView);\n return extendTransaction(filter ? filterTransaction(tr) : tr);\n}\n// Finish a transaction by applying filters if necessary.\nfunction filterTransaction(tr) {\n let state = tr.startState;\n // Change filters\n let result = true;\n for (let filter of state.facet(changeFilter)) {\n let value = filter(tr);\n if (value === false) {\n result = false;\n break;\n }\n if (Array.isArray(value))\n result = result === true ? value : joinRanges(result, value);\n }\n if (result !== true) {\n let changes, back;\n if (result === false) {\n back = tr.changes.invertedDesc;\n changes = ChangeSet.empty(state.doc.length);\n }\n else {\n let filtered = tr.changes.filter(result);\n changes = filtered.changes;\n back = filtered.filtered.mapDesc(filtered.changes).invertedDesc;\n }\n tr = Transaction.create(state, changes, tr.selection && tr.selection.map(back), StateEffect.mapEffects(tr.effects, back), tr.annotations, tr.scrollIntoView);\n }\n // Transaction filters\n let filters = state.facet(transactionFilter);\n for (let i = filters.length - 1; i >= 0; i--) {\n let filtered = filters[i](tr);\n if (filtered instanceof Transaction)\n tr = filtered;\n else if (Array.isArray(filtered) && filtered.length == 1 && filtered[0] instanceof Transaction)\n tr = filtered[0];\n else\n tr = resolveTransaction(state, asArray(filtered), false);\n }\n return tr;\n}\nfunction extendTransaction(tr) {\n let state = tr.startState, extenders = state.facet(transactionExtender), spec = tr;\n for (let i = extenders.length - 1; i >= 0; i--) {\n let extension = extenders[i](tr);\n if (extension && Object.keys(extension).length)\n spec = mergeTransaction(spec, resolveTransactionInner(state, extension, tr.changes.newLength), true);\n }\n return spec == tr ? tr : Transaction.create(state, tr.changes, tr.selection, spec.effects, spec.annotations, spec.scrollIntoView);\n}\nconst none = [];\nfunction asArray(value) {\n return value == null ? none : Array.isArray(value) ? value : [value];\n}\n\n/**\nThe categories produced by a [character\ncategorizer](https://codemirror.net/6/docs/ref/#state.EditorState.charCategorizer). These are used\ndo things like selecting by word.\n*/\nvar CharCategory = /*@__PURE__*/(function (CharCategory) {\n /**\n Word characters.\n */\n CharCategory[CharCategory[\"Word\"] = 0] = \"Word\";\n /**\n Whitespace.\n */\n CharCategory[CharCategory[\"Space\"] = 1] = \"Space\";\n /**\n Anything else.\n */\n CharCategory[CharCategory[\"Other\"] = 2] = \"Other\";\nreturn CharCategory})(CharCategory || (CharCategory = {}));\nconst nonASCIISingleCaseWordChar = /[\\u00df\\u0587\\u0590-\\u05f4\\u0600-\\u06ff\\u3040-\\u309f\\u30a0-\\u30ff\\u3400-\\u4db5\\u4e00-\\u9fcc\\uac00-\\ud7af]/;\nlet wordChar;\ntry {\n wordChar = /*@__PURE__*/new RegExp(\"[\\\\p{Alphabetic}\\\\p{Number}_]\", \"u\");\n}\ncatch (_) { }\nfunction hasWordChar(str) {\n if (wordChar)\n return wordChar.test(str);\n for (let i = 0; i < str.length; i++) {\n let ch = str[i];\n if (/\\w/.test(ch) || ch > \"\\x80\" && (ch.toUpperCase() != ch.toLowerCase() || nonASCIISingleCaseWordChar.test(ch)))\n return true;\n }\n return false;\n}\nfunction makeCategorizer(wordChars) {\n return (char) => {\n if (!/\\S/.test(char))\n return CharCategory.Space;\n if (hasWordChar(char))\n return CharCategory.Word;\n for (let i = 0; i < wordChars.length; i++)\n if (char.indexOf(wordChars[i]) > -1)\n return CharCategory.Word;\n return CharCategory.Other;\n };\n}\n\n/**\nThe editor state class is a persistent (immutable) data structure.\nTo update a state, you [create](https://codemirror.net/6/docs/ref/#state.EditorState.update) a\n[transaction](https://codemirror.net/6/docs/ref/#state.Transaction), which produces a _new_ state\ninstance, without modifying the original object.\n\nAs such, _never_ mutate properties of a state directly. That'll\njust break things.\n*/\nclass EditorState {\n constructor(\n /**\n @internal\n */\n config, \n /**\n The current document.\n */\n doc, \n /**\n The current selection.\n */\n selection, \n /**\n @internal\n */\n values, computeSlot, tr) {\n this.config = config;\n this.doc = doc;\n this.selection = selection;\n this.values = values;\n this.status = config.statusTemplate.slice();\n this.computeSlot = computeSlot;\n // Fill in the computed state immediately, so that further queries\n // for it made during the update return this state\n if (tr)\n tr._state = this;\n for (let i = 0; i < this.config.dynamicSlots.length; i++)\n ensureAddr(this, i << 1);\n this.computeSlot = null;\n }\n field(field, require = true) {\n let addr = this.config.address[field.id];\n if (addr == null) {\n if (require)\n throw new RangeError(\"Field is not present in this state\");\n return undefined;\n }\n ensureAddr(this, addr);\n return getAddr(this, addr);\n }\n /**\n Create a [transaction](https://codemirror.net/6/docs/ref/#state.Transaction) that updates this\n state. Any number of [transaction specs](https://codemirror.net/6/docs/ref/#state.TransactionSpec)\n can be passed. Unless\n [`sequential`](https://codemirror.net/6/docs/ref/#state.TransactionSpec.sequential) is set, the\n [changes](https://codemirror.net/6/docs/ref/#state.TransactionSpec.changes) (if any) of each spec\n are assumed to start in the _current_ document (not the document\n produced by previous specs), and its\n [selection](https://codemirror.net/6/docs/ref/#state.TransactionSpec.selection) and\n [effects](https://codemirror.net/6/docs/ref/#state.TransactionSpec.effects) are assumed to refer\n to the document created by its _own_ changes. The resulting\n transaction contains the combined effect of all the different\n specs. For [selection](https://codemirror.net/6/docs/ref/#state.TransactionSpec.selection), later\n specs take precedence over earlier ones.\n */\n update(...specs) {\n return resolveTransaction(this, specs, true);\n }\n /**\n @internal\n */\n applyTransaction(tr) {\n let conf = this.config, { base, compartments } = conf;\n for (let effect of tr.effects) {\n if (effect.is(Compartment.reconfigure)) {\n if (conf) {\n compartments = new Map;\n conf.compartments.forEach((val, key) => compartments.set(key, val));\n conf = null;\n }\n compartments.set(effect.value.compartment, effect.value.extension);\n }\n else if (effect.is(StateEffect.reconfigure)) {\n conf = null;\n base = effect.value;\n }\n else if (effect.is(StateEffect.appendConfig)) {\n conf = null;\n base = asArray(base).concat(effect.value);\n }\n }\n let startValues;\n if (!conf) {\n conf = Configuration.resolve(base, compartments, this);\n let intermediateState = new EditorState(conf, this.doc, this.selection, conf.dynamicSlots.map(() => null), (state, slot) => slot.reconfigure(state, this), null);\n startValues = intermediateState.values;\n }\n else {\n startValues = tr.startState.values.slice();\n }\n let selection = tr.startState.facet(allowMultipleSelections) ? tr.newSelection : tr.newSelection.asSingle();\n new EditorState(conf, tr.newDoc, selection, startValues, (state, slot) => slot.update(state, tr), tr);\n }\n /**\n Create a [transaction spec](https://codemirror.net/6/docs/ref/#state.TransactionSpec) that\n replaces every selection range with the given content.\n */\n replaceSelection(text) {\n if (typeof text == \"string\")\n text = this.toText(text);\n return this.changeByRange(range => ({ changes: { from: range.from, to: range.to, insert: text },\n range: EditorSelection.cursor(range.from + text.length) }));\n }\n /**\n Create a set of changes and a new selection by running the given\n function for each range in the active selection. The function\n can return an optional set of changes (in the coordinate space\n of the start document), plus an updated range (in the coordinate\n space of the document produced by the call's own changes). This\n method will merge all the changes and ranges into a single\n changeset and selection, and return it as a [transaction\n spec](https://codemirror.net/6/docs/ref/#state.TransactionSpec), which can be passed to\n [`update`](https://codemirror.net/6/docs/ref/#state.EditorState.update).\n */\n changeByRange(f) {\n let sel = this.selection;\n let result1 = f(sel.ranges[0]);\n let changes = this.changes(result1.changes), ranges = [result1.range];\n let effects = asArray(result1.effects);\n for (let i = 1; i < sel.ranges.length; i++) {\n let result = f(sel.ranges[i]);\n let newChanges = this.changes(result.changes), newMapped = newChanges.map(changes);\n for (let j = 0; j < i; j++)\n ranges[j] = ranges[j].map(newMapped);\n let mapBy = changes.mapDesc(newChanges, true);\n ranges.push(result.range.map(mapBy));\n changes = changes.compose(newMapped);\n effects = StateEffect.mapEffects(effects, newMapped).concat(StateEffect.mapEffects(asArray(result.effects), mapBy));\n }\n return {\n changes,\n selection: EditorSelection.create(ranges, sel.mainIndex),\n effects\n };\n }\n /**\n Create a [change set](https://codemirror.net/6/docs/ref/#state.ChangeSet) from the given change\n description, taking the state's document length and line\n separator into account.\n */\n changes(spec = []) {\n if (spec instanceof ChangeSet)\n return spec;\n return ChangeSet.of(spec, this.doc.length, this.facet(EditorState.lineSeparator));\n }\n /**\n Using the state's [line\n separator](https://codemirror.net/6/docs/ref/#state.EditorState^lineSeparator), create a\n [`Text`](https://codemirror.net/6/docs/ref/#state.Text) instance from the given string.\n */\n toText(string) {\n return Text.of(string.split(this.facet(EditorState.lineSeparator) || DefaultSplit));\n }\n /**\n Return the given range of the document as a string.\n */\n sliceDoc(from = 0, to = this.doc.length) {\n return this.doc.sliceString(from, to, this.lineBreak);\n }\n /**\n Get the value of a state [facet](https://codemirror.net/6/docs/ref/#state.Facet).\n */\n facet(facet) {\n let addr = this.config.address[facet.id];\n if (addr == null)\n return facet.default;\n ensureAddr(this, addr);\n return getAddr(this, addr);\n }\n /**\n Convert this state to a JSON-serializable object. When custom\n fields should be serialized, you can pass them in as an object\n mapping property names (in the resulting object, which should\n not use `doc` or `selection`) to fields.\n */\n toJSON(fields) {\n let result = {\n doc: this.sliceDoc(),\n selection: this.selection.toJSON()\n };\n if (fields)\n for (let prop in fields) {\n let value = fields[prop];\n if (value instanceof StateField && this.config.address[value.id] != null)\n result[prop] = value.spec.toJSON(this.field(fields[prop]), this);\n }\n return result;\n }\n /**\n Deserialize a state from its JSON representation. When custom\n fields should be deserialized, pass the same object you passed\n to [`toJSON`](https://codemirror.net/6/docs/ref/#state.EditorState.toJSON) when serializing as\n third argument.\n */\n static fromJSON(json, config = {}, fields) {\n if (!json || typeof json.doc != \"string\")\n throw new RangeError(\"Invalid JSON representation for EditorState\");\n let fieldInit = [];\n if (fields)\n for (let prop in fields) {\n if (Object.prototype.hasOwnProperty.call(json, prop)) {\n let field = fields[prop], value = json[prop];\n fieldInit.push(field.init(state => field.spec.fromJSON(value, state)));\n }\n }\n return EditorState.create({\n doc: json.doc,\n selection: EditorSelection.fromJSON(json.selection),\n extensions: config.extensions ? fieldInit.concat([config.extensions]) : fieldInit\n });\n }\n /**\n Create a new state. You'll usually only need this when\n initializing an editor—updated states are created by applying\n transactions.\n */\n static create(config = {}) {\n let configuration = Configuration.resolve(config.extensions || [], new Map);\n let doc = config.doc instanceof Text ? config.doc\n : Text.of((config.doc || \"\").split(configuration.staticFacet(EditorState.lineSeparator) || DefaultSplit));\n let selection = !config.selection ? EditorSelection.single(0)\n : config.selection instanceof EditorSelection ? config.selection\n : EditorSelection.single(config.selection.anchor, config.selection.head);\n checkSelection(selection, doc.length);\n if (!configuration.staticFacet(allowMultipleSelections))\n selection = selection.asSingle();\n return new EditorState(configuration, doc, selection, configuration.dynamicSlots.map(() => null), (state, slot) => slot.create(state), null);\n }\n /**\n The size (in columns) of a tab in the document, determined by\n the [`tabSize`](https://codemirror.net/6/docs/ref/#state.EditorState^tabSize) facet.\n */\n get tabSize() { return this.facet(EditorState.tabSize); }\n /**\n Get the proper [line-break](https://codemirror.net/6/docs/ref/#state.EditorState^lineSeparator)\n string for this state.\n */\n get lineBreak() { return this.facet(EditorState.lineSeparator) || \"\\n\"; }\n /**\n Returns true when the editor is\n [configured](https://codemirror.net/6/docs/ref/#state.EditorState^readOnly) to be read-only.\n */\n get readOnly() { return this.facet(readOnly); }\n /**\n Look up a translation for the given phrase (via the\n [`phrases`](https://codemirror.net/6/docs/ref/#state.EditorState^phrases) facet), or return the\n original string if no translation is found.\n \n If additional arguments are passed, they will be inserted in\n place of markers like `$1` (for the first value) and `$2`, etc.\n A single `$` is equivalent to `$1`, and `$$` will produce a\n literal dollar sign.\n */\n phrase(phrase, ...insert) {\n for (let map of this.facet(EditorState.phrases))\n if (Object.prototype.hasOwnProperty.call(map, phrase)) {\n phrase = map[phrase];\n break;\n }\n if (insert.length)\n phrase = phrase.replace(/\\$(\\$|\\d*)/g, (m, i) => {\n if (i == \"$\")\n return \"$\";\n let n = +(i || 1);\n return !n || n > insert.length ? m : insert[n - 1];\n });\n return phrase;\n }\n /**\n Find the values for a given language data field, provided by the\n the [`languageData`](https://codemirror.net/6/docs/ref/#state.EditorState^languageData) facet.\n \n Examples of language data fields are...\n \n - [`\"commentTokens\"`](https://codemirror.net/6/docs/ref/#commands.CommentTokens) for specifying\n comment syntax.\n - [`\"autocomplete\"`](https://codemirror.net/6/docs/ref/#autocomplete.autocompletion^config.override)\n for providing language-specific completion sources.\n - [`\"wordChars\"`](https://codemirror.net/6/docs/ref/#state.EditorState.charCategorizer) for adding\n characters that should be considered part of words in this\n language.\n - [`\"closeBrackets\"`](https://codemirror.net/6/docs/ref/#autocomplete.CloseBracketConfig) controls\n bracket closing behavior.\n */\n languageDataAt(name, pos, side = -1) {\n let values = [];\n for (let provider of this.facet(languageData)) {\n for (let result of provider(this, pos, side)) {\n if (Object.prototype.hasOwnProperty.call(result, name))\n values.push(result[name]);\n }\n }\n return values;\n }\n /**\n Return a function that can categorize strings (expected to\n represent a single [grapheme cluster](https://codemirror.net/6/docs/ref/#state.findClusterBreak))\n into one of:\n \n - Word (contains an alphanumeric character or a character\n explicitly listed in the local language's `\"wordChars\"`\n language data, which should be a string)\n - Space (contains only whitespace)\n - Other (anything else)\n */\n charCategorizer(at) {\n return makeCategorizer(this.languageDataAt(\"wordChars\", at).join(\"\"));\n }\n /**\n Find the word at the given position, meaning the range\n containing all [word](https://codemirror.net/6/docs/ref/#state.CharCategory.Word) characters\n around it. If no word characters are adjacent to the position,\n this returns null.\n */\n wordAt(pos) {\n let { text, from, length } = this.doc.lineAt(pos);\n let cat = this.charCategorizer(pos);\n let start = pos - from, end = pos - from;\n while (start > 0) {\n let prev = findClusterBreak(text, start, false);\n if (cat(text.slice(prev, start)) != CharCategory.Word)\n break;\n start = prev;\n }\n while (end < length) {\n let next = findClusterBreak(text, end);\n if (cat(text.slice(end, next)) != CharCategory.Word)\n break;\n end = next;\n }\n return start == end ? null : EditorSelection.range(start + from, end + from);\n }\n}\n/**\nA facet that, when enabled, causes the editor to allow multiple\nranges to be selected. Be careful though, because by default the\neditor relies on the native DOM selection, which cannot handle\nmultiple selections. An extension like\n[`drawSelection`](https://codemirror.net/6/docs/ref/#view.drawSelection) can be used to make\nsecondary selections visible to the user.\n*/\nEditorState.allowMultipleSelections = allowMultipleSelections;\n/**\nConfigures the tab size to use in this state. The first\n(highest-precedence) value of the facet is used. If no value is\ngiven, this defaults to 4.\n*/\nEditorState.tabSize = /*@__PURE__*/Facet.define({\n combine: values => values.length ? values[0] : 4\n});\n/**\nThe line separator to use. By default, any of `\"\\n\"`, `\"\\r\\n\"`\nand `\"\\r\"` is treated as a separator when splitting lines, and\nlines are joined with `\"\\n\"`.\n\nWhen you configure a value here, only that precise separator\nwill be used, allowing you to round-trip documents through the\neditor without normalizing line separators.\n*/\nEditorState.lineSeparator = lineSeparator;\n/**\nThis facet controls the value of the\n[`readOnly`](https://codemirror.net/6/docs/ref/#state.EditorState.readOnly) getter, which is\nconsulted by commands and extensions that implement editing\nfunctionality to determine whether they should apply. It\ndefaults to false, but when its highest-precedence value is\n`true`, such functionality disables itself.\n\nNot to be confused with\n[`EditorView.editable`](https://codemirror.net/6/docs/ref/#view.EditorView^editable), which\ncontrols whether the editor's DOM is set to be editable (and\nthus focusable).\n*/\nEditorState.readOnly = readOnly;\n/**\nRegisters translation phrases. The\n[`phrase`](https://codemirror.net/6/docs/ref/#state.EditorState.phrase) method will look through\nall objects registered with this facet to find translations for\nits argument.\n*/\nEditorState.phrases = /*@__PURE__*/Facet.define({\n compare(a, b) {\n let kA = Object.keys(a), kB = Object.keys(b);\n return kA.length == kB.length && kA.every(k => a[k] == b[k]);\n }\n});\n/**\nA facet used to register [language\ndata](https://codemirror.net/6/docs/ref/#state.EditorState.languageDataAt) providers.\n*/\nEditorState.languageData = languageData;\n/**\nFacet used to register change filters, which are called for each\ntransaction (unless explicitly\n[disabled](https://codemirror.net/6/docs/ref/#state.TransactionSpec.filter)), and can suppress\npart of the transaction's changes.\n\nSuch a function can return `true` to indicate that it doesn't\nwant to do anything, `false` to completely stop the changes in\nthe transaction, or a set of ranges in which changes should be\nsuppressed. Such ranges are represented as an array of numbers,\nwith each pair of two numbers indicating the start and end of a\nrange. So for example `[10, 20, 100, 110]` suppresses changes\nbetween 10 and 20, and between 100 and 110.\n*/\nEditorState.changeFilter = changeFilter;\n/**\nFacet used to register a hook that gets a chance to update or\nreplace transaction specs before they are applied. This will\nonly be applied for transactions that don't have\n[`filter`](https://codemirror.net/6/docs/ref/#state.TransactionSpec.filter) set to `false`. You\ncan either return a single transaction spec (possibly the input\ntransaction), or an array of specs (which will be combined in\nthe same way as the arguments to\n[`EditorState.update`](https://codemirror.net/6/docs/ref/#state.EditorState.update)).\n\nWhen possible, it is recommended to avoid accessing\n[`Transaction.state`](https://codemirror.net/6/docs/ref/#state.Transaction.state) in a filter,\nsince it will force creation of a state that will then be\ndiscarded again, if the transaction is actually filtered.\n\n(This functionality should be used with care. Indiscriminately\nmodifying transaction is likely to break something or degrade\nthe user experience.)\n*/\nEditorState.transactionFilter = transactionFilter;\n/**\nThis is a more limited form of\n[`transactionFilter`](https://codemirror.net/6/docs/ref/#state.EditorState^transactionFilter),\nwhich can only add\n[annotations](https://codemirror.net/6/docs/ref/#state.TransactionSpec.annotations) and\n[effects](https://codemirror.net/6/docs/ref/#state.TransactionSpec.effects). _But_, this type\nof filter runs even if the transaction has disabled regular\n[filtering](https://codemirror.net/6/docs/ref/#state.TransactionSpec.filter), making it suitable\nfor effects that don't need to touch the changes or selection,\nbut do want to process every transaction.\n\nExtenders run _after_ filters, when both are present.\n*/\nEditorState.transactionExtender = transactionExtender;\nCompartment.reconfigure = /*@__PURE__*/StateEffect.define();\n\n/**\nUtility function for combining behaviors to fill in a config\nobject from an array of provided configs. `defaults` should hold\ndefault values for all optional fields in `Config`.\n\nThe function will, by default, error\nwhen a field gets two values that aren't `===`-equal, but you can\nprovide combine functions per field to do something else.\n*/\nfunction combineConfig(configs, defaults, // Should hold only the optional properties of Config, but I haven't managed to express that\ncombine = {}) {\n let result = {};\n for (let config of configs)\n for (let key of Object.keys(config)) {\n let value = config[key], current = result[key];\n if (current === undefined)\n result[key] = value;\n else if (current === value || value === undefined) ; // No conflict\n else if (Object.hasOwnProperty.call(combine, key))\n result[key] = combine[key](current, value);\n else\n throw new Error(\"Config merge conflict for field \" + key);\n }\n for (let key in defaults)\n if (result[key] === undefined)\n result[key] = defaults[key];\n return result;\n}\n\n/**\nEach range is associated with a value, which must inherit from\nthis class.\n*/\nclass RangeValue {\n /**\n Compare this value with another value. Used when comparing\n rangesets. The default implementation compares by identity.\n Unless you are only creating a fixed number of unique instances\n of your value type, it is a good idea to implement this\n properly.\n */\n eq(other) { return this == other; }\n /**\n Create a [range](https://codemirror.net/6/docs/ref/#state.Range) with this value.\n */\n range(from, to = from) { return Range.create(from, to, this); }\n}\nRangeValue.prototype.startSide = RangeValue.prototype.endSide = 0;\nRangeValue.prototype.point = false;\nRangeValue.prototype.mapMode = MapMode.TrackDel;\n/**\nA range associates a value with a range of positions.\n*/\nclass Range {\n constructor(\n /**\n The range's start position.\n */\n from, \n /**\n Its end position.\n */\n to, \n /**\n The value associated with this range.\n */\n value) {\n this.from = from;\n this.to = to;\n this.value = value;\n }\n /**\n @internal\n */\n static create(from, to, value) {\n return new Range(from, to, value);\n }\n}\nfunction cmpRange(a, b) {\n return a.from - b.from || a.value.startSide - b.value.startSide;\n}\nclass Chunk {\n constructor(from, to, value, \n // Chunks are marked with the largest point that occurs\n // in them (or -1 for no points), so that scans that are\n // only interested in points (such as the\n // heightmap-related logic) can skip range-only chunks.\n maxPoint) {\n this.from = from;\n this.to = to;\n this.value = value;\n this.maxPoint = maxPoint;\n }\n get length() { return this.to[this.to.length - 1]; }\n // Find the index of the given position and side. Use the ranges'\n // `from` pos when `end == false`, `to` when `end == true`.\n findIndex(pos, side, end, startAt = 0) {\n let arr = end ? this.to : this.from;\n for (let lo = startAt, hi = arr.length;;) {\n if (lo == hi)\n return lo;\n let mid = (lo + hi) >> 1;\n let diff = arr[mid] - pos || (end ? this.value[mid].endSide : this.value[mid].startSide) - side;\n if (mid == lo)\n return diff >= 0 ? lo : hi;\n if (diff >= 0)\n hi = mid;\n else\n lo = mid + 1;\n }\n }\n between(offset, from, to, f) {\n for (let i = this.findIndex(from, -1000000000 /* C.Far */, true), e = this.findIndex(to, 1000000000 /* C.Far */, false, i); i < e; i++)\n if (f(this.from[i] + offset, this.to[i] + offset, this.value[i]) === false)\n return false;\n }\n map(offset, changes) {\n let value = [], from = [], to = [], newPos = -1, maxPoint = -1;\n for (let i = 0; i < this.value.length; i++) {\n let val = this.value[i], curFrom = this.from[i] + offset, curTo = this.to[i] + offset, newFrom, newTo;\n if (curFrom == curTo) {\n let mapped = changes.mapPos(curFrom, val.startSide, val.mapMode);\n if (mapped == null)\n continue;\n newFrom = newTo = mapped;\n if (val.startSide != val.endSide) {\n newTo = changes.mapPos(curFrom, val.endSide);\n if (newTo < newFrom)\n continue;\n }\n }\n else {\n newFrom = changes.mapPos(curFrom, val.startSide);\n newTo = changes.mapPos(curTo, val.endSide);\n if (newFrom > newTo || newFrom == newTo && val.startSide > 0 && val.endSide <= 0)\n continue;\n }\n if ((newTo - newFrom || val.endSide - val.startSide) < 0)\n continue;\n if (newPos < 0)\n newPos = newFrom;\n if (val.point)\n maxPoint = Math.max(maxPoint, newTo - newFrom);\n value.push(val);\n from.push(newFrom - newPos);\n to.push(newTo - newPos);\n }\n return { mapped: value.length ? new Chunk(from, to, value, maxPoint) : null, pos: newPos };\n }\n}\n/**\nA range set stores a collection of [ranges](https://codemirror.net/6/docs/ref/#state.Range) in a\nway that makes them efficient to [map](https://codemirror.net/6/docs/ref/#state.RangeSet.map) and\n[update](https://codemirror.net/6/docs/ref/#state.RangeSet.update). This is an immutable data\nstructure.\n*/\nclass RangeSet {\n constructor(\n /**\n @internal\n */\n chunkPos, \n /**\n @internal\n */\n chunk, \n /**\n @internal\n */\n nextLayer, \n /**\n @internal\n */\n maxPoint) {\n this.chunkPos = chunkPos;\n this.chunk = chunk;\n this.nextLayer = nextLayer;\n this.maxPoint = maxPoint;\n }\n /**\n @internal\n */\n static create(chunkPos, chunk, nextLayer, maxPoint) {\n return new RangeSet(chunkPos, chunk, nextLayer, maxPoint);\n }\n /**\n @internal\n */\n get length() {\n let last = this.chunk.length - 1;\n return last < 0 ? 0 : Math.max(this.chunkEnd(last), this.nextLayer.length);\n }\n /**\n The number of ranges in the set.\n */\n get size() {\n if (this.isEmpty)\n return 0;\n let size = this.nextLayer.size;\n for (let chunk of this.chunk)\n size += chunk.value.length;\n return size;\n }\n /**\n @internal\n */\n chunkEnd(index) {\n return this.chunkPos[index] + this.chunk[index].length;\n }\n /**\n Update the range set, optionally adding new ranges or filtering\n out existing ones.\n \n (Note: The type parameter is just there as a kludge to work\n around TypeScript variance issues that prevented `RangeSet`\n from being a subtype of `RangeSet` when `X` is a subtype of\n `Y`.)\n */\n update(updateSpec) {\n let { add = [], sort = false, filterFrom = 0, filterTo = this.length } = updateSpec;\n let filter = updateSpec.filter;\n if (add.length == 0 && !filter)\n return this;\n if (sort)\n add = add.slice().sort(cmpRange);\n if (this.isEmpty)\n return add.length ? RangeSet.of(add) : this;\n let cur = new LayerCursor(this, null, -1).goto(0), i = 0, spill = [];\n let builder = new RangeSetBuilder();\n while (cur.value || i < add.length) {\n if (i < add.length && (cur.from - add[i].from || cur.startSide - add[i].value.startSide) >= 0) {\n let range = add[i++];\n if (!builder.addInner(range.from, range.to, range.value))\n spill.push(range);\n }\n else if (cur.rangeIndex == 1 && cur.chunkIndex < this.chunk.length &&\n (i == add.length || this.chunkEnd(cur.chunkIndex) < add[i].from) &&\n (!filter || filterFrom > this.chunkEnd(cur.chunkIndex) || filterTo < this.chunkPos[cur.chunkIndex]) &&\n builder.addChunk(this.chunkPos[cur.chunkIndex], this.chunk[cur.chunkIndex])) {\n cur.nextChunk();\n }\n else {\n if (!filter || filterFrom > cur.to || filterTo < cur.from || filter(cur.from, cur.to, cur.value)) {\n if (!builder.addInner(cur.from, cur.to, cur.value))\n spill.push(Range.create(cur.from, cur.to, cur.value));\n }\n cur.next();\n }\n }\n return builder.finishInner(this.nextLayer.isEmpty && !spill.length ? RangeSet.empty\n : this.nextLayer.update({ add: spill, filter, filterFrom, filterTo }));\n }\n /**\n Map this range set through a set of changes, return the new set.\n */\n map(changes) {\n if (changes.empty || this.isEmpty)\n return this;\n let chunks = [], chunkPos = [], maxPoint = -1;\n for (let i = 0; i < this.chunk.length; i++) {\n let start = this.chunkPos[i], chunk = this.chunk[i];\n let touch = changes.touchesRange(start, start + chunk.length);\n if (touch === false) {\n maxPoint = Math.max(maxPoint, chunk.maxPoint);\n chunks.push(chunk);\n chunkPos.push(changes.mapPos(start));\n }\n else if (touch === true) {\n let { mapped, pos } = chunk.map(start, changes);\n if (mapped) {\n maxPoint = Math.max(maxPoint, mapped.maxPoint);\n chunks.push(mapped);\n chunkPos.push(pos);\n }\n }\n }\n let next = this.nextLayer.map(changes);\n return chunks.length == 0 ? next : new RangeSet(chunkPos, chunks, next || RangeSet.empty, maxPoint);\n }\n /**\n Iterate over the ranges that touch the region `from` to `to`,\n calling `f` for each. There is no guarantee that the ranges will\n be reported in any specific order. When the callback returns\n `false`, iteration stops.\n */\n between(from, to, f) {\n if (this.isEmpty)\n return;\n for (let i = 0; i < this.chunk.length; i++) {\n let start = this.chunkPos[i], chunk = this.chunk[i];\n if (to >= start && from <= start + chunk.length &&\n chunk.between(start, from - start, to - start, f) === false)\n return;\n }\n this.nextLayer.between(from, to, f);\n }\n /**\n Iterate over the ranges in this set, in order, including all\n ranges that end at or after `from`.\n */\n iter(from = 0) {\n return HeapCursor.from([this]).goto(from);\n }\n /**\n @internal\n */\n get isEmpty() { return this.nextLayer == this; }\n /**\n Iterate over the ranges in a collection of sets, in order,\n starting from `from`.\n */\n static iter(sets, from = 0) {\n return HeapCursor.from(sets).goto(from);\n }\n /**\n Iterate over two groups of sets, calling methods on `comparator`\n to notify it of possible differences.\n */\n static compare(oldSets, newSets, \n /**\n This indicates how the underlying data changed between these\n ranges, and is needed to synchronize the iteration.\n */\n textDiff, comparator, \n /**\n Can be used to ignore all non-point ranges, and points below\n the given size. When -1, all ranges are compared.\n */\n minPointSize = -1) {\n let a = oldSets.filter(set => set.maxPoint > 0 || !set.isEmpty && set.maxPoint >= minPointSize);\n let b = newSets.filter(set => set.maxPoint > 0 || !set.isEmpty && set.maxPoint >= minPointSize);\n let sharedChunks = findSharedChunks(a, b, textDiff);\n let sideA = new SpanCursor(a, sharedChunks, minPointSize);\n let sideB = new SpanCursor(b, sharedChunks, minPointSize);\n textDiff.iterGaps((fromA, fromB, length) => compare(sideA, fromA, sideB, fromB, length, comparator));\n if (textDiff.empty && textDiff.length == 0)\n compare(sideA, 0, sideB, 0, 0, comparator);\n }\n /**\n Compare the contents of two groups of range sets, returning true\n if they are equivalent in the given range.\n */\n static eq(oldSets, newSets, from = 0, to) {\n if (to == null)\n to = 1000000000 /* C.Far */ - 1;\n let a = oldSets.filter(set => !set.isEmpty && newSets.indexOf(set) < 0);\n let b = newSets.filter(set => !set.isEmpty && oldSets.indexOf(set) < 0);\n if (a.length != b.length)\n return false;\n if (!a.length)\n return true;\n let sharedChunks = findSharedChunks(a, b);\n let sideA = new SpanCursor(a, sharedChunks, 0).goto(from), sideB = new SpanCursor(b, sharedChunks, 0).goto(from);\n for (;;) {\n if (sideA.to != sideB.to ||\n !sameValues(sideA.active, sideB.active) ||\n sideA.point && (!sideB.point || !sideA.point.eq(sideB.point)))\n return false;\n if (sideA.to > to)\n return true;\n sideA.next();\n sideB.next();\n }\n }\n /**\n Iterate over a group of range sets at the same time, notifying\n the iterator about the ranges covering every given piece of\n content. Returns the open count (see\n [`SpanIterator.span`](https://codemirror.net/6/docs/ref/#state.SpanIterator.span)) at the end\n of the iteration.\n */\n static spans(sets, from, to, iterator, \n /**\n When given and greater than -1, only points of at least this\n size are taken into account.\n */\n minPointSize = -1) {\n let cursor = new SpanCursor(sets, null, minPointSize).goto(from), pos = from;\n let openRanges = cursor.openStart;\n for (;;) {\n let curTo = Math.min(cursor.to, to);\n if (cursor.point) {\n let active = cursor.activeForPoint(cursor.to);\n let openCount = cursor.pointFrom < from ? active.length + 1 : Math.min(active.length, openRanges);\n iterator.point(pos, curTo, cursor.point, active, openCount, cursor.pointRank);\n openRanges = Math.min(cursor.openEnd(curTo), active.length);\n }\n else if (curTo > pos) {\n iterator.span(pos, curTo, cursor.active, openRanges);\n openRanges = cursor.openEnd(curTo);\n }\n if (cursor.to > to)\n return openRanges + (cursor.point && cursor.to > to ? 1 : 0);\n pos = cursor.to;\n cursor.next();\n }\n }\n /**\n Create a range set for the given range or array of ranges. By\n default, this expects the ranges to be _sorted_ (by start\n position and, if two start at the same position,\n `value.startSide`). You can pass `true` as second argument to\n cause the method to sort them.\n */\n static of(ranges, sort = false) {\n let build = new RangeSetBuilder();\n for (let range of ranges instanceof Range ? [ranges] : sort ? lazySort(ranges) : ranges)\n build.add(range.from, range.to, range.value);\n return build.finish();\n }\n}\n/**\nThe empty set of ranges.\n*/\nRangeSet.empty = /*@__PURE__*/new RangeSet([], [], null, -1);\nfunction lazySort(ranges) {\n if (ranges.length > 1)\n for (let prev = ranges[0], i = 1; i < ranges.length; i++) {\n let cur = ranges[i];\n if (cmpRange(prev, cur) > 0)\n return ranges.slice().sort(cmpRange);\n prev = cur;\n }\n return ranges;\n}\nRangeSet.empty.nextLayer = RangeSet.empty;\n/**\nA range set builder is a data structure that helps build up a\n[range set](https://codemirror.net/6/docs/ref/#state.RangeSet) directly, without first allocating\nan array of [`Range`](https://codemirror.net/6/docs/ref/#state.Range) objects.\n*/\nclass RangeSetBuilder {\n finishChunk(newArrays) {\n this.chunks.push(new Chunk(this.from, this.to, this.value, this.maxPoint));\n this.chunkPos.push(this.chunkStart);\n this.chunkStart = -1;\n this.setMaxPoint = Math.max(this.setMaxPoint, this.maxPoint);\n this.maxPoint = -1;\n if (newArrays) {\n this.from = [];\n this.to = [];\n this.value = [];\n }\n }\n /**\n Create an empty builder.\n */\n constructor() {\n this.chunks = [];\n this.chunkPos = [];\n this.chunkStart = -1;\n this.last = null;\n this.lastFrom = -1000000000 /* C.Far */;\n this.lastTo = -1000000000 /* C.Far */;\n this.from = [];\n this.to = [];\n this.value = [];\n this.maxPoint = -1;\n this.setMaxPoint = -1;\n this.nextLayer = null;\n }\n /**\n Add a range. Ranges should be added in sorted (by `from` and\n `value.startSide`) order.\n */\n add(from, to, value) {\n if (!this.addInner(from, to, value))\n (this.nextLayer || (this.nextLayer = new RangeSetBuilder)).add(from, to, value);\n }\n /**\n @internal\n */\n addInner(from, to, value) {\n let diff = from - this.lastTo || value.startSide - this.last.endSide;\n if (diff <= 0 && (from - this.lastFrom || value.startSide - this.last.startSide) < 0)\n throw new Error(\"Ranges must be added sorted by `from` position and `startSide`\");\n if (diff < 0)\n return false;\n if (this.from.length == 250 /* C.ChunkSize */)\n this.finishChunk(true);\n if (this.chunkStart < 0)\n this.chunkStart = from;\n this.from.push(from - this.chunkStart);\n this.to.push(to - this.chunkStart);\n this.last = value;\n this.lastFrom = from;\n this.lastTo = to;\n this.value.push(value);\n if (value.point)\n this.maxPoint = Math.max(this.maxPoint, to - from);\n return true;\n }\n /**\n @internal\n */\n addChunk(from, chunk) {\n if ((from - this.lastTo || chunk.value[0].startSide - this.last.endSide) < 0)\n return false;\n if (this.from.length)\n this.finishChunk(true);\n this.setMaxPoint = Math.max(this.setMaxPoint, chunk.maxPoint);\n this.chunks.push(chunk);\n this.chunkPos.push(from);\n let last = chunk.value.length - 1;\n this.last = chunk.value[last];\n this.lastFrom = chunk.from[last] + from;\n this.lastTo = chunk.to[last] + from;\n return true;\n }\n /**\n Finish the range set. Returns the new set. The builder can't be\n used anymore after this has been called.\n */\n finish() { return this.finishInner(RangeSet.empty); }\n /**\n @internal\n */\n finishInner(next) {\n if (this.from.length)\n this.finishChunk(false);\n if (this.chunks.length == 0)\n return next;\n let result = RangeSet.create(this.chunkPos, this.chunks, this.nextLayer ? this.nextLayer.finishInner(next) : next, this.setMaxPoint);\n this.from = null; // Make sure further `add` calls produce errors\n return result;\n }\n}\nfunction findSharedChunks(a, b, textDiff) {\n let inA = new Map();\n for (let set of a)\n for (let i = 0; i < set.chunk.length; i++)\n if (set.chunk[i].maxPoint <= 0)\n inA.set(set.chunk[i], set.chunkPos[i]);\n let shared = new Set();\n for (let set of b)\n for (let i = 0; i < set.chunk.length; i++) {\n let known = inA.get(set.chunk[i]);\n if (known != null && (textDiff ? textDiff.mapPos(known) : known) == set.chunkPos[i] &&\n !(textDiff === null || textDiff === void 0 ? void 0 : textDiff.touchesRange(known, known + set.chunk[i].length)))\n shared.add(set.chunk[i]);\n }\n return shared;\n}\nclass LayerCursor {\n constructor(layer, skip, minPoint, rank = 0) {\n this.layer = layer;\n this.skip = skip;\n this.minPoint = minPoint;\n this.rank = rank;\n }\n get startSide() { return this.value ? this.value.startSide : 0; }\n get endSide() { return this.value ? this.value.endSide : 0; }\n goto(pos, side = -1000000000 /* C.Far */) {\n this.chunkIndex = this.rangeIndex = 0;\n this.gotoInner(pos, side, false);\n return this;\n }\n gotoInner(pos, side, forward) {\n while (this.chunkIndex < this.layer.chunk.length) {\n let next = this.layer.chunk[this.chunkIndex];\n if (!(this.skip && this.skip.has(next) ||\n this.layer.chunkEnd(this.chunkIndex) < pos ||\n next.maxPoint < this.minPoint))\n break;\n this.chunkIndex++;\n forward = false;\n }\n if (this.chunkIndex < this.layer.chunk.length) {\n let rangeIndex = this.layer.chunk[this.chunkIndex].findIndex(pos - this.layer.chunkPos[this.chunkIndex], side, true);\n if (!forward || this.rangeIndex < rangeIndex)\n this.setRangeIndex(rangeIndex);\n }\n this.next();\n }\n forward(pos, side) {\n if ((this.to - pos || this.endSide - side) < 0)\n this.gotoInner(pos, side, true);\n }\n next() {\n for (;;) {\n if (this.chunkIndex == this.layer.chunk.length) {\n this.from = this.to = 1000000000 /* C.Far */;\n this.value = null;\n break;\n }\n else {\n let chunkPos = this.layer.chunkPos[this.chunkIndex], chunk = this.layer.chunk[this.chunkIndex];\n let from = chunkPos + chunk.from[this.rangeIndex];\n this.from = from;\n this.to = chunkPos + chunk.to[this.rangeIndex];\n this.value = chunk.value[this.rangeIndex];\n this.setRangeIndex(this.rangeIndex + 1);\n if (this.minPoint < 0 || this.value.point && this.to - this.from >= this.minPoint)\n break;\n }\n }\n }\n setRangeIndex(index) {\n if (index == this.layer.chunk[this.chunkIndex].value.length) {\n this.chunkIndex++;\n if (this.skip) {\n while (this.chunkIndex < this.layer.chunk.length && this.skip.has(this.layer.chunk[this.chunkIndex]))\n this.chunkIndex++;\n }\n this.rangeIndex = 0;\n }\n else {\n this.rangeIndex = index;\n }\n }\n nextChunk() {\n this.chunkIndex++;\n this.rangeIndex = 0;\n this.next();\n }\n compare(other) {\n return this.from - other.from || this.startSide - other.startSide || this.rank - other.rank ||\n this.to - other.to || this.endSide - other.endSide;\n }\n}\nclass HeapCursor {\n constructor(heap) {\n this.heap = heap;\n }\n static from(sets, skip = null, minPoint = -1) {\n let heap = [];\n for (let i = 0; i < sets.length; i++) {\n for (let cur = sets[i]; !cur.isEmpty; cur = cur.nextLayer) {\n if (cur.maxPoint >= minPoint)\n heap.push(new LayerCursor(cur, skip, minPoint, i));\n }\n }\n return heap.length == 1 ? heap[0] : new HeapCursor(heap);\n }\n get startSide() { return this.value ? this.value.startSide : 0; }\n goto(pos, side = -1000000000 /* C.Far */) {\n for (let cur of this.heap)\n cur.goto(pos, side);\n for (let i = this.heap.length >> 1; i >= 0; i--)\n heapBubble(this.heap, i);\n this.next();\n return this;\n }\n forward(pos, side) {\n for (let cur of this.heap)\n cur.forward(pos, side);\n for (let i = this.heap.length >> 1; i >= 0; i--)\n heapBubble(this.heap, i);\n if ((this.to - pos || this.value.endSide - side) < 0)\n this.next();\n }\n next() {\n if (this.heap.length == 0) {\n this.from = this.to = 1000000000 /* C.Far */;\n this.value = null;\n this.rank = -1;\n }\n else {\n let top = this.heap[0];\n this.from = top.from;\n this.to = top.to;\n this.value = top.value;\n this.rank = top.rank;\n if (top.value)\n top.next();\n heapBubble(this.heap, 0);\n }\n }\n}\nfunction heapBubble(heap, index) {\n for (let cur = heap[index];;) {\n let childIndex = (index << 1) + 1;\n if (childIndex >= heap.length)\n break;\n let child = heap[childIndex];\n if (childIndex + 1 < heap.length && child.compare(heap[childIndex + 1]) >= 0) {\n child = heap[childIndex + 1];\n childIndex++;\n }\n if (cur.compare(child) < 0)\n break;\n heap[childIndex] = cur;\n heap[index] = child;\n index = childIndex;\n }\n}\nclass SpanCursor {\n constructor(sets, skip, minPoint) {\n this.minPoint = minPoint;\n this.active = [];\n this.activeTo = [];\n this.activeRank = [];\n this.minActive = -1;\n // A currently active point range, if any\n this.point = null;\n this.pointFrom = 0;\n this.pointRank = 0;\n this.to = -1000000000 /* C.Far */;\n this.endSide = 0;\n // The amount of open active ranges at the start of the iterator.\n // Not including points.\n this.openStart = -1;\n this.cursor = HeapCursor.from(sets, skip, minPoint);\n }\n goto(pos, side = -1000000000 /* C.Far */) {\n this.cursor.goto(pos, side);\n this.active.length = this.activeTo.length = this.activeRank.length = 0;\n this.minActive = -1;\n this.to = pos;\n this.endSide = side;\n this.openStart = -1;\n this.next();\n return this;\n }\n forward(pos, side) {\n while (this.minActive > -1 && (this.activeTo[this.minActive] - pos || this.active[this.minActive].endSide - side) < 0)\n this.removeActive(this.minActive);\n this.cursor.forward(pos, side);\n }\n removeActive(index) {\n remove(this.active, index);\n remove(this.activeTo, index);\n remove(this.activeRank, index);\n this.minActive = findMinIndex(this.active, this.activeTo);\n }\n addActive(trackOpen) {\n let i = 0, { value, to, rank } = this.cursor;\n while (i < this.activeRank.length && this.activeRank[i] <= rank)\n i++;\n insert(this.active, i, value);\n insert(this.activeTo, i, to);\n insert(this.activeRank, i, rank);\n if (trackOpen)\n insert(trackOpen, i, this.cursor.from);\n this.minActive = findMinIndex(this.active, this.activeTo);\n }\n // After calling this, if `this.point` != null, the next range is a\n // point. Otherwise, it's a regular range, covered by `this.active`.\n next() {\n let from = this.to, wasPoint = this.point;\n this.point = null;\n let trackOpen = this.openStart < 0 ? [] : null;\n for (;;) {\n let a = this.minActive;\n if (a > -1 && (this.activeTo[a] - this.cursor.from || this.active[a].endSide - this.cursor.startSide) < 0) {\n if (this.activeTo[a] > from) {\n this.to = this.activeTo[a];\n this.endSide = this.active[a].endSide;\n break;\n }\n this.removeActive(a);\n if (trackOpen)\n remove(trackOpen, a);\n }\n else if (!this.cursor.value) {\n this.to = this.endSide = 1000000000 /* C.Far */;\n break;\n }\n else if (this.cursor.from > from) {\n this.to = this.cursor.from;\n this.endSide = this.cursor.startSide;\n break;\n }\n else {\n let nextVal = this.cursor.value;\n if (!nextVal.point) { // Opening a range\n this.addActive(trackOpen);\n this.cursor.next();\n }\n else if (wasPoint && this.cursor.to == this.to && this.cursor.from < this.cursor.to) {\n // Ignore any non-empty points that end precisely at the end of the prev point\n this.cursor.next();\n }\n else { // New point\n this.point = nextVal;\n this.pointFrom = this.cursor.from;\n this.pointRank = this.cursor.rank;\n this.to = this.cursor.to;\n this.endSide = nextVal.endSide;\n this.cursor.next();\n this.forward(this.to, this.endSide);\n break;\n }\n }\n }\n if (trackOpen) {\n this.openStart = 0;\n for (let i = trackOpen.length - 1; i >= 0 && trackOpen[i] < from; i--)\n this.openStart++;\n }\n }\n activeForPoint(to) {\n if (!this.active.length)\n return this.active;\n let active = [];\n for (let i = this.active.length - 1; i >= 0; i--) {\n if (this.activeRank[i] < this.pointRank)\n break;\n if (this.activeTo[i] > to || this.activeTo[i] == to && this.active[i].endSide >= this.point.endSide)\n active.push(this.active[i]);\n }\n return active.reverse();\n }\n openEnd(to) {\n let open = 0;\n for (let i = this.activeTo.length - 1; i >= 0 && this.activeTo[i] > to; i--)\n open++;\n return open;\n }\n}\nfunction compare(a, startA, b, startB, length, comparator) {\n a.goto(startA);\n b.goto(startB);\n let endB = startB + length;\n let pos = startB, dPos = startB - startA;\n for (;;) {\n let diff = (a.to + dPos) - b.to || a.endSide - b.endSide;\n let end = diff < 0 ? a.to + dPos : b.to, clipEnd = Math.min(end, endB);\n if (a.point || b.point) {\n if (!(a.point && b.point && (a.point == b.point || a.point.eq(b.point)) &&\n sameValues(a.activeForPoint(a.to), b.activeForPoint(b.to))))\n comparator.comparePoint(pos, clipEnd, a.point, b.point);\n }\n else {\n if (clipEnd > pos && !sameValues(a.active, b.active))\n comparator.compareRange(pos, clipEnd, a.active, b.active);\n }\n if (end > endB)\n break;\n pos = end;\n if (diff <= 0)\n a.next();\n if (diff >= 0)\n b.next();\n }\n}\nfunction sameValues(a, b) {\n if (a.length != b.length)\n return false;\n for (let i = 0; i < a.length; i++)\n if (a[i] != b[i] && !a[i].eq(b[i]))\n return false;\n return true;\n}\nfunction remove(array, index) {\n for (let i = index, e = array.length - 1; i < e; i++)\n array[i] = array[i + 1];\n array.pop();\n}\nfunction insert(array, index, value) {\n for (let i = array.length - 1; i >= index; i--)\n array[i + 1] = array[i];\n array[index] = value;\n}\nfunction findMinIndex(value, array) {\n let found = -1, foundPos = 1000000000 /* C.Far */;\n for (let i = 0; i < array.length; i++)\n if ((array[i] - foundPos || value[i].endSide - value[found].endSide) < 0) {\n found = i;\n foundPos = array[i];\n }\n return found;\n}\n\n/**\nCount the column position at the given offset into the string,\ntaking extending characters and tab size into account.\n*/\nfunction countColumn(string, tabSize, to = string.length) {\n let n = 0;\n for (let i = 0; i < to;) {\n if (string.charCodeAt(i) == 9) {\n n += tabSize - (n % tabSize);\n i++;\n }\n else {\n n++;\n i = findClusterBreak(string, i);\n }\n }\n return n;\n}\n/**\nFind the offset that corresponds to the given column position in a\nstring, taking extending characters and tab size into account. By\ndefault, the string length is returned when it is too short to\nreach the column. Pass `strict` true to make it return -1 in that\nsituation.\n*/\nfunction findColumn(string, col, tabSize, strict) {\n for (let i = 0, n = 0;;) {\n if (n >= col)\n return i;\n if (i == string.length)\n break;\n n += string.charCodeAt(i) == 9 ? tabSize - (n % tabSize) : 1;\n i = findClusterBreak(string, i);\n }\n return strict === true ? -1 : string.length;\n}\n\nexport { Annotation, AnnotationType, ChangeDesc, ChangeSet, CharCategory, Compartment, EditorSelection, EditorState, Facet, Line, MapMode, Prec, Range, RangeSet, RangeSetBuilder, RangeValue, SelectionRange, StateEffect, StateEffectType, StateField, Text, Transaction, codePointAt, codePointSize, combineConfig, countColumn, findClusterBreak, findColumn, fromCodePoint };\n","export default function _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];\n return arr2;\n}","import arrayWithoutHoles from \"./arrayWithoutHoles.js\";\nimport iterableToArray from \"./iterableToArray.js\";\nimport unsupportedIterableToArray from \"./unsupportedIterableToArray.js\";\nimport nonIterableSpread from \"./nonIterableSpread.js\";\nexport default function _toConsumableArray(arr) {\n return arrayWithoutHoles(arr) || iterableToArray(arr) || unsupportedIterableToArray(arr) || nonIterableSpread();\n}","import arrayLikeToArray from \"./arrayLikeToArray.js\";\nexport default function _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) return arrayLikeToArray(arr);\n}","export default function _iterableToArray(iter) {\n if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter);\n}","import arrayLikeToArray from \"./arrayLikeToArray.js\";\nexport default function _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen);\n}","export default function _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}","export default function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) {\n return typeof obj;\n } : function (obj) {\n return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n }, _typeof(obj);\n}","export default function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}","import _typeof from \"./typeof.js\";\nimport toPrimitive from \"./toPrimitive.js\";\nexport default function _toPropertyKey(arg) {\n var key = toPrimitive(arg, \"string\");\n return _typeof(key) === \"symbol\" ? key : String(key);\n}","import _typeof from \"./typeof.js\";\nexport default function _toPrimitive(input, hint) {\n if (_typeof(input) !== \"object\" || input === null) return input;\n var prim = input[Symbol.toPrimitive];\n if (prim !== undefined) {\n var res = prim.call(input, hint || \"default\");\n if (_typeof(res) !== \"object\") return res;\n throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n }\n return (hint === \"string\" ? String : Number)(input);\n}","import toPropertyKey from \"./toPropertyKey.js\";\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, toPropertyKey(descriptor.key), descriptor);\n }\n}\nexport default function _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n Object.defineProperty(Constructor, \"prototype\", {\n writable: false\n });\n return Constructor;\n}","export var base = {\n 8: \"Backspace\",\n 9: \"Tab\",\n 10: \"Enter\",\n 12: \"NumLock\",\n 13: \"Enter\",\n 16: \"Shift\",\n 17: \"Control\",\n 18: \"Alt\",\n 20: \"CapsLock\",\n 27: \"Escape\",\n 32: \" \",\n 33: \"PageUp\",\n 34: \"PageDown\",\n 35: \"End\",\n 36: \"Home\",\n 37: \"ArrowLeft\",\n 38: \"ArrowUp\",\n 39: \"ArrowRight\",\n 40: \"ArrowDown\",\n 44: \"PrintScreen\",\n 45: \"Insert\",\n 46: \"Delete\",\n 59: \";\",\n 61: \"=\",\n 91: \"Meta\",\n 92: \"Meta\",\n 106: \"*\",\n 107: \"+\",\n 108: \",\",\n 109: \"-\",\n 110: \".\",\n 111: \"/\",\n 144: \"NumLock\",\n 145: \"ScrollLock\",\n 160: \"Shift\",\n 161: \"Shift\",\n 162: \"Control\",\n 163: \"Control\",\n 164: \"Alt\",\n 165: \"Alt\",\n 173: \"-\",\n 186: \";\",\n 187: \"=\",\n 188: \",\",\n 189: \"-\",\n 190: \".\",\n 191: \"/\",\n 192: \"`\",\n 219: \"[\",\n 220: \"\\\\\",\n 221: \"]\",\n 222: \"'\"\n}\n\nexport var shift = {\n 48: \")\",\n 49: \"!\",\n 50: \"@\",\n 51: \"#\",\n 52: \"$\",\n 53: \"%\",\n 54: \"^\",\n 55: \"&\",\n 56: \"*\",\n 57: \"(\",\n 59: \":\",\n 61: \"+\",\n 173: \"_\",\n 186: \":\",\n 187: \"+\",\n 188: \"<\",\n 189: \"_\",\n 190: \">\",\n 191: \"?\",\n 192: \"~\",\n 219: \"{\",\n 220: \"|\",\n 221: \"}\",\n 222: \"\\\"\"\n}\n\nvar mac = typeof navigator != \"undefined\" && /Mac/.test(navigator.platform)\nvar ie = typeof navigator != \"undefined\" && /MSIE \\d|Trident\\/(?:[7-9]|\\d{2,})\\..*rv:(\\d+)/.exec(navigator.userAgent)\n\n// Fill in the digit keys\nfor (var i = 0; i < 10; i++) base[48 + i] = base[96 + i] = String(i)\n\n// The function keys\nfor (var i = 1; i <= 24; i++) base[i + 111] = \"F\" + i\n\n// And the alphabetic keys\nfor (var i = 65; i <= 90; i++) {\n base[i] = String.fromCharCode(i + 32)\n shift[i] = String.fromCharCode(i)\n}\n\n// For each code that doesn't have a shift-equivalent, copy the base name\nfor (var code in base) if (!shift.hasOwnProperty(code)) shift[code] = base[code]\n\nexport function keyName(event) {\n // On macOS, keys held with Shift and Cmd don't reflect the effect of Shift in `.key`.\n // On IE, shift effect is never included in `.key`.\n var ignoreKey = mac && event.metaKey && event.shiftKey && !event.ctrlKey && !event.altKey ||\n ie && event.shiftKey && event.key && event.key.length == 1 ||\n event.key == \"Unidentified\"\n var name = (!ignoreKey && event.key) ||\n (event.shiftKey ? shift : base)[event.keyCode] ||\n event.key || \"Unidentified\"\n // Edge sometimes produces wrong names (Issue #3)\n if (name == \"Esc\") name = \"Escape\"\n if (name == \"Del\") name = \"Delete\"\n // https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/8860571/\n if (name == \"Left\") name = \"ArrowLeft\"\n if (name == \"Up\") name = \"ArrowUp\"\n if (name == \"Right\") name = \"ArrowRight\"\n if (name == \"Down\") name = \"ArrowDown\"\n return name\n}\n","const C = \"\\u037c\"\nconst COUNT = typeof Symbol == \"undefined\" ? \"__\" + C : Symbol.for(C)\nconst SET = typeof Symbol == \"undefined\" ? \"__styleSet\" + Math.floor(Math.random() * 1e8) : Symbol(\"styleSet\")\nconst top = typeof globalThis != \"undefined\" ? globalThis : typeof window != \"undefined\" ? window : {}\n\n// :: - Style modules encapsulate a set of CSS rules defined from\n// JavaScript. Their definitions are only available in a given DOM\n// root after it has been _mounted_ there with `StyleModule.mount`.\n//\n// Style modules should be created once and stored somewhere, as\n// opposed to re-creating them every time you need them. The amount of\n// CSS rules generated for a given DOM root is bounded by the amount\n// of style modules that were used. So to avoid leaking rules, don't\n// create these dynamically, but treat them as one-time allocations.\nexport class StyleModule {\n // :: (Object