froala-editor
Advanced tools
Comparing version 3.0.5 to 3.0.6
@@ -0,0 +0,0 @@ ### _If you have a feature suggestion, please add it on the [Feature List](https://wysiwyg-editor-roadmap.froala.com/public) instead._ |
@@ -0,0 +0,0 @@ { |
@@ -0,0 +0,0 @@ { |
/*! | ||
* froala_editor v3.0.5 (https://www.froala.com/wysiwyg-editor) | ||
* froala_editor v3.0.6 (https://www.froala.com/wysiwyg-editor) | ||
* License https://froala.com/wysiwyg-editor/terms/ | ||
@@ -4,0 +4,0 @@ * Copyright 2014-2019 Froala Labs |
/*! | ||
* froala_editor v3.0.5 (https://www.froala.com/wysiwyg-editor) | ||
* froala_editor v3.0.6 (https://www.froala.com/wysiwyg-editor) | ||
* License https://froala.com/wysiwyg-editor/terms/ | ||
@@ -4,0 +4,0 @@ * Copyright 2014-2019 Froala Labs |
/*! | ||
* froala_editor v3.0.5 (https://www.froala.com/wysiwyg-editor) | ||
* froala_editor v3.0.6 (https://www.froala.com/wysiwyg-editor) | ||
* License https://froala.com/wysiwyg-editor/terms/ | ||
@@ -4,0 +4,0 @@ * Copyright 2014-2019 Froala Labs |
/*! | ||
* froala_editor v3.0.5 (https://www.froala.com/wysiwyg-editor) | ||
* froala_editor v3.0.6 (https://www.froala.com/wysiwyg-editor) | ||
* License https://froala.com/wysiwyg-editor/terms/ | ||
@@ -4,0 +4,0 @@ * Copyright 2014-2019 Froala Labs |
/*! | ||
* froala_editor v3.0.5 (https://www.froala.com/wysiwyg-editor) | ||
* froala_editor v3.0.6 (https://www.froala.com/wysiwyg-editor) | ||
* License https://froala.com/wysiwyg-editor/terms/ | ||
@@ -4,0 +4,0 @@ * Copyright 2014-2019 Froala Labs |
/*! | ||
* froala_editor v3.0.5 (https://www.froala.com/wysiwyg-editor) | ||
* froala_editor v3.0.6 (https://www.froala.com/wysiwyg-editor) | ||
* License https://froala.com/wysiwyg-editor/terms/ | ||
@@ -4,0 +4,0 @@ * Copyright 2014-2019 Froala Labs |
/*! | ||
* froala_editor v3.0.5 (https://www.froala.com/wysiwyg-editor) | ||
* froala_editor v3.0.6 (https://www.froala.com/wysiwyg-editor) | ||
* License https://froala.com/wysiwyg-editor/terms/ | ||
@@ -4,0 +4,0 @@ * Copyright 2014-2019 Froala Labs |
/*! | ||
* froala_editor v3.0.5 (https://www.froala.com/wysiwyg-editor) | ||
* froala_editor v3.0.6 (https://www.froala.com/wysiwyg-editor) | ||
* License https://froala.com/wysiwyg-editor/terms/ | ||
@@ -4,0 +4,0 @@ * Copyright 2014-2019 Froala Labs |
/*! | ||
* froala_editor v3.0.5 (https://www.froala.com/wysiwyg-editor) | ||
* froala_editor v3.0.6 (https://www.froala.com/wysiwyg-editor) | ||
* License https://froala.com/wysiwyg-editor/terms/ | ||
@@ -4,0 +4,0 @@ * Copyright 2014-2019 Froala Labs |
/*! | ||
* froala_editor v3.0.5 (https://www.froala.com/wysiwyg-editor) | ||
* froala_editor v3.0.6 (https://www.froala.com/wysiwyg-editor) | ||
* License https://froala.com/wysiwyg-editor/terms/ | ||
@@ -4,0 +4,0 @@ * Copyright 2014-2019 Froala Labs |
/*! | ||
* froala_editor v3.0.5 (https://www.froala.com/wysiwyg-editor) | ||
* froala_editor v3.0.6 (https://www.froala.com/wysiwyg-editor) | ||
* License https://froala.com/wysiwyg-editor/terms/ | ||
@@ -4,0 +4,0 @@ * Copyright 2014-2019 Froala Labs |
/*! | ||
* froala_editor v3.0.5 (https://www.froala.com/wysiwyg-editor) | ||
* froala_editor v3.0.6 (https://www.froala.com/wysiwyg-editor) | ||
* License https://froala.com/wysiwyg-editor/terms/ | ||
@@ -4,0 +4,0 @@ * Copyright 2014-2019 Froala Labs |
/*! | ||
* froala_editor v3.0.5 (https://www.froala.com/wysiwyg-editor) | ||
* froala_editor v3.0.6 (https://www.froala.com/wysiwyg-editor) | ||
* License https://froala.com/wysiwyg-editor/terms/ | ||
@@ -267,3 +267,3 @@ * Copyright 2014-2019 Froala Labs | ||
// Character Counter | ||
'Characters': 'Personnages', | ||
'Characters': 'Caractères', | ||
// More Buttons | ||
@@ -270,0 +270,0 @@ 'More Text': 'Plus de texte', |
/*! | ||
* froala_editor v3.0.5 (https://www.froala.com/wysiwyg-editor) | ||
* froala_editor v3.0.6 (https://www.froala.com/wysiwyg-editor) | ||
* License https://froala.com/wysiwyg-editor/terms/ | ||
@@ -4,0 +4,0 @@ * Copyright 2014-2019 Froala Labs |
/*! | ||
* froala_editor v3.0.5 (https://www.froala.com/wysiwyg-editor) | ||
* froala_editor v3.0.6 (https://www.froala.com/wysiwyg-editor) | ||
* License https://froala.com/wysiwyg-editor/terms/ | ||
@@ -4,0 +4,0 @@ * Copyright 2014-2019 Froala Labs |
/*! | ||
* froala_editor v3.0.5 (https://www.froala.com/wysiwyg-editor) | ||
* froala_editor v3.0.6 (https://www.froala.com/wysiwyg-editor) | ||
* License https://froala.com/wysiwyg-editor/terms/ | ||
@@ -4,0 +4,0 @@ * Copyright 2014-2019 Froala Labs |
/*! | ||
* froala_editor v3.0.5 (https://www.froala.com/wysiwyg-editor) | ||
* froala_editor v3.0.6 (https://www.froala.com/wysiwyg-editor) | ||
* License https://froala.com/wysiwyg-editor/terms/ | ||
@@ -4,0 +4,0 @@ * Copyright 2014-2019 Froala Labs |
/*! | ||
* froala_editor v3.0.5 (https://www.froala.com/wysiwyg-editor) | ||
* froala_editor v3.0.6 (https://www.froala.com/wysiwyg-editor) | ||
* License https://froala.com/wysiwyg-editor/terms/ | ||
@@ -4,0 +4,0 @@ * Copyright 2014-2019 Froala Labs |
/*! | ||
* froala_editor v3.0.5 (https://www.froala.com/wysiwyg-editor) | ||
* froala_editor v3.0.6 (https://www.froala.com/wysiwyg-editor) | ||
* License https://froala.com/wysiwyg-editor/terms/ | ||
@@ -4,0 +4,0 @@ * Copyright 2014-2019 Froala Labs |
/*! | ||
* froala_editor v3.0.5 (https://www.froala.com/wysiwyg-editor) | ||
* froala_editor v3.0.6 (https://www.froala.com/wysiwyg-editor) | ||
* License https://froala.com/wysiwyg-editor/terms/ | ||
@@ -4,0 +4,0 @@ * Copyright 2014-2019 Froala Labs |
/*! | ||
* froala_editor v3.0.5 (https://www.froala.com/wysiwyg-editor) | ||
* froala_editor v3.0.6 (https://www.froala.com/wysiwyg-editor) | ||
* License https://froala.com/wysiwyg-editor/terms/ | ||
@@ -4,0 +4,0 @@ * Copyright 2014-2019 Froala Labs |
/*! | ||
* froala_editor v3.0.5 (https://www.froala.com/wysiwyg-editor) | ||
* froala_editor v3.0.6 (https://www.froala.com/wysiwyg-editor) | ||
* License https://froala.com/wysiwyg-editor/terms/ | ||
@@ -4,0 +4,0 @@ * Copyright 2014-2019 Froala Labs |
/*! | ||
* froala_editor v3.0.5 (https://www.froala.com/wysiwyg-editor) | ||
* froala_editor v3.0.6 (https://www.froala.com/wysiwyg-editor) | ||
* License https://froala.com/wysiwyg-editor/terms/ | ||
@@ -4,0 +4,0 @@ * Copyright 2014-2019 Froala Labs |
/*! | ||
* froala_editor v3.0.5 (https://www.froala.com/wysiwyg-editor) | ||
* froala_editor v3.0.6 (https://www.froala.com/wysiwyg-editor) | ||
* License https://froala.com/wysiwyg-editor/terms/ | ||
@@ -4,0 +4,0 @@ * Copyright 2014-2019 Froala Labs |
/*! | ||
* froala_editor v3.0.5 (https://www.froala.com/wysiwyg-editor) | ||
* froala_editor v3.0.6 (https://www.froala.com/wysiwyg-editor) | ||
* License https://froala.com/wysiwyg-editor/terms/ | ||
@@ -4,0 +4,0 @@ * Copyright 2014-2019 Froala Labs |
/*! | ||
* froala_editor v3.0.5 (https://www.froala.com/wysiwyg-editor) | ||
* froala_editor v3.0.6 (https://www.froala.com/wysiwyg-editor) | ||
* License https://froala.com/wysiwyg-editor/terms/ | ||
@@ -4,0 +4,0 @@ * Copyright 2014-2019 Froala Labs |
/*! | ||
* froala_editor v3.0.5 (https://www.froala.com/wysiwyg-editor) | ||
* froala_editor v3.0.6 (https://www.froala.com/wysiwyg-editor) | ||
* License https://froala.com/wysiwyg-editor/terms/ | ||
@@ -4,0 +4,0 @@ * Copyright 2014-2019 Froala Labs |
/*! | ||
* froala_editor v3.0.5 (https://www.froala.com/wysiwyg-editor) | ||
* froala_editor v3.0.6 (https://www.froala.com/wysiwyg-editor) | ||
* License https://froala.com/wysiwyg-editor/terms/ | ||
@@ -4,0 +4,0 @@ * Copyright 2014-2019 Froala Labs |
/*! | ||
* froala_editor v3.0.5 (https://www.froala.com/wysiwyg-editor) | ||
* froala_editor v3.0.6 (https://www.froala.com/wysiwyg-editor) | ||
* License https://froala.com/wysiwyg-editor/terms/ | ||
@@ -4,0 +4,0 @@ * Copyright 2014-2019 Froala Labs |
/*! | ||
* froala_editor v3.0.5 (https://www.froala.com/wysiwyg-editor) | ||
* froala_editor v3.0.6 (https://www.froala.com/wysiwyg-editor) | ||
* License https://froala.com/wysiwyg-editor/terms/ | ||
@@ -4,0 +4,0 @@ * Copyright 2014-2019 Froala Labs |
/*! | ||
* froala_editor v3.0.5 (https://www.froala.com/wysiwyg-editor) | ||
* froala_editor v3.0.6 (https://www.froala.com/wysiwyg-editor) | ||
* License https://froala.com/wysiwyg-editor/terms/ | ||
@@ -4,0 +4,0 @@ * Copyright 2014-2019 Froala Labs |
/*! | ||
* froala_editor v3.0.5 (https://www.froala.com/wysiwyg-editor) | ||
* froala_editor v3.0.6 (https://www.froala.com/wysiwyg-editor) | ||
* License https://froala.com/wysiwyg-editor/terms/ | ||
@@ -4,0 +4,0 @@ * Copyright 2014-2019 Froala Labs |
/*! | ||
* froala_editor v3.0.5 (https://www.froala.com/wysiwyg-editor) | ||
* froala_editor v3.0.6 (https://www.froala.com/wysiwyg-editor) | ||
* License https://froala.com/wysiwyg-editor/terms/ | ||
@@ -4,0 +4,0 @@ * Copyright 2014-2019 Froala Labs |
/*! | ||
* froala_editor v3.0.5 (https://www.froala.com/wysiwyg-editor) | ||
* froala_editor v3.0.6 (https://www.froala.com/wysiwyg-editor) | ||
* License https://froala.com/wysiwyg-editor/terms/ | ||
@@ -4,0 +4,0 @@ * Copyright 2014-2019 Froala Labs |
/*! | ||
* froala_editor v3.0.5 (https://www.froala.com/wysiwyg-editor) | ||
* froala_editor v3.0.6 (https://www.froala.com/wysiwyg-editor) | ||
* License https://froala.com/wysiwyg-editor/terms/ | ||
@@ -4,0 +4,0 @@ * Copyright 2014-2019 Froala Labs |
/*! | ||
* froala_editor v3.0.5 (https://www.froala.com/wysiwyg-editor) | ||
* froala_editor v3.0.6 (https://www.froala.com/wysiwyg-editor) | ||
* License https://froala.com/wysiwyg-editor/terms/ | ||
@@ -4,0 +4,0 @@ * Copyright 2014-2019 Froala Labs |
/*! | ||
* froala_editor v3.0.5 (https://www.froala.com/wysiwyg-editor) | ||
* froala_editor v3.0.6 (https://www.froala.com/wysiwyg-editor) | ||
* License https://froala.com/wysiwyg-editor/terms/ | ||
@@ -4,0 +4,0 @@ * Copyright 2014-2019 Froala Labs |
/*! | ||
* froala_editor v3.0.5 (https://www.froala.com/wysiwyg-editor) | ||
* froala_editor v3.0.6 (https://www.froala.com/wysiwyg-editor) | ||
* License https://froala.com/wysiwyg-editor/terms/ | ||
@@ -4,0 +4,0 @@ * Copyright 2014-2019 Froala Labs |
/*! | ||
* froala_editor v3.0.5 (https://www.froala.com/wysiwyg-editor) | ||
* froala_editor v3.0.6 (https://www.froala.com/wysiwyg-editor) | ||
* License https://froala.com/wysiwyg-editor/terms/ | ||
@@ -4,0 +4,0 @@ * Copyright 2014-2019 Froala Labs |
/*! | ||
* froala_editor v3.0.5 (https://www.froala.com/wysiwyg-editor) | ||
* froala_editor v3.0.6 (https://www.froala.com/wysiwyg-editor) | ||
* License https://froala.com/wysiwyg-editor/terms/ | ||
@@ -4,0 +4,0 @@ * Copyright 2014-2019 Froala Labs |
/*! | ||
* froala_editor v3.0.5 (https://www.froala.com/wysiwyg-editor) | ||
* froala_editor v3.0.6 (https://www.froala.com/wysiwyg-editor) | ||
* License https://froala.com/wysiwyg-editor/terms/ | ||
@@ -7,2 +7,2 @@ * Copyright 2014-2019 Froala Labs | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(require("froala-editor")):"function"==typeof define&&define.amd?define(["froala-editor"],t):t(e.FroalaEditor)}(this,function(e){"use strict";(e=e&&e.hasOwnProperty("default")?e["default"]:e).PLUGINS.codeBeautifier=function(){var e,t,n,i,Q={};function y(i,e){var t={"@page":!0,"@font-face":!0,"@keyframes":!0,"@media":!0,"@supports":!0,"@document":!0},n={"@media":!0,"@supports":!0,"@document":!0};e=e||{},i=(i=i||"").replace(/\r\n|[\r\u2028\u2029]/g,"\n");var r=e.indent_size||4,s=e.indent_char||" ",_=e.selector_separator_newline===undefined||e.selector_separator_newline,a=e.end_with_newline!==undefined&&e.end_with_newline,o=e.newline_between_rules===undefined||e.newline_between_rules,l=e.eol?e.eol:"\n";"string"==typeof r&&(r=parseInt(r,10)),e.indent_with_tabs&&(s="\t",r=1),l=l.replace(/\\r/,"\r").replace(/\\n/,"\n");var h,c=/^\s+$/,u=-1,p=0;function d(){return(h=i.charAt(++u))||""}function f(e){var t,n=u;return e&&E(),t=i.charAt(u+1)||"",u=n-1,d(),t}function T(e){for(var t=u;d();)if("\\"===h)d();else{if(-1!==e.indexOf(h))break;if("\n"===h)break}return i.substring(t,u+1)}function E(){for(var e="";c.test(f());)d(),e+=h;return e}function g(){var e="";for(h&&c.test(h)&&(e=h);c.test(d());)e+=h;return e}function x(e){var t=u;for(e="/"===f(),d();d();){if(!e&&"*"===h&&"/"===f()){d();break}if(e&&"\n"===h)return i.substring(t,u)}return i.substring(t,u)+h}function w(e){return i.substring(u-e.length,u).toLowerCase()===e}function K(){for(var e=0,t=u+1;t<i.length;t++){var n=i.charAt(t);if("{"===n)return!0;if("("===n)e+=1;else if(")"===n){if(0===e)return!1;e-=1}else if(" "===n||"}"===n)return!1}return!1}var R=i.match(/^[\t ]*/)[0],m=new Array(r+1).join(s),b=0,v=0;for(var S,A,k={"{":function(e){k.singleSpace(),y.push(e),k.newLine()},"}":function(e){k.newLine(),y.push(e),k.newLine()},_lastCharWhitespace:function(){return c.test(y[y.length-1])},newLine:function(e){y.length&&(e||"\n"===y[y.length-1]||k.trim(),y.push("\n"),R&&y.push(R))},singleSpace:function(){y.length&&!k._lastCharWhitespace()&&y.push(" ")},preserveSingleSpace:function(){isAfterSpace&&k.singleSpace()},trim:function(){for(;k._lastCharWhitespace();)y.pop()}},y=[],O=!1,N=!1,D=!1,C="",L="";;){var I=-1!==g().indexOf("\n");if(L=C,!(C=h))break;if("/"===h&&"*"===f()){var V=0===b;(I||V)&&k.newLine(),y.push(x()),k.newLine(),V&&k.newLine(!0)}else if("/"===h&&"/"===f())I||"{"===L||k.trim(),k.singleSpace(),y.push(x()),k.newLine();else if("@"===h){k.preserveSingleSpace(),y.push(h);var P=(void 0,S=u,A=T(": , {}()[]/='\""),u=S-1,d(),A);P.match(/[ :]$/)&&(d(),P=T(": ").replace(/\s$/,""),y.push(P),k.singleSpace()),(P=P.replace(/\s$/,""))in t&&(v+=1,P in n&&(D=!0))}else"#"===h&&"{"===f()?(k.preserveSingleSpace(),y.push(T("}"))):"{"===h?"}"===f(!0)?(E(),d(),k.singleSpace(),y.push("{}"),k.newLine(),o&&0===b&&k.newLine(!0)):(b++,R+=m,k["{"](h),O=D?(D=!1,v<b):v<=b):"}"===h?(b--,R=R.slice(0,-r),k["}"](h),N=O=!1,v&&v--,o&&0===b&&k.newLine(!0)):":"===h?(E(),!O&&!D||w("&")||K()?":"===f()?(d(),y.push("::")):y.push(":"):(N=!0,y.push(":"),k.singleSpace())):'"'===h||"'"===h?(k.preserveSingleSpace(),y.push(T(h))):" "===h?(N=!1,y.push(h),k.newLine()):"("===h?w("url")?(y.push(h),E(),d()&&(")"!==h&&'"'!==h&&"'"!==h?y.push(T(")")):u--)):(p++,k.preserveSingleSpace(),y.push(h),E()):")"===h?(y.push(h),p--):","===h?(y.push(h),E(),_&&!N&&p<1?k.newLine():k.singleSpace()):("]"===h||("["===h?k.preserveSingleSpace():"="===h?(E(),h="="):k.preserveSingleSpace()),y.push(h))}var B="";return R&&(B+=R),B+=y.join("").replace(/[\r\n\t ]+$/,""),a&&(B+="\n"),"\n"!=l&&(B=B.replace(/[\n]/g,l)),B}function Y(e,t){for(var n=0;n<t.length;n+=1)if(t[n]===e)return!0;return!1}function H(e){return e.replace(/^\s+|\s+$/g,"")}function O(e,t){return new r(e,t).beautify()}e=Q,t="\xaa\xb5\xba\xc0-\xd6\xd8-\xf6\xf8-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0370-\u0374\u0376\u0377\u037a-\u037d\u0386\u0388-\u038a\u038c\u038e-\u03a1\u03a3-\u03f5\u03f7-\u0481\u048a-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05d0-\u05ea\u05f0-\u05f2\u0620-\u064a\u066e\u066f\u0671-\u06d3\u06d5\u06e5\u06e6\u06ee\u06ef\u06fa-\u06fc\u06ff\u0710\u0712-\u072f\u074d-\u07a5\u07b1\u07ca-\u07ea\u07f4\u07f5\u07fa\u0800-\u0815\u081a\u0824\u0828\u0840-\u0858\u08a0\u08a2-\u08ac\u0904-\u0939\u093d\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097f\u0985-\u098c\u098f\u0990\u0993-\u09a8\u09aa-\u09b0\u09b2\u09b6-\u09b9\u09bd\u09ce\u09dc\u09dd\u09df-\u09e1\u09f0\u09f1\u0a05-\u0a0a\u0a0f\u0a10\u0a13-\u0a28\u0a2a-\u0a30\u0a32\u0a33\u0a35\u0a36\u0a38\u0a39\u0a59-\u0a5c\u0a5e\u0a72-\u0a74\u0a85-\u0a8d\u0a8f-\u0a91\u0a93-\u0aa8\u0aaa-\u0ab0\u0ab2\u0ab3\u0ab5-\u0ab9\u0abd\u0ad0\u0ae0\u0ae1\u0b05-\u0b0c\u0b0f\u0b10\u0b13-\u0b28\u0b2a-\u0b30\u0b32\u0b33\u0b35-\u0b39\u0b3d\u0b5c\u0b5d\u0b5f-\u0b61\u0b71\u0b83\u0b85-\u0b8a\u0b8e-\u0b90\u0b92-\u0b95\u0b99\u0b9a\u0b9c\u0b9e\u0b9f\u0ba3\u0ba4\u0ba8-\u0baa\u0bae-\u0bb9\u0bd0\u0c05-\u0c0c\u0c0e-\u0c10\u0c12-\u0c28\u0c2a-\u0c33\u0c35-\u0c39\u0c3d\u0c58\u0c59\u0c60\u0c61\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbd\u0cde\u0ce0\u0ce1\u0cf1\u0cf2\u0d05-\u0d0c\u0d0e-\u0d10\u0d12-\u0d3a\u0d3d\u0d4e\u0d60\u0d61\u0d7a-\u0d7f\u0d85-\u0d96\u0d9a-\u0db1\u0db3-\u0dbb\u0dbd\u0dc0-\u0dc6\u0e01-\u0e30\u0e32\u0e33\u0e40-\u0e46\u0e81\u0e82\u0e84\u0e87\u0e88\u0e8a\u0e8d\u0e94-\u0e97\u0e99-\u0e9f\u0ea1-\u0ea3\u0ea5\u0ea7\u0eaa\u0eab\u0ead-\u0eb0\u0eb2\u0eb3\u0ebd\u0ec0-\u0ec4\u0ec6\u0edc-\u0edf\u0f00\u0f40-\u0f47\u0f49-\u0f6c\u0f88-\u0f8c\u1000-\u102a\u103f\u1050-\u1055\u105a-\u105d\u1061\u1065\u1066\u106e-\u1070\u1075-\u1081\u108e\u10a0-\u10c5\u10c7\u10cd\u10d0-\u10fa\u10fc-\u1248\u124a-\u124d\u1250-\u1256\u1258\u125a-\u125d\u1260-\u1288\u128a-\u128d\u1290-\u12b0\u12b2-\u12b5\u12b8-\u12be\u12c0\u12c2-\u12c5\u12c8-\u12d6\u12d8-\u1310\u1312-\u1315\u1318-\u135a\u1380-\u138f\u13a0-\u13f4\u1401-\u166c\u166f-\u167f\u1681-\u169a\u16a0-\u16ea\u16ee-\u16f0\u1700-\u170c\u170e-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176c\u176e-\u1770\u1780-\u17b3\u17d7\u17dc\u1820-\u1877\u1880-\u18a8\u18aa\u18b0-\u18f5\u1900-\u191c\u1950-\u196d\u1970-\u1974\u1980-\u19ab\u19c1-\u19c7\u1a00-\u1a16\u1a20-\u1a54\u1aa7\u1b05-\u1b33\u1b45-\u1b4b\u1b83-\u1ba0\u1bae\u1baf\u1bba-\u1be5\u1c00-\u1c23\u1c4d-\u1c4f\u1c5a-\u1c7d\u1ce9-\u1cec\u1cee-\u1cf1\u1cf5\u1cf6\u1d00-\u1dbf\u1e00-\u1f15\u1f18-\u1f1d\u1f20-\u1f45\u1f48-\u1f4d\u1f50-\u1f57\u1f59\u1f5b\u1f5d\u1f5f-\u1f7d\u1f80-\u1fb4\u1fb6-\u1fbc\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fcc\u1fd0-\u1fd3\u1fd6-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ff4\u1ff6-\u1ffc\u2071\u207f\u2090-\u209c\u2102\u2107\u210a-\u2113\u2115\u2119-\u211d\u2124\u2126\u2128\u212a-\u212d\u212f-\u2139\u213c-\u213f\u2145-\u2149\u214e\u2160-\u2188\u2c00-\u2c2e\u2c30-\u2c5e\u2c60-\u2ce4\u2ceb-\u2cee\u2cf2\u2cf3\u2d00-\u2d25\u2d27\u2d2d\u2d30-\u2d67\u2d6f\u2d80-\u2d96\u2da0-\u2da6\u2da8-\u2dae\u2db0-\u2db6\u2db8-\u2dbe\u2dc0-\u2dc6\u2dc8-\u2dce\u2dd0-\u2dd6\u2dd8-\u2dde\u2e2f\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303c\u3041-\u3096\u309d-\u309f\u30a1-\u30fa\u30fc-\u30ff\u3105-\u312d\u3131-\u318e\u31a0-\u31ba\u31f0-\u31ff\u3400-\u4db5\u4e00-\u9fcc\ua000-\ua48c\ua4d0-\ua4fd\ua500-\ua60c\ua610-\ua61f\ua62a\ua62b\ua640-\ua66e\ua67f-\ua697\ua6a0-\ua6ef\ua717-\ua71f\ua722-\ua788\ua78b-\ua78e\ua790-\ua793\ua7a0-\ua7aa\ua7f8-\ua801\ua803-\ua805\ua807-\ua80a\ua80c-\ua822\ua840-\ua873\ua882-\ua8b3\ua8f2-\ua8f7\ua8fb\ua90a-\ua925\ua930-\ua946\ua960-\ua97c\ua984-\ua9b2\ua9cf\uaa00-\uaa28\uaa40-\uaa42\uaa44-\uaa4b\uaa60-\uaa76\uaa7a\uaa80-\uaaaf\uaab1\uaab5\uaab6\uaab9-\uaabd\uaac0\uaac2\uaadb-\uaadd\uaae0-\uaaea\uaaf2-\uaaf4\uab01-\uab06\uab09-\uab0e\uab11-\uab16\uab20-\uab26\uab28-\uab2e\uabc0-\uabe2\uac00-\ud7a3\ud7b0-\ud7c6\ud7cb-\ud7fb\uf900-\ufa6d\ufa70-\ufad9\ufb00-\ufb06\ufb13-\ufb17\ufb1d\ufb1f-\ufb28\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40\ufb41\ufb43\ufb44\ufb46-\ufbb1\ufbd3-\ufd3d\ufd50-\ufd8f\ufd92-\ufdc7\ufdf0-\ufdfb\ufe70-\ufe74\ufe76-\ufefc\uff21-\uff3a\uff41-\uff5a\uff66-\uffbe\uffc2-\uffc7\uffca-\uffcf\uffd2-\uffd7\uffda-\uffdc",n=new RegExp("["+t+"]"),i=new RegExp("["+t+"\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]"),e.newline=/[\n\r\u2028\u2029]/,e.lineBreak=new RegExp("\r\n|"+e.newline.source),e.allLineBreaks=new RegExp(e.lineBreak.source,"g"),e.isIdentifierStart=function(e){return e<65?36===e||64===e:e<91||(e<97?95===e:e<123||170<=e&&n.test(String.fromCharCode(e)))},e.isIdentifierChar=function(e){return e<48?36===e:e<58||!(e<65)&&(e<91||(e<97?95===e:e<123||170<=e&&i.test(String.fromCharCode(e))))};var Z={BlockStatement:"BlockStatement",Statement:"Statement",ObjectLiteral:"ObjectLiteral",ArrayLiteral:"ArrayLiteral",ForInitializer:"ForInitializer",Conditional:"Conditional",Expression:"Expression"};function r(i,e){var l,r,s,h,_,a,o,c,u,t,n,p,d,f=[],T="";function E(e,t){var n=0;return e&&(n=e.indentation_level,!l.just_added_newline()&&e.line_indent_level>n&&(n=e.line_indent_level)),{mode:t,parent:e,last_text:e?e.last_text:"",last_word:e?e.last_word:"",declaration_statement:!1,declaration_assignment:!1,multiline_frame:!1,if_block:!1,else_block:!1,do_block:!1,do_while:!1,in_case_statement:!1,in_case:!1,case_body:!1,indentation_level:n,line_indent_level:e?e.line_indent_level:n,start_line_index:l.get_line_number(),ternary_depth:0}}for(p={TK_START_EXPR:function L(){O();var e=Z.Expression;if("["===h.text){if("TK_WORD"===_||")"===c.last_text)return"TK_RESERVED"===_&&Y(c.last_text,s.line_starters)&&(l.space_before_token=!0),v(e),m(),b(),void(d.space_in_paren&&(l.space_before_token=!0));e=Z.ArrayLiteral,S(c.mode)&&("["!==c.last_text&&(","!==c.last_text||"]"!==a&&"}"!==a)||d.keep_array_indentation||K())}else"TK_RESERVED"===_&&"for"===c.last_text?e=Z.ForInitializer:"TK_RESERVED"===_&&Y(c.last_text,["if","while"])&&(e=Z.Conditional);" "===c.last_text||"TK_START_BLOCK"===_?K():"TK_END_EXPR"===_||"TK_START_EXPR"===_||"TK_END_BLOCK"===_||"."===c.last_text?w(h.wanted_newline):"TK_RESERVED"===_&&"("===h.text||"TK_WORD"===_||"TK_OPERATOR"===_?"TK_RESERVED"===_&&("function"===c.last_word||"typeof"===c.last_word)||"*"===c.last_text&&"function"===a?d.space_after_anon_function&&(l.space_before_token=!0):"TK_RESERVED"!==_||!Y(c.last_text,s.line_starters)&&"catch"!==c.last_text||d.space_before_conditional&&(l.space_before_token=!0):l.space_before_token=!0;"("===h.text&&"TK_RESERVED"===_&&"await"===c.last_word&&(l.space_before_token=!0);"("===h.text&&("TK_EQUALS"!==_&&"TK_OPERATOR"!==_||y()||w());v(e),m(),d.space_in_paren&&(l.space_before_token=!0);b()},TK_END_EXPR:function I(){for(;c.mode===Z.Statement;)k();c.multiline_frame&&w("]"===h.text&&S(c.mode)&&!d.keep_array_indentation);d.space_in_paren&&("TK_START_EXPR"!==_||d.space_in_empty_paren?l.space_before_token=!0:(l.trim(),l.space_before_token=!1));"]"===h.text&&d.keep_array_indentation?(m(),k()):(k(),m());l.remove_redundant_indentation(u),c.do_while&&u.mode===Z.Conditional&&(u.mode=Z.Expression,c.do_block=!1,c.do_while=!1)},TK_START_BLOCK:function V(){var e=D(1),t=D(2);t&&(":"===t.text&&Y(e.type,["TK_STRING","TK_WORD","TK_RESERVED"])||Y(e.text,["get","set"])&&Y(t.type,["TK_WORD","TK_RESERVED"]))?Y(a,["class","interface"])?v(Z.BlockStatement):v(Z.ObjectLiteral):v(Z.BlockStatement);var n=!e.comments_before.length&&"}"===e.text&&"function"===c.last_word&&"TK_END_EXPR"===_;"expand"===d.brace_style||"none"===d.brace_style&&h.wanted_newline?"TK_OPERATOR"!==_&&(n||"TK_EQUALS"===_||"TK_RESERVED"===_&&N(c.last_text)&&"else"!==c.last_text)?l.space_before_token=!0:K(!1,!0):"TK_OPERATOR"!==_&&"TK_START_EXPR"!==_?"TK_START_BLOCK"===_?K():l.space_before_token=!0:S(u.mode)&&","===c.last_text&&("}"===a?l.space_before_token=!0:K());m(),b()},TK_END_BLOCK:function P(){for(;c.mode===Z.Statement;)k();var e="TK_START_BLOCK"===_;"expand"===d.brace_style?e||K():e||(S(c.mode)&&d.keep_array_indentation?(d.keep_array_indentation=!1,K(),d.keep_array_indentation=!0):K());k(),m()},TK_WORD:C,TK_RESERVED:C,TK_SEMICOLON:function B(){O()&&(l.space_before_token=!1);for(;c.mode===Z.Statement&&!c.if_block&&!c.do_block;)k();m()},TK_STRING:function j(){O()?l.space_before_token=!0:"TK_RESERVED"===_||"TK_WORD"===_?l.space_before_token=!0:"TK_COMMA"===_||"TK_START_EXPR"===_||"TK_EQUALS"===_||"TK_OPERATOR"===_?y()||w():K();m()},TK_EQUALS:function M(){O();c.declaration_statement&&(c.declaration_assignment=!0);l.space_before_token=!0,m(),l.space_before_token=!0},TK_OPERATOR:function U(){O();if("TK_RESERVED"===_&&N(c.last_text))return l.space_before_token=!0,void m();if("*"===h.text&&"TK_DOT"===_)return void m();if(":"===h.text&&c.in_case)return c.case_body=!0,b(),m(),K(),void(c.in_case=!1);if("::"===h.text)return void m();"TK_OPERATOR"===_&&w();var e=!0,t=!0;Y(h.text,["--","++","!","~"])||Y(h.text,["-","+"])&&(Y(_,["TK_START_BLOCK","TK_START_EXPR","TK_EQUALS","TK_OPERATOR"])||Y(c.last_text,s.line_starters)||","===c.last_text)?(t=e=!1,!h.wanted_newline||"--"!==h.text&&"++"!==h.text||K(!1,!0)," "===c.last_text&&A(c.mode)&&(e=!0),"TK_RESERVED"===_?e=!0:"TK_END_EXPR"===_?e=!("]"===c.last_text&&("--"===h.text||"++"===h.text)):"TK_OPERATOR"===_&&(e=Y(h.text,["--","-","++","+"])&&Y(c.last_text,["--","-","++","+"]),Y(h.text,["+","-"])&&Y(c.last_text,["--","++"])&&(t=!0)),c.mode!==Z.BlockStatement&&c.mode!==Z.Statement||"{"!==c.last_text&&" "!==c.last_text||K()):":"===h.text?0===c.ternary_depth?e=!1:c.ternary_depth-=1:"?"===h.text?c.ternary_depth+=1:"*"===h.text&&"TK_RESERVED"===_&&"function"===c.last_text&&(t=e=!1);l.space_before_token=l.space_before_token||e,m(),l.space_before_token=t},TK_COMMA:function W(){if(c.declaration_statement)return A(c.parent.mode)&&(c.declaration_assignment=!1),m(),void(c.declaration_assignment?K(c.declaration_assignment=!1,!0):(l.space_before_token=!0,d.comma_first&&w()));m(),c.mode===Z.ObjectLiteral||c.mode===Z.Statement&&c.parent.mode===Z.ObjectLiteral?(c.mode===Z.Statement&&k(),K()):(l.space_before_token=!0,d.comma_first&&w())},TK_BLOCK_COMMENT:function z(){if(l.raw)return l.add_raw_token(h),void(h.directives&&"end"===h.directives.preserve&&(d.test_output_raw||(l.raw=!1)));if(h.directives)return K(!1,!0),m(),"start"===h.directives.preserve&&(l.raw=!0),void K(!1,!0);if(!Q.newline.test(h.text)&&!h.wanted_newline)return l.space_before_token=!0,m(),void(l.space_before_token=!0);var e,t=function _(e){var t;e=e.replace(/\x0d/g,"");var n=[];t=e.indexOf("\n");for(;-1!==t;)n.push(e.substring(0,t)),e=e.substring(t+1),t=e.indexOf("\n");e.length&&n.push(e);return n}(h.text),n=!1,i=!1,r=h.whitespace_before,s=r.length;K(!1,!0),1<t.length&&(!function a(e,t){for(var n=0;n<e.length;n++){var i=H(e[n]);if(i.charAt(0)!==t)return!1}return!0}(t.slice(1),"*")?function o(e,t){for(var n,i=0,r=e.length;i<r;i++)if((n=e[i])&&0!==n.indexOf(t))return!1;return!0}(t.slice(1),r)&&(i=!0):n=!0);for(m(t[0]),e=1;e<t.length;e++)K(!1,!0),n?m(" "+t[e].replace(/^\s+/g,"")):i&&t[e].length>s?m(t[e].substring(s)):l.add_token(t[e]);K(!1,!0)},TK_COMMENT:function G(){h.wanted_newline?K(!1,!0):l.trim(!0);l.space_before_token=!0,m(),K(!1,!0)},TK_DOT:function X(){O();"TK_RESERVED"===_&&N(c.last_text)?l.space_before_token=!0:w(")"===c.last_text&&d.break_chained_methods);m()},TK_UNKNOWN:function F(){m(),"\n"===h.text[h.text.length-1]&&K()},TK_EOF:function $(){for(;c.mode===Z.Statement;)k()}},d={},(e=e||{}).braces_on_own_line!==undefined&&(d.brace_style=e.braces_on_own_line?"expand":"collapse"),d.brace_style=e.brace_style?e.brace_style:d.brace_style?d.brace_style:"collapse","expand-strict"===d.brace_style&&(d.brace_style="expand"),d.indent_size=e.indent_size?parseInt(e.indent_size,10):4,d.indent_char=e.indent_char?e.indent_char:" ",d.eol=e.eol?e.eol:"\n",d.preserve_newlines=e.preserve_newlines===undefined||e.preserve_newlines,d.break_chained_methods=e.break_chained_methods!==undefined&&e.break_chained_methods,d.max_preserve_newlines=e.max_preserve_newlines===undefined?0:parseInt(e.max_preserve_newlines,10),d.space_in_paren=e.space_in_paren!==undefined&&e.space_in_paren,d.space_in_empty_paren=e.space_in_empty_paren!==undefined&&e.space_in_empty_paren,d.jslint_happy=e.jslint_happy!==undefined&&e.jslint_happy,d.space_after_anon_function=e.space_after_anon_function!==undefined&&e.space_after_anon_function,d.keep_array_indentation=e.keep_array_indentation!==undefined&&e.keep_array_indentation,d.space_before_conditional=e.space_before_conditional===undefined||e.space_before_conditional,d.unescape_strings=e.unescape_strings!==undefined&&e.unescape_strings,d.wrap_line_length=e.wrap_line_length===undefined?0:parseInt(e.wrap_line_length,10),d.e4x=e.e4x!==undefined&&e.e4x,d.end_with_newline=e.end_with_newline!==undefined&&e.end_with_newline,d.comma_first=e.comma_first!==undefined&&e.comma_first,d.test_output_raw=e.test_output_raw!==undefined&&e.test_output_raw,d.jslint_happy&&(d.space_after_anon_function=!0),e.indent_with_tabs&&(d.indent_char="\t",d.indent_size=1),d.eol=d.eol.replace(/\\r/,"\r").replace(/\\n/,"\n"),o="";0<d.indent_size;)o+=d.indent_char,d.indent_size-=1;var g=0;if(i&&i.length){for(;" "===i.charAt(g)||"\t"===i.charAt(g);)T+=i.charAt(g),g+=1;i=i.substring(g)}function x(e){var t=e.newlines;if(d.keep_array_indentation&&S(c.mode))for(var n=0;n<t;n+=1)K(0<n);else if(d.max_preserve_newlines&&t>d.max_preserve_newlines&&(t=d.max_preserve_newlines),d.preserve_newlines&&1<e.newlines){K();for(var i=1;i<t;i+=1)K(!0)}p[(h=e).type]()}function w(e){if(e=e!==undefined&&e,!l.just_added_newline())if(d.preserve_newlines&&h.wanted_newline||e)K(!1,!0);else if(d.wrap_line_length){l.current_line.get_character_count()+h.text.length+(l.space_before_token?1:0)>=d.wrap_line_length&&K(!1,!0)}}function K(e,t){if(!t&&" "!==c.last_text&&","!==c.last_text&&"="!==c.last_text&&"TK_OPERATOR"!==_)for(;c.mode===Z.Statement&&!c.if_block&&!c.do_block;)k();l.add_new_line(e)&&(c.multiline_frame=!0)}function R(){l.just_added_newline()&&(d.keep_array_indentation&&S(c.mode)&&h.wanted_newline?(l.current_line.push(h.whitespace_before),l.space_before_token=!1):l.set_indent(c.indentation_level)&&(c.line_indent_level=c.indentation_level))}function m(e){l.raw?l.add_raw_token(h):(d.comma_first&&"TK_COMMA"===_&&l.just_added_newline()&&","===l.previous_line.last()&&(l.previous_line.pop(),R(),l.add_token(","),l.space_before_token=!0),e=e||h.text,R(),l.add_token(e))}function b(){c.indentation_level+=1}function v(e){u=c?(t.push(c),c):E(null,e),c=E(u,e)}function S(e){return e===Z.ArrayLiteral}function A(e){return Y(e,[Z.Expression,Z.ForInitializer,Z.Conditional])}function k(){0<t.length&&(u=c,c=t.pop(),u.mode===Z.Statement&&l.remove_redundant_indentation(u))}function y(){return c.parent.mode===Z.ObjectLiteral&&c.mode===Z.Statement&&(":"===c.last_text&&0===c.ternary_depth||"TK_RESERVED"===_&&Y(c.last_text,["get","set"]))}function O(){return!!("TK_RESERVED"===_&&Y(c.last_text,["const","let","const"])&&"TK_WORD"===h.type||"TK_RESERVED"===_&&"do"===c.last_text||"TK_RESERVED"===_&&"return"===c.last_text&&!h.wanted_newline||"TK_RESERVED"===_&&"else"===c.last_text&&("TK_RESERVED"!==h.type||"if"!==h.text)||"TK_END_EXPR"===_&&(u.mode===Z.ForInitializer||u.mode===Z.Conditional)||"TK_WORD"===_&&c.mode===Z.BlockStatement&&!c.in_case&&"--"!==h.text&&"++"!==h.text&&"function"!==a&&"TK_WORD"!==h.type&&"TK_RESERVED"!==h.type||c.mode===Z.ObjectLiteral&&(":"===c.last_text&&0===c.ternary_depth||"TK_RESERVED"===_&&Y(c.last_text,["get","set"])))&&(v(Z.Statement),b(),"TK_RESERVED"===_&&Y(c.last_text,["const","let","const"])&&"TK_WORD"===h.type&&(c.declaration_statement=!0),y()||w("TK_RESERVED"===h.type&&Y(h.text,["do","for","if","while"])),!0)}function N(e){return Y(e,["case","return","do","if","throw","else"])}function D(e){var t=r+(e||0);return t<0||t>=f.length?null:f[t]}function C(){("TK_RESERVED"===h.type&&c.mode!==Z.ObjectLiteral&&Y(h.text,["set","get"])&&(h.type="TK_WORD"),"TK_RESERVED"===h.type&&c.mode===Z.ObjectLiteral)&&(":"===D(1).text&&(h.type="TK_WORD"));if(O()||!h.wanted_newline||A(c.mode)||"TK_OPERATOR"===_&&"--"!==c.last_text&&"++"!==c.last_text||"TK_EQUALS"===_||!d.preserve_newlines&&"TK_RESERVED"===_&&Y(c.last_text,["const","let","const","set","get"])||K(),c.do_block&&!c.do_while){if("TK_RESERVED"===h.type&&"while"===h.text)return l.space_before_token=!0,m(),l.space_before_token=!0,void(c.do_while=!0);K(),c.do_block=!1}if(c.if_block)if(c.else_block||"TK_RESERVED"!==h.type||"else"!==h.text){for(;c.mode===Z.Statement;)k();c.if_block=!1,c.else_block=!1}else c.else_block=!0;if("TK_RESERVED"===h.type&&("case"===h.text||"default"===h.text&&c.in_case_statement))return K(),(c.case_body||d.jslint_happy)&&(!function e(){0<c.indentation_level&&(!c.parent||c.indentation_level>c.parent.indentation_level)&&(c.indentation_level-=1)}(),c.case_body=!1),m(),c.in_case=!0,void(c.in_case_statement=!0);if("TK_RESERVED"===h.type&&"function"===h.text&&((Y(c.last_text,["}"," "])||l.just_added_newline()&&!Y(c.last_text,["[","{",":","=",","]))&&(l.just_added_blankline()||h.comments_before.length||(K(),K(!0))),"TK_RESERVED"===_||"TK_WORD"===_?"TK_RESERVED"===_&&Y(c.last_text,["get","set","new","return","export","async"])?l.space_before_token=!0:"TK_RESERVED"===_&&"default"===c.last_text&&"export"===a?l.space_before_token=!0:K():"TK_OPERATOR"===_||"="===c.last_text?l.space_before_token=!0:(c.multiline_frame||!A(c.mode)&&!S(c.mode))&&K()),"TK_COMMA"!==_&&"TK_START_EXPR"!==_&&"TK_EQUALS"!==_&&"TK_OPERATOR"!==_||y()||w(),"TK_RESERVED"===h.type&&Y(h.text,["function","get","set"]))return m(),void(c.last_word=h.text);(n="NONE","TK_END_BLOCK"===_?"TK_RESERVED"===h.type&&Y(h.text,["else","catch","finally"])?"expand"===d.brace_style||"end-expand"===d.brace_style||"none"===d.brace_style&&h.wanted_newline?n="NEWLINE":(n="SPACE",l.space_before_token=!0):n="NEWLINE":"TK_SEMICOLON"===_&&c.mode===Z.BlockStatement?n="NEWLINE":"TK_SEMICOLON"===_&&A(c.mode)?n="SPACE":"TK_STRING"===_?n="NEWLINE":"TK_RESERVED"===_||"TK_WORD"===_||"*"===c.last_text&&"function"===a?n="SPACE":"TK_START_BLOCK"===_?n="NEWLINE":"TK_END_EXPR"===_&&(l.space_before_token=!0,n="NEWLINE"),"TK_RESERVED"===h.type&&Y(h.text,s.line_starters)&&")"!==c.last_text&&(n="else"===c.last_text||"export"===c.last_text?"SPACE":"NEWLINE"),"TK_RESERVED"===h.type&&Y(h.text,["else","catch","finally"]))?"TK_END_BLOCK"!==_||"expand"===d.brace_style||"end-expand"===d.brace_style||"none"===d.brace_style&&h.wanted_newline?K():(l.trim(!0),"}"!==l.current_line.last()&&K(),l.space_before_token=!0):"NEWLINE"===n?"TK_RESERVED"===_&&N(c.last_text)?l.space_before_token=!0:"TK_END_EXPR"!==_?"TK_START_EXPR"===_&&"TK_RESERVED"===h.type&&Y(h.text,["const","let","const"])||":"===c.last_text||("TK_RESERVED"===h.type&&"if"===h.text&&"else"===c.last_text?l.space_before_token=!0:K()):"TK_RESERVED"===h.type&&Y(h.text,s.line_starters)&&")"!==c.last_text&&K():c.multiline_frame&&S(c.mode)&&","===c.last_text&&"}"===a?K():"SPACE"===n&&(l.space_before_token=!0);m(),c.last_word=h.text,"TK_RESERVED"===h.type&&"do"===h.text&&(c.do_block=!0),"TK_RESERVED"===h.type&&"if"===h.text&&(c.if_block=!0)}_="TK_START_BLOCK",a="",(l=new q(o,T)).raw=d.test_output_raw,t=[],v(Z.BlockStatement),this.beautify=function(){var e,t;for(s=new ee(i,d,o),f=s.tokenize(),r=0;e=D();){for(var n=0;n<e.comments_before.length;n++)x(e.comments_before[n]);x(e),a=c.last_text,_=e.type,c.last_text=e.text,r+=1}return t=l.get_code(),d.end_with_newline&&(t+="\n"),"\n"!=d.eol&&(t=t.replace(/[\n]/g,d.eol)),t}}function s(t){var n=0,i=-1,r=[],s=!0;this.set_indent=function(e){n=t.baseIndentLength+e*t.indent_length,i=e},this.get_character_count=function(){return n},this.is_empty=function(){return s},this.last=function(){return this._empty?null:r[r.length-1]},this.push=function(e){r.push(e),n+=e.length,s=!1},this.pop=function(){var e=null;return s||(e=r.pop(),n-=e.length,s=0===r.length),e},this.remove_indent=function(){0<i&&(i-=1,n-=t.indent_length)},this.trim=function(){for(;" "===this.last();)r.pop(),n-=1;s=0===r.length},this.toString=function(){var e="";return this._empty||(0<=i&&(e=t.indent_cache[i]),e+=r.join("")),e}}function q(t,n){n=n||"",this.indent_cache=[n],this.baseIndentLength=n.length,this.indent_length=t.length,this.raw=!1;var i=[];this.baseIndentString=n,this.indent_string=t,this.previous_line=null,this.current_line=null,this.space_before_token=!1,this.add_outputline=function(){this.previous_line=this.current_line,this.current_line=new s(this),i.push(this.current_line)},this.add_outputline(),this.get_line_number=function(){return i.length},this.add_new_line=function(e){return(1!==this.get_line_number()||!this.just_added_newline())&&(!(!e&&this.just_added_newline())&&(this.raw||this.add_outputline(),!0))},this.get_code=function(){return i.join("\n").replace(/[\r\n\t ]+$/,"")},this.set_indent=function(e){if(1<i.length){for(;e>=this.indent_cache.length;)this.indent_cache.push(this.indent_cache[this.indent_cache.length-1]+this.indent_string);return this.current_line.set_indent(e),!0}return this.current_line.set_indent(0),!1},this.add_raw_token=function(e){for(var t=0;t<e.newlines;t++)this.add_outputline();this.current_line.push(e.whitespace_before),this.current_line.push(e.text),this.space_before_token=!1},this.add_token=function(e){this.add_space_before_token(),this.current_line.push(e)},this.add_space_before_token=function(){this.space_before_token&&!this.just_added_newline()&&this.current_line.push(" "),this.space_before_token=!1},this.remove_redundant_indentation=function(e){if(!e.multiline_frame&&e.mode!==Z.ForInitializer&&e.mode!==Z.Conditional)for(var t=e.start_line_index,n=i.length;t<n;)i[t].remove_indent(),t++},this.trim=function(e){for(e=e!==undefined&&e,this.current_line.trim(t,n);e&&1<i.length&&this.current_line.is_empty();)i.pop(),this.current_line=i[i.length-1],this.current_line.trim();this.previous_line=1<i.length?i[i.length-2]:null},this.just_added_newline=function(){return this.current_line.is_empty()},this.just_added_blankline=function(){return!!this.just_added_newline()&&(1===i.length||i[i.length-2].is_empty())}}var J=function J(e,t,n,i,r,s){this.type=e,this.text=t,this.comments_before=[],this.newlines=n||0,this.wanted_newline=0<n,this.whitespace_before=i||"",this.parent=null,this.directives=null};function ee(k,y,e){var O="\n\r\t ".split(""),N=/[0-9]/,D=/[01234567]/,C=/[0123456789abcdefABCDEF]/,L="+ - * / % & ++ -- = += -= *= /= %= == === != !== > < >= <= >> << >>> >>>= >>= <<= && &= | || ! ~ , : ? ^ ^= |= :: =>".split(" ");this.line_starters="continue,try,throw,return,const,let,const,if,switch,case,default,for,while,break,function,import,export".split(",");var I,V,P,B,j,M,U=this.line_starters.concat(["do","in","else","get","set","new","catch","finally","typeof","yield","async","await"]),W=/([\s\S]*?)((?:\*\/)|$)/g,z=/([^\n\r\u2028\u2029]*)/g,G=/\/\* beautify( \w+[:]\w+)+ \*\//g,X=/ (\w+)[:](\w+)/g,F=/([\s\S]*?)((?:\/\*\sbeautify\signore:end\s\*\/)|$)/g,$=/((<\?php|<\?=)[\s\S]*?\?>)|(<%[\s\S]*?%>)/g;function _(){var e,t,n=[];if(I=0,V="",M<=j)return["","TK_EOF"];t=B.length?B[B.length-1]:new J("TK_START_BLOCK","{");var i=k.charAt(j);for(j+=1;Y(i,O);){if(Q.newline.test(i)?"\n"===i&&"\r"===k.charAt(j-2)||(I+=1,n=[]):n.push(i),M<=j)return["","TK_EOF"];i=k.charAt(j),j+=1}if(n.length&&(V=n.join("")),N.test(i)){var r=!0,s=!0,_=N;for("0"===i&&j<M&&/[Xxo]/.test(k.charAt(j))?(s=r=!1,i+=k.charAt(j),j+=1,_=/[o]/.test(k.charAt(j))?D:C):(i="",j-=1);j<M&&_.test(k.charAt(j));)i+=k.charAt(j),j+=1,r&&j<M&&"."===k.charAt(j)&&(i+=k.charAt(j),j+=1,r=!1),s&&j<M&&/[Ee]/.test(k.charAt(j))&&(i+=k.charAt(j),(j+=1)<M&&/[+-]/.test(k.charAt(j))&&(i+=k.charAt(j),j+=1),r=s=!1);return[i,"TK_WORD"]}if(Q.isIdentifierStart(k.charCodeAt(j-1))){if(j<M)for(;Q.isIdentifierChar(k.charCodeAt(j))&&(i+=k.charAt(j),(j+=1)!==M););return"TK_DOT"===t.type||"TK_RESERVED"===t.type&&Y(t.text,["set","get"])||!Y(i,U)?[i,"TK_WORD"]:"in"===i?[i,"TK_OPERATOR"]:[i,"TK_RESERVED"]}if("("===i||"["===i)return[i,"TK_START_EXPR"];if(")"===i||"]"===i)return[i,"TK_END_EXPR"];if("{"===i)return[i,"TK_START_BLOCK"];if("}"===i)return[i,"TK_END_BLOCK"];if(" "===i)return[i,"TK_SEMICOLON"];if("/"===i){var a="";if("*"===k.charAt(j)){j+=1,W.lastIndex=j;var o=W.exec(k);a="/*"+o[0],j+=o[0].length;var l=function S(e){if(!e.match(G))return null;var t={};X.lastIndex=0;for(var n=X.exec(e);n;)t[n[1]]=n[2],n=X.exec(e);return t}(a);return l&&"start"===l.ignore&&(F.lastIndex=j,a+=(o=F.exec(k))[0],j+=o[0].length),[a=a.replace(Q.lineBreak,"\n"),"TK_BLOCK_COMMENT",l]}if("/"===k.charAt(j)){j+=1,z.lastIndex=j;var h=z.exec(k);return a="//"+h[0],j+=h[0].length,[a,"TK_COMMENT"]}}if("`"===i||"'"===i||'"'===i||("/"===i||y.e4x&&"<"===i&&k.slice(j-1).match(/^<([-a-zA-Z:0-9_.]+|{[^{}]*}|!\[CDATA\[[\s\S]*?\]\])(\s+[-a-zA-Z:0-9_.]+\s*=\s*('[^']*'|"[^"]*"|{.*?}))*\s*(\/?)\s*>/))&&("TK_RESERVED"===t.type&&Y(t.text,["return","case","throw","else","do","typeof","yield"])||"TK_END_EXPR"===t.type&&")"===t.text&&t.parent&&"TK_RESERVED"===t.parent.type&&Y(t.parent.text,["if","while","for"])||Y(t.type,["TK_COMMENT","TK_START_EXPR","TK_START_BLOCK","TK_END_BLOCK","TK_OPERATOR","TK_EQUALS","TK_EOF","TK_SEMICOLON","TK_COMMA"]))){var c=i,u=!1,p=!1;if(e=i,"/"===c)for(var d=!1;j<M&&(u||d||k.charAt(j)!==c)&&!Q.newline.test(k.charAt(j));)e+=k.charAt(j),u?u=!1:(u="\\"===k.charAt(j),"["===k.charAt(j)?d=!0:"]"===k.charAt(j)&&(d=!1)),j+=1;else if(y.e4x&&"<"===c){var f=/<(\/?)([-a-zA-Z:0-9_.]+|{[^{}]*}|!\[CDATA\[[\s\S]*?\]\])(\s+[-a-zA-Z:0-9_.]+\s*=\s*('[^']*'|"[^"]*"|{.*?}))*\s*(\/?)\s*>/g,T=k.slice(j-1),E=f.exec(T);if(E&&0===E.index){for(var g=E[2],x=0;E;){var w=!!E[1],K=E[2],R=!!E[E.length-1]||"![CDATA["===K.slice(0,8);if(K!==g||R||(w?--x:++x),x<=0)break;E=f.exec(T)}var m=E?E.index+E[0].length:T.length;return T=T.slice(0,m),j+=m-1,[T=T.replace(Q.lineBreak,"\n"),"TK_STRING"]}}else for(;j<M&&(u||k.charAt(j)!==c&&("`"===c||!Q.newline.test(k.charAt(j))));)(u||"`"===c)&&Q.newline.test(k.charAt(j))?("\r"===k.charAt(j)&&"\n"===k.charAt(j+1)&&(j+=1),e+="\n"):e+=k.charAt(j),u=u?("x"!==k.charAt(j)&&"u"!==k.charAt(j)||(p=!0),!1):"\\"===k.charAt(j),j+=1;if(p&&y.unescape_strings&&(e=function A(e){var t,n=!1,i="",r=0,s="",_=0;for(;n||r<e.length;)if(t=e.charAt(r),r++,n){if(n=!1,"x"===t)s=e.substr(r,2),r+=2;else{if("u"!==t){i+="\\"+t;continue}s=e.substr(r,4),r+=4}if(!s.match(/^[0123456789abcdefABCDEF]+$/))return e;if(0<=(_=parseInt(s,16))&&_<32){i+="x"===t?"\\x"+s:"\\u"+s;continue}if(34===_||39===_||92===_)i+="\\"+String.fromCharCode(_);else{if("x"===t&&126<_&&_<=255)return e;i+=String.fromCharCode(_)}}else"\\"===t?n=!0:i+=t;return i}(e)),j<M&&k.charAt(j)===c&&(e+=c,j+=1,"/"===c))for(;j<M&&Q.isIdentifierStart(k.charCodeAt(j));)e+=k.charAt(j),j+=1;return[e,"TK_STRING"]}if("#"===i){if(0===B.length&&"!"===k.charAt(j)){for(e=i;j<M&&"\n"!==i;)e+=i=k.charAt(j),j+=1;return[H(e)+"\n","TK_UNKNOWN"]}var b="#";if(j<M&&N.test(k.charAt(j))){for(;b+=i=k.charAt(j),(j+=1)<M&&"#"!==i&&"="!==i;);return"#"===i||("["===k.charAt(j)&&"]"===k.charAt(j+1)?(b+="[]",j+=2):"{"===k.charAt(j)&&"}"===k.charAt(j+1)&&(b+="{}",j+=2)),[b,"TK_WORD"]}}if("<"===i&&("?"===k.charAt(j)||"%"===k.charAt(j))){$.lastIndex=j-1;var v=$.exec(k);if(v)return i=v[0],j+=i.length-1,[i=i.replace(Q.lineBreak,"\n"),"TK_STRING"]}if("<"===i&&"\x3c!--"===k.substring(j-1,j+3)){for(j+=3,i="\x3c!--";!Q.newline.test(k.charAt(j))&&j<M;)i+=k.charAt(j),j++;return P=!0,[i,"TK_COMMENT"]}if("-"===i&&P&&"--\x3e"===k.substring(j-1,j+2))return P=!1,j+=2,["--\x3e","TK_COMMENT"];if("."===i)return[i,"TK_DOT"];if(Y(i,L)){for(;j<M&&Y(i+k.charAt(j),L)&&(i+=k.charAt(j),!(M<=(j+=1))););return","===i?[i,"TK_COMMA"]:"="===i?[i,"TK_EQUALS"]:[i,"TK_OPERATOR"]}return[i,"TK_UNKNOWN"]}this.tokenize=function(){var e,t,n;M=k.length,j=0,P=!1,B=[];for(var i=null,r=[],s=[];!t||"TK_EOF"!==t.type;){for(n=_(),e=new J(n[1],n[0],I,V);"TK_COMMENT"===e.type||"TK_BLOCK_COMMENT"===e.type||"TK_UNKNOWN"===e.type;)"TK_BLOCK_COMMENT"===e.type&&(e.directives=n[2]),s.push(e),n=_(),e=new J(n[1],n[0],I,V);s.length&&(e.comments_before=s,s=[]),"TK_START_BLOCK"===e.type||"TK_START_EXPR"===e.type?(e.parent=t,r.push(i),i=e):("TK_END_BLOCK"===e.type||"TK_END_EXPR"===e.type)&&i&&("]"===e.text&&"["===i.text||")"===e.text&&"("===i.text||"}"===e.text&&"{"===i.text)&&(e.parent=i.parent,i=r.pop()),B.push(e),t=e}return B}}return{run:function N(e,t){function _(e){return e.replace(/\s+$/g,"")}var n,i,r,T,s,a,E,o,l,g,x,w,h,c;for((t=t||{}).wrap_line_length!==undefined&&0!==parseInt(t.wrap_line_length,10)||t.max_char===undefined||0===parseInt(t.max_char,10)||(t.wrap_line_length=t.max_char),i=t.indent_inner_html!==undefined&&t.indent_inner_html,r=t.indent_size===undefined?4:parseInt(t.indent_size,10),T=t.indent_char===undefined?" ":t.indent_char,a=t.brace_style===undefined?"collapse":t.brace_style,s=0===parseInt(t.wrap_line_length,10)?32786:parseInt(t.wrap_line_length||250,10),E=t.unformatted||["a","span","img","bdo","em","strong","dfn","code","samp","kbd","const","cite","abbr","acronym","q","sub","sup","tt","i","b","big","small","u","s","strike","font","ins","del","address","pre"],o=t.preserve_newlines===undefined||t.preserve_newlines,l=o?isNaN(parseInt(t.max_preserve_newlines,10))?32786:parseInt(t.max_preserve_newlines,10):0,g=t.indent_handlebars!==undefined&&t.indent_handlebars,x=t.wrap_attributes===undefined?"auto":t.wrap_attributes,w=t.wrap_attributes_indent_size===undefined?r:parseInt(t.wrap_attributes_indent_size,10)||r,h=t.end_with_newline!==undefined&&t.end_with_newline,c=Array.isArray(t.extra_liners)?t.extra_liners.concat():"string"==typeof t.extra_liners?t.extra_liners.split(","):"head,body,/html".split(","),t.indent_with_tabs&&(T="\t",r=1),(n=new function k(){return this.pos=0,this.token="",this.current_mode="CONTENT",this.tags={parent:"parent1",parentcount:1,parent1:""},this.tag_type="",this.token_text=this.last_token=this.last_text=this.token_type="",this.newlines=0,this.indent_content=i,this.Utils={whitespace:"\n\r\t ".split(""),single_token:"br,input,link,meta,source,!doctype,basefont,base,area,hr,wbr,param,img,isindex,embed".split(","),extra_liners:c,in_array:function(e,t){for(var n=0;n<t.length;n++)if(e===t[n])return!0;return!1}},this.is_whitespace=function(e){for(;0<e.length;e++)if(!this.Utils.in_array(e.charAt(0),this.Utils.whitespace))return!1;return!0},this.traverse_whitespace=function(){var e="";if(e=this.input.charAt(this.pos),this.Utils.in_array(e,this.Utils.whitespace)){for(this.newlines=0;this.Utils.in_array(e,this.Utils.whitespace);)o&&"\n"===e&&this.newlines<=l&&(this.newlines+=1),this.pos++,e=this.input.charAt(this.pos);return!0}return!1},this.space_or_wrap=function(e){this.line_char_count>=this.wrap_line_length?(this.print_newline(!1,e),this.print_indentation(e)):(this.line_char_count++,e.push(" "))},this.get_content=function(){for(var e="",t=[];"<"!=this.input.charAt(this.pos);){if(this.pos>=this.input.length)return t.length?t.join(""):["","TK_EOF"];if(this.traverse_whitespace())this.space_or_wrap(t);else{if(g){var n=this.input.substr(this.pos,3);if("{{#"===n||"{{/"===n)break;if("{{!"===n)return[this.get_tag(),"TK_TAG_HANDLEBARS_COMMENT"];if("{{"===this.input.substr(this.pos,2)&&"{{else}}"===this.get_tag(!0))break}e=this.input.charAt(this.pos),this.pos++,this.line_char_count++,t.push(e)}}return t.length?t.join(""):""},this.get_contents_to=function(e){if(this.pos===this.input.length)return["","TK_EOF"];var t="",n=new RegExp("</"+e+"\\s*>","igm");n.lastIndex=this.pos;var i=n.exec(this.input),r=i?i.index:this.input.length;return this.pos<r&&(t=this.input.substring(this.pos,r),this.pos=r),t},this.record_tag=function(e){this.tags[e+"count"]?this.tags[e+"count"]++:this.tags[e+"count"]=1,this.tags[e+this.tags[e+"count"]]=this.indent_level,this.tags[e+this.tags[e+"count"]+"parent"]=this.tags.parent,this.tags.parent=e+this.tags[e+"count"]},this.retrieve_tag=function(e){if(this.tags[e+"count"]){for(var t=this.tags.parent;t&&e+this.tags[e+"count"]!==t;)t=this.tags[t+"parent"];t&&(this.indent_level=this.tags[e+this.tags[e+"count"]],this.tags.parent=this.tags[t+"parent"]),delete this.tags[e+this.tags[e+"count"]+"parent"],delete this.tags[e+this.tags[e+"count"]],1===this.tags[e+"count"]?delete this.tags[e+"count"]:this.tags[e+"count"]--}},this.indent_to_tag=function(e){if(this.tags[e+"count"]){for(var t=this.tags.parent;t&&e+this.tags[e+"count"]!==t;)t=this.tags[t+"parent"];t&&(this.indent_level=this.tags[e+this.tags[e+"count"]])}},this.get_tag=function(e){var t,n,i="",r=[],s="",_=!1,a=!0,o=this.pos,l=this.line_char_count;e=e!==undefined&&e;do{if(this.pos>=this.input.length)return e&&(this.pos=o,this.line_char_count=l),r.length?r.join(""):["","TK_EOF"];if(i=this.input.charAt(this.pos),this.pos++,this.Utils.in_array(i,this.Utils.whitespace))_=!0;else{if("'"!==i&&'"'!==i||(i+=this.get_unformatted(i),_=!0),"="===i&&(_=!1),r.length&&"="!=r[r.length-1]&&">"!=i&&_){if(this.space_or_wrap(r),_=!1,!a&&"force"===x&&"/"!=i){this.print_newline(!0,r),this.print_indentation(r);for(var h=0;h<w;h++)r.push(T)}for(var c=0;c<r.length;c++)if(" "===r[c]){a=!1;break}}if(g&&"<"===n&&i+this.input.charAt(this.pos)==="{{"&&(i+=this.get_unformatted("}}"),r.length&&" "!=r[r.length-1]&&"<"!=r[r.length-1]&&(i=" "+i),_=!0),"<"!==i||n||(t=this.pos-1,n="<"),g&&!n&&2<=r.length&&"{"===r[r.length-1]&&"{"===r[r.length-2]&&(t="#"===i||"/"===i||"!"===i?this.pos-3:this.pos-2,n="{"),this.line_char_count++,r.push(i),r[1]&&("!"===r[1]||"?"===r[1]||"%"===r[1])){r=[this.get_comment(t)];break}if(g&&r[1]&&"{"===r[1]&&r[2]&&"!"===r[2]){r=[this.get_comment(t)];break}if(g&&"{"===n&&2<r.length&&"}"===r[r.length-2]&&"}"===r[r.length-1])break}}while(">"!=i);var u,p,d=r.join("");u=-1!=d.indexOf(" ")?d.indexOf(" "):"{"===d[0]?d.indexOf("}"):d.indexOf(">"),p="<"!==d[0]&&g?"#"===d[2]?3:2:1;var f=d.substring(p,u).toLowerCase();return"/"===d.charAt(d.length-2)||this.Utils.in_array(f,this.Utils.single_token)?e||(this.tag_type="SINGLE"):g&&"{"===d[0]&&"else"===f?e||(this.indent_to_tag("if"),this.tag_type="HANDLEBARS_ELSE",this.indent_content=!0,this.traverse_whitespace()):this.is_unformatted(f,E)?(s=this.get_unformatted("</"+f+">",d),r.push(s),this.pos,this.tag_type="SINGLE"):"script"===f&&(-1===d.search("type")||-1<d.search("type")&&-1<d.search(/\b(text|application)\/(x-)?(javascript|ecmascript|jscript|livescript)/))?e||(this.record_tag(f),this.tag_type="SCRIPT"):"style"===f&&(-1===d.search("type")||-1<d.search("type")&&-1<d.search("text/css"))?e||(this.record_tag(f),this.tag_type="STYLE"):"!"===f.charAt(0)?e||(this.tag_type="SINGLE",this.traverse_whitespace()):e||("/"===f.charAt(0)?(this.retrieve_tag(f.substring(1)),this.tag_type="END"):(this.record_tag(f),"html"!=f.toLowerCase()&&(this.indent_content=!0),this.tag_type="START"),this.traverse_whitespace()&&this.space_or_wrap(r),this.Utils.in_array(f,this.Utils.extra_liners)&&(this.print_newline(!1,this.output),this.output.length&&"\n"!=this.output[this.output.length-2]&&this.print_newline(!0,this.output))),e&&(this.pos=o,this.line_char_count=l),r.join("")},this.get_comment=function(e){var t="",n=">",i=!1;this.pos=e;var r=this.input.charAt(this.pos);for(this.pos++;this.pos<=this.input.length&&((t+=r)[t.length-1]!==n[n.length-1]||-1==t.indexOf(n));)!i&&t.length<10&&(0===t.indexOf("<![if")?(n="<![endif]>",i=!0):0===t.indexOf("<![cdata[")?(n="]]>",i=!0):0===t.indexOf("<![")?(n="]>",i=!0):0===t.indexOf("\x3c!--")?(n="--\x3e",i=!0):0===t.indexOf("{{!")?(n="}}",i=!0):0===t.indexOf("<?")?(n="?>",i=!0):0===t.indexOf("<%")&&(n="%>",i=!0)),r=this.input.charAt(this.pos),this.pos++;return t},this.get_unformatted=function(e,t){if(t&&-1!=t.toLowerCase().indexOf(e))return"";var n="",i="",r=0,s=!0;do{if(this.pos>=this.input.length)return i;if(n=this.input.charAt(this.pos),this.pos++,this.Utils.in_array(n,this.Utils.whitespace)){if(!s){this.line_char_count--;continue}if("\n"===n||"\r"===n){i+="\n",this.line_char_count=0;continue}}i+=n,this.line_char_count++,s=!0,g&&"{"===n&&i.length&&"{"===i[i.length-2]&&(r=(i+=this.get_unformatted("}}")).length)}while(-1===i.toLowerCase().indexOf(e,r));return i},this.get_token=function(){var e;if("TK_TAG_SCRIPT"!==this.last_token&&"TK_TAG_STYLE"!==this.last_token)return"CONTENT"===this.current_mode?"string"!=typeof(e=this.get_content())?e:[e,"TK_CONTENT"]:"TAG"===this.current_mode?"string"!=typeof(e=this.get_tag())?e:[e,"TK_TAG_"+this.tag_type]:void 0;var t=this.last_token.substr(7);return"string"!=typeof(e=this.get_contents_to(t))?e:[e,"TK_"+t]},this.get_full_indent=function(e){return(e=this.indent_level+e||0)<1?"":new Array(e+1).join(this.indent_string)},this.is_unformatted=function(e,t){if(!this.Utils.in_array(e,t))return!1;if("a"!=e.toLowerCase()||!this.Utils.in_array("a",t))return!0;var n=(this.get_tag(!0)||"").match(/^\s*<\s*\/?([a-z]*)\s*[^>]*>\s*$/);return!(n&&!this.Utils.in_array(n,t))},this.printer=function(e,t,n,i,r){this.input=e||"",this.output=[],this.indent_character=t,this.indent_string="",this.indent_size=n,this.brace_style=r,this.indent_level=0,this.wrap_line_length=i;for(var s=this.line_char_count=0;s<this.indent_size;s++)this.indent_string+=this.indent_character;this.print_newline=function(e,t){this.line_char_count=0,t&&t.length&&(e||"\n"!=t[t.length-1])&&("\n"!=t[t.length-1]&&(t[t.length-1]=_(t[t.length-1])),t.push("\n"))},this.print_indentation=function(e){for(var t=0;t<this.indent_level;t++)e.push(this.indent_string),this.line_char_count+=this.indent_string.length},this.print_token=function(e){this.is_whitespace(e)&&!this.output.length||((e||""!==e)&&this.output.length&&"\n"===this.output[this.output.length-1]&&(this.print_indentation(this.output),e=function t(e){return e.replace(/^\s+/g,"")}(e)),this.print_token_raw(e))},this.print_token_raw=function(e){0<this.newlines&&(e=_(e)),e&&""!==e&&(1<e.length&&"\n"===e[e.length-1]?(this.output.push(e.slice(0,-1)),this.print_newline(!1,this.output)):this.output.push(e));for(var t=0;t<this.newlines;t++)this.print_newline(0<t,this.output);this.newlines=0},this.indent=function(){this.indent_level++},this.unindent=function(){0<this.indent_level&&this.indent_level--}},this}).printer(e,T,r,s,a);;){var u=n.get_token();if(n.token_text=u[0],n.token_type=u[1],"TK_EOF"===n.token_type)break;switch(n.token_type){case"TK_TAG_START":n.print_newline(!1,n.output),n.print_token(n.token_text),n.indent_content&&(n.indent(),n.indent_content=!1),n.current_mode="CONTENT";break;case"TK_TAG_STYLE":case"TK_TAG_SCRIPT":n.print_newline(!1,n.output),n.print_token(n.token_text),n.current_mode="CONTENT";break;case"TK_TAG_END":if("TK_CONTENT"===n.last_token&&""===n.last_text){var p=n.token_text.match(/\w+/)[0],d=null;n.output.length&&(d=n.output[n.output.length-1].match(/(?:<|{{#)\/?\s*(\w+)/)),(null===d||d[1]!=p&&!n.Utils.in_array(d[1],E))&&n.print_newline(!1,n.output)}n.print_token(n.token_text),n.current_mode="CONTENT";break;case"TK_TAG_SINGLE":var f=n.token_text.match(/^\s*<([a-z-]+)/i);f&&n.Utils.in_array(f[1],E)||n.print_newline(!1,n.output),n.print_token(n.token_text),n.current_mode="CONTENT";break;case"TK_TAG_HANDLEBARS_ELSE":n.print_token(n.token_text),n.indent_content&&(n.indent(),n.indent_content=!1),n.current_mode="CONTENT";break;case"TK_TAG_HANDLEBARS_COMMENT":case"TK_CONTENT":n.print_token(n.token_text),n.current_mode="TAG";break;case"TK_STYLE":case"TK_SCRIPT":if(""!==n.token_text){n.print_newline(!1,n.output);var K=n.token_text,R=void 0,m=1;"TK_SCRIPT"===n.token_type?R=O:"TK_STYLE"===n.token_type&&(R=y),"keep"===t.indent_scripts?m=0:"separate"===t.indent_scripts&&(m=-n.indent_level);var b=n.get_full_indent(m);if(R)K=R(K.replace(/^\s*/,b),t);else{var v=K.match(/^\s*/)[0].match(/[^\n\r]*$/)[0].split(n.indent_string).length-1,S=n.get_full_indent(m-v);K=K.replace(/^\s*/,b).replace(/\r\n|\r|\n/g,"\n"+S).replace(/\s+$/,"")}K&&(n.print_token_raw(K),n.print_newline(!0,n.output))}n.current_mode="TAG";break;default:""!==n.token_text&&n.print_token(n.token_text)}n.last_token=n.token_type,n.last_text=n.token_text}var A=n.output.join("").replace(/[\r\n\t ]+$/,"");return h&&(A+="\n"),A}}}}); | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(require("froala-editor")):"function"==typeof define&&define.amd?define(["froala-editor"],t):t(e.FroalaEditor)}(this,function(e){"use strict";(e=e&&e.hasOwnProperty("default")?e["default"]:e).PLUGINS.codeBeautifier=function(){var e,t,n,i,Q={};function y(i,e){var t={"@page":!0,"@font-face":!0,"@keyframes":!0,"@media":!0,"@supports":!0,"@document":!0},n={"@media":!0,"@supports":!0,"@document":!0};e=e||{},i=(i=i||"").replace(/\r\n|[\r\u2028\u2029]/g,"\n");var r=e.indent_size||4,s=e.indent_char||" ",_=e.selector_separator_newline===undefined||e.selector_separator_newline,a=e.end_with_newline!==undefined&&e.end_with_newline,o=e.newline_between_rules===undefined||e.newline_between_rules,l=e.eol?e.eol:"\n";"string"==typeof r&&(r=parseInt(r,10)),e.indent_with_tabs&&(s="\t",r=1),l=l.replace(/\\r/,"\r").replace(/\\n/,"\n");var h,c=/^\s+$/,u=-1,p=0;function d(){return(h=i.charAt(++u))||""}function f(e){var t,n=u;return e&&E(),t=i.charAt(u+1)||"",u=n-1,d(),t}function T(e){for(var t=u;d();)if("\\"===h)d();else{if(-1!==e.indexOf(h))break;if("\n"===h)break}return i.substring(t,u+1)}function E(){for(var e="";c.test(f());)d(),e+=h;return e}function g(){var e="";for(h&&c.test(h)&&(e=h);c.test(d());)e+=h;return e}function x(e){var t=u;for(e="/"===f(),d();d();){if(!e&&"*"===h&&"/"===f()){d();break}if(e&&"\n"===h)return i.substring(t,u)}return i.substring(t,u)+h}function w(e){return i.substring(u-e.length,u).toLowerCase()===e}function K(){for(var e=0,t=u+1;t<i.length;t++){var n=i.charAt(t);if("{"===n)return!0;if("("===n)e+=1;else if(")"===n){if(0===e)return!1;e-=1}else if(" "===n||"}"===n)return!1}return!1}var R=i.match(/^[\t ]*/)[0],m=new Array(r+1).join(s),b=0,v=0;for(var S,A,k,y={"{":function(e){y.singleSpace(),O.push(e),y.newLine()},"}":function(e){y.newLine(),O.push(e),y.newLine()},_lastCharWhitespace:function(){return c.test(O[O.length-1])},newLine:function(e){O.length&&(e||"\n"===O[O.length-1]||y.trim(),O.push("\n"),R&&O.push(R))},singleSpace:function(){O.length&&!y._lastCharWhitespace()&&O.push(" ")},preserveSingleSpace:function(){S&&y.singleSpace()},trim:function(){for(;y._lastCharWhitespace();)O.pop()}},O=[],N=!1,D=!1,C=!1,L="",I="";;){var V=g();S=""!==V;var P=-1!==V.indexOf("\n");if(I=L,!(L=h))break;if("/"===h&&"*"===f()){var B=0===b;(P||B)&&y.newLine(),O.push(x()),y.newLine(),B&&y.newLine(!0)}else if("/"===h&&"/"===f())P||"{"===I||y.trim(),y.singleSpace(),O.push(x()),y.newLine();else if("@"===h){y.preserveSingleSpace(),O.push(h);var j=(void 0,A=u,k=T(": , {}()[]/='\""),u=A-1,d(),k);j.match(/[ :]$/)&&(d(),j=T(": ").replace(/\s$/,""),O.push(j),y.singleSpace()),(j=j.replace(/\s$/,""))in t&&(v+=1,j in n&&(C=!0))}else"#"===h&&"{"===f()?(y.preserveSingleSpace(),O.push(T("}"))):"{"===h?"}"===f(!0)?(E(),d(),y.singleSpace(),O.push("{}"),y.newLine(),o&&0===b&&y.newLine(!0)):(b++,R+=m,y["{"](h),N=C?(C=!1,v<b):v<=b):"}"===h?(b--,R=R.slice(0,-r),y["}"](h),D=N=!1,v&&v--,o&&0===b&&y.newLine(!0)):":"===h?(E(),!N&&!C||w("&")||K()?":"===f()?(d(),O.push("::")):O.push(":"):(D=!0,O.push(":"),y.singleSpace())):'"'===h||"'"===h?(y.preserveSingleSpace(),O.push(T(h))):" "===h?(D=!1,O.push(h),y.newLine()):"("===h?w("url")?(O.push(h),E(),d()&&(")"!==h&&'"'!==h&&"'"!==h?O.push(T(")")):u--)):(p++,y.preserveSingleSpace(),O.push(h),E()):")"===h?(O.push(h),p--):","===h?(O.push(h),E(),_&&!D&&p<1?y.newLine():y.singleSpace()):("]"===h||("["===h?y.preserveSingleSpace():"="===h?(E(),h="="):y.preserveSingleSpace()),O.push(h))}var M="";return R&&(M+=R),M+=O.join("").replace(/[\r\n\t ]+$/,""),a&&(M+="\n"),"\n"!=l&&(M=M.replace(/[\n]/g,l)),M}function Y(e,t){for(var n=0;n<t.length;n+=1)if(t[n]===e)return!0;return!1}function H(e){return e.replace(/^\s+|\s+$/g,"")}function O(e,t){return new r(e,t).beautify()}e=Q,t="\xaa\xb5\xba\xc0-\xd6\xd8-\xf6\xf8-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0370-\u0374\u0376\u0377\u037a-\u037d\u0386\u0388-\u038a\u038c\u038e-\u03a1\u03a3-\u03f5\u03f7-\u0481\u048a-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05d0-\u05ea\u05f0-\u05f2\u0620-\u064a\u066e\u066f\u0671-\u06d3\u06d5\u06e5\u06e6\u06ee\u06ef\u06fa-\u06fc\u06ff\u0710\u0712-\u072f\u074d-\u07a5\u07b1\u07ca-\u07ea\u07f4\u07f5\u07fa\u0800-\u0815\u081a\u0824\u0828\u0840-\u0858\u08a0\u08a2-\u08ac\u0904-\u0939\u093d\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097f\u0985-\u098c\u098f\u0990\u0993-\u09a8\u09aa-\u09b0\u09b2\u09b6-\u09b9\u09bd\u09ce\u09dc\u09dd\u09df-\u09e1\u09f0\u09f1\u0a05-\u0a0a\u0a0f\u0a10\u0a13-\u0a28\u0a2a-\u0a30\u0a32\u0a33\u0a35\u0a36\u0a38\u0a39\u0a59-\u0a5c\u0a5e\u0a72-\u0a74\u0a85-\u0a8d\u0a8f-\u0a91\u0a93-\u0aa8\u0aaa-\u0ab0\u0ab2\u0ab3\u0ab5-\u0ab9\u0abd\u0ad0\u0ae0\u0ae1\u0b05-\u0b0c\u0b0f\u0b10\u0b13-\u0b28\u0b2a-\u0b30\u0b32\u0b33\u0b35-\u0b39\u0b3d\u0b5c\u0b5d\u0b5f-\u0b61\u0b71\u0b83\u0b85-\u0b8a\u0b8e-\u0b90\u0b92-\u0b95\u0b99\u0b9a\u0b9c\u0b9e\u0b9f\u0ba3\u0ba4\u0ba8-\u0baa\u0bae-\u0bb9\u0bd0\u0c05-\u0c0c\u0c0e-\u0c10\u0c12-\u0c28\u0c2a-\u0c33\u0c35-\u0c39\u0c3d\u0c58\u0c59\u0c60\u0c61\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbd\u0cde\u0ce0\u0ce1\u0cf1\u0cf2\u0d05-\u0d0c\u0d0e-\u0d10\u0d12-\u0d3a\u0d3d\u0d4e\u0d60\u0d61\u0d7a-\u0d7f\u0d85-\u0d96\u0d9a-\u0db1\u0db3-\u0dbb\u0dbd\u0dc0-\u0dc6\u0e01-\u0e30\u0e32\u0e33\u0e40-\u0e46\u0e81\u0e82\u0e84\u0e87\u0e88\u0e8a\u0e8d\u0e94-\u0e97\u0e99-\u0e9f\u0ea1-\u0ea3\u0ea5\u0ea7\u0eaa\u0eab\u0ead-\u0eb0\u0eb2\u0eb3\u0ebd\u0ec0-\u0ec4\u0ec6\u0edc-\u0edf\u0f00\u0f40-\u0f47\u0f49-\u0f6c\u0f88-\u0f8c\u1000-\u102a\u103f\u1050-\u1055\u105a-\u105d\u1061\u1065\u1066\u106e-\u1070\u1075-\u1081\u108e\u10a0-\u10c5\u10c7\u10cd\u10d0-\u10fa\u10fc-\u1248\u124a-\u124d\u1250-\u1256\u1258\u125a-\u125d\u1260-\u1288\u128a-\u128d\u1290-\u12b0\u12b2-\u12b5\u12b8-\u12be\u12c0\u12c2-\u12c5\u12c8-\u12d6\u12d8-\u1310\u1312-\u1315\u1318-\u135a\u1380-\u138f\u13a0-\u13f4\u1401-\u166c\u166f-\u167f\u1681-\u169a\u16a0-\u16ea\u16ee-\u16f0\u1700-\u170c\u170e-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176c\u176e-\u1770\u1780-\u17b3\u17d7\u17dc\u1820-\u1877\u1880-\u18a8\u18aa\u18b0-\u18f5\u1900-\u191c\u1950-\u196d\u1970-\u1974\u1980-\u19ab\u19c1-\u19c7\u1a00-\u1a16\u1a20-\u1a54\u1aa7\u1b05-\u1b33\u1b45-\u1b4b\u1b83-\u1ba0\u1bae\u1baf\u1bba-\u1be5\u1c00-\u1c23\u1c4d-\u1c4f\u1c5a-\u1c7d\u1ce9-\u1cec\u1cee-\u1cf1\u1cf5\u1cf6\u1d00-\u1dbf\u1e00-\u1f15\u1f18-\u1f1d\u1f20-\u1f45\u1f48-\u1f4d\u1f50-\u1f57\u1f59\u1f5b\u1f5d\u1f5f-\u1f7d\u1f80-\u1fb4\u1fb6-\u1fbc\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fcc\u1fd0-\u1fd3\u1fd6-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ff4\u1ff6-\u1ffc\u2071\u207f\u2090-\u209c\u2102\u2107\u210a-\u2113\u2115\u2119-\u211d\u2124\u2126\u2128\u212a-\u212d\u212f-\u2139\u213c-\u213f\u2145-\u2149\u214e\u2160-\u2188\u2c00-\u2c2e\u2c30-\u2c5e\u2c60-\u2ce4\u2ceb-\u2cee\u2cf2\u2cf3\u2d00-\u2d25\u2d27\u2d2d\u2d30-\u2d67\u2d6f\u2d80-\u2d96\u2da0-\u2da6\u2da8-\u2dae\u2db0-\u2db6\u2db8-\u2dbe\u2dc0-\u2dc6\u2dc8-\u2dce\u2dd0-\u2dd6\u2dd8-\u2dde\u2e2f\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303c\u3041-\u3096\u309d-\u309f\u30a1-\u30fa\u30fc-\u30ff\u3105-\u312d\u3131-\u318e\u31a0-\u31ba\u31f0-\u31ff\u3400-\u4db5\u4e00-\u9fcc\ua000-\ua48c\ua4d0-\ua4fd\ua500-\ua60c\ua610-\ua61f\ua62a\ua62b\ua640-\ua66e\ua67f-\ua697\ua6a0-\ua6ef\ua717-\ua71f\ua722-\ua788\ua78b-\ua78e\ua790-\ua793\ua7a0-\ua7aa\ua7f8-\ua801\ua803-\ua805\ua807-\ua80a\ua80c-\ua822\ua840-\ua873\ua882-\ua8b3\ua8f2-\ua8f7\ua8fb\ua90a-\ua925\ua930-\ua946\ua960-\ua97c\ua984-\ua9b2\ua9cf\uaa00-\uaa28\uaa40-\uaa42\uaa44-\uaa4b\uaa60-\uaa76\uaa7a\uaa80-\uaaaf\uaab1\uaab5\uaab6\uaab9-\uaabd\uaac0\uaac2\uaadb-\uaadd\uaae0-\uaaea\uaaf2-\uaaf4\uab01-\uab06\uab09-\uab0e\uab11-\uab16\uab20-\uab26\uab28-\uab2e\uabc0-\uabe2\uac00-\ud7a3\ud7b0-\ud7c6\ud7cb-\ud7fb\uf900-\ufa6d\ufa70-\ufad9\ufb00-\ufb06\ufb13-\ufb17\ufb1d\ufb1f-\ufb28\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40\ufb41\ufb43\ufb44\ufb46-\ufbb1\ufbd3-\ufd3d\ufd50-\ufd8f\ufd92-\ufdc7\ufdf0-\ufdfb\ufe70-\ufe74\ufe76-\ufefc\uff21-\uff3a\uff41-\uff5a\uff66-\uffbe\uffc2-\uffc7\uffca-\uffcf\uffd2-\uffd7\uffda-\uffdc",n=new RegExp("["+t+"]"),i=new RegExp("["+t+"\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]"),e.newline=/[\n\r\u2028\u2029]/,e.lineBreak=new RegExp("\r\n|"+e.newline.source),e.allLineBreaks=new RegExp(e.lineBreak.source,"g"),e.isIdentifierStart=function(e){return e<65?36===e||64===e:e<91||(e<97?95===e:e<123||170<=e&&n.test(String.fromCharCode(e)))},e.isIdentifierChar=function(e){return e<48?36===e:e<58||!(e<65)&&(e<91||(e<97?95===e:e<123||170<=e&&i.test(String.fromCharCode(e))))};var Z={BlockStatement:"BlockStatement",Statement:"Statement",ObjectLiteral:"ObjectLiteral",ArrayLiteral:"ArrayLiteral",ForInitializer:"ForInitializer",Conditional:"Conditional",Expression:"Expression"};function r(i,e){var l,r,s,h,_,a,o,c,u,t,n,p,d,f=[],T="";function E(e,t){var n=0;return e&&(n=e.indentation_level,!l.just_added_newline()&&e.line_indent_level>n&&(n=e.line_indent_level)),{mode:t,parent:e,last_text:e?e.last_text:"",last_word:e?e.last_word:"",declaration_statement:!1,declaration_assignment:!1,multiline_frame:!1,if_block:!1,else_block:!1,do_block:!1,do_while:!1,in_case_statement:!1,in_case:!1,case_body:!1,indentation_level:n,line_indent_level:e?e.line_indent_level:n,start_line_index:l.get_line_number(),ternary_depth:0}}for(p={TK_START_EXPR:function L(){O();var e=Z.Expression;if("["===h.text){if("TK_WORD"===_||")"===c.last_text)return"TK_RESERVED"===_&&Y(c.last_text,s.line_starters)&&(l.space_before_token=!0),v(e),m(),b(),void(d.space_in_paren&&(l.space_before_token=!0));e=Z.ArrayLiteral,S(c.mode)&&("["!==c.last_text&&(","!==c.last_text||"]"!==a&&"}"!==a)||d.keep_array_indentation||K())}else"TK_RESERVED"===_&&"for"===c.last_text?e=Z.ForInitializer:"TK_RESERVED"===_&&Y(c.last_text,["if","while"])&&(e=Z.Conditional);" "===c.last_text||"TK_START_BLOCK"===_?K():"TK_END_EXPR"===_||"TK_START_EXPR"===_||"TK_END_BLOCK"===_||"."===c.last_text?w(h.wanted_newline):"TK_RESERVED"===_&&"("===h.text||"TK_WORD"===_||"TK_OPERATOR"===_?"TK_RESERVED"===_&&("function"===c.last_word||"typeof"===c.last_word)||"*"===c.last_text&&"function"===a?d.space_after_anon_function&&(l.space_before_token=!0):"TK_RESERVED"!==_||!Y(c.last_text,s.line_starters)&&"catch"!==c.last_text||d.space_before_conditional&&(l.space_before_token=!0):l.space_before_token=!0;"("===h.text&&"TK_RESERVED"===_&&"await"===c.last_word&&(l.space_before_token=!0);"("===h.text&&("TK_EQUALS"!==_&&"TK_OPERATOR"!==_||y()||w());v(e),m(),d.space_in_paren&&(l.space_before_token=!0);b()},TK_END_EXPR:function I(){for(;c.mode===Z.Statement;)k();c.multiline_frame&&w("]"===h.text&&S(c.mode)&&!d.keep_array_indentation);d.space_in_paren&&("TK_START_EXPR"!==_||d.space_in_empty_paren?l.space_before_token=!0:(l.trim(),l.space_before_token=!1));"]"===h.text&&d.keep_array_indentation?(m(),k()):(k(),m());l.remove_redundant_indentation(u),c.do_while&&u.mode===Z.Conditional&&(u.mode=Z.Expression,c.do_block=!1,c.do_while=!1)},TK_START_BLOCK:function V(){var e=D(1),t=D(2);t&&(":"===t.text&&Y(e.type,["TK_STRING","TK_WORD","TK_RESERVED"])||Y(e.text,["get","set"])&&Y(t.type,["TK_WORD","TK_RESERVED"]))?Y(a,["class","interface"])?v(Z.BlockStatement):v(Z.ObjectLiteral):v(Z.BlockStatement);var n=!e.comments_before.length&&"}"===e.text&&"function"===c.last_word&&"TK_END_EXPR"===_;"expand"===d.brace_style||"none"===d.brace_style&&h.wanted_newline?"TK_OPERATOR"!==_&&(n||"TK_EQUALS"===_||"TK_RESERVED"===_&&N(c.last_text)&&"else"!==c.last_text)?l.space_before_token=!0:K(!1,!0):"TK_OPERATOR"!==_&&"TK_START_EXPR"!==_?"TK_START_BLOCK"===_?K():l.space_before_token=!0:S(u.mode)&&","===c.last_text&&("}"===a?l.space_before_token=!0:K());m(),b()},TK_END_BLOCK:function P(){for(;c.mode===Z.Statement;)k();var e="TK_START_BLOCK"===_;"expand"===d.brace_style?e||K():e||(S(c.mode)&&d.keep_array_indentation?(d.keep_array_indentation=!1,K(),d.keep_array_indentation=!0):K());k(),m()},TK_WORD:C,TK_RESERVED:C,TK_SEMICOLON:function B(){O()&&(l.space_before_token=!1);for(;c.mode===Z.Statement&&!c.if_block&&!c.do_block;)k();m()},TK_STRING:function j(){O()?l.space_before_token=!0:"TK_RESERVED"===_||"TK_WORD"===_?l.space_before_token=!0:"TK_COMMA"===_||"TK_START_EXPR"===_||"TK_EQUALS"===_||"TK_OPERATOR"===_?y()||w():K();m()},TK_EQUALS:function M(){O();c.declaration_statement&&(c.declaration_assignment=!0);l.space_before_token=!0,m(),l.space_before_token=!0},TK_OPERATOR:function U(){O();if("TK_RESERVED"===_&&N(c.last_text))return l.space_before_token=!0,void m();if("*"===h.text&&"TK_DOT"===_)return void m();if(":"===h.text&&c.in_case)return c.case_body=!0,b(),m(),K(),void(c.in_case=!1);if("::"===h.text)return void m();"TK_OPERATOR"===_&&w();var e=!0,t=!0;Y(h.text,["--","++","!","~"])||Y(h.text,["-","+"])&&(Y(_,["TK_START_BLOCK","TK_START_EXPR","TK_EQUALS","TK_OPERATOR"])||Y(c.last_text,s.line_starters)||","===c.last_text)?(t=e=!1,!h.wanted_newline||"--"!==h.text&&"++"!==h.text||K(!1,!0)," "===c.last_text&&A(c.mode)&&(e=!0),"TK_RESERVED"===_?e=!0:"TK_END_EXPR"===_?e=!("]"===c.last_text&&("--"===h.text||"++"===h.text)):"TK_OPERATOR"===_&&(e=Y(h.text,["--","-","++","+"])&&Y(c.last_text,["--","-","++","+"]),Y(h.text,["+","-"])&&Y(c.last_text,["--","++"])&&(t=!0)),c.mode!==Z.BlockStatement&&c.mode!==Z.Statement||"{"!==c.last_text&&" "!==c.last_text||K()):":"===h.text?0===c.ternary_depth?e=!1:c.ternary_depth-=1:"?"===h.text?c.ternary_depth+=1:"*"===h.text&&"TK_RESERVED"===_&&"function"===c.last_text&&(t=e=!1);l.space_before_token=l.space_before_token||e,m(),l.space_before_token=t},TK_COMMA:function W(){if(c.declaration_statement)return A(c.parent.mode)&&(c.declaration_assignment=!1),m(),void(c.declaration_assignment?K(c.declaration_assignment=!1,!0):(l.space_before_token=!0,d.comma_first&&w()));m(),c.mode===Z.ObjectLiteral||c.mode===Z.Statement&&c.parent.mode===Z.ObjectLiteral?(c.mode===Z.Statement&&k(),K()):(l.space_before_token=!0,d.comma_first&&w())},TK_BLOCK_COMMENT:function z(){if(l.raw)return l.add_raw_token(h),void(h.directives&&"end"===h.directives.preserve&&(d.test_output_raw||(l.raw=!1)));if(h.directives)return K(!1,!0),m(),"start"===h.directives.preserve&&(l.raw=!0),void K(!1,!0);if(!Q.newline.test(h.text)&&!h.wanted_newline)return l.space_before_token=!0,m(),void(l.space_before_token=!0);var e,t=function _(e){var t;e=e.replace(/\x0d/g,"");var n=[];t=e.indexOf("\n");for(;-1!==t;)n.push(e.substring(0,t)),e=e.substring(t+1),t=e.indexOf("\n");e.length&&n.push(e);return n}(h.text),n=!1,i=!1,r=h.whitespace_before,s=r.length;K(!1,!0),1<t.length&&(!function a(e,t){for(var n=0;n<e.length;n++){var i=H(e[n]);if(i.charAt(0)!==t)return!1}return!0}(t.slice(1),"*")?function o(e,t){for(var n,i=0,r=e.length;i<r;i++)if((n=e[i])&&0!==n.indexOf(t))return!1;return!0}(t.slice(1),r)&&(i=!0):n=!0);for(m(t[0]),e=1;e<t.length;e++)K(!1,!0),n?m(" "+t[e].replace(/^\s+/g,"")):i&&t[e].length>s?m(t[e].substring(s)):l.add_token(t[e]);K(!1,!0)},TK_COMMENT:function G(){h.wanted_newline?K(!1,!0):l.trim(!0);l.space_before_token=!0,m(),K(!1,!0)},TK_DOT:function X(){O();"TK_RESERVED"===_&&N(c.last_text)?l.space_before_token=!0:w(")"===c.last_text&&d.break_chained_methods);m()},TK_UNKNOWN:function F(){m(),"\n"===h.text[h.text.length-1]&&K()},TK_EOF:function $(){for(;c.mode===Z.Statement;)k()}},d={},(e=e||{}).braces_on_own_line!==undefined&&(d.brace_style=e.braces_on_own_line?"expand":"collapse"),d.brace_style=e.brace_style?e.brace_style:d.brace_style?d.brace_style:"collapse","expand-strict"===d.brace_style&&(d.brace_style="expand"),d.indent_size=e.indent_size?parseInt(e.indent_size,10):4,d.indent_char=e.indent_char?e.indent_char:" ",d.eol=e.eol?e.eol:"\n",d.preserve_newlines=e.preserve_newlines===undefined||e.preserve_newlines,d.break_chained_methods=e.break_chained_methods!==undefined&&e.break_chained_methods,d.max_preserve_newlines=e.max_preserve_newlines===undefined?0:parseInt(e.max_preserve_newlines,10),d.space_in_paren=e.space_in_paren!==undefined&&e.space_in_paren,d.space_in_empty_paren=e.space_in_empty_paren!==undefined&&e.space_in_empty_paren,d.jslint_happy=e.jslint_happy!==undefined&&e.jslint_happy,d.space_after_anon_function=e.space_after_anon_function!==undefined&&e.space_after_anon_function,d.keep_array_indentation=e.keep_array_indentation!==undefined&&e.keep_array_indentation,d.space_before_conditional=e.space_before_conditional===undefined||e.space_before_conditional,d.unescape_strings=e.unescape_strings!==undefined&&e.unescape_strings,d.wrap_line_length=e.wrap_line_length===undefined?0:parseInt(e.wrap_line_length,10),d.e4x=e.e4x!==undefined&&e.e4x,d.end_with_newline=e.end_with_newline!==undefined&&e.end_with_newline,d.comma_first=e.comma_first!==undefined&&e.comma_first,d.test_output_raw=e.test_output_raw!==undefined&&e.test_output_raw,d.jslint_happy&&(d.space_after_anon_function=!0),e.indent_with_tabs&&(d.indent_char="\t",d.indent_size=1),d.eol=d.eol.replace(/\\r/,"\r").replace(/\\n/,"\n"),o="";0<d.indent_size;)o+=d.indent_char,d.indent_size-=1;var g=0;if(i&&i.length){for(;" "===i.charAt(g)||"\t"===i.charAt(g);)T+=i.charAt(g),g+=1;i=i.substring(g)}function x(e){var t=e.newlines;if(d.keep_array_indentation&&S(c.mode))for(var n=0;n<t;n+=1)K(0<n);else if(d.max_preserve_newlines&&t>d.max_preserve_newlines&&(t=d.max_preserve_newlines),d.preserve_newlines&&1<e.newlines){K();for(var i=1;i<t;i+=1)K(!0)}p[(h=e).type]()}function w(e){if(e=e!==undefined&&e,!l.just_added_newline())if(d.preserve_newlines&&h.wanted_newline||e)K(!1,!0);else if(d.wrap_line_length){l.current_line.get_character_count()+h.text.length+(l.space_before_token?1:0)>=d.wrap_line_length&&K(!1,!0)}}function K(e,t){if(!t&&" "!==c.last_text&&","!==c.last_text&&"="!==c.last_text&&"TK_OPERATOR"!==_)for(;c.mode===Z.Statement&&!c.if_block&&!c.do_block;)k();l.add_new_line(e)&&(c.multiline_frame=!0)}function R(){l.just_added_newline()&&(d.keep_array_indentation&&S(c.mode)&&h.wanted_newline?(l.current_line.push(h.whitespace_before),l.space_before_token=!1):l.set_indent(c.indentation_level)&&(c.line_indent_level=c.indentation_level))}function m(e){l.raw?l.add_raw_token(h):(d.comma_first&&"TK_COMMA"===_&&l.just_added_newline()&&","===l.previous_line.last()&&(l.previous_line.pop(),R(),l.add_token(","),l.space_before_token=!0),e=e||h.text,R(),l.add_token(e))}function b(){c.indentation_level+=1}function v(e){u=c?(t.push(c),c):E(null,e),c=E(u,e)}function S(e){return e===Z.ArrayLiteral}function A(e){return Y(e,[Z.Expression,Z.ForInitializer,Z.Conditional])}function k(){0<t.length&&(u=c,c=t.pop(),u.mode===Z.Statement&&l.remove_redundant_indentation(u))}function y(){return c.parent.mode===Z.ObjectLiteral&&c.mode===Z.Statement&&(":"===c.last_text&&0===c.ternary_depth||"TK_RESERVED"===_&&Y(c.last_text,["get","set"]))}function O(){return!!("TK_RESERVED"===_&&Y(c.last_text,["const","let","const"])&&"TK_WORD"===h.type||"TK_RESERVED"===_&&"do"===c.last_text||"TK_RESERVED"===_&&"return"===c.last_text&&!h.wanted_newline||"TK_RESERVED"===_&&"else"===c.last_text&&("TK_RESERVED"!==h.type||"if"!==h.text)||"TK_END_EXPR"===_&&(u.mode===Z.ForInitializer||u.mode===Z.Conditional)||"TK_WORD"===_&&c.mode===Z.BlockStatement&&!c.in_case&&"--"!==h.text&&"++"!==h.text&&"function"!==a&&"TK_WORD"!==h.type&&"TK_RESERVED"!==h.type||c.mode===Z.ObjectLiteral&&(":"===c.last_text&&0===c.ternary_depth||"TK_RESERVED"===_&&Y(c.last_text,["get","set"])))&&(v(Z.Statement),b(),"TK_RESERVED"===_&&Y(c.last_text,["const","let","const"])&&"TK_WORD"===h.type&&(c.declaration_statement=!0),y()||w("TK_RESERVED"===h.type&&Y(h.text,["do","for","if","while"])),!0)}function N(e){return Y(e,["case","return","do","if","throw","else"])}function D(e){var t=r+(e||0);return t<0||t>=f.length?null:f[t]}function C(){("TK_RESERVED"===h.type&&c.mode!==Z.ObjectLiteral&&Y(h.text,["set","get"])&&(h.type="TK_WORD"),"TK_RESERVED"===h.type&&c.mode===Z.ObjectLiteral)&&(":"===D(1).text&&(h.type="TK_WORD"));if(O()||!h.wanted_newline||A(c.mode)||"TK_OPERATOR"===_&&"--"!==c.last_text&&"++"!==c.last_text||"TK_EQUALS"===_||!d.preserve_newlines&&"TK_RESERVED"===_&&Y(c.last_text,["const","let","const","set","get"])||K(),c.do_block&&!c.do_while){if("TK_RESERVED"===h.type&&"while"===h.text)return l.space_before_token=!0,m(),l.space_before_token=!0,void(c.do_while=!0);K(),c.do_block=!1}if(c.if_block)if(c.else_block||"TK_RESERVED"!==h.type||"else"!==h.text){for(;c.mode===Z.Statement;)k();c.if_block=!1,c.else_block=!1}else c.else_block=!0;if("TK_RESERVED"===h.type&&("case"===h.text||"default"===h.text&&c.in_case_statement))return K(),(c.case_body||d.jslint_happy)&&(!function e(){0<c.indentation_level&&(!c.parent||c.indentation_level>c.parent.indentation_level)&&(c.indentation_level-=1)}(),c.case_body=!1),m(),c.in_case=!0,void(c.in_case_statement=!0);if("TK_RESERVED"===h.type&&"function"===h.text&&((Y(c.last_text,["}"," "])||l.just_added_newline()&&!Y(c.last_text,["[","{",":","=",","]))&&(l.just_added_blankline()||h.comments_before.length||(K(),K(!0))),"TK_RESERVED"===_||"TK_WORD"===_?"TK_RESERVED"===_&&Y(c.last_text,["get","set","new","return","export","async"])?l.space_before_token=!0:"TK_RESERVED"===_&&"default"===c.last_text&&"export"===a?l.space_before_token=!0:K():"TK_OPERATOR"===_||"="===c.last_text?l.space_before_token=!0:(c.multiline_frame||!A(c.mode)&&!S(c.mode))&&K()),"TK_COMMA"!==_&&"TK_START_EXPR"!==_&&"TK_EQUALS"!==_&&"TK_OPERATOR"!==_||y()||w(),"TK_RESERVED"===h.type&&Y(h.text,["function","get","set"]))return m(),void(c.last_word=h.text);(n="NONE","TK_END_BLOCK"===_?"TK_RESERVED"===h.type&&Y(h.text,["else","catch","finally"])?"expand"===d.brace_style||"end-expand"===d.brace_style||"none"===d.brace_style&&h.wanted_newline?n="NEWLINE":(n="SPACE",l.space_before_token=!0):n="NEWLINE":"TK_SEMICOLON"===_&&c.mode===Z.BlockStatement?n="NEWLINE":"TK_SEMICOLON"===_&&A(c.mode)?n="SPACE":"TK_STRING"===_?n="NEWLINE":"TK_RESERVED"===_||"TK_WORD"===_||"*"===c.last_text&&"function"===a?n="SPACE":"TK_START_BLOCK"===_?n="NEWLINE":"TK_END_EXPR"===_&&(l.space_before_token=!0,n="NEWLINE"),"TK_RESERVED"===h.type&&Y(h.text,s.line_starters)&&")"!==c.last_text&&(n="else"===c.last_text||"export"===c.last_text?"SPACE":"NEWLINE"),"TK_RESERVED"===h.type&&Y(h.text,["else","catch","finally"]))?"TK_END_BLOCK"!==_||"expand"===d.brace_style||"end-expand"===d.brace_style||"none"===d.brace_style&&h.wanted_newline?K():(l.trim(!0),"}"!==l.current_line.last()&&K(),l.space_before_token=!0):"NEWLINE"===n?"TK_RESERVED"===_&&N(c.last_text)?l.space_before_token=!0:"TK_END_EXPR"!==_?"TK_START_EXPR"===_&&"TK_RESERVED"===h.type&&Y(h.text,["const","let","const"])||":"===c.last_text||("TK_RESERVED"===h.type&&"if"===h.text&&"else"===c.last_text?l.space_before_token=!0:K()):"TK_RESERVED"===h.type&&Y(h.text,s.line_starters)&&")"!==c.last_text&&K():c.multiline_frame&&S(c.mode)&&","===c.last_text&&"}"===a?K():"SPACE"===n&&(l.space_before_token=!0);m(),c.last_word=h.text,"TK_RESERVED"===h.type&&"do"===h.text&&(c.do_block=!0),"TK_RESERVED"===h.type&&"if"===h.text&&(c.if_block=!0)}_="TK_START_BLOCK",a="",(l=new q(o,T)).raw=d.test_output_raw,t=[],v(Z.BlockStatement),this.beautify=function(){var e,t;for(s=new ee(i,d,o),f=s.tokenize(),r=0;e=D();){for(var n=0;n<e.comments_before.length;n++)x(e.comments_before[n]);x(e),a=c.last_text,_=e.type,c.last_text=e.text,r+=1}return t=l.get_code(),d.end_with_newline&&(t+="\n"),"\n"!=d.eol&&(t=t.replace(/[\n]/g,d.eol)),t}}function s(t){var n=0,i=-1,r=[],s=!0;this.set_indent=function(e){n=t.baseIndentLength+e*t.indent_length,i=e},this.get_character_count=function(){return n},this.is_empty=function(){return s},this.last=function(){return this._empty?null:r[r.length-1]},this.push=function(e){r.push(e),n+=e.length,s=!1},this.pop=function(){var e=null;return s||(e=r.pop(),n-=e.length,s=0===r.length),e},this.remove_indent=function(){0<i&&(i-=1,n-=t.indent_length)},this.trim=function(){for(;" "===this.last();)r.pop(),n-=1;s=0===r.length},this.toString=function(){var e="";return this._empty||(0<=i&&(e=t.indent_cache[i]),e+=r.join("")),e}}function q(t,n){n=n||"",this.indent_cache=[n],this.baseIndentLength=n.length,this.indent_length=t.length,this.raw=!1;var i=[];this.baseIndentString=n,this.indent_string=t,this.previous_line=null,this.current_line=null,this.space_before_token=!1,this.add_outputline=function(){this.previous_line=this.current_line,this.current_line=new s(this),i.push(this.current_line)},this.add_outputline(),this.get_line_number=function(){return i.length},this.add_new_line=function(e){return(1!==this.get_line_number()||!this.just_added_newline())&&(!(!e&&this.just_added_newline())&&(this.raw||this.add_outputline(),!0))},this.get_code=function(){return i.join("\n").replace(/[\r\n\t ]+$/,"")},this.set_indent=function(e){if(1<i.length){for(;e>=this.indent_cache.length;)this.indent_cache.push(this.indent_cache[this.indent_cache.length-1]+this.indent_string);return this.current_line.set_indent(e),!0}return this.current_line.set_indent(0),!1},this.add_raw_token=function(e){for(var t=0;t<e.newlines;t++)this.add_outputline();this.current_line.push(e.whitespace_before),this.current_line.push(e.text),this.space_before_token=!1},this.add_token=function(e){this.add_space_before_token(),this.current_line.push(e)},this.add_space_before_token=function(){this.space_before_token&&!this.just_added_newline()&&this.current_line.push(" "),this.space_before_token=!1},this.remove_redundant_indentation=function(e){if(!e.multiline_frame&&e.mode!==Z.ForInitializer&&e.mode!==Z.Conditional)for(var t=e.start_line_index,n=i.length;t<n;)i[t].remove_indent(),t++},this.trim=function(e){for(e=e!==undefined&&e,this.current_line.trim(t,n);e&&1<i.length&&this.current_line.is_empty();)i.pop(),this.current_line=i[i.length-1],this.current_line.trim();this.previous_line=1<i.length?i[i.length-2]:null},this.just_added_newline=function(){return this.current_line.is_empty()},this.just_added_blankline=function(){return!!this.just_added_newline()&&(1===i.length||i[i.length-2].is_empty())}}var J=function J(e,t,n,i,r,s){this.type=e,this.text=t,this.comments_before=[],this.newlines=n||0,this.wanted_newline=0<n,this.whitespace_before=i||"",this.parent=null,this.directives=null};function ee(k,y,e){var O="\n\r\t ".split(""),N=/[0-9]/,D=/[01234567]/,C=/[0123456789abcdefABCDEF]/,L="+ - * / % & ++ -- = += -= *= /= %= == === != !== > < >= <= >> << >>> >>>= >>= <<= && &= | || ! ~ , : ? ^ ^= |= :: =>".split(" ");this.line_starters="continue,try,throw,return,const,let,const,if,switch,case,default,for,while,break,function,import,export".split(",");var I,V,P,B,j,M,U=this.line_starters.concat(["do","in","else","get","set","new","catch","finally","typeof","yield","async","await"]),W=/([\s\S]*?)((?:\*\/)|$)/g,z=/([^\n\r\u2028\u2029]*)/g,G=/\/\* beautify( \w+[:]\w+)+ \*\//g,X=/ (\w+)[:](\w+)/g,F=/([\s\S]*?)((?:\/\*\sbeautify\signore:end\s\*\/)|$)/g,$=/((<\?php|<\?=)[\s\S]*?\?>)|(<%[\s\S]*?%>)/g;function _(){var e,t,n=[];if(I=0,V="",M<=j)return["","TK_EOF"];t=B.length?B[B.length-1]:new J("TK_START_BLOCK","{");var i=k.charAt(j);for(j+=1;Y(i,O);){if(Q.newline.test(i)?"\n"===i&&"\r"===k.charAt(j-2)||(I+=1,n=[]):n.push(i),M<=j)return["","TK_EOF"];i=k.charAt(j),j+=1}if(n.length&&(V=n.join("")),N.test(i)){var r=!0,s=!0,_=N;for("0"===i&&j<M&&/[Xxo]/.test(k.charAt(j))?(s=r=!1,i+=k.charAt(j),j+=1,_=/[o]/.test(k.charAt(j))?D:C):(i="",j-=1);j<M&&_.test(k.charAt(j));)i+=k.charAt(j),j+=1,r&&j<M&&"."===k.charAt(j)&&(i+=k.charAt(j),j+=1,r=!1),s&&j<M&&/[Ee]/.test(k.charAt(j))&&(i+=k.charAt(j),(j+=1)<M&&/[+-]/.test(k.charAt(j))&&(i+=k.charAt(j),j+=1),r=s=!1);return[i,"TK_WORD"]}if(Q.isIdentifierStart(k.charCodeAt(j-1))){if(j<M)for(;Q.isIdentifierChar(k.charCodeAt(j))&&(i+=k.charAt(j),(j+=1)!==M););return"TK_DOT"===t.type||"TK_RESERVED"===t.type&&Y(t.text,["set","get"])||!Y(i,U)?[i,"TK_WORD"]:"in"===i?[i,"TK_OPERATOR"]:[i,"TK_RESERVED"]}if("("===i||"["===i)return[i,"TK_START_EXPR"];if(")"===i||"]"===i)return[i,"TK_END_EXPR"];if("{"===i)return[i,"TK_START_BLOCK"];if("}"===i)return[i,"TK_END_BLOCK"];if(" "===i)return[i,"TK_SEMICOLON"];if("/"===i){var a="";if("*"===k.charAt(j)){j+=1,W.lastIndex=j;var o=W.exec(k);a="/*"+o[0],j+=o[0].length;var l=function S(e){if(!e.match(G))return null;var t={};X.lastIndex=0;for(var n=X.exec(e);n;)t[n[1]]=n[2],n=X.exec(e);return t}(a);return l&&"start"===l.ignore&&(F.lastIndex=j,a+=(o=F.exec(k))[0],j+=o[0].length),[a=a.replace(Q.lineBreak,"\n"),"TK_BLOCK_COMMENT",l]}if("/"===k.charAt(j)){j+=1,z.lastIndex=j;var h=z.exec(k);return a="//"+h[0],j+=h[0].length,[a,"TK_COMMENT"]}}if("`"===i||"'"===i||'"'===i||("/"===i||y.e4x&&"<"===i&&k.slice(j-1).match(/^<([-a-zA-Z:0-9_.]+|{[^{}]*}|!\[CDATA\[[\s\S]*?\]\])(\s+[-a-zA-Z:0-9_.]+\s*=\s*('[^']*'|"[^"]*"|{.*?}))*\s*(\/?)\s*>/))&&("TK_RESERVED"===t.type&&Y(t.text,["return","case","throw","else","do","typeof","yield"])||"TK_END_EXPR"===t.type&&")"===t.text&&t.parent&&"TK_RESERVED"===t.parent.type&&Y(t.parent.text,["if","while","for"])||Y(t.type,["TK_COMMENT","TK_START_EXPR","TK_START_BLOCK","TK_END_BLOCK","TK_OPERATOR","TK_EQUALS","TK_EOF","TK_SEMICOLON","TK_COMMA"]))){var c=i,u=!1,p=!1;if(e=i,"/"===c)for(var d=!1;j<M&&(u||d||k.charAt(j)!==c)&&!Q.newline.test(k.charAt(j));)e+=k.charAt(j),u?u=!1:(u="\\"===k.charAt(j),"["===k.charAt(j)?d=!0:"]"===k.charAt(j)&&(d=!1)),j+=1;else if(y.e4x&&"<"===c){var f=/<(\/?)([-a-zA-Z:0-9_.]+|{[^{}]*}|!\[CDATA\[[\s\S]*?\]\])(\s+[-a-zA-Z:0-9_.]+\s*=\s*('[^']*'|"[^"]*"|{.*?}))*\s*(\/?)\s*>/g,T=k.slice(j-1),E=f.exec(T);if(E&&0===E.index){for(var g=E[2],x=0;E;){var w=!!E[1],K=E[2],R=!!E[E.length-1]||"![CDATA["===K.slice(0,8);if(K!==g||R||(w?--x:++x),x<=0)break;E=f.exec(T)}var m=E?E.index+E[0].length:T.length;return T=T.slice(0,m),j+=m-1,[T=T.replace(Q.lineBreak,"\n"),"TK_STRING"]}}else for(;j<M&&(u||k.charAt(j)!==c&&("`"===c||!Q.newline.test(k.charAt(j))));)(u||"`"===c)&&Q.newline.test(k.charAt(j))?("\r"===k.charAt(j)&&"\n"===k.charAt(j+1)&&(j+=1),e+="\n"):e+=k.charAt(j),u=u?("x"!==k.charAt(j)&&"u"!==k.charAt(j)||(p=!0),!1):"\\"===k.charAt(j),j+=1;if(p&&y.unescape_strings&&(e=function A(e){var t,n=!1,i="",r=0,s="",_=0;for(;n||r<e.length;)if(t=e.charAt(r),r++,n){if(n=!1,"x"===t)s=e.substr(r,2),r+=2;else{if("u"!==t){i+="\\"+t;continue}s=e.substr(r,4),r+=4}if(!s.match(/^[0123456789abcdefABCDEF]+$/))return e;if(0<=(_=parseInt(s,16))&&_<32){i+="x"===t?"\\x"+s:"\\u"+s;continue}if(34===_||39===_||92===_)i+="\\"+String.fromCharCode(_);else{if("x"===t&&126<_&&_<=255)return e;i+=String.fromCharCode(_)}}else"\\"===t?n=!0:i+=t;return i}(e)),j<M&&k.charAt(j)===c&&(e+=c,j+=1,"/"===c))for(;j<M&&Q.isIdentifierStart(k.charCodeAt(j));)e+=k.charAt(j),j+=1;return[e,"TK_STRING"]}if("#"===i){if(0===B.length&&"!"===k.charAt(j)){for(e=i;j<M&&"\n"!==i;)e+=i=k.charAt(j),j+=1;return[H(e)+"\n","TK_UNKNOWN"]}var b="#";if(j<M&&N.test(k.charAt(j))){for(;b+=i=k.charAt(j),(j+=1)<M&&"#"!==i&&"="!==i;);return"#"===i||("["===k.charAt(j)&&"]"===k.charAt(j+1)?(b+="[]",j+=2):"{"===k.charAt(j)&&"}"===k.charAt(j+1)&&(b+="{}",j+=2)),[b,"TK_WORD"]}}if("<"===i&&("?"===k.charAt(j)||"%"===k.charAt(j))){$.lastIndex=j-1;var v=$.exec(k);if(v)return i=v[0],j+=i.length-1,[i=i.replace(Q.lineBreak,"\n"),"TK_STRING"]}if("<"===i&&"\x3c!--"===k.substring(j-1,j+3)){for(j+=3,i="\x3c!--";!Q.newline.test(k.charAt(j))&&j<M;)i+=k.charAt(j),j++;return P=!0,[i,"TK_COMMENT"]}if("-"===i&&P&&"--\x3e"===k.substring(j-1,j+2))return P=!1,j+=2,["--\x3e","TK_COMMENT"];if("."===i)return[i,"TK_DOT"];if(Y(i,L)){for(;j<M&&Y(i+k.charAt(j),L)&&(i+=k.charAt(j),!(M<=(j+=1))););return","===i?[i,"TK_COMMA"]:"="===i?[i,"TK_EQUALS"]:[i,"TK_OPERATOR"]}return[i,"TK_UNKNOWN"]}this.tokenize=function(){var e,t,n;M=k.length,j=0,P=!1,B=[];for(var i=null,r=[],s=[];!t||"TK_EOF"!==t.type;){for(n=_(),e=new J(n[1],n[0],I,V);"TK_COMMENT"===e.type||"TK_BLOCK_COMMENT"===e.type||"TK_UNKNOWN"===e.type;)"TK_BLOCK_COMMENT"===e.type&&(e.directives=n[2]),s.push(e),n=_(),e=new J(n[1],n[0],I,V);s.length&&(e.comments_before=s,s=[]),"TK_START_BLOCK"===e.type||"TK_START_EXPR"===e.type?(e.parent=t,r.push(i),i=e):("TK_END_BLOCK"===e.type||"TK_END_EXPR"===e.type)&&i&&("]"===e.text&&"["===i.text||")"===e.text&&"("===i.text||"}"===e.text&&"{"===i.text)&&(e.parent=i.parent,i=r.pop()),B.push(e),t=e}return B}}return{run:function N(e,t){function _(e){return e.replace(/\s+$/g,"")}var n,i,r,T,s,a,E,o,l,g,x,w,h,c;for((t=t||{}).wrap_line_length!==undefined&&0!==parseInt(t.wrap_line_length,10)||t.max_char===undefined||0===parseInt(t.max_char,10)||(t.wrap_line_length=t.max_char),i=t.indent_inner_html!==undefined&&t.indent_inner_html,r=t.indent_size===undefined?4:parseInt(t.indent_size,10),T=t.indent_char===undefined?" ":t.indent_char,a=t.brace_style===undefined?"collapse":t.brace_style,s=0===parseInt(t.wrap_line_length,10)?32786:parseInt(t.wrap_line_length||250,10),E=t.unformatted||["a","span","img","bdo","em","strong","dfn","code","samp","kbd","const","cite","abbr","acronym","q","sub","sup","tt","i","b","big","small","u","s","strike","font","ins","del","address","pre"],o=t.preserve_newlines===undefined||t.preserve_newlines,l=o?isNaN(parseInt(t.max_preserve_newlines,10))?32786:parseInt(t.max_preserve_newlines,10):0,g=t.indent_handlebars!==undefined&&t.indent_handlebars,x=t.wrap_attributes===undefined?"auto":t.wrap_attributes,w=t.wrap_attributes_indent_size===undefined?r:parseInt(t.wrap_attributes_indent_size,10)||r,h=t.end_with_newline!==undefined&&t.end_with_newline,c=Array.isArray(t.extra_liners)?t.extra_liners.concat():"string"==typeof t.extra_liners?t.extra_liners.split(","):"head,body,/html".split(","),t.indent_with_tabs&&(T="\t",r=1),(n=new function k(){return this.pos=0,this.token="",this.current_mode="CONTENT",this.tags={parent:"parent1",parentcount:1,parent1:""},this.tag_type="",this.token_text=this.last_token=this.last_text=this.token_type="",this.newlines=0,this.indent_content=i,this.Utils={whitespace:"\n\r\t ".split(""),single_token:"br,input,link,meta,source,!doctype,basefont,base,area,hr,wbr,param,img,isindex,embed".split(","),extra_liners:c,in_array:function(e,t){for(var n=0;n<t.length;n++)if(e===t[n])return!0;return!1}},this.is_whitespace=function(e){for(;0<e.length;e++)if(!this.Utils.in_array(e.charAt(0),this.Utils.whitespace))return!1;return!0},this.traverse_whitespace=function(){var e="";if(e=this.input.charAt(this.pos),this.Utils.in_array(e,this.Utils.whitespace)){for(this.newlines=0;this.Utils.in_array(e,this.Utils.whitespace);)o&&"\n"===e&&this.newlines<=l&&(this.newlines+=1),this.pos++,e=this.input.charAt(this.pos);return!0}return!1},this.space_or_wrap=function(e){this.line_char_count>=this.wrap_line_length?(this.print_newline(!1,e),this.print_indentation(e)):(this.line_char_count++,e.push(" "))},this.get_content=function(){for(var e="",t=[];"<"!=this.input.charAt(this.pos);){if(this.pos>=this.input.length)return t.length?t.join(""):["","TK_EOF"];if(this.traverse_whitespace())this.space_or_wrap(t);else{if(g){var n=this.input.substr(this.pos,3);if("{{#"===n||"{{/"===n)break;if("{{!"===n)return[this.get_tag(),"TK_TAG_HANDLEBARS_COMMENT"];if("{{"===this.input.substr(this.pos,2)&&"{{else}}"===this.get_tag(!0))break}e=this.input.charAt(this.pos),this.pos++,this.line_char_count++,t.push(e)}}return t.length?t.join(""):""},this.get_contents_to=function(e){if(this.pos===this.input.length)return["","TK_EOF"];var t="",n=new RegExp("</"+e+"\\s*>","igm");n.lastIndex=this.pos;var i=n.exec(this.input),r=i?i.index:this.input.length;return this.pos<r&&(t=this.input.substring(this.pos,r),this.pos=r),t},this.record_tag=function(e){this.tags[e+"count"]?this.tags[e+"count"]++:this.tags[e+"count"]=1,this.tags[e+this.tags[e+"count"]]=this.indent_level,this.tags[e+this.tags[e+"count"]+"parent"]=this.tags.parent,this.tags.parent=e+this.tags[e+"count"]},this.retrieve_tag=function(e){if(this.tags[e+"count"]){for(var t=this.tags.parent;t&&e+this.tags[e+"count"]!==t;)t=this.tags[t+"parent"];t&&(this.indent_level=this.tags[e+this.tags[e+"count"]],this.tags.parent=this.tags[t+"parent"]),delete this.tags[e+this.tags[e+"count"]+"parent"],delete this.tags[e+this.tags[e+"count"]],1===this.tags[e+"count"]?delete this.tags[e+"count"]:this.tags[e+"count"]--}},this.indent_to_tag=function(e){if(this.tags[e+"count"]){for(var t=this.tags.parent;t&&e+this.tags[e+"count"]!==t;)t=this.tags[t+"parent"];t&&(this.indent_level=this.tags[e+this.tags[e+"count"]])}},this.get_tag=function(e){var t,n,i="",r=[],s="",_=!1,a=!0,o=this.pos,l=this.line_char_count;e=e!==undefined&&e;do{if(this.pos>=this.input.length)return e&&(this.pos=o,this.line_char_count=l),r.length?r.join(""):["","TK_EOF"];if(i=this.input.charAt(this.pos),this.pos++,this.Utils.in_array(i,this.Utils.whitespace))_=!0;else{if("'"!==i&&'"'!==i||(i+=this.get_unformatted(i),_=!0),"="===i&&(_=!1),r.length&&"="!=r[r.length-1]&&">"!=i&&_){if(this.space_or_wrap(r),_=!1,!a&&"force"===x&&"/"!=i){this.print_newline(!0,r),this.print_indentation(r);for(var h=0;h<w;h++)r.push(T)}for(var c=0;c<r.length;c++)if(" "===r[c]){a=!1;break}}if(g&&"<"===n&&i+this.input.charAt(this.pos)==="{{"&&(i+=this.get_unformatted("}}"),r.length&&" "!=r[r.length-1]&&"<"!=r[r.length-1]&&(i=" "+i),_=!0),"<"!==i||n||(t=this.pos-1,n="<"),g&&!n&&2<=r.length&&"{"===r[r.length-1]&&"{"===r[r.length-2]&&(t="#"===i||"/"===i||"!"===i?this.pos-3:this.pos-2,n="{"),this.line_char_count++,r.push(i),r[1]&&("!"===r[1]||"?"===r[1]||"%"===r[1])){r=[this.get_comment(t)];break}if(g&&r[1]&&"{"===r[1]&&r[2]&&"!"===r[2]){r=[this.get_comment(t)];break}if(g&&"{"===n&&2<r.length&&"}"===r[r.length-2]&&"}"===r[r.length-1])break}}while(">"!=i);var u,p,d=r.join("");u=-1!=d.indexOf(" ")?d.indexOf(" "):"{"===d[0]?d.indexOf("}"):d.indexOf(">"),p="<"!==d[0]&&g?"#"===d[2]?3:2:1;var f=d.substring(p,u).toLowerCase();return"/"===d.charAt(d.length-2)||this.Utils.in_array(f,this.Utils.single_token)?e||(this.tag_type="SINGLE"):g&&"{"===d[0]&&"else"===f?e||(this.indent_to_tag("if"),this.tag_type="HANDLEBARS_ELSE",this.indent_content=!0,this.traverse_whitespace()):this.is_unformatted(f,E)?(s=this.get_unformatted("</"+f+">",d),r.push(s),this.pos,this.tag_type="SINGLE"):"script"===f&&(-1===d.search("type")||-1<d.search("type")&&-1<d.search(/\b(text|application)\/(x-)?(javascript|ecmascript|jscript|livescript)/))?e||(this.record_tag(f),this.tag_type="SCRIPT"):"style"===f&&(-1===d.search("type")||-1<d.search("type")&&-1<d.search("text/css"))?e||(this.record_tag(f),this.tag_type="STYLE"):"!"===f.charAt(0)?e||(this.tag_type="SINGLE",this.traverse_whitespace()):e||("/"===f.charAt(0)?(this.retrieve_tag(f.substring(1)),this.tag_type="END"):(this.record_tag(f),"html"!=f.toLowerCase()&&(this.indent_content=!0),this.tag_type="START"),this.traverse_whitespace()&&this.space_or_wrap(r),this.Utils.in_array(f,this.Utils.extra_liners)&&(this.print_newline(!1,this.output),this.output.length&&"\n"!=this.output[this.output.length-2]&&this.print_newline(!0,this.output))),e&&(this.pos=o,this.line_char_count=l),r.join("")},this.get_comment=function(e){var t="",n=">",i=!1;this.pos=e;var r=this.input.charAt(this.pos);for(this.pos++;this.pos<=this.input.length&&((t+=r)[t.length-1]!==n[n.length-1]||-1==t.indexOf(n));)!i&&t.length<10&&(0===t.indexOf("<![if")?(n="<![endif]>",i=!0):0===t.indexOf("<![cdata[")?(n="]]>",i=!0):0===t.indexOf("<![")?(n="]>",i=!0):0===t.indexOf("\x3c!--")?(n="--\x3e",i=!0):0===t.indexOf("{{!")?(n="}}",i=!0):0===t.indexOf("<?")?(n="?>",i=!0):0===t.indexOf("<%")&&(n="%>",i=!0)),r=this.input.charAt(this.pos),this.pos++;return t},this.get_unformatted=function(e,t){if(t&&-1!=t.toLowerCase().indexOf(e))return"";var n="",i="",r=0,s=!0;do{if(this.pos>=this.input.length)return i;if(n=this.input.charAt(this.pos),this.pos++,this.Utils.in_array(n,this.Utils.whitespace)){if(!s){this.line_char_count--;continue}if("\n"===n||"\r"===n){i+="\n",this.line_char_count=0;continue}}i+=n,this.line_char_count++,s=!0,g&&"{"===n&&i.length&&"{"===i[i.length-2]&&(r=(i+=this.get_unformatted("}}")).length)}while(-1===i.toLowerCase().indexOf(e,r));return i},this.get_token=function(){var e;if("TK_TAG_SCRIPT"!==this.last_token&&"TK_TAG_STYLE"!==this.last_token)return"CONTENT"===this.current_mode?"string"!=typeof(e=this.get_content())?e:[e,"TK_CONTENT"]:"TAG"===this.current_mode?"string"!=typeof(e=this.get_tag())?e:[e,"TK_TAG_"+this.tag_type]:void 0;var t=this.last_token.substr(7);return"string"!=typeof(e=this.get_contents_to(t))?e:[e,"TK_"+t]},this.get_full_indent=function(e){return(e=this.indent_level+e||0)<1?"":new Array(e+1).join(this.indent_string)},this.is_unformatted=function(e,t){if(!this.Utils.in_array(e,t))return!1;if("a"!=e.toLowerCase()||!this.Utils.in_array("a",t))return!0;var n=(this.get_tag(!0)||"").match(/^\s*<\s*\/?([a-z]*)\s*[^>]*>\s*$/);return!(n&&!this.Utils.in_array(n,t))},this.printer=function(e,t,n,i,r){this.input=e||"",this.output=[],this.indent_character=t,this.indent_string="",this.indent_size=n,this.brace_style=r,this.indent_level=0,this.wrap_line_length=i;for(var s=this.line_char_count=0;s<this.indent_size;s++)this.indent_string+=this.indent_character;this.print_newline=function(e,t){this.line_char_count=0,t&&t.length&&(e||"\n"!=t[t.length-1])&&("\n"!=t[t.length-1]&&(t[t.length-1]=_(t[t.length-1])),t.push("\n"))},this.print_indentation=function(e){for(var t=0;t<this.indent_level;t++)e.push(this.indent_string),this.line_char_count+=this.indent_string.length},this.print_token=function(e){this.is_whitespace(e)&&!this.output.length||((e||""!==e)&&this.output.length&&"\n"===this.output[this.output.length-1]&&(this.print_indentation(this.output),e=function t(e){return e.replace(/^\s+/g,"")}(e)),this.print_token_raw(e))},this.print_token_raw=function(e){0<this.newlines&&(e=_(e)),e&&""!==e&&(1<e.length&&"\n"===e[e.length-1]?(this.output.push(e.slice(0,-1)),this.print_newline(!1,this.output)):this.output.push(e));for(var t=0;t<this.newlines;t++)this.print_newline(0<t,this.output);this.newlines=0},this.indent=function(){this.indent_level++},this.unindent=function(){0<this.indent_level&&this.indent_level--}},this}).printer(e,T,r,s,a);;){var u=n.get_token();if(n.token_text=u[0],n.token_type=u[1],"TK_EOF"===n.token_type)break;switch(n.token_type){case"TK_TAG_START":n.print_newline(!1,n.output),n.print_token(n.token_text),n.indent_content&&(n.indent(),n.indent_content=!1),n.current_mode="CONTENT";break;case"TK_TAG_STYLE":case"TK_TAG_SCRIPT":n.print_newline(!1,n.output),n.print_token(n.token_text),n.current_mode="CONTENT";break;case"TK_TAG_END":if("TK_CONTENT"===n.last_token&&""===n.last_text){var p=n.token_text.match(/\w+/)[0],d=null;n.output.length&&(d=n.output[n.output.length-1].match(/(?:<|{{#)\/?\s*(\w+)/)),(null===d||d[1]!=p&&!n.Utils.in_array(d[1],E))&&n.print_newline(!1,n.output)}n.print_token(n.token_text),n.current_mode="CONTENT";break;case"TK_TAG_SINGLE":var f=n.token_text.match(/^\s*<([a-z-]+)/i);f&&n.Utils.in_array(f[1],E)||n.print_newline(!1,n.output),n.print_token(n.token_text),n.current_mode="CONTENT";break;case"TK_TAG_HANDLEBARS_ELSE":n.print_token(n.token_text),n.indent_content&&(n.indent(),n.indent_content=!1),n.current_mode="CONTENT";break;case"TK_TAG_HANDLEBARS_COMMENT":case"TK_CONTENT":n.print_token(n.token_text),n.current_mode="TAG";break;case"TK_STYLE":case"TK_SCRIPT":if(""!==n.token_text){n.print_newline(!1,n.output);var K=n.token_text,R=void 0,m=1;"TK_SCRIPT"===n.token_type?R=O:"TK_STYLE"===n.token_type&&(R=y),"keep"===t.indent_scripts?m=0:"separate"===t.indent_scripts&&(m=-n.indent_level);var b=n.get_full_indent(m);if(R)K=R(K.replace(/^\s*/,b),t);else{var v=K.match(/^\s*/)[0].match(/[^\n\r]*$/)[0].split(n.indent_string).length-1,S=n.get_full_indent(m-v);K=K.replace(/^\s*/,b).replace(/\r\n|\r|\n/g,"\n"+S).replace(/\s+$/,"")}K&&(n.print_token_raw(K),n.print_newline(!0,n.output))}n.current_mode="TAG";break;default:""!==n.token_text&&n.print_token(n.token_text)}n.last_token=n.token_type,n.last_text=n.token_text}var A=n.output.join("").replace(/[\r\n\t ]+$/,"");return h&&(A+="\n"),A}}}}); |
/*! | ||
* froala_editor v3.0.5 (https://www.froala.com/wysiwyg-editor) | ||
* froala_editor v3.0.6 (https://www.froala.com/wysiwyg-editor) | ||
* License https://froala.com/wysiwyg-editor/terms/ | ||
@@ -4,0 +4,0 @@ * Copyright 2014-2019 Froala Labs |
/*! | ||
* froala_editor v3.0.5 (https://www.froala.com/wysiwyg-editor) | ||
* froala_editor v3.0.6 (https://www.froala.com/wysiwyg-editor) | ||
* License https://froala.com/wysiwyg-editor/terms/ | ||
@@ -4,0 +4,0 @@ * Copyright 2014-2019 Froala Labs |
/*! | ||
* froala_editor v3.0.5 (https://www.froala.com/wysiwyg-editor) | ||
* froala_editor v3.0.6 (https://www.froala.com/wysiwyg-editor) | ||
* License https://froala.com/wysiwyg-editor/terms/ | ||
@@ -4,0 +4,0 @@ * Copyright 2014-2019 Froala Labs |
/*! | ||
* froala_editor v3.0.5 (https://www.froala.com/wysiwyg-editor) | ||
* froala_editor v3.0.6 (https://www.froala.com/wysiwyg-editor) | ||
* License https://froala.com/wysiwyg-editor/terms/ | ||
@@ -4,0 +4,0 @@ * Copyright 2014-2019 Froala Labs |
/*! | ||
* froala_editor v3.0.5 (https://www.froala.com/wysiwyg-editor) | ||
* froala_editor v3.0.6 (https://www.froala.com/wysiwyg-editor) | ||
* License https://froala.com/wysiwyg-editor/terms/ | ||
@@ -4,0 +4,0 @@ * Copyright 2014-2019 Froala Labs |
/*! | ||
* froala_editor v3.0.5 (https://www.froala.com/wysiwyg-editor) | ||
* froala_editor v3.0.6 (https://www.froala.com/wysiwyg-editor) | ||
* License https://froala.com/wysiwyg-editor/terms/ | ||
@@ -4,0 +4,0 @@ * Copyright 2014-2019 Froala Labs |
/*! | ||
* froala_editor v3.0.5 (https://www.froala.com/wysiwyg-editor) | ||
* froala_editor v3.0.6 (https://www.froala.com/wysiwyg-editor) | ||
* License https://froala.com/wysiwyg-editor/terms/ | ||
@@ -4,0 +4,0 @@ * Copyright 2014-2019 Froala Labs |
/*! | ||
* froala_editor v3.0.5 (https://www.froala.com/wysiwyg-editor) | ||
* froala_editor v3.0.6 (https://www.froala.com/wysiwyg-editor) | ||
* License https://froala.com/wysiwyg-editor/terms/ | ||
@@ -4,0 +4,0 @@ * Copyright 2014-2019 Froala Labs |
/*! | ||
* froala_editor v3.0.5 (https://www.froala.com/wysiwyg-editor) | ||
* froala_editor v3.0.6 (https://www.froala.com/wysiwyg-editor) | ||
* License https://froala.com/wysiwyg-editor/terms/ | ||
@@ -4,0 +4,0 @@ * Copyright 2014-2019 Froala Labs |
/*! | ||
* froala_editor v3.0.5 (https://www.froala.com/wysiwyg-editor) | ||
* froala_editor v3.0.6 (https://www.froala.com/wysiwyg-editor) | ||
* License https://froala.com/wysiwyg-editor/terms/ | ||
@@ -4,0 +4,0 @@ * Copyright 2014-2019 Froala Labs |
/*! | ||
* froala_editor v3.0.5 (https://www.froala.com/wysiwyg-editor) | ||
* froala_editor v3.0.6 (https://www.froala.com/wysiwyg-editor) | ||
* License https://froala.com/wysiwyg-editor/terms/ | ||
@@ -4,0 +4,0 @@ * Copyright 2014-2019 Froala Labs |
/*! | ||
* froala_editor v3.0.5 (https://www.froala.com/wysiwyg-editor) | ||
* froala_editor v3.0.6 (https://www.froala.com/wysiwyg-editor) | ||
* License https://froala.com/wysiwyg-editor/terms/ | ||
@@ -4,0 +4,0 @@ * Copyright 2014-2019 Froala Labs |
/*! | ||
* froala_editor v3.0.5 (https://www.froala.com/wysiwyg-editor) | ||
* froala_editor v3.0.6 (https://www.froala.com/wysiwyg-editor) | ||
* License https://froala.com/wysiwyg-editor/terms/ | ||
@@ -4,0 +4,0 @@ * Copyright 2014-2019 Froala Labs |
/*! | ||
* froala_editor v3.0.5 (https://www.froala.com/wysiwyg-editor) | ||
* froala_editor v3.0.6 (https://www.froala.com/wysiwyg-editor) | ||
* License https://froala.com/wysiwyg-editor/terms/ | ||
@@ -7,2 +7,2 @@ * Copyright 2014-2019 Froala Labs | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(require("froala-editor")):"function"==typeof define&&define.amd?define(["froala-editor"],t):t(e.FroalaEditor)}(this,function(_e){"use strict";function Le(e){return(Le="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}_e=_e&&_e.hasOwnProperty("default")?_e["default"]:_e,Object.assign(_e.POPUP_TEMPLATES,{"image.insert":"[_BUTTONS_][_UPLOAD_LAYER_][_BY_URL_LAYER_][_PROGRESS_BAR_]","image.edit":"[_BUTTONS_]","image.alt":"[_BUTTONS_][_ALT_LAYER_]","image.size":"[_BUTTONS_][_SIZE_LAYER_]"}),Object.assign(_e.DEFAULTS,{imageInsertButtons:["imageBack","|","imageUpload","imageByURL"],imageEditButtons:["imageReplace","imageAlign","imageCaption","imageRemove","imageLink","linkOpen","linkEdit","linkRemove","-","imageDisplay","imageStyle","imageAlt","imageSize"],imageAltButtons:["imageBack","|"],imageSizeButtons:["imageBack","|"],imageUpload:!0,imageUploadURL:null,imageCORSProxy:"https://cors-anywhere.froala.com",imageUploadRemoteUrls:!0,imageUploadParam:"file",imageUploadParams:{},imageUploadToS3:!1,imageUploadMethod:"POST",imageMaxSize:10485760,imageAllowedTypes:["jpeg","jpg","png","gif","webp"],imageResize:!0,imageResizeWithPercent:!1,imageRoundPercent:!1,imageDefaultWidth:300,imageDefaultAlign:"center",imageDefaultDisplay:"block",imageSplitHTML:!1,imageStyles:{"fr-rounded":"Rounded","fr-bordered":"Bordered","fr-shadow":"Shadow"},imageMove:!0,imageMultipleStyles:!0,imageTextNear:!0,imagePaste:!0,imagePasteProcess:!1,imageMinWidth:16,imageOutputSize:!1,imageDefaultMargin:5,imageAddNewLine:!1}),_e.PLUGINS.image=function(g){var d,l,f,p,o,a,c=g.$,s="https://i.froala.com/upload",t=!1,i=1,m=2,u=3,h=4,v=5,b=6,r={};function y(){var e=g.popups.get("image.insert").find(".fr-image-by-url-layer input");e.val(""),d&&e.val(d.attr("src")),e.trigger("change")}function n(){var e=g.popups.get("image.edit");if(e||(e=P()),e){var t=we();Ce()&&(t=t.find(".fr-img-wrap")),g.popups.setContainer("image.edit",g.$sc),g.popups.refresh("image.edit");var a=t.offset().left+t.outerWidth()/2,i=t.offset().top+t.outerHeight();d.hasClass("fr-uploading")?O():g.popups.show("image.edit",a,i,t.outerHeight(),!0)}}function w(){k()}function C(e){0<e.parents(".fr-img-caption").length&&(e=e.parents(".fr-img-caption").first());var t=e.hasClass("fr-dib")?"block":e.hasClass("fr-dii")?"inline":null,a=e.hasClass("fr-fil")?"left":e.hasClass("fr-fir")?"right":ue(e);me(e,t,a),e.removeClass("fr-dib fr-dii fr-fir fr-fil")}function A(){for(var e,t="IMG"==g.el.tagName?[g.el]:g.el.querySelectorAll("img"),a=0;a<t.length;a++){var i=c(t[a]);!g.opts.htmlUntouched&&g.opts.useClasses?((g.opts.imageDefaultAlign||g.opts.imageDefaultDisplay)&&(0<(e=i).parents(".fr-img-caption").length&&(e=e.parents(".fr-img-caption").first()),e.hasClass("fr-dii")||e.hasClass("fr-dib")||(e.addClass("fr-fi"+ue(e)[0]),e.addClass("fr-di"+he(e)[0]),e.css("margin",""),e.css("float",""),e.css("display",""),e.css("z-index",""),e.css("position",""),e.css("overflow",""),e.css("vertical-align",""))),g.opts.imageTextNear||(0<i.parents(".fr-img-caption").length?i.parents(".fr-img-caption").first().removeClass("fr-dii").addClass("fr-dib"):i.removeClass("fr-dii").addClass("fr-dib"))):g.opts.htmlUntouched||g.opts.useClasses||(g.opts.imageDefaultAlign||g.opts.imageDefaultDisplay)&&C(i),g.opts.iframe&&i.on("load",g.size.syncIframe)}}function E(e){void 0===e&&(e=!0);var t,a=Array.prototype.slice.call(g.el.querySelectorAll("img")),i=[];for(t=0;t<a.length;t++)if(i.push(a[t].getAttribute("src")),c(a[t]).toggleClass("fr-draggable",g.opts.imageMove),""===a[t].getAttribute("class")&&a[t].removeAttribute("class"),""===a[t].getAttribute("style")&&a[t].removeAttribute("style"),a[t].parentNode&&a[t].parentNode.parentNode&&g.node.hasClass(a[t].parentNode.parentNode,"fr-img-caption")){var r=a[t].parentNode.parentNode;g.browser.mozilla||r.setAttribute("contenteditable",!1),r.setAttribute("draggable",!1),r.classList.add("fr-draggable");var n=a[t].nextSibling;n&&!g.browser.mozilla&&n.setAttribute("contenteditable",!0)}if(o)for(t=0;t<o.length;t++)i.indexOf(o[t].getAttribute("src"))<0&&g.events.trigger("image.removed",[c(o[t])]);if(o&&e){var s=[];for(t=0;t<o.length;t++)s.push(o[t].getAttribute("src"));for(t=0;t<a.length;t++)s.indexOf(a[t].getAttribute("src"))<0&&g.events.trigger("image.loaded",[c(a[t])])}o=a}function S(){if(l||function s(){var e;g.shared.$image_resizer?(l=g.shared.$image_resizer,p=g.shared.$img_overlay,g.events.on("destroy",function(){c("body").first().append(l.removeClass("fr-active"))},!0)):(g.shared.$image_resizer=c(document.createElement("div")).attr("class","fr-image-resizer"),l=g.shared.$image_resizer,g.events.$on(l,"mousedown",function(e){e.stopPropagation()},!0),g.opts.imageResize&&(l.append(R("nw")+R("ne")+R("sw")+R("se")),g.shared.$img_overlay=c(document.createElement("div")).attr("class","fr-image-overlay"),p=g.shared.$img_overlay,e=l.get(0).ownerDocument,c(e).find("body").first().append(p)));g.events.on("shared.destroy",function(){l.html("").removeData().remove(),l=null,g.opts.imageResize&&(p.remove(),p=null)},!0),g.helpers.isMobile()||g.events.$on(c(g.o_win),"resize",function(){d&&!d.hasClass("fr-uploading")?pe(!0):d&&(S(),ve(),O(!1))});if(g.opts.imageResize){e=l.get(0).ownerDocument,g.events.$on(l,g._mousedown,".fr-handler",x),g.events.$on(c(e),g._mousemove,$),g.events.$on(c(e.defaultView||e.parentWindow),g._mouseup,U),g.events.$on(p,"mouseleave",U);var i=1,r=null,n=0;g.events.on("keydown",function(e){if(d){var t=-1!=navigator.userAgent.indexOf("Mac OS X")?e.metaKey:e.ctrlKey,a=e.which;(a!==r||200<e.timeStamp-n)&&(i=1),(a==_e.KEYCODE.EQUALS||g.browser.mozilla&&a==_e.KEYCODE.FF_EQUALS)&&t&&!e.altKey?i=ee.call(this,e,1,1,i):(a==_e.KEYCODE.HYPHEN||g.browser.mozilla&&a==_e.KEYCODE.FF_HYPHEN)&&t&&!e.altKey?i=ee.call(this,e,2,-1,i):g.keys.ctrlKey(e)||a!=_e.KEYCODE.ENTER||(d.before("<br>"),T(d)),r=a,n=e.timeStamp}},!0),g.events.on("keyup",function(){i=1})}}(),!d)return!1;var e=g.$wp||g.$sc;e.append(l),l.data("instance",g);var t=e.scrollTop()-("static"!=e.css("position")?e.offset().top:0),a=e.scrollLeft()-("static"!=e.css("position")?e.offset().left:0);a-=g.helpers.getPX(e.css("border-left-width")),t-=g.helpers.getPX(e.css("border-top-width")),g.$el.is("img")&&g.$sc.is("body")&&(a=t=0);var i=we();Ce()&&(i=i.find(".fr-img-wrap"));var r=0,n=0;g.opts.iframe&&(r=g.helpers.getPX(g.$wp.find(".fr-iframe").css("padding-top")),n=g.helpers.getPX(g.$wp.find(".fr-iframe").css("padding-left"))),l.css("top",(g.opts.iframe?i.offset().top+r:i.offset().top+t)-1).css("left",(g.opts.iframe?i.offset().left+n:i.offset().left+a)-1).css("width",i.get(0).getBoundingClientRect().width).css("height",i.get(0).getBoundingClientRect().height).addClass("fr-active")}function R(e){return'<div class="fr-handler fr-h'+e+'"></div>'}function D(e){Ce()?d.parents(".fr-img-caption").css("width",e):d.css("width",e)}function x(e){if(!g.core.sameInstance(l))return!0;if(e.preventDefault(),e.stopPropagation(),g.$el.find("img.fr-error").left)return!1;g.undo.canDo()||g.undo.saveStep();var t=e.pageX||e.originalEvent.touches[0].pageX;if("mousedown"==e.type){var a=g.$oel.get(0).ownerDocument,i=a.defaultView||a.parentWindow,r=!1;try{r=i.location!=i.parent.location&&!(i.$&&i.$.FE)}catch(o){}r&&i.frameElement&&(t+=g.helpers.getPX(c(i.frameElement).offset().left)+i.frameElement.clientLeft)}(f=c(this)).data("start-x",t),f.data("start-width",d.width()),f.data("start-height",d.height());var n=d.width();if(g.opts.imageResizeWithPercent){var s=d.parentsUntil(g.$el,g.html.blockTagsQuery()).get(0)||g.el;n=(n/c(s).outerWidth()*100).toFixed(2)+"%"}D(n),p.show(),g.popups.hideAll(),ce()}function $(e){if(!g.core.sameInstance(l))return!0;var t;if(f&&d){if(e.preventDefault(),g.$el.find("img.fr-error").left)return!1;var a=e.pageX||(e.originalEvent.touches?e.originalEvent.touches[0].pageX:null);if(!a)return!1;var i=a-f.data("start-x"),r=f.data("start-width");if((f.hasClass("fr-hnw")||f.hasClass("fr-hsw"))&&(i=0-i),g.opts.imageResizeWithPercent){var n=d.parentsUntil(g.$el,g.html.blockTagsQuery()).get(0)||g.el;r=((r+i)/c(n).outerWidth()*100).toFixed(2),g.opts.imageRoundPercent&&(r=Math.round(r)),D(r+"%"),(t=Ce()?(g.helpers.getPX(d.parents(".fr-img-caption").css("width"))/c(n).outerWidth()*100).toFixed(2):(g.helpers.getPX(d.css("width"))/c(n).outerWidth()*100).toFixed(2))===r||g.opts.imageRoundPercent||D(t+"%"),d.css("height","").removeAttr("height")}else r+i>=g.opts.imageMinWidth&&(D(r+i),t=Ce()?g.helpers.getPX(d.parents(".fr-img-caption").css("width")):g.helpers.getPX(d.css("width"))),t!==r+i&&D(t),((d.attr("style")||"").match(/(^height:)|(; *height:)/)||d.attr("height"))&&(d.css("height",f.data("start-height")*d.width()/f.data("start-width")),d.removeAttr("height"));S(),g.events.trigger("image.resize",[ye()])}}function U(e){if(!g.core.sameInstance(l))return!0;if(f&&d){if(e&&e.stopPropagation(),g.$el.find("img.fr-error").left)return!1;f=null,p.hide(),S(),n(),g.undo.saveStep(),g.events.trigger("image.resizeEnd",[ye()])}}function I(e,t,a){g.edit.on(),d&&d.addClass("fr-error"),r[e]?B(r[e]):B(g.language.translate("Something went wrong. Please try again.")),!d&&a&&te(a),g.events.trigger("image.error",[{code:e,message:r[e]},t,a])}function P(e){if(e)return g.$wp&&g.events.$on(g.$wp,"scroll.image-edit",function(){d&&g.popups.isVisible("image.edit")&&(g.events.disableBlur(),n())}),!0;var t="";if(0<g.opts.imageEditButtons.length){var a={buttons:t+='<div class="fr-buttons"> \n '.concat(g.button.buildList(g.opts.imageEditButtons),"\n </div>")};return g.popups.create("image.edit",a)}return!1}function O(e){var t=g.popups.get("image.insert");if(t||(t=X()),t.find(".fr-layer.fr-active").removeClass("fr-active").addClass("fr-pactive"),t.find(".fr-image-progress-bar-layer").addClass("fr-active"),t.find(".fr-buttons").hide(),d){var a=we();g.popups.setContainer("image.insert",g.$sc);var i=a.offset().left,r=a.offset().top+a.height();g.popups.show("image.insert",i,r,a.outerHeight())}void 0===e&&N(g.language.translate("Uploading"),0)}function k(e){var t=g.popups.get("image.insert");if(t&&(t.find(".fr-layer.fr-pactive").addClass("fr-active").removeClass("fr-pactive"),t.find(".fr-image-progress-bar-layer").removeClass("fr-active"),t.find(".fr-buttons").show(),e||g.$el.find("img.fr-error").length)){if(g.events.focus(),g.$el.find("img.fr-error").length&&(g.$el.find("img.fr-error").remove(),g.undo.saveStep(),g.undo.run(),g.undo.dropRedo()),!g.$wp&&d){var a=d;pe(!0),g.selection.setAfter(a.get(0)),g.selection.restore()}g.popups.hide("image.insert")}}function N(e,t){var a=g.popups.get("image.insert");if(a){var i=a.find(".fr-image-progress-bar-layer");i.find("h3").text(e+(t?" "+t+"%":"")),i.removeClass("fr-error"),t?(i.find("div").removeClass("fr-indeterminate"),i.find("div > span").css("width",t+"%")):i.find("div").addClass("fr-indeterminate")}}function B(e){O();var t=g.popups.get("image.insert").find(".fr-image-progress-bar-layer");t.addClass("fr-error");var a=t.find("h3");a.text(e),g.events.disableBlur(),a.focus()}function T(e){fe.call(e.get(0))}function _(){var e=c(this);g.popups.hide("image.insert"),e.removeClass("fr-uploading"),e.next().is("br")&&e.next().remove(),T(e),g.events.trigger("image.loaded",[e])}function L(s,e,o,l,f){g.edit.off(),N(g.language.translate("Loading image")),e&&(s=g.helpers.sanitizeURL(s));var t=new Image;t.onload=function(){var e,t;if(l){g.undo.canDo()||l.hasClass("fr-uploading")||g.undo.saveStep();var a=l.data("fr-old-src");l.data("fr-image-pasted")&&(a=null),g.$wp?((e=l.clone().removeData("fr-old-src").removeClass("fr-uploading").removeAttr("data-fr-image-pasted")).off("load"),a&&l.attr("src",a),l.replaceWith(e)):e=l;for(var i=e.get(0).attributes,r=0;r<i.length;r++){var n=i[r];0===n.nodeName.indexOf("data-")&&e.removeAttr(n.nodeName)}if(void 0!==o)for(t in o)o.hasOwnProperty(t)&&"link"!=t&&e.attr("data-"+t,o[t]);e.on("load",_),e.attr("src",s),g.edit.on(),E(!1),g.undo.saveStep(),g.events.disableBlur(),g.$el.blur(),g.events.trigger(a?"image.replaced":"image.inserted",[e,f])}else e=Y(s,o,_),E(!1),g.undo.saveStep(),g.events.disableBlur(),g.$el.blur(),g.events.trigger("image.inserted",[e,f])},t.onerror=function(){I(i)},O(g.language.translate("Loading image")),t.src=s}function M(e){N(g.language.translate("Loading image"));var t=this.status,a=this.response,i=this.responseXML,r=this.responseText;try{if(g.opts.imageUploadToS3)if(201==t){var n=function o(e){try{var t=c(e).find("Location").text(),a=c(e).find("Key").text();return!1===g.events.trigger("image.uploadedToS3",[t,a,e],!0)?(g.edit.on(),!1):t}catch(i){return I(h,e),!1}}(i);n&&L(n,!1,[],e,a||i)}else I(h,a||i,e);else if(200<=t&&t<300){var s=function l(e){try{if(!1===g.events.trigger("image.uploaded",[e],!0))return g.edit.on(),!1;var t=JSON.parse(e);return t.link?t:(I(m,e),!1)}catch(a){return I(h,e),!1}}(r);s&&L(s.link,!1,s,e,a||r)}else I(u,a||r,e)}catch(f){I(h,a||r,e)}}function z(){I(h,this.response||this.responseText||this.responseXML)}function K(e){if(e.lengthComputable){var t=e.loaded/e.total*100|0;N(g.language.translate("Uploading"),t)}}function Y(e,t,a){var i,r=c(document.createElement("img")).attr("src",e);if(t&&void 0!==t)for(i in t)t.hasOwnProperty(i)&&"link"!=i&&(" data-"+i+'="'+t[i]+'"',r.attr("data-str"+i,t[i]));var n=g.opts.imageDefaultWidth;n&&"auto"!=n&&(n=g.opts.imageResizeWithPercent?"100%":n+"px"),r.attr("style",n?"width: "+n+";":""),me(r,g.opts.imageDefaultDisplay,g.opts.imageDefaultAlign),r.on("load",a),r.on("error",a),g.edit.on(),g.events.focus(!0),g.selection.restore(),g.undo.saveStep(),g.opts.imageSplitHTML?g.markers.split():g.markers.insert(),g.html.wrap();var s=g.$el.find(".fr-marker");return s.length?(s.parent().is("hr")&&s.parent().after(s),g.node.isLastSibling(s)&&s.parent().hasClass("fr-deletable")&&s.insertAfter(s.parent()),s.replaceWith(r)):g.$el.append(r),g.selection.clear(),r}function W(){g.edit.on(),k(!0)}function G(e,t){if(void 0!==e&&0<e.length){if(!1===g.events.trigger("image.beforeUpload",[e,t]))return!1;var a,i=e[0];if((null===g.opts.imageUploadURL||g.opts.imageUploadURL==s)&&!g.opts.imageUploadToS3)return function o(r,n){var s=new FileReader;s.onload=function(){var e=s.result;if(s.result.indexOf("svg+xml")<0){for(var t=atob(s.result.split(",")[1]),a=[],i=0;i<t.length;i++)a.push(t.charCodeAt(i));e=window.URL.createObjectURL(new Blob([new Uint8Array(a)],{type:r.type})),g.image.insert(e,!1,null,n)}},O(),s.readAsDataURL(r)}(i,t||d),!1;if(i.name||(i.name=(new Date).getTime()+"."+(i.type||"image/jpeg").replace(/image\//g,"")),i.size>g.opts.imageMaxSize)return I(v),!1;if(g.opts.imageAllowedTypes.indexOf(i.type.replace(/image\//g,""))<0)return I(b),!1;if(g.drag_support.formdata&&(a=g.drag_support.formdata?new FormData:null),a){var r;if(!1!==g.opts.imageUploadToS3)for(r in a.append("key",g.opts.imageUploadToS3.keyStart+(new Date).getTime()+"-"+(i.name||"untitled")),a.append("success_action_status","201"),a.append("X-Requested-With","xhr"),a.append("Content-Type",i.type),g.opts.imageUploadToS3.params)g.opts.imageUploadToS3.params.hasOwnProperty(r)&&a.append(r,g.opts.imageUploadToS3.params[r]);for(r in g.opts.imageUploadParams)g.opts.imageUploadParams.hasOwnProperty(r)&&a.append(r,g.opts.imageUploadParams[r]);a.append(g.opts.imageUploadParam,i,i.name);var n=g.opts.imageUploadURL;g.opts.imageUploadToS3&&(n=g.opts.imageUploadToS3.uploadURL?g.opts.imageUploadToS3.uploadURL:"https://"+g.opts.imageUploadToS3.region+".amazonaws.com/"+g.opts.imageUploadToS3.bucket),function l(t,a,e,r){function n(){var e=c(this);e.off("load"),e.addClass("fr-uploading"),e.next().is("br")&&e.next().remove(),g.placeholder.refresh(),T(e),S(),O(),g.edit.off(),t.onload=function(){M.call(t,e)},t.onerror=z,t.upload.onprogress=K,t.onabort=W,c(e.off("abortUpload")).on("abortUpload",function(){4!=t.readyState&&(t.abort(),r?(r.attr("src",r.data("fr-old-src")),r.removeClass("fr-uploading")):e.remove(),pe(!0))}),t.send(a)}var s=new FileReader;s.onload=function(){var e=s.result;if(s.result.indexOf("svg+xml")<0){for(var t=atob(s.result.split(",")[1]),a=[],i=0;i<t.length;i++)a.push(t.charCodeAt(i));e=window.URL.createObjectURL(new Blob([new Uint8Array(a)],{type:"image/jpeg"}))}r?(r.on("load",n),r.on("error",function(){n(),c(this).off("error")}),g.edit.on(),g.undo.saveStep(),r.data("fr-old-src",r.attr("src")),r.attr("src",e)):Y(e,null,n)},s.readAsDataURL(e)}(g.core.getXHR(n,g.opts.imageUploadMethod),a,i,t||d)}}}function V(e){if(e.is("img")&&0<e.parents(".fr-img-caption").length)return e.parents(".fr-img-caption")}function H(e){var t=e.originalEvent.dataTransfer;if(t&&t.files&&t.files.length){var a=t.files[0];if(a&&a.type&&-1!==a.type.indexOf("image")&&0<=g.opts.imageAllowedTypes.indexOf(a.type.replace(/image\//g,""))){if(!g.opts.imageUpload)return e.preventDefault(),e.stopPropagation(),!1;g.markers.remove(),g.markers.insertAtPoint(e.originalEvent),g.$el.find(".fr-marker").replaceWith(_e.MARKERS),0===g.$el.find(".fr-marker").length&&g.selection.setAtEnd(g.el),g.popups.hideAll();var i=g.popups.get("image.insert");i||(i=X()),g.popups.setContainer("image.insert",g.$sc);var r=e.originalEvent.pageX,n=e.originalEvent.pageY;if(g.opts.iframe){var s=g.helpers.getPX(g.$wp.find(".fr-iframe").css("padding-top")),o=g.helpers.getPX(g.$wp.find(".fr-iframe").css("padding-left"));n+=g.$iframe.offset().top+s,r+=g.$iframe.offset().left+o}return g.popups.show("image.insert",r,n),O(),0<=g.opts.imageAllowedTypes.indexOf(a.type.replace(/image\//g,""))?(pe(!0),G(t.files)):I(b),e.preventDefault(),e.stopPropagation(),!1}}}function X(e){if(e)return g.popups.onRefresh("image.insert",y),g.popups.onHide("image.insert",w),!0;var t,a,i="";g.opts.imageUpload||-1===g.opts.imageInsertButtons.indexOf("imageUpload")||g.opts.imageInsertButtons.splice(g.opts.imageInsertButtons.indexOf("imageUpload"),1);var r=g.button.buildList(g.opts.imageInsertButtons);""!==r&&(i='<div class="fr-buttons fr-tabs">'+r+"</div>");var n=g.opts.imageInsertButtons.indexOf("imageUpload"),s=g.opts.imageInsertButtons.indexOf("imageByURL"),o="";0<=n&&(t=" fr-active",0<=s&&s<n&&(t=""),o='<div class="fr-image-upload-layer'+t+' fr-layer" id="fr-image-upload-layer-'+g.id+'"><strong>'+g.language.translate("Drop image")+"</strong><br>("+g.language.translate("or click")+')<div class="fr-form"><input type="file" accept="image/'+g.opts.imageAllowedTypes.join(", image/").toLowerCase()+'" tabIndex="-1" aria-labelledby="fr-image-upload-layer-'+g.id+'" role="button"></div></div>');var l="";0<=s&&(t=" fr-active",0<=n&&n<s&&(t=""),l='<div class="fr-image-by-url-layer'+t+' fr-layer" id="fr-image-by-url-layer-'+g.id+'"><div class="fr-input-line"><input id="fr-image-by-url-layer-text-'+g.id+'" type="text" placeholder="http://" tabIndex="1" aria-required="true"></div><div class="fr-action-buttons"><button type="button" class="fr-command fr-submit" data-cmd="imageInsertByURL" tabIndex="2" role="button">'+g.language.translate("Insert")+"</button></div></div>");var f={buttons:i,upload_layer:o,by_url_layer:l,progress_bar:'<div class="fr-image-progress-bar-layer fr-layer"><h3 tabIndex="-1" class="fr-message">Uploading</h3><div class="fr-loader"><span class="fr-progress"></span></div><div class="fr-action-buttons"><button type="button" class="fr-command fr-dismiss" data-cmd="imageDismissError" tabIndex="2" role="button">OK</button></div></div>'};return 1<=g.opts.imageInsertButtons.length&&(a=g.popups.create("image.insert",f)),g.$wp&&g.events.$on(g.$wp,"scroll",function(){d&&g.popups.isVisible("image.insert")&&ve()}),function p(i){g.events.$on(i,"dragover dragenter",".fr-image-upload-layer",function(){return c(this).addClass("fr-drop"),!1},!0),g.events.$on(i,"dragleave dragend",".fr-image-upload-layer",function(){return c(this).removeClass("fr-drop"),!1},!0),g.events.$on(i,"drop",".fr-image-upload-layer",function(e){e.preventDefault(),e.stopPropagation(),c(this).removeClass("fr-drop");var t=e.originalEvent.dataTransfer;if(t&&t.files){var a=i.data("instance")||g;a.events.disableBlur(),a.image.upload(t.files),a.events.enableBlur()}},!0),g.helpers.isIOS()&&g.events.$on(i,"touchstart",'.fr-image-upload-layer input[type="file"]',function(){c(this).trigger("click")},!0),g.events.$on(i,"change",'.fr-image-upload-layer input[type="file"]',function(){if(this.files){var e=i.data("instance")||g;e.events.disableBlur(),i.find("input:focus").blur(),e.events.enableBlur(),e.image.upload(this.files,d)}c(this).val("")},!0)}(a),a}function F(){d&&g.popups.get("image.alt").find("input").val(d.attr("alt")||"").trigger("change")}function j(){var e=g.popups.get("image.alt");e||(e=q()),k(),g.popups.refresh("image.alt"),g.popups.setContainer("image.alt",g.$sc);var t=we();Ce()&&(t=t.find(".fr-img-wrap"));var a=t.offset().left+t.outerWidth()/2,i=t.offset().top+t.outerHeight();g.popups.show("image.alt",a,i,t.outerHeight(),!0)}function q(e){if(e)return g.popups.onRefresh("image.alt",F),!0;var t={buttons:'<div class="fr-buttons fr-tabs">'+g.button.buildList(g.opts.imageAltButtons)+"</div>",alt_layer:'<div class="fr-image-alt-layer fr-layer fr-active" id="fr-image-alt-layer-'+g.id+'"><div class="fr-input-line"><input id="fr-image-alt-layer-text-'+g.id+'" type="text" placeholder="'+g.language.translate("Alternative Text")+'" tabIndex="1"></div><div class="fr-action-buttons"><button type="button" class="fr-command fr-submit" data-cmd="imageSetAlt" tabIndex="2" role="button">'+g.language.translate("Update")+"</button></div></div>"},a=g.popups.create("image.alt",t);return g.$wp&&g.events.$on(g.$wp,"scroll.image-alt",function(){d&&g.popups.isVisible("image.alt")&&j()}),a}function Q(){var e=g.popups.get("image.size");if(d)if(Ce()){var t=d.parent();t.get(0).style.width||(t=d.parent().parent()),e.find('input[name="width"]').val(t.get(0).style.width).trigger("change"),e.find('input[name="height"]').val(t.get(0).style.height).trigger("change")}else e.find('input[name="width"]').val(d.get(0).style.width).trigger("change"),e.find('input[name="height"]').val(d.get(0).style.height).trigger("change")}function J(){var e=g.popups.get("image.size");e||(e=Z()),k(),g.popups.refresh("image.size"),g.popups.setContainer("image.size",g.$sc);var t=we();Ce()&&(t=t.find(".fr-img-wrap"));var a=t.offset().left+t.outerWidth()/2,i=t.offset().top+t.outerHeight();g.popups.show("image.size",a,i,t.outerHeight(),!0)}function Z(e){if(e)return g.popups.onRefresh("image.size",Q),!0;var t={buttons:'<div class="fr-buttons fr-tabs">'+g.button.buildList(g.opts.imageSizeButtons)+"</div>",size_layer:'<div class="fr-image-size-layer fr-layer fr-active" id="fr-image-size-layer-'+g.id+'"><div class="fr-image-group"><div class="fr-input-line"><input id="fr-image-size-layer-width-'+g.id+'" type="text" name="width" placeholder="'+g.language.translate("Width")+'" tabIndex="1"></div><div class="fr-input-line"><input id="fr-image-size-layer-height'+g.id+'" type="text" name="height" placeholder="'+g.language.translate("Height")+'" tabIndex="1"></div></div><div class="fr-action-buttons"><button type="button" class="fr-command fr-submit" data-cmd="imageSetSize" tabIndex="2" role="button">'+g.language.translate("Update")+"</button></div></div>"},a=g.popups.create("image.size",t);return g.$wp&&g.events.$on(g.$wp,"scroll.image-size",function(){d&&g.popups.isVisible("image.size")&&J()}),a}function ee(e,t,a,i){return e.pageX=t,x.call(this,e),e.pageX=e.pageX+a*Math.floor(Math.pow(1.1,i)),$.call(this,e),U.call(this,e),++i}function te(e){(e=e||we())&&!1!==g.events.trigger("image.beforeRemove",[e])&&(g.popups.hideAll(),be(),pe(!0),g.undo.canDo()||g.undo.saveStep(),e.get(0)==g.el?e.removeAttr("src"):(e.get(0).parentNode&&"A"==e.get(0).parentNode.tagName?(g.selection.setBefore(e.get(0).parentNode)||g.selection.setAfter(e.get(0).parentNode)||e.parent().after(_e.MARKERS),c(e.get(0).parentNode).remove()):(g.selection.setBefore(e.get(0))||g.selection.setAfter(e.get(0))||e.after(_e.MARKERS),e.remove()),g.html.fillEmptyBlocks(),g.selection.restore()),g.undo.saveStep())}function ae(e){var t=e.which;if(d&&(t==_e.KEYCODE.BACKSPACE||t==_e.KEYCODE.DELETE))return e.preventDefault(),e.stopPropagation(),te(),!1;if(d&&t==_e.KEYCODE.ESC){var a=d;return pe(!0),g.selection.setAfter(a.get(0)),g.selection.restore(),e.preventDefault(),!1}if(!d||t!=_e.KEYCODE.ARROW_LEFT&&t!=_e.KEYCODE.ARROW_RIGHT)return d&&t===_e.KEYCODE.TAB?(e.preventDefault(),e.stopPropagation(),pe(!0),!1):d&&t!=_e.KEYCODE.F10&&!g.keys.isBrowserAction(e)?(e.preventDefault(),e.stopPropagation(),!1):void 0;var i=d.get(0);return pe(!0),t==_e.KEYCODE.ARROW_LEFT?g.selection.setBefore(i):g.selection.setAfter(i),g.selection.restore(),e.preventDefault(),!1}function ie(e){if(e&&"IMG"==e.tagName){if(g.node.hasClass(e,"fr-uploading")||g.node.hasClass(e,"fr-error")?e.parentNode.removeChild(e):g.node.hasClass(e,"fr-draggable")&&e.classList.remove("fr-draggable"),e.parentNode&&e.parentNode.parentNode&&g.node.hasClass(e.parentNode.parentNode,"fr-img-caption")){var t=e.parentNode.parentNode;t.removeAttribute("contenteditable"),t.removeAttribute("draggable"),t.classList.remove("fr-draggable");var a=e.nextSibling;a&&a.removeAttribute("contenteditable")}}else if(e&&e.nodeType==Node.ELEMENT_NODE)for(var i=e.querySelectorAll("img.fr-uploading, img.fr-error, img.fr-draggable"),r=0;r<i.length;r++)ie(i[r])}function re(e){if(!1===g.events.trigger("image.beforePasteUpload",[e]))return!1;d=c(e),S(),n(),ve(),O(),d.on("load",function(){S(),c(g.popups.get("image.insert").get(0)).find("div.fr-active.fr-error").length<1&&O(),c(this).off("load")});for(var t=c(e).attr("src").split(","),a=atob(t[1]),i=[],r=0;r<a.length;r++)i.push(a.charCodeAt(r));G([new Blob([new Uint8Array(i)],{type:t[0].replace(/data\:/g,"").replace(/;base64/g,"")})],d)}function ne(){g.opts.imagePaste?g.$el.find("img[data-fr-image-pasted]").each(function(e,i){if(g.opts.imagePasteProcess){var t=g.opts.imageDefaultWidth;t&&"auto"!=t&&(t+=g.opts.imageResizeWithPercent?"%":"px"),c(i).css("width",t).removeClass("fr-dii fr-dib fr-fir fr-fil"),me(c(i),g.opts.imageDefaultDisplay,g.opts.imageDefaultAlign)}if(0===i.src.indexOf("data:"))re(i);else if(0===i.src.indexOf("blob:")||0===i.src.indexOf("http")&&g.opts.imageUploadRemoteUrls&&g.opts.imageCORSProxy){var a=new Image;a.crossOrigin="Anonymous",a.onload=function(){var e,t=g.o_doc.createElement("CANVAS"),a=t.getContext("2d");t.height=this.naturalHeight,t.width=this.naturalWidth,a.drawImage(this,0,0),setTimeout(function(){re(i)},0),e=2e3<this.naturalWidth||1500<this.naturalHeight?"jpeg":"png",i.src=t.toDataURL("image/"+e)},a.src=(0===i.src.indexOf("blob:")?"":g.opts.imageCORSProxy+"/")+i.src}else 0!==i.src.indexOf("http")||0===i.src.indexOf("https://mail.google.com/mail")?(g.selection.save(),c(i).remove(),g.selection.restore()):c(i).removeAttr("data-fr-image-pasted")}):g.$el.find("img[data-fr-image-pasted]").remove()}function se(e){var t=e.target.result,a=g.opts.imageDefaultWidth;a&&"auto"!=a&&(a+=g.opts.imageResizeWithPercent?"%":"px"),g.undo.saveStep(),g.html.insert('<img data-fr-image-pasted="true" src="'+t+'"'+(a?' style="width: '+a+';"':"")+">");var i=g.$el.find('img[data-fr-image-pasted="true"]');i&&me(i,g.opts.imageDefaultDisplay,g.opts.imageDefaultAlign),g.events.trigger("paste.after")}function oe(e){if(e&&e.clipboardData&&e.clipboardData.items){var t=null;if(e.clipboardData.types&&-1!=[].indexOf.call(e.clipboardData.types,"text/rtf")||e.clipboardData.getData("text/rtf"))t=e.clipboardData.items[0].getAsFile();else for(var a=0;a<e.clipboardData.items.length&&!(t=e.clipboardData.items[a].getAsFile());a++);if(t)return function i(e){var t=new FileReader;t.onload=se,t.readAsDataURL(e)}(t),!1}}function le(e){return e=e.replace(/<img /gi,'<img data-fr-image-pasted="true" ')}function fe(e){if("false"==c(this).parents("[contenteditable]").not(".fr-element").not(".fr-img-caption").not("body").first().attr("contenteditable"))return!0;if(e&&"touchend"==e.type&&a)return!0;if(e&&g.edit.isDisabled())return e.stopPropagation(),e.preventDefault(),!1;for(var t=0;t<_e.INSTANCES.length;t++)_e.INSTANCES[t]!=g&&_e.INSTANCES[t].events.trigger("image.hideResizer");g.toolbar.disable(),e&&(e.stopPropagation(),e.preventDefault()),g.helpers.isMobile()&&(g.events.disableBlur(),g.$el.blur(),g.events.enableBlur()),g.opts.iframe&&g.size.syncIframe(),d=c(this),be(),S(),n(),g.browser.msie?(g.popups.areVisible()&&g.events.disableBlur(),g.win.getSelection&&(g.win.getSelection().removeAllRanges(),g.win.getSelection().addRange(g.doc.createRange()))):g.selection.clear(),g.helpers.isIOS()&&(g.events.disableBlur(),g.$el.blur()),g.button.bulkRefresh(),g.events.trigger("video.hideResizer")}function pe(e){d&&(function t(){return ge}()||!0===e)&&(g.toolbar.enable(),l.removeClass("fr-active"),g.popups.hide("image.edit"),d=null,ce(),f=null,p&&p.hide())}r[i]="Image cannot be loaded from the passed link.",r[m]="No link in upload response.",r[u]="Error during file upload.",r[h]="Parsing response failed.",r[v]="File is too large.",r[b]="Image file type is invalid.",r[7]="Files can be uploaded only to same domain in IE 8 and IE 9.";var ge=!(r[8]="Image file is corrupted.");function de(){ge=!0}function ce(){ge=!1}function me(e,t,a){!g.opts.htmlUntouched&&g.opts.useClasses?(e.removeClass("fr-fil fr-fir fr-dib fr-dii"),a&&e.addClass("fr-fi"+a[0]),t&&e.addClass("fr-di"+t[0])):"inline"==t?(e.css({display:"inline-block",verticalAlign:"bottom",margin:g.opts.imageDefaultMargin}),"center"==a?e.css({"float":"none",marginBottom:"",marginTop:"",maxWidth:"calc(100% - "+2*g.opts.imageDefaultMargin+"px)",textAlign:"center"}):"left"==a?e.css({"float":"left",marginLeft:0,maxWidth:"calc(100% - "+g.opts.imageDefaultMargin+"px)",textAlign:"left"}):e.css({"float":"right",marginRight:0,maxWidth:"calc(100% - "+g.opts.imageDefaultMargin+"px)",textAlign:"right"})):"block"==t&&(e.css({display:"block","float":"none",verticalAlign:"top",margin:g.opts.imageDefaultMargin+"px auto",textAlign:"center"}),"left"==a?e.css({marginLeft:0,textAlign:"left"}):"right"==a&&e.css({marginRight:0,textAlign:"right"}))}function ue(e){if(void 0===e&&(e=we()),e){if(e.hasClass("fr-fil"))return"left";if(e.hasClass("fr-fir"))return"right";if(e.hasClass("fr-dib")||e.hasClass("fr-dii"))return"center";var t=e.css("float");if(e.css("float","none"),"block"==e.css("display")){if(e.css("float",""),e.css("float")!=t&&e.css("float",t),0===parseInt(e.css("margin-left"),10))return"left";if(0===parseInt(e.css("margin-right"),10))return"right"}else{if(e.css("float",""),e.css("float")!=t&&e.css("float",t),"left"==e.css("float"))return"left";if("right"==e.css("float"))return"right"}}return"center"}function he(e){void 0===e&&(e=we());var t=e.css("float");return e.css("float","none"),"block"==e.css("display")?(e.css("float",""),e.css("float")!=t&&e.css("float",t),"block"):(e.css("float",""),e.css("float")!=t&&e.css("float",t),"inline")}function ve(){var e=g.popups.get("image.insert");e||(e=X()),g.popups.isVisible("image.insert")||(k(),g.popups.refresh("image.insert"),g.popups.setContainer("image.insert",g.$sc));var t=we();Ce()&&(t=t.find(".fr-img-wrap"));var a=t.offset().left+t.outerWidth()/2,i=t.offset().top+t.outerHeight();g.popups.show("image.insert",a,i,t.outerHeight(!0),!0)}function be(){if(d){g.events.disableBlur(),g.selection.clear();var e=g.doc.createRange();e.selectNode(d.get(0)),g.browser.msie&&e.collapse(!0),g.selection.get().addRange(e),g.events.enableBlur()}}function ye(){return d}function we(){return Ce()?d.parents(".fr-img-caption").first():d}function Ce(){return!!d&&0<d.parents(".fr-img-caption").length}return{_init:function Ae(){var i;(function e(){g.events.$on(g.$el,g._mousedown,"IMG"==g.el.tagName?null:'img:not([contenteditable="false"])',function(e){if("false"==c(this).parents("contenteditable").not(".fr-element").not(".fr-img-caption").not("body").first().attr("contenteditable"))return!0;g.helpers.isMobile()||g.selection.clear(),t=!0,g.popups.areVisible()&&g.events.disableBlur(),g.browser.msie&&(g.events.disableBlur(),g.$el.attr("contenteditable",!1)),g.draggable||"touchstart"==e.type||e.preventDefault(),e.stopPropagation()}),g.events.$on(g.$el,g._mousedown,".fr-img-caption .fr-inner",function(e){g.core.hasFocus()||g.events.focus(),e.stopPropagation()}),g.events.$on(g.$el,"paste",".fr-img-caption .fr-inner",function(e){g.toolbar.hide(),e.stopPropagation()}),g.events.$on(g.$el,g._mouseup,"IMG"==g.el.tagName?null:'img:not([contenteditable="false"])',function(e){if("false"==c(this).parents("contenteditable").not(".fr-element").not(".fr-img-caption").not("body").first().attr("contenteditable"))return!0;t&&(t=!1,e.stopPropagation(),g.browser.msie&&(g.$el.attr("contenteditable",!0),g.events.enableBlur()))}),g.events.on("keyup",function(e){if(e.shiftKey&&""===g.selection.text().replace(/\n/g,"")&&g.keys.isArrow(e.which)){var t=g.selection.element(),a=g.selection.endElement();t&&"IMG"==t.tagName?T(c(t)):a&&"IMG"==a.tagName&&T(c(a))}},!0),g.events.on("drop",H),g.events.on("element.beforeDrop",V),g.events.on("mousedown window.mousedown",de),g.events.on("window.touchmove",ce),g.events.on("mouseup window.mouseup",function(){if(d)return pe(),!1;ce()}),g.events.on("commands.mousedown",function(e){0<e.parents(".fr-toolbar").length&&pe()}),g.events.on("image.resizeEnd",function(){g.opts.iframe&&g.size.syncIframe()}),g.events.on("blur image.hideResizer commands.undo commands.redo element.dropped",function(){pe(!(t=!1))}),g.events.on("modals.hide",function(){d&&(be(),g.selection.clear())}),g.events.on("image.resizeEnd",function(){g.win.getSelection&&T(d)}),g.opts.imageAddNewLine&&g.events.on("image.inserted",function(e){var t=e.get(0);for(t.nextSibling&&"BR"===t.nextSibling.tagName&&(t=t.nextSibling);t&&!g.node.isElement(t);)t=g.node.isLastSibling(t)?t.parentNode:null;g.node.isElement(t)&&(g.opts.enter===_e.ENTER_BR?e.after("<br>"):c(g.node.blockParent(e.get(0))).after("<"+g.html.defaultTag()+"><br></"+g.html.defaultTag()+">"))})})(),"IMG"==g.el.tagName&&g.$el.addClass("fr-view"),g.events.$on(g.$el,g.helpers.isMobile()&&!g.helpers.isWindowsPhone()?"touchend":"click","IMG"==g.el.tagName?null:'img:not([contenteditable="false"])',fe),g.helpers.isMobile()&&(g.events.$on(g.$el,"touchstart","IMG"==g.el.tagName?null:'img:not([contenteditable="false"])',function(){a=!1}),g.events.$on(g.$el,"touchmove",function(){a=!0})),g.$wp?(g.events.on("window.keydown keydown",ae,!0),g.events.on("keyup",function(e){if(d&&e.which==_e.KEYCODE.ENTER)return!1},!0),g.events.$on(g.$el,"keydown",function(){var e=g.selection.element();(e.nodeType===Node.TEXT_NODE||"BR"==e.tagName&&g.node.isLastSibling(e))&&(e=e.parentNode),g.node.hasClass(e,"fr-inner")||(g.node.hasClass(e,"fr-img-caption")||(e=c(e).parents(".fr-img-caption").get(0)),g.node.hasClass(e,"fr-img-caption")&&(c(e).after(_e.INVISIBLE_SPACE+_e.MARKERS),g.selection.restore()))})):g.events.$on(g.$win,"keydown",ae),g.events.on("toolbar.esc",function(){if(d){if(g.$wp)g.events.disableBlur(),g.events.focus();else{var e=d;pe(!0),g.selection.setAfter(e.get(0)),g.selection.restore()}return!1}},!0),g.events.on("toolbar.focusEditor",function(){if(d)return!1},!0),g.events.on("window.cut window.copy",function(e){if(d&&g.popups.isVisible("image.edit")&&!g.popups.get("image.edit").find(":focus").length){var t=we();Ce()?(t.before(_e.START_MARKER),t.after(_e.END_MARKER),g.selection.restore(),g.paste.saveCopiedText(t.get(0).outerHTML,t.text())):(be(),g.paste.saveCopiedText(d.get(0).outerHTML,d.attr("alt"))),"copy"==e.type?setTimeout(function(){T(d)}):(pe(!0),g.undo.saveStep(),setTimeout(function(){g.undo.saveStep()},0))}},!0),g.browser.msie&&g.events.on("keydown",function(e){if(!g.selection.isCollapsed()||!d)return!0;var t=e.which;t==_e.KEYCODE.C&&g.keys.ctrlKey(e)?g.events.trigger("window.copy"):t==_e.KEYCODE.X&&g.keys.ctrlKey(e)&&g.events.trigger("window.cut")}),g.events.$on(c(g.o_win),"keydown",function(e){var t=e.which;if(d&&t==_e.KEYCODE.BACKSPACE)return e.preventDefault(),!1}),g.events.$on(g.$win,"keydown",function(e){var t=e.which;d&&d.hasClass("fr-uploading")&&t==_e.KEYCODE.ESC&&d.trigger("abortUpload")}),g.events.on("destroy",function(){d&&d.hasClass("fr-uploading")&&d.trigger("abortUpload")}),g.events.on("paste.before",oe),g.events.on("paste.beforeCleanup",le),g.events.on("paste.after",ne),g.events.on("html.set",A),g.events.on("html.inserted",A),A(),g.events.on("destroy",function(){o=[]}),g.events.on("html.processGet",ie),g.opts.imageOutputSize&&g.events.on("html.beforeGet",function(){i=g.el.querySelectorAll("img");for(var e=0;e<i.length;e++){var t=i[e].style.width||c(i[e]).width(),a=i[e].style.height||c(i[e]).height();t&&i[e].setAttribute("width",(""+t).replace(/px/,"")),a&&i[e].setAttribute("height",(""+a).replace(/px/,""))}}),g.opts.iframe&&g.events.on("image.loaded",g.size.syncIframe),g.$wp&&(E(),g.events.on("contentChanged",E)),g.events.$on(c(g.o_win),"orientationchange.image",function(){setTimeout(function(){d&&T(d)},100)}),P(!0),X(!0),Z(!0),q(!0),g.events.on("node.remove",function(e){if("IMG"==e.get(0).tagName)return te(e),!1})},showInsertPopup:function Ee(){var e=g.$tb.find('.fr-command[data-cmd="insertImage"]'),t=g.popups.get("image.insert");if(t||(t=X()),k(),!t.hasClass("fr-active"))if(g.popups.refresh("image.insert"),g.popups.setContainer("image.insert",g.$tb),e.isVisible()){var a=g.button.getPosition(e),i=a.left,r=a.top;g.popups.show("image.insert",i,r,e.outerHeight())}else g.position.forSelection(t),g.popups.show("image.insert")},showLayer:function Se(e){var t,a,i=g.popups.get("image.insert");if(d||g.opts.toolbarInline){if(d){var r=we();Ce()&&(r=r.find(".fr-img-wrap")),a=r.offset().top+r.outerHeight(),t=r.offset().left}}else{var n=g.$tb.find('.fr-command[data-cmd="insertImage"]');t=n.offset().left,a=n.offset().top+(g.opts.toolbarBottom?10:n.outerHeight()-10)}!d&&g.opts.toolbarInline&&(a=i.offset().top-g.helpers.getPX(i.css("margin-top")),i.hasClass("fr-above")&&(a+=i.outerHeight())),i.find(".fr-layer").removeClass("fr-active"),i.find(".fr-"+e+"-layer").addClass("fr-active"),g.popups.show("image.insert",t,a,d?d.outerHeight():0),g.accessibility.focusPopup(i)},refreshUploadButton:function Re(e){var t=g.popups.get("image.insert");t&&t.find(".fr-image-upload-layer").hasClass("fr-active")&&e.addClass("fr-active").attr("aria-pressed",!0)},refreshByURLButton:function De(e){var t=g.popups.get("image.insert");t&&t.find(".fr-image-by-url-layer").hasClass("fr-active")&&e.addClass("fr-active").attr("aria-pressed",!0)},upload:G,insertByURL:function xe(){var e=g.popups.get("image.insert").find(".fr-image-by-url-layer input");if(0<e.val().length){O(),N(g.language.translate("Loading image"));var t=e.val().trim();if(g.opts.imageUploadRemoteUrls&&g.opts.imageCORSProxy&&g.opts.imageUpload){var a=new XMLHttpRequest;a.onload=function(){200==this.status?G([new Blob([this.response],{type:this.response.type||"image/png"})],d):I(i)},a.onerror=function(){L(t,!0,[],d)},a.open("GET",g.opts.imageCORSProxy+"/"+t,!0),a.responseType="blob",a.send()}else L(t,!0,[],d);e.val(""),e.blur()}},align:function $e(e){var t=we();t.removeClass("fr-fir fr-fil"),!g.opts.htmlUntouched&&g.opts.useClasses?"left"==e?t.addClass("fr-fil"):"right"==e&&t.addClass("fr-fir"):me(t,he(),e),be(),S(),n(),g.selection.clear()},refreshAlign:function Ue(e){d&&e.find("> *").first().replaceWith(g.icon.create("image-align-"+ue()))},refreshAlignOnShow:function Ie(e,t){d&&t.find('.fr-command[data-param1="'+ue()+'"]').addClass("fr-active").attr("aria-selected",!0)},display:function Pe(e){var t=we();t.removeClass("fr-dii fr-dib"),!g.opts.htmlUntouched&&g.opts.useClasses?"inline"==e?t.addClass("fr-dii"):"block"==e&&t.addClass("fr-dib"):me(t,e,ue()),be(),S(),n(),g.selection.clear()},refreshDisplayOnShow:function Oe(e,t){d&&t.find('.fr-command[data-param1="'+he()+'"]').addClass("fr-active").attr("aria-selected",!0)},replace:ve,back:function e(){d?(g.events.disableBlur(),c(".fr-popup input:focus").blur(),T(d)):(g.events.disableBlur(),g.selection.restore(),g.events.enableBlur(),g.popups.hide("image.insert"),g.toolbar.showInline())},get:ye,getEl:we,insert:L,showProgressBar:O,remove:te,hideProgressBar:k,applyStyle:function ke(e,t,a){if(void 0===t&&(t=g.opts.imageStyles),void 0===a&&(a=g.opts.imageMultipleStyles),!d)return!1;var i=we();if(!a){var r=Object.keys(t);r.splice(r.indexOf(e),1),i.removeClass(r.join(" "))}"object"==Le(t[e])?(i.removeAttr("style"),i.css(t[e].style)):i.toggleClass(e),T(d)},showAltPopup:j,showSizePopup:J,setAlt:function Ne(e){if(d){var t=g.popups.get("image.alt");d.attr("alt",e||t.find("input").val()||""),t.find("input:focus").blur(),T(d)}},setSize:function Be(e,t){if(d){var a=g.popups.get("image.size");e=e||a.find('input[name="width"]').val()||"",t=t||a.find('input[name="height"]').val()||"";var i=/^[\d]+((px)|%)*$/g;d.removeAttr("width").removeAttr("height"),e.match(i)?d.css("width",e):d.css("width",""),t.match(i)?d.css("height",t):d.css("height",""),Ce()&&(d.parents(".fr-img-caption").removeAttr("width").removeAttr("height"),e.match(i)?d.parents(".fr-img-caption").css("width",e):d.parents(".fr-img-caption").css("width",""),t.match(i)?d.parents(".fr-img-caption").css("height",t):d.parents(".fr-img-caption").css("height","")),a&&a.find("input:focus").blur(),T(d)}},toggleCaption:function Te(){var e;if(d&&!Ce()){var t,a;(e=d).parent().is("a")&&(e=d.parent()),e.attr("style")&&(a=-1<(t=e.attr("style").split(":")).indexOf("width")?t[t.indexOf("width")+1].replace(";",""):"");var i=g.opts.imageResizeWithPercent?(-1<a.indexOf("px")?null:a)||"100%":d.width()+"px";e.wrap("<span "+(g.browser.mozilla?"":'contenteditable="false"')+'class="fr-img-caption '+d.attr("class")+'" style="'+(g.opts.useClasses?"":e.attr("style"))+'" draggable="false"></span>'),e.wrap('<span class="fr-img-wrap"></span>'),d.after('<span class="fr-inner"'+(g.browser.mozilla?"":' contenteditable="true"')+">"+_e.START_MARKER+g.language.translate("Image Caption")+_e.END_MARKER+"</span>"),d.removeAttr("class").removeAttr("style").removeAttr("width"),d.parents(".fr-img-caption").css("width",i),pe(!0),g.selection.restore()}else e=we(),d.insertAfter(e),d.attr("class",e.attr("class").replace("fr-img-caption","")).attr("style",e.attr("style")),e.remove(),T(d)},hasCaption:Ce,exitEdit:pe,edit:T}},_e.DefineIcon("insertImage",{NAME:"image",SVG_KEY:"insertImage"}),_e.RegisterShortcut(_e.KEYCODE.P,"insertImage",null,"P"),_e.RegisterCommand("insertImage",{title:"Insert Image",undo:!1,focus:!0,refreshAfterCallback:!1,popup:!0,callback:function(){this.popups.isVisible("image.insert")?(this.$el.find(".fr-marker").length&&(this.events.disableBlur(),this.selection.restore()),this.popups.hide("image.insert")):this.image.showInsertPopup()},plugin:"image"}),_e.DefineIcon("imageUpload",{NAME:"upload",SVG_KEY:"upload"}),_e.RegisterCommand("imageUpload",{title:"Upload Image",undo:!1,focus:!1,toggle:!0,callback:function(){this.image.showLayer("image-upload")},refresh:function(e){this.image.refreshUploadButton(e)}}),_e.DefineIcon("imageByURL",{NAME:"link",SVG_KEY:"insertLink"}),_e.RegisterCommand("imageByURL",{title:"By URL",undo:!1,focus:!1,toggle:!0,callback:function(){this.image.showLayer("image-by-url")},refresh:function(e){this.image.refreshByURLButton(e)}}),_e.RegisterCommand("imageInsertByURL",{title:"Insert Image",undo:!0,refreshAfterCallback:!1,callback:function(){this.image.insertByURL()},refresh:function(e){this.image.get()?e.text(this.language.translate("Replace")):e.text(this.language.translate("Insert"))}}),_e.DefineIcon("imageDisplay",{NAME:"star",SVG_KEY:"imageDisplay"}),_e.RegisterCommand("imageDisplay",{title:"Display",type:"dropdown",options:{inline:"Inline",block:"Break Text"},callback:function(e,t){this.image.display(t)},refresh:function(e){this.opts.imageTextNear||e.addClass("fr-hidden")},refreshOnShow:function(e,t){this.image.refreshDisplayOnShow(e,t)}}),_e.DefineIcon("image-align",{NAME:"align-left",SVG_KEY:"alignLeft"}),_e.DefineIcon("image-align-left",{NAME:"align-left",SVG_KEY:"alignLeft"}),_e.DefineIcon("image-align-right",{NAME:"align-right",SVG_KEY:"alignRight"}),_e.DefineIcon("image-align-center",{NAME:"align-justify",SVG_KEY:"alignCenter"}),_e.DefineIcon("imageAlign",{NAME:"align-justify",SVG_KEY:"alignJustify"}),_e.RegisterCommand("imageAlign",{type:"dropdown",title:"Align",options:{left:"Align Left",center:"None",right:"Align Right"},html:function(){var e='<ul class="fr-dropdown-list" role="presentation">',t=_e.COMMANDS.imageAlign.options;for(var a in t)t.hasOwnProperty(a)&&(e+='<li role="presentation"><a class="fr-command fr-title" tabIndex="-1" role="option" data-cmd="imageAlign" data-param1="'+a+'" title="'+this.language.translate(t[a])+'">'+this.icon.create("image-align-"+a)+'<span class="fr-sr-only">'+this.language.translate(t[a])+"</span></a></li>");return e+="</ul>"},callback:function(e,t){this.image.align(t)},refresh:function(e){this.image.refreshAlign(e)},refreshOnShow:function(e,t){this.image.refreshAlignOnShow(e,t)}}),_e.DefineIcon("imageReplace",{NAME:"exchange",FA5NAME:"exchange-alt",SVG_KEY:"replaceImage"}),_e.RegisterCommand("imageReplace",{title:"Replace",undo:!1,focus:!1,popup:!0,refreshAfterCallback:!1,callback:function(){this.image.replace()}}),_e.DefineIcon("imageRemove",{NAME:"trash",SVG_KEY:"remove"}),_e.RegisterCommand("imageRemove",{title:"Remove",callback:function(){this.image.remove()}}),_e.DefineIcon("imageBack",{NAME:"arrow-left",SVG_KEY:"back"}),_e.RegisterCommand("imageBack",{title:"Back",undo:!1,focus:!1,back:!0,callback:function(){this.image.back()},refresh:function(e){this.$;this.image.get()||this.opts.toolbarInline?(e.removeClass("fr-hidden"),e.next(".fr-separator").removeClass("fr-hidden")):(e.addClass("fr-hidden"),e.next(".fr-separator").addClass("fr-hidden"))}}),_e.RegisterCommand("imageDismissError",{title:"OK",undo:!1,callback:function(){this.image.hideProgressBar(!0)}}),_e.DefineIcon("imageStyle",{NAME:"magic",SVG_KEY:"imageClass"}),_e.RegisterCommand("imageStyle",{title:"Style",type:"dropdown",html:function(){var e='<ul class="fr-dropdown-list" role="presentation">',t=this.opts.imageStyles;for(var a in t)if(t.hasOwnProperty(a)){var i=t[a];"object"==Le(i)&&(i=i.title),e+='<li role="presentation"><a class="fr-command" tabIndex="-1" role="option" data-cmd="imageStyle" data-param1="'+a+'">'+this.language.translate(i)+"</a></li>"}return e+="</ul>"},callback:function(e,t){this.image.applyStyle(t)},refreshOnShow:function(e,t){var a=this.$,i=this.image.getEl();i&&t.find(".fr-command").each(function(){var e=a(this).data("param1"),t=i.hasClass(e);a(this).toggleClass("fr-active",t).attr("aria-selected",t)})}}),_e.DefineIcon("imageAlt",{NAME:"info",SVG_KEY:"imageAltText"}),_e.RegisterCommand("imageAlt",{undo:!1,focus:!1,popup:!0,title:"Alternative Text",callback:function(){this.image.showAltPopup()}}),_e.RegisterCommand("imageSetAlt",{undo:!0,focus:!1,title:"Update",refreshAfterCallback:!1,callback:function(){this.image.setAlt()}}),_e.DefineIcon("imageSize",{NAME:"arrows-alt",SVG_KEY:"imageSize"}),_e.RegisterCommand("imageSize",{undo:!1,focus:!1,popup:!0,title:"Change Size",callback:function(){this.image.showSizePopup()}}),_e.RegisterCommand("imageSetSize",{undo:!0,focus:!1,title:"Update",refreshAfterCallback:!1,callback:function(){this.image.setSize()}}),_e.DefineIcon("imageCaption",{NAME:"commenting",FA5NAME:"comment-alt",SVG_KEY:"imageCaption"}),_e.RegisterCommand("imageCaption",{undo:!0,focus:!1,title:"Image Caption",refreshAfterCallback:!0,callback:function(){this.image.toggleCaption()},refresh:function(e){this.image.get()&&e.toggleClass("fr-active",this.image.hasCaption())}})}); | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(require("froala-editor")):"function"==typeof define&&define.amd?define(["froala-editor"],t):t(e.FroalaEditor)}(this,function(_e){"use strict";function Le(e){return(Le="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}_e=_e&&_e.hasOwnProperty("default")?_e["default"]:_e,Object.assign(_e.POPUP_TEMPLATES,{"image.insert":"[_BUTTONS_][_UPLOAD_LAYER_][_BY_URL_LAYER_][_PROGRESS_BAR_]","image.edit":"[_BUTTONS_]","image.alt":"[_BUTTONS_][_ALT_LAYER_]","image.size":"[_BUTTONS_][_SIZE_LAYER_]"}),Object.assign(_e.DEFAULTS,{imageInsertButtons:["imageBack","|","imageUpload","imageByURL"],imageEditButtons:["imageReplace","imageAlign","imageCaption","imageRemove","imageLink","linkOpen","linkEdit","linkRemove","-","imageDisplay","imageStyle","imageAlt","imageSize"],imageAltButtons:["imageBack","|"],imageSizeButtons:["imageBack","|"],imageUpload:!0,imageUploadURL:null,imageCORSProxy:"https://cors-anywhere.froala.com",imageUploadRemoteUrls:!0,imageUploadParam:"file",imageUploadParams:{},imageUploadToS3:!1,imageUploadMethod:"POST",imageMaxSize:10485760,imageAllowedTypes:["jpeg","jpg","png","gif","webp"],imageResize:!0,imageResizeWithPercent:!1,imageRoundPercent:!1,imageDefaultWidth:300,imageDefaultAlign:"center",imageDefaultDisplay:"block",imageSplitHTML:!1,imageStyles:{"fr-rounded":"Rounded","fr-bordered":"Bordered","fr-shadow":"Shadow"},imageMove:!0,imageMultipleStyles:!0,imageTextNear:!0,imagePaste:!0,imagePasteProcess:!1,imageMinWidth:16,imageOutputSize:!1,imageDefaultMargin:5,imageAddNewLine:!1}),_e.PLUGINS.image=function(g){var d,l,f,p,o,a,c=g.$,s="https://i.froala.com/upload",t=!1,i=1,m=2,u=3,h=4,v=5,b=6,r={};function y(){var e=g.popups.get("image.insert").find(".fr-image-by-url-layer input");e.val(""),d&&e.val(d.attr("src")),e.trigger("change")}function n(){var e=g.popups.get("image.edit");if(e||(e=P()),e){var t=we();Ce()&&(t=t.find(".fr-img-wrap")),g.popups.setContainer("image.edit",g.$sc),g.popups.refresh("image.edit");var a=t.offset().left+t.outerWidth()/2,i=t.offset().top+t.outerHeight();d.hasClass("fr-uploading")?O():g.popups.show("image.edit",a,i,t.outerHeight(),!0)}}function w(){k()}function C(e){0<e.parents(".fr-img-caption").length&&(e=e.parents(".fr-img-caption").first());var t=e.hasClass("fr-dib")?"block":e.hasClass("fr-dii")?"inline":null,a=e.hasClass("fr-fil")?"left":e.hasClass("fr-fir")?"right":ue(e);me(e,t,a),e.removeClass("fr-dib fr-dii fr-fir fr-fil")}function A(){for(var e,t="IMG"==g.el.tagName?[g.el]:g.el.querySelectorAll("img"),a=0;a<t.length;a++){var i=c(t[a]);!g.opts.htmlUntouched&&g.opts.useClasses?((g.opts.imageDefaultAlign||g.opts.imageDefaultDisplay)&&(0<(e=i).parents(".fr-img-caption").length&&(e=e.parents(".fr-img-caption").first()),e.hasClass("fr-dii")||e.hasClass("fr-dib")||(e.addClass("fr-fi"+ue(e)[0]),e.addClass("fr-di"+he(e)[0]),e.css("margin",""),e.css("float",""),e.css("display",""),e.css("z-index",""),e.css("position",""),e.css("overflow",""),e.css("vertical-align",""))),g.opts.imageTextNear||(0<i.parents(".fr-img-caption").length?i.parents(".fr-img-caption").first().removeClass("fr-dii").addClass("fr-dib"):i.removeClass("fr-dii").addClass("fr-dib"))):g.opts.htmlUntouched||g.opts.useClasses||(g.opts.imageDefaultAlign||g.opts.imageDefaultDisplay)&&C(i),g.opts.iframe&&i.on("load",g.size.syncIframe)}}function E(e){void 0===e&&(e=!0);var t,a=Array.prototype.slice.call(g.el.querySelectorAll("img")),i=[];for(t=0;t<a.length;t++)if(i.push(a[t].getAttribute("src")),c(a[t]).toggleClass("fr-draggable",g.opts.imageMove),""===a[t].getAttribute("class")&&a[t].removeAttribute("class"),""===a[t].getAttribute("style")&&a[t].removeAttribute("style"),a[t].parentNode&&a[t].parentNode.parentNode&&g.node.hasClass(a[t].parentNode.parentNode,"fr-img-caption")){var r=a[t].parentNode.parentNode;g.browser.mozilla||r.setAttribute("contenteditable",!1),r.setAttribute("draggable",!1),r.classList.add("fr-draggable");var n=a[t].nextSibling;n&&!g.browser.mozilla&&n.setAttribute("contenteditable",!0)}if(o)for(t=0;t<o.length;t++)i.indexOf(o[t].getAttribute("src"))<0&&g.events.trigger("image.removed",[c(o[t])]);if(o&&e){var s=[];for(t=0;t<o.length;t++)s.push(o[t].getAttribute("src"));for(t=0;t<a.length;t++)s.indexOf(a[t].getAttribute("src"))<0&&g.events.trigger("image.loaded",[c(a[t])])}o=a}function S(){if(l||function s(){var e;g.shared.$image_resizer?(l=g.shared.$image_resizer,p=g.shared.$img_overlay,g.events.on("destroy",function(){c("body").first().append(l.removeClass("fr-active"))},!0)):(g.shared.$image_resizer=c(document.createElement("div")).attr("class","fr-image-resizer"),l=g.shared.$image_resizer,g.events.$on(l,"mousedown",function(e){e.stopPropagation()},!0),g.opts.imageResize&&(l.append(R("nw")+R("ne")+R("sw")+R("se")),g.shared.$img_overlay=c(document.createElement("div")).attr("class","fr-image-overlay"),p=g.shared.$img_overlay,e=l.get(0).ownerDocument,c(e).find("body").first().append(p)));g.events.on("shared.destroy",function(){l.html("").removeData().remove(),l=null,g.opts.imageResize&&(p.remove(),p=null)},!0),g.helpers.isMobile()||g.events.$on(c(g.o_win),"resize",function(){d&&!d.hasClass("fr-uploading")?pe(!0):d&&(S(),ve(),O(!1))});if(g.opts.imageResize){e=l.get(0).ownerDocument,g.events.$on(l,g._mousedown,".fr-handler",x),g.events.$on(c(e),g._mousemove,$),g.events.$on(c(e.defaultView||e.parentWindow),g._mouseup,U),g.events.$on(p,"mouseleave",U);var i=1,r=null,n=0;g.events.on("keydown",function(e){if(d){var t=-1!=navigator.userAgent.indexOf("Mac OS X")?e.metaKey:e.ctrlKey,a=e.which;(a!==r||200<e.timeStamp-n)&&(i=1),(a==_e.KEYCODE.EQUALS||g.browser.mozilla&&a==_e.KEYCODE.FF_EQUALS)&&t&&!e.altKey?i=ee.call(this,e,1,1,i):(a==_e.KEYCODE.HYPHEN||g.browser.mozilla&&a==_e.KEYCODE.FF_HYPHEN)&&t&&!e.altKey?i=ee.call(this,e,2,-1,i):g.keys.ctrlKey(e)||a!=_e.KEYCODE.ENTER||(d.before("<br>"),T(d)),r=a,n=e.timeStamp}},!0),g.events.on("keyup",function(){i=1})}}(),!d)return!1;var e=g.$wp||g.$sc;e.append(l),l.data("instance",g);var t=e.scrollTop()-("static"!=e.css("position")?e.offset().top:0),a=e.scrollLeft()-("static"!=e.css("position")?e.offset().left:0);a-=g.helpers.getPX(e.css("border-left-width")),t-=g.helpers.getPX(e.css("border-top-width")),g.$el.is("img")&&g.$sc.is("body")&&(a=t=0);var i=we();Ce()&&(i=i.find(".fr-img-wrap"));var r=0,n=0;g.opts.iframe&&(r=g.helpers.getPX(g.$wp.find(".fr-iframe").css("padding-top")),n=g.helpers.getPX(g.$wp.find(".fr-iframe").css("padding-left"))),l.css("top",(g.opts.iframe?i.offset().top+r:i.offset().top+t)-1).css("left",(g.opts.iframe?i.offset().left+n:i.offset().left+a)-1).css("width",i.get(0).getBoundingClientRect().width).css("height",i.get(0).getBoundingClientRect().height).addClass("fr-active")}function R(e){return'<div class="fr-handler fr-h'+e+'"></div>'}function D(e){Ce()?d.parents(".fr-img-caption").css("width",e):d.css("width",e)}function x(e){if(!g.core.sameInstance(l))return!0;if(e.preventDefault(),e.stopPropagation(),g.$el.find("img.fr-error").left)return!1;g.undo.canDo()||g.undo.saveStep();var t=e.pageX||e.originalEvent.touches[0].pageX;if("mousedown"==e.type){var a=g.$oel.get(0).ownerDocument,i=a.defaultView||a.parentWindow,r=!1;try{r=i.location!=i.parent.location&&!(i.$&&i.$.FE)}catch(o){}r&&i.frameElement&&(t+=g.helpers.getPX(c(i.frameElement).offset().left)+i.frameElement.clientLeft)}(f=c(this)).data("start-x",t),f.data("start-width",d.width()),f.data("start-height",d.height());var n=d.width();if(g.opts.imageResizeWithPercent){var s=d.parentsUntil(g.$el,g.html.blockTagsQuery()).get(0)||g.el;n=(n/c(s).outerWidth()*100).toFixed(2)+"%"}D(n),p.show(),g.popups.hideAll(),ce()}function $(e){if(!g.core.sameInstance(l))return!0;var t;if(f&&d){if(e.preventDefault(),g.$el.find("img.fr-error").left)return!1;var a=e.pageX||(e.originalEvent.touches?e.originalEvent.touches[0].pageX:null);if(!a)return!1;var i=a-f.data("start-x"),r=f.data("start-width");if((f.hasClass("fr-hnw")||f.hasClass("fr-hsw"))&&(i=0-i),g.opts.imageResizeWithPercent){var n=d.parentsUntil(g.$el,g.html.blockTagsQuery()).get(0)||g.el;r=((r+i)/c(n).outerWidth()*100).toFixed(2),g.opts.imageRoundPercent&&(r=Math.round(r)),D(r+"%"),(t=Ce()?(g.helpers.getPX(d.parents(".fr-img-caption").css("width"))/c(n).outerWidth()*100).toFixed(2):(g.helpers.getPX(d.css("width"))/c(n).outerWidth()*100).toFixed(2))===r||g.opts.imageRoundPercent||D(t+"%"),d.css("height","").removeAttr("height")}else r+i>=g.opts.imageMinWidth&&(D(r+i),t=Ce()?g.helpers.getPX(d.parents(".fr-img-caption").css("width")):g.helpers.getPX(d.css("width"))),t!==r+i&&D(t),((d.attr("style")||"").match(/(^height:)|(; *height:)/)||d.attr("height"))&&(d.css("height",f.data("start-height")*d.width()/f.data("start-width")),d.removeAttr("height"));S(),g.events.trigger("image.resize",[ye()])}}function U(e){if(!g.core.sameInstance(l))return!0;if(f&&d){if(e&&e.stopPropagation(),g.$el.find("img.fr-error").left)return!1;f=null,p.hide(),S(),n(),g.undo.saveStep(),g.events.trigger("image.resizeEnd",[ye()])}}function I(e,t,a){g.edit.on(),d&&d.addClass("fr-error"),r[e]?B(r[e]):B(g.language.translate("Something went wrong. Please try again.")),!d&&a&&te(a),g.events.trigger("image.error",[{code:e,message:r[e]},t,a])}function P(e){if(e)return g.$wp&&g.events.$on(g.$wp,"scroll.image-edit",function(){d&&g.popups.isVisible("image.edit")&&(g.events.disableBlur(),n())}),!0;var t="";if(0<g.opts.imageEditButtons.length){var a={buttons:t+='<div class="fr-buttons"> \n '.concat(g.button.buildList(g.opts.imageEditButtons),"\n </div>")};return g.popups.create("image.edit",a)}return!1}function O(e){var t=g.popups.get("image.insert");if(t||(t=X()),t.find(".fr-layer.fr-active").removeClass("fr-active").addClass("fr-pactive"),t.find(".fr-image-progress-bar-layer").addClass("fr-active"),t.find(".fr-buttons").hide(),d){var a=we();g.popups.setContainer("image.insert",g.$sc);var i=a.offset().left,r=a.offset().top+a.height();g.popups.show("image.insert",i,r,a.outerHeight())}void 0===e&&N(g.language.translate("Uploading"),0)}function k(e){var t=g.popups.get("image.insert");if(t&&(t.find(".fr-layer.fr-pactive").addClass("fr-active").removeClass("fr-pactive"),t.find(".fr-image-progress-bar-layer").removeClass("fr-active"),t.find(".fr-buttons").show(),e||g.$el.find("img.fr-error").length)){if(g.events.focus(),g.$el.find("img.fr-error").length&&(g.$el.find("img.fr-error").remove(),g.undo.saveStep(),g.undo.run(),g.undo.dropRedo()),!g.$wp&&d){var a=d;pe(!0),g.selection.setAfter(a.get(0)),g.selection.restore()}g.popups.hide("image.insert")}}function N(e,t){var a=g.popups.get("image.insert");if(a){var i=a.find(".fr-image-progress-bar-layer");i.find("h3").text(e+(t?" "+t+"%":"")),i.removeClass("fr-error"),t?(i.find("div").removeClass("fr-indeterminate"),i.find("div > span").css("width",t+"%")):i.find("div").addClass("fr-indeterminate")}}function B(e){O();var t=g.popups.get("image.insert").find(".fr-image-progress-bar-layer");t.addClass("fr-error");var a=t.find("h3");a.text(e),g.events.disableBlur(),a.focus()}function T(e){fe.call(e.get(0))}function _(){var e=c(this);g.popups.hide("image.insert"),e.removeClass("fr-uploading"),e.next().is("br")&&e.next().remove(),T(e),g.events.trigger("image.loaded",[e])}function L(s,e,o,l,f){g.edit.off(),N(g.language.translate("Loading image")),e&&(s=g.helpers.sanitizeURL(s));var t=new Image;t.onload=function(){var e,t;if(l){g.undo.canDo()||l.hasClass("fr-uploading")||g.undo.saveStep();var a=l.data("fr-old-src");l.data("fr-image-pasted")&&(a=null),g.$wp?((e=l.clone().removeData("fr-old-src").removeClass("fr-uploading").removeAttr("data-fr-image-pasted")).off("load"),a&&l.attr("src",a),l.replaceWith(e)):e=l;for(var i=e.get(0).attributes,r=0;r<i.length;r++){var n=i[r];0===n.nodeName.indexOf("data-")&&e.removeAttr(n.nodeName)}if(void 0!==o)for(t in o)o.hasOwnProperty(t)&&"link"!=t&&e.attr("data-"+t,o[t]);e.on("load",_),e.attr("src",s),g.edit.on(),E(!1),g.undo.saveStep(),g.events.disableBlur(),g.$el.blur(),g.events.trigger(a?"image.replaced":"image.inserted",[e,f])}else e=Y(s,o,_),E(!1),g.undo.saveStep(),g.events.disableBlur(),g.$el.blur(),g.events.trigger("image.inserted",[e,f])},t.onerror=function(){I(i)},O(g.language.translate("Loading image")),t.src=s}function M(e){N(g.language.translate("Loading image"));var t=this.status,a=this.response,i=this.responseXML,r=this.responseText;try{if(g.opts.imageUploadToS3)if(201==t){var n=function o(e){try{var t=c(e).find("Location").text(),a=c(e).find("Key").text();return!1===g.events.trigger("image.uploadedToS3",[t,a,e],!0)?(g.edit.on(),!1):t}catch(i){return I(h,e),!1}}(i);n&&L(n,!1,[],e,a||i)}else I(h,a||i,e);else if(200<=t&&t<300){var s=function l(e){try{if(!1===g.events.trigger("image.uploaded",[e],!0))return g.edit.on(),!1;var t=JSON.parse(e);return t.link?t:(I(m,e),!1)}catch(a){return I(h,e),!1}}(r);s&&L(s.link,!1,s,e,a||r)}else I(u,a||r,e)}catch(f){I(h,a||r,e)}}function z(){I(h,this.response||this.responseText||this.responseXML)}function K(e){if(e.lengthComputable){var t=e.loaded/e.total*100|0;N(g.language.translate("Uploading"),t)}}function Y(e,t,a){var i,r=c(document.createElement("img")).attr("src",e);if(t&&void 0!==t)for(i in t)t.hasOwnProperty(i)&&"link"!=i&&(" data-"+i+'="'+t[i]+'"',r.attr("data-str"+i,t[i]));var n=g.opts.imageDefaultWidth;n&&"auto"!=n&&(n=g.opts.imageResizeWithPercent?"100%":n+"px"),r.attr("style",n?"width: "+n+";":""),me(r,g.opts.imageDefaultDisplay,g.opts.imageDefaultAlign),r.on("load",a),r.on("error",a),g.edit.on(),g.events.focus(!0),g.selection.restore(),g.undo.saveStep(),g.opts.imageSplitHTML?g.markers.split():g.markers.insert(),g.html.wrap();var s=g.$el.find(".fr-marker");return s.length?(s.parent().is("hr")&&s.parent().after(s),g.node.isLastSibling(s)&&s.parent().hasClass("fr-deletable")&&s.insertAfter(s.parent()),s.replaceWith(r)):g.$el.append(r),g.selection.clear(),r}function W(){g.edit.on(),k(!0)}function G(e,t){if(void 0!==e&&0<e.length){if(!1===g.events.trigger("image.beforeUpload",[e,t]))return!1;var a,i=e[0];if((null===g.opts.imageUploadURL||g.opts.imageUploadURL==s)&&!g.opts.imageUploadToS3)return function o(r,n){var s=new FileReader;s.onload=function(){var e=s.result;if(s.result.indexOf("svg+xml")<0){for(var t=atob(s.result.split(",")[1]),a=[],i=0;i<t.length;i++)a.push(t.charCodeAt(i));e=window.URL.createObjectURL(new Blob([new Uint8Array(a)],{type:r.type})),g.image.insert(e,!1,null,n)}},O(),s.readAsDataURL(r)}(i,t||d),!1;if(i.name||(i.name=(new Date).getTime()+"."+(i.type||"image/jpeg").replace(/image\//g,"")),i.size>g.opts.imageMaxSize)return I(v),!1;if(g.opts.imageAllowedTypes.indexOf(i.type.replace(/image\//g,""))<0)return I(b),!1;if(g.drag_support.formdata&&(a=g.drag_support.formdata?new FormData:null),a){var r;if(!1!==g.opts.imageUploadToS3)for(r in a.append("key",g.opts.imageUploadToS3.keyStart+(new Date).getTime()+"-"+(i.name||"untitled")),a.append("success_action_status","201"),a.append("X-Requested-With","xhr"),a.append("Content-Type",i.type),g.opts.imageUploadToS3.params)g.opts.imageUploadToS3.params.hasOwnProperty(r)&&a.append(r,g.opts.imageUploadToS3.params[r]);for(r in g.opts.imageUploadParams)g.opts.imageUploadParams.hasOwnProperty(r)&&a.append(r,g.opts.imageUploadParams[r]);a.append(g.opts.imageUploadParam,i,i.name);var n=g.opts.imageUploadURL;g.opts.imageUploadToS3&&(n=g.opts.imageUploadToS3.uploadURL?g.opts.imageUploadToS3.uploadURL:"https://"+g.opts.imageUploadToS3.region+".amazonaws.com/"+g.opts.imageUploadToS3.bucket),function l(t,a,e,r){function n(){var e=c(this);e.off("load"),e.addClass("fr-uploading"),e.next().is("br")&&e.next().remove(),g.placeholder.refresh(),T(e),S(),O(),g.edit.off(),t.onload=function(){M.call(t,e)},t.onerror=z,t.upload.onprogress=K,t.onabort=W,c(e.off("abortUpload")).on("abortUpload",function(){4!=t.readyState&&(t.abort(),r?(r.attr("src",r.data("fr-old-src")),r.removeClass("fr-uploading")):e.remove(),pe(!0))}),t.send(a)}var s=new FileReader;s.onload=function(){var e=s.result;if(s.result.indexOf("svg+xml")<0){for(var t=atob(s.result.split(",")[1]),a=[],i=0;i<t.length;i++)a.push(t.charCodeAt(i));e=window.URL.createObjectURL(new Blob([new Uint8Array(a)],{type:"image/jpeg"}))}r?(r.get(0).addEventListener("load",n),r.on("error",function(){n(),c(this).off("error")}),g.edit.on(),g.undo.saveStep(),r.data("fr-old-src",r.attr("src")),r.attr("src",e)):Y(e,null,n)},s.readAsDataURL(e)}(g.core.getXHR(n,g.opts.imageUploadMethod),a,i,t||d)}}}function V(e){if(e.is("img")&&0<e.parents(".fr-img-caption").length)return e.parents(".fr-img-caption")}function H(e){var t=e.originalEvent.dataTransfer;if(t&&t.files&&t.files.length){var a=t.files[0];if(a&&a.type&&-1!==a.type.indexOf("image")&&0<=g.opts.imageAllowedTypes.indexOf(a.type.replace(/image\//g,""))){if(!g.opts.imageUpload)return e.preventDefault(),e.stopPropagation(),!1;g.markers.remove(),g.markers.insertAtPoint(e.originalEvent),g.$el.find(".fr-marker").replaceWith(_e.MARKERS),0===g.$el.find(".fr-marker").length&&g.selection.setAtEnd(g.el),g.popups.hideAll();var i=g.popups.get("image.insert");i||(i=X()),g.popups.setContainer("image.insert",g.$sc);var r=e.originalEvent.pageX,n=e.originalEvent.pageY;if(g.opts.iframe){var s=g.helpers.getPX(g.$wp.find(".fr-iframe").css("padding-top")),o=g.helpers.getPX(g.$wp.find(".fr-iframe").css("padding-left"));n+=g.$iframe.offset().top+s,r+=g.$iframe.offset().left+o}return g.popups.show("image.insert",r,n),O(),0<=g.opts.imageAllowedTypes.indexOf(a.type.replace(/image\//g,""))?(pe(!0),G(t.files)):I(b),e.preventDefault(),e.stopPropagation(),!1}}}function X(e){if(e)return g.popups.onRefresh("image.insert",y),g.popups.onHide("image.insert",w),!0;var t,a,i="";g.opts.imageUpload||-1===g.opts.imageInsertButtons.indexOf("imageUpload")||g.opts.imageInsertButtons.splice(g.opts.imageInsertButtons.indexOf("imageUpload"),1);var r=g.button.buildList(g.opts.imageInsertButtons);""!==r&&(i='<div class="fr-buttons fr-tabs">'+r+"</div>");var n=g.opts.imageInsertButtons.indexOf("imageUpload"),s=g.opts.imageInsertButtons.indexOf("imageByURL"),o="";0<=n&&(t=" fr-active",0<=s&&s<n&&(t=""),o='<div class="fr-image-upload-layer'+t+' fr-layer" id="fr-image-upload-layer-'+g.id+'"><strong>'+g.language.translate("Drop image")+"</strong><br>("+g.language.translate("or click")+')<div class="fr-form"><input type="file" accept="image/'+g.opts.imageAllowedTypes.join(", image/").toLowerCase()+'" tabIndex="-1" aria-labelledby="fr-image-upload-layer-'+g.id+'" role="button"></div></div>');var l="";0<=s&&(t=" fr-active",0<=n&&n<s&&(t=""),l='<div class="fr-image-by-url-layer'+t+' fr-layer" id="fr-image-by-url-layer-'+g.id+'"><div class="fr-input-line"><input id="fr-image-by-url-layer-text-'+g.id+'" type="text" placeholder="http://" tabIndex="1" aria-required="true"></div><div class="fr-action-buttons"><button type="button" class="fr-command fr-submit" data-cmd="imageInsertByURL" tabIndex="2" role="button">'+g.language.translate("Insert")+"</button></div></div>");var f={buttons:i,upload_layer:o,by_url_layer:l,progress_bar:'<div class="fr-image-progress-bar-layer fr-layer"><h3 tabIndex="-1" class="fr-message">Uploading</h3><div class="fr-loader"><span class="fr-progress"></span></div><div class="fr-action-buttons"><button type="button" class="fr-command fr-dismiss" data-cmd="imageDismissError" tabIndex="2" role="button">OK</button></div></div>'};return 1<=g.opts.imageInsertButtons.length&&(a=g.popups.create("image.insert",f)),g.$wp&&g.events.$on(g.$wp,"scroll",function(){d&&g.popups.isVisible("image.insert")&&ve()}),function p(i){g.events.$on(i,"dragover dragenter",".fr-image-upload-layer",function(){return c(this).addClass("fr-drop"),!1},!0),g.events.$on(i,"dragleave dragend",".fr-image-upload-layer",function(){return c(this).removeClass("fr-drop"),!1},!0),g.events.$on(i,"drop",".fr-image-upload-layer",function(e){e.preventDefault(),e.stopPropagation(),c(this).removeClass("fr-drop");var t=e.originalEvent.dataTransfer;if(t&&t.files){var a=i.data("instance")||g;a.events.disableBlur(),a.image.upload(t.files),a.events.enableBlur()}},!0),g.helpers.isIOS()&&g.events.$on(i,"touchstart",'.fr-image-upload-layer input[type="file"]',function(){c(this).trigger("click")},!0),g.events.$on(i,"change",'.fr-image-upload-layer input[type="file"]',function(){if(this.files){var e=i.data("instance")||g;e.events.disableBlur(),i.find("input:focus").blur(),e.events.enableBlur(),e.image.upload(this.files,d)}c(this).val("")},!0)}(a),a}function F(){d&&g.popups.get("image.alt").find("input").val(d.attr("alt")||"").trigger("change")}function j(){var e=g.popups.get("image.alt");e||(e=q()),k(),g.popups.refresh("image.alt"),g.popups.setContainer("image.alt",g.$sc);var t=we();Ce()&&(t=t.find(".fr-img-wrap"));var a=t.offset().left+t.outerWidth()/2,i=t.offset().top+t.outerHeight();g.popups.show("image.alt",a,i,t.outerHeight(),!0)}function q(e){if(e)return g.popups.onRefresh("image.alt",F),!0;var t={buttons:'<div class="fr-buttons fr-tabs">'+g.button.buildList(g.opts.imageAltButtons)+"</div>",alt_layer:'<div class="fr-image-alt-layer fr-layer fr-active" id="fr-image-alt-layer-'+g.id+'"><div class="fr-input-line"><input id="fr-image-alt-layer-text-'+g.id+'" type="text" placeholder="'+g.language.translate("Alternative Text")+'" tabIndex="1"></div><div class="fr-action-buttons"><button type="button" class="fr-command fr-submit" data-cmd="imageSetAlt" tabIndex="2" role="button">'+g.language.translate("Update")+"</button></div></div>"},a=g.popups.create("image.alt",t);return g.$wp&&g.events.$on(g.$wp,"scroll.image-alt",function(){d&&g.popups.isVisible("image.alt")&&j()}),a}function Q(){var e=g.popups.get("image.size");if(d)if(Ce()){var t=d.parent();t.get(0).style.width||(t=d.parent().parent()),e.find('input[name="width"]').val(t.get(0).style.width).trigger("change"),e.find('input[name="height"]').val(t.get(0).style.height).trigger("change")}else e.find('input[name="width"]').val(d.get(0).style.width).trigger("change"),e.find('input[name="height"]').val(d.get(0).style.height).trigger("change")}function J(){var e=g.popups.get("image.size");e||(e=Z()),k(),g.popups.refresh("image.size"),g.popups.setContainer("image.size",g.$sc);var t=we();Ce()&&(t=t.find(".fr-img-wrap"));var a=t.offset().left+t.outerWidth()/2,i=t.offset().top+t.outerHeight();g.popups.show("image.size",a,i,t.outerHeight(),!0)}function Z(e){if(e)return g.popups.onRefresh("image.size",Q),!0;var t={buttons:'<div class="fr-buttons fr-tabs">'+g.button.buildList(g.opts.imageSizeButtons)+"</div>",size_layer:'<div class="fr-image-size-layer fr-layer fr-active" id="fr-image-size-layer-'+g.id+'"><div class="fr-image-group"><div class="fr-input-line"><input id="fr-image-size-layer-width-'+g.id+'" type="text" name="width" placeholder="'+g.language.translate("Width")+'" tabIndex="1"></div><div class="fr-input-line"><input id="fr-image-size-layer-height'+g.id+'" type="text" name="height" placeholder="'+g.language.translate("Height")+'" tabIndex="1"></div></div><div class="fr-action-buttons"><button type="button" class="fr-command fr-submit" data-cmd="imageSetSize" tabIndex="2" role="button">'+g.language.translate("Update")+"</button></div></div>"},a=g.popups.create("image.size",t);return g.$wp&&g.events.$on(g.$wp,"scroll.image-size",function(){d&&g.popups.isVisible("image.size")&&J()}),a}function ee(e,t,a,i){return e.pageX=t,x.call(this,e),e.pageX=e.pageX+a*Math.floor(Math.pow(1.1,i)),$.call(this,e),U.call(this,e),++i}function te(e){(e=e||we())&&!1!==g.events.trigger("image.beforeRemove",[e])&&(g.popups.hideAll(),be(),pe(!0),g.undo.canDo()||g.undo.saveStep(),e.get(0)==g.el?e.removeAttr("src"):(e.get(0).parentNode&&"A"==e.get(0).parentNode.tagName?(g.selection.setBefore(e.get(0).parentNode)||g.selection.setAfter(e.get(0).parentNode)||e.parent().after(_e.MARKERS),c(e.get(0).parentNode).remove()):(g.selection.setBefore(e.get(0))||g.selection.setAfter(e.get(0))||e.after(_e.MARKERS),e.remove()),g.html.fillEmptyBlocks(),g.selection.restore()),g.undo.saveStep())}function ae(e){var t=e.which;if(d&&(t==_e.KEYCODE.BACKSPACE||t==_e.KEYCODE.DELETE))return e.preventDefault(),e.stopPropagation(),te(),!1;if(d&&t==_e.KEYCODE.ESC){var a=d;return pe(!0),g.selection.setAfter(a.get(0)),g.selection.restore(),e.preventDefault(),!1}if(!d||t!=_e.KEYCODE.ARROW_LEFT&&t!=_e.KEYCODE.ARROW_RIGHT)return d&&t===_e.KEYCODE.TAB?(e.preventDefault(),e.stopPropagation(),pe(!0),!1):d&&t!=_e.KEYCODE.F10&&!g.keys.isBrowserAction(e)?(e.preventDefault(),e.stopPropagation(),!1):void 0;var i=d.get(0);return pe(!0),t==_e.KEYCODE.ARROW_LEFT?g.selection.setBefore(i):g.selection.setAfter(i),g.selection.restore(),e.preventDefault(),!1}function ie(e){if(e&&"IMG"==e.tagName){if(g.node.hasClass(e,"fr-uploading")||g.node.hasClass(e,"fr-error")?e.parentNode.removeChild(e):g.node.hasClass(e,"fr-draggable")&&e.classList.remove("fr-draggable"),e.parentNode&&e.parentNode.parentNode&&g.node.hasClass(e.parentNode.parentNode,"fr-img-caption")){var t=e.parentNode.parentNode;t.removeAttribute("contenteditable"),t.removeAttribute("draggable"),t.classList.remove("fr-draggable");var a=e.nextSibling;a&&a.removeAttribute("contenteditable")}}else if(e&&e.nodeType==Node.ELEMENT_NODE)for(var i=e.querySelectorAll("img.fr-uploading, img.fr-error, img.fr-draggable"),r=0;r<i.length;r++)ie(i[r])}function re(e){if(!1===g.events.trigger("image.beforePasteUpload",[e]))return!1;d=c(e),S(),n(),ve(),O(),d.on("load",function(){S(),c(g.popups.get("image.insert").get(0)).find("div.fr-active.fr-error").length<1&&O(),c(this).off("load")});for(var t=c(e).attr("src").split(","),a=atob(t[1]),i=[],r=0;r<a.length;r++)i.push(a.charCodeAt(r));G([new Blob([new Uint8Array(i)],{type:t[0].replace(/data\:/g,"").replace(/;base64/g,"")})],d)}function ne(){g.opts.imagePaste?g.$el.find("img[data-fr-image-pasted]").each(function(e,i){if(g.opts.imagePasteProcess){var t=g.opts.imageDefaultWidth;t&&"auto"!=t&&(t+=g.opts.imageResizeWithPercent?"%":"px"),c(i).css("width",t).removeClass("fr-dii fr-dib fr-fir fr-fil"),me(c(i),g.opts.imageDefaultDisplay,g.opts.imageDefaultAlign)}if(0===i.src.indexOf("data:"))re(i);else if(0===i.src.indexOf("blob:")||0===i.src.indexOf("http")&&g.opts.imageUploadRemoteUrls&&g.opts.imageCORSProxy){var a=new Image;a.crossOrigin="Anonymous",a.onload=function(){var e,t=g.o_doc.createElement("CANVAS"),a=t.getContext("2d");t.height=this.naturalHeight,t.width=this.naturalWidth,a.drawImage(this,0,0),setTimeout(function(){re(i)},0),e=2e3<this.naturalWidth||1500<this.naturalHeight?"jpeg":"png",i.src=t.toDataURL("image/"+e)},a.src=(0===i.src.indexOf("blob:")?"":g.opts.imageCORSProxy+"/")+i.src}else 0!==i.src.indexOf("http")||0===i.src.indexOf("https://mail.google.com/mail")?(g.selection.save(),c(i).remove(),g.selection.restore()):c(i).removeAttr("data-fr-image-pasted")}):g.$el.find("img[data-fr-image-pasted]").remove()}function se(e){var t=e.target.result,a=g.opts.imageDefaultWidth;a&&"auto"!=a&&(a+=g.opts.imageResizeWithPercent?"%":"px"),g.undo.saveStep(),g.html.insert('<img data-fr-image-pasted="true" src="'+t+'"'+(a?' style="width: '+a+';"':"")+">");var i=g.$el.find('img[data-fr-image-pasted="true"]');i&&me(i,g.opts.imageDefaultDisplay,g.opts.imageDefaultAlign),g.events.trigger("paste.after")}function oe(e){if(e&&e.clipboardData&&e.clipboardData.items){var t=null;if(e.clipboardData.types&&-1!=[].indexOf.call(e.clipboardData.types,"text/rtf")||e.clipboardData.getData("text/rtf"))t=e.clipboardData.items[0].getAsFile();else for(var a=0;a<e.clipboardData.items.length&&!(t=e.clipboardData.items[a].getAsFile());a++);if(t)return function i(e){var t=new FileReader;t.onload=se,t.readAsDataURL(e)}(t),!1}}function le(e){return e=e.replace(/<img /gi,'<img data-fr-image-pasted="true" ')}function fe(e){if("false"==c(this).parents("[contenteditable]").not(".fr-element").not(".fr-img-caption").not("body").first().attr("contenteditable"))return!0;if(e&&"touchend"==e.type&&a)return!0;if(e&&g.edit.isDisabled())return e.stopPropagation(),e.preventDefault(),!1;for(var t=0;t<_e.INSTANCES.length;t++)_e.INSTANCES[t]!=g&&_e.INSTANCES[t].events.trigger("image.hideResizer");g.toolbar.disable(),e&&(e.stopPropagation(),e.preventDefault()),g.helpers.isMobile()&&(g.events.disableBlur(),g.$el.blur(),g.events.enableBlur()),g.opts.iframe&&g.size.syncIframe(),d=c(this),be(),S(),n(),g.browser.msie?(g.popups.areVisible()&&g.events.disableBlur(),g.win.getSelection&&(g.win.getSelection().removeAllRanges(),g.win.getSelection().addRange(g.doc.createRange()))):g.selection.clear(),g.helpers.isIOS()&&(g.events.disableBlur(),g.$el.blur()),g.button.bulkRefresh(),g.events.trigger("video.hideResizer")}function pe(e){d&&(function t(){return ge}()||!0===e)&&(g.toolbar.enable(),l.removeClass("fr-active"),g.popups.hide("image.edit"),d=null,ce(),f=null,p&&p.hide())}r[i]="Image cannot be loaded from the passed link.",r[m]="No link in upload response.",r[u]="Error during file upload.",r[h]="Parsing response failed.",r[v]="File is too large.",r[b]="Image file type is invalid.",r[7]="Files can be uploaded only to same domain in IE 8 and IE 9.";var ge=!(r[8]="Image file is corrupted.");function de(){ge=!0}function ce(){ge=!1}function me(e,t,a){!g.opts.htmlUntouched&&g.opts.useClasses?(e.removeClass("fr-fil fr-fir fr-dib fr-dii"),a&&e.addClass("fr-fi"+a[0]),t&&e.addClass("fr-di"+t[0])):"inline"==t?(e.css({display:"inline-block",verticalAlign:"bottom",margin:g.opts.imageDefaultMargin}),"center"==a?e.css({"float":"none",marginBottom:"",marginTop:"",maxWidth:"calc(100% - "+2*g.opts.imageDefaultMargin+"px)",textAlign:"center"}):"left"==a?e.css({"float":"left",marginLeft:0,maxWidth:"calc(100% - "+g.opts.imageDefaultMargin+"px)",textAlign:"left"}):e.css({"float":"right",marginRight:0,maxWidth:"calc(100% - "+g.opts.imageDefaultMargin+"px)",textAlign:"right"})):"block"==t&&(e.css({display:"block","float":"none",verticalAlign:"top",margin:g.opts.imageDefaultMargin+"px auto",textAlign:"center"}),"left"==a?e.css({marginLeft:0,textAlign:"left"}):"right"==a&&e.css({marginRight:0,textAlign:"right"}))}function ue(e){if(void 0===e&&(e=we()),e){if(e.hasClass("fr-fil"))return"left";if(e.hasClass("fr-fir"))return"right";if(e.hasClass("fr-dib")||e.hasClass("fr-dii"))return"center";var t=e.css("float");if(e.css("float","none"),"block"==e.css("display")){if(e.css("float",""),e.css("float")!=t&&e.css("float",t),0===parseInt(e.css("margin-left"),10))return"left";if(0===parseInt(e.css("margin-right"),10))return"right"}else{if(e.css("float",""),e.css("float")!=t&&e.css("float",t),"left"==e.css("float"))return"left";if("right"==e.css("float"))return"right"}}return"center"}function he(e){void 0===e&&(e=we());var t=e.css("float");return e.css("float","none"),"block"==e.css("display")?(e.css("float",""),e.css("float")!=t&&e.css("float",t),"block"):(e.css("float",""),e.css("float")!=t&&e.css("float",t),"inline")}function ve(){var e=g.popups.get("image.insert");e||(e=X()),g.popups.isVisible("image.insert")||(k(),g.popups.refresh("image.insert"),g.popups.setContainer("image.insert",g.$sc));var t=we();Ce()&&(t=t.find(".fr-img-wrap"));var a=t.offset().left+t.outerWidth()/2,i=t.offset().top+t.outerHeight();g.popups.show("image.insert",a,i,t.outerHeight(!0),!0)}function be(){if(d){g.events.disableBlur(),g.selection.clear();var e=g.doc.createRange();e.selectNode(d.get(0)),g.browser.msie&&e.collapse(!0),g.selection.get().addRange(e),g.events.enableBlur()}}function ye(){return d}function we(){return Ce()?d.parents(".fr-img-caption").first():d}function Ce(){return!!d&&0<d.parents(".fr-img-caption").length}return{_init:function Ae(){var i;(function e(){g.events.$on(g.$el,g._mousedown,"IMG"==g.el.tagName?null:'img:not([contenteditable="false"])',function(e){if("false"==c(this).parents("contenteditable").not(".fr-element").not(".fr-img-caption").not("body").first().attr("contenteditable"))return!0;g.helpers.isMobile()||g.selection.clear(),t=!0,g.popups.areVisible()&&g.events.disableBlur(),g.browser.msie&&(g.events.disableBlur(),g.$el.attr("contenteditable",!1)),g.draggable||"touchstart"==e.type||e.preventDefault(),e.stopPropagation()}),g.events.$on(g.$el,g._mousedown,".fr-img-caption .fr-inner",function(e){g.core.hasFocus()||g.events.focus(),e.stopPropagation()}),g.events.$on(g.$el,"paste",".fr-img-caption .fr-inner",function(e){g.toolbar.hide(),e.stopPropagation()}),g.events.$on(g.$el,g._mouseup,"IMG"==g.el.tagName?null:'img:not([contenteditable="false"])',function(e){if("false"==c(this).parents("contenteditable").not(".fr-element").not(".fr-img-caption").not("body").first().attr("contenteditable"))return!0;t&&(t=!1,e.stopPropagation(),g.browser.msie&&(g.$el.attr("contenteditable",!0),g.events.enableBlur()))}),g.events.on("keyup",function(e){if(e.shiftKey&&""===g.selection.text().replace(/\n/g,"")&&g.keys.isArrow(e.which)){var t=g.selection.element(),a=g.selection.endElement();t&&"IMG"==t.tagName?T(c(t)):a&&"IMG"==a.tagName&&T(c(a))}},!0),g.events.on("drop",H),g.events.on("element.beforeDrop",V),g.events.on("mousedown window.mousedown",de),g.events.on("window.touchmove",ce),g.events.on("mouseup window.mouseup",function(){if(d)return pe(),!1;ce()}),g.events.on("commands.mousedown",function(e){0<e.parents(".fr-toolbar").length&&pe()}),g.events.on("image.resizeEnd",function(){g.opts.iframe&&g.size.syncIframe()}),g.events.on("blur image.hideResizer commands.undo commands.redo element.dropped",function(){pe(!(t=!1))}),g.events.on("modals.hide",function(){d&&(be(),g.selection.clear())}),g.events.on("image.resizeEnd",function(){g.win.getSelection&&T(d)}),g.opts.imageAddNewLine&&g.events.on("image.inserted",function(e){var t=e.get(0);for(t.nextSibling&&"BR"===t.nextSibling.tagName&&(t=t.nextSibling);t&&!g.node.isElement(t);)t=g.node.isLastSibling(t)?t.parentNode:null;g.node.isElement(t)&&(g.opts.enter===_e.ENTER_BR?e.after("<br>"):c(g.node.blockParent(e.get(0))).after("<"+g.html.defaultTag()+"><br></"+g.html.defaultTag()+">"))})})(),"IMG"==g.el.tagName&&g.$el.addClass("fr-view"),g.events.$on(g.$el,g.helpers.isMobile()&&!g.helpers.isWindowsPhone()?"touchend":"click","IMG"==g.el.tagName?null:'img:not([contenteditable="false"])',fe),g.helpers.isMobile()&&(g.events.$on(g.$el,"touchstart","IMG"==g.el.tagName?null:'img:not([contenteditable="false"])',function(){a=!1}),g.events.$on(g.$el,"touchmove",function(){a=!0})),g.$wp?(g.events.on("window.keydown keydown",ae,!0),g.events.on("keyup",function(e){if(d&&e.which==_e.KEYCODE.ENTER)return!1},!0),g.events.$on(g.$el,"keydown",function(){var e=g.selection.element();(e.nodeType===Node.TEXT_NODE||"BR"==e.tagName&&g.node.isLastSibling(e))&&(e=e.parentNode),g.node.hasClass(e,"fr-inner")||(g.node.hasClass(e,"fr-img-caption")||(e=c(e).parents(".fr-img-caption").get(0)),g.node.hasClass(e,"fr-img-caption")&&(c(e).after(_e.INVISIBLE_SPACE+_e.MARKERS),g.selection.restore()))})):g.events.$on(g.$win,"keydown",ae),g.events.on("toolbar.esc",function(){if(d){if(g.$wp)g.events.disableBlur(),g.events.focus();else{var e=d;pe(!0),g.selection.setAfter(e.get(0)),g.selection.restore()}return!1}},!0),g.events.on("toolbar.focusEditor",function(){if(d)return!1},!0),g.events.on("window.cut window.copy",function(e){if(d&&g.popups.isVisible("image.edit")&&!g.popups.get("image.edit").find(":focus").length){var t=we();Ce()?(t.before(_e.START_MARKER),t.after(_e.END_MARKER),g.selection.restore(),g.paste.saveCopiedText(t.get(0).outerHTML,t.text())):(be(),g.paste.saveCopiedText(d.get(0).outerHTML,d.attr("alt"))),"copy"==e.type?setTimeout(function(){T(d)}):(pe(!0),g.undo.saveStep(),setTimeout(function(){g.undo.saveStep()},0))}},!0),g.browser.msie&&g.events.on("keydown",function(e){if(!g.selection.isCollapsed()||!d)return!0;var t=e.which;t==_e.KEYCODE.C&&g.keys.ctrlKey(e)?g.events.trigger("window.copy"):t==_e.KEYCODE.X&&g.keys.ctrlKey(e)&&g.events.trigger("window.cut")}),g.events.$on(c(g.o_win),"keydown",function(e){var t=e.which;if(d&&t==_e.KEYCODE.BACKSPACE)return e.preventDefault(),!1}),g.events.$on(g.$win,"keydown",function(e){var t=e.which;d&&d.hasClass("fr-uploading")&&t==_e.KEYCODE.ESC&&d.trigger("abortUpload")}),g.events.on("destroy",function(){d&&d.hasClass("fr-uploading")&&d.trigger("abortUpload")}),g.events.on("paste.before",oe),g.events.on("paste.beforeCleanup",le),g.events.on("paste.after",ne),g.events.on("html.set",A),g.events.on("html.inserted",A),A(),g.events.on("destroy",function(){o=[]}),g.events.on("html.processGet",ie),g.opts.imageOutputSize&&g.events.on("html.beforeGet",function(){i=g.el.querySelectorAll("img");for(var e=0;e<i.length;e++){var t=i[e].style.width||c(i[e]).width(),a=i[e].style.height||c(i[e]).height();t&&i[e].setAttribute("width",(""+t).replace(/px/,"")),a&&i[e].setAttribute("height",(""+a).replace(/px/,""))}}),g.opts.iframe&&g.events.on("image.loaded",g.size.syncIframe),g.$wp&&(E(),g.events.on("contentChanged",E)),g.events.$on(c(g.o_win),"orientationchange.image",function(){setTimeout(function(){d&&T(d)},100)}),P(!0),X(!0),Z(!0),q(!0),g.events.on("node.remove",function(e){if("IMG"==e.get(0).tagName)return te(e),!1})},showInsertPopup:function Ee(){var e=g.$tb.find('.fr-command[data-cmd="insertImage"]'),t=g.popups.get("image.insert");if(t||(t=X()),k(),!t.hasClass("fr-active"))if(g.popups.refresh("image.insert"),g.popups.setContainer("image.insert",g.$tb),e.isVisible()){var a=g.button.getPosition(e),i=a.left,r=a.top;g.popups.show("image.insert",i,r,e.outerHeight())}else g.position.forSelection(t),g.popups.show("image.insert")},showLayer:function Se(e){var t,a,i=g.popups.get("image.insert");if(d||g.opts.toolbarInline){if(d){var r=we();Ce()&&(r=r.find(".fr-img-wrap")),a=r.offset().top+r.outerHeight(),t=r.offset().left}}else{var n=g.$tb.find('.fr-command[data-cmd="insertImage"]');t=n.offset().left,a=n.offset().top+(g.opts.toolbarBottom?10:n.outerHeight()-10)}!d&&g.opts.toolbarInline&&(a=i.offset().top-g.helpers.getPX(i.css("margin-top")),i.hasClass("fr-above")&&(a+=i.outerHeight())),i.find(".fr-layer").removeClass("fr-active"),i.find(".fr-"+e+"-layer").addClass("fr-active"),g.popups.show("image.insert",t,a,d?d.outerHeight():0),g.accessibility.focusPopup(i)},refreshUploadButton:function Re(e){var t=g.popups.get("image.insert");t&&t.find(".fr-image-upload-layer").hasClass("fr-active")&&e.addClass("fr-active").attr("aria-pressed",!0)},refreshByURLButton:function De(e){var t=g.popups.get("image.insert");t&&t.find(".fr-image-by-url-layer").hasClass("fr-active")&&e.addClass("fr-active").attr("aria-pressed",!0)},upload:G,insertByURL:function xe(){var e=g.popups.get("image.insert").find(".fr-image-by-url-layer input");if(0<e.val().length){O(),N(g.language.translate("Loading image"));var t=e.val().trim();if(g.opts.imageUploadRemoteUrls&&g.opts.imageCORSProxy&&g.opts.imageUpload){var a=new XMLHttpRequest;a.onload=function(){200==this.status?G([new Blob([this.response],{type:this.response.type||"image/png"})],d):I(i)},a.onerror=function(){L(t,!0,[],d)},a.open("GET",g.opts.imageCORSProxy+"/"+t,!0),a.responseType="blob",a.send()}else L(t,!0,[],d);e.val(""),e.blur()}},align:function $e(e){var t=we();t.removeClass("fr-fir fr-fil"),!g.opts.htmlUntouched&&g.opts.useClasses?"left"==e?t.addClass("fr-fil"):"right"==e&&t.addClass("fr-fir"):me(t,he(),e),be(),S(),n(),g.selection.clear()},refreshAlign:function Ue(e){d&&e.find("> *").first().replaceWith(g.icon.create("image-align-"+ue()))},refreshAlignOnShow:function Ie(e,t){d&&t.find('.fr-command[data-param1="'+ue()+'"]').addClass("fr-active").attr("aria-selected",!0)},display:function Pe(e){var t=we();t.removeClass("fr-dii fr-dib"),!g.opts.htmlUntouched&&g.opts.useClasses?"inline"==e?t.addClass("fr-dii"):"block"==e&&t.addClass("fr-dib"):me(t,e,ue()),be(),S(),n(),g.selection.clear()},refreshDisplayOnShow:function Oe(e,t){d&&t.find('.fr-command[data-param1="'+he()+'"]').addClass("fr-active").attr("aria-selected",!0)},replace:ve,back:function e(){d?(g.events.disableBlur(),c(".fr-popup input:focus").blur(),T(d)):(g.events.disableBlur(),g.selection.restore(),g.events.enableBlur(),g.popups.hide("image.insert"),g.toolbar.showInline())},get:ye,getEl:we,insert:L,showProgressBar:O,remove:te,hideProgressBar:k,applyStyle:function ke(e,t,a){if(void 0===t&&(t=g.opts.imageStyles),void 0===a&&(a=g.opts.imageMultipleStyles),!d)return!1;var i=we();if(!a){var r=Object.keys(t);r.splice(r.indexOf(e),1),i.removeClass(r.join(" "))}"object"==Le(t[e])?(i.removeAttr("style"),i.css(t[e].style)):i.toggleClass(e),T(d)},showAltPopup:j,showSizePopup:J,setAlt:function Ne(e){if(d){var t=g.popups.get("image.alt");d.attr("alt",e||t.find("input").val()||""),t.find("input:focus").blur(),T(d)}},setSize:function Be(e,t){if(d){var a=g.popups.get("image.size");e=e||a.find('input[name="width"]').val()||"",t=t||a.find('input[name="height"]').val()||"";var i=/^[\d]+((px)|%)*$/g;d.removeAttr("width").removeAttr("height"),e.match(i)?d.css("width",e):d.css("width",""),t.match(i)?d.css("height",t):d.css("height",""),Ce()&&(d.parents(".fr-img-caption").removeAttr("width").removeAttr("height"),e.match(i)?d.parents(".fr-img-caption").css("width",e):d.parents(".fr-img-caption").css("width",""),t.match(i)?d.parents(".fr-img-caption").css("height",t):d.parents(".fr-img-caption").css("height","")),a&&a.find("input:focus").blur(),T(d)}},toggleCaption:function Te(){var e;if(d&&!Ce()){var t,a;(e=d).parent().is("a")&&(e=d.parent()),e.attr("style")&&(a=-1<(t=e.attr("style").split(":")).indexOf("width")?t[t.indexOf("width")+1].replace(";",""):"");var i=g.opts.imageResizeWithPercent?(-1<a.indexOf("px")?null:a)||"100%":d.width()+"px";e.wrap("<span "+(g.browser.mozilla?"":'contenteditable="false"')+'class="fr-img-caption '+d.attr("class")+'" style="'+(g.opts.useClasses?"":e.attr("style"))+'" draggable="false"></span>'),e.wrap('<span class="fr-img-wrap"></span>'),d.after('<span class="fr-inner"'+(g.browser.mozilla?"":' contenteditable="true"')+">"+_e.START_MARKER+g.language.translate("Image Caption")+_e.END_MARKER+"</span>"),d.removeAttr("class").removeAttr("style").removeAttr("width"),d.parents(".fr-img-caption").css("width",i),pe(!0),g.selection.restore()}else e=we(),d.insertAfter(e),d.attr("class",e.attr("class").replace("fr-img-caption","")).attr("style",e.attr("style")),e.remove(),T(d)},hasCaption:Ce,exitEdit:pe,edit:T}},_e.DefineIcon("insertImage",{NAME:"image",SVG_KEY:"insertImage"}),_e.RegisterShortcut(_e.KEYCODE.P,"insertImage",null,"P"),_e.RegisterCommand("insertImage",{title:"Insert Image",undo:!1,focus:!0,refreshAfterCallback:!1,popup:!0,callback:function(){this.popups.isVisible("image.insert")?(this.$el.find(".fr-marker").length&&(this.events.disableBlur(),this.selection.restore()),this.popups.hide("image.insert")):this.image.showInsertPopup()},plugin:"image"}),_e.DefineIcon("imageUpload",{NAME:"upload",SVG_KEY:"upload"}),_e.RegisterCommand("imageUpload",{title:"Upload Image",undo:!1,focus:!1,toggle:!0,callback:function(){this.image.showLayer("image-upload")},refresh:function(e){this.image.refreshUploadButton(e)}}),_e.DefineIcon("imageByURL",{NAME:"link",SVG_KEY:"insertLink"}),_e.RegisterCommand("imageByURL",{title:"By URL",undo:!1,focus:!1,toggle:!0,callback:function(){this.image.showLayer("image-by-url")},refresh:function(e){this.image.refreshByURLButton(e)}}),_e.RegisterCommand("imageInsertByURL",{title:"Insert Image",undo:!0,refreshAfterCallback:!1,callback:function(){this.image.insertByURL()},refresh:function(e){this.image.get()?e.text(this.language.translate("Replace")):e.text(this.language.translate("Insert"))}}),_e.DefineIcon("imageDisplay",{NAME:"star",SVG_KEY:"imageDisplay"}),_e.RegisterCommand("imageDisplay",{title:"Display",type:"dropdown",options:{inline:"Inline",block:"Break Text"},callback:function(e,t){this.image.display(t)},refresh:function(e){this.opts.imageTextNear||e.addClass("fr-hidden")},refreshOnShow:function(e,t){this.image.refreshDisplayOnShow(e,t)}}),_e.DefineIcon("image-align",{NAME:"align-left",SVG_KEY:"alignLeft"}),_e.DefineIcon("image-align-left",{NAME:"align-left",SVG_KEY:"alignLeft"}),_e.DefineIcon("image-align-right",{NAME:"align-right",SVG_KEY:"alignRight"}),_e.DefineIcon("image-align-center",{NAME:"align-justify",SVG_KEY:"alignCenter"}),_e.DefineIcon("imageAlign",{NAME:"align-justify",SVG_KEY:"alignJustify"}),_e.RegisterCommand("imageAlign",{type:"dropdown",title:"Align",options:{left:"Align Left",center:"None",right:"Align Right"},html:function(){var e='<ul class="fr-dropdown-list" role="presentation">',t=_e.COMMANDS.imageAlign.options;for(var a in t)t.hasOwnProperty(a)&&(e+='<li role="presentation"><a class="fr-command fr-title" tabIndex="-1" role="option" data-cmd="imageAlign" data-param1="'+a+'" title="'+this.language.translate(t[a])+'">'+this.icon.create("image-align-"+a)+'<span class="fr-sr-only">'+this.language.translate(t[a])+"</span></a></li>");return e+="</ul>"},callback:function(e,t){this.image.align(t)},refresh:function(e){this.image.refreshAlign(e)},refreshOnShow:function(e,t){this.image.refreshAlignOnShow(e,t)}}),_e.DefineIcon("imageReplace",{NAME:"exchange",FA5NAME:"exchange-alt",SVG_KEY:"replaceImage"}),_e.RegisterCommand("imageReplace",{title:"Replace",undo:!1,focus:!1,popup:!0,refreshAfterCallback:!1,callback:function(){this.image.replace()}}),_e.DefineIcon("imageRemove",{NAME:"trash",SVG_KEY:"remove"}),_e.RegisterCommand("imageRemove",{title:"Remove",callback:function(){this.image.remove()}}),_e.DefineIcon("imageBack",{NAME:"arrow-left",SVG_KEY:"back"}),_e.RegisterCommand("imageBack",{title:"Back",undo:!1,focus:!1,back:!0,callback:function(){this.image.back()},refresh:function(e){this.$;this.image.get()||this.opts.toolbarInline?(e.removeClass("fr-hidden"),e.next(".fr-separator").removeClass("fr-hidden")):(e.addClass("fr-hidden"),e.next(".fr-separator").addClass("fr-hidden"))}}),_e.RegisterCommand("imageDismissError",{title:"OK",undo:!1,callback:function(){this.image.hideProgressBar(!0)}}),_e.DefineIcon("imageStyle",{NAME:"magic",SVG_KEY:"imageClass"}),_e.RegisterCommand("imageStyle",{title:"Style",type:"dropdown",html:function(){var e='<ul class="fr-dropdown-list" role="presentation">',t=this.opts.imageStyles;for(var a in t)if(t.hasOwnProperty(a)){var i=t[a];"object"==Le(i)&&(i=i.title),e+='<li role="presentation"><a class="fr-command" tabIndex="-1" role="option" data-cmd="imageStyle" data-param1="'+a+'">'+this.language.translate(i)+"</a></li>"}return e+="</ul>"},callback:function(e,t){this.image.applyStyle(t)},refreshOnShow:function(e,t){var a=this.$,i=this.image.getEl();i&&t.find(".fr-command").each(function(){var e=a(this).data("param1"),t=i.hasClass(e);a(this).toggleClass("fr-active",t).attr("aria-selected",t)})}}),_e.DefineIcon("imageAlt",{NAME:"info",SVG_KEY:"imageAltText"}),_e.RegisterCommand("imageAlt",{undo:!1,focus:!1,popup:!0,title:"Alternative Text",callback:function(){this.image.showAltPopup()}}),_e.RegisterCommand("imageSetAlt",{undo:!0,focus:!1,title:"Update",refreshAfterCallback:!1,callback:function(){this.image.setAlt()}}),_e.DefineIcon("imageSize",{NAME:"arrows-alt",SVG_KEY:"imageSize"}),_e.RegisterCommand("imageSize",{undo:!1,focus:!1,popup:!0,title:"Change Size",callback:function(){this.image.showSizePopup()}}),_e.RegisterCommand("imageSetSize",{undo:!0,focus:!1,title:"Update",refreshAfterCallback:!1,callback:function(){this.image.setSize()}}),_e.DefineIcon("imageCaption",{NAME:"commenting",FA5NAME:"comment-alt",SVG_KEY:"imageCaption"}),_e.RegisterCommand("imageCaption",{undo:!0,focus:!1,title:"Image Caption",refreshAfterCallback:!0,callback:function(){this.image.toggleCaption()},refresh:function(e){this.image.get()&&e.toggleClass("fr-active",this.image.hasCaption())}})}); |
/*! | ||
* froala_editor v3.0.5 (https://www.froala.com/wysiwyg-editor) | ||
* froala_editor v3.0.6 (https://www.froala.com/wysiwyg-editor) | ||
* License https://froala.com/wysiwyg-editor/terms/ | ||
@@ -4,0 +4,0 @@ * Copyright 2014-2019 Froala Labs |
/*! | ||
* froala_editor v3.0.5 (https://www.froala.com/wysiwyg-editor) | ||
* froala_editor v3.0.6 (https://www.froala.com/wysiwyg-editor) | ||
* License https://froala.com/wysiwyg-editor/terms/ | ||
@@ -4,0 +4,0 @@ * Copyright 2014-2019 Froala Labs |
/*! | ||
* froala_editor v3.0.5 (https://www.froala.com/wysiwyg-editor) | ||
* froala_editor v3.0.6 (https://www.froala.com/wysiwyg-editor) | ||
* License https://froala.com/wysiwyg-editor/terms/ | ||
@@ -4,0 +4,0 @@ * Copyright 2014-2019 Froala Labs |
/*! | ||
* froala_editor v3.0.5 (https://www.froala.com/wysiwyg-editor) | ||
* froala_editor v3.0.6 (https://www.froala.com/wysiwyg-editor) | ||
* License https://froala.com/wysiwyg-editor/terms/ | ||
@@ -4,0 +4,0 @@ * Copyright 2014-2019 Froala Labs |
/*! | ||
* froala_editor v3.0.5 (https://www.froala.com/wysiwyg-editor) | ||
* froala_editor v3.0.6 (https://www.froala.com/wysiwyg-editor) | ||
* License https://froala.com/wysiwyg-editor/terms/ | ||
@@ -4,0 +4,0 @@ * Copyright 2014-2019 Froala Labs |
/*! | ||
* froala_editor v3.0.5 (https://www.froala.com/wysiwyg-editor) | ||
* froala_editor v3.0.6 (https://www.froala.com/wysiwyg-editor) | ||
* License https://froala.com/wysiwyg-editor/terms/ | ||
@@ -4,0 +4,0 @@ * Copyright 2014-2019 Froala Labs |
/*! | ||
* froala_editor v3.0.5 (https://www.froala.com/wysiwyg-editor) | ||
* froala_editor v3.0.6 (https://www.froala.com/wysiwyg-editor) | ||
* License https://froala.com/wysiwyg-editor/terms/ | ||
@@ -4,0 +4,0 @@ * Copyright 2014-2019 Froala Labs |
/*! | ||
* froala_editor v3.0.5 (https://www.froala.com/wysiwyg-editor) | ||
* froala_editor v3.0.6 (https://www.froala.com/wysiwyg-editor) | ||
* License https://froala.com/wysiwyg-editor/terms/ | ||
@@ -4,0 +4,0 @@ * Copyright 2014-2019 Froala Labs |
/*! | ||
* froala_editor v3.0.5 (https://www.froala.com/wysiwyg-editor) | ||
* froala_editor v3.0.6 (https://www.froala.com/wysiwyg-editor) | ||
* License https://froala.com/wysiwyg-editor/terms/ | ||
@@ -4,0 +4,0 @@ * Copyright 2014-2019 Froala Labs |
/*! | ||
* froala_editor v3.0.5 (https://www.froala.com/wysiwyg-editor) | ||
* froala_editor v3.0.6 (https://www.froala.com/wysiwyg-editor) | ||
* License https://froala.com/wysiwyg-editor/terms/ | ||
@@ -4,0 +4,0 @@ * Copyright 2014-2019 Froala Labs |
/*! | ||
* froala_editor v3.0.5 (https://www.froala.com/wysiwyg-editor) | ||
* froala_editor v3.0.6 (https://www.froala.com/wysiwyg-editor) | ||
* License https://froala.com/wysiwyg-editor/terms/ | ||
@@ -4,0 +4,0 @@ * Copyright 2014-2019 Froala Labs |
/*! | ||
* froala_editor v3.0.5 (https://www.froala.com/wysiwyg-editor) | ||
* froala_editor v3.0.6 (https://www.froala.com/wysiwyg-editor) | ||
* License https://froala.com/wysiwyg-editor/terms/ | ||
@@ -4,0 +4,0 @@ * Copyright 2014-2019 Froala Labs |
/*! | ||
* froala_editor v3.0.5 (https://www.froala.com/wysiwyg-editor) | ||
* froala_editor v3.0.6 (https://www.froala.com/wysiwyg-editor) | ||
* License https://froala.com/wysiwyg-editor/terms/ | ||
@@ -4,0 +4,0 @@ * Copyright 2014-2019 Froala Labs |
/*! | ||
* froala_editor v3.0.5 (https://www.froala.com/wysiwyg-editor) | ||
* froala_editor v3.0.6 (https://www.froala.com/wysiwyg-editor) | ||
* License https://froala.com/wysiwyg-editor/terms/ | ||
@@ -4,0 +4,0 @@ * Copyright 2014-2019 Froala Labs |
/*! | ||
* froala_editor v3.0.5 (https://www.froala.com/wysiwyg-editor) | ||
* froala_editor v3.0.6 (https://www.froala.com/wysiwyg-editor) | ||
* License https://froala.com/wysiwyg-editor/terms/ | ||
@@ -4,0 +4,0 @@ * Copyright 2014-2019 Froala Labs |
/*! | ||
* froala_editor v3.0.5 (https://www.froala.com/wysiwyg-editor) | ||
* froala_editor v3.0.6 (https://www.froala.com/wysiwyg-editor) | ||
* License https://froala.com/wysiwyg-editor/terms/ | ||
@@ -4,0 +4,0 @@ * Copyright 2014-2019 Froala Labs |
/*! | ||
* froala_editor v3.0.5 (https://www.froala.com/wysiwyg-editor) | ||
* froala_editor v3.0.6 (https://www.froala.com/wysiwyg-editor) | ||
* License https://froala.com/wysiwyg-editor/terms/ | ||
@@ -4,0 +4,0 @@ * Copyright 2014-2019 Froala Labs |
/*! | ||
* froala_editor v3.0.5 (https://www.froala.com/wysiwyg-editor) | ||
* froala_editor v3.0.6 (https://www.froala.com/wysiwyg-editor) | ||
* License https://froala.com/wysiwyg-editor/terms/ | ||
@@ -4,0 +4,0 @@ * Copyright 2014-2019 Froala Labs |
/*! | ||
* froala_editor v3.0.5 (https://www.froala.com/wysiwyg-editor) | ||
* froala_editor v3.0.6 (https://www.froala.com/wysiwyg-editor) | ||
* License https://froala.com/wysiwyg-editor/terms/ | ||
@@ -4,0 +4,0 @@ * Copyright 2014-2019 Froala Labs |
/*! | ||
* froala_editor v3.0.5 (https://www.froala.com/wysiwyg-editor) | ||
* froala_editor v3.0.6 (https://www.froala.com/wysiwyg-editor) | ||
* License https://froala.com/wysiwyg-editor/terms/ | ||
@@ -4,0 +4,0 @@ * Copyright 2014-2019 Froala Labs |
/*! | ||
* froala_editor v3.0.5 (https://www.froala.com/wysiwyg-editor) | ||
* froala_editor v3.0.6 (https://www.froala.com/wysiwyg-editor) | ||
* License https://froala.com/wysiwyg-editor/terms/ | ||
@@ -4,0 +4,0 @@ * Copyright 2014-2019 Froala Labs |
@@ -0,0 +0,0 @@ Froala WYSIWYG Editor |
{ | ||
"name": "froala-editor", | ||
"version": "3.0.5", | ||
"version": "3.0.6", | ||
"description": "The next generation Javascript WYSIWYG HTML rich text editor made by devs for devs. High performance and modern design make it easy to use for developers and loved by users.", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
4183736
25512